Re: [PATCH 2/2] powerpc/spufs: stop using access_ok

2020-04-29 Thread Christophe Leroy
Le 30/04/2020 à 07:39, Christoph Hellwig a écrit : On Thu, Apr 30, 2020 at 08:39:00AM +0800, Jeremy Kerr wrote: Hi Christophe, Just use the proper non __-prefixed get/put_user variants where that is not done yet. But it means you are doing the access_ok() check everytime, which is what is

Re: [PATCH v6 1/4] powerpc: Document details on H_SCM_HEALTH hcall

2020-04-29 Thread Michael Ellerman
Vaibhav Jain writes: > Add documentation to 'papr_hcalls.rst' describing the bitmap flags > that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM > specification. > > Cc: Dan Williams > Cc: Michael Ellerman > Cc: "Aneesh Kumar K . V" > Signed-off-by: Vaibhav Jain > --- > Changelog: >

Re: [RFC 1/3] powernv/cpuidle : Support for pre-entry and post exit of stop state in firmware

2020-04-29 Thread Abhishek
Hi Nick, Have you posted out the kernel side of "opal v4" patchset? I could only find the opal patchset. Thanks, Abhishek On 04/28/2020 06:38 AM, Nicholas Piggin wrote: Thanks for picking this up and pushing it along. I do plan to come back and take another look at it all, but what we do need

Re: [PATCH 2/2] powerpc/spufs: stop using access_ok

2020-04-29 Thread Christoph Hellwig
On Thu, Apr 30, 2020 at 08:39:00AM +0800, Jeremy Kerr wrote: > Hi Christophe, > > > > Just use the proper non __-prefixed get/put_user variants where > > > that is not done yet. > > > > But it means you are doing the access_ok() check everytime, which is > > what is to be avoided by doing the ac

[PATCH v4 16/16] powerpc/watchpoint/xmon: Support 2nd dawr

2020-04-29 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 a/

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

2020-04-29 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 changed,

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

2020-04-29 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 emul

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

2020-04-29 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 need to know which DAWR caused the exception, and hw currently doe

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

2020-04-29 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 Rev

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

2020-04-29 Thread Ravi Bangoria
Introduce is_ptrace_bp() function and move the check inside the function. We will utilize it 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 a/

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

2020-04-29 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 hw underneath supports it.

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

2020-04-29 Thread Ravi Bangoria
So far powerpc hw supported only one watchpoint. But Future Power architecture 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

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

2020-04-29 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. Signed-off

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

2020-04-29 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 --g

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

2020-04-29 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 +- arch/powerpc/include/asm/hw_breakpoin

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

2020-04-29 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 ++- arch/powerpc/kernel/process

Re: [PATCH v2 2/3] powerpc/numa: Prefer node id queried from vphn

2020-04-29 Thread Srikar Dronamraju
* Gautham R Shenoy [2020-04-29 12:22:29]: > Hello Srikar, > > > > + if (nid == NUMA_NO_NODE) { > > + cpu = of_get_cpu_node(i, NULL); > > + if (cpu) { > > Why are we not retaining the BUG_ON(!cpu) assert here ? > > > + nid

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

2020-04-29 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 --- arch/powerpc/kernel/ptrace/ptrace-noadv.

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

2020-04-29 Thread Ravi Bangoria
Future Power architecture 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

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

2020-04-29 Thread Ravi Bangoria
So far we had only one watchpoint, so we have hardcoded HBP_NUM to 1. But future Power architecture 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

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

2020-04-29 Thread Ravi Bangoria
So far, powerpc Book3S code has been written with an assumption of only one watchpoint. But future power architecture is introducing second watchpoint register (DAWR). Even though this patchset does not enable 2nd DAWR, it make the infrastructure ready so that enabling 2nd DAWR should just be a mat

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

2020-04-29 Thread Ravi Bangoria
Future Power architecture 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/d

Re: [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks

2020-04-29 Thread Gautham R Shenoy
Hello Michael, On Thu, Apr 30, 2020 at 12:34:52PM +1000, Michael Ellerman wrote: > Gautham R Shenoy writes: > > On Mon, Apr 20, 2020 at 03:46:35PM -0700, Tyrel Datwyler wrote: > >> On 4/7/20 1:47 AM, Gautham R. Shenoy wrote: > >> > From: "Gautham R. Shenoy" > >> > > >> > Hi, > >> > > >> > This

[RFC PATCH 2/2] powerpc/64s: system call support for scv/rfscv instructions

2020-04-29 Thread Nicholas Piggin
Add support for the scv instruction on POWER9 and later CPUs. For now this implements the zeroth scv vector 'scv 0', as identical to 'sc' system calls, with the exception that lr is not preserved, and it is 64-bit only. There may yet be changes made to this ABI, so it's for testing only. rfscv is

[RFC PATCH 1/2] powerpc/64s/exception: treat NIA below __end_interrupts as soft-masked

2020-04-29 Thread Nicholas Piggin
The scv instruction causes an interrupt which can enter the kernel with MSR[EE]=1, thus allowing interrupts to hit at any time. These must not be taken as normal interrupts, because they come from MSR[PR]=0 context, and yet the kernel stack is not yet set up and r13 is not set to the PACA). Treat

[RFC PATCH 0/2] powerpc/64s: scv support

2020-04-29 Thread Nicholas Piggin
Another round of scv, which is getting closer to done. ABI and compatibility / feature testing still not set in stone, but some good discussion among the various libcs etc. and it's close enough that changes should just be small tweaks to clobbers etc. Posting now because there is some interest to

Re: [musl] Re: New powerpc vdso calling convention

2020-04-29 Thread Michael Ellerman
Rich Felker writes: > On Sat, Apr 25, 2020 at 08:56:54PM +1000, Nicholas Piggin wrote: >> >> The ELF v2 ABI convention would suit it well, because the caller already >> >> requires the function address for ctr, so having it in r12 will >> >> eliminate the need for address calculation, which suits

Re: [RFC PATCH v2 7/7] powerpc/selftest: reuse ppc-opcode macros to avoid redundancy

2020-04-29 Thread Michael Ellerman
"Naveen N. Rao" writes: > Michael Ellerman wrote: >> Balamuruhan S writes: >>> Avoid redefining macros to encode ppc instructions instead reuse it from >>> ppc-opcode.h, Makefile changes are necessary to compile memcmp_64.S with >>> __ASSEMBLY__ defined from selftests. >>> >>> Signed-off-by: Bala

Re: [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks

2020-04-29 Thread Michael Ellerman
Gautham R Shenoy writes: > On Mon, Apr 20, 2020 at 03:46:35PM -0700, Tyrel Datwyler wrote: >> On 4/7/20 1:47 AM, Gautham R. Shenoy wrote: >> > From: "Gautham R. Shenoy" >> > >> > Hi, >> > >> > This is the fifth version of the patches to track and expose idle PURR >> > and SPURR ticks. These pat

Re: [PATCH 2/2] powerpc/spufs: stop using access_ok

2020-04-29 Thread Jeremy Kerr
Hi Christophe, > > Just use the proper non __-prefixed get/put_user variants where > > that is not done yet. > > But it means you are doing the access_ok() check everytime, which is > what is to be avoided by doing the access_ok() once then using the > __-prefixed variant. 5 out of 8 of these

Re: Re: [RESEND PATCH v5 2/5] arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo

2020-04-29 Thread Scott Branden
Hi Bhupesh, On 2020-02-23 10:25 p.m., Bhupesh Sharma wrote: Hi Amit, On Fri, Feb 21, 2020 at 2:36 PM Amit Kachhap wrote: Hi Bhupesh, On 1/13/20 5:44 PM, Bhupesh Sharma wrote: Hi James, On 01/11/2020 12:30 AM, Dave Anderson wrote: - Original Message - Hi Bhupesh, On 25/12/2019 19

Re: [PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-29 Thread Jay Vosburgh
Thomas Falcon wrote: >The following behavior has been observed when testing logical partition >migration of LACP-bonded VNIC devices in a PowerVM pseries environment. > >1. When performing the migration, the bond master detects that a slave has > lost its link, deactivates the LACP port, and se

Re: [RFC PATCH dpss_eth] Don't initialise ports with no PHY

2020-04-29 Thread Christian Zigotzky
Hi Andrew, You can find some dtb and source files in our kernel package. Download: http://www.xenosoft.de/linux-image-5.7-rc3-X1000_X5000.tar.gz Thanks, Christian > On 29. Apr 2020, at 15:13, Andrew Lunn wrote: > >  >> >> Maybe we have to modify the dtb file. > > Hi Christian > > Could yo

Re: [PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-29 Thread Thomas Falcon
On 4/29/20 1:38 PM, Jay Vosburgh wrote: Thomas Falcon wrote: The following behavior has been observed when testing logical partition migration of LACP-bonded VNIC devices in a PowerVM pseries environment. 1. When performing the migration, the bond master detects that a slave has lost its

[PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-29 Thread Thomas Falcon
The following behavior has been observed when testing logical partition migration of LACP-bonded VNIC devices in a PowerVM pseries environment. 1. When performing the migration, the bond master detects that a slave has lost its link, deactivates the LACP port, and sets the port's is_enabled

Re: [PATCH v1 1/3] mm/memory_hotplug: Prepare passing flags to add_memory() and friends

2020-04-29 Thread Wei Liu
On Wed, Apr 29, 2020 at 06:08:01PM +0200, David Hildenbrand wrote: > We soon want to pass flags - prepare for that. > > This patch is based on a similar patch by Oscar Salvador: > > https://lkml.kernel.org/r/20190625075227.15193-3-osalva...@suse.de > [...] > --- > drivers/hv/hv_balloon.c

[PATCH v2.5 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Mike Rapoport
On Wed, Apr 29, 2020 at 03:11:22PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions > rather that check each PFN") made early_pfn_in_nid() obsolete and since > CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub o

Re: [PATCH] ASoC: fsl_easrc: Check NULL pinter before dereference

2020-04-29 Thread Mark Brown
On Fri, 24 Apr 2020 20:30:04 +0800, Shengjiu Wang wrote: > The patch 955ac624058f: "ASoC: fsl_easrc: Add EASRC ASoC CPU DAI > drivers" from Apr 16, 2020, leads to the following Smatch complaint: > > sound/soc/fsl/fsl_easrc.c:1529 fsl_easrc_hw_free() > warn: variable dereferenced before check 'ctx'

[PATCH v1 3/3] virtio-mem: Add memory with MHP_DRIVER_MANAGED

2020-04-29 Thread David Hildenbrand
We don't want /sys/firmware/memmap entries and we want to indicate our memory as "System RAM (driver managed)" in /proc/iomem. This is especially relevant for kexec-tools, which have to be updated to support dumping virtio-mem memory after this patch. Expected behavior in kexec-tools: - Don't use t

[PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED

2020-04-29 Thread David Hildenbrand
Some paravirtualized devices that add memory via add_memory() and friends (esp. virtio-mem) don't want to create entries in /sys/firmware/memmap/ - primarily to hinder kexec from adding this memory to the boot memmap of the kexec kernel. In fact, such memory is never exposed via the firmware (e.g.

[PATCH v1 1/3] mm/memory_hotplug: Prepare passing flags to add_memory() and friends

2020-04-29 Thread David Hildenbrand
We soon want to pass flags - prepare for that. This patch is based on a similar patch by Oscar Salvador: https://lkml.kernel.org/r/20190625075227.15193-3-osalva...@suse.de Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Greg Kroah

[PATCH v1 0/3] mm/memory_hotplug: Make virtio-mem play nicely with kexec-tools

2020-04-29 Thread David Hildenbrand
This series is based on [1]: [PATCH v2 00/10] virtio-mem: paravirtualized memory That will hopefull get picked up soon, rebased to -next. The following patches were reverted from -next [2]: [PATCH 0/3] kexec/memory_hotplug: Prevent removal and accidental use As discussed in that th

Re: [RFC PATCH dpss_eth] Don't initialise ports with no PHY

2020-04-29 Thread Christian Zigotzky
> On 29. Apr 2020, at 17:22, Andrew Lunn wrote: > > On Wed, Apr 29, 2020 at 03:55:28PM +0200, Christian Zigotzky wrote: >> Hi Andrew, >> >> You can find some dtb and source files in our kernel package. >> >> Download: http://www.xenosoft.de/linux-image-5.7-rc3-X1000_X5000.tar.gz > > I have

Re: [RFC PATCH dpss_eth] Don't initialise ports with no PHY

2020-04-29 Thread Andrew Lunn
On Wed, Apr 29, 2020 at 03:55:28PM +0200, Christian Zigotzky wrote: > Hi Andrew, > > You can find some dtb and source files in our kernel package. > > Download: http://www.xenosoft.de/linux-image-5.7-rc3-X1000_X5000.tar.gz I have the tarball. Are we talking about linux-image-5.7-rc3-X1000_X5000/

Re: [PATCH 2/2] powerpc/spufs: stop using access_ok

2020-04-29 Thread Christophe Leroy
Le 29/04/2020 à 09:03, Jeremy Kerr a écrit : From: Christoph Hellwig Just use the proper non __-prefixed get/put_user variants where that is not done yet. But it means you are doing the access_ok() check everytime, which is what is to be avoided by doing the access_ok() once then using th

Re: [PATCH v8 0/7] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-04-29 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 28, 2020 at 12:02:42PM +0530, kajoljain escreveu: > Hi Arnaldo, > Please let me know if there any changes required in this patchset, > as some of its patches are still not part of your perf/core tree. Thanks, I checked and all seems ok, added Jiri's Acked-by, appreciated, thanks,

Re: [PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Mike Rapoport
On Wed, Apr 29, 2020 at 07:17:06AM -0700, Christoph Hellwig wrote: > On Wed, Apr 29, 2020 at 03:11:22PM +0300, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions > > rather that check each PFN") made early_pfn_in_nid() obs

Re: [PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Christoph Hellwig
On Wed, Apr 29, 2020 at 03:11:22PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions > rather that check each PFN") made early_pfn_in_nid() obsolete and since > CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub o

Re: [RFC PATCH v2 7/7] powerpc/selftest: reuse ppc-opcode macros to avoid redundancy

2020-04-29 Thread Naveen N. Rao
Michael Ellerman wrote: Balamuruhan S writes: Avoid redefining macros to encode ppc instructions instead reuse it from ppc-opcode.h, Makefile changes are necessary to compile memcmp_64.S with __ASSEMBLY__ defined from selftests. Signed-off-by: Balamuruhan S --- .../selftests/powerpc/stringlo

Re: [PATCH] ASoC: fsl_easrc: Check NULL pinter before dereference

2020-04-29 Thread Mark Brown
On Fri, Apr 24, 2020 at 08:30:04PM +0800, Shengjiu Wang wrote: > The patch 955ac624058f: "ASoC: fsl_easrc: Add EASRC ASoC CPU DAI > drivers" from Apr 16, 2020, leads to the following Smatch complaint: This doesn't apply against current code, please check and resend. signature.asc Description: PG

Re: [Skiboot] [PATCH v8 3/3] Self save API integration

2020-04-29 Thread Vaidyanathan Srinivasan
* Pratik Rajesh Sampat [2020-04-23 16:24:38]: > The commit makes the self save API available outside the firmware by defining > an OPAL wrapper. > This wrapper has a similar interface to that of self restore and expects the > cpu pir, SPR number, minus the value of that SPR to be passed in its >

Re: [PATCH v8 2/3] API to verify the STOP API and image compatibility

2020-04-29 Thread Vaidyanathan Srinivasan
* Pratik Rajesh Sampat [2020-04-23 16:24:37]: > From: Prem Shanker Jha > > Commit defines a new API primarily intended for OPAL to determine > cpu register save API's compatibility with HOMER layout and > self save restore. It can help OPAL determine if version of > API integrated with OPAL is

Re: [Skiboot] [PATCH v8 1/3] Self Save: Introducing Support for SPR Self Save

2020-04-29 Thread Vaidyanathan Srinivasan
* Pratik Rajesh Sampat [2020-04-23 16:24:36]: > From: Prem Shanker Jha > > The commit is a merger of commits that makes the following changes: > 1. Commit fixes some issues with code found during integration test > - replacement of addi with xor instruction during self save API. > - fixin

Re: [RFC PATCH dpss_eth] Don't initialise ports with no PHY

2020-04-29 Thread Andrew Lunn
> Maybe we have to modify the dtb file. Hi Christian Could you point me at the DT file. Thanks Andrew

Re: [PATCH] fixup! signal: factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-29 Thread Arnd Bergmann
On Wed, Apr 29, 2020 at 1:53 PM Christoph Hellwig wrote: > > I did another pass at this, reducing the overhead of the x32 magic > in common code down to renaming copy_siginfo_to_user32 to > copy_siginfo_to_user32 and having a conditional #define to give it > the old name back: Nice! I guess this

Re: [PATCH v4 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters

2020-04-29 Thread Vitaly Kuznetsov
Tianjia Zhang writes: > In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' > structure. For historical reasons, many kvm-related function parameters > retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This > patch does a unified cleanup of these remaining red

Re: [PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-04-29 Thread Vitaly Kuznetsov
Tianjia Zhang writes: > The 'kvm_run' field already exists in the 'vcpu' structure, which > is the same structure as the 'kvm_run' in the 'vcpu_arch' and > should be deleted. > > Signed-off-by: Tianjia Zhang > --- > arch/powerpc/include/asm/kvm_host.h | 1 - > arch/powerpc/kvm/book3s_hv.c

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

2020-04-29 Thread Michal Hocko
On Wed 29-04-20 07:11:45, Srikar Dronamraju wrote: > > > > > > By marking, N_ONLINE as NODE_MASK_NONE, lets stop assuming that Node 0 is > > > always online. > > > > > > ... > > > > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -116,8 +116,10 @@ EXPORT_SYMBOL(latent_entropy); > >

[PATCH v2 20/20] docs/vm: update memory-models documentation

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport to reflect the updates to free_area_init() family of functions. Signed-off-by: Mike Rapoport --- Documentation/vm/memory-model.rst | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/vm/memory-model.rst b/Documentation/vm/memory-model

[PATCH v2 19/20] mm: simplify find_min_pfn_with_active_regions()

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The find_min_pfn_with_active_regions() calls find_min_pfn_for_node() with nid parameter set to MAX_NUMNODES. This makes the find_min_pfn_for_node() traverse all memblock memory regions although the first PFN in the system can be easily found with memblock_start_of_DRAM(). Use

[PATCH v2 18/20] mm: clean up free_area_init_node() and its helpers

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init_node() now always uses memblock info and the zone PFN limits so it does not need the backwards compatibility functions to calculate the zone spanned and absent pages. The removal of the compat_ versions of zone_{abscent,spanned}_pages_in_node() in turn, make

[PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport Some architectures (e.g. ARC) have the ZONE_HIGHMEM zone below the ZONE_NORMAL. Allowing free_area_init() parse max_zone_pfn array even it is sorted in descending order allows using free_area_init() on such architectures. Add top -> down traversal of max_zone_pfn array in fre

Re: New powerpc vdso calling convention

2020-04-29 Thread Adhemerval Zanella
On 28/04/2020 23:39, Nicholas Piggin wrote: > Excerpts from Adhemerval Zanella's message of April 27, 2020 11:09 pm: >> >> >> On 26/04/2020 00:41, Nicholas Piggin wrote: >>> Excerpts from Rich Felker's message of April 26, 2020 9:11 am: On Sun, Apr 26, 2020 at 08:58:19AM +1000, Nicholas Pig

[PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") made early_pfn_in_nid() obsolete and since CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub or a real implementation of early_pfn_in_nid() it is also not needed anymo

[PATCH v2 15/20] mm: memmap_init: iterate over memblock regions rather that check each PFN

2020-04-29 Thread Mike Rapoport
From: Baoquan He When called during boot the memmap_init_zone() function checks if each PFN is valid and actually belongs to the node being initialized using early_pfn_valid() and early_pfn_in_nid(). Each such check may cost up to O(log(n)) where n is the number of memory banks, so for large amo

[PATCH v2 14/20] xtensa: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 13/20] unicore32: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 12/20] sparc32: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 11/20] parisc: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 10/20] m68k: mm: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 09/20] csky: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 08/20] arm64: simplify detection of memory zone boundaries for UMA configs

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 07/20] arm: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 06/20] alpha: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 05/20] mm: use free_area_init() instead of free_area_init_nodes()

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() has effectively became a wrapper for free_area_init_nodes() and there is no point of keeping it. Still free_area_init() name is shorter and more general as it does not imply necessity to initialize multiple nodes. Rename free_area_init_nodes() to free_are

[PATCH v2 04/20] mm: free_area_init: use maximal zone PFNs rather than zone sizes

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport Currently, architectures that use free_area_init() to initialize memory map and node and zone structures need to calculate zone and hole sizes. We can use free_area_init_nodes() instead and let it detect the zone boundaries while the architectures will only have to supply the

[PATCH v2 03/20] mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The CONFIG_HAVE_MEMBLOCK_NODE_MAP is used to differentiate initialization of nodes and zones structures between the systems that have region to node mapping in memblock and those that don't. Currently all the NUMA architectures enable this option and for the non-NUMA systems

[PATCH v2 02/20] mm: make early_pfn_to_nid() and related defintions close to each other

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The early_pfn_to_nid() and it's helper __early_pfn_to_nid() are spread around include/linux/mm.h, include/linux/mmzone.h and mm/page_alloc.c. Drop unused stub for __early_pfn_to_nid() and move its actual generic implementation close to its users. Signed-off-by: Mike Rapoport

[PATCH v2 01/20] mm: memblock: replace dereferences of memblock_region.nid with API calls

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport There are several places in the code that directly dereference memblock_region.nid despite this field being defined only when CONFIG_HAVE_MEMBLOCK_NODE_MAP=y. Replace these with calls to memblock_get_region_nid() to improve code robustness and to avoid possible breakage when

[PATCH v2 00/20] mm: rework free_area_init*() funcitons

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport Hi, After the discussion [1] about removal of CONFIG_NODES_SPAN_OTHER_NODES and CONFIG_HAVE_MEMBLOCK_NODE_MAP options, I took it a bit further and updated the node/zone initialization. Since all architectures have memblock, it is possible to use only the newer version of fr

Re: [PATCH v4 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-04-29 Thread Vitaly Kuznetsov
Tianjia Zhang writes: > In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' > structure. For historical reasons, many kvm-related function parameters > retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This > patch does a unified cleanup of these remaining red

Re: [PATCH v4 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-29 Thread Vitaly Kuznetsov
Tianjia Zhang writes: > In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' > structure. For historical reasons, many kvm-related function parameters > retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This > patch does a unified cleanup of these remaining red

Re: [PATCH] fixup! signal: factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-29 Thread Christoph Hellwig
I did another pass at this, reducing the overhead of the x32 magic in common code down to renaming copy_siginfo_to_user32 to copy_siginfo_to_user32 and having a conditional #define to give it the old name back: --- >From 45e5263d7c24d854bb446b7e69dc53729ed842bc Mon Sep 17 00:00:00 2001 From: Chris

Re: [PATCH] powerpc/spufs: Add rcu_read_lock() around fcheck()

2020-04-29 Thread Michael Ellerman
Christoph Hellwig writes: > On Tue, Apr 28, 2020 at 09:48:11PM +1000, Michael Ellerman wrote: >> >> This comes from fcheck_files() via fcheck(). >> >> It's pretty clearly documented that fcheck() must be wrapped with >> rcu_read_lock(), so fix it. > > But for this to actually be useful you'd nee

Re: [PATCH v7 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-04-29 Thread Michael Ellerman
Kajol Jain writes: > Function 'read_sys_info_pseries()' is added to get system parameter > values like number of sockets and chips per socket. > and it gets these details via rtas_call with token > "PROCESSOR_MODULE_INFO". > > Incase lpar migrate from one system to another, system > parameter deta

Re: [PATCH v7 3/5] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-04-29 Thread Michael Ellerman
Michael Ellerman writes: > Kajol Jain writes: >> To expose the system dependent parameter like total number of >> sockets and numbers of chips per socket, patch adds two sysfs files. >> "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ >> of the "hv_24x7" pmu. >> >> Signed-off-by

Re: [PATCH v7 3/5] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-04-29 Thread Michael Ellerman
Kajol Jain writes: > To expose the system dependent parameter like total number of > sockets and numbers of chips per socket, patch adds two sysfs files. > "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ > of the "hv_24x7" pmu. > > Signed-off-by: Kajol Jain > --- > arch/powerp

Re: [PATCH v7 2/5] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-04-29 Thread Michael Ellerman
Hi Kajol, Some comments inline ... Kajol Jain writes: > For hv_24x7 socket/chip level events, specific chip-id to which > the data requested should be added as part of pmu events. > But number of chips/socket in the system details are not exposed. > > Patch implements read_sys_info_pseries() to

Re: [PATCH] fixup! signal: factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-29 Thread Arnd Bergmann
On Wed, Apr 29, 2020 at 11:42 AM Christoph Hellwig wrote: > > On Wed, Apr 29, 2020 at 10:07:11AM +0200, Arnd Bergmann wrote: > > > What do you think of this version? This one always overrides > > > copy_siginfo_to_user32 for the x86 compat case to keep the churn down, > > > and improves the copy_

[PATCH] powerpc/ps3: Move static keyword to the front of declaration

2020-04-29 Thread Xiongfeng Wang
Move the static keyword to the front of declaration of 'vuart_bus_priv', and resolve the following compiler warning that can be seen when building with warnings enabled (W=1): drivers/ps3/ps3-vuart.c:867:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] } static v

[PATCH 0/3] powerpc/xive: PCI hotplug fixes under PowerVM

2020-04-29 Thread Cédric Le Goater
Hello, Here are a couple of fixes for PCI hotplug issues for machines running under the POWER hypervisor using hash MMU and the XIVE interrupt mode. Commit 1ca3dec2b2df ("powerpc/xive: Prevent page fault issues in the machine crash handler") forced the mapping of the XIVE ESB page and this is now

Re: [PATCH] powerpc/ps3: Move static keyword to the front of declaration

2020-04-29 Thread Geert Uytterhoeven
On Wed, Apr 29, 2020 at 12:07 PM Xiongfeng Wang wrote: > Move the static keyword to the front of declaration of 'vuart_bus_priv', > and resolve the following compiler warning that can be seen when > building with warnings enabled (W=1): > > drivers/ps3/ps3-vuart.c:867:1: warning: ‘static’ is not a

Re: [RFC PATCH v2 7/7] powerpc/selftest: reuse ppc-opcode macros to avoid redundancy

2020-04-29 Thread Michael Ellerman
Balamuruhan S writes: > Avoid redefining macros to encode ppc instructions instead reuse it from > ppc-opcode.h, Makefile changes are necessary to compile memcmp_64.S with > __ASSEMBLY__ defined from selftests. > > Signed-off-by: Balamuruhan S > --- > .../selftests/powerpc/stringloops/Makefile

Re: [PATCH] fixup! signal: factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-29 Thread Christoph Hellwig
On Wed, Apr 29, 2020 at 10:07:11AM +0200, Arnd Bergmann wrote: > > What do you think of this version? This one always overrides > > copy_siginfo_to_user32 for the x86 compat case to keep the churn down, > > and improves the copy_siginfo_to_external32 documentation a bit. > > Looks good to me. I p

Re: [PATCH v7 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-04-29 Thread Madhavan Srinivasan
On 3/27/20 12:06 PM, Kajol Jain wrote: Function 'read_sys_info_pseries()' is added to get system parameter values like number of sockets and chips per socket. and it gets these details via rtas_call with token "PROCESSOR_MODULE_INFO". Incase lpar migrate from one system to another, system par

Re: [PATCH v7 3/5] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-04-29 Thread Madhavan Srinivasan
On 3/27/20 12:06 PM, Kajol Jain wrote: To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- a

Re: [PATCH v7 1/5] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-04-29 Thread Madhavan Srinivasan
On 3/27/20 12:06 PM, Kajol Jain wrote: Commit 2b206ee6b0df ("powerpc/perf/hv-24x7: Display change in counter values")' added to print _change_ in the counter value rather then raw value for 24x7 counters. Incase of transactions, the event count is set to 0 at the beginning of the transaction.

Re: [RFC PATCH dpss_eth] Don't initialise ports with no PHY

2020-04-29 Thread Christian Zigotzky
Hi Darren, Thanks a lot for your patch! I tested it with the RC3 today. Unfortunately it doesn't compile because a bracket is missing in the following line: +    if (prop && !strncmp(prop, "disabled", 8) { And a semicolon is missing in the following line: +        goto _return I added the

Re: [PATCH v6 0/4] powerpc/papr_scm: Add support for reporting nvdimm health

2020-04-29 Thread Aneesh Kumar K.V
Vaibhav Jain writes: > The PAPR standard[1][3] provides mechanisms to query the health and > performance stats of an NVDIMM via various hcalls as described in > Ref[2]. Until now these stats were never available nor exposed to the > user-space tools like 'ndctl'. This is partly due to PAPR platf

[PATCH 3/3] powerpc/xive: Do not expose a debugfs file when XIVE is disabled

2020-04-29 Thread Cédric Le Goater
The XIVE interrupt mode can be disabled with the "xive=off" kernel parameter, in which case there is nothing to present to the user in the associated /sys/kernel/debug/powerpc/xive file. Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state") Signed-off-by: Cédric Le

  1   2   >