[PATCH -next] soc: fsl: dpio: remove set but not used variable 'addr_cena'

2020-02-21 Thread YueHaibing
commit 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue") introduced this, but not used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/soc/fsl/dpio/qbman-portal.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/soc/fsl/dp

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

2020-02-21 Thread Amit Kachhap
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:01, Bhupesh Sharma wrote: On 12/12/2019 04:02 PM, James Morse wrote: On 29/11/2019 19:59, Bhupesh Sharma wrote: vabits_ac

[GIT PULL] Please pull powerpc/linux.git powerpc-5.6-3 tag

2020-02-21 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.6. This is two weeks worth as I was out sick last week. The following changes since commit 11a48a5a18c63fd7621bb050228cebf13566e4d8: Linux 5.6-rc2 (2020-02-16 13:16:59 -0800) are available in

Re: [PATCH v2 1/5] powerpc: Move idle_loop_prolog()/epilog() functions to header file

2020-02-21 Thread Nathan Lynch
"Gautham R. Shenoy" writes: > From: "Gautham R. Shenoy" > > Currently prior to entering an idle state on a Linux Guest, the > pseries cpuidle driver implement an idle_loop_prolog() and > idle_loop_epilog() functions which ensure that idle_purr is correctly > computed, and the hypervisor is infor

[powerpc:merge] BUILD SUCCESS 65b2623f395a4e25ab3ff4cff1c9c7623619a22d

2020-02-21 Thread kbuild test robot
andconfig-a003-20200220 x86_64 randconfig-a001-20200221 x86_64 randconfig-a002-20200221 x86_64 randconfig-a003-20200221 i386 randconfig-a001-20200221 i386 randconfig-a002-20200221 i386 randconfig-a003-20200221 a

[powerpc:next-test] BUILD SUCCESS 7f08c318df48fbcfc16a1cfbfad6818542510d57

2020-02-21 Thread kbuild test robot
x86_64 randconfig-a002-20200220 x86_64 randconfig-a003-20200220 i386 randconfig-a001-20200220 i386 randconfig-a002-20200220 i386 randconfig-a003-20200220 x86_64 randconfig-a001-20200221 x86_64

Re: [PATCH v3 00/27] Add support for OpenCAPI Persistent Memory devices

2020-02-21 Thread Dan Williams
On Thu, Feb 20, 2020 at 7:28 PM Alastair D'Silva wrote: > > From: Alastair D'Silva > > This series adds support for OpenCAPI Persistent Memory devices, exposing > them as nvdimms so that we can make use of the existing infrastructure. A single sentence to introduce: 24 files changed, 3029 inser

Re: [PATCH v3 00/27] Add support for OpenCAPI Persistent Memory devices

2020-02-21 Thread Dan Williams
On Fri, Feb 21, 2020 at 8:21 AM Dan Williams wrote: > > On Thu, Feb 20, 2020 at 7:28 PM Alastair D'Silva wrote: > > > > From: Alastair D'Silva > > > > This series adds support for OpenCAPI Persistent Memory devices, exposing > > them as nvdimms so that we can make use of the existing infrastruct

[PATCH v3] KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones

2020-02-21 Thread Gustavo Romero
On P9 DD2.2 due to a CPU defect some TM instructions need to be emulated by KVM. This is handled at first by the hardware raising a softpatch interrupt when certain TM instructions that need KVM assistance are executed in the guest. Althought some TM instructions per Power ISA are invalid forms the

Re: [PATCH v2 3/5] powerpc/pseries: Account for SPURR ticks on idle CPUs

2020-02-21 Thread Nathan Lynch
"Gautham R. Shenoy" writes: > +static inline void snapshot_spurr_idle_entry(void) > +{ > + *this_cpu_ptr(&idle_entry_spurr_snap) = mfspr(SPRN_SPURR); > +} > + [...] > +static inline void update_idle_spurr_accounting(void) > +{ > + u64 *idle_spurr_cycles_ptr = this_cpu_ptr(&idle_spurr_cyc

Re: [PATCH v2 4/5] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU

2020-02-21 Thread Nathan Lynch
"Gautham R. Shenoy" writes: > diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c > index 80a676d..5b4b450 100644 > --- a/arch/powerpc/kernel/sysfs.c > +++ b/arch/powerpc/kernel/sysfs.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > #include > > #

Re: [PATCH v2 5/5] Documentation: Document sysfs interfaces purr, spurr, idle_purr, idle_spurr

2020-02-21 Thread Nathan Lynch
"Gautham R. Shenoy" writes: > diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu > b/Documentation/ABI/testing/sysfs-devices-system-cpu > index 2e0e3b4..799dc737a 100644 > --- a/Documentation/ABI/testing/sysfs-devices-system-cpu > +++ b/Documentation/ABI/testing/sysfs-devices-system-

[PATCH v2 1/2] powerpc/drmem: accelerate memory_add_physaddr_to_nid() with LMB xarray

2020-02-21 Thread Scott Cheloha
On PowerPC, memory_add_physaddr_to_nid() uses a linear search to find an LMB matching the given address. This scales very poorly when there are many LMBs. The poor scaling cripples drmem_init() during boot: lmb_set_nid(), which calls memory_add_physaddr_to_nid(), is called for each LMB. If we in

pseries: accelerate drmem and simplify hotplug with xarrays

2020-02-21 Thread Scott Cheloha
This patch series introduces two xarrays of LMBs in an effort to speed up the drmem code and simplify the hotplug code on pseries machines. The first patch introduces an xarray of LMBs indexed by physical address. xa_load() is then used to accelerate LMB lookup during memory_add_physaddr_to_nid()

[PATCH v2 2/2] pseries/hotplug-memory: leverage xarray API to simplify code

2020-02-21 Thread Scott Cheloha
The xarray API has entry marking (xa_set_mark/xa_clear_mark) and a range-based iterator (xa_for_each_range), so there is no need for the pseries hotplug code to maintain its own implementation of these features. This patch introduces an xarray of drmem_lmb structures indexed by each LMB's DRC inde

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-21 Thread Nathan Lynch
Hi Scott, I've owed you a follow-up on this for a couple weeks, sorry. Beyond the issue of whether to remove the drmem_info->lmbs array, there are some other things to address. Scott Cheloha writes: > diff --git a/arch/powerpc/include/asm/drmem.h > b/arch/powerpc/include/asm/drmem.h > index 3d7

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-21 Thread Nathan Lynch
Nathan Lynch writes: > Hi Scott, I've owed you a follow-up on this for a couple weeks, sorry. I see v2 was posted as I was writing this, so I'll follow up on that thread.

[PATCH v3 7/7] mm/memremap: Set caching mode for PCI P2PDMA memory to WC

2020-02-21 Thread Logan Gunthorpe
PCI BAR IO memory should never be mapped as WB, however prior to this the PAT bits were set WB and it was typically overridden by MTRR registers set by the firmware. Set PCI P2PDMA memory to be WC (writecombining) as the only current user (the NVMe CMB) was originally mapped WC before the P2PDMA c

[PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-21 Thread Logan Gunthorpe
Hi, This is v3 of the patchset which cleans up a number of minor issues from the feedback of v2 and rebases onto v5.6-rc2. Additional feedback is welcome. Thanks, Logan -- Changes in v3: * Rebased onto v5.6-rc2 * Rename mhp_modifiers to mhp_params per David with an updated kernel doc per

[PATCH v3 6/7] mm/memory_hotplug: Add pgprot_t to mhp_params

2020-02-21 Thread Logan Gunthorpe
devm_memremap_pages() is currently used by the PCI P2PDMA code to create struct page mappings for IO memory. At present, these mappings are created with PAGE_KERNEL which implies setting the PAT bits to be WB. However, on x86, an mtrr register will typically override this and force the cache type t

[PATCH v3 2/7] mm/memory_hotplug: Rename mhp_restrictions to mhp_params

2020-02-21 Thread Logan Gunthorpe
The mhp_restrictions struct really doesn't specify anything resembling a restriction anymore so rename it to be mhp_params as it is a list of extended parameters. Signed-off-by: Logan Gunthorpe --- arch/arm64/mm/mmu.c| 4 ++-- arch/ia64/mm/init.c| 4 ++-- arch/powerpc/m

[PATCH v3 4/7] x86/mm: Introduce _set_memory_prot()

2020-02-21 Thread Logan Gunthorpe
For use in the 32bit arch_add_memory() to set the pgprot type of the memory to add. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Signed-off-by: Logan Gunthorpe --- arch/x86/include/a

[PATCH v3 3/7] x86/mm: Thread pgprot_t through init_memory_mapping()

2020-02-21 Thread Logan Gunthorpe
In prepartion to support a pgprot_t argument for arch_add_memory(). It's required to move the prototype of init_memory_mapping() seeing the original location came before the definition of pgprot_t. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x...@kernel.or

[PATCH v3 5/7] powerpc/mm: Thread pgprot_t through create_section_mapping()

2020-02-21 Thread Logan Gunthorpe
In prepartion to support a pgprot_t argument for arch_add_memory(). Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Logan Gunthorpe --- arch/powerpc/include/asm/book3s/64/hash.h | 3 ++- arch/powerpc/include/asm/book3s/64/radix.h | 3 ++- arch/powerpc/incl

[PATCH v3 1/7] mm/memory_hotplug: Drop the flags field from struct mhp_restrictions

2020-02-21 Thread Logan Gunthorpe
This variable is not used anywhere and should therefore be removed from the structure. Signed-off-by: Logan Gunthorpe Reviewed-by: David Hildenbrand --- include/linux/memory_hotplug.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotp

Re: [PATCH v2 1/2] powerpc/drmem: accelerate memory_add_physaddr_to_nid() with LMB xarray

2020-02-21 Thread Nathan Lynch
Hi Scott, Scott Cheloha writes: > On PowerPC, memory_add_physaddr_to_nid() uses a linear search to find > an LMB matching the given address. This scales very poorly when there > are many LMBs. The poor scaling cripples drmem_init() during boot: > lmb_set_nid(), which calls memory_add_physaddr_t

Re: [PATCH v2 2/2] pseries/hotplug-memory: leverage xarray API to simplify code

2020-02-21 Thread Nathan Lynch
Hi Scott, Scott Cheloha writes: > -#define for_each_drmem_lmb_in_range(lmb, start, end) \ > - for ((lmb) = (start); (lmb) <= (end); (lmb)++) > - > -#define for_each_drmem_lmb(lmb) \ > - for_each_drmem_lmb_in_range((lmb), \

[PATCH][next] soc: fsl: dpio: fix dereference of pointer p before null check

2020-02-21 Thread Colin King
From: Colin Ian King Pointer p is currently being dereferenced before it is null checked on a memory allocation failure check. Fix this by checking if p is null before dereferencing it. Addresses-Coverity: ("Dereference before null check") Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array

RE: [PATCH][next] soc: fsl: dpio: fix dereference of pointer p before null check

2020-02-21 Thread Leo Li
> -Original Message- > From: Colin King > Sent: Friday, February 21, 2020 5:12 PM > To: Roy Pledge ; Leo Li ; Youri > Querry ; linuxppc-dev@lists.ozlabs.org; linux- > arm-ker...@lists.infradead.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: [PATCH][nex

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.6-3 tag

2020-02-21 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Feb 2020 22:42:15 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.6-3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/2865936259e27629fac422bc80c9b55ca1f108a5 Thank you! -- Deet-doot-do

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-21 Thread Christopher Lameter
On Tue, 18 Feb 2020, Michal Hocko wrote: > Anyway, I do not think it is expected that kmalloc_node just blows up > on those nodes. The page allocator simply falls back to the closest > node. Something for kmalloc maintainers I believe. That is the case for an unconstrained allocation. kmalloc_nod