LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	<christophe.leroy@csgroup.eu>, <benh@kernel.crashing.org>,
	<paulus@samba.org>, <mpe@ellerman.id.au>, <allison@lohutok.net>,
	<tglx@linutronix.de>, <groug@kaod.org>
Cc: linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] powerpc/xive: Add some error handling code to 'xive_spapr_init()'
Date: Tue, 1 Feb 2022 14:28:29 +0100	[thread overview]
Message-ID: <ebf35275-cfb3-567d-97ba-ec81a6b40cb5@kaod.org> (raw)
In-Reply-To: <564998101804886b151235c8a9f93020923bfd2c.1643718324.git.christophe.jaillet@wanadoo.fr>

On 2/1/22 13:31, Christophe JAILLET wrote:
> 'xive_irq_bitmap_add()' can return -ENOMEM.
> In this case, we should free the memory already allocated and return
> 'false' to the caller.
> 
> Also add an error path which undoes the 'tima = ioremap(...)'
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

> ---
> NOT compile tested (I don't have a cross compiler and won't install one).
> So if some correction or improvement are needed, feel free to propose and
> commit it directly.


A cross compiler takes a couple of seconds to install on any distro.
It takes a little more to compile the pseries defconfig. To test with
QEMU, grab the disk image here :

   https://github.com/legoater/qemu-ppc-boot/blob/main/buildroot/qemu_ppc64le_pseries-2021.11-7-g3058e75456-20211206

run :

   qemu-system-ppc64 -M pseries -cpu POWER9 -kernel vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=rootfs.ext2,if=scsi,index=0,format=raw -nographic -net nic -net user -serial mon:stdio

and you will have a pseries machine with network and disk using the
XIVE interrupt controller.

To get more info on the genirq layer and the XIVE driver, simply
append :

   dyndbg="file arch/powerpc/sysdev/xive/* +p; file kernel/irq/* +p"

Thanks,

C.

  reply	other threads:[~2022-02-01 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 12:31 [PATCH v2] powerpc/xive: Add some error handling code to 'xive_spapr_init()' Christophe JAILLET
2022-02-01 13:28 ` Cédric Le Goater [this message]
2022-02-15  5:26 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebf35275-cfb3-567d-97ba-ec81a6b40cb5@kaod.org \
    --to=clg@kaod.org \
    --cc=allison@lohutok.net \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=christophe.leroy@csgroup.eu \
    --cc=groug@kaod.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox