Re: powerpc/mpc85xx: Add Cyrus P5040 device tree source

2020-05-14 Thread Scott Wood
On Wed, 2020-05-13 at 23:02 +0100, Darren Stevens wrote: > Hello Scott > > On 08/05/2020, Scott Wood wrote: > > On Thu, 2020-05-07 at 22:30 +0100, Darren Stevens wrote: > > > > > > +/include/ "p5040si-pre.dtsi" > > > + > > > +/ { > > > +model = "varisys,CYRUS5040"; > > > +compatible =

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-14 Thread Christophe Leroy
Le 06/05/2020 à 05:40, Jordan Niethe a écrit : For powerpc64, redefine the ppc_inst type so both word and prefixed instructions can be represented. On powerpc32 the type will remain the same. Update places which had assumed instructions to be 4 bytes long. Reviewed-by: Alistair Popple

Re: [PATCH v8 30/30] powerpc sstep: Add support for prefixed fixed-point arithmetic

2020-05-14 Thread Christophe Leroy
Le 06/05/2020 à 05:40, Jordan Niethe a écrit : This adds emulation support for the following prefixed Fixed-Point Arithmetic instructions: * Prefixed Add Immediate (paddi) Shouldn't this patch go before patch 23 ? Christophe Reviewed-by: Balamuruhan S Signed-off-by: Jordan Niethe

Re: [PATCH v8 29/30] powerpc sstep: Add support for prefixed load/stores

2020-05-14 Thread Christophe Leroy
Shouldn't this patch go before patch 23 ? Christophe Le 06/05/2020 à 05:40, Jordan Niethe a écrit : This adds emulation support for the following prefixed integer load/stores: * Prefixed Load Byte and Zero (plbz) * Prefixed Load Halfword and Zero (plhz) * Prefixed Load Halfword

Re: [PATCH v8 28/30] powerpc: Support prefixed instructions in alignment handler

2020-05-14 Thread Christophe Leroy
Le 06/05/2020 à 05:40, Jordan Niethe a écrit : If a prefixed instruction results in an alignment exception, the SRR1_PREFIXED bit is set. The handler attempts to emulate the responsible instruction and then increment the NIP past it. Use SRR1_PREFIXED to determine by how much the NIP should

[PATCH AUTOSEL 4.14 21/39] scsi: ibmvscsi: Fix WARN_ON during event pool release

2020-05-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit b36522150e5b85045f868768d46fbaaa034174b2 ] While removing an ibmvscsi client adapter a WARN_ON like the following is seen in the kernel log: drmgr: drmgr: -r -c slot -s U9080.M9S.783AEC8-V11-C11 -w 5 -d 1 WARNING: CPU: 9 PID: 24062 at

[PATCH AUTOSEL 5.4 21/49] ibmvnic: Skip fatal error reset after passive init

2020-05-14 Thread Sasha Levin
From: Juliet Kim [ Upstream commit f9c6cea0b38518741c8dcf26ac056d26ee2fd61d ] During MTU change, the following events may happen. Client-driven CRQ initialization fails due to partner’s CRQ closed, causing client to enqueue a reset task for FATAL_ERROR. Then passive (server-driven) CRQ

Re: [PATCH 1/1] powerpc/rtas: Implement reentrant rtas call

2020-05-14 Thread Nathan Lynch
Hi Leonardo, Leonardo Bras writes: > Hello Nathan, thanks for the feedback! > > On Fri, 2020-04-10 at 14:28 -0500, Nathan Lynch wrote: >> Leonardo Bras writes: >> > Implement rtas_call_reentrant() for reentrant rtas-calls: >> > "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive". >> >

Re: [PATCH 1/1] powerpc/rtas: Implement reentrant rtas call

2020-05-14 Thread Leonardo Bras
On Thu, 2020-05-14 at 14:04 -0500, Nathan Lynch wrote: > I checked with partition firmware development and these calls can be > used concurrently with arbitrary other RTAS calls, which confirms your > interpretation. Thanks for bearing with me. I was not aware of how I could get this information.

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-14 Thread Michael Ellerman
Christophe Leroy writes: > Le 06/05/2020 à 05:40, Jordan Niethe a écrit : >> For powerpc64, redefine the ppc_inst type so both word and prefixed >> instructions can be represented. On powerpc32 the type will remain the >> same. Update places which had assumed instructions to be 4 bytes long.

Re: [PATCH v2 7/9] powerpc/ps3: Add check for otheros image size

2020-05-14 Thread Michael Ellerman
Hi Geoff, Geoff Levand writes: > The ps3's otheros flash loader has a size limit of 16 MiB for the > uncompressed image. If that limit will be reached output the > flash image file as 'otheros-too-big.bld'. > > Signed-off-by: Geoff Levand > --- > arch/powerpc/boot/wrapper | 17

Re: [PATCH v8 13/30] powerpc: Add a probe_user_read_inst() function

2020-05-14 Thread Jordan Niethe
On Thu, May 14, 2020 at 3:46 PM Christophe Leroy wrote: > > > > Le 06/05/2020 à 05:40, Jordan Niethe a écrit : > > Introduce a probe_user_read_inst() function to use in cases where > > probe_user_read() is used for getting an instruction. This will be more > > useful for prefixed instructions. >

[PATCH AUTOSEL 5.6 19/62] scsi: ibmvscsi: Fix WARN_ON during event pool release

2020-05-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit b36522150e5b85045f868768d46fbaaa034174b2 ] While removing an ibmvscsi client adapter a WARN_ON like the following is seen in the kernel log: drmgr: drmgr: -r -c slot -s U9080.M9S.783AEC8-V11-C11 -w 5 -d 1 WARNING: CPU: 9 PID: 24062 at

[PATCH AUTOSEL 5.4 18/49] scsi: ibmvscsi: Fix WARN_ON during event pool release

2020-05-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit b36522150e5b85045f868768d46fbaaa034174b2 ] While removing an ibmvscsi client adapter a WARN_ON like the following is seen in the kernel log: drmgr: drmgr: -r -c slot -s U9080.M9S.783AEC8-V11-C11 -w 5 -d 1 WARNING: CPU: 9 PID: 24062 at

[PATCH AUTOSEL 4.19 15/31] scsi: ibmvscsi: Fix WARN_ON during event pool release

2020-05-14 Thread Sasha Levin
From: Tyrel Datwyler [ Upstream commit b36522150e5b85045f868768d46fbaaa034174b2 ] While removing an ibmvscsi client adapter a WARN_ON like the following is seen in the kernel log: drmgr: drmgr: -r -c slot -s U9080.M9S.783AEC8-V11-C11 -w 5 -d 1 WARNING: CPU: 9 PID: 24062 at

[PATCH AUTOSEL 5.6 21/62] ibmvnic: Skip fatal error reset after passive init

2020-05-14 Thread Sasha Levin
From: Juliet Kim [ Upstream commit f9c6cea0b38518741c8dcf26ac056d26ee2fd61d ] During MTU change, the following events may happen. Client-driven CRQ initialization fails due to partner’s CRQ closed, causing client to enqueue a reset task for FATAL_ERROR. Then passive (server-driven) CRQ

Re: [PATCH v3 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-14 Thread Nathan Lynch
Hi, Leonardo Bras writes: > +/** > + * rtas_call_reentrant() - Used for reentrant rtas calls > + * @token: Token for desired reentrant RTAS call > + * @nargs: Number of Input Parameters > + * @nret:Number of Output Parameters > + * @outputs: Array of outputs > + * @...: Inputs for

[PATCH v6 01/16] powerpc/watchpoint: Rename current DAWR macros

2020-05-14 Thread Ravi Bangoria
Power10 is introducing second DAWR. Use real register names from ISA for current macros: s/SPRN_DAWR/SPRN_DAWR0/ s/SPRN_DAWRX/SPRN_DAWRX0/ Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/reg.h | 4 ++-- arch/powerpc/kernel/dawr.c

Re: [PATCH v8 29/30] powerpc sstep: Add support for prefixed load/stores

2020-05-14 Thread Christophe Leroy
Le 14/05/2020 à 14:19, Alistair Popple a écrit : On Thursday, 14 May 2020 4:15:06 PM AEST Christophe Leroy wrote: Shouldn't this patch go before patch 23 ? Perhaps I am missing something, but it seems reasonable enough to me that you would introduce the machinery for dealing with prefix

Re: [PATCH v8 00/30] Initial Prefixed Instruction support

2020-05-14 Thread Jordan Niethe
On Thu, May 14, 2020 at 3:31 PM Christophe Leroy wrote: > > > > Le 06/05/2020 à 05:40, Jordan Niethe a écrit : > > A future revision of the ISA will introduce prefixed instructions. A > > prefixed instruction is composed of a 4-byte prefix followed by a > > 4-byte suffix. > > > > All prefixes

[PATCH v6 06/16] powerpc/watchpoint: Provide DAWR number to __set_breakpoint

2020-05-14 Thread Ravi Bangoria
Introduce new parameter 'nr' to __set_breakpoint() which indicates which DAWR should be programed. Also convert current_brk variable to an array. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/debug.h | 2 +-

Re: [PATCH RFC 1/4] powerpc/radix: Fix compilation for radix with CONFIG_SMP=n

2020-05-14 Thread Joel Stanley
On Sat, 9 May 2020 at 07:52, Nicholas Piggin wrote: > > Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: > > This fixes the compile errors we currently get with CONFIG_SMP=n and > > CONFIG_PPC_RADIX_MMU=y. > > Did I already fix this, or does it keep getting broken?! :( > > Anyway

[PATCH v6 04/16] powerpc/watchpoint/ptrace: Return actual num of available watchpoints

2020-05-14 Thread Ravi Bangoria
User can ask for num of available watchpoints(dbginfo.num_data_bps) using ptrace(PPC_PTRACE_GETHWDBGINFO). Return actual number of available watchpoints on the machine rather than hardcoded 1. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling ---

[PATCH v6 05/16] powerpc/watchpoint: Provide DAWR number to set_dawr

2020-05-14 Thread Ravi Bangoria
Introduce new parameter 'nr' to set_dawr() which indicates which DAWR should be programed. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/hw_breakpoint.h | 4 ++-- arch/powerpc/kernel/dawr.c | 15 ++-

[PATCH v6 00/16] powerpc/watchpoint: Preparation for more than one watchpoint

2020-05-14 Thread Ravi Bangoria
So far, powerpc Book3S code has been written with an assumption of only one watchpoint. But Power10[1] is introducing second watchpoint register (DAWR). Even though this patchset does not enable 2nd DAWR, it makes the infrastructure ready so that enabling 2nd DAWR should just be a matter of

[PATCH v6 03/16] powerpc/watchpoint: Introduce function to get nr watchpoints dynamically

2020-05-14 Thread Ravi Bangoria
So far we had only one watchpoint, so we have hardcoded HBP_NUM to 1. But Power10 is introducing 2nd DAWR and thus kernel should be able to dynamically find actual number of watchpoints supported by hw it's running on. Introduce function for the same. Also convert HBP_NUM macro to HBP_NUM_MAX,

[PATCH v6 02/16] powerpc/watchpoint: Add SPRN macros for second DAWR

2020-05-14 Thread Ravi Bangoria
Power10 is introducing second DAWR. Add SPRN_ macros for the same. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/reg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH v6 07/16] powerpc/watchpoint: Get watchpoint count dynamically while disabling them

2020-05-14 Thread Ravi Bangoria
Instead of disabling only one watchpoint, get num of available watchpoints dynamically and disable all of them. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/hw_breakpoint.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH v6 08/16] powerpc/watchpoint: Disable all available watchpoints when !dawr_force_enable

2020-05-14 Thread Ravi Bangoria
Instead of disabling only first watchpoint, disable all available watchpoints while clearing dawr_force_enable. Callback function is used only for disabling watchpoint, rename it to disable_dawrs_cb(). And null_brk parameter is not really required while disabling watchpoint, remove it.

Re: [PATCH v3 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-14 Thread Leonardo Bras
Hello Nathan, On Thu, 2020-05-14 at 13:58 -0500, Nathan Lynch wrote: > Hi, > > Leonardo Bras writes: > > +/** > > + * rtas_call_reentrant() - Used for reentrant rtas calls > > + * @token: Token for desired reentrant RTAS call > > + * @nargs: Number of Input Parameters > > + * @nret: Number of

[PATCH v4 0/2] Implement reentrant rtas call

2020-05-14 Thread Leonardo Bras
Patch 2 implement rtas_call_reentrant() for reentrant rtas-calls: "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive", according to LoPAPR Version 1.1 (March 24, 2016). For that, it's necessary that every call uses a different rtas buffer (rtas_args). Paul Mackerras suggested using the

Re: [PATCH v3 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-14 Thread Leonardo Bras
On Thu, 2020-05-14 at 20:28 -0300, Leonardo Bras wrote: > Yes, you are right. > I will also add preempt_{dis,en}able, which in most kernels will > compile out, but it will be kind of 'ready' if we ever decide to > support PREEMPT. > > Thanks for the feedback! v4:

Re: [PATCH] tty: hvc: Fix data abort due to race in hvc_open

2020-05-14 Thread rananta
On 2020-05-13 00:04, Greg KH wrote: On Tue, May 12, 2020 at 02:39:50PM -0700, rana...@codeaurora.org wrote: On 2020-05-12 01:25, Greg KH wrote: > On Tue, May 12, 2020 at 09:22:15AM +0200, Jiri Slaby wrote: > > On 11. 05. 20, 9:39, Greg KH wrote: > > > On Mon, May 11, 2020 at 12:23:58AM -0700,

[PATCH v4 1/2] powerpc/rtas: Move type/struct definitions from rtas.h into rtas-types.h

2020-05-14 Thread Leonardo Bras
In order to get any rtas* struct into other headers, including rtas.h may cause a lot of errors, regarding include dependency needed for inline functions. Create rtas-types.h and move there all type/struct definitions from rtas.h, then include rtas-types.h into rtas.h. Also, as suggested by

[PATCH v4 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-14 Thread Leonardo Bras
Implement rtas_call_reentrant() for reentrant rtas-calls: "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive". On LoPAPR Version 1.1 (March 24, 2016), from 7.3.10.1 to 7.3.10.4, items 2 and 3 say: 2 - For the PowerPC External Interrupt option: The * call must be reentrant to the number

[PATCH v6 09/16] powerpc/watchpoint: Convert thread_struct->hw_brk to an array

2020-05-14 Thread Ravi Bangoria
So far powerpc hw supported only one watchpoint. But Power10 is introducing 2nd DAWR. Convert thread_struct->hw_brk into an array. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/processor.h | 2 +- arch/powerpc/kernel/process.c | 60

[PATCH v6 10/16] powerpc/watchpoint: Use loop for thread_struct->ptrace_bps

2020-05-14 Thread Ravi Bangoria
ptrace_bps is already an array of size HBP_NUM_MAX. But we use hardcoded index 0 while fetching/updating it. Convert such code to loop over array. ptrace interface to use multiple watchpoint remains same. eg: two PPC_PTRACE_SETHWDEBUG calls will create two watchpoint if underneath hw supports it.

[PATCH v6 11/16] powerpc/watchpoint: Introduce is_ptrace_bp() function

2020-05-14 Thread Ravi Bangoria
Introduce is_ptrace_bp() function and move the check inside the function. It will be utilize more in later set of patches. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/kernel/hw_breakpoint.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH v6 14/16] powerpc/watchpoint: Don't allow concurrent perf and ptrace events

2020-05-14 Thread Ravi Bangoria
With Book3s DAWR, ptrace and perf watchpoints on powerpc behaves differently. Ptrace watchpoint works in one-shot mode and generates signal before executing instruction. It's ptrace user's job to single-step the instruction and re-enable the watchpoint. OTOH, in case of perf watchpoint, kernel

[PATCH v6 15/16] powerpc/watchpoint/xmon: Don't allow breakpoint overwriting

2020-05-14 Thread Ravi Bangoria
Xmon allows overwriting breakpoints because it's supported by only one DAWR. But with multiple DAWRs, overwriting becomes ambiguous or unnecessary complicated. So let's not allow it. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/xmon/xmon.c | 4 1 file

Re: [PATCH v8 29/30] powerpc sstep: Add support for prefixed load/stores

2020-05-14 Thread Alistair Popple
On Thursday, 14 May 2020 4:15:06 PM AEST Christophe Leroy wrote: > Shouldn't this patch go before patch 23 ? Perhaps I am missing something, but it seems reasonable enough to me that you would introduce the machinery for dealing with prefix instructions prior to defining them. What would be the

[PATCH v6 12/16] powerpc/watchpoint: Use builtin ALIGN*() macros

2020-05-14 Thread Ravi Bangoria
Currently we calculate hw aligned start and end addresses manually. Replace them with builtin ALIGN_DOWN() and ALIGN() macros. So far end_addr was inclusive but this patch makes it exclusive (by avoiding -1) for better readability. Suggested-by: Christophe Leroy Signed-off-by: Ravi Bangoria

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-14 Thread Jordan Niethe
On Thu, May 14, 2020 at 4:12 PM Christophe Leroy wrote: > > > > Le 06/05/2020 à 05:40, Jordan Niethe a écrit : > > For powerpc64, redefine the ppc_inst type so both word and prefixed > > instructions can be represented. On powerpc32 the type will remain the > > same. Update places which had

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-14 Thread Jordan Niethe
On Thu, May 14, 2020 at 10:06 PM Alistair Popple wrote: > > On Thursday, 14 May 2020 4:11:43 PM AEST Christophe Leroy wrote: > > @@ -249,7 +249,7 @@ int arch_prepare_optimized_kprobe(struct > > optimized_kprobe *op, struct kprobe *p) > > > * Fixup the template with instructions to: > > > * 1.

[PATCH v6 13/16] powerpc/watchpoint: Prepare handler to handle more than one watcnhpoint

2020-05-14 Thread Ravi Bangoria
Currently we assume that we have only one watchpoint supported by hw. Get rid of that assumption and use dynamic loop instead. This should make supporting more watchpoints very easy. With more than one watchpoint, exception handler needs to know which DAWR caused the exception, and hw currently

[PATCH v6 16/16] powerpc/watchpoint/xmon: Support 2nd DAWR

2020-05-14 Thread Ravi Bangoria
Add support for 2nd DAWR in xmon. With this, we can have two simultaneous breakpoints from xmon. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/xmon/xmon.c | 101 ++- 1 file changed, 69 insertions(+), 32 deletions(-) diff --git

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-14 Thread Alistair Popple
On Thursday, 14 May 2020 4:11:43 PM AEST Christophe Leroy wrote: > @@ -249,7 +249,7 @@ int arch_prepare_optimized_kprobe(struct > optimized_kprobe *op, struct kprobe *p) > > * Fixup the template with instructions to: > > * 1. load the address of the actual probepoint > > */ > > -

Re: [PATCH v8 28/30] powerpc: Support prefixed instructions in alignment handler

2020-05-14 Thread Alistair Popple
On Thursday, 14 May 2020 4:14:12 PM AEST Christophe Leroy wrote: > Le 06/05/2020 à 05:40, Jordan Niethe a écrit : > > If a prefixed instruction results in an alignment exception, the > > SRR1_PREFIXED bit is set. The handler attempts to emulate the > > responsible instruction and then increment

Re: [PATCH v8 23/30] powerpc: Add prefixed instructions to instruction data type

2020-05-14 Thread Christophe Leroy
Le 14/05/2020 à 14:06, Alistair Popple a écrit : On Thursday, 14 May 2020 4:11:43 PM AEST Christophe Leroy wrote: @@ -249,7 +249,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p) * Fixup the template with instructions to: * 1. load the address of the

Re: [PATCH v8 28/30] powerpc: Support prefixed instructions in alignment handler

2020-05-14 Thread Christophe Leroy
Le 14/05/2020 à 14:15, Alistair Popple a écrit : On Thursday, 14 May 2020 4:14:12 PM AEST Christophe Leroy wrote: Le 06/05/2020 à 05:40, Jordan Niethe a écrit : If a prefixed instruction results in an alignment exception, the SRR1_PREFIXED bit is set. The handler attempts to emulate the

Re: powerpc/pci: [PATCH 1/1]: PCIE PHB reset

2020-05-14 Thread wenxiong
On 2020-05-12 00:28, Sam Bobroff wrote: On Thu, May 07, 2020 at 08:10:37AM -0500, wenxi...@linux.vnet.ibm.com wrote: From: Wen Xiong Several device drivers hit EEH(Extended Error handling) when triggering kdump on Pseries PowerVM. This patch implemented a reset of the PHBs in pci general

[PATCH v2 00/12] mm: consolidate definitions of page table accessors

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport Hi, The low level page table accessors (pXY_index(), pXY_offset()) are duplicated across all architectures and sometimes more than once. For instance, we have 31 definition of pgd_offset() for 25 supported architectures. Most of these definitions are actually identical and

[PATCH v2 01/12] mm: don't include asm/pgtable.h if linux/mm.h is already included

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport The linux/mm.h header includes to allow inlining of the functions involving page table manipulations, e.g. pte_alloc() and pmd_alloc(). So, there is no point to explicitly include in the files that include . The include statements in such cases are remove with a simple

[PATCH v2 03/12] mm: reorder includes after introduction of linux/pgtable.h

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport The replacement of with made the include of the latter in the middle of asm includes. Fix this up with the aid of the below script and manual adjustments here and there. import sys import re if len(sys.argv) is not 3: print "USAGE: %s

[PATCH v2 04/12] csky: replace definitions of __pXd_offset() with pXd_index()

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport All architectures use pXd_index() to get an entry in the page table page corresponding to a virtual address. Align csky with other architectures. Signed-off-by: Mike Rapoport --- arch/csky/include/asm/pgtable.h | 5 ++--- arch/csky/mm/fault.c| 2 +-

[PATCH v2 05/12] m68k/mm/motorola: move comment about page table allocation funcitons

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport The comment about page table allocation functions resides in include/asm/motorola_pgtable.h while the functions live in include/asm/motorola_pgaloc.h. Move the comment close to the code. Signed-off-by: Mike Rapoport --- arch/m68k/include/asm/motorola_pgalloc.h | 6 ++

[PATCH v2 06/12] m68k/mm: move {cache, nocahe}_page() definitions close to their user

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport The cache_page() and nocache_page() functions are only used by the motorola MMU variant for setting caching attributes for the page table pages. Move the definitions of these functions from arch/m68k/include/asm/motorola_pgtable.h closer to their usage in

[PATCH v2 07/12] x86/mm: simplify init_trampoline() and surrounding logic

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport There are three cases for the trampoline initialization: * 32-bit does nothing * 64-bit with kaslr disabled simply copies a PGD entry from the direct map to the trampoline PGD * 64-bit with kaslr enabled maps the real mode trampoline at PUD level These cases are currently

[PATCH v2 08/12] mm: pgtable: add shortcuts for accessing kernel PMD and PTE

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport The powerpc 32-bit implementation of pgtable has nice shortcuts for accessing kernel PMD and PTE for a given virtual address. Make this helpers available for all architectures. Signed-off-by: Mike Rapoport --- arch/arc/mm/highmem.c | 10 +---

[PATCH v2 09/12] mm: consolidate pte_index() and pte_offset_*() definitions

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport All architectures define pte_index() as (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1) and all architectures define pte_offset_kernel() as an entry in the array of PTEs indexed by the pte_index(). For the most architectures the pte_offset_kernel() implementation

[PATCH v2 10/12] mm: consolidate pmd_index() and pmd_offset() definitions

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport All architectures define pmd_index() as (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1) and all architectures that have at least three-level page tables define pmd_offset() as an entry in the array of PMDs indexed by the pmd_index(). For the most architectures the

[PATCH v2 11/12] mm: consolidate pud_index() and pud_offset() definitions

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport All architectures that have at least four-level page tables define pud_offset() as an entry in the array of PUDs indexed by the pud_index(), where pud_index() is (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1) For the most architectures the pud_offset() implementation

[PATCH v2 12/12] mm: consolidate pgd_index() and pgd_offset{_k}() definitions

2020-05-14 Thread Mike Rapoport
From: Mike Rapoport All architectures tables define pgd_offset() as an entry in the array of PGDs indexed by the pgd_index(), where pgd_index() is (address >> PGD_SHIFT) & (PTRS_PER_PGD - 1) For the most cases, the pgd_offset() uses mm->pgd as the pointer to the top-level page

Re: [PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics

2020-05-14 Thread Paolo Bonzini
On 14/05/20 19:35, Jonathan Adams wrote: >> In general for statsfs we took a more explicit approach where each >> addend in a sum is a separate stats_fs_source. In this version of the >> patches it's also a directory, but we'll take your feedback and add both >> the ability to hide directories