Re: bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-03 Thread Christophe LEROY
Le 03/01/2017 à 16:25, Christian Kujau a écrit : Hi, when compiling v4.10-rc2 with CONFIG_CC_STACKPROTECTOR_STRONG=y, the linker fails with: + ld -EB -m elf32ppc -Bstatic --build-id -X -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds arch/powerpc/kernel/h

Re: [RESEND] cxl: Force psl data-cache flush during device shutdown

2017-01-03 Thread Andrew Donnellan
On 04/01/17 17:18, Vaibhav Jain wrote: This change adds a force psl data cache flush during device shutdown callback. This should reduce a possibility of psl holding a dirty cache line while the CAPP is being reinitialized, which may result in a UE [load/store] machine check error. Signed-off-by

[RESEND] cxl: Force psl data-cache flush during device shutdown

2017-01-03 Thread Vaibhav Jain
This change adds a force psl data cache flush during device shutdown callback. This should reduce a possibility of psl holding a dirty cache line while the CAPP is being reinitialized, which may result in a UE [load/store] machine check error. Signed-off-by: Vaibhav Jain --- Resend: Fixed the aut

Re: ext4 filesystem corruption with 4.10-rc2 on ppc64le

2017-01-03 Thread Chandan Rajendra
On Wednesday, January 04, 2017 04:18:08 PM Anton Blanchard wrote: > Hi, > > I'm consistently seeing ext4 filesystem corruption using a mainline > kernel. It doesn't take much to trigger it - download a ppc64le Ubuntu > cloud image, boot it in KVM and run: > > sudo apt-get update > sudo apt-get di

ext4 filesystem corruption with 4.10-rc2 on ppc64le

2017-01-03 Thread Anton Blanchard
Hi, I'm consistently seeing ext4 filesystem corruption using a mainline kernel. It doesn't take much to trigger it - download a ppc64le Ubuntu cloud image, boot it in KVM and run: sudo apt-get update sudo apt-get dist-upgrade sudo reboot And it never makes it back up, dying with rather severe fi

[PATCH 4/9] powerpc/64: Fix naming of cache block vs. cache line

2017-01-03 Thread Benjamin Herrenschmidt
In a number of places we called "cache line size" what is actually the cache block size, which in the powerpc architecture, means the effective size to use with cache management instructions (it can be different from the actual cache line size). We fix the naming across the board and properly retr

[PATCH 5/9] powerpc/64: Retrieve number of L1 cache sets from device-tree

2017-01-03 Thread Benjamin Herrenschmidt
It will be used to calculate the associativity Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/cache.h | 2 ++ arch/powerpc/kernel/setup_64.c | 27 +-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/cache.h b

[PATCH 6/9] powerpc/64: Clean up ppc64_caches using a struct per cache

2017-01-03 Thread Benjamin Herrenschmidt
We have two set of identical struct members for the I and D sides and mostly identical bunches of code to parse the device-tree to populate them. Instead make a ppc_cache_info structure with one copy for I and one for D Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/cache.h

[PATCH 7/9] powerpc/64: Add L2 and L3 cache shape info

2017-01-03 Thread Benjamin Herrenschmidt
Retrieved from device-tree when available Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/cache.h | 2 ++ arch/powerpc/kernel/setup_64.c | 25 - 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/cache.h b/arch/p

[PATCH 8/9] powerpc/64: Hard code cache geometry on POWER8

2017-01-03 Thread Benjamin Herrenschmidt
All shipping firmware versions have it wrong in the device-tree Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 52 +++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/k

[PATCH 9/9] powerpc: A new cache shape aux vectors

2017-01-03 Thread Benjamin Herrenschmidt
The definition is loosely based on sh and alpha, modified to accomodate larger associativity and cache size for future-proofing. We currently set all the values to -1 which indicates that the information isn't available. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/cache.h

[PATCH 3/9] powerpc: Remove obsolete comment about patching instructions

2017-01-03 Thread Benjamin Herrenschmidt
We don't patch instructions based on the cache lines or block sizes these days. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 6263e0d..222bbb0 10

[PATCH 2/9] powerpc: Move {d, i, u}cache_bsize definitions to a common place

2017-01-03 Thread Benjamin Herrenschmidt
The variables are defined twice in setup_32.c and setup_64.c, do it once in setup-common.c instead Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 9 + arch/powerpc/kernel/setup_32.c | 8 arch/powerpc/kernel/setup_64.c | 8 3 files

[PATCH 1/9] powerpc: Move ARCH_DLINFO out of uapi

2017-01-03 Thread Benjamin Herrenschmidt
It's an kernel private macro, it doesn't belong there Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/elf.h | 22 ++ arch/powerpc/include/uapi/asm/elf.h | 23 --- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/arch

Re: [PATCH v4 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-03 Thread Aneesh Kumar K.V
Reza Arbab writes: > Tear down and free the four-level page tables of physical mappings > during memory hotremove. > > Borrow the basic structure of remove_pagetable() and friends from the > identically-named x86 functions. Simplify things a bit so locking and > tlb flushing are only done in the

Re: [PATCH v4 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-03 Thread Aneesh Kumar K.V
Reza Arbab writes: > Move the page mapping code in radix_init_pgtable() into a separate > function that will also be used for memory hotplug. > > The current goto loop progressively decreases its mapping size as it > covers the tail of a range whose end is unaligned. Change this to a for > loop w

[PATCH] powerpc/mm/4k: don't allocate larger pmd page table for 4k

2017-01-03 Thread Aneesh Kumar K.V
We now support THP with both 64k and 4K page size configuration for radix. (hash only support THP with 64K page size). Hence we will have CONFIG_TRANSPARENT_HUGEPAGE enabled for both PPC_64K and PPC_4K config. Since we only need large pmd page table with hash configuration (to store the slot inform

Re: [PATCH] powerpc: fix pgtable pmd cache init

2017-01-03 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > On Wed, 04 Jan 2017 07:34:41 +0530 > "Aneesh Kumar K.V" wrote: > >> Nicholas Piggin writes: >> >> > Commit 9b081e10805cd ("powerpc: port 64 bits pgtable_cache to 32 bits") >> > mixed up PMD_INDEX_SIZE and PMD_CACHE_INDEX a couple of times. This >> > resulted in 64s/ha

Re: [PATCH] powerpc: fix pgtable pmd cache init

2017-01-03 Thread Nicholas Piggin
On Wed, 04 Jan 2017 07:34:41 +0530 "Aneesh Kumar K.V" wrote: > Nicholas Piggin writes: > > > Commit 9b081e10805cd ("powerpc: port 64 bits pgtable_cache to 32 bits") > > mixed up PMD_INDEX_SIZE and PMD_CACHE_INDEX a couple of times. This > > resulted in 64s/hash/4k configs to panic at boot with

DEBUG_LOCKS_WARN_ON(1) / lockdep.c:3134 lockdep_init_map+0x1e8/0x1f0

2017-01-03 Thread Christian Kujau
Hi, booting v4.10-rc2 on this PowerPC G4 machine prints the following early on, but then continues to boot and the machine is running fine so far: BUG: key ef0ba7d0 not in .data! DEBUG_LOCKS_WARN_ON(1) [ cut here ] WARNING: CPU: 0 PID: 1 at /usr/local/src/linux-git/kern

Re: [PATCH] powerpc: fix pgtable pmd cache init

2017-01-03 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > Commit 9b081e10805cd ("powerpc: port 64 bits pgtable_cache to 32 bits") > mixed up PMD_INDEX_SIZE and PMD_CACHE_INDEX a couple of times. This > resulted in 64s/hash/4k configs to panic at boot with a false positive > error check. > > Fix that and simplify error handling

[PATCH net-next 1/6] net/skbuff: add macros for VLAN_PRESENT bit

2017-01-03 Thread Michał Mirosław
Signed-off-by: Michał Mirosław --- include/linux/skbuff.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b53c0cfd417e..168c3e486bd4 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -768,6 +768,12 @@ struct sk_buff

[PATCH net-next 4/6] net/bpf_jit: PPC: split VLAN_PRESENT bit handling from VLAN_TCI

2017-01-03 Thread Michał Mirosław
Signed-off-by: Michał Mirosław --- arch/powerpc/net/bpf_jit_comp.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 7e706f36e364..22ae63fb9b7d 100644 --- a/arch/powerpc/net/bpf_jit_comp.c

Re: [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size

2017-01-03 Thread Michael Neuling
On Tue, 2016-12-13 at 19:34 +0530, Aneesh Kumar K.V wrote: > generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT = 0 > we get > [0.241333] hugetlbfs: disabling because there are no supported hugepage sizes > > bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages > bash: echo: write er

Re: bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-03 Thread Christian Kujau
On Wed, 4 Jan 2017, Benjamin Herrenschmidt wrote: > On Tue, 2017-01-03 at 07:25 -0800, Christian Kujau wrote: > > Hi, > > > > when compiling v4.10-rc2 with CONFIG_CC_STACKPROTECTOR_STRONG=y, the  > > linker fails with: > > The way gcc implements the stack protector has some serious > incompatibil

Re: bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-03 Thread Benjamin Herrenschmidt
On Tue, 2017-01-03 at 07:25 -0800, Christian Kujau wrote: > Hi, > > when compiling v4.10-rc2 with CONFIG_CC_STACKPROTECTOR_STRONG=y, the  > linker fails with: The way gcc implements the stack protector has some serious incompatibilities with the way the Linux kernel uses r13, I wouldn't even try

Re: [alsa-devel] [PATCH] fsl_ssi: set fifo watermark to more reliable value

2017-01-03 Thread Fabio Estevam
On Tue, Jan 3, 2017 at 4:22 PM, Caleb Crome wrote: > From: Caleb Crome > > The fsl_ssi fifo watermark is by default set to 2 free spaces (i.e. > activate DMA on FIFO when only 2 spaces are left.) This means the > DMA must service the fifo within 2 audio samples, which is just not > enough time

[PATCH net-next v2 21/27] net/bpf_jit: PPC: split VLAN_PRESENT bit handling from VLAN_TCI

2017-01-03 Thread Michał Mirosław
Signed-off-by: Michał Mirosław --- arch/powerpc/net/bpf_jit_comp.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 7e706f36e364..22ae63fb9b7d 100644 --- a/arch/powerpc/net/bpf_jit_comp.c

[PATCH net-next v2 18/27] net/skbuff: add macros for VLAN_PRESENT bit

2017-01-03 Thread Michał Mirosław
Signed-off-by: Michał Mirosław --- include/linux/skbuff.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b53c0cfd417e..168c3e486bd4 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -768,6 +768,12 @@ struct sk_buff

[PATCH] fsl_ssi: set fifo watermark to more reliable value

2017-01-03 Thread Caleb Crome
From: Caleb Crome The fsl_ssi fifo watermark is by default set to 2 free spaces (i.e. activate DMA on FIFO when only 2 spaces are left.) This means the DMA must service the fifo within 2 audio samples, which is just not enough time for many use cases with high data rate. In many configurations

[PATCH v4 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-03 Thread Reza Arbab
Use remove_pagetable() and friends for radix vmemmap removal. We do not require the special-case handling of vmemmap done in the x86 versions of these functions. This is because vmemmap_free() has already freed the mapped pages, and calls us with an aligned address range. So, add a few failsafe W

[PATCH v4 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-03 Thread Reza Arbab
Move the page mapping code in radix_init_pgtable() into a separate function that will also be used for memory hotplug. The current goto loop progressively decreases its mapping size as it covers the tail of a range whose end is unaligned. Change this to a for loop which can do the same for both en

[PATCH v4 0/4] powerpc/mm: enable memory hotplug on radix

2017-01-03 Thread Reza Arbab
Do the plumbing needed for memory hotplug on systems using radix pagetables, borrowing from existing vmemmap and x86 code. This passes basic verification of plugging and removing memory, but this stuff is tricky and I'd appreciate extra scrutiny of the series for correctness--in particular, the

[PATCH v4 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-03 Thread Reza Arbab
Tear down and free the four-level page tables of physical mappings during memory hotremove. Borrow the basic structure of remove_pagetable() and friends from the identically-named x86 functions. Simplify things a bit so locking and tlb flushing are only done in the outermost function. Memory must

[PATCH v4 2/4] powerpc/mm: add radix__create_section_mapping()

2017-01-03 Thread Reza Arbab
Wire up memory hotplug page mapping for radix. Share the mapping function already used by radix_init_pgtable(). Signed-off-by: Reza Arbab --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c| 7 +++

[PATCH] powerpc/mm: fix memory hotplug BUG() on radix

2017-01-03 Thread Reza Arbab
Memory hotplug is leading to hash page table calls, even on radix: ... arch_add_memory create_section_mapping htab_bolt_mapping BUG_ON(!ppc_md.hpte_insert); To fix, refactor {create,remove}_section_mapping() into hash

Re: bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-03 Thread Christian Kujau
On Tue, 3 Jan 2017, Christian Kujau wrote: > when compiling v4.10-rc2 with CONFIG_CC_STACKPROTECTOR_STRONG=y, the > linker fails with: FWIW, compiling with CONFIG_CC_STACKPROTECTOR_REGULAR=y instead works just fine. C. > > > + ld -EB -m elf32ppc -Bstatic --bui

[PATCH] powerpc: implement clear_bit_unlock_is_negative_byte()

2017-01-03 Thread Nicholas Piggin
Commit b91e1302ad9b8 ("mm: optimize PageWaiters bit use for unlock_page()") added a special bitop function to speed up unlock_page(). Implement this for powerpc. This improves the unlock_page() core code from this: li 9,1 lwsync 1: ldarx 10,0,3,0 andc10,10,

[PATCH] powerpc: fix pgtable pmd cache init

2017-01-03 Thread Nicholas Piggin
Commit 9b081e10805cd ("powerpc: port 64 bits pgtable_cache to 32 bits") mixed up PMD_INDEX_SIZE and PMD_CACHE_INDEX a couple of times. This resulted in 64s/hash/4k configs to panic at boot with a false positive error check. Fix that and simplify error handling by moving the check to the caller. F

bootx_init.c:88: undefined reference to `__stack_chk_fail_local'

2017-01-03 Thread Christian Kujau
Hi, when compiling v4.10-rc2 with CONFIG_CC_STACKPROTECTOR_STRONG=y, the linker fails with: + ld -EB -m elf32ppc -Bstatic --build-id -X -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds arch/powerpc/kernel/head_32.o arch/powerpc/kernel/fpu.o arch/powerpc/ke

Re: [PATCH V2] cpufreq: powernv: Add boost files to export ultra-turbo frequencies

2017-01-03 Thread Viresh Kumar
On 03-01-17, 16:36, Shilpasri G Bhat wrote: > In P8+, Workload Optimized Frequency(WOF) provides the capability to > boost the cpu frequency based on the utilization of the other cpus > running in the chip. The On-Chip-Controller(OCC) firmware will control > the achievability of these frequencies d

[PATCH V2] cpufreq: powernv: Add boost files to export ultra-turbo frequencies

2017-01-03 Thread Shilpasri G Bhat
In P8+, Workload Optimized Frequency(WOF) provides the capability to boost the cpu frequency based on the utilization of the other cpus running in the chip. The On-Chip-Controller(OCC) firmware will control the achievability of these frequencies depending on the power headroom available in the chip

[PATCH] powerpc/perf: use MSR to report privilege level on P9 DD1

2017-01-03 Thread Madhavan Srinivasan
"use_siar" variable is primarily used for deciding the sampled address and the privilege level to be reported for a sample. perf_read_regs() function updates the "use_siar" and "regs->result" based on the pmu flags along with other checks. To force the use of MSR to report the privilege level and t