[PATCH 0/3] Resolve -Wattribute-alias warnings from SYSCALL_DEFINEx()

2018-06-15 Thread Paul Burton
This series introduces infrastructure allowing compiler diagnostics to be disabled or their severity modified for specific pieces of code, with suitable abstractions to prevent that code from becoming tied to a specific compiler. This infrastructure is then used to disable the -Wattribute-alias wa

[PATCH 2/3] disable -Wattribute-alias warning for SYSCALL_DEFINEx()

2018-06-15 Thread Paul Burton
From: Arnd Bergmann gcc-8 warns for every single definition of a system call entry point, e.g.: include/linux/compat.h:56:18: error: 'compat_sys_rt_sigprocmask' alias between functions of incompatible types 'long int(int, compat_sigset_t *, compat_sigset_t *, compat_size_t)' {aka 'long int(in

[PATCH 3/3] Revert "powerpc: fix build failure by disabling attribute-alias warning in pci_32"

2018-06-15 Thread Paul Burton
With SYSCALL_DEFINEx() disabling -Wattribute-alias generically, there's no need to duplicate that for PowerPC's pciconfig_iobase syscall. This reverts commit 415520373975 ("powerpc: fix build failure by disabling attribute-alias warning in pci_32"). Signed-off-by: Paul Burton Cc: Michal Marek C

[PATCH 1/3] kbuild: add macro for controlling warnings to linux/compiler.h

2018-06-15 Thread Paul Burton
From: Arnd Bergmann I have occasionally run into a situation where it would make sense to control a compiler warning from a source file rather than doing so from a Makefile using the $(cc-disable-warning, ...) or $(cc-option, ...) helpers. The approach here is similar to what glibc uses, using _

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-15 Thread Benjamin Herrenschmidt
On Fri, 2018-06-15 at 02:16 -0700, Christoph Hellwig wrote: > On Wed, Jun 13, 2018 at 11:11:01PM +1000, Benjamin Herrenschmidt wrote: > > Actually ... the stuff in lib/dma-direct.c seems to be just it, no ? > > > > There's no cache flushing and there's no architecture hooks that I can > > see othe

Re: [PATCH kernel 2/2] powerpc/powernv: Define PHB4 type and enable sketchy bypass on POWER9

2018-06-15 Thread Benjamin Herrenschmidt
On Fri, 2018-06-01 at 18:10 +1000, Alexey Kardashevskiy wrote: > These are found in POWER9 chips. Right now these PHBs have unknown type > so changing it to PHB4 won't make much of a difference except enabling > sketchy bypass for POWER9 as this does below. And that will break on multi-chip system

Re: [PATCH kernel 1/2] powerpc/powernv: Reuse existing TCE code for sketchy bypass

2018-06-15 Thread Benjamin Herrenschmidt
On Fri, 2018-06-01 at 18:10 +1000, Alexey Kardashevskiy wrote: > The existing sketchy bypass ignores the existing default 32bit TCE table > (created by default for every PE at boot time or after being used by > VFIO) and it allocates another table instead without updating PE DMA > config (pe->table

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-15 Thread Ricardo Neri
On Fri, Jun 15, 2018 at 11:19:09AM +0200, Thomas Gleixner wrote: > On Thu, 14 Jun 2018, Ricardo Neri wrote: > > On Wed, Jun 13, 2018 at 11:40:00AM +0200, Thomas Gleixner wrote: > > > On Tue, 12 Jun 2018, Ricardo Neri wrote: > > > > @@ -183,6 +184,8 @@ static irqreturn_t > > > > hardlockup_detector

Re: [RFC PATCH 20/23] watchdog/hardlockup/hpet: Rotate interrupt among all monitored CPUs

2018-06-15 Thread Ricardo Neri
On Fri, Jun 15, 2018 at 12:29:06PM +0200, Thomas Gleixner wrote: > On Thu, 14 Jun 2018, Ricardo Neri wrote: > > On Wed, Jun 13, 2018 at 11:48:09AM +0200, Thomas Gleixner wrote: > > > On Tue, 12 Jun 2018, Ricardo Neri wrote: > > > > + /* There are no CPUs to monitor. */ > > > > + if (!cp

Re: [RFC PATCH 03/23] genirq: Introduce IRQF_DELIVER_AS_NMI

2018-06-15 Thread Ricardo Neri
On Fri, Jun 15, 2018 at 09:01:02AM +0100, Julien Thierry wrote: > Hi Ricardo, > > On 15/06/18 03:12, Ricardo Neri wrote: > >On Wed, Jun 13, 2018 at 11:06:25AM +0100, Marc Zyngier wrote: > >>On 13/06/18 10:20, Thomas Gleixner wrote: > >>>On Wed, 13 Jun 2018, Julien Thierry wrote: > On 13/06/18

Re: [PATCH 1/3] powerpc/tm: Remove msr_tm_active()

2018-06-15 Thread kbuild test robot
Hi Breno, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.17 next-20180615] [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: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-15 Thread Christoph Hellwig
On Wed, Jun 13, 2018 at 11:11:01PM +1000, Benjamin Herrenschmidt wrote: > Actually ... the stuff in lib/dma-direct.c seems to be just it, no ? > > There's no cache flushing and there's no architecture hooks that I can > see other than the AMD security stuff which is probably fine. > > Or am I mis

[PATCH 3/3] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread()

2018-06-15 Thread Breno Leitao
From: Cyril Bur tm_reclaim_thread() doesn't use the parameter anymore, both callers have to bother getting it as they have no need for a struct thread_info either. It was previously used but became unused in dc3106690b20 ("powerpc: tm: Always use fp_state and vr_state to store live registers")

[PATCH 2/3] powerpc/tm: Fix HTM documentation

2018-06-15 Thread Breno Leitao
This patch simply fix part of the documentation on the HTM code. This fixes reference to old fields that were renamed in commit 000ec280e3dd ("powerpc: tm: Rename transct_(*) to ck(\1)_state"). It also documents better the flow after commit eb5c3f1c8647 ("powerpc: Always save/restore checkpointed

[PATCH 1/3] powerpc/tm: Remove msr_tm_active()

2018-06-15 Thread Breno Leitao
Currently msr_tm_active() is a wrapper around MSR_TM_ACTIVE() if CONFIG_PPC_TRANSACTIONAL_MEM is set, or it is just a function that returns false if CONFIG_PPC_TRANSACTIONAL_MEM is not set. This function is not necessary, since MSR_TM_ACTIVE() just do the same, checking for the TS bits and does no

Re: [powerpc/powervmc]kernel BUG at arch/powerpc/mm/pgtable-book3s64.c:414!

2018-06-15 Thread Michael Ellerman
vrbagal1 writes: > Hi, > > Observing kernel bug followed by kernel oops and system reboots, while > running kselftest on Power8 LPAR. > > Machine Details: Power8 LPAR > Git Tree: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > Commit ID: f5b7769eb0400ec5217a47e41148a9f816

Re: UBSAN: Undefined behaviour in ../include/linux/percpu_counter.h:137:13

2018-06-15 Thread Michael Ellerman
Mathieu Malaterre writes: > On Wed, Jun 13, 2018 at 10:43 AM Mathieu Malaterre wrote: >> On Wed, Jun 13, 2018 at 3:43 AM Michael Ellerman wrote: >> > Mathieu Malaterre writes: >> > > Hi there, >> > > >> > > I have a reproducible UBSAN appearing in dmesg after a while on my G4 >> > > (*). Could

Re: [PATCH] powerpc/64s: Report SLB multi-hit rather than parity error

2018-06-15 Thread Michael Ellerman
Nicholas Piggin writes: > On Wed, 13 Jun 2018 23:24:14 +1000 > Michael Ellerman wrote: > >> When we take an SLB multi-hit on bare metal, we see both the multi-hit >> and parity error bits set in DSISR. The user manuals indicates this is >> expected to always happen on Power8, whereas on Power9 it

Re: [RFC PATCH 20/23] watchdog/hardlockup/hpet: Rotate interrupt among all monitored CPUs

2018-06-15 Thread Thomas Gleixner
On Thu, 14 Jun 2018, Ricardo Neri wrote: > On Wed, Jun 13, 2018 at 11:48:09AM +0200, Thomas Gleixner wrote: > > On Tue, 12 Jun 2018, Ricardo Neri wrote: > > > + /* There are no CPUs to monitor. */ > > > + if (!cpumask_weight(&hdata->monitored_mask)) > > > + return NMI_HANDLED; > > > + > > >

Re: [PATCH] powerpc/mm: Fix kernel crash on page table free

2018-06-15 Thread Aneesh Kumar K.V
On 06/15/2018 03:24 AM, Christophe Leroy wrote: On 05/30/2018 12:32 PM, Aneesh Kumar K.V wrote: Fix the below crash on BookE 64. pgtable_page_dtor expects struct page *arg. Also call the destructor on non book3s platforms correctly. This free up the split ptl locks correctly if we had allo

Re: [PATCH] powerpc/mm: Fix kernel crash on page table free

2018-06-15 Thread Christophe Leroy
On 05/30/2018 12:32 PM, Aneesh Kumar K.V wrote: Fix the below crash on BookE 64. pgtable_page_dtor expects struct page *arg. Also call the destructor on non book3s platforms correctly. This free up the split ptl locks correctly if we had allocated them before. Call Trace: [c000f30c7520]

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-15 Thread Thomas Gleixner
On Thu, 14 Jun 2018, Ricardo Neri wrote: > On Wed, Jun 13, 2018 at 11:40:00AM +0200, Thomas Gleixner wrote: > > On Tue, 12 Jun 2018, Ricardo Neri wrote: > > > @@ -183,6 +184,8 @@ static irqreturn_t > > > hardlockup_detector_irq_handler(int irq, void *data) > > > if (!(hdata->flags & HPET_DEV_PER

Re: [PATCH kernel 0/2] powerpc/powernv: Rework sketchy bypass

2018-06-15 Thread Alexey Kardashevskiy
On Fri, 1 Jun 2018 18:10:26 +1000 Alexey Kardashevskiy wrote: > I came across this adhoc implementation and thought it could use some > polishing. This fixes memory leaks and add P9 support. Based on the current > upstream. > > > Please comment. Thanks. Ping? > > > > Alexey Kardashevski

Re: [PATCH] media: fsl-viu: Use proper check for presence of {out,in}_be32()

2018-06-15 Thread Hans Verkuil
On 08/06/18 11:48, Geert Uytterhoeven wrote: > When compile-testing on m68k or microblaze: > > drivers/media/platform/fsl-viu.c:41:1: warning: "out_be32" redefined > drivers/media/platform/fsl-viu.c:42:1: warning: "in_be32" redefined > > Fix this by replacing the check for PowerPC by chec

Re: [RFC PATCH 03/23] genirq: Introduce IRQF_DELIVER_AS_NMI

2018-06-15 Thread Julien Thierry
Hi Ricardo, On 15/06/18 03:12, Ricardo Neri wrote: On Wed, Jun 13, 2018 at 11:06:25AM +0100, Marc Zyngier wrote: On 13/06/18 10:20, Thomas Gleixner wrote: On Wed, 13 Jun 2018, Julien Thierry wrote: On 13/06/18 09:34, Peter Zijlstra wrote: On Tue, Jun 12, 2018 at 05:57:23PM -0700, Ricardo Ner

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

2018-06-15 Thread Alexey Kardashevskiy
On 14/6/18 10:35 pm, David Gibson wrote: > On Thu, Jun 14, 2018 at 04:35:18PM +1000, Alexey Kardashevskiy wrote: >> On 12/6/18 2:17 pm, David Gibson wrote: >>> On Fri, Jun 08, 2018 at 03:46:33PM +1000, Alexey Kardashevskiy wrote: At the moment we allocate the entire TCE table, twice (hardware