Re: [RFC PATCH 14/23] watchdog/hardlockup: Decouple the hardlockup detector from perf

2018-06-14 Thread Ricardo Neri
On Thu, Jun 14, 2018 at 11:41:44AM +1000, Nicholas Piggin wrote: > On Wed, 13 Jun 2018 18:19:01 -0700 > Ricardo Neri wrote: > > > On Wed, Jun 13, 2018 at 10:43:24AM +0200, Peter Zijlstra wrote: > > > On Tue, Jun 12, 2018 at 05:57:34PM -0700, Ricardo Neri wrote: > > > > The current default imple

Re: [RFC PATCH 12/23] kernel/watchdog: Introduce a struct for NMI watchdog operations

2018-06-14 Thread Ricardo Neri
On Thu, Jun 14, 2018 at 12:32:50PM +1000, Nicholas Piggin wrote: > On Wed, 13 Jun 2018 18:31:17 -0700 > Ricardo Neri wrote: > > > On Wed, Jun 13, 2018 at 09:52:25PM +1000, Nicholas Piggin wrote: > > > On Wed, 13 Jun 2018 11:26:49 +0200 (CEST) > > > Thomas Gleixner wrote: > > > > > > > On Wed,

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

2018-06-14 Thread Ricardo Neri
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; > > + > > inspect_for_hardlockups(regs); > > > > +

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

2018-06-14 Thread Ricardo Neri
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 Neri wrote: > diff --git a/include/linu

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

2018-06-14 Thread Ricardo Neri
On Wed, Jun 13, 2018 at 11:07:20AM +0200, Peter Zijlstra wrote: > On Tue, Jun 12, 2018 at 05:57:37PM -0700, Ricardo Neri wrote: > > +static bool is_hpet_wdt_interrupt(struct hpet_hld_data *hdata) > +{ > + unsigned long this_isr; > + unsigned int lvl_trig; > + > + this_isr = hpet_

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

2018-06-14 Thread Ricardo Neri
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_PERI_CAP)) > > kick_timer(hdata); > >

[PATCH v3] powerpc/64s/radix: Fix MADV_[FREE|DONTNEED] TLB flush miss problem with THP

2018-06-14 Thread Nicholas Piggin
The patch 99baac21e4 ("mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem") added a force flush mode to the mmu_gather flush, which unconditionally flushes the entire address range being invalidated (even if actual ptes only covered a smaller range), to solve a problem with concurrent threads inva

Re: [PATCH v13 00/24] selftests, powerpc, x86 : Memory Protection Keys

2018-06-14 Thread Ram Pai
On Thu, Jun 14, 2018 at 10:19:11PM +0200, Florian Weimer wrote: > On 06/14/2018 02:44 AM, Ram Pai wrote: > >Test > > > >Verified for correctness on powerpc. Need help verifying on x86. > >Compiles on x86. > > It breaks make in tools/testing/selftests/x86: > > make: *** No rule to make target

Re: [PATCH v6 3/4] powerpc/lib: implement strlen() in assembly

2018-06-14 Thread Segher Boessenkool
On Tue, Jun 12, 2018 at 07:01:59PM +0200, Christophe LEROY wrote: > > > Le 12/06/2018 à 16:53, Segher Boessenkool a écrit : > >On Tue, Jun 12, 2018 at 09:14:53AM +, Christophe Leroy wrote: > >>--- > >>Not tested on PPC64. > > > >It won't be acceptable until that happens. It also is likely qu

Re: [PATCH] mm: convert return type of handle_mm_fault() caller to vm_fault_t

2018-06-14 Thread kbuild test robot
Hi Souptick, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.17] [cannot apply to linus/master powerpc/next sparc-next/master next-20180614] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

[PATCH] powerpc/e500mc: Set assembler machine type to e500mc

2018-06-14 Thread Michael Jeanson
In binutils 2.26 a new opcode for the "wait" instruction was added for the POWER9 and has precedence over the one specific to the e500mc. Commit ebf714ff3756 ("powerpc/e500mc: Add support for the wait instruction in e500_idle") uses this instruction specifically on the e500mc to work around an erra

Re: [PATCH v13 00/24] selftests, powerpc, x86 : Memory Protection Keys

2018-06-14 Thread Florian Weimer
On 06/14/2018 02:44 AM, Ram Pai wrote: Test Verified for correctness on powerpc. Need help verifying on x86. Compiles on x86. It breaks make in tools/testing/selftests/x86: make: *** No rule to make target `protection_keys.c', needed by `/home/linux/tools/testing/selftests/x86/protection

[PATCH] mm: convert return type of handle_mm_fault() caller to vm_fault_t

2018-06-14 Thread Souptick Joarder
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t") In this

Re: powerpc: use time64_t in read_persistent_clock

2018-06-14 Thread Mathieu Malaterre
On Thu, Jun 14, 2018 at 1:46 PM Arnd Bergmann wrote: > > On Wed, Jun 13, 2018 at 10:24 PM, Mathieu Malaterre wrote: > > Arnd, > > > > In 5bfd643583b2e I can see that you changed: > > > > $ git show 5bfd643583b2e -- arch/powerpc/platforms/powermac/time.c > > [...] > > #ifdef CONFIG_ADB_PMU > > -s

Re: [PATCH] misc: ocxl: Change return type for fault handler

2018-06-14 Thread Frederic Barrat
Le 11/06/2018 à 22:29, Souptick Joarder a écrit : Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Ref-> commit 1c8f422

Re: [RFC PATCH 2/5] powerpc: Flush checkpointed gpr state for 32-bit processes in ptrace

2018-06-14 Thread Pedro Franco de Carvalho
Michael Ellerman writes: > Can you add a helper that does it and use that helper in these two > functions. Then if you can send me another patch that converts all the > other uses to use the new helper. Yes, I'll do this. Thanks! -- Pedro

Re: [RFC PATCH 1/5] powerpc: Fix inverted active predicate for setting the EBB regset

2018-06-14 Thread Pedro Franco de Carvalho
Michael Ellerman writes: > Hi Pedro, > > Thanks for looking into this, how did you detect this? Do you have a > test case? Hello, I'm working on allowing these registers to be accessed through GDB, which is where I saw this happen. Then I used a small program that traces another, then reads and

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

2018-06-14 Thread David Gibson
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 part and > >> userspace translation cache).

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

2018-06-14 Thread Florian Weimer
On 06/14/2018 02:28 AM, Ram Pai wrote: Assortment of fixes to pkey. Patch 1 makes pkey consumable in multithreaded applications. Patch 2 fixes fork behavior to inherit the key attributes. Patch 3 A off-by-one bug made one key unusable. Fixes it. Patch 4 Execute-only key is preallocated.

Re: stacktrace.c:(.text+0x1b0): undefined reference to `.smp_send_safe_nmi_ipi'

2018-06-14 Thread Nicholas Piggin
ails > >> > >> Seems like that function only exists when CONFIG_NMI_IPI is defined. > >> > >> Problem introduced by commit 5cc05910f26e6fd6da15f052f86f6150e4b91664 > >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/kern

Re: powerpc: use time64_t in read_persistent_clock

2018-06-14 Thread Arnd Bergmann
On Wed, Jun 13, 2018 at 10:24 PM, Mathieu Malaterre wrote: > Arnd, > > In 5bfd643583b2e I can see that you changed: > > $ git show 5bfd643583b2e -- arch/powerpc/platforms/powermac/time.c > [...] > #ifdef CONFIG_ADB_PMU > -static unsigned long pmu_get_time(void) > +static time64_t pmu_get_time(voi

Re: stacktrace.c:(.text+0x1b0): undefined reference to `.smp_send_safe_nmi_ipi'

2018-06-14 Thread Christophe LEROY
5cc05910f26e6fd6da15f052f86f6150e4b91664 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/kernel/stacktrace.c?h=next-20180614&id=5cc05910f26e6fd6da15f052f86f6150e4b91664 What do you recommend to fix that ? We could just do smp_call_function in the case we hav

[PATCH] powerpc/mm/hash/4k: Free hugetlb page table caches correctly.

2018-06-14 Thread Aneesh Kumar K.V
With 4k page size for hugetlb we allocate hugepage directories from its on slab cache. With patch 0c4d26802 ("powerpc/book3s64/mm: Simplify the rcu callback for page table free") we missed to free these allocated hugepd tables. Update pgtable_free to handle hugetlb hugepd directory table. Fixes:

Re: stacktrace.c:(.text+0x1b0): undefined reference to `.smp_send_safe_nmi_ipi'

2018-06-14 Thread Nicholas Piggin
b91664 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/kernel/stacktrace.c?h=next-20180614&id=5cc05910f26e6fd6da15f052f86f6150e4b91664 > > > What do you recommend to fix that ? We could just do smp_call_function in the case we have no NMI_IPI? Thanks, Nick

stacktrace.c:(.text+0x1b0): undefined reference to `.smp_send_safe_nmi_ipi'

2018-06-14 Thread Christophe LEROY
/powerpc/kernel/stacktrace.c?h=next-20180614&id=5cc05910f26e6fd6da15f052f86f6150e4b91664 What do you recommend to fix that ? Christophe

Re: [RFC PATCH 12/23] kernel/watchdog: Introduce a struct for NMI watchdog operations

2018-06-14 Thread Thomas Gleixner
On Thu, 14 Jun 2018, Nicholas Piggin wrote: > On Wed, 13 Jun 2018 18:31:17 -0700 > > I could look into creating the library for > > common code and relocate the hpet watchdog into arch/x86 for the hpet- > > specific parts. > > If you can investigate that approach, that would be appreciated. I hope