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 <drjones@xxxxxxxxxx> >>> --- >>> 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 <drjones@xxxxxxxxxx> >>> + * >>> + * This work is licensed under the terms of the GNU LGPL, version 2. >>> + */ >>> +#include <libcflat.h> >>> +#include <libfdt/libfdt.h> >>> +#include <devicetree.h> >>> +#include <asm/spinlock.h> >>> +#include <asm/hcall.h> >>> +#include <asm/io.h> >>> +#include <asm/rtas.h> >>> + >>> +#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 <thuth@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html