[PATCH 1/3] powerpc: Move isa bridge definitions to separate include

2017-01-29 Thread Benjamin Herrenschmidt
We'll be adding non-PCI isa bridge support so let's not have all the definition in pci-bridge.h Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/isa-bridge.h | 28 arch/powerpc/include/asm/pci-bridge.h | 18 -- arch/powerpc/k

[PATCH 2/3] powerpc: Add support for non-PCI ISA bridges

2017-01-29 Thread Benjamin Herrenschmidt
The POWER9 chip supports an LPC bus that isn't hanging off a PCI bus, so let's add support for that, mapping it to the reserved space at ISA_IO_BASE Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/isa-bridge.h | 1 + arch/powerpc/kernel/isa-bridge.c | 91

[PATCH 3/3] powerpc/powernv: Add support for direct mapped LPC on POWER9

2017-01-29 Thread Benjamin Herrenschmidt
Use the new non-PCI ISA bridge support to expose the POWER9 LPC bus as direct mapped via the ISA IO port range. This enables direct access via drivers such as 8250 Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/legacy_serial.c | 3 ++- arch/powerpc/platforms/powernv/opal-lp

Re: [PATCH v6 3/5] cpuidle:powernv: Add helper function to populate powernv idle states.

2017-01-29 Thread Rafael J. Wysocki
On Mon, Jan 30, 2017 at 4:47 AM, Michael Ellerman wrote: > "Gautham R. Shenoy" writes: > >> From: "Gautham R. Shenoy" >> >> In the current code for powernv_add_idle_states, there is a lot of code >> duplication while initializing an idle state in powernv_states table. >> >> Add an inline helper

[PATCH 3/3] powerpc/sparse: constify the address pointer in __get_user_nosleep

2017-01-29 Thread Daniel Axtens
In __get_user_nosleep, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_nosleep macro. Signed-off-by: Daniel Axtens --- This is

[PATCH 2/3] powerpc/sparse: constify the address pointer in __get_user_nocheck

2017-01-29 Thread Daniel Axtens
In __get_user_nocheck, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_nocheck macro. Signed-off-by: Daniel Axtens --- This sq

[PATCH 1/3] powerpc/sparse: constify the address pointer in __get_user_check

2017-01-29 Thread Daniel Axtens
In __get_user_check, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_check macro. Signed-off-by: Daniel Axtens --- This fixes

[PATCH 0/3] powerpc/sparse: constify addresses in get_user macros

2017-01-29 Thread Daniel Axtens
Looking through the sparse warnings, I noticed that we were getting warnings about dropping const qualifiers in get_user calls. This took a while to figure out: it turns out that if you pass a const pointer in, sparse will complain when we drop the const qualifier deep inside the __get_user_ macros

Re: [PATCH] powerpc/mm/hash: Properly mask the ESID bits when building proto-VSID

2017-01-29 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > proto-vsid is built using both mmu context id and ESID. We should not have > overlapping bits between those. That will result in us having vsid > collision. With the current code we missed masking the top bits of effective > address. This implies for kernel address we

Re: [PATCH] powerpc/mm: Fix RECLAIM_DISTANCE

2017-01-29 Thread Gavin Shan
On Mon, Jan 30, 2017 at 12:02:40PM +1100, Anton Blanchard wrote: >> Anton suggested that NUMA distances in powerpc mattered and hurted >> performance without this setting. We need to validate to see if this >> is still true. A simple way to start would be benchmarking > >The original issue was that

Re: ibmvtpm byteswapping inconsistency

2017-01-29 Thread Michael Ellerman
Tyrel Datwyler writes: > On 01/27/2017 01:03 AM, Michal Suchanek wrote: >> On 27 January 2017 at 02:50, Benjamin Herrenschmidt >> wrote: >>> On Thu, 2017-01-26 at 17:42 -0800, Tyrel Datwyler wrote: On 01/26/2017 12:22 PM, Michal Suchánek wrote: > Hello, > > building ibmvtpm I no

Re: linux-next: manual merge of the rcu tree with the powerpc-fixes tree

2017-01-29 Thread Michael Ellerman
Stephen Rothwell writes: > Hi Paul, > > Today's linux-next merge of the rcu tree got a conflict in: > > arch/powerpc/Kconfig > > between commit: > > f2574030b0e3 ("powerpc: Revert the initial stack protector support") > > from the powerpc-fixes tree and commit: > > c7327406b3c3 ("rcu: Make

Re: [PATCH v6 3/5] cpuidle:powernv: Add helper function to populate powernv idle states.

2017-01-29 Thread Michael Ellerman
"Gautham R. Shenoy" writes: > From: "Gautham R. Shenoy" > > In the current code for powernv_add_idle_states, there is a lot of code > duplication while initializing an idle state in powernv_states table. > > Add an inline helper function to populate the powernv_states[] table > for a given idle

linux-next: manual merge of the rcu tree with the powerpc-fixes tree

2017-01-29 Thread Stephen Rothwell
Hi Paul, Today's linux-next merge of the rcu tree got a conflict in: arch/powerpc/Kconfig between commit: f2574030b0e3 ("powerpc: Revert the initial stack protector support") from the powerpc-fixes tree and commit: c7327406b3c3 ("rcu: Make arch select smp_mb__after_unlock_lock() strengt

Re: [PATCH] powerpc/mm: Fix RECLAIM_DISTANCE

2017-01-29 Thread Anton Blanchard
Hi, > Anton suggested that NUMA distances in powerpc mattered and hurted > performance without this setting. We need to validate to see if this > is still true. A simple way to start would be benchmarking The original issue was that we never reclaimed local clean pagecache. I just tried all sett

[PATCH] macintosh: windfarm_smu_sensors: constify wf_sensor_ops structures

2017-01-29 Thread Bhumika Goyal
Declare wf_sensor_ops structures as const as they are only stored in the ops field of a wf_sensor structure. This field is of type const, so wf_sensor_ops structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ stati