Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-02-15 Thread Masahiro Yamada
On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre wrote: > > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada > wrote: > > > > I often test all Kconfig commands for all architectures. To ease my > > workflow, I want 'make defconfig' at least working without any cross > > compiler. > > > >

Re: [PATCH v5 0/3] Add NXP AUDMIX device and machine drivers

2019-02-15 Thread Nicolin Chen
On Fri, Feb 15, 2019 at 02:01:32PM +, Viorel Suman wrote: > The patchset adds NXP Audio Mixer (AUDMIX) device and machine > drivers and related DT bindings documentation. For this series, Acked-by: Nicolin Chen And Rob gave his at the previous version already. Thanks. > Changes since V4:

Re: [PATCH v4 0/3] locking/rwsem: Rwsem rearchitecture part 0

2019-02-15 Thread Will Deacon
On Thu, Feb 14, 2019 at 11:37:15AM +0100, Peter Zijlstra wrote: > On Wed, Feb 13, 2019 at 05:00:14PM -0500, Waiman Long wrote: > > v4: > > - Remove rwsem-spinlock.c and make all archs use rwsem-xadd.c. > > > > v3: > > - Optimize __down_read_trylock() for the uncontended case as suggested > >

Re: [PATCH v4 0/3] locking/rwsem: Rwsem rearchitecture part 0

2019-02-15 Thread Waiman Long
On 02/15/2019 01:40 PM, Will Deacon wrote: > On Thu, Feb 14, 2019 at 11:37:15AM +0100, Peter Zijlstra wrote: >> On Wed, Feb 13, 2019 at 05:00:14PM -0500, Waiman Long wrote: >>> v4: >>> - Remove rwsem-spinlock.c and make all archs use rwsem-xadd.c. >>> >>> v3: >>> - Optimize __down_read_trylock()

Re: [PATCH] ASoC: fsl_esai: fix register setting issue in RIGHT_J mode

2019-02-15 Thread Nicolin Chen
On Fri, Feb 15, 2019 at 11:04:38AM +, S.j. Wang wrote: > The ESAI_xCR_xWA is xCR's bit, not the xCCR's bit, driver set it to > wrong register, correct it. > > Signed-off-by: Shengjiu Wang Would need this for stable kernel too. Ackedy-by: Nicolin Chen Thanks. > --- >

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-15 Thread Will Deacon
On Thu, Feb 14, 2019 at 10:09:44AM -0800, Linus Torvalds wrote: > On Thu, Feb 14, 2019 at 9:51 AM Linus Torvalds > wrote: > > > > The arm64 numbers scaled horribly even before, and that's because > > there is too much ping-pong, and it's probably because there is no > > "stickiness" to the

Re: [PATCH V2 0/7] Add FOLL_LONGTERM to GUP fast and use it

2019-02-15 Thread Ira Weiny
> NOTE: This series depends on my clean up patch to remove the write parameter > from gup_fast_permitted()[1] > > HFI1, qib, and mthca, use get_user_pages_fast() due to it performance > advantages. These pages can be held for a significant time. But > get_user_pages_fast() does not protect

Re: [PATCH v3] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-15 Thread Dave Hansen
> -#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || > defined(CONFIG_CMA) > +#ifdef CONFIG_CONTIG_ALLOC > /* The below functions must be run on a range from a single zone. */ > extern int alloc_contig_range(unsigned long start, unsigned long end, >

Re: [PATCH v3] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-15 Thread Vlastimil Babka
On 2/14/19 8:31 PM, Alexandre Ghiti wrote: > On systems without CMA or (MEMORY_ISOLATION && COMPACTION) activated but > that support gigantic pages, boottime reserved gigantic pages can not be > freed at all. This patch simply enables the possibility to hand back > those pages to memory allocator.

Re: [RFC PATCH 0/5] powerpc: KASAN for 64-bit Book3E

2019-02-15 Thread Christophe Leroy
On 02/15/2019 12:04 AM, Daniel Axtens wrote: Building on the work of Christophe, Aneesh and Balbir, I've ported KASAN to the e6500, a 64-bit Book3E processor which doesn't have a hashed page table. It applies on top of Christophe's series, v5. It requires some changes to the KASAN core -

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-15 Thread Christopher Lameter
On Thu, 14 Feb 2019, Jason Gunthorpe wrote: > On Thu, Feb 14, 2019 at 01:46:51PM -0800, Ira Weiny wrote: > > > > > > Really unclear how to fix this. The pinned/locked split with two > > > > > buckets may be the right way. > > > > > > > > Are you suggesting that we have 2 user limits? > > > > > >

Re: [PATCH V2 3/10] KVM/MMU: Add last_level in the struct mmu_spte_page

2019-02-15 Thread Paolo Bonzini
On 15/02/19 16:05, Tianyu Lan wrote: > Yes, you are right. Thanks to point out and will fix. The last_level > flag is to avoid adding middle page node(e.g, PGD, PMD) > into flush list. The address range will be duplicated if adding both > leaf, node and middle node into flush list. Hmm, that's

Re: [PATCH V2 3/10] KVM/MMU: Add last_level in the struct mmu_spte_page

2019-02-15 Thread Tianyu Lan
On Fri, Feb 15, 2019 at 12:32 AM Paolo Bonzini wrote: > > On 02/02/19 02:38, lantianyu1...@gmail.com wrote: > > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > > index ce770b446238..70cafd3f95ab 100644 > > --- a/arch/x86/kvm/mmu.c > > +++ b/arch/x86/kvm/mmu.c > > @@ -2918,6 +2918,9 @@

[PATCH v5 3/3] ASoC: fsl: Add Audio Mixer machine driver

2019-02-15 Thread Viorel Suman
This patch implements Audio Mixer machine driver for NXP iMX8 SOCs. It connects together Audio Mixer and related SAI instances. Signed-off-by: Viorel Suman --- sound/soc/fsl/Kconfig | 9 ++ sound/soc/fsl/Makefile | 2 + sound/soc/fsl/imx-audmix.c | 327

[PATCH v5 2/3] ASoC: add fsl_audmix DT binding documentation

2019-02-15 Thread Viorel Suman
Add the DT binding documentation for NXP Audio Mixer CPU DAI driver. Signed-off-by: Viorel Suman --- .../devicetree/bindings/sound/fsl,audmix.txt | 50 ++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,audmix.txt diff

[PATCH v5 1/3] ASoC: fsl: Add Audio Mixer CPU DAI driver

2019-02-15 Thread Viorel Suman
This patch implements Audio Mixer CPU DAI driver for NXP iMX8 SOCs. The Audio Mixer is a on-chip functional module that allows mixing of two audio streams into a single audio stream. Audio Mixer datasheet is available here: https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf

[PATCH v5 0/3] Add NXP AUDMIX device and machine drivers

2019-02-15 Thread Viorel Suman
The patchset adds NXP Audio Mixer (AUDMIX) device and machine drivers and related DT bindings documentation. Changes since V4: 1. Removed "model" attribute from device driver DT bindings documentation as suggested by Nicolin. Changes since V3: 1. Removed machine driver DT bindings

[PATCH] ASoC: fsl_esai: fix register setting issue in RIGHT_J mode

2019-02-15 Thread S.j. Wang
The ESAI_xCR_xWA is xCR's bit, not the xCCR's bit, driver set it to wrong register, correct it. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index

Re: Kernel panic when loading the IDE controller driver

2019-02-15 Thread sgosavi1
Hi, > Hopefully there are examples of passing these values through ACPI. Are you suggesting here to look at the ide-acpi.c sourc file available as part of the driver code? In my original post I mentioned that I have modified the ide-generic.c source file to use the IO port addresses and IRQ

Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-02-15 Thread Mathieu Malaterre
On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada wrote: > > I often test all Kconfig commands for all architectures. To ease my > workflow, I want 'make defconfig' at least working without any cross > compiler. > > Currently, arch/powerpc/Makefile checks CROSS_COMPILE to decide the > default

Re: [PATCH v5 3/3] powerpc/32: Add KASAN support

2019-02-15 Thread Andrey Ryabinin
On 2/15/19 1:10 PM, Christophe Leroy wrote: > > > Le 15/02/2019 à 11:01, Andrey Ryabinin a écrit : >> >> >> On 2/15/19 11:41 AM, Christophe Leroy wrote: >>> >>> >>> Le 14/02/2019 à 23:04, Daniel Axtens a écrit : Hi Christophe, > --- a/arch/powerpc/include/asm/string.h > +++

[PATCH] powerpc: drop unused GENERIC_CSUM Kconfig item

2019-02-15 Thread Christophe Leroy
Commit d4fde568a34a ("powerpc/64: Use optimized checksum routines on little-endian") converted last powerpc user of GENERIC_CSUM. This patch does a final cleanup dropping the Kconfig GENERIC_CSUM option which is always 'n', and associated piece of code in asm/checksum.h Fixes: d4fde568a34a

Re: [PATCH] powerpc/64s/hash: Fix assert_slb_presence() use of the slbfee. instruction

2019-02-15 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > The slbfee. instruction must have bit 24 of RB clear, failure to do > so can result in false negatives that result in incorrect assertions. > > This is not obvious from the ISA v3.0B document, which only says: > > The hardware ignores the contents of RB 36:38 40:63

[PATCH] powerpc/64s/hash: Fix assert_slb_presence() use of the slbfee. instruction

2019-02-15 Thread Nicholas Piggin
The slbfee. instruction must have bit 24 of RB clear, failure to do so can result in false negatives that result in incorrect assertions. This is not obvious from the ISA v3.0B document, which only says: The hardware ignores the contents of RB 36:38 40:63 -- p.1032 This patch fixes the bug

Re: [PATCH v5 3/3] powerpc/32: Add KASAN support

2019-02-15 Thread Christophe Leroy
Le 15/02/2019 à 11:01, Andrey Ryabinin a écrit : On 2/15/19 11:41 AM, Christophe Leroy wrote: Le 14/02/2019 à 23:04, Daniel Axtens a écrit : Hi Christophe, --- a/arch/powerpc/include/asm/string.h +++ b/arch/powerpc/include/asm/string.h @@ -27,6 +27,20 @@ extern int memcmp(const void

Re: [PATCH v5 3/3] powerpc/32: Add KASAN support

2019-02-15 Thread Andrey Ryabinin
On 2/15/19 11:41 AM, Christophe Leroy wrote: > > > Le 14/02/2019 à 23:04, Daniel Axtens a écrit : >> Hi Christophe, >> >>> --- a/arch/powerpc/include/asm/string.h >>> +++ b/arch/powerpc/include/asm/string.h >>> @@ -27,6 +27,20 @@ extern int memcmp(const void *,const void >>>

Re: [PATCH] powerpc/mm: Handle mmap_min_addr correctly in get_unmapped_area callback

2019-02-15 Thread Laurent Dufour
Le 15/02/2019 à 09:16, Aneesh Kumar K.V a écrit : After we ALIGN up the address we need to make sure we didn't overflow and resulted in zero address. In that case, we need to make sure that the returned address is greater than mmap_min_addr. Also when doing top-down search the low_limit is not

[PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-02-15 Thread Masahiro Yamada
I often test all Kconfig commands for all architectures. To ease my workflow, I want 'make defconfig' at least working without any cross compiler. Currently, arch/powerpc/Makefile checks CROSS_COMPILE to decide the default defconfig source. If CROSS_COMPILE is unset, it is likely to be the

Re: [PATCH 02/11] riscv: remove the HAVE_KPROBES option

2019-02-15 Thread Masahiro Yamada
On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > > HAVE_KPROBES is defined genericly in arch/Kconfig and architectures > should just select it if supported. > > Signed-off-by: Christoph Hellwig Do you want this patch picked up by me? Or, by Palmer? > --- > arch/riscv/Kconfig | 3

Re: [PATCH 01/11] powerpc: remove dead ifdefs in

2019-02-15 Thread Masahiro Yamada
On Fri, Feb 15, 2019 at 5:18 PM Christophe Leroy wrote: > > > > Le 14/02/2019 à 18:05, Christoph Hellwig a écrit : > > On Thu, Feb 14, 2019 at 09:26:19AM +0100, Christophe Leroy wrote: > >> Could you also remove the 'config GENERIC_CSUM' item in > >> arch/powerpc/Kconfig ? > > > > All the

Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-15 Thread Michael Ellerman
Mathieu Malaterre writes: > On Fri, Feb 15, 2019 at 7:14 AM Michael Ellerman wrote: >> >> GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks >> the build: >> >> In function ‘user_regset_copyin’, >> inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9: >>

Re: [PATCH] mmap.2: describe the 5level paging hack

2019-02-15 Thread Michael Ellerman
Jann Horn writes: > The manpage is missing information about the compatibility hack for > 5-level paging that went in in 4.14, around commit ee00f4a32a76 ("x86/mm: > Allow userspace have mappings above 47-bit"). Add some information about > that. Thanks for doing this. > While I don't think

Re: [PATCH] powerpc/ptrace: Add prototype for function pt_regs_check

2019-02-15 Thread Mathieu Malaterre
On Fri, Feb 15, 2019 at 9:21 AM Christophe Leroy wrote: > > > > Le 15/02/2019 à 09:11, Mathieu Malaterre a écrit : > > On Sat, Dec 8, 2018 at 4:46 PM Mathieu Malaterre wrote: > >> > >> `pt_regs_check` is a dummy function, its purpose is to break the build > >> if struct pt_regs and struct

Re: [PATCH 08/11] lib: consolidate the GENERIC_BUG symbol

2019-02-15 Thread Masahiro Yamada
On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > > And just let the architectures that want it select the symbol. > Same for GENERIC_BUG_RELATIVE_POINTERS. > > Signed-off-by: Christoph Hellwig This slightly changes the behavior of GENERIC_BUG_RELATIVE_POINTERS for arm64, riscv, x86.

Re: [PATCH v5 3/3] powerpc/32: Add KASAN support

2019-02-15 Thread Christophe Leroy
Le 14/02/2019 à 23:04, Daniel Axtens a écrit : Hi Christophe, --- a/arch/powerpc/include/asm/string.h +++ b/arch/powerpc/include/asm/string.h @@ -27,6 +27,20 @@ extern int memcmp(const void *,const void *,__kernel_size_t); extern void * memchr(const void *,int,__kernel_size_t); extern

Re: [RFC PATCH 5/5] powerpc: KASAN for 64bit Book3E

2019-02-15 Thread Dmitry Vyukov
On Fri, Feb 15, 2019 at 1:05 AM Daniel Axtens wrote: > > Wire up KASAN. Only outline instrumentation is supported. > > The KASAN shadow area is mapped into vmemmap space: > 0x8000 0400 to 0x8000 0600 . > To do this we require that vmemmap be disabled. (This is the default > in

[PATCH] powerpc/mm: Convert slb presence warning check to WARN_ON_ONCE

2019-02-15 Thread Aneesh Kumar K.V
We are hitting false positive in some case. Till we root cause this, convert WARN_ON to WARN_ON_WONCE. A sample stack dump looks like NIP [c007ac40] assert_slb_presence+0x90/0xa0 LR [c007b270] slb_flush_and_restore_bolted+0x90/0xc0 Call Trace:

Re: [PATCH] powerpc/ptrace: Add prototype for function pt_regs_check

2019-02-15 Thread Christophe Leroy
Le 15/02/2019 à 09:11, Mathieu Malaterre a écrit : On Sat, Dec 8, 2018 at 4:46 PM Mathieu Malaterre wrote: `pt_regs_check` is a dummy function, its purpose is to break the build if struct pt_regs and struct user_pt_regs don't match. This function has no functionnal purpose, and will get

Re: [PATCH 01/11] powerpc: remove dead ifdefs in

2019-02-15 Thread Christophe Leroy
Le 14/02/2019 à 18:05, Christoph Hellwig a écrit : On Thu, Feb 14, 2019 at 09:26:19AM +0100, Christophe Leroy wrote: Could you also remove the 'config GENERIC_CSUM' item in arch/powerpc/Kconfig ? All the separate declarations go away later in this series. I saw, but the purpose of the

[PATCH] powerpc/mm: Handle mmap_min_addr correctly in get_unmapped_area callback

2019-02-15 Thread Aneesh Kumar K.V
After we ALIGN up the address we need to make sure we didn't overflow and resulted in zero address. In that case, we need to make sure that the returned address is greater than mmap_min_addr. Also when doing top-down search the low_limit is not PAGE_SIZE but rather max(PAGE_SIZE, mmap_min_addr).

Re: [PATCH] powerpc/ptrace: Add prototype for function pt_regs_check

2019-02-15 Thread Mathieu Malaterre
On Sat, Dec 8, 2018 at 4:46 PM Mathieu Malaterre wrote: > > `pt_regs_check` is a dummy function, its purpose is to break the build > if struct pt_regs and struct user_pt_regs don't match. > > This function has no functionnal purpose, and will get eliminated at > link time or after init depending

Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-15 Thread Mathieu Malaterre
On Fri, Feb 15, 2019 at 7:14 AM Michael Ellerman wrote: > > GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks > the build: > > In function ‘user_regset_copyin’, > inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9: > include/linux/regset.h:295:4: error:

Re: [PATCH 09/11] lib: consolidate the GENERIC_CSUM symbol

2019-02-15 Thread Masahiro Yamada
On Thu, Feb 14, 2019 at 2:41 AM Christoph Hellwig wrote: > > Add one definition to lib/Kconfig and let the architectures > select if it supported. > > Signed-off-by: Christoph Hellwig > diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig > index 52b4d48e351a..9de1d983a99a 100644 >