From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH v3 16/17] powerpc/ppc64: add RTAS support Date: Mon, 15 Feb 2016 13:15:33 +0100 Message-ID: <56C1C165.7070303@redhat.com> References: <1455380910-30604-1-git-send-email-drjones@redhat.com> <1455380910-30604-17-git-send-email-drjones@redhat.com> <56C1A183.4000107@redhat.com> <20160215120034.bvqmblgl7tphkxvx@hawk.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, dgibson@redhat.com, david@gibson.dropbear.id.au, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com To: Andrew Jones Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36588 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752757AbcBOMPh (ORCPT ); Mon, 15 Feb 2016 07:15:37 -0500 In-Reply-To: <20160215120034.bvqmblgl7tphkxvx@hawk.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On 15.02.2016 13:00, Andrew Jones wrote: > On Mon, Feb 15, 2016 at 10:59:31AM +0100, Thomas Huth wrote: >> On 13.02.2016 17:28, Andrew Jones wrote: >>> Add enough RTAS support to start adding RTAS commands. Just add >>> power-off for now. >>> >>> Signed-off-by: Andrew Jones >>> --- >>> 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 >> ... >>> diff --git a/lib/powerpc/rtas.c b/lib/powerpc/rtas.c >>> new file mode 100644 >>> index 0000000000000..b6ae7391181f9 >>> --- /dev/null >>> +++ b/lib/powerpc/rtas.c >>> @@ -0,0 +1,139 @@ >>> +/* >>> + * powerpc RTAS >>> + * >>> + * Copyright (C) 2016, Red Hat Inc, Andrew Jones >>> + * >>> + * This work is licensed under the terms of the GNU LGPL, version 2. >>> + */ >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +#if defined(__powerpc64__) >>> +struct func_ptr { >>> + unsigned long ptr; >>> + unsigned long toc; >>> +}; >>> +static struct func_ptr rtas_entry_funcptr; >>> +#endif >>> +typedef void (*rtas_entry_t)(unsigned long); >>> +static rtas_entry_t enter_rtas; >>> +static struct rtas_args rtas_args; >>> +static struct spinlock lock; >> >> I'd maybe name the lock variable "rtas_lock" instead (in case we ever >> use more locks in this file, it's then more obvious what this lock is >> about) ... but apart from that, and the bug in the sc1 loop that you > > I'll rename lock, and v4 will have the size/4 fix. > >> already mentioned, the patch looks fine to me. > > Can I add your r-b? Yes, with the two changes: Reviewed-by: Thomas Huth