Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Michal Suchánek
On Fri, Apr 23, 2021 at 11:59:30PM +0530, Vaidyanathan Srinivasan wrote: > * Michal Such?nek [2021-04-23 19:45:05]: > > > On Fri, Apr 23, 2021 at 09:29:39PM +0530, Vaidyanathan Srinivasan wrote: > > > * Michal Such?nek [2021-04-23 09:35:51]: > > > > > > > On Thu, Apr 22, 2021 at 08:37:29PM

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Vaidyanathan Srinivasan
* Michal Such?nek [2021-04-23 19:45:05]: > On Fri, Apr 23, 2021 at 09:29:39PM +0530, Vaidyanathan Srinivasan wrote: > > * Michal Such?nek [2021-04-23 09:35:51]: > > > > > On Thu, Apr 22, 2021 at 08:37:29PM +0530, Gautham R. Shenoy wrote: > > > > From: "Gautham R. Shenoy" > > > > > > > >

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Michal Suchánek
On Fri, Apr 23, 2021 at 09:29:39PM +0530, Vaidyanathan Srinivasan wrote: > * Michal Such?nek [2021-04-23 09:35:51]: > > > On Thu, Apr 22, 2021 at 08:37:29PM +0530, Gautham R. Shenoy wrote: > > > From: "Gautham R. Shenoy" > > > > > > Commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency

Re: [PATCH v2 1/2] powerpc: Free fdt on error in elf64_load()

2021-04-23 Thread Lakshmi Ramasubramanian
On 4/21/21 9:36 AM, Lakshmi Ramasubramanian wrote: Hi Dan, There are a few "goto out;" statements before the local variable "fdt" is initialized through the call to of_kexec_alloc_and_setup_fdt() in elf64_load(). This will result in an uninitialized "fdt" being passed to kvfree() in this

Re: [PATCH 1/2] powerpc/vdso64: link vdso64 with linker

2021-04-23 Thread Christophe Leroy
Le 23/04/2021 à 00:44, Nick Desaulniers a écrit : On Wed, Sep 2, 2020 at 11:02 AM Christophe Leroy wrote: Le 02/09/2020 à 19:41, Nick Desaulniers a écrit : On Wed, Sep 2, 2020 at 5:14 AM Michael Ellerman wrote: Nick Desaulniers writes: Fixes: commit f2af201002a8 ("powerpc/build:

Re: [PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-04-23 Thread Segher Boessenkool
On Fri, Apr 23, 2021 at 12:26:57PM +0200, Gabriel Paubert wrote: > On Thu, Apr 22, 2021 at 06:26:16PM -0500, Segher Boessenkool wrote: > > > But this can be made jump free :-): > > > > > > int tmp = regs->ccr << ra; > > > op->val = (tmp >> 31) | ((tmp >> 30) & 1); > > > > The compiler will

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Vaidyanathan Srinivasan
* Michal Such?nek [2021-04-23 09:35:51]: > On Thu, Apr 22, 2021 at 08:37:29PM +0530, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > > > Commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for > > CEDE(0)") sets the exit latency of CEDE(0) based on the latency values > > of

Re: [PATCH] powerpc: Initialize local variable fdt to NULL in elf64_load()

2021-04-23 Thread Rob Herring
On Fri, Apr 23, 2021 at 9:42 AM David Laight wrote: > > From: Michael Ellerman > > Sent: 23 April 2021 14:51 > ... > > > (Does anyone - and by anyone I mean any large distro - compile with > > > local variables inited by the compiler?) > > > > This is where I say, "yes, Android" and you say "ugh

Re: [PATCH 1/2] powerpc: Fix a memory leak in error handling paths

2021-04-23 Thread Rob Herring
On Fri, Apr 23, 2021 at 9:40 AM Christophe JAILLET wrote: > > If we exit the for_each_of_cpu_node loop early, the reference on the > current node must be decremented, otherwise there is a leak. > > Fixes: a94fe366340a ("powerpc: use for_each_of_cpu_node iterator") > Signed-off-by: Christophe

RE: [PATCH] powerpc: Initialize local variable fdt to NULL in elf64_load()

2021-04-23 Thread David Laight
From: Michael Ellerman > Sent: 23 April 2021 14:51 ... > > (Does anyone - and by anyone I mean any large distro - compile with > > local variables inited by the compiler?) > > This is where I say, "yes, Android" and you say "ugh no I meant a real > distro", and I say "well ...". > > But yeah

[PATCH 2/2] powerpc: Save a few lines of code

2021-04-23 Thread Christophe JAILLET
'arch/powerpc/platforms/powermac/feature.c' triggers many checkpatch.pl warnings. The code looks old and not very active, so fixing them all does not make so much sense and will hide some 'git blame' information. So only apply a few fixes that save a few lines of code. Signed-off-by: Christophe

[PATCH 1/2] powerpc: Fix a memory leak in error handling paths

2021-04-23 Thread Christophe JAILLET
If we exit the for_each_of_cpu_node loop early, the reference on the current node must be decremented, otherwise there is a leak. Fixes: a94fe366340a ("powerpc: use for_each_of_cpu_node iterator") Signed-off-by: Christophe JAILLET --- Strangely, the commit above added the needed of_node_put in

[PATCH] powerpc/signal32: Fix erroneous SIGSEGV on RT signal return

2021-04-23 Thread Christophe Leroy
Return of user_read_access_begin() is tested the wrong way, leading to a SIGSEGV when the user address is valid and likely an Oops when the user address is bad. Fix the test. Fixes: 887f3ceb51cd ("powerpc/signal32: Convert do_setcontext[_tm]() to user access block") Signed-off-by: Christophe

Re: [PATCH] powerpc: Initialize local variable fdt to NULL in elf64_load()

2021-04-23 Thread Michael Ellerman
Daniel Axtens writes: > Daniel Axtens writes: > >> Hi Lakshmi, >> >>> On 4/15/21 12:14 PM, Lakshmi Ramasubramanian wrote: >>> >>> Sorry - missed copying device-tree and powerpc mailing lists. >>> There are a few "goto out;" statements before the local variable "fdt" is initialized

Re: [PATCH v5 14/16] dma-direct: Allocate memory from restricted DMA pool if available

2021-04-23 Thread Robin Murphy
On 2021-04-22 09:15, Claire Chang wrote: The restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-23 Thread Quentin Monnet
2021-04-23 12:46 UTC+0200 ~ Christophe Leroy > > > Le 23/04/2021 à 12:26, Quentin Monnet a écrit : >> 2021-04-23 09:19 UTC+0200 ~ Christophe Leroy >> >> >> [...] >> >>> I finally managed to cross compile bpftool with libbpf, libopcodes, >>> readline, ncurses, libcap, libz and all needed stuff.

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-23 Thread Christophe Leroy
Le 23/04/2021 à 12:59, Quentin Monnet a écrit : 2021-04-23 12:46 UTC+0200 ~ Christophe Leroy Le 23/04/2021 à 12:26, Quentin Monnet a écrit : 2021-04-23 09:19 UTC+0200 ~ Christophe Leroy [...] I finally managed to cross compile bpftool with libbpf, libopcodes, readline, ncurses,

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-23 Thread Christophe Leroy
Le 23/04/2021 à 12:26, Quentin Monnet a écrit : 2021-04-23 09:19 UTC+0200 ~ Christophe Leroy [...] I finally managed to cross compile bpftool with libbpf, libopcodes, readline, ncurses, libcap, libz and all needed stuff. Was not easy but I made it. Libcap is optional and bpftool does

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-23 Thread Quentin Monnet
2021-04-23 09:19 UTC+0200 ~ Christophe Leroy [...] > I finally managed to cross compile bpftool with libbpf, libopcodes, > readline, ncurses, libcap, libz and all needed stuff. Was not easy but I > made it. Libcap is optional and bpftool does not use readline or ncurses. May I ask how you

Re: [PATCH kernel] powerpc/makefile: Do not redefine $(CPP) for preprocessor

2021-04-23 Thread Michael Ellerman
Christophe Leroy writes: > Le 23/04/2021 à 00:58, Daniel Axtens a écrit : >>> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >>> index c9d2c7825cd6..3a2f2001c62b 100644 >>> --- a/arch/powerpc/Makefile >>> +++ b/arch/powerpc/Makefile >>> @@ -214,7 +214,6 @@ KBUILD_CPPFLAGS += -I

Re: [PATCH v5 16/16] of: Add plumbing for restricted DMA pool

2021-04-23 Thread Robin Murphy
On 2021-04-22 09:15, Claire Chang wrote: If a device is not behind an IOMMU, we look up the device node and set up the restricted DMA when the restricted-dma-pool is presented. Signed-off-by: Claire Chang --- drivers/of/address.c| 25 + drivers/of/device.c |

Re: [PATCH v5 08/16] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-04-23 Thread Robin Murphy
On 2021-04-22 09:15, Claire Chang wrote: Update is_swiotlb_active to add a struct device argument. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang --- drivers/gpu/drm/i915/gem/i915_gem_internal.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c|

Re: [PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-04-23 Thread Michael Ellerman
"Naveen N. Rao" writes: > Michael Ellerman wrote: >> "Naveen N. Rao" writes: >>> Daniel Axtens wrote: Sathvika Vasireddy writes: > This adds emulation support for the following instruction: >* Set Boolean (setb) > > Signed-off-by: Sathvika Vasireddy >> ...

Re: [PATCH v5 05/16] swiotlb: Add restricted DMA pool initialization

2021-04-23 Thread Steven Price
On 22/04/2021 09:14, Claire Chang wrote: Add the initialization function to create restricted DMA pools from matching reserved-memory nodes. Signed-off-by: Claire Chang --- include/linux/device.h | 4 +++ include/linux/swiotlb.h | 3 +- kernel/dma/swiotlb.c| 80

Re: [PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-04-23 Thread Gabriel Paubert
On Thu, Apr 22, 2021 at 06:26:16PM -0500, Segher Boessenkool wrote: > Hi! > > On Fri, Apr 23, 2021 at 12:16:18AM +0200, Gabriel Paubert wrote: > > On Thu, Apr 22, 2021 at 02:13:34PM -0500, Segher Boessenkool wrote: > > > On Fri, Apr 16, 2021 at 05:44:52PM +1000, Daniel Axtens wrote: > > > >

Re: [PATCH v3 06/11] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()

2021-04-23 Thread Alexey Kardashevskiy
On 22/04/2021 17:07, Leonardo Bras wrote: Code used to create a ddw property that was previously scattered in enable_ddw() is now gathered in ddw_property_create(), which deals with allocation and filling the property, letting it ready for of_property_add(), which now occurs in sequence.

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-04-23 Thread Christian Brauner
On Thu, Apr 22, 2021 at 10:34:08PM -0400, Richard Guy Briggs wrote: > On 2021-03-18 08:08, Richard Guy Briggs wrote: > > On 2021-03-18 11:48, Christian Brauner wrote: > > > [+Cc Aleksa, the author of openat2()] > > > > Ah! Thanks for pulling in Aleksa. I thought I caught everyone... > > > > >

Re: [PATCH 1/2] powerpc/vdso64: link vdso64 with linker

2021-04-23 Thread Christophe Leroy
Le 23/04/2021 à 00:44, Nick Desaulniers a écrit : On Wed, Sep 2, 2020 at 11:02 AM Christophe Leroy wrote: Le 02/09/2020 à 19:41, Nick Desaulniers a écrit : On Wed, Sep 2, 2020 at 5:14 AM Michael Ellerman wrote: Nick Desaulniers writes: Fixes: commit f2af201002a8 ("powerpc/build:

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Michal Suchánek
On Thu, Apr 22, 2021 at 08:37:29PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > Commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for > CEDE(0)") sets the exit latency of CEDE(0) based on the latency values > of the Extended CEDE states advertised by the platform > >

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-23 Thread Christophe Leroy
Le 20/04/2021 à 05:28, Alexei Starovoitov a écrit : On Sat, Apr 17, 2021 at 1:16 AM Christophe Leroy wrote: Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet wrote: 2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann On 4/15/21 11:32 AM,

Re: [PATCH v3 01/11] powerpc/pseries/iommu: Replace hard-coded page shift

2021-04-23 Thread Alexey Kardashevskiy
On 22/04/2021 17:07, Leonardo Bras wrote: Some functions assume IOMMU page size can only be 4K (pageshift == 12). Update them to accept any page size passed, so we can use 64K pages. In the process, some defines like TCE_SHIFT were made obsolete, and then removed. IODA3 Revision 3.0_prd1

Re: [PATCH v5 01/16] swiotlb: Fix the type of index

2021-04-23 Thread Christoph Hellwig
On Thu, Apr 22, 2021 at 04:14:53PM +0800, Claire Chang wrote: > Fix the type of index from unsigned int to int since find_slots() might > return -1. > > Fixes: 0774983bc923 ("swiotlb: refactor swiotlb_tbl_map_single") > Signed-off-by: Claire Chang Looks good: Reviewed-by: Christoph Hellwig