Re: build failure of current mmotm with skiroot_defconfig

2019-02-27 Thread Paul Mackerras
On Wed, Feb 27, 2019 at 07:41:21AM +0100, Christophe Leroy wrote: > > > Le 26/02/2019 à 23:24, Paul Mackerras a écrit : > >On Tue, Feb 26, 2019 at 11:59:08AM +0200, Mike Rapoport wrote: > >>On Tue, Feb 26, 2019 at 10:39:54AM +0100, Christophe Leroy wrote: > >>> > >>> > >>>Le 26/02/2019 à 09:12,

Re: [PATCH V7 0/4] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2019-02-27 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Andrew Morton writes: > >> [patch 1/4]: OK. I guess. Was this worth consuming our last PF_ flag? > > That was done based on request from Andrea and it also helps in avoiding > allocating pages from CMA region where we know we are anyway going to > migrate them out.

[PATCH] powerpc/32: Clear on-stack exception marker upon exception return

2019-02-27 Thread Christophe Leroy
Clear the on-stack STACK_FRAME_REGS_MARKER on exception exit in order to avoid confusing stacktrace like the one below. Call Trace: [c0e9dca0] [c01c42a0] print_address_description+0x64/0x2bc (unreliable) [c0e9dcd0] [c01c4684] kasan_report+0xfc/0x180 [c0e9dd10] [c0895130] memchr+0x24/0x74

Re: [PATCH v2] powerpc/powernv/idle: Restore IAMR after idle

2019-02-27 Thread Nicholas Piggin
Russell Currey's on February 8, 2019 9:11 pm: > Without restoring the IAMR after idle, execution prevention on POWER9 > with Radix MMU is overwritten and the kernel can freely execute userspace > without > faulting. > > This is necessary when returning from any stop state that modifies user >

DMA & POWER8

2019-02-27 Thread Илья Кузнецов
We're trying to use Slave-DMA API of the DMA Engine in the linux kernel on POWER8 OpenPOWER platform. And we discovered that dma_request_channel() always fails. Does it mean that Turismo hardware does not support Slave-DMA? Or DMA subsystem in the linux kernel needs to be fixed, doesn't it?

[PATCH v8 4/4] powerpc/mm/iommu: Allow large IOMMU page size only for hugetlb backing

2019-02-27 Thread Aneesh Kumar K.V
THP pages can get split during different code paths. An incremented reference count does imply we will not split the compound page. But the pmd entry can be converted to level 4 pte entries. Keep the code simpler by allowing large IOMMU page size only if the guest ram is backed by hugetlb pages.

[RFC PATCH v2 07/14] watchdog/hardlockup: Define a generic function to detect hardlockups

2019-02-27 Thread Ricardo Neri
The procedure to detect hardlockups is independent of the underlying mechanism that generated the non-maskable interrupt used to drive the detector. Thus, it can be put in a separate, generic function. In this manner, it can be invoked by various implementations of the NMI watchdog. For this

[PATCH v8 0/4] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2019-02-27 Thread Aneesh Kumar K.V
ppc64 use CMA area for the allocation of guest page table (hash page table). We won't be able to start guest if we fail to allocate hash page table. We have observed hash table allocation failure because we failed to migrate pages out of CMA region because they were pinned. This happen when we

[RFC PATCH v2 08/14] watchdog/hardlockup: Decouple the hardlockup detector from perf

2019-02-27 Thread Ricardo Neri
The current default implementation of the hardlockup detector assumes that it is implemented using perf events. However, the hardlockup detector can be driven by other sources of non-maskable interrupts (e.g., a properly configured timer). Put in a separate file all the code that is specific to

[PATCH v8 3/4] powerpc/mm/iommu: Allow migration of cma allocated pages during mm_iommu_do_alloc

2019-02-27 Thread Aneesh Kumar K.V
The current code doesn't do page migration if the page allocated is a compound page. With HugeTLB migration support, we can end up allocating hugetlb pages from CMA region. Also, THP pages can be allocated from CMA region. This patch updates the code to handle compound pages correctly. The patch

[RFC PATCH v2 10/14] kernel/watchdog: Add a function to obtain the watchdog_allowed_mask

2019-02-27 Thread Ricardo Neri
Implementations of NMI watchdogs that use a single piece of hardware to monitor all the CPUs in the system (as opposed to per-CPU implementations such as perf) need to know which CPUs the watchdog is allowed to monitor. In this manner, non-maskable interrupts are directed only to the monitored

Re: [RFC PATCH v2 09/14] watchdog/hardlockup: Make arch_touch_nmi_watchdog() to hpet-based implementation

2019-02-27 Thread Paul E. McKenney
On Wed, Feb 27, 2019 at 08:05:13AM -0800, Ricardo Neri wrote: > CPU architectures that have an NMI watchdog use arch_touch_nmi_watchdog() > to briefly ignore the hardlockup detector. If the architecture does not > have an NMI watchdog, one can be constructed using a source of non- > maskable

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 14:45:44 +0100 Frederic Barrat wrote: > Le 27/02/2019 à 09:18, Andrew Donnellan a écrit : > > On 27/2/19 7:04 pm, Alastair D'Silva wrote: > >>> -Original Message- > >>> From: Andrew Donnellan > >>> Sent: Wednesday, 27 February 2019 6:55 PM > >>> To: Alastair

[PATCH v8 1/4] mm/cma: Add PF flag to force non cma alloc

2019-02-27 Thread Aneesh Kumar K.V
This patch adds PF_MEMALLOC_NOCMA which make sure any allocation in that context is marked non-movable and hence cannot be satisfied by CMA region. This is useful with get_user_pages_longterm where we want to take a page pin by migrating pages from CMA region. Marking the section

[PATCH v8 2/4] mm: Update get_user_pages_longterm to migrate pages allocated from CMA region

2019-02-27 Thread Aneesh Kumar K.V
This patch updates get_user_pages_longterm to migrate pages allocated out of CMA region. This makes sure that we don't keep non-movable pages (due to page reference count) in the CMA area. This will be used by ppc64 in a later patch to avoid pinning pages in the CMA region. ppc64 uses CMA region

[RFC PATCH v2 09/14] watchdog/hardlockup: Make arch_touch_nmi_watchdog() to hpet-based implementation

2019-02-27 Thread Ricardo Neri
CPU architectures that have an NMI watchdog use arch_touch_nmi_watchdog() to briefly ignore the hardlockup detector. If the architecture does not have an NMI watchdog, one can be constructed using a source of non- maskable interrupts. In this case, arch_touch_nmi_watchdog() is common to any

Re: [PATCH] powerpc/powernv: Make opal log only readable by root

2019-02-27 Thread Michael Ellerman
Jordan Niethe writes: > Currently the opal log is globally readable. It is kernel policy to limit > the visibility of physical addresses / kernel pointers to root. > Given this and the fact the opal log may contain this information it would > be better to limit the readability to root. Yikes,

[PATCH v3 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()

2019-02-27 Thread Himadri Pandya
Decrement the reference count on device_node "node" while breaking out of the loop. Issue identified by Coccinelle. Signed-off-by: Himadri Pandya --- Changes in V2: - Change subject line --- Changes in V3: - Add braces around the if block ---

Re: [PATCH v2] powerpc/powernv/idle: Restore IAMR after idle

2019-02-27 Thread Akshay Adiga
The changes look good to me. On Fri, Feb 08, 2019 at 10:11:03PM +1100, Russell Currey wrote: > Without restoring the IAMR after idle, execution prevention on POWER9 > with Radix MMU is overwritten and the kernel can freely execute userspace > without > faulting. > > This is necessary when

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
Le 27/02/2019 à 10:19, Andrey Ryabinin a écrit : On 2/27/19 11:25 AM, Christophe Leroy wrote: With version v8 of the series implementing KASAN on 32 bits powerpc (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=94309), I'm now able to activate KASAN on a mac99 is QEMU.

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 09:18, Andrew Donnellan a écrit : On 27/2/19 7:04 pm, Alastair D'Silva wrote: -Original Message- From: Andrew Donnellan Sent: Wednesday, 27 February 2019 6:55 PM To: Alastair D'Silva ; 'Alastair D'Silva' Cc: 'Greg Kurz' ; 'Frederic Barrat' ; 'Arnd Bergmann' ; 'Greg

[PATCH v3 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe()

2019-02-27 Thread Himadri Pandya
Decrement the reference count on device_node "np" while breaking out of the loop. Issue identified by Coccinelle. Signed-off-by: Himadri Pandya --- Changes in V2: - Change subject line --- Changes in V3: - Do not remove the blank line at end of the file ---

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
On 02/27/2019 08:34 AM, Dmitry Vyukov wrote: On Wed, Feb 27, 2019 at 9:25 AM Christophe Leroy wrote: With version v8 of the series implementing KASAN on 32 bits powerpc (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=94309), I'm now able to activate KASAN on a mac99 is

Re: [PATCH 4/5] ocxl: Remove superfluous 'extern' from headers

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva The 'extern' keyword adds no value here. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/ocxl_internal.h | 54 +++ include/misc/ocxl.h

Re: [PATCH 5/5] ocxl: Remove some unused exported symbols

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva Remove some unused exported symbols. Signed-off-by: Alastair D'Silva --- If you have a respin of the series, that patch also adds a comment around ocxl_context_attach(), which is for later. But in any case:

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva Use %# instead of using a literal '0x' Signed-off-by: Alastair D'Silva --- I don't really care either way, but it looks ok. Acked-by: Frederic Barrat drivers/misc/ocxl/config.c | 6 +++---

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Dmitry Vyukov
On Wed, Feb 27, 2019 at 1:35 PM Christophe Leroy wrote: > > > > On 02/27/2019 08:34 AM, Dmitry Vyukov wrote: > > On Wed, Feb 27, 2019 at 9:25 AM Christophe Leroy > > wrote: > >> > >> With version v8 of the series implementing KASAN on 32 bits powerpc > >>

Re: [PATCH 3/5] ocxl: read_pasid never returns an error, so make it void

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva No need for a return value in read_pasid as it only returns 0. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/config.c | 9 ++--- 1 file

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

2019-02-27 Thread Ira Weiny
On Tue, Feb 19, 2019 at 09:30:33PM -0800, 'Ira Weiny' wrote: > From: Ira Weiny > > Resending these as I had only 1 minor comment which I believe we have covered > in this series. I was anticipating these going through the mm tree as they > depend on a cleanup patch there and the IB changes are

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 15:57:37 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The term 'link' is ambiguous (especially when the struct is used for a > list), so rename it for clarity. > > Signed-off-by: Alastair D'Silva > Reviewed-by: Greg Kurz > --- > drivers/misc/ocxl/file.c

[PATCH kernel] KVM: PPC: Allocate guest TCEs on demand too

2019-02-27 Thread Alexey Kardashevskiy
We already allocate hardware TCE tables in multiple levels and skip intermediate levels when we can, now it is a turn of the KVM TCE tables. Thankfully these are allocated already in 2 levels. This moves the table's last level allocation from the creating helper to kvmppc_tce_put() and

Re: [PATCH V7 0/4] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2019-02-27 Thread Aneesh Kumar K.V
Andrew Morton writes: > [patch 1/4]: OK. I guess. Was this worth consuming our last PF_ flag? That was done based on request from Andrea and it also helps in avoiding allocating pages from CMA region where we know we are anyway going to migrate them out. So yes, this helps. > [patch 2/4]:

RE: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Alastair D'Silva
> -Original Message- > From: Andrew Donnellan > Sent: Wednesday, 27 February 2019 6:55 PM > To: Alastair D'Silva ; 'Alastair D'Silva' > > Cc: 'Greg Kurz' ; 'Frederic Barrat' > ; 'Arnd Bergmann' ; 'Greg Kroah- > Hartman' ; linuxppc-dev@lists.ozlabs.org; > linux-ker...@vger.kernel.org >

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
Le 27/02/2019 à 10:25, Dmitry Vyukov a écrit : On Wed, Feb 27, 2019 at 10:18 AM Andrey Ryabinin wrote: On 2/27/19 11:25 AM, Christophe Leroy wrote: With version v8 of the series implementing KASAN on 32 bits powerpc (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=94309),

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Dmitry Vyukov
On Wed, Feb 27, 2019 at 9:25 AM Christophe Leroy wrote: > > With version v8 of the series implementing KASAN on 32 bits powerpc > (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=94309), > I'm now able to activate KASAN on a mac99 is QEMU. > > Then I get the following reports at

Re: [PATCH V5 0/5] NestMMU pte upgrade workaround for mprotect

2019-02-27 Thread Aneesh Kumar K.V
Andrew Morton writes: > [patch 1/5]: unreviewed and has unaddressed comments from mpe. > [patch 2/5]: ditto > [patch 3/5]: ditto > [patch 4/5]: seems ready > [patch 5/5]: reviewed by mpe, but appears to need more work That was mostly variable naming preferences. I like the christmas tree style

[PATCH] powernv: powercap: Add hard minimum powercap

2019-02-27 Thread Shilpasri G Bhat
In POWER9, OCC(On-Chip-Controller) provides for hard and soft system powercapping range. The hard powercap range is guaranteed while soft powercap may or may not be asserted due to various power-thermal reasons based on system configuration and workloads. This patch adds a sysfs file to export the

Re: BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Andrey Ryabinin
On 2/27/19 11:25 AM, Christophe Leroy wrote: > With version v8 of the series implementing KASAN on 32 bits powerpc > (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=94309), I'm > now able to activate KASAN on a mac99 is QEMU. > > Then I get the following reports at startup.

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Andrew Donnellan
On 27/2/19 7:04 pm, Alastair D'Silva wrote: -Original Message- From: Andrew Donnellan Sent: Wednesday, 27 February 2019 6:55 PM To: Alastair D'Silva ; 'Alastair D'Silva' Cc: 'Greg Kurz' ; 'Frederic Barrat' ; 'Arnd Bergmann' ; 'Greg Kroah- Hartman' ; linuxppc-dev@lists.ozlabs.org;

BUG: KASAN: stack-out-of-bounds

2019-02-27 Thread Christophe Leroy
With version v8 of the series implementing KASAN on 32 bits powerpc (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=94309), I'm now able to activate KASAN on a mac99 is QEMU. Then I get the following reports at startup. Which of the two reports I get seems to depend on the

[PATCH] powerpc: fix "section_base" set but not used

2019-02-27 Thread Qian Cai
arch/powerpc/mm/init_64.c: In function 'vmemmap_free': arch/powerpc/mm/init_64.c:277:16: error: variable 'section_base' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Qian Cai --- arch/powerpc/mm/init_64.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v3 16/34] powerpc: mm: Add p?d_large() definitions

2019-02-27 Thread Steven Price
walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_large() functions/macros. For powerpc pmd_large() was already implemented, so hoist

Re: [PATCH v1 0/4] arm64: dts: NXP: add basic dts file for LX2160A SoC

2019-02-27 Thread Stephen Boyd
Quoting Vabhav Sharma (2019-02-26 02:10:46) > These patches were reviewed and acked but dropped during merge window. > Patchwork link was https://lore.kernel.org/patchwork/cover/1004155/ > > Changes for v1: > - Updated lx2160a clockgen in alphabetical order > > Vabhav Sharma (2): >

Re: [PATCH kernel] KVM: PPC: Allocate guest TCEs on demand too

2019-02-27 Thread David Gibson
On Wed, Feb 27, 2019 at 07:42:35PM +1100, Alexey Kardashevskiy wrote: > We already allocate hardware TCE tables in multiple levels and skip > intermediate levels when we can, now it is a turn of the KVM TCE tables. > Thankfully these are allocated already in 2 levels. > > This moves the table's

Re: [PATCH 00/18] Add FADump support on PowerNV platform

2019-02-27 Thread Hari Bathini
On 27/02/19 9:07 AM, Daniel Axtens wrote: Hi Hari, Hi Daniel, Firmware-Assisted Dump (FADump) is currently supported only on pseries platform. This patch series adds support for powernv platform too. The first and third patches refactor the FADump code to make use of common code across

Re: [PATCH 00/18] Add FADump support on PowerNV platform

2019-02-27 Thread Hari Bathini
Hi Nick, On 27/02/19 9:48 AM, Nicholas Piggin wrote: Hari Bathini's on February 22, 2019 3:35 am: Firmware-Assisted Dump (FADump) is currently supported only on pseries platform. This patch series adds support for powernv platform too. The first and third patches refactor the FADump code to

Re: [PATCH] powernv: powercap: Add hard minimum powercap

2019-02-27 Thread Daniel Axtens
Shilpasri G Bhat writes: > In POWER9, OCC(On-Chip-Controller) provides for hard and soft system > powercapping range. The hard powercap range is guaranteed while soft > powercap may or may not be asserted due to various power-thermal > reasons based on system configuration and workloads. This

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-02-27 Thread Andrew Donnellan
On 27/2/19 3:57 pm, Alastair D'Silva wrote: From: Alastair D'Silva Use %# instead of using a literal '0x' Signed-off-by: Alastair D'Silva Not hugely fussed either way, but today I learned about %#... Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c | 6 +++---

Re: [PATCH 3/5] ocxl: read_pasid never returns an error, so make it void

2019-02-27 Thread Andrew Donnellan
On 27/2/19 3:57 pm, Alastair D'Silva wrote: From: Alastair D'Silva No need for a return value in read_pasid as it only returns 0. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c | 9 ++--- 1 file changed, 2

[PATCH] powerpc: fix "sz" set but not used

2019-02-27 Thread Qian Cai
arch/powerpc/mm/hugetlbpage-hash64.c: In function '__hash_page_huge': arch/powerpc/mm/hugetlbpage-hash64.c:29:28: warning: variable 'sz' set but not used [-Wunused-but-set-variable] Signed-off-by: Qian Cai --- arch/powerpc/mm/hugetlbpage-hash64.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH 4/5] ocxl: Remove superfluous 'extern' from headers

2019-02-27 Thread Andrew Donnellan
On 27/2/19 3:57 pm, Alastair D'Silva wrote: From: Alastair D'Silva The 'extern' keyword adds no value here. Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan --- drivers/misc/ocxl/ocxl_internal.h | 54 +++ include/misc/ocxl.h | 36

Re: PROBLEM: monotonic clock going backwards on ppc64

2019-02-27 Thread Mathieu Malaterre
On Tue, Feb 26, 2019 at 9:36 PM Jakub Drnec wrote: > > Hi all, > > I think I observed a potential problem, is this the correct place to report > it? (CC me, not on list) > > [1.] One line summary: monotonic clock can be made to decrease on ppc64 > [2.] Full description: > Setting the realtime

Re: [PATCH] powernv: powercap: Add hard minimum powercap

2019-02-27 Thread Shilpasri G Bhat
Hi, On 02/28/2019 10:14 AM, Daniel Axtens wrote: > Shilpasri G Bhat writes: > >> In POWER9, OCC(On-Chip-Controller) provides for hard and soft system >> powercapping range. The hard powercap range is guaranteed while soft >> powercap may or may not be asserted due to various power-thermal >>

[PATCH] ASoC: cs42xx8: Remove S32_LE in format list

2019-02-27 Thread S.j. Wang
cs42xx8 is a 24-bit A/D and 24-bit D/A device, so the S32_LE should not be in the supported format list. Signed-off-by: Shengjiu Wang --- sound/soc/codecs/cs42xx8.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c

Re: PROBLEM: monotonic clock going backwards on ppc64

2019-02-27 Thread Daniel Axtens
Hi, > I think I observed a potential problem, is this the correct place to report > it? (CC me, not on list) Yes > [1.] One line summary: monotonic clock can be made to decrease on ppc64 > [2.] Full description: > Setting the realtime clock can sometimes make the monotonic clock go back by >