Re: [PATCH 10/13] powerpc/rtas: improve function information lookups

2022-11-28 Thread Andrew Donnellan
On Mon, 2022-11-28 at 18:08 -0600, Nathan Lynch wrote: > Andrew Donnellan writes: > > On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: > > > Convert rtas_token() to use a lockless binary search on the > > > function > > > table. Fall back to the ol

Re: [PATCH 2/6] powerpc/pseries: Fix the H_CALL error code in PLPKS driver

2022-11-24 Thread Andrew Donnellan
for Platform > KeyStore") > Signed-off-by: Nayna Jain This does indeed match my understanding of the PAPR spec. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/include/asm/hvcall.h  | 3 +-- >  arch/powerpc/platforms/pseries/plpks.c | 2 +- >  2 files changed, 2 insert

Re: [PATCH 1/6] powerpc/pseries: fix the object owners enum value in plpks driver

2022-11-24 Thread Andrew Donnellan
+17,7 @@ >  #define WORLDREADABLE 0x0800 >  #define SIGNEDUPDATE 0x0100 >   > -#define PLPKS_VAR_LINUX0x01 > +#define PLPKS_VAR_LINUX0x02 >  #define PLPKS_VAR_COMMON   0x04 >   >  struct plpks_var { -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 5/6] powerpc/pseries: replace kmalloc with kzalloc in PLPKS driver

2022-11-24 Thread Andrew Donnellan
  > -   if (consumer == PKS_FW_OWNER || consumer == > PKS_BOOTLOADER_OWNER) { > -   auth->passwordlength = 0; > +   if (consumer == PKS_FW_OWNER || consumer == > PKS_BOOTLOADER_OWNER) > return auth; > -   } This bit seems spurious. >   >  

Re: [PATCH v10 3/9] powerpc/mm: Remove extern from function prototypes

2022-11-24 Thread Andrew Donnellan
On Wed, 2022-11-09 at 15:51 +1100, Benjamin Gray wrote: > Remove the extern keyword from function declarations. It is redundant > and would cause inconsistent style when new functions are added > without > it. > > Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donne

Re: [PATCH v10 5/9] cxl: Use radix__flush_all_mm instead of generic flush_all_mm

2022-11-24 Thread Andrew Donnellan
the first place. > > Signed-off-by: Benjamin Gray [+ Fred] This seems fine to me. Reviewed-by: Andrew Donnellan > --- > v10:* New in v10 to remove hash__flush_all_mm, > hash__local_flush_all_mm > --- >  arch/powerpc/include/asm/mmu_context.h | 6 +++--- >  1 file changed, 3

Re: [PATCH v2 1/7] selftests/powerpc: Use mfspr/mtspr macros

2022-11-24 Thread Andrew Donnellan
On Wed, 2022-11-23 at 10:10 +1100, Benjamin Gray wrote: > No need to write inline asm for mtspr/mfspr, we have macros for this > in reg.h > > Signed-off-by: Benjamin Gray Good cleanup. Reviewed-by: Andrew Donnellan > --- >  tools/testing/selftests/powerpc/ds

Re: [PATCH 10/13] powerpc/rtas: improve function information lookups

2022-11-23 Thread Andrew Donnellan
On Wed, 2022-11-23 at 13:32 -0600, Nick Child wrote: > On 11/22/22 20:51, Andrew Donnellan wrote: > > On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: > > > +enum rtas_function_flags { > > > +   RTAS_FN_FLAG_BANNED_FOR_SYSCALL_ON_LE = (1 << 0), > &

Re: [PATCH 11/13] powerpc/rtas: strengthen do_enter_rtas() type safety, drop inline

2022-11-22 Thread Andrew Donnellan
tas_args struct fields. > > There's no apparent reason to force inlining of do_enter_rtas() > either, and it seems to bloat the code a bit. Let the compiler > decide. > > Signed-off-by: Nathan Lynch Makes sense! Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/r

Re: [PATCH 10/13] powerpc/rtas: improve function information lookups

2022-11-22 Thread Andrew Donnellan
for the userspace API, and switch kernel users over to using rtas_function_index directly? > +enum rtas_function_flags { > +   RTAS_FN_FLAG_BANNED_FOR_SYSCALL_ON_LE = (1 << 0), > +}; This seems to be new, what's the justification? -- Andrew DonnellanOzLabs, ADL Canberr

Re: [PATCH] cxl: Fix refcount leak in cxl_calc_capp_routing

2022-11-21 Thread Andrew Donnellan
On Mon, 2022-11-14 at 12:42 +, Christophe Leroy wrote: > Should this be applied by Bjorn as most recent changes to that file ? We usually take cxl patches through powerpc, though sometimes Greg picks them up through char-misc. -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.

Re: [PATCH 07/13] powerpc/rtas: clean up includes

2022-11-21 Thread Andrew Donnellan
at have been rendered unnecessary. Sort the > remainder (with linux/ before asm/) to impose some order on where > future additions go. > > Signed-off-by: Nathan Lynch Compiles for me. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtas.c | 42 +++--

Re: [PATCH 09/13] powerpc/rtas: mandate RTAS syscall filtering

2022-11-21 Thread Andrew Donnellan
harmful abuses of the rtas syscall. > > Let's make it unconditional. > > Signed-off-by: Nathan Lynch Agreed. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/Kconfig   | 13 - >  arch/powerpc/kernel/rtas.c | 16 >  2 files changed,

Re: [PATCH 08/13] powerpc/rtas: define pr_fmt and convert printk call sites

2022-11-21 Thread Andrew Donnellan
s_halt() all > currently use printk() without specifying a log level. These have > been > changed to use pr_emerg(), which matches the behavior of > rtas_os_term(). > > Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtas.c | 19 +

Re: [PATCH 06/13] powerpc/rtas: clean up rtas_error_log_max initialization

2022-11-21 Thread Andrew Donnellan
of > an > RTAS function. Convert use of printk() to pr_warn() and distinguish > the possible error cases. > > Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtas.c | 37 ++-- > - >  1 file changed,

Re: [PATCH 05/13] powerpc/pseries/eeh: use correct API for error log size

2022-11-21 Thread Andrew Donnellan
VICE) { This is now impossible, and the whole block makes little sense after the next patch >         pr_info("%s: unknown EEH error log size\n", > __func__); -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 04/13] powerpc/rtas: avoid scheduling in rtas_os_term()

2022-11-21 Thread Andrew Donnellan
cts > whether to attempt the ibm,os-term RTAS call again. > > Signed-off-by: Nathan Lynch Makes sense. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtas.c | 7 ++- >  1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/rtas.c

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-21 Thread Andrew Donnellan
_bool() since > it is a boolean property, not a RTAS function token. > > Signed-off-by: Nathan Lynch This seems sensible, minor comment below. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtas.c | 14 +++--- >  1 file changed, 11 insertions(+), 3 deletions(-) &

Re: [PATCH 01/13] powerpc/rtas: document rtas_call()

2022-11-21 Thread Andrew Donnellan
I'm not overly familiar with some of the RTAS internal stuff you describe, but I've checked the status codes against my copy of PAPR and they concur, so I'll give this a: Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/include/asm/rtas.h | 15 - >  arch/powerpc

Re: [PATCH 02/13] powerpc/rtasd: use correct OF API for event scan rate

2022-11-21 Thread Andrew Donnellan
r-log-max which I see you clean up later in the series. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtasd.c | 7 +-- >  1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/rtasd.c > b/arch/powerpc/kernel/rtasd.c > index 5270b450

Re: [PATCH v2] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-21 Thread Andrew Donnellan
) is not called, so > pci_dev_put() can be called in the error path and callers > unconditionally. And add comment above get_dvsec_vendor0() to tell > callers to call pci_dev_put(). > > Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is > reloaded on a link re

Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Andrew Donnellan
~BIT(0); > pci_write_config_dword(dev0, pos + > OCXL_DVSEC_VENDOR_RESET_RELOAD, >    reset_reload); > +   if (PCI_FUNC(dev->devfn) != 0) > +   pci_dev_put(dev0); > return 0; >  } >   -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] misc: ocxl: fix possible name leak in ocxl_file_register_afu()

2022-11-20 Thread Andrew Donnellan
s for the fix - as you point out, put_device() should clean everything up that needs cleaning up. Acked-by: Andrew Donnellan > --- >  drivers/misc/ocxl/file.c | 7 +-- >  1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/misc/ocxl/file.c b/drivers

Re: [PATCH 2/2] cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

2022-11-20 Thread Andrew Donnellan
powernv PCIe based cards > for userspace access") > Signed-off-by: Yang Yingliang See reply to patch #1. This patch puts a few things between the device_del() call and the put_device() call, but that looks fine - we don't touch afu->dev in the middle. Thanks for the fix! Acked-by:

Re: [PATCH 1/2] cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()

2022-11-20 Thread Andrew Donnellan
ned-off-by: Yang Yingliang Thanks for the fix! Acked-by: Andrew Donnellan > --- >  drivers/misc/cxl/guest.c | 24 ++-- >  1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c > index 375f692ae9d6..fb95

[RFC PATCH 4/6] powerpc/powernv: Convert pointers to physical addresses in OPAL call args

2022-11-04 Thread Andrew Donnellan
() for linear map addresses. Add it to all the existing callsites where we pass pointers to OPAL. Signed-off-by: Andrew Donnellan --- arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 20 ++- arch/powerpc/platforms/powernv/ocxl.c | 3

[RFC PATCH 6/6] powerpc/64s: Enable CONFIG_VMAP_STACK

2022-11-04 Thread Andrew Donnellan
Enable CONFIG_VMAP_STACK for book3s64. To do this, we need to make some slight adjustments to set the stack SLB entry up for vmalloc rather than linear. For now, only enable if KVM_BOOK3S_64_HV is disabled (there's some real mode handlers we need to fix there). Signed-off-by: Andrew Donnellan

[RFC PATCH 5/6] powerpc/powernv/idle: Convert stack pointer to physical address

2022-11-04 Thread Andrew Donnellan
to a physical address using stack_pa() before going into idle, and restore the original pointer on the way back out. Signed-off-by: Andrew Donnellan --- This currently doesn't boot on my POWER9. I'm also going to clean this up to use the helpers from earlier in this series. --- arch/powerpc

[RFC PATCH 2/6] powerpc/64s: Helpers to switch between linear and vmapped stack pointers

2022-11-04 Thread Andrew Donnellan
the linear map and the vmalloc space in the PACA, and add some helper macros/functions to swap between them. Signed-off-by: Andrew Donnellan --- Some of the helpers that are currently unused will be used in the next version of the series for the KVM real mode handling --- arch/powerpc/include/asm

[RFC PATCH 3/6] powerpc/powernv: Keep MSR in register across OPAL entry/return path

2022-11-04 Thread Andrew Donnellan
restore the MSR first, then restore the PACA into r13. Signed-off-by: Andrew Donnellan --- .../powerpc/platforms/powernv/opal-wrappers.S | 43 +++ 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms

[RFC PATCH 0/6] VMAP_STACK support for book3s64

2022-11-04 Thread Andrew Donnellan
but they're not quite ready yet. If anyone has better suggestions for the extremely ugly approach to fixing OPAL calls, suggest away! Andrew Donnellan (6): powerpc/64s: Fix assembly to support larger values of THREAD_SIZE powerpc/64s: Helpers to switch between linear and vmapped stack

[RFC PATCH 1/6] powerpc/64s: Fix assembly to support larger values of THREAD_SIZE

2022-11-04 Thread Andrew Donnellan
these spots to use a scratch register or use two immediate mode instructions instead, so we can later enable VMAP_STACK. Signed-off-by: Andrew Donnellan --- arch/powerpc/include/asm/asm-compat.h | 2 ++ arch/powerpc/kernel/entry_64.S | 4 +++- arch/powerpc/kernel/irq.c | 8

Re: [PATCH v9 5/7] powerpc/tlb: Add local flush for page given mm_struct and psize

2022-11-02 Thread Andrew Donnellan
modern style, then I would be happy to include a patch that > modernises the surrounding code first. This series would be a good opportunity to clean the rest of that file up; either way, as Christophe says we should avoid adding new uses given that people have started actively trying to clean up t

Re: [PATCH v4 2/6] powerpc/module: Handle caller-saved TOC in module linker

2022-10-24 Thread Andrew Donnellan
sym->st_shndx == SHN_LIVEPATCH) { > > +   sym->st_shndx == SHN_LIVEPATCH || > > +   need_r2save_stub(sym->st_other)) { > >     /* External: go via stub */ Perhaps this comment should be updated to mention that there are non- external but external-like calls? Otherwise Reviewed-by: Andrew Donnellan > > value = stub_for_addr(sechdrs, > > value,> me, > > strtab +> sym- > > >st_name); -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: Issues with the first PowerPC updates for the kernel 6.1

2022-10-15 Thread Andrew Donnellan
ot;Fix this by having 32-bit kernels share those > > syscall definitions with compat." > > > > Christophe > > > > > > > > Cheers, > > > Christian > > > > > > > > On 12. Oct 2022, at 09:56, Andrew Donnellan &l

Re: Issues with the first PowerPC updates for the kernel 6.1

2022-10-12 Thread Andrew Donnellan
wait some > weeks. It is really difficult to find the issue if the userland will > damaged again and again. Could you try with https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20221012035335.866440-1-npig...@gmail.com/ to see if your issues are related to that? Andrew -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 1/2] powerpc/32: fix syscall wrappers with 64-bit arguments of unaligned register-pairs

2022-10-12 Thread Andrew Donnellan
> Reported-by: Jason A. Donenfeld > Signed-off-by: Nicholas Piggin > --- Fixes: 7e92e01b72452 ("powerpc: Provide syscall wrapper") -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Andrew Donnellan
es > spu_sys_callback to >     allocate a pt_regs structure to satisfy the wrapped calling > convention. > >     Co-developed-by: Andrew Donnellan >     Signed-off-by: Andrew Donnellan >     Signed-off-by: Rohan McLure >     Reviewed-by: Nicholas Piggin >     [mpe

Re: [PATCH v4 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-10 Thread Andrew Donnellan
On Mon, 2022-10-10 at 15:45 +1100, Andrew Donnellan wrote: > On Mon, 2022-10-10 at 11:29 +1100, Benjamin Gray wrote: > > Adds a generic memory patching mechanism for patches of size int or > > long > > bytes. > > > > The patch_instruction function is reimpl

Re: [PATCH v4 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-09 Thread Andrew Donnellan
ddr, val, false); > +} > +NOKPROBE_SYMBOL(patch_uint) > + > +int patch_ulong(void *addr, unsigned long val) > +{ > +   return do_patch_memory(addr, val, true); > +} > +NOKPROBE_SYMBOL(patch_ulong) > + > +int patch_instruction(u32 *addr, ppc_inst_t instr) > +{ > +   if (ppc_inst_prefixed(instr)) > +   return patch_ulong(addr, ppc_inst_as_ulong(instr)); > +   else > +   return patch_uint(addr, ppc_inst_val(instr)); > +} > +NOKPROBE_SYMBOL(patch_instruction) > + > +#else > + > +noinline int patch_uint(void *addr, unsigned int val) > +{ > +   return do_patch_memory(addr, val, false); > +} > +NOKPROBE_SYMBOL(patch_uint) > + > +#endif >   >  int patch_branch(u32 *addr, unsigned long target, int flags) >  { -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v3 3/6] powerpc/module: Optimise nearby branches in ELF V2 ABI stub

2022-10-06 Thread Andrew Donnellan
ff-by: Benjamin Gray I'm not well versed in this code but nothing stands out as problematic and it makes sense. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/module_64.c | 12 >  1 file changed, 12 insertions(+) > > diff --git a/arch/powerpc/kernel/module_64.c

Re: [PATCH v3 2/6] powerpc/module: Handle caller-saved TOC in module linker

2022-10-05 Thread Andrew Donnellan
; save > > the current TOC before calling it and restore it afterwards, much > > like > > external calls. > > The 'callee', what is that here in that context ? > > Don't you mean the 'linker' instead ? Should probably explain explicitly that this is the .localentry N

Re: [PATCH v2 2/2] powerpc/rtas: block error injection when locked down

2022-09-28 Thread Andrew Donnellan
rather than the sys_rtas() check? (Not that it matters, defence in depth is good.) Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/kernel/rtas.c | 25 - >  include/linux/security.h   |  1 + >  security/security.c    |  1 + >  3 files changed, 26 insertions(+), 1 d

Re: [PATCH v2 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-28 Thread Andrew Donnellan
er of /proc/powerpc/ofdt, but it is > already broken in lockdown since it uses /dev/mem to allocate > argument > buffers for the rtas syscall. So only illegitimate uses of the > interface should see a behavior change when running on a locked down > kernel. > > Signed-of

Re: [PATCH 4/6] static_call: Move static call selftest to static_call_selftest.c

2022-09-19 Thread Andrew Donnellan
ewed-by: Andrew Donnellan -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] powerpc/microwatt: Remove unused early debug code

2022-09-18 Thread Andrew Donnellan
g/ > > Fixes: 48b545b8018d ("powerpc/microwatt: Use standard 16550 UART for > console") > Reported-by: Lukas Bulwahn > Signed-off-by: Michael Ellerman grep confirms this is indeed dead code. Reviewed-by: Andrew Donnellan -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl: fix repeated words in comments

2022-09-18 Thread Andrew Donnellan
re the changes > to the > * PE are visible to the card before we call afu_enable. > * On ppc64 though all mmios are preceded by a 'sync' > instruction hence > -    * we dont dont need one here. > +    * we dont need one here. >      */ >   &g

Re: [PATCH linux-next] ocxl: Remove the unneeded result variable

2022-09-07 Thread Andrew Donnellan
On Tue, 2022-09-06 at 07:20 +, cgel@gmail.com wrote: > From: ye xingchen > > Return the value opal_npu_spa_clear_cache() directly instead of > storing > it in another redundant variable. > > Reported-by: Zeal Robot > Signed-off-by: ye xingchen Ac

Re: [PATCH v4 01/20] powerpc: Remove asmlinkage from syscall handler definitions

2022-08-25 Thread Andrew Donnellan
only occur in syscall definitions and prototypes. > > Signed-off-by: Rohan McLure This does indeed get rid of every reference to asmlinkage in arch/powerpc. Reviewed-by: Andrew Donnellan > --- > V2 -> V3: new patch > --- >  arch/powerpc/include/asm/syscalls.h | 16 --

Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-16 Thread Andrew Donnellan
On Tue, 2022-08-16 at 12:25 -0700, Kees Cook wrote: > Applied to for-next/hardening, thanks! > > [1/1] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin > disabled for a file >   https://git.kernel.org/kees/c/2d08c71d2c79 > Thanks Kees! Can we make sure this lands i

Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-16 Thread Andrew Donnellan
On Tue, 2022-08-16 at 05:14 -0700, Yury Norov wrote: > On Tue, Aug 16, 2022 at 03:17:20PM +1000, Andrew Donnellan wrote: > > Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and > > node_random()") refactored some code by moving node_random() from > >

[PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-15 Thread Andrew Donnellan
g.cgi?id=216367 Link: https://lore.kernel.org/linuxppc-dev/alpine.deb.2.22.394.2208152006320.289...@ramsan.of.borg/ Reported-by: Erhard Furtner Signed-off-by: Andrew Donnellan --- scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.g

Re: [PATCH v2 14/14] powerpc/64s: Clear gprs on interrupt routine entry

2022-08-12 Thread Andrew Donnellan
ser_interrupt_return_\srr\(): > +   REST_NVGPRS(r1) >  #ifdef CONFIG_PPC_BOOK3S > .ifc \srr,srr > lbz r4,PACASRR_VALID(r13) > @@ -515,10 +513,6 @@ > ALT_FTR_SECTION_END_IFCLR(CPU_FTR_STCX_CHECKS_ADDRESS) > b   .   /* prevent speculative execution */ &

Re: [PATCH] docs: powerpc: add POWER9 and POWER10 to CPU families

2022-08-12 Thread Andrew Donnellan
On Wed, 2022-08-10 at 04:03 +, Nicholas Miehlbradt wrote: > Add POWER9 and POWER10 to CPU families and list Radix MMU. > > Signed-off-by: Nicholas Miehlbradt Reviewed-by: Andrew Donnellan -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 11/14] powerpc/64s: Clear/restore caller gprs in syscall interrupt/return

2022-08-11 Thread Andrew Donnellan
that may contain sensitive kernel data > */ > @@ -367,7 +382,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR) >  .Lsyscall_restore_regs: > ld  r3,_CTR(r1) > ld  r4,_XER(r1) > -   REST_NVGPRS(r1) > mtctr   r3 > mtspr   SPRN_XER,r4 > REST_GPR(0, r1) -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 10/14] powerpc: Provide syscall wrapper

2022-08-10 Thread Andrew Donnellan
t; > Syscalls are wrapped in this fashion on all platforms except for the > Cell processor as this commit does not provide SPU support. This can > be > quickly fixed in a successive patch, but requires spu_sys_callback to > allocate a pt_regs structure to satisfy the wrapped calling > c

Re: [PATCH v2 06/14] powerpc: Include all arch-specific syscall prototypes

2022-08-09 Thread Andrew Donnellan
On Mon, 2022-08-08 at 15:24 +1000, Andrew Donnellan wrote: > > diff --git a/arch/powerpc/include/asm/syscalls.h > > b/arch/powerpc/include/asm/syscalls.h > > index 025d4b877161..8b2757d7f423 100644 > > --- a/arch/powerpc/include/asm/syscalls.h > > +++ b/arch/

Re: [PATCH v2 12/14] powerpc/64s: Use {NULLIFY,SAVE,REST}_GPRS macros in sc, scv 0 handlers

2022-08-08 Thread Andrew Donnellan
   r12 > li  r11,0 > /* Save syscall parameters in r3-r8 */ > -   std r3,GPR3(r1) > -   std r4,GPR4(r1) > -   std r5,GPR5(r1) > -   std r6,GPR6(r1) > -   std r7,GPR7(r1) > -   std r8,GPR8(r1) > +   SAVE_GPRS(3, 8, r1) > /* Zero r9-r12, this should only be required when restoring > all GPRs */ > std r11,GPR9(r1) > std r11,GPR10(r1) -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 09/14] powerpc: Add NULLIFY_GPRS macros for register clears

2022-08-08 Thread Andrew Donnellan
ge in naming to 'NULLIFY', a more obvious > verb And I see you've addressed my comment re 32 v 64 bit from V1 as well. Reviewed-by: Andrew Donnellan > --- >  arch/powerpc/include/asm/ppc_asm.h | 22 ++ >  1 file changed, 22 insertions(+) > > diff --git

Re: [PATCH v2 08/14] powerpc: Use common syscall handler type

2022-08-08 Thread Andrew Donnellan
gt;= ARRAY_SIZE(spu_syscall_table)) { > pr_debug("%s: invalid syscall #%lld", __func__, s- > >nr_ret); > return -ENOSYS; > } >   > -   syscall = spu_syscall_table[s->nr_ret]; > +   syscall = (syscall_fn) spu_syscall_table[s->nr_ret]; I

Re: [PATCH v2 07/14] powerpc: Enable compile-time check for syscall handlers

2022-08-07 Thread Andrew Donnellan
 #undef __SYSCALL_WITH_COMPAT >  #define __SYSCALL_WITH_COMPAT(nr, native, compat)  __SYSCALL(nr, > compat) > -.globl compat_sys_call_table > -compat_sys_call_table: > -#define compat_sys_sigsuspend  sys_sigsuspend > +void *compat_sys_call_table[] = { >  #include > -#endif > +}; > +#endif /* CONFIG_COMPAT */ -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 06/14] powerpc: Include all arch-specific syscall prototypes

2022-08-07 Thread Andrew Donnellan
  unsigned int offset2, > +       unsigned int nbytes1, > +   unsigned int > nbytes2); > +#endif /* CONFIG_COMPAT */ >   > -long compat_sys_sync_file_range2(int fd, unsigned int flags, > -    unsigned int offset1, unsigned int > offset2, > -    unsigned int nbytes1, unsigned int > nbytes2); > -#endif > +#endif /* CONFIG_ARCH_HAS_SYSCALL_WRAPPER */ >   >  #endif /* __KERNEL__ */ >  #endif /* __ASM_POWERPC_SYSCALLS_H */ > -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 13/14] powerpc/64s: Fix comment on interrupt handler prologue

2022-08-07 Thread Andrew Donnellan
ommon code path macro in the beginning > of > interrupt handlers where r10 is saved to the PACA to afford space for > the value of the CFAR. Comment is currently written as if r10-r12 are > saved to PACA, but in fact only r10 is saved. > > Signed-off-by: Rohan McLure Rev

Re: [PATCH v2 05/14] powerpc: Use generic fallocate compatibility syscall

2022-08-07 Thread Andrew Donnellan
on  sync_file_range2sys_sync_file_range2  >    compat_sys_ppc_sync_file_range2 > - > 309nospu   fallocate   sys_fallocate   >      compat_sys_ppc_fallocate > +309nospu   fallocate   sys_fallocate >    compat_sys_fallocate >  310nospu   subpage_protsys_subpage_prot >  31132  timerfd_settime sys_timerfd_settime32 >  31164  timerfd_settime sys_timerfd_settime -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 04/14] powerpc/32: Remove powerpc select specialisation

2022-08-07 Thread Andrew Donnellan
   | 18 -- >  arch/powerpc/kernel/syscalls/syscall.tbl |  2 +- >  .../arch/powerpc/entry/syscalls/syscall.tbl  |  2 +- >  3 files changed, 2 insertions(+), 20 deletions(-) You should remove the declaration from arch/powerpc/include/asm/syscalls.h, which I

Re: [PATCH v2 03/14] powerpc: Remove direct call to mmap2 syscall handlers

2022-08-07 Thread Andrew Donnellan
sys_subpage_prot >  31132  timerfd_settime sys_timerfd_settime32 >  31164  timerfd_settime sys_timerfd_settime -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 02/14] powerpc: Remove direct call to personality syscall handler

2022-08-01 Thread Andrew Donnellan
personality can be replaced with an invocation to the > equivalent ksys_personality inline helper in . > > Signed-off-by: Rohan McLure Reviewed-by: Andrew Donnellan > --- > V1 -> V2: Use inline helper to deduplicate bodies in compat/regular > implementations. > --- >  arch/

Re: [PATCH 2/2] cxl: Fix a memory leak in an error handling path

2022-07-12 Thread Andrew Donnellan
On Mon, 2022-07-11 at 21:14 +0200, Christophe JAILLET wrote: > A bitmap_zalloc() must be balanced by a corresponding bitmap_free() > in the > error handling path of afu_allocate_irqs(). > > Signed-off-by: Christophe JAILLET Thanks for catching this. Acked-by: A

Re: [PATCH 1/2] cxl: Use the bitmap API to allocate bitmaps

2022-07-12 Thread Andrew Donnellan
On Mon, 2022-07-11 at 21:14 +0200, Christophe JAILLET wrote: > Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. > > It is less verbose and it improves the semantic. > > Signed-off-by: Christophe JAILLET Thanks! Acked-by: Andrew Donnellan > --- >  drive

Re: [PATCH] cxl: drop unexpected word "the" in the comments

2022-06-29 Thread Andrew Donnellan
On Wed, 2022-06-29 at 22:15 +1000, Michael Ellerman wrote: > On Tue, 21 Jun 2022 20:53:21 +0800, Jiang Jian wrote: > > there is an unexpected word "the" in the comments that need to be > > dropped > > > > file: drivers/misc/cxl/cxl.h > > line: 1107 > > +/* check if the given pci_dev is on the the

Re: [PATCH] cxl: drop unexpected word "the" in the comments

2022-06-21 Thread Andrew Donnellan
gt; +/* check if the given pci_dev is on the cxl vphb bus */ > > Signed-off-by: Jiang Jian Thanks! Acked-by: Andrew Donnellan > --- >  drivers/misc/cxl/cxl.h | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h &g

Re: [PATCH 2/6] powerpc: Provide syscall wrapper

2022-06-14 Thread Andrew Donnellan
On Fri, 2022-06-03 at 08:39 +, Christophe Leroy wrote: > > > Le 03/06/2022 à 09:09, Andrew Donnellan a écrit : > > On Fri, 2022-06-03 at 13:24 +1000, Rohan McLure wrote: > > > The implementation of ppc_personality can be immediately reworked > > > to > &g

[PATCH] powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address

2022-06-14 Thread Andrew Donnellan
kernel.org Reported-by: Sathvika Vasireddy Signed-off-by: Andrew Donnellan --- arch/powerpc/kernel/rtas.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index a6fce3106e02..693133972294 100644 --- a/arch/powe

Re: [PATCH] cxl: Fix refcount leak in cxl_calc_capp_routing

2022-06-14 Thread Andrew Donnellan
. > Add missing of_node_put() to avoid refcount leak. > > Fixes: f24be42aab37 ("cxl: Add psl9 specific code") > Signed-off-by: Miaoqian Lin Thanks! Acked-by: Andrew Donnellan > --- >  drivers/misc/cxl/pci.c | 1 + >  1 file changed, 1 insertion(+) > > diff --g

Re: [PATCH 2/6] powerpc: Provide syscall wrapper

2022-06-03 Thread Andrew Donnellan
pc_select, I suggest we resurrect https://lore.kernel.org/lkml/5811950d-ef14-d416-35e6-d694ef920...@csgroup.eu/T/#u and just get rid of the hack. Andrew -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl: fix typo in comment

2022-05-22 Thread Andrew Donnellan
On 21/5/22 21:11, Julia Lawall wrote: Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h

2022-04-06 Thread Andrew Donnellan
On 6/4/22 16:52, Christophe Leroy wrote: Thanks. Can you take the patch through your tree ? We don't have a tree of our own, we rely on mpe to take it through powerpc. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h

2022-04-06 Thread Andrew Donnellan
, but nothing here looks concerning. Acked-by: Andrew Donnellan --- drivers/misc/cxl/api.c | 1 + drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/cxllib.c | 1 + drivers/misc/cxl/flash.c| 1 + drivers/misc/cxl/guest.c| 2 ++ drivers/misc/cxl/irq.c | 1 + drivers/misc/cxl

Re: [PATCH] ocxl: Make use of the helper macro LIST_HEAD()

2022-02-08 Thread Andrew Donnellan
On 9/2/22 14:24, Cai Huoqing wrote: Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code. Signed-off-by: Cai Huoqing LGTM Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm

Re: [PATCH misc-next] drivers/misc: remove redundant rc variable

2021-12-15 Thread Andrew Donnellan
On 15/12/21 5:04 pm, cgel@gmail.com wrote: From: Minghao Chi Return value from ocxl_context_attach() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs

Re: [PATCH] Documentation: Fix typo in testing/sysfs-class-cxl

2021-10-06 Thread Andrew Donnellan
On 7/10/21 2:50 am, Sohaib Mohamed wrote: Remove repeated words: "the the lowest" and "this this kernel" Signed-off-by: Sohaib Mohamed Thanks for catching this. Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com

Re: [PATCH] docs: typo fixes in Documentation/ABI/

2021-10-06 Thread Andrew Donnellan
.org Description:read only -Decimal value of the the lowest version of the userspace API -this this kernel supports. +Decimal value of the lowest version of the userspace API +this kernel supports. Users:

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Andrew Donnellan
r handling paths brings back nightmares from a few years ago... Fred: I wonder if we need to add a lock here? -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Andrew Donnellan
dler && I'm not a huge fan of assignments in if statements and if you send a v6 I'd prefer you break it up. Apart from that everything in the powerpc and cxl sections looks good to me. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 8/9] ocxl: Use pci core's DVSEC functionality

2021-09-27 Thread Andrew Donnellan
implementation. As that change is less trivial it is reserved for later. Cc: linuxppc-dev@lists.ozlabs.org Cc: Andrew Donnellan Acked-by: Frederic Barrat (v1) Signed-off-by: Ben Widawsky Looks fine, but we should clean up find_dvsec_from_pos() afterwards. Reviewed-by: Andrew Donnellan

Re: [PATCH v2 6/9] PCI: Add pci_find_dvsec_capability to find designated VSEC

2021-09-27 Thread Andrew Donnellan
: Andrew Donnellan Cc: Lu Baolu Reviewed-by: Frederic Barrat Signed-off-by: Ben Widawsky Looks good to me, it's essentially identical to the existing implementation in ocxl. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com

Re: [PATCH v2 07/29] ABI: sysfs-class-cxl: place "not in a guest" at description

2021-09-14 Thread Andrew Donnellan
On 15/9/21 12:32 am, Mauro Carvalho Chehab wrote: The What: field should have just the location of the ABI. Anything else should be inside the description. This fixes its parsing by get_abi.pl script. Signed-off-by: Mauro Carvalho Chehab Looks fine to me. Acked-by: Andrew Donnellan

Re: [PATCH] powerpc: Remove unused prototype for of_show_percpuinfo

2021-09-03 Thread Andrew Donnellan
: Daniel Axtens I grepped through, confirmed there's no other references to of_show_percpuinfo(). Reviewed-by: Andrew Donnellan (First linuxppc patch written and sent live on a twitch stream?) -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 5/6] PCI: Adapt all code locations to not use struct pci_dev::driver directly

2021-08-05 Thread Andrew Donnellan
On 3/8/21 8:01 pm, Uwe Kleine-König wrote: This prepares removing the driver member of struct pci_dev which holds the same information than struct pci_dev::dev->driver. Signed-off-by: Uwe Kleine-König cxl hunks look alright. Acked-by: Andrew Donnellan # cxl -- Andrew Donnel

Re: [PATCH 03/11] Documentation: ocxl.rst: change FPGA indirect article to an

2021-06-08 Thread Andrew Donnellan
On 9/6/21 7:23 am, t...@redhat.com wrote: From: Tom Rix Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl: Fix an error message

2021-05-05 Thread Andrew Donnellan
ode for powernv PCIe based cards for userspace access") Signed-off-by: Christophe JAILLET Apart from my comment above: Acked-by: Andrew Donnellan Thanks for catching this! -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 5/5] powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE

2021-04-12 Thread Andrew Donnellan
than Lynch This appears to correctly rename all users of the macro. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v3 1/1] hotplug-cpu.c: show 'last online CPU' error in dlpar_cpu_offline()

2021-03-26 Thread Andrew Donnellan
n Daniel's review. I haven't tested it, but this patch looks sensible enough to me. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] powerpc: powernv: Remove unneeded variable: "rc"

2021-03-26 Thread Andrew Donnellan
On 26/3/21 10:53 pm, dingsen...@163.com wrote: From: dingsenjie Remove unneeded variable: "rc". Signed-off-by: dingsenjie This looks obviously correct and doesn't raise any checkpatch warnings. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, AD

Re: [PATCH] cxl: Fix couple of spellings

2021-03-22 Thread Andrew Donnellan
On 22/3/21 1:33 pm, Bhaskar Chowdhury wrote: s/filesytem/filesystem/ s/symantics/semantics/ Signed-off-by: Bhaskar Chowdhury Acked-by: Andrew Donnellan --- drivers/misc/cxl/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/context.c b

Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-11 Thread Andrew Donnellan
On 11/3/21 4:44 am, Laurent Dufour wrote: It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour LGTM, thanks for picking this up Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL

[PATCH] docs: powerpc: Fix tables in syscall64-abi.rst

2021-02-24 Thread Andrew Donnellan
o separate the registers into different rows and add headings. Fixes: 209b44c804c ("docs: powerpc: syscall64-abi.rst: fix a malformed table") Signed-off-by: Andrew Donnellan --- Documentation/powerpc/syscall64-abi.rst | 51 - 1 file changed, 32 insertions(+), 19 dele

Re: [PATCH] cxl: Simplify bool conversion

2021-01-31 Thread Andrew Donnellan
On 29/1/21 7:25 pm, Yang Li wrote: Fix the following coccicheck warning: ./drivers/misc/cxl/sysfs.c:181:48-53: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Andrew Donnellan Thanks! --- drivers/misc/cxl/sysfs.c | 2 +- 1 file

Re: [PATCH 01/13] powerpc/powernv: remove get_cxl_module

2021-01-21 Thread Andrew Donnellan
uot;). Thanks for picking this up. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 5/6] powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE

2021-01-14 Thread Andrew Donnellan
e in terms of the number of work areas allocated. Signed-off-by: Nathan Lynch squash! powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE I think you meant to get rid of this line... -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

<    1   2   3   4   5   6   7   8   9   10   >