[PATCH 2/2] powerpc/mm: Increase MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config

2018-06-21 Thread Aneesh Kumar K.V
We do this only with VMEMMAP config so that our page_to_[nid/section] etc are not impacted. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/sparsemem.h | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/sparsemem.h

[RESEND PATCH 1/3] powerpc: dts: use 'atmel' as at24 anufacturer for pdm360ng

2018-06-21 Thread Bartosz Golaszewski
Using 'at' as the part of the compatible string is now deprecated. Use a correct string: 'atmel,'. Signed-off-by: Bartosz Golaszewski --- arch/powerpc/boot/dts/pdm360ng.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/dts/pdm360ng.dts

[RESEND PATCH 2/3] powerpc: dts: use 'atmel' as at24 manufacturer for kmcent2

2018-06-21 Thread Bartosz Golaszewski
Using compatible strings without the part for at24 is now deprecated. Use a correct 'atmel,' value. Signed-off-by: Bartosz Golaszewski --- arch/powerpc/boot/dts/fsl/kmcent2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/dts/fsl/kmcent2.dts

[RESEND PATCH 3/3] powerpc: dts: use a correct at24 compatible fallback in ac14xx

2018-06-21 Thread Bartosz Golaszewski
Using 'at24' as fallback is now deprecated - use the full 'atmel,' string. Signed-off-by: Bartosz Golaszewski --- arch/powerpc/boot/dts/ac14xx.dts | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/boot/dts/ac14xx.dts

[PATCH 1/2] powerpc/mm: Check memblock_add against MAX_PHYSMEM_BITS range

2018-06-21 Thread Aneesh Kumar K.V
With SPARSEMEM config enabled, we make sure that we don't add sections beyond MAX_PHYSMEM_BITS range. This results in not building vmemmap mapping for range beyond max range. But our memblock layer looks the device tree and create mapping for the full memory range. Prevent this by checking against

Re: [PATCH kernel v2 6/6] powerpc/powernv/ioda: Allocate indirect TCE levels on demand

2018-06-21 Thread Alexey Kardashevskiy
On Thu, 21 Jun 2018 12:03:21 +1000 David Gibson wrote: > On Sun, Jun 17, 2018 at 09:14:28PM +1000, Alexey Kardashevskiy wrote: > > At the moment we allocate the entire TCE table, twice (hardware part and > > userspace translation cache). This normally works as we normally have > > contigous

[4.18.0-rc1][i40e][9b10df59] WARNING: CPU: 32 PID: 95246 at drivers/net/ethernet/intel/i40e/i40e_ethtool.c:1907 i40e_update_ethtool_fdir_entry.isra.12+0x2264/0x2270

2018-06-21 Thread Abdul Haleem
Greeting's WARN_ONCE is triggered when interface is toggled when running 'ethtool -S' command on a powerpc machine running today's mainline kernel related commit looks to be: commit 9b10df596bd4d38f2a58cf87e0780510acc53d8d Author: Jacob Keller Date: Thu May 17 01:08:36 2018 -0700

Re: [PATCH 0/7 v5] Support for fsl-mc bus and its devices in SMMU

2018-06-21 Thread Will Deacon
Hi Nipun, On Thu, Jun 21, 2018 at 03:59:27AM +, Nipun Gupta wrote: > Will this patch-set be taken for the next kernel release (and via which > tree)? I think you need Acks from Robin and Joerg in order for this to be queued. Robin should be back at the beginning of next month, so there's

[PATCH kernel v2 REPOST] powerpc/powernv/ioda: Allocate indirect TCE levels on demand

2018-06-21 Thread Alexey Kardashevskiy
At the moment we allocate the entire TCE table, twice (hardware part and userspace translation cache). This normally works as we normally have contigous memory and the guest will map entire RAM for 64bit DMA. However if we have sparse RAM (one example is a memory device), then we will allocate

Re: [PATCH v2 0/6] powerpc/pkeys: fixes to pkeys

2018-06-21 Thread Michael Ellerman
Florian Weimer writes: > On 06/19/2018 02:40 PM, Michael Ellerman wrote: >>> I tested the whole series with the new selftests, with the printamr.c >>> program I posted earlier, and the glibc test for pkey_alloc The >>> latter required some test fixes, but now passes as well. As far as I >>>

Re: [PATCH v3] powerpc/32: Remove left over function prototypes

2018-06-21 Thread Michael Ellerman
Mathieu Malaterre writes: > In commit 4aea909eeba3 ("powerpc: Add missing prototypes in setup_32.c") I don't have that commit ^ ? That might be because I squashed some of your fixes together or something? > diff --git a/arch/powerpc/kernel/setup.h b/arch/powerpc/kernel/setup.h > index

Re: [PATCH 2/2] powerpc/mm: Increase MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config

2018-06-21 Thread Balbir Singh
On Thu, Jun 21, 2018 at 6:31 PM, Aneesh Kumar K.V wrote: > > We do this only with VMEMMAP config so that our page_to_[nid/section] etc are > not > impacted. > > Signed-off-by: Aneesh Kumar K.V Why 128TB, given that it's sparse_vmemmap_extreme by default, why not 1PB directly (50 bits)? Balbir

Re: [PATCH v2 2/6] powerpc/pkeys: Save the pkey registers before fork

2018-06-21 Thread Ram Pai
On Thu, Jun 21, 2018 at 02:13:40PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > > On Tue, Jun 19, 2018 at 10:39:56PM +1000, Michael Ellerman wrote: > >> Ram Pai writes: > >> > >> > When a thread forks the contents of AMR, IAMR, UAMOR registers in the > >> > newly forked thread are not

Re: [PATCH 2/2] powerpc/mm: Increase MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config

2018-06-21 Thread Aneesh Kumar K.V
On 06/21/2018 05:02 PM, Balbir Singh wrote: On Thu, Jun 21, 2018 at 6:31 PM, Aneesh Kumar K.V wrote: We do this only with VMEMMAP config so that our page_to_[nid/section] etc are not impacted. Signed-off-by: Aneesh Kumar K.V Why 128TB, given that it's sparse_vmemmap_extreme by default,

Re: [PATCH v2 1/6] powerpc/pkeys: Enable all user-allocatable pkeys at init.

2018-06-21 Thread Ram Pai
On Thu, Jun 21, 2018 at 02:14:53PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > On Tue, Jun 19, 2018 at 10:39:52PM +1000, Michael Ellerman wrote: > >> Ram Pai writes: > >> > >> > In a multithreaded application, a key allocated by one thread must > >> > be activate and usable on all

Re: [PATCH 2/2] powerpc/mm: Increase MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config

2018-06-21 Thread Aneesh Kumar K.V
On 06/21/2018 05:02 PM, Balbir Singh wrote: On Thu, Jun 21, 2018 at 6:31 PM, Aneesh Kumar K.V wrote: We do this only with VMEMMAP config so that our page_to_[nid/section] etc are not impacted. Signed-off-by: Aneesh Kumar K.V Why 128TB, given that it's sparse_vmemmap_extreme by default,

[PATCH 13/26] ppc: Convert mmu context allocation to new IDA API

2018-06-21 Thread Matthew Wilcox
ida_alloc_range is the perfect fit for this use case. Eliminates a custom spinlock, a call to ida_pre_get and a local check for the allocated ID exceeding a maximum. Signed-off-by: Matthew Wilcox --- arch/powerpc/mm/mmu_context_book3s64.c | 44 +++--- 1 file changed, 4

Re: [PATCH v2 0/6] powerpc/pkeys: fixes to pkeys

2018-06-21 Thread Ram Pai
On Thu, Jun 21, 2018 at 08:28:47PM +1000, Michael Ellerman wrote: > Florian Weimer writes: > > > On 06/19/2018 02:40 PM, Michael Ellerman wrote: > >>> I tested the whole series with the new selftests, with the printamr.c > >>> program I posted earlier, and the glibc test for pkey_alloc The >

Re: [PATCH v04 9/9] hotplug/pmt: Update topology after PMT

2018-06-21 Thread Michael Bringmann
p improve the system] > > url: > https://github.com/0day-ci/linux/commits/Michael-Bringmann/powerpc-hotplug-Update-affinity-for-migrated-CPUs/20180621-085543 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: powerpc-defconfig (attached as

[PATCH 15/26] ppc: Convert vas ID allocation to new IDA API

2018-06-21 Thread Matthew Wilcox
Removes a custom spinlock and simplifies the code. Signed-off-by: Matthew Wilcox --- arch/powerpc/platforms/powernv/vas-window.c | 26 - 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c

Re: [PATCH v04 9/9] hotplug/pmt: Update topology after PMT

2018-06-21 Thread Michael Bringmann
p improve the system] > > url: > https://github.com/0day-ci/linux/commits/Michael-Bringmann/powerpc-hotplug-Update-affinity-for-migrated-CPUs/20180621-085543 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: powerpc-defconfig (attached as

Re: [PATCH kernel] KVM: PPC: Fix hardware and emulated TCE tables matching

2018-06-21 Thread David Gibson
On Wed, Jun 20, 2018 at 06:42:58PM +1000, Alexey Kardashevskiy wrote: > When attaching a hardware table to LIOBN in KVM, we match table parameters > such as page size, table offset and table size. However the tables are > created via very different paths - VFIO and KVM - and the VFIO path goes >

Re: [PATCH v2] powerpc/numa: Correct kernel message severity

2018-06-21 Thread Michael Ellerman
Vipin K Parashar writes: > printk() in unmap_cpu_from_node() uses KERN_ERR message severity, > for a WARNING message. Change it to pr_warn(). > > Signed-off-by: Vipin K Parashar > --- > arch/powerpc/mm/numa.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git

Re: [PATCH 13/26] ppc: Convert mmu context allocation to new IDA API

2018-06-21 Thread Nicholas Piggin
On Thu, 21 Jun 2018 14:28:22 -0700 Matthew Wilcox wrote: > ida_alloc_range is the perfect fit for this use case. Eliminates > a custom spinlock, a call to ida_pre_get and a local check for the > allocated ID exceeding a maximum. > > Signed-off-by: Matthew Wilcox > --- >

Re: [PATCH kernel v2 REPOST] powerpc/powernv/ioda: Allocate indirect TCE levels on demand

2018-06-21 Thread David Gibson
On Thu, Jun 21, 2018 at 07:36:27PM +1000, Alexey Kardashevskiy wrote: > At the moment we allocate the entire TCE table, twice (hardware part and > userspace translation cache). This normally works as we normally have > contigous memory and the guest will map entire RAM for 64bit DMA. > > However

Re: [PATCH] selftests/powerpc: Fix strncpy usage

2018-06-21 Thread Segher Boessenkool
On Wed, Jun 20, 2018 at 07:51:11PM -0300, Breno Leitao wrote: > - strncpy(prog, argv[0], strlen(argv[0])); > + strncpy(prog, argv[0], sizeof(prog) - 1); strncpy(prog, argv[0], sizeof prog); if (prog[sizeof prog - 1]) scream_bloody_murder(); Silently using

Re: [PATCH 13/26] ppc: Convert mmu context allocation to new IDA API

2018-06-21 Thread Aneesh Kumar K.V
Matthew Wilcox writes: > this situation from occurring (like, oh i don't know, this function only > being called on process exit, so implicitly only called once per context). > That is correct.

Re: [PATCH 2/3] migration/memory: Evaluate LMB assoc changes

2018-06-21 Thread kbuild test robot
Hi Michael, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.18-rc1 next-20180621] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH 13/26] ppc: Convert mmu context allocation to new IDA API

2018-06-21 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > On Thu, 21 Jun 2018 14:28:22 -0700 > Matthew Wilcox wrote: > >> ida_alloc_range is the perfect fit for this use case. Eliminates >> a custom spinlock, a call to ida_pre_get and a local check for the >> allocated ID exceeding a maximum. >> >> Signed-off-by: Matthew

Re: [PATCH 13/26] ppc: Convert mmu context allocation to new IDA API

2018-06-21 Thread Matthew Wilcox
On Fri, Jun 22, 2018 at 12:15:11PM +1000, Nicholas Piggin wrote: > On Thu, 21 Jun 2018 14:28:22 -0700 > Matthew Wilcox wrote: > > static int alloc_context_id(int min_id, int max_id) ... > > - spin_lock(_context_lock); > > - err = ida_get_new_above(_context_ida, min_id, ); > > -

Re: [PATCH 13/26] ppc: Convert mmu context allocation to new IDA API

2018-06-21 Thread Nicholas Piggin
On Thu, 21 Jun 2018 21:38:15 -0700 Matthew Wilcox wrote: > On Fri, Jun 22, 2018 at 12:15:11PM +1000, Nicholas Piggin wrote: > > On Thu, 21 Jun 2018 14:28:22 -0700 > > Matthew Wilcox wrote: > > > static int alloc_context_id(int min_id, int max_id) > ... > > > - spin_lock(_context_lock); > >

Re: [PATCH 2/3] [v2] m68k: mac: use time64_t in RTC handling

2018-06-21 Thread Finn Thain
On Tue, 19 Jun 2018, Arnd Bergmann wrote: > The real-time clock on m68k (and powerpc) mac systems uses an unsigned > 32-bit value starting in 1904, which overflows in 2040, about two years > later than everyone else, but this gets wrapped around in the Linux code > in 2038 already because of

Re: [PATCH] powerpc: Wire up io_pgetevents

2018-06-21 Thread Christoph Hellwig
On Wed, Jun 20, 2018 at 04:35:16PM -0300, Breno Leitao wrote: > Wire up io_pgetevents system call on powerpc. > > io_pgetevents is a new syscall to read asynchronous I/O events from the > completion queue. > > Tested with libaio branch aio-poll[1] and the io_pgetevents test (#22) passed > on