Re: [kvm-unit-tests PATCH v6 17/18] powerpc/ppc64: add RTAS support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 22, 2016 at 08:39:48AM +0100, Thomas Huth wrote:
> On 22.02.2016 04:26, David Gibson wrote:
> > On Fri, Feb 19, 2016 at 04:58:22PM +0100, Andrew Jones wrote:
> >> Add enough RTAS support to start adding RTAS commands. Just add
> >> power-off for now.
> >>
> >> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> >> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
> >> Tested-by: Laurent Vivier <lvivier@xxxxxxxxxx>
> >> Reviewed-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>
> >> ---
> >>  lib/powerpc/asm/rtas.h  |  26 +++++++++
> >>  lib/powerpc/io.c        |   2 +
> >>  lib/powerpc/rtas.c      | 139 ++++++++++++++++++++++++++++++++++++++++++++++++
> >>  lib/ppc64/asm/rtas.h    |   1 +
> >>  powerpc/Makefile.common |   1 +
> >>  5 files changed, 169 insertions(+)
> >>  create mode 100644 lib/powerpc/asm/rtas.h
> >>  create mode 100644 lib/powerpc/rtas.c
> >>  create mode 100644 lib/ppc64/asm/rtas.h
> ...
> >> +
> >> +void rtas_power_off(void)
> >> +{
> >> +	int ret = rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1);
> >> +	printf("RTAS power-off returned %d\n", ret);
> > 
> > abort here?
> 
> No, that does not work ... there was an assert() in an earlier version
> of the patch here, and that did not work: assert() (and abort()) call
> exit() in kvm-unit-test land, and exit again calls rtas_power_off()
> again, so you end up with and endless recursive loop.
> But exit() calls halt() after calling rtas_power_off(), so it's ok if
> that function simply returns here.

Ah, ok.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux