[PATCH] powerpc/pseries: fix memory leak in queue_hotplug_event() error path

2016-09-18 Thread Andrew Donnellan
If we fail to allocate work, we don't end up using hp_errlog_copy. Free it in the error path. Signed-off-by: Andrew Donnellan --- Found by Coverity Scan. Compile tested only. --- arch/powerpc/platforms/pseries/dlpar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/p

[PATCH] perf tests: Add dwarf unwind test for powerpc

2016-09-18 Thread Ravi Bangoria
User stack dump feature is recently added for powerpc. But there was no test case available to test it. This test works same as other on arch by preparing stack frame on perf test thread and comparing each frame by unwinding it. $ ./perf test 50 50: Test dwarf unwind: Ok User stack dump

Re: [PATCH] powernv/pci: Fix m64 checks for SR-IOV and window alignment

2016-09-18 Thread Russell Currey
On Wed, 2016-09-14 at 21:30 +1000, Gavin Shan wrote: > On Wed, Sep 14, 2016 at 05:51:08PM +1000, Benjamin Herrenschmidt wrote: > > > > On Wed, 2016-09-14 at 16:37 +1000, Russell Currey wrote: > > > > > > Commit 5958d19a143e checks for prefetchable m64 BARs by comparing the > > > addresses instead

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-18 Thread Aneesh Kumar K.V
Reza Arbab writes: > Onlining memory into ZONE_MOVABLE requires CONFIG_MOVABLE_NODE. Enable > the use of this config option on PPC64 platforms. > > Signed-off-by: Reza Arbab > --- > Documentation/kernel-parameters.txt | 2 +- > mm/Kconfig | 2 +- > 2 files changed, 2 in

Re: [PATCH 12/13] powerpc: Add a Kconfig and a functions to set new soft_enabled mask

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 04:26 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:32:02 +0530 Madhavan Srinivasan wrote: diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 9e5e9a6d4147..ae31b1e85fdb 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq

Re: [PATCH RESEND] powerpc: fix usage of _PAGE_RO in hugepage

2016-09-18 Thread Aneesh Kumar K.V
Christophe Leroy writes: > On some CPUs like the 8xx, _PAGE_RW hence _PAGE_WRITE is defined > as 0 and _PAGE_RO has to be set when a page is not writable > > _PAGE_RO is defined by default in pte-common.h, however BOOK3S/64 > doesn't include that file so _PAGE_RO has to be defined explicitly > in

Re: [PATCH 10/13] powerpc: Add "bitmask" paramater to MASKABLE_* macros

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 04:33 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:32:00 +0530 Madhavan Srinivasan wrote: Make it explicit the interrupt masking supported by a gievn interrupt handler. Patch correspondingly extends the MASKABLE_* macros with an addition's parameter. "bitmask

Re: [PATCH 09/13] powerpc: Introduce new mask bit for soft_enabled

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:46 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:59 +0530 Madhavan Srinivasan wrote: Currently soft_enabled is used as the flag to determine the interrupt state. Patch extends the soft_enabled to be used as a mask instead of a flag. This should be the t

Re: [PATCH 08/13] powerpc: Add new _EXCEPTION_PROLOG_1 macro

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:42 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:58 +0530 Madhavan Srinivasan wrote: To support addition of "bitmask" to MASKABLE_* macros, factor out the EXCPETION_PROLOG_1 macro. Signed-off-by: Madhavan Srinivasan Really minor nit, but as a matter o

Re: [PATCH v2 2/3] powerpc: get hugetlbpage handling more generic

2016-09-18 Thread Aneesh Kumar K.V
Christophe Leroy writes: > +#else > +static void hugepd_free(struct mmu_gather *tlb, void *hugepte) > +{ > + BUG(); > +} > + > #endif I was expecting that BUG will get removed in the next patch. But I don't see it in the next patch. Considering @@ -475,11 +453,10 @@ static void free_hugep

Re: [PATCH v2 2/3] powerpc: get hugetlbpage handling more generic

2016-09-18 Thread Aneesh Kumar K.V
Christophe Leroy writes: > Today there are two implementations of hugetlbpages which are managed > by exclusive #ifdefs: > * FSL_BOOKE: several directory entries points to the same single hugepage > * BOOK3S: one upper level directory entry points to a table of hugepages > > In preparation of imp

Re: [PATCH 06/13] powerpc: reverse the soft_enable logic

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:35 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:56 +0530 Madhavan Srinivasan wrote: "paca->soft_enabled" is used as a flag to mask some of interrupts. Currently supported flags values and their details: soft_enabledMSR[EE] 0 0

Re: [PATCH 05/13] powerpc: Add soft_enabled manipulation functions

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:27 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:55 +0530 Madhavan Srinivasan wrote: Add new soft_enabled_* manipulation function and implement arch_local_* using the soft_enabled_* wrappers. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/includ

Re: [PATCH 04/13] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2016-09-18 Thread Madhavan Srinivasan
On Monday 19 September 2016 08:22 AM, Nicholas Piggin wrote: On Fri, 16 Sep 2016 13:22:24 + David Laight wrote: From: Nicholas Piggin Sent: 16 September 2016 12:59 On Fri, 16 Sep 2016 11:43:13 + David Laight wrote: From: Nicholas Piggin Sent: 16 September 2016 10:53 On Thu, 1

Re: [PATCH 2/2] powerpc: tm: Enable transactional memory (TM) lazily for userspace

2016-09-18 Thread Cyril Bur
On Mon, 2016-09-19 at 12:47 +0800, Simon Guo wrote: > On Wed, Sep 14, 2016 at 06:02:16PM +1000, Cyril Bur wrote: > > > > @@ -954,8 +963,16 @@ static inline void __switch_to_tm(struct > > task_struct *prev, > >   struct task_struct *new) > >  { > >   if (cpu_has_feature(CPU_FTR_TM)) { >

[PATCH v7 6/6] powerpc: pSeries: Add pv-qspinlock build config/make

2016-09-18 Thread Pan Xinhui
pSeries run as a guest and might need pv-qspinlock. Signed-off-by: Pan Xinhui --- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/platforms/pseries/Kconfig | 8 2 files changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index fe

[PATCH v7 5/6] powerpc/pv-qspinlock: powerpc support pv-qspinlock

2016-09-18 Thread Pan Xinhui
The default pv-qspinlock uses qspinlock(native version of pv-qspinlock). pv_lock initialization should be done in bootstage with irq disabled. And if we run as a guest with powerKVM/pHyp shared_processor mode, restore pv_lock_ops callbacks to pv-qspinlock(pv version) which makes full use of virtual

[PATCH v7 4/6] powerpc: lib/locks.c: Add cpu yield/wake helper function

2016-09-18 Thread Pan Xinhui
Add two corresponding helper functions to support pv-qspinlock. For normal use, __spin_yield_cpu will confer current vcpu slices to the target vcpu(say, a lock holder). If target vcpu is not specified or it is in running state, such conferging to lpar happens or not depends. Because hcall itself

[PATCH v7 3/6] powerpc: pseries/Kconfig: Add qspinlock build config

2016-09-18 Thread Pan Xinhui
pseries will use qspinlock by default. Signed-off-by: Pan Xinhui --- arch/powerpc/platforms/pseries/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index bec90fb..f669323 100644 --- a/arch/powerpc/platfo

[PATCH v7 2/6] powerpc/qspinlock: powerpc support qspinlock

2016-09-18 Thread Pan Xinhui
This patch add basic code to enable qspinlock on powerpc. qspinlock is one kind of fairlock implemention. And seen some performance improvement under some scenarios. queued_spin_unlock() release the lock by just one write of NULL to the ->locked field which sits at different places in the two endi

[PATCH v7 1/6] pv-qspinlock: use cmpxchg_release in __pv_queued_spin_unlock

2016-09-18 Thread Pan Xinhui
cmpxchg_release() is more lighweight than cmpxchg() on some archs(e.g. PPC), moreover, in __pv_queued_spin_unlock() we only needs a RELEASE in the fast path(pairing with *_try_lock() or *_lock()). And the slow path has smp_store_release too. So it's safe to use cmpxchg_release here. Suggested-by:

[PATCH v7 0/6] Implement qspinlock/pv-qspinlock on ppc

2016-09-18 Thread Pan Xinhui
Hi All, this is the fairlock patchset. You can apply them and build successfully. patches are based on 4.8-rc4. qspinlock can avoid waiter starved issue. It has about the same speed in single-thread and it can be much faster in high contention situations especially when the spinlock is embedded

Re: [PATCH v2 1/3] powerpc: port 64 bits pgtable_cache to 32 bits

2016-09-18 Thread Aneesh Kumar K.V
Christophe Leroy writes: > Today powerpc64 uses a set of pgtable_caches while powerpc32 uses > standard pages when using 4k pages and a single pgtable_cache > if using other size pages. > > In preparation of implementing huge pages on the 8xx, this patch > replaces the specific powerpc32 handling

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-18 Thread Aneesh Kumar K.V
> diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h > index 3b5bafc..695743c 100644 > --- a/include/linux/bit_spinlock.h > +++ b/include/linux/bit_spinlock.h > @@ -25,9 +25,8 @@ static inline void bit_spin_lock(int bitnum, unsigned long > *addr) > #if defined(CONFIG_SMP) |

Re: [PATCH 04/13] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 05:13 PM, David Laight wrote: From: Nicholas Piggin Sent: 16 September 2016 10:53 On Thu, 15 Sep 2016 18:31:54 +0530 Madhavan Srinivasan wrote: Force use of soft_enabled_set() wrapper to update paca-soft_enabled wherever possisble. Also add a new wrapper function

Re: [PATCH 2/2] powerpc: tm: Enable transactional memory (TM) lazily for userspace

2016-09-18 Thread Simon Guo
On Wed, Sep 14, 2016 at 06:02:16PM +1000, Cyril Bur wrote: > @@ -954,8 +963,16 @@ static inline void __switch_to_tm(struct task_struct > *prev, > struct task_struct *new) > { > if (cpu_has_feature(CPU_FTR_TM)) { > - tm_enable(); > - tm_reclaim_task(prev

Re: [PATCH 04/13] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:23 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:54 +0530 Madhavan Srinivasan wrote: Force use of soft_enabled_set() wrapper to update paca-soft_enabled wherever possisble. Also add a new wrapper function, soft_enabled_set_return(), added to force the pa

Re: [PATCH 03/13] powerpc: move set_soft_enabled() and rename

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:20 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:53 +0530 Madhavan Srinivasan wrote: Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c. and rename it soft_enabled_set(). THis way paca->soft_enabled updates can be forced. Could you just t

Re: [PATCH 02/13] powerpc: Cleanup to use IRQ_DISABLE_MASK_* macros for paca->soft_enabled update

2016-09-18 Thread Madhavan Srinivasan
On Friday 16 September 2016 03:17 PM, Nicholas Piggin wrote: On Thu, 15 Sep 2016 18:31:52 +0530 Madhavan Srinivasan wrote: Replace the hardcoded values used when updating paca->soft_enabled with IRQ_DISABLE_MASK_* #def. No logic change. This could be folded with patch 1. Sure. Will do it.

Re: [PATCH 04/13] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2016-09-18 Thread Nicholas Piggin
On Fri, 16 Sep 2016 13:22:24 + David Laight wrote: > From: Nicholas Piggin > > Sent: 16 September 2016 12:59 > > On Fri, 16 Sep 2016 11:43:13 + > > David Laight wrote: > > > > > From: Nicholas Piggin > > > > Sent: 16 September 2016 10:53 > > > > On Thu, 15 Sep 2016 18:31:54 +0530 >

Re: Linux 4.8: Reported regressions as of Sunday, 2016-09-18

2016-09-18 Thread Dave Chinner
On Sun, Sep 18, 2016 at 03:20:53PM +0200, Thorsten Leemhuis wrote: > Hi! Here is my fourth regression report for Linux 4.8. It lists 14 > regressions I'm aware of. 5 of them are new; 1 mentioned in last > weeks report got fixed. > > As always: Are you aware of any other regressions? Then please l

Re: [PATCH V2 1/7] dt-bindings: Update QorIQ TMU thermal bindings

2016-09-18 Thread Zhang Rui
On 三, 2016-09-14 at 11:40 -0500, Leo Li wrote: > On Wed, Jun 8, 2016 at 2:52 PM, Rob Herring wrote: > > > > On Tue, Jun 07, 2016 at 11:27:34AM +0800, Jia Hongtao wrote: > > > > > > For different types of SoC the sensor id and endianness may vary. > > > "#thermal-sensor-cells" is used to provide

Re: [PATCH v14 13/15] selftests/powerpc: Add ptrace tests for TM SPR registers

2016-09-18 Thread Simon Guo
On Wed, Sep 14, 2016 at 03:04:12PM +1000, Cyril Bur wrote: > On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > > From: Anshuman Khandual > > > > This patch adds ptrace interface test for TM SPR registers. This > > also adds ptrace interface based helper functions related to TM >

[PATCH] PCI: Add parameter @mmio_force_on to pci_update_resource()

2016-09-18 Thread Gavin Shan
In pci_update_resource(), the PCI device's memory decoding (0x2 in PCI_COMMAND) is disabled when 64-bits memory BAR is updated if the PCI device's memory space wasn't asked to be always on by @pdev-> mmio_always_on. The PF's memory decoding might be disabled when updating its IOV BARs in the follow

Re: [PATHC v2 0/9] ima: carry the measurement list across kexec

2016-09-18 Thread Thiago Jung Bauermann
Am Samstag, 17 September 2016, 00:17:37 schrieb Eric W. Biederman: > Thiago Jung Bauermann writes: > > Hello Eric, > > > > Am Freitag, 16 September 2016, 14:47:13 schrieb Eric W. Biederman: > >> I can see tracking to see if the list has changed at some > >> point and causing a reboot(LINUX_REBOOT

Linux 4.8: Reported regressions as of Sunday, 2016-09-18

2016-09-18 Thread Thorsten Leemhuis
Hi! Here is my fourth regression report for Linux 4.8. It lists 14 regressions I'm aware of. 5 of them are new; 1 mentioned in last weeks report got fixed. As always: Are you aware of any other regressions? Then please let me know (simply CC regressi...@leemhuis.info). And pls tell me if there is

[PATCH] Removed dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected.

2016-09-18 Thread Elimar Riesebieter
We can use the front led of powerbooks/ibooks as a disk activitiy imagination without the deprecated IDE_GD_ATA. Signed-off-by: Elimar Riesebieter --- drivers/macintosh/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index d28690f.