[PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations

2015-01-19 Thread Shreyas B. Prabhu
PECE1 bit in LPCR is used to control whether decrementer can cause exit from powersaving states. PECE1 bit is cleared before entering fastsleep or deeper powersaving state and it is set on waking up. Since both cpuidle and cpu offline operations use these powersaving states, add helper functions to

[PATCH v2 2/2] powerpc: powernv: winkle: Restore LPCR with LPCR_PECE1 cleared

2015-01-19 Thread Shreyas B. Prabhu
LPCR_PECE1 bit controls whether decrementer interrupts are allowed to cause exit from power-saving mode. While waking up from winkle, restoring LPCR with LPCR_PECE1 set (i.e Decrementer interrupts allowed) can cause issue in the following scenario: - All the threads in a core are offlined. The cor

[PATCH v2 1/1] powerpc: refresh mpc85xx_defconfig using "make savedefconfig"

2015-01-19 Thread Alessio Igor Bogani
Signed-off-by: Alessio Igor Bogani --- v1 -> v2 Rebased on v3.19-rc5 arch/powerpc/configs/mpc85xx_defconfig | 58 +++--- 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_def

[PATCH] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-19 Thread Preeti U Murthy
Today if a cpu handling broadcasting of wakeups goes offline, it hands over the job of broadcasting to another cpu in the CPU_DEAD phase. The CPU_DEAD notifiers are run only after the offline cpu sets its state as CPU_DEAD. Meanwhile, the kthread doing the offline is scheduled out while waiting for

[PATCH] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-19 Thread Preeti U Murthy
The device tree now exposes the residency values for different idle states. Read these values instead of calculating residency from the latency values. The values exposed in the DT are validated for optimal power efficiency. However to maintain compatibility with the older firmware code which doe

Re: [RFC 01/11] i2c: add quirk structure to describe adapter flaws

2015-01-19 Thread Wolfram Sang
Hi, > This can describe the behavior of our current upstream driver[1], which > only support combine write-then-read. > > After checking with Xudong & HW guys, it seems our HW can do more. > On MT8135, it can support at most 2 messages, no matter read or write, > with the limitation that the len

Re: [RFC 01/11] i2c: add quirk structure to describe adapter flaws

2015-01-19 Thread Wolfram Sang
> > + struct i2c_adapter_quirks *quirks; > > }; > > #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) > > > > I suggest to add const. > const struct i2c_adapter_quirks *quirks; > > also, in i2c-core.c, should modify: > const struct i2c_adapter_quirks *q = adap-

[PATCH v2] powerpc/8xx: reduce pressure on TLB due to context switches

2015-01-19 Thread Christophe Leroy
For nohash powerpc, when we run out of contexts, contexts are freed by stealing used contexts in-turn. When a victim has been selected, the associated TLB entries are freed using _tlbil_pid(). Unfortunatly, on the PPC 8xx, _tlbil_pid() does a tlbia, hence flushes ALL TLB entries and not only the on

[PATCH v4 0/2] powerpc32: handle inverted _PAGE_RW bit outside of TLB handlers

2015-01-19 Thread Christophe Leroy
Some powerpc like the 8xx don't have a RW bit in PTE bits but a RO (Read Only) bit. This patch implements the handling of a _PAGE_RO flag to be used in place of _PAGE_RW Patchset: 1) powerpc32: adds handling of _PAGE_RO 2) powerpc/8xx: use _PAGE_RO instead of _PAGE_RW All changes have been succ

[PATCH v4 1/2] powerpc32: adds handling of _PAGE_RO

2015-01-19 Thread Christophe Leroy
Some powerpc like the 8xx don't have a RW bit in PTE bits but a RO (Read Only) bit. This patch implements the handling of a _PAGE_RO flag to be used in place of _PAGE_RW Signed-off-by: Christophe Leroy --- v2 is a complete rework of v1 v3: - cleared PTE can remain 0, no need of _PAGE_RO on PA

[PATCH v4 2/2] powerpc/8xx: use _PAGE_RO instead of _PAGE_RW

2015-01-19 Thread Christophe Leroy
On powerpc 8xx, in TLB entries, 0x400 bit is set to 1 for read-only pages and is set to 0 for RW pages. So we should use _PAGE_RO instead of _PAGE_RW Signed-off-by: Christophe Leroy --- v2 is a complete rework compared to v1 v3: fixing pte_update() and comments v4: simplified pte_update() (andc

Re: [PATCH 1/4] CXL: Use image state defaults for reloading FPGA

2015-01-19 Thread Ryan Grimm
On 01/19/2015 12:03 AM, Ian Munsie wrote: Acked-by: Ian Munsie Looks like you forgot your Signed-off-by line - mpe, do you want Ryan to resend the whole patch (maybe with the below explanation included), or just reply with a Signed-off-by? OK resending. -Ryan This would also be good to CC

Re: [PATCH 1/2] clock: redefine variable clocks_per_pll as a struct member

2015-01-19 Thread Mike Turquette
Quoting yuantian.t...@freescale.com (2015-01-14 22:03:40) > From: Tang Yuantian > > redefine variable clocks_per_pll as a struct member > > If there are multiple PLL clock nodes, this variable will > get overwritten. Redefining it as a struct member can avoid that. > > Signed-off-by: Tang Yuant

[PATCH 1/4] CXL: Use image state defaults for reloading FPGA

2015-01-19 Thread Ryan Grimm
Select defaults such that a PERST causes flash image reload. Select which image based on what the card is set up to load. CXL_VSEC_PERST_LOADS_IMAGE selects whether PERST assertion causes flash image load. CXL_VSEC_PERST_SELECT_USER selects which image is loaded on the next PERST. cxl_update_im

[PATCH 2/4] CXL: Add image control to sysfs

2015-01-19 Thread Ryan Grimm
load_image_on_perst identifies whether a PERST will cause the image to be flashed to the card. And if so, which image. Valid entries are: "none", "user" and "factory". A value of "none" means PERST will not cause the image to be flashed. A power cycle to the pcie slot is required to load the im

[PATCH 4/4] CXL: Add ability to reset the card

2015-01-19 Thread Ryan Grimm
Adds reset to sysfs which will PERST the card. If load_image_on_perst is set to "user" or "factory", the PERST will cause that image to be loaded. load_image_on_perst is set to "user" for production. "none" could be used for debugging. The PSL trace arrays are preserved which then can be read t

[PATCH 3/4] CXL: Enable CAPP recovery

2015-01-19 Thread Ryan Grimm
Turning snoops on is the last step in CAPP recovery. Sapphire is expected to have reinitialized the PHB and done the previous recovery steps. Add mode argument to opal call to do this. Driver can turn snoops off although it does not currently. Signed-off-by: Ryan Grimm --- arch/powerpc/includ

[PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Wolfram Sang
Back in the days, sysfs seemed to have refcounting issues and subsystems needed a completion to be safe. This is not the case anymore, so I2C can get rid of this code. There is noone else besides I2C doing something like this currently (checked with the attached coccinelle script which checks if a

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Pantelis Antoniou
Hi Wolfram, > On Jan 19, 2015, at 20:55 , Wolfram Sang wrote: > > Back in the days, sysfs seemed to have refcounting issues and subsystems > needed a completion to be safe. This is not the case anymore, so I2C can > get rid of this code. There is noone else besides I2C doing something > like thi

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Russell King - ARM Linux
On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > Back in the days, sysfs seemed to have refcounting issues and subsystems > needed a completion to be safe. This is not the case anymore, so I2C can > get rid of this code. There is noone else besides I2C doing something > like this cur

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Wolfram Sang
On Mon, Jan 19, 2015 at 07:12:10PM +, Russell King - ARM Linux wrote: > On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > > Back in the days, sysfs seemed to have refcounting issues and subsystems > > needed a completion to be safe. This is not the case anymore, so I2C can > > get

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Lars-Peter Clausen
On 01/19/2015 07:55 PM, Wolfram Sang wrote: [...] Let's get rid of this code before really nobody knows/understands anymore what this was for and if it has a subtle use. Getting rid of this is the right thing, cause it's just not how it should be done, but unfortunately it is not as simple as

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Greg Kroah-Hartman
On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > Back in the days, sysfs seemed to have refcounting issues and subsystems > needed a completion to be safe. This is not the case anymore, so I2C can > get rid of this code. There is noone else besides I2C doing something > like this cur

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Wolfram Sang
> > @@ -1184,8 +1183,7 @@ EXPORT_SYMBOL_GPL(i2c_new_dummy); > > > > static void i2c_adapter_dev_release(struct device *dev) > > { > > - struct i2c_adapter *adap = to_i2c_adapter(dev); > > - complete(&adap->dev_released); > > + /* empty, but the driver core insists we need a release functi

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Russell King - ARM Linux
On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: > On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > index 39d25a8cb1ad..15cc5902cf89 100644 > > --- a/drivers/i2c/i2c-core.c > > +++ b/drivers/i2c/i2c

[PATCH 2/7] powerpc: Enable on demand governor on ppc64_defconfig

2015-01-19 Thread Anton Blanchard
This was enabled on the pseries defconfigs recently, but missed the ppc64 one. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index f1c4342..d

[PATCH 1/7] powerpc: regenerate ppc64 and pseries defconfigs

2015-01-19 Thread Anton Blanchard
Regenerate defconfigs using make savedefconfig. Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 11 +-- arch/powerpc/configs/pseries_defconfig| 12 +++- arch/powerpc/configs/pseries_le_defconfig | 14 +++--- 3 files changed, 7 insertions(+), 30 deletio

[PATCH 3/7] powerpc: Enable CONFIG_SATA_AHCI on pseries and ppc64 defconfigs

2015-01-19 Thread Anton Blanchard
We are starting to see ppc64 boxes with SATA AHCI adapters in it, so enable it in our defconfigs. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/pseries_le_defconfig | 1 + 3 files changed,

[PATCH 4/7] powerpc: Enable KSM on pseries and ppc64 defconfigs

2015-01-19 Thread Anton Blanchard
KSM will only be used on areas marked for merging via madvise, and it is showing nice improvements on KVM workloads, so enable it by default. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/

[PATCH 5/7] powerpc: Enable overlayfs on pseries and ppc64 defconfigs

2015-01-19 Thread Anton Blanchard
Signed-off-by: Anton Blanchard --- arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/pseries_le_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_d

[PATCH 6/7] powerpc: Enable various container features on pseries defconfigs.

2015-01-19 Thread Anton Blanchard
Enable config options required by lxc and docker. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/pseries_defconfig| 12 arch/powerpc/configs/pseries_le_defconfig | 12 2 files changed, 24 insertions(+) diff --git a/arch/powerpc/configs/pseries_defconfig b

[PATCH 7/7] powerpc: enable CONFIG_NETFILTER_XT_MARK

2015-01-19 Thread Anton Blanchard
docker requires CONFIG_NETFILTER_XT_MARK to be enabled. Unfortunately that means turning on CONFIG_NETFILTER_ADVANCED. Signed-off-by: Anton Blanchard --- arch/powerpc/configs/pseries_defconfig| 22 +- arch/powerpc/configs/pseries_le_defconfig | 22 +-

Re: [PATCH] fsl/smp: add low power boot support to replace spin boot

2015-01-19 Thread Scott Wood
On Thu, 2015-01-15 at 14:05 +0800, Dongsheng Wang wrote: > From: Wang Dongsheng > > U-boot put non-boot cpus into an low power state(PW10/PW20 or DOZE) when cpu > powered up. To exit low power state kernel will send DOORBELL or MPIC-IPI > signal to all those CPUs. U-Boot does not do this yet. A

Re: [PATCH 2/4] CXL: Add image control to sysfs

2015-01-19 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/4] CXL: Use image state defaults for reloading FPGA

2015-01-19 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 3/4] CXL: Enable CAPP recovery

2015-01-19 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 4/4] CXL: Add ability to reset the card

2015-01-19 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Greg Kroah-Hartman
On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: > On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: > > On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > > index 39d25a8cb1

Re: [PATCH 1/7] powerpc: regenerate ppc64 and pseries defconfigs

2015-01-19 Thread Stephen Rothwell
Hi Anton, On Tue, 20 Jan 2015 10:24:19 +1100 Anton Blanchard wrote: > > Regenerate defconfigs using make savedefconfig. I assume that you checked that we end up with (basically) the same .config (as some previous (to be defined but sane) release)? :-) -- Cheers, Stephen Rothwell

Re: [PATCH 2/7] powerpc: Enable on demand governor on ppc64_defconfig

2015-01-19 Thread Stephen Rothwell
Hi Anton, On Tue, 20 Jan 2015 10:24:20 +1100 Anton Blanchard wrote: > > This was enabled on the pseries defconfigs recently, but missed > the ppc64 one. So do any of the options you enable in thelater patches need to be enabled for ppc64_defconfig as well? I am wondering if we could do more of

Re: cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-19 Thread Michael Ellerman
On Mon, 2015-19-01 at 11:32:51 UTC, Preeti U Murthy wrote: > The device tree now exposes the residency values for different idle states. > Read > these values instead of calculating residency from the latency values. The > values > exposed in the DT are validated for optimal power efficiency. How

Re: tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-19 Thread Michael Ellerman
On Mon, 2015-19-01 at 10:26:48 UTC, Preeti U Murthy wrote: > Today if a cpu handling broadcasting of wakeups goes offline, it hands over It's *the* cpu handling broadcasting of wakeups right? ie. there's only ever one at a time. > the job of broadcasting to another cpu in the CPU_DEAD phase. I

Re: tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-19 Thread Preeti U Murthy
On 01/20/2015 11:39 AM, Michael Ellerman wrote: > On Mon, 2015-19-01 at 10:26:48 UTC, Preeti U Murthy wrote: >> Today if a cpu handling broadcasting of wakeups goes offline, it hands over > > It's *the* cpu handling broadcasting of wakeups right? ie. there's only ever > one at a time. Right, than

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Lars-Peter Clausen
On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: diff --git a/drivers/i2c/i2c-core.c b/dr

[PATCH] powerpc: Update all configs using savedefconfig

2015-01-19 Thread Michael Ellerman
It looks like it's ~4 years since we updated some of these, so do a bulk update. Verified that the before and after generated configs are exactly the same. Which begs the question why update them? The answer is that it can be confusing when the stored defconfig drifts too far from the generated r

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Greg Kroah-Hartman
On Tue, Jan 20, 2015 at 08:05:20AM +0100, Lars-Peter Clausen wrote: > On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: > >On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: > >>On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: > >>>On Mon, Jan 19, 2015 at 0

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Lars-Peter Clausen
On 01/20/2015 08:12 AM, Greg Kroah-Hartman wrote: On Tue, Jan 20, 2015 at 08:05:20AM +0100, Lars-Peter Clausen wrote: On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah

Re: AW: How to make use of SPE instructions?

2015-01-19 Thread Scott Wood
On Fri, 2015-01-16 at 05:27 +, Markus Stockhausen wrote: > > Von: Scott Wood [scottw...@freescale.com] > > Gesendet: Donnerstag, 15. Januar 2015 23:56 > > An: Markus Stockhausen > > Cc: linuxppc-dev@lists.ozlabs.org > > Betreff: Re: How to make use of SPE instructions? > > > > On Thu, 2015-01-

Re: [PATCH] powerpc/dts: Update platform PLL node

2015-01-19 Thread Scott Wood
On Mon, 2015-01-12 at 08:00 +0200, Igal.Liberman wrote: > From: Igal Liberman > > Signed-off-by: Igal Liberman > Change-Id: I92d020651237041d3767aa35e9345439714f9831 > --- > arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi |6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Please e