Re: [PATCH v2 2/2] powerpc/pci: unmap all interrupts when a PHB is removed

2020-08-06 Thread Alexey Kardashevskiy
On 18/06/2020 02:29, Cédric Le Goater wrote: > Some PCI adapters, like GPUs, use the "interrupt-map" property to > describe interrupt mappings other than the legacy INTx interrupts. > There can be more than 4 mappings. > > To clear all interrupts when a PHB is removed, we need to increase the >

Re: [RFC PATCH 1/2] powerpc/numa: Introduce logical numa id

2020-08-06 Thread Aneesh Kumar K.V
On 8/7/20 9:54 AM, Nathan Lynch wrote: "Aneesh Kumar K.V" writes: diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index e437a9ac4956..6c659aada55b 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -221,25 +221,51 @@ static void initialize_distance_lookup_table(int

Re: [PATCH v5 3/3] mm/page_alloc: Keep memoryless cpuless node 0 offline

2020-08-06 Thread Andrew Morton
On Fri, 3 Jul 2020 18:28:23 +0530 Srikar Dronamraju wrote: > > The memory hotplug changes that somehow because you can hotremove numa > > nodes and therefore make the nodemask sparse but that is not a common > > case. I am not sure what would happen if a completely new node was added > > and its

Re: [RFC PATCH 1/2] powerpc/numa: Introduce logical numa id

2020-08-06 Thread Nathan Lynch
"Aneesh Kumar K.V" writes: > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index e437a9ac4956..6c659aada55b 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -221,25 +221,51 @@ static void initialize_distance_lookup_table(int nid, > } > } > > +stat

Re: [PATCH] powerpc/signal: Move and simplify get_clean_sp()

2020-08-06 Thread Michael Ellerman
Christoph Hellwig writes: > On Thu, Aug 06, 2020 at 08:50:20AM +, Christophe Leroy wrote: >> get_clean_sp() is only used in kernel/signal.c . Move it there. >> >> And GCC is smart enough to reduce the function when on PPC32, no >> need of a special PPC32 simple version. > > What about just op

Re: [PATCH v8 5/8] powerpc/vdso: Prepare for switching VDSO to generic C implementation.

2020-08-06 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, Aug 06, 2020 at 12:03:33PM +1000, Michael Ellerman wrote: >> Segher Boessenkool writes: >> > On Wed, Aug 05, 2020 at 04:24:16PM +1000, Michael Ellerman wrote: >> >> Christophe Leroy writes: >> >> > Indeed, 32-bit doesn't have a redzone, so I believe it needs

Re: [PATCH V5 0/4] powerpc/perf: Add support for perf extended regs in powerpc

2020-08-06 Thread Athira Rajeev
> On 06-Aug-2020, at 5:50 PM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Jul 31, 2020 at 11:04:14PM +0530, Athira Rajeev escreveu: >> >> >>> On 31-Jul-2020, at 1:20 AM, Jiri Olsa wrote: >>> >>> On Thu, Jul 30, 2020 at 01:24:40PM +0530, Athira Rajeev wrote: > On 27-Jul-2020

Re: [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit

2020-08-06 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Michael Ellerman writes: > >> "Aneesh Kumar K.V" writes: >>> Similar to commit: 89c140bbaeee ("pseries: Fix 64 bit logical memory block >>> panic") >>> make sure we update different variables tracking lmb_size are updated >>> to be 64 bit. >> >> That commit went to

Re: [PATCH] powerpc/perf: Account for interrupts during PMC overflow for an invalid SIAR check

2020-08-06 Thread Alexey Kardashevskiy
On 06/08/2020 22:46, Athira Rajeev wrote: > Performance monitor interrupt handler checks if any counter has overflown > and calls `record_and_restart` in core-book3s which invokes > `perf_event_overflow` to record the sample information. > Apart from creating sample, perf_event_overflow also doe

Re: [PATCH v1 5/5] powerpc/fault: Perform exception fixup in do_page_fault()

2020-08-06 Thread kernel test robot
Hi Christophe, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.8 next-20200806] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as doc

Re: [PATCH v8 5/8] powerpc/vdso: Prepare for switching VDSO to generic C implementation.

2020-08-06 Thread Segher Boessenkool
Hi! On Thu, Aug 06, 2020 at 12:03:33PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > On Wed, Aug 05, 2020 at 04:24:16PM +1000, Michael Ellerman wrote: > >> Christophe Leroy writes: > >> > Indeed, 32-bit doesn't have a redzone, so I believe it needs a stack > >> > frame wheneve

[Bug 207359] MegaRAID SAS 9361 controller hang/reset

2020-08-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207359 --- Comment #4 from Cameron (c...@neo-zeon.de) --- I converted the box's filesystems from BTRFS to XFS, and switched the page size from 4k to 64k. The problem appears to be entirely gone now. I am able to conclusively run 5.7.13 without issue, whi

[PATCH v1 5/5] powerpc/fault: Perform exception fixup in do_page_fault()

2020-08-06 Thread Christophe Leroy
Exception fixup doesn't require the heady full regs saving, do it from do_page_fault() directly. For that, split bad_page_fault() in two parts. As bad_page_fault() can also be called from other places than handle_page_fault(), it will still perform exception fixup and fallback on __bad_page_fault

[PATCH v1 3/5] powerpc/fault: Reorder tests in bad_kernel_fault()

2020-08-06 Thread Christophe Leroy
Check address earlier to simplify the following test. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 9ef9ee244f72..525e0c2b5406 100644 --- a/arch/po

[PATCH v1 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-08-06 Thread Christophe Leroy
search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. Otherwise, it behaves just as if the address was already in the TLBs and no fault was generated. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/fault.c

[PATCH v1 1/5] powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S

2020-08-06 Thread Christophe Leroy
The verification and message introduced by commit 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully") applies to all platforms, it should not be limited to BOOK3S. Make the BOOK3S version of sanity_check_fault() the one for all, and bail out earlier if not BOOK3S. Fi

[PATCH v1 2/5] powerpc/fault: Unnest definition of page_fault_is_write() and page_fault_is_bad()

2020-08-06 Thread Christophe Leroy
To make it more readable, separate page_fault_is_write() and page_fault_is_bad() to avoir several levels of #ifdefs Signed-off-by: Christophe Leroy --- arch/powerpc/mm/fault.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fa

[PATCH v2 4/4] powerpc/book3s64/radix: Make radix_mem_block_size 64bit

2020-08-06 Thread Aneesh Kumar K.V
Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. Fixes: af9d00e93a4f ("powerpc/mm/radix: Create separate mappings for hot-plugged memory") Signed-off-by: Aneesh Kumar K.V --- arch/powerpc

[PATCH v2 3/4] powerpc/memhotplug: Make lmb size 64bit

2020-08-06 Thread Aneesh Kumar K.V
Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. This was found by code audit. Cc: sta...@vger.kernel.org Signed-off-by: Aneesh Kumar K.V --- .../platforms/pseries/hotplug-memory.c

[PATCH v2 2/4] powerpc/mem: Store the dt_root_size/addr cell values for later usage

2020-08-06 Thread Aneesh Kumar K.V
dt_root_addr_cells and dt_root_size_cells are __initdata variables. So make a copy of the same which can be used post init. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/drmem.h | 2 ++ arch/powerpc/kernel/prom.c | 7 +++ arch/powerpc/mm/numa.c | 1 + 3 files c

[PATCH v2 1/4] powerpc/drmem: Make lmb_size 64 bit

2020-08-06 Thread Aneesh Kumar K.V
Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. This was found by code audit. Cc: sta...@vger.kernel.org Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/drmem.h | 4 ++-- 1

Re: [PATCH][V2] macintosh: windfarm: remove detatch debug containing spelling mistakes

2020-08-06 Thread Wolfram Sang
On Thu, Aug 06, 2020 at 11:29:01AM +0100, Colin King wrote: > From: Colin Ian King > > There are spelling mistakes in two debug messages. As recommended > by Wolfram Sang, these can be removed as there is plenty of debug > in the driver core. > > Signed-off-by: Colin Ian King Reviewed-by: Wolfr

Re: [PATCH v2 1/2] powerpc/perf: consolidate GPCI hcall structs into asm/hvcall.h

2020-08-06 Thread Nathan Lynch
Scott Cheloha writes: > The H_GetPerformanceCounterInfo (GPCI) hypercall input/output structs are > useful to modules outside of perf/, so move them into asm/hvcall.h to live > alongside the other powerpc hypercall structs. > > Leave the perf-specific GPCI stuff in perf/hv-gpci.h. > > Signed-off-

Re: [PATCH v2 2/2] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-08-06 Thread Nathan Lynch
Scott Cheloha writes: > The H_GetPerformanceCounterInfo (GPCI) PHYP hypercall has a subcall, > Affinity_Domain_Info_By_Partition, which returns, among other things, > a "partition affinity score" for a given LPAR. This score, a value on > [0-100], represents the processor-memory affinity for the

Re: [PATCH v2 2/2] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-08-06 Thread Nathan Lynch
Michael Ellerman writes: > Tyrel Datwyler writes: >> On 7/27/20 11:46 AM, Scott Cheloha wrote: >>> The H_GetPerformanceCounterInfo (GPCI) PHYP hypercall has a subcall, >>> Affinity_Domain_Info_By_Partition, which returns, among other things, >>> a "partition affinity score" for a given LPAR. Thi

Re: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-08-06 Thread Srikar Dronamraju
* pet...@infradead.org [2020-08-06 15:15:47]: > > But my understanding is most LPARs don't get migrated back and forth, > > they'll start life on a P8 and only get migrated to a P9 once when the > > customer gets a P9. They might then run for a long time (months to > > years) on the P9 in P8 comp

Re: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-08-06 Thread peterz
On Thu, Aug 06, 2020 at 10:25:12PM +1000, Michael Ellerman wrote: > pet...@infradead.org writes: > > On Thu, Aug 06, 2020 at 03:32:25PM +1000, Michael Ellerman wrote: > > > >> That brings with it a bunch of problems, such as existing software that > >> has been developed/configured for Power8 and e

Re: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-08-06 Thread Srikar Dronamraju
* pet...@infradead.org [2020-08-06 10:54:29]: > On Thu, Aug 06, 2020 at 03:32:25PM +1000, Michael Ellerman wrote: > > > That brings with it a bunch of problems, such as existing software that > > has been developed/configured for Power8 and expects to see SMT8. > > > > We also allow LPARs to be

[RFC PATCH] powerpc/drmem: use global variable instead of fetching again

2020-08-06 Thread Aneesh Kumar K.V
use mem_addr_cells/mem_size_cells instead of fetching the values again from device tree. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/drmem.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/mm/drmem.c b/arch/powerpc/mm/drmem.c ind

Re: [PATCH] powerpc/pseries/hotplug-cpu: increase wait time for vCPU death

2020-08-06 Thread Michael Ellerman
Michael Roth writes: > Quoting Michael Roth (2020-08-04 23:37:32) >> Quoting Michael Ellerman (2020-08-04 22:07:08) >> > Greg Kurz writes: >> > > On Tue, 04 Aug 2020 23:35:10 +1000 >> > > Michael Ellerman wrote: >> > >> Spinning forever seems like a bad idea, but as has been demonstrated at >> >

[PATCH] powerpc/perf: Account for interrupts during PMC overflow for an invalid SIAR check

2020-08-06 Thread Athira Rajeev
Performance monitor interrupt handler checks if any counter has overflown and calls `record_and_restart` in core-book3s which invokes `perf_event_overflow` to record the sample information. Apart from creating sample, perf_event_overflow also does the interrupt and period checks via perf_event_acco

Re: [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit

2020-08-06 Thread Aneesh Kumar K.V
Michael Ellerman writes: > "Aneesh Kumar K.V" writes: >> Similar to commit: 89c140bbaeee ("pseries: Fix 64 bit logical memory block >> panic") >> make sure we update different variables tracking lmb_size are updated >> to be 64 bit. > > That commit went to all stable releases, should this one a

Re: [PATCH v2 2/2] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-08-06 Thread Michael Ellerman
Tyrel Datwyler writes: > On 7/27/20 11:46 AM, Scott Cheloha wrote: >> The H_GetPerformanceCounterInfo (GPCI) PHYP hypercall has a subcall, >> Affinity_Domain_Info_By_Partition, which returns, among other things, >> a "partition affinity score" for a given LPAR. This score, a value on >> [0-100],

[RFC PATCH 3/3] powerpc/lmb-size: Use addr #size-cells value when fetching lmb-size

2020-08-06 Thread Aneesh Kumar K.V
Make it consistent with other usages. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_pgtable.c| 7 --- arch/powerpc/platforms/pseries/hotplug-memory.c | 10 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/mm/book3s64/radix_

[RFC PATCH 2/3] powerpc/numa: Use global variable instead of fetching again

2020-08-06 Thread Aneesh Kumar K.V
use mem_addr_cells/mem_size_cells instead of fetching the values again from device tree. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 36 ++-- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/

[RFC PATCH 1/3] powerpc/mem: Store the dt_root_size/addr cell values for later usage

2020-08-06 Thread Aneesh Kumar K.V
dt_root_addr_cells and dt_root_size_cells are __initdata variables. So make a copy of the same which can be used post init. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/drmem.h | 2 ++ arch/powerpc/kernel/prom.c | 7 +++ arch/powerpc/mm/numa.c | 1 + 3 files c

Re: [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit

2020-08-06 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Similar to commit: 89c140bbaeee ("pseries: Fix 64 bit logical memory block > panic") > make sure we update different variables tracking lmb_size are updated > to be 64 bit. That commit went to all stable releases, should this one also? cheers > diff --git a/arch/po

Re: [PATCH] powerpc/40x: Fix assembler warning about r0

2020-08-06 Thread Michael Ellerman
Christophe Leroy writes: > Le 06/08/2020 à 04:18, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Le 22/07/2020 à 04:24, Michael Ellerman a écrit : The assembler says: arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression >>> >>> I get exactly the

Re: [PATCH v2] powerpc/uaccess: simplify the get_fs() set_fs() logic

2020-08-06 Thread Michael Ellerman
Christophe Leroy writes: > Le 25/07/2020 à 13:22, Michael Ellerman a écrit : >> Hi Christophe, >> >> Unfortunately this would collide messily with "uaccess: remove >> segment_eq" in linux-next, so I'll ask you to do a respin based on that, >> some comments below. > > Done, sent as v3, together wi

Re: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-08-06 Thread Michael Ellerman
pet...@infradead.org writes: > On Thu, Aug 06, 2020 at 03:32:25PM +1000, Michael Ellerman wrote: > >> That brings with it a bunch of problems, such as existing software that >> has been developed/configured for Power8 and expects to see SMT8. >> >> We also allow LPARs to be live migrated from Powe

Re: [PATCH V5 0/4] powerpc/perf: Add support for perf extended regs in powerpc

2020-08-06 Thread Arnaldo Carvalho de Melo
Em Fri, Jul 31, 2020 at 11:04:14PM +0530, Athira Rajeev escreveu: > > > > On 31-Jul-2020, at 1:20 AM, Jiri Olsa wrote: > > > > On Thu, Jul 30, 2020 at 01:24:40PM +0530, Athira Rajeev wrote: > >> > >> > >>> On 27-Jul-2020, at 10:46 PM, Athira Rajeev > >>> wrote: > >>> > >>> Patch set to add

[PATCH 2/2] powerpc: drop hard_reset_now() and poweroff_now() declaration

2020-08-06 Thread Christophe Leroy
Those function have never existed. Drop their declaration. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/processor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 9ebcb2f095db..2b4dc10230da 1

[PATCH 1/2] powerpc/fpu: Drop cvt_fd() and cvt_df()

2020-08-06 Thread Christophe Leroy
Those two functions have been unused since commit identified below. Drop them. Fixes: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/processor.h | 2 -- arch/powerpc/kernel/fpu.S

[PATCH] powerpc/irq: Drop forward declaration of struct irqaction

2020-08-06 Thread Christophe Leroy
Since the commit identified below, the forward declaration of struct irqaction is useless. Drop it. Fixes: b709c0832824 ("ppc64: move stack switching up in interrupt processing") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/irq.h | 1 - 1 file changed, 1 deletion(-) diff --git a

[PATCH] powerpc/hwirq: Remove stale forward irq_chip declaration

2020-08-06 Thread Christophe Leroy
Since commit identified below, the forward declaration of struct irq_chip is useless (was struct hw_interrupt_type at that time) Remove it, together with the associated comment. Fixes: c0ad90a32fb6 ("[PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend()") Signed-off-by: Christo

Re: [RFC PATCH 1/2] powerpc/numa: Introduce logical numa id

2020-08-06 Thread Aneesh Kumar K.V
Srikar Dronamraju writes: > * Aneesh Kumar K.V [2020-08-02 19:51:41]: >> Srikar Dronamraju writes: >> > * Aneesh Kumar K.V [2020-07-31 16:49:14]: >> > >> > >> > If its just to eliminate node 0, then we have 2 other probably better >> > solutions. >> > 1. Dont mark node 0 as spl (currently stil

[PATCH][V2] macintosh: windfarm: remove detatch debug containing spelling mistakes

2020-08-06 Thread Colin King
From: Colin Ian King There are spelling mistakes in two debug messages. As recommended by Wolfram Sang, these can be removed as there is plenty of debug in the driver core. Signed-off-by: Colin Ian King --- V2: remove the debug rather than fixing the spelling --- drivers/macintosh/windfarm_l

Re: [PATCH v3 3/3] powerpc/uaccess: simplify the get_fs() set_fs() logic

2020-08-06 Thread Christophe Leroy
Le 06/08/2020 à 11:17, Christoph Hellwig a écrit : Do you urgently need this? My plan for 5.10 is to rebased and submit the remaining bits of this branch: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/set_fs-removal which will kill off set_fs/get_fs entirely. No t

Re: [PATCH] powerpc/signal: Move and simplify get_clean_sp()

2020-08-06 Thread Christoph Hellwig
On Thu, Aug 06, 2020 at 08:50:20AM +, Christophe Leroy wrote: > get_clean_sp() is only used in kernel/signal.c . Move it there. > > And GCC is smart enough to reduce the function when on PPC32, no > need of a special PPC32 simple version. What about just open coding it in the only caller, whi

Re: [PATCH v3 3/3] powerpc/uaccess: simplify the get_fs() set_fs() logic

2020-08-06 Thread Christoph Hellwig
Do you urgently need this? My plan for 5.10 is to rebased and submit the remaining bits of this branch: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/set_fs-removal which will kill off set_fs/get_fs entirely.

Re: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-08-06 Thread peterz
On Thu, Aug 06, 2020 at 03:32:25PM +1000, Michael Ellerman wrote: > That brings with it a bunch of problems, such as existing software that > has been developed/configured for Power8 and expects to see SMT8. > > We also allow LPARs to be live migrated from Power8 to Power9 (and back), so > mainta

[PATCH] powerpc/signal: Move and simplify get_clean_sp()

2020-08-06 Thread Christophe Leroy
get_clean_sp() is only used in kernel/signal.c . Move it there. And GCC is smart enough to reduce the function when on PPC32, no need of a special PPC32 simple version. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/processor.h | 14 -- arch/powerpc/kernel/signal.c

Re: [PATCH v2] powerpc/uaccess: simplify the get_fs() set_fs() logic

2020-08-06 Thread Christophe Leroy
Le 25/07/2020 à 13:22, Michael Ellerman a écrit : Hi Christophe, Unfortunately this would collide messily with "uaccess: remove segment_eq" in linux-next, so I'll ask you to do a respin based on that, some comments below. Done, sent as v3, together with the 2 patchs from Linux next to get i

Re: [PATCH] powerpc/40x: Fix assembler warning about r0

2020-08-06 Thread Christophe Leroy
Le 06/08/2020 à 04:18, Michael Ellerman a écrit : Christophe Leroy writes: Le 22/07/2020 à 04:24, Michael Ellerman a écrit : The assembler says: arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression I get exactly the same with head_32.S, for the exact same reason.

[PATCH v3 3/3] powerpc/uaccess: simplify the get_fs() set_fs() logic

2020-08-06 Thread Christophe Leroy
On powerpc, we only have USER_DS and KERNEL_DS Today, this is managed as an 'unsigned long' data space limit which is used to compare the passed address with, plus a bit in the thread_info flags that is set whenever modifying the limit to enable the verification in addr_limit_user_check() The lim

[PATCH v3 2/3] uaccess: remove segment_eq

2020-08-06 Thread Christophe Leroy
From: Christoph Hellwig segment_eq is only used to implement uaccess_kernel. Just open code uaccess_kernel in the arch uaccess headers and remove one layer of indirection. Link: http://lkml.kernel.org/r/20200710135706.537715-5-...@lst.de Signed-off-by: Christoph Hellwig Acked-by: Linus Torvald

[PATCH v3 1/3] syscalls: use uaccess_kernel in addr_limit_user_check

2020-08-06 Thread Christophe Leroy
From: Christoph Hellwig Patch series "clean up address limit helpers", v2. In preparation for eventually phasing out direct use of set_fs(), this series removes the segment_eq() arch helper that is only used to implement or duplicate the uaccess_kernel() API, and then adds descriptive helpers to

[PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit

2020-08-06 Thread Aneesh Kumar K.V
Similar to commit: 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure we update different variables tracking lmb_size are updated to be 64 bit. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/mmu.h | 2 +- arch/powerpc/include/asm/drmem.h |