[PATCH][v4] power/fsl: add MDIO dt binding for FMan

2015-01-28 Thread shh.xie
From: Shaohui Xie shaohui@freescale.com

This binding is for FMan MDIO, it covers FMan v2  FMan v3.

Signed-off-by: Shaohui Xie shaohui@freescale.com
---
changes for V4:
revised MDIO interrupt related statement.

changes in v3:
rephrase the 'Definition' of property 'bus-frequency', don't include the
property in example.

changes in v2:
addressed comments from Scott in V1.

 .../devicetree/bindings/powerpc/fsl/fman.txt   | 70 ++
 1 file changed, 70 insertions(+)

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt 
b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index edeea16..774c24f 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -7,6 +7,7 @@ CONTENTS
   - FMan MURAM Node
   - FMan dTSEC/XGEC/mEMAC Node
   - FMan IEEE 1588 Node
+  - FMan MDIO Node
   - Example
 
 =
@@ -357,6 +358,69 @@ ptp-timer@fe000 {
 };
 
 =
+FMan MDIO Node
+
+DESCRIPTION
+
+The MDIO is a bus to which the PHY devices are connected.
+
+PROPERTIES
+
+- compatible
+   Usage: required
+   Value type: stringlist
+   Definition: A standard property.
+   Must include fsl,fman-mdio for 1 Gb/s MDIO from FMan v2.
+   Must include fsl,fman-xmdio for 10 Gb/s MDIO from FMan v2.
+   Must include fsl,fman-memac-mdio for 1/10 Gb/s MDIO from
+   FMan v3.
+
+- reg
+   Usage: required
+   Value type: prop-encoded-array
+   Definition: A standard property.
+
+- bus-frequency
+   Usage: optional
+   Value type: u32
+   Definition: Specifies the external MDIO bus clock speed to
+   be used, if different from the standard 2.5 MHz.
+   This may be due to the standard speed being unsupported (e.g.
+   due to a hardware problem), or to advertise that all relevant
+   components in the system support a faster speed.
+
+- interrupts
+   Usage: required
+   Value type: prop-encoded-array
+   Definition: Event interrupt of external MDIO controller.
+
+- fsl,fman-internal-mdio
+   Usage: required for internal MDIO
+   Value type: boolean
+   Definition: Fman has internal MDIO for internal PCS(Physical
+   Coding Sublayer) PHYs and external MDIO for external PHYs.
+   The settings and programming routines for internal/external
+   MDIO are different. Must be included for internal MDIO.
+
+EXAMPLE
+
+Example for FMan v2 external MDIO:
+
+mdio@f1000 {
+   compatible = fsl,fman-xmdio;
+   reg = 0xf1000 0x1000;
+   interrupts = 101 2 0 0;
+};
+
+Example for FMan v3 internal MDIO:
+
+mdio@f1000 {
+   compatible = fsl,fman-memac-mdio;
+   reg = 0xf1000 0x1000;
+   fsl,fman-internal-mdio;
+};
+
+=
 Example
 
 fman@40 {
@@ -531,4 +595,10 @@ fman@40 {
compatible = fsl,fman-ptp-timer;
reg = 0xfe000 0x1000;
};
+
+   mdio@f1000 {
+   compatible = fsl,fman-xmdio;
+   reg = 0xf1000 0x1000;
+   interrupts = 101 2 0 0;
+   };
 };
-- 
1.8.4.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.

2015-01-28 Thread Suman Tripathi
On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:

 I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
 In the next version Also I will remove the IOMMU hacks from arasan
 driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

One more point is the binding for IOMMU needs to be in the same patch
in which the IOMMU support is added. So to provide the binding info of
the master node we require the sdhc nodes to be merged first.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

On Wed, Jan 28, 2015 at 6:16 PM, Arnd Bergmann a...@arndb.de wrote:
 On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:

 I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
 In the next version Also I will remove the IOMMU hacks from arasan
 driver

 Hmm, I guess you have a required ordering between the patches either
 way, which makes it hard to merge in a way that is bisectable.

 You are correct that you should not merge a patch with the iommu
 reference before adding the iommu device node, because it would
 otherwise break building the mmc tree.

 Usually, the right answer is to merged the dts changes through the
 arm-soc tree, and then you can just add the node for the sdhc device
 after the one for the iommu device.

 Arnd



-- 
Thanks,
with regards,
Suman Tripathi
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 3.12 013/176] powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2015-01-28 Thread Jiri Slaby
From: Paul Mackerras pau...@samba.org

3.12-stable review patch.  If anyone has any objections, please let me know.

===

commit 8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0 upstream.

Currently, when going idle, we set the flag indicating that we are in
nap mode (paca-kvm_hstate.hwthread_state) and then execute the nap
(or sleep or rvwinkle) instruction, all with the MMU on.  This is bad
for two reasons: (a) the architecture specifies that those instructions
must be executed with the MMU off, and in fact with only the SF, HV, ME
and possibly RI bits set, and (b) this introduces a race, because as
soon as we set the flag, another thread can switch the MMU to a guest
context.  If the race is lost, this thread will typically start looping
on relocation-on ISIs at 0xc...4400.

This fixes it by setting the MSR as required by the architecture before
setting the flag or executing the nap/sleep/rvwinkle instruction.

[ shre...@linux.vnet.ibm.com: Edited to handle LE ]
Signed-off-by: Paul Mackerras pau...@samba.org
Signed-off-by: Shreyas B. Prabhu shre...@linux.vnet.ibm.com
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Michael Ellerman m...@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Michael Ellerman m...@ellerman.id.au
Signed-off-by: Jiri Slaby jsl...@suse.cz
---
 arch/powerpc/include/asm/reg.h|  1 +
 arch/powerpc/kernel/idle_power7.S | 16 
 2 files changed, 17 insertions(+)

diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index cb9c1740cee0..390e09872b77 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -116,6 +116,7 @@
 
 /* Server variant */
 #define MSR_   (MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV)
+#define MSR_IDLE   (MSR_ME | MSR_SF | MSR_HV)
 #define MSR_KERNEL (MSR_ | MSR_64BIT)
 #define MSR_USER32 (MSR_ | MSR_PR | MSR_EE)
 #define MSR_USER64 (MSR_USER32 | MSR_64BIT)
diff --git a/arch/powerpc/kernel/idle_power7.S 
b/arch/powerpc/kernel/idle_power7.S
index e11863f4e595..df930727f73b 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -84,6 +84,22 @@ _GLOBAL(power7_nap)
std r9,_MSR(r1)
std r1,PACAR1(r13)
 
+   /*
+* Go to real mode to do the nap, as required by the architecture.
+* Also, we need to be in real mode before setting hwthread_state,
+* because as soon as we do that, another thread can switch
+* the MMU context to the guest.
+*/
+   LOAD_REG_IMMEDIATE(r5, MSR_IDLE)
+   li  r6, MSR_RI
+   andcr6, r9, r6
+   LOAD_REG_ADDR(r7, power7_enter_nap_mode)
+   mtmsrd  r6, 1   /* clear RI before setting SRR0/1 */
+   mtspr   SPRN_SRR0, r7
+   mtspr   SPRN_SRR1, r5
+   rfid
+
+power7_enter_nap_mode:
 #ifdef CONFIG_KVM_BOOK3S_64_HV
/* Tell KVM we're napping */
li  r4,KVM_HWTHREAD_IN_NAP
-- 
2.2.2

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-01-28 Thread Stewart Smith
Preeti U Murthy pre...@linux.vnet.ibm.com writes:
 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 does not expose residency
 values, use default values as a fallback mechanism. While at it, handle some
 cleanups.

From a I just merged the patch that exports these values from firmware
point of view, using them and falling back looks good.

(I find the hardcoding of snooze in the driver a bit odd, as is the
hardcoding of max power states to 8 - which could bite us in the future
if a future processor has more states... but these aren't problems with
this patch)

Acked-by: Stewart Smith stew...@linux.vnet.ibm.com

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-01-28 Thread Preeti U Murthy
On 01/28/2015 02:45 PM, Stewart Smith wrote:
 Preeti U Murthy pre...@linux.vnet.ibm.com writes:
 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 does not expose residency
 values, use default values as a fallback mechanism. While at it, handle some
 cleanups.
 
 From a I just merged the patch that exports these values from firmware
 point of view, using them and falling back looks good.
 
 (I find the hardcoding of snooze in the driver a bit odd, as is the

Snooze is the only software defined idle state, the rest are platform
specific. The first idle state is usually associated with some sort of a
polling operation and each architecture has a variant to this. This is
why we end up hard-coding this idle state in the driver as far as my
understanding goes.

 hardcoding of max power states to 8 - which could bite us in the future

Hmm.. not sure about this. Need to check.

 if a future processor has more states... but these aren't problems with
 this patch)
 
 Acked-by: Stewart Smith stew...@linux.vnet.ibm.com

Thanks!

Regards
Preeti U Murthy
 

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-01-28 Thread Preeti U Murthy
On 01/27/2015 09:01 AM, Preeti U Murthy wrote:
 On 01/22/2015 04:45 PM, Thomas Gleixner wrote:
 On Thu, 22 Jan 2015, Preeti U Murthy wrote:
 On 01/21/2015 05:16 PM, Thomas Gleixner wrote:
 How about when the cpu that is going offline receives a timer interrupt
 just before setting its state to CPU_DEAD ? That is still possible right
 given that its clock devices may not have been shutdown and it is
 capable of receiving interrupts for a short duration. Even with the
 above patch, is the following scenario possible ?

 CPU0  CPU1
 t0 Receives timer interrupt

 t1 Sees that there are hrtimers
to be serviced (hrtimers are not yet migrated)

 t2 calls hrtimer_interrupt()

 t3 tick_program_event()   CPU_DEAD notifiers
 CPU0's td-evtdev = NULL

 t4 clockevent_program_event()
references NULL tick device pointer

 So my concern is that since the CLOCK_EVT_NOTIFY_CPU_DEAD callback
 handles shutting down of devices besides moving tick related duties.
 it's functions may race with the hotplug cpu still handling tick events.

   __cpu_disable() is supposed to block interrupts on the dying cpu.

 But I agree, we should make it more robust. So we want an explicit
 call for disabling the cpu local stuff and an explicit takeover of the
 broadcast duty. I'm anyway distangling the clockevents_notify() stuff,
 so it should be simple to do so.

Thomas ping. Would you be posting this patch?
 
 I noticed that tick_handover_do_timer() function also suffers from the
 issue that the patch I posted for moving the broadcast duty had, in that
 it relies on all cpus participating in stop_machine(). In a design where
 all cpus do not participate in stop_machine(), if the freshly nominated
 do_timer cpu is idle, there is no update of jiffies till that cpu gets
 back to being busy. So we must do an explicit take over of *both* the
 broadcast and do_timer duty just before the CPU_DEAD phase.

Regards
Preeti u Murthy

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.

2015-01-28 Thread Arnd Bergmann
On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
 
 I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
 In the next version Also I will remove the IOMMU hacks from arasan
 driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

Arnd
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v7 0/4] Add support for parametrized events

2015-01-28 Thread Jiri Olsa
On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
 On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
  On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
  
  SNIP
  
   
   
   Cody P Schafer (6):
 perf: provide sysfs_show for struct perf_pmu_events_attr
 perf: add PMU_EVENT_ATTR_STRING() helper
 powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
 powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
   annotated
 powerpc/perf/hv-gpci: add the remaining gpci requests
 powerpc/perf/hv-24x7: Document sysfs event description entries
   
   Sukadev Bhattiprolu (1):
 perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
  
  generic 'perf: *' patches look good to me.. cant say much about
  the rest of the patchset though
 
 Is that an ACK ?

ah right, sry ;-)

Acked-by: Jiri Olsa jo...@kernel.org

jirka

 
 I'm happy to merge the rest through the powerpc tree, but I'd like an ACK on
 the first two from someone in perf land.
 
 cheers
 
 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [GIT PULL 00/26] perf/core improvements and fixes

2015-01-28 Thread Arnaldo Carvalho de Melo
Em Wed, Jan 28, 2015 at 03:50:15PM +0100, Ingo Molnar escreveu:
 Pulled, thanks a lot Arnaldo!

Thanks!
 
 Note that there was some minimal interaction with Frederic's 
 pending perf/hw_breakpoint work, in tools/perf/Documentation/perf-record.txt.
 
 I resolved the conflict and merged perf/hw_breakpoint into 
 perf/core as well, to avoid future complications. (Once I've 
 pushed it all out you guys might want to double check what I did 
 there though, just to make sure.)

As soon as 'git remote update tip' gets this stuff, I'll check it!

- Arnaldo
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2] powerpc/mpic: Add DT option to skip readback after EOI

2015-01-28 Thread Segher Boessenkool
On Tue, Jan 27, 2015 at 03:57:53PM -0600, Scott Wood wrote:
 At this point, given the previous discussion, does anyone object to
 removing the readback entirely?  Do we have any evidence that reading
 WHOAMI is effective at addressing whatever problem reading EOI made go
 away on the relevant platform?

What platforms were those?  Just test there!

If no one remembers, they can not (any longer) be important platforms ;-)
Just remove the code, and if in twelve months finally someone reports a
failure we will at least know what platform it was.


Segher
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-01-28 Thread Richard Cochran
On Wed, Jan 28, 2015 at 03:32:58PM +0530, Preeti U Murthy wrote:
 Thomas ping. Would you be posting this patch?

FYI, Thomas is temporarily out of action, in bed with the flu.

Thanks,
Richard
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 00/10] clk: qoriq: Add support for the FMan clock

2015-01-28 Thread Emil Medve
Hello Mike,


On 01/28/2015 12:15 PM, Mike Turquette wrote:
 Quoting Emil Medve (2015-01-21 02:03:22)
 Based on clk-next from 
 git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git

 v2: Rebased as several prerequisite patches (including a file rename) got
 applied upstream

 Emil Medve (9):
   clk: qoriq: Fix checkpatch type PARENTHESIS_ALIGNMENT
   clk: qoriq: Fix checkpatch type ALLOC_WITH_MULTIPLY
   clk: qoriq: Fix checkpatch type ALLOC_SIZEOF_STRUCT
   clk: qoriq: Fix checkpatch type OOM_MESSAGE
   clk: qoriq: Make local symbol 'static'
   clk: qoriq: Replace kzalloc() with kmalloc()
   clk: qoriq: Use pr_fmt()
 
 Patches 1-7 applied to clk-next towards 3.20

Thank you

 I'd prefer some
 reviewed-by's from your peers at freescale for the clock driver
 correctness.

That's fair

   powerpc/corenet: Enable CLK_QORIQ

I was thinking Scott can pick this up

   clk: qoriq: Add support for the platform PLL

I'll get Yuan-Tian to review this

 Igal Liberman (1):
   clk: qoriq: Add support for the FMan clock

Scott, I'd appreciate your help here


Cheers,


  arch/powerpc/configs/corenet32_smp_defconfig |   1 +
  arch/powerpc/configs/corenet64_smp_defconfig |   1 +
  drivers/clk/clk-qoriq.c  | 378 
 +--
  3 files changed, 357 insertions(+), 23 deletions(-)

 -- 
 2.2.1
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64

2015-01-28 Thread Kim Phillips
On Wed, 28 Jan 2015 14:22:02 +1100
Michael Ellerman m...@ellerman.id.au wrote:

 On Tue, 2015-01-27 at 18:57 -0800, Andrew Morton wrote:
  On Wed, 28 Jan 2015 10:33:59 +0900 Joonsoo Kim js1...@gmail.com wrote:
  
   2015-01-28 10:01 GMT+09:00 Michael Ellerman m...@ellerman.id.au:
On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
arch/powerpc has __kernel_map_pages implementations in 
mm/pgtable_32.c, and
   
I'd be happy to take this through the powerpc tree for 3.20, but for 
this:
   
depends on:
From: Joonsoo Kim iamjoonsoo@lge.com
Date: Thu, 22 Jan 2015 10:28:58 +0900
Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some 
other archs
   
I don't have that patch in my tree.
   
But in what way does this patch depend on that one?
   
It looks to me like it'd be safe to take this on its own, or am I wrong?
   
   Hello,
   
   These two patches are merged to Andrew's tree now.
  
  That didn't answer either of Michael's questions ;)
  
  Yes, I think they're independent.  I was holding off on the powerpc

sorry - my bad, they are indeed completely independent.

  one, waiting to see if it popped up in linux-next via your tree.  I can
  merge both if you like?
 
 Right, I didn't think I'd seen it in your tree :)
 
 I'm happy to take this one, saves a possible merge conflict.

I'm fine either way (I work on linux-next).

Kim
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v7 0/4] Add support for parametrized events

2015-01-28 Thread Arnaldo Carvalho de Melo
Em Wed, Jan 28, 2015 at 11:37:53AM +0100, Jiri Olsa escreveu:
 On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
  On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
   On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
   
   SNIP
   


Cody P Schafer (6):
  perf: provide sysfs_show for struct perf_pmu_events_attr
  perf: add PMU_EVENT_ATTR_STRING() helper
  powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
  powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
annotated
  powerpc/perf/hv-gpci: add the remaining gpci requests
  powerpc/perf/hv-24x7: Document sysfs event description entries

Sukadev Bhattiprolu (1):
  perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
   
   generic 'perf: *' patches look good to me.. cant say much about
   the rest of the patchset though
  
  Is that an ACK ?
 
 ah right, sry ;-)
 
 Acked-by: Jiri Olsa jo...@kernel.org

Thanks, I'll try and collect the tools/ bits since Michael already took
the other bits, right?

- Arnaldo
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [GIT PULL 00/26] perf/core improvements and fixes

2015-01-28 Thread Ingo Molnar

* Arnaldo Carvalho de Melo a...@kernel.org wrote:

 Hi Ingo,
 
   Please consider pulling, it has my latest perf/urgent pull content,
 please let me know if you don't want it to be submitted like that, i.e. if
 you have any problems with my latest perf/urgent pull request and I'll try
 to address it ASAP.
 
 - Arnaldo
 
 The following changes since commit 25dd9171f51c482eb7c4dc8618766ae733756e2d:
 
   perf probe: Fix probing kretprobes (2015-01-21 10:06:24 -0300)
 
 are available in the git repository at:
 
   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git 
 tags/perf-core-for-mingo
 
 for you to fetch changes up to 3d199b5be53348bef84883013c484b414adf0a2e:
 
   tools lib traceevent: Add support for IP address formats (2015-01-26 
 12:04:41 -0300)
 
 
 perf/core improvements and fixes:
 
 User visible:
 
 - Enable sampling loads and stores simultaneously in 'perf mem' (Stephane 
 Eranian)
 
 - 'perf diff' output improvements (Namhyung Kim)
 
 - Fix error reporting for evsel pgfault constructor (Arnaldo Carvalho de Melo)
 
 Infrastructure:
 
 - Move debugfs sterrno like method to tools/lib/ so that it may be used by
   other tools, as 'perf probe' will be soon (Arnaldo Carvalho de Melo)
 
 - Introduce function fro deleting/removing hist_entry to avoid code 
 duplication
   (Arnaldo Carvalho de Melo)
 
 - Support parsing parameterized events (Cody P Schafer)
 
 - Add support for IP address formats in libtraceevent (David Ahern)
 
 - Fix typo in sample-parsing.c 'perf test' entry (Rasmus Villemoes)
 
 - Remove some unused functions from color.c (Rickard Strandqvist)
 
 Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com
 
 
 Arnaldo Carvalho de Melo (9):
   perf mem: Move the mem_operations global to struct perf_mem
   perf tools: Remove EOL whitespaces
   perf hists: Rename hist_entry__free to __delete
   perf hists: Introduce function for deleting/removing hist_entry
   tools lib fs: Adopt debugfs open strerrno method
   tools lib fs: Pass filename to debugfs__strerror_open
   perf trace: Fix error reporting for evsel pgfault constructor
   tools lib fs debugfs: Introduce debugfs__strerror_open_tp
   tools lib fs debugfs: Check if debugfs is mounted when handling ENOENT
 
 Cody P Schafer (4):
   perf tools: Support parsing parameterized events
   perf tools: Extend format_alias() to include event parameters
   perf Documentation: Add event parameters
   perf tools: Document parameterized and symbolic events
 
 David Ahern (1):
   tools lib traceevent: Add support for IP address formats
 
 Namhyung Kim (9):
   perf report: Get rid of report__inc_stat()
   perf tools: Allow use of an exclusive option more than once
   perf diff: Get rid of hists__compute_resort()
   perf diff: Print diff result more precisely
   perf diff: Introduce fmt_to_data_file() helper
   perf tools: Pass struct perf_hpp_fmt to its callbacks
   perf diff: Fix output ordering to honor next column
   perf diff: Fix -o/--order option behavior
   perf ui/tui: Show fatal error message only if exists
 
 Rasmus Villemoes (1):
   perf tests: Fix typo in sample-parsing.c
 
 Rickard Strandqvist (1):
   perf tools: Remove some unused functions from color.c
 
 Stephane Eranian (1):
   perf mem: Enable sampling loads and stores simultaneously
 
  .../testing/sysfs-bus-event_source-devices-events  |   6 +
  tools/lib/api/fs/debugfs.c |  43 +++
  tools/lib/api/fs/debugfs.h |   3 +
  tools/lib/traceevent/event-parse.c | 328 
 +
  tools/perf/Documentation/perf-buildid-cache.txt|   2 +-
  tools/perf/Documentation/perf-list.txt |  13 +
  tools/perf/Documentation/perf-mem.txt  |   9 +-
  tools/perf/Documentation/perf-record.txt   |  12 +
  tools/perf/Documentation/perf-script.txt   |  28 +-
  tools/perf/Documentation/perf-stat.txt |  20 +-
  tools/perf/builtin-buildid-cache.c |   4 +-
  tools/perf/builtin-diff.c  | 248 ++--
  tools/perf/builtin-mem.c   | 131 ++--
  tools/perf/builtin-report.c|  16 +-
  tools/perf/builtin-stat.c  |   2 +-
  tools/perf/builtin-top.c   |   2 +-
  tools/perf/builtin-trace.c | 106 ---
  tools/perf/tests/attr.py   |   1 -
  tools/perf/tests/hists_cumulate.c  |   2 +-
  tools/perf/tests/hists_output.c|   2 +-
  tools/perf/tests/make  |   1 -
  tools/perf/tests/parse-events.c|   2 +-
  tools/perf/tests/sample-parsing.c  |   2 +-
  

Re: [PATCH v2 00/10] clk: qoriq: Add support for the FMan clock

2015-01-28 Thread Scott Wood
On Wed, 2015-01-28 at 15:48 -0600, Emil Medve wrote:
 Hello Mike,
 
 
 On 01/28/2015 12:15 PM, Mike Turquette wrote:
  Quoting Emil Medve (2015-01-21 02:03:22)
  Based on clk-next from 
  git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
 
  v2: Rebased as several prerequisite patches (including a file rename) 
  got
  applied upstream
 
  Emil Medve (9):
clk: qoriq: Fix checkpatch type PARENTHESIS_ALIGNMENT
clk: qoriq: Fix checkpatch type ALLOC_WITH_MULTIPLY
clk: qoriq: Fix checkpatch type ALLOC_SIZEOF_STRUCT
clk: qoriq: Fix checkpatch type OOM_MESSAGE
clk: qoriq: Make local symbol 'static'
clk: qoriq: Replace kzalloc() with kmalloc()
clk: qoriq: Use pr_fmt()
  
  Patches 1-7 applied to clk-next towards 3.20
 
 Thank you
 
  I'd prefer some
  reviewed-by's from your peers at freescale for the clock driver
  correctness.
 
 That's fair
 
powerpc/corenet: Enable CLK_QORIQ
 
 I was thinking Scott can pick this up

Not if the patch that introduces CLK_QORIQ goes in via another tree.

  Igal Liberman (1):
clk: qoriq: Add support for the FMan clock
 
 Scott, I'd appreciate your help here

From internal discussion I believe you have some comments of your own on
this patch...

-Scott


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[3.13.y-ckt stable] Patch powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode has been added to staging queue

2015-01-28 Thread Kamal Mostafa
This is a note to let you know that I have just added a patch titled

powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

 
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt15.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

--

From eb5b1395c50d3eb178e31f229ef888172844e9a9 Mon Sep 17 00:00:00 2001
From: Paul Mackerras pau...@samba.org
Date: Wed, 10 Dec 2014 00:26:50 +0530
Subject: powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
 mode

commit 8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0 upstream.

Currently, when going idle, we set the flag indicating that we are in
nap mode (paca-kvm_hstate.hwthread_state) and then execute the nap
(or sleep or rvwinkle) instruction, all with the MMU on.  This is bad
for two reasons: (a) the architecture specifies that those instructions
must be executed with the MMU off, and in fact with only the SF, HV, ME
and possibly RI bits set, and (b) this introduces a race, because as
soon as we set the flag, another thread can switch the MMU to a guest
context.  If the race is lost, this thread will typically start looping
on relocation-on ISIs at 0xc...4400.

This fixes it by setting the MSR as required by the architecture before
setting the flag or executing the nap/sleep/rvwinkle instruction.

[ shre...@linux.vnet.ibm.com: Edited to handle LE ]
Signed-off-by: Paul Mackerras pau...@samba.org
Signed-off-by: Shreyas B. Prabhu shre...@linux.vnet.ibm.com
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Michael Ellerman m...@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Michael Ellerman m...@ellerman.id.au
Signed-off-by: Kamal Mostafa ka...@canonical.com
---
 arch/powerpc/include/asm/reg.h|  2 ++
 arch/powerpc/kernel/idle_power7.S | 17 +
 2 files changed, 19 insertions(+)

diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index 637f513..663e5c2 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -118,8 +118,10 @@
 #define __MSR  (MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV)
 #ifdef __BIG_ENDIAN__
 #define MSR_   __MSR
+#define MSR_IDLE   (MSR_ME | MSR_SF | MSR_HV)
 #else
 #define MSR_   (__MSR | MSR_LE)
+#define MSR_IDLE   (MSR_ME | MSR_SF | MSR_HV | MSR_LE)
 #endif
 #define MSR_KERNEL (MSR_ | MSR_64BIT)
 #define MSR_USER32 (MSR_ | MSR_PR | MSR_EE)
diff --git a/arch/powerpc/kernel/idle_power7.S 
b/arch/powerpc/kernel/idle_power7.S
index 847e40e..1fb7fee 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -84,6 +84,23 @@ _GLOBAL(power7_nap)
std r9,_MSR(r1)
std r1,PACAR1(r13)

+   /*
+* Go to real mode to do the nap, as required by the architecture.
+* Also, we need to be in real mode before setting hwthread_state,
+* because as soon as we do that, another thread can switch
+* the MMU context to the guest.
+*/
+   LOAD_REG_IMMEDIATE(r5, MSR_IDLE)
+   li  r6, MSR_RI
+   andcr6, r9, r6
+   LOAD_REG_ADDR(r7, power7_enter_nap_mode)
+   mtmsrd  r6, 1   /* clear RI before setting SRR0/1 */
+   mtspr   SPRN_SRR0, r7
+   mtspr   SPRN_SRR1, r5
+   rfid
+
+   .globl  power7_enter_nap_mode
+power7_enter_nap_mode:
 #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
/* Tell KVM we're napping */
li  r4,KVM_HWTHREAD_IN_NAP
--
1.9.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-01-28 Thread Stewart Smith
Preeti U Murthy pre...@linux.vnet.ibm.com writes:
 On 01/28/2015 02:45 PM, Stewart Smith wrote:
 Preeti U Murthy pre...@linux.vnet.ibm.com writes:
 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 does not expose residency
 values, use default values as a fallback mechanism. While at it, handle some
 cleanups.
 
 From a I just merged the patch that exports these values from firmware
 point of view, using them and falling back looks good.
 
 (I find the hardcoding of snooze in the driver a bit odd, as is the

 Snooze is the only software defined idle state, the rest are platform
 specific. The first idle state is usually associated with some sort of a
 polling operation and each architecture has a variant to this. This is
 why we end up hard-coding this idle state in the driver as far as my
 understanding goes.

At least in the PowerISA 2.07 I could only see that lowering priority
would give priority to other threads in the core, I couldn't find
anything saying that or 31,31,31 would end up saving any power... but I
could be looking in the wrong place too.

Basically, I was wanting to check that it's actually written down and
architected somewhere that this is the case and it isn't something too
P7/P8 specific.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 3.13.y-ckt 127/139] powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2015-01-28 Thread Kamal Mostafa
3.13.11-ckt15 -stable review patch.  If anyone has any objections, please let 
me know.

--

From: Paul Mackerras pau...@samba.org

commit 8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0 upstream.

Currently, when going idle, we set the flag indicating that we are in
nap mode (paca-kvm_hstate.hwthread_state) and then execute the nap
(or sleep or rvwinkle) instruction, all with the MMU on.  This is bad
for two reasons: (a) the architecture specifies that those instructions
must be executed with the MMU off, and in fact with only the SF, HV, ME
and possibly RI bits set, and (b) this introduces a race, because as
soon as we set the flag, another thread can switch the MMU to a guest
context.  If the race is lost, this thread will typically start looping
on relocation-on ISIs at 0xc...4400.

This fixes it by setting the MSR as required by the architecture before
setting the flag or executing the nap/sleep/rvwinkle instruction.

[ shre...@linux.vnet.ibm.com: Edited to handle LE ]
Signed-off-by: Paul Mackerras pau...@samba.org
Signed-off-by: Shreyas B. Prabhu shre...@linux.vnet.ibm.com
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Michael Ellerman m...@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Michael Ellerman m...@ellerman.id.au
Signed-off-by: Kamal Mostafa ka...@canonical.com
---
 arch/powerpc/include/asm/reg.h|  2 ++
 arch/powerpc/kernel/idle_power7.S | 17 +
 2 files changed, 19 insertions(+)

diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index 637f513..663e5c2 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -118,8 +118,10 @@
 #define __MSR  (MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV)
 #ifdef __BIG_ENDIAN__
 #define MSR_   __MSR
+#define MSR_IDLE   (MSR_ME | MSR_SF | MSR_HV)
 #else
 #define MSR_   (__MSR | MSR_LE)
+#define MSR_IDLE   (MSR_ME | MSR_SF | MSR_HV | MSR_LE)
 #endif
 #define MSR_KERNEL (MSR_ | MSR_64BIT)
 #define MSR_USER32 (MSR_ | MSR_PR | MSR_EE)
diff --git a/arch/powerpc/kernel/idle_power7.S 
b/arch/powerpc/kernel/idle_power7.S
index 847e40e..1fb7fee 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -84,6 +84,23 @@ _GLOBAL(power7_nap)
std r9,_MSR(r1)
std r1,PACAR1(r13)
 
+   /*
+* Go to real mode to do the nap, as required by the architecture.
+* Also, we need to be in real mode before setting hwthread_state,
+* because as soon as we do that, another thread can switch
+* the MMU context to the guest.
+*/
+   LOAD_REG_IMMEDIATE(r5, MSR_IDLE)
+   li  r6, MSR_RI
+   andcr6, r9, r6
+   LOAD_REG_ADDR(r7, power7_enter_nap_mode)
+   mtmsrd  r6, 1   /* clear RI before setting SRR0/1 */
+   mtspr   SPRN_SRR0, r7
+   mtspr   SPRN_SRR1, r5
+   rfid
+
+   .globl  power7_enter_nap_mode
+power7_enter_nap_mode:
 #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
/* Tell KVM we're napping */
li  r4,KVM_HWTHREAD_IN_NAP
-- 
1.9.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2] powerpc/mpic: Add DT option to skip readback after EOI

2015-01-28 Thread Scott Wood
On Wed, 2015-01-28 at 14:15 -0600, Segher Boessenkool wrote:
 On Tue, Jan 27, 2015 at 03:57:53PM -0600, Scott Wood wrote:
  At this point, given the previous discussion, does anyone object to
  removing the readback entirely?  Do we have any evidence that reading
  WHOAMI is effective at addressing whatever problem reading EOI made go
  away on the relevant platform?
 
 What platforms were those?  Just test there!

Ben said some macs.  The only Mac I have is packed away and may not be
the one Ben had in mind, so I can't test there.

 If no one remembers, they can not (any longer) be important platforms ;-)
 Just remove the code, and if in twelve months finally someone reports a
 failure we will at least know what platform it was.

This is what I was trying to encourage. :-)

-Scott


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] CXL: Fix device_node reference counting

2015-01-28 Thread Ryan Grimm

On 01/28/2015 12:53 AM, Ian Munsie wrote:

Excerpts from Michael Ellerman's message of 2015-01-28 16:04:40 +1100:

I just wanted to check the status of this one? I can't see it in your
tree and wanted to make sure you didn't simply miss it.


It looked fishy, but I never got around to replying.

The second sentence in the explanation should never be true:


Right, that was the point of the fix ;)


You shouldn't have np unless you did an of_node_get() to get it, otherwise it's
pointing at something you don't have a reference for and it might go away at
any time.

So the patch may fix the bug but I don't think it's correct.

I think pnv_pci_to_phb_node() should be doing a get for you, before returning
the pointer.


Agreed - we should probably also rename it to have 'get' in the name,
like pnv_pci_get_phb_node().


Yeah, that's way better than the current patch.




See as a comparison pcibios_get_phb_of_node().


We could almost use that instead, except it's not exported for modules
and I'm not sure if that even works with __weak functions?


Ryan - do you want to respin this, or would you rather I take it?


Sure, I'll respin and resend as a bug fix.

-Ryan



Cheers,
-Ian



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64

2015-01-28 Thread Michael Ellerman
On Wed, 2015-01-28 at 14:14 -0600, Kim Phillips wrote:
 On Wed, 28 Jan 2015 14:22:02 +1100
 Michael Ellerman m...@ellerman.id.au wrote:
 
  On Tue, 2015-01-27 at 18:57 -0800, Andrew Morton wrote:
   On Wed, 28 Jan 2015 10:33:59 +0900 Joonsoo Kim js1...@gmail.com wrote:
   
2015-01-28 10:01 GMT+09:00 Michael Ellerman m...@ellerman.id.au:
 On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
 arch/powerpc has __kernel_map_pages implementations in 
 mm/pgtable_32.c, and

 I'd be happy to take this through the powerpc tree for 3.20, but for 
 this:

 depends on:
 From: Joonsoo Kim iamjoonsoo@lge.com
 Date: Thu, 22 Jan 2015 10:28:58 +0900
 Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and 
 some other archs

 I don't have that patch in my tree.

 But in what way does this patch depend on that one?

 It looks to me like it'd be safe to take this on its own, or am I 
 wrong?

Hello,

These two patches are merged to Andrew's tree now.
   
   That didn't answer either of Michael's questions ;)
   
   Yes, I think they're independent.  I was holding off on the powerpc
 
 sorry - my bad, they are indeed completely independent.
 
No worries.

   one, waiting to see if it popped up in linux-next via your tree.  I can
   merge both if you like?
  
  Right, I didn't think I'd seen it in your tree :)
  
  I'm happy to take this one, saves a possible merge conflict.
 
 I'm fine either way (I work on linux-next).

Cool. It's in my next as of now, so should be in linux-next tomorrow (30th).

cheers


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v7 0/4] Add support for parametrized events

2015-01-28 Thread Michael Ellerman
On Wed, 2015-01-28 at 11:37 +0100, Jiri Olsa wrote:
 On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
  On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
   On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
   
   SNIP
   


Cody P Schafer (6):
  perf: provide sysfs_show for struct perf_pmu_events_attr
  perf: add PMU_EVENT_ATTR_STRING() helper
  powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
  powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
annotated
  powerpc/perf/hv-gpci: add the remaining gpci requests
  powerpc/perf/hv-24x7: Document sysfs event description entries

Sukadev Bhattiprolu (1):
  perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
   
   generic 'perf: *' patches look good to me.. cant say much about
   the rest of the patchset though
  
  Is that an ACK ?
 
 ah right, sry ;-)
 
 Acked-by: Jiri Olsa jo...@kernel.org

Thanks. I'll add it to the first two patches.

cheers


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v7 0/4] Add support for parametrized events

2015-01-28 Thread Michael Ellerman
On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
 Description of event parameters from the documentation patch:
 
 Cody P Schafer (6):
   perf: provide sysfs_show for struct perf_pmu_events_attr
   perf: add PMU_EVENT_ATTR_STRING() helper
   powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
   powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
 annotated
   powerpc/perf/hv-gpci: add the remaining gpci requests
   powerpc/perf/hv-24x7: Document sysfs event description entries
 
 Sukadev Bhattiprolu (1):
   perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper


Hi Sukadev,

I realise Cody wrote most of these and you are just getting them merged, but
they still need to be Signed-off-by you. Most of them aren't.

So please resend with them all signed off by you.

While you're at it, please drop all the CC lines, and move the changelog
annotations below the --- line so they are dropped when I apply them.

Also add Jiri's ack to the first two patches.

You can probably trim the CC list when you repost, I think everyone's seen this
series enough times.

cheers


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] CXL: Fix device_node reference counting

2015-01-28 Thread Ryan Grimm
When unbinding and rebinding the driver on a system with a card in PHB0, this
error condition is reached after a few attempts:

ERROR: Bad of_node_put() on /pciex@3fffe4000
CPU: 0 PID: 3040 Comm: bash Not tainted 3.18.0-rc3-12545-g3627ffe #152
Call Trace:
[c00721acb5c0] [c086ef94] .dump_stack+0x84/0xb0 (unreliable)
[c00721acb640] [c073a0a8] .of_node_release+0xd8/0xe0
[c00721acb6d0] [c044bc44] .kobject_release+0x74/0xe0
[c00721acb760] [c07394fc] .of_node_put+0x1c/0x30
[c00721acb7d0] [c0545cd8] .cxl_probe+0x1a98/0x1d50
[c00721acb900] [c04845a0] .local_pci_probe+0x40/0xc0
[c00721acb980] [c0484998] .pci_device_probe+0x128/0x170
[c00721acba30] [c052400c] .driver_probe_device+0xac/0x2a0
[c00721acbad0] [c0522468] .bind_store+0x108/0x160
[c00721acbb70] [c0521448] .drv_attr_store+0x38/0x60
[c00721acbbe0] [c0293840] .sysfs_kf_write+0x60/0xa0
[c00721acbc50] [c0292500] .kernfs_fop_write+0x140/0x1d0
[c00721acbcf0] [c0208648] .vfs_write+0xd8/0x260
[c00721acbd90] [c0208b18] .SyS_write+0x58/0x100
[c00721acbe30] [c0009258] syscall_exit+0x0/0x98

We are missing a call to of_node_get.  pnv_pci_to_phb_node should call
of_node_get otherwise np's reference count isn't incremented and it might go
away.  Rename pnv_pci_to_phb_node to pnv_pci_get_phb_node so it's clear it
calls of_node_get.

Signed-off-by: Ryan Grimm gr...@linux.vnet.ibm.com
---
Please consider this patch for stable.  Without this fix, node reference
counting is broken. 

 arch/powerpc/include/asm/pnv-pci.h| 2 +-
 arch/powerpc/platforms/powernv/pci-ioda.c | 6 +++---
 drivers/misc/cxl/pci.c| 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/include/asm/pnv-pci.h 
b/arch/powerpc/include/asm/pnv-pci.h
index 3c00d64..f9b4982 100644
--- a/arch/powerpc/include/asm/pnv-pci.h
+++ b/arch/powerpc/include/asm/pnv-pci.h
@@ -19,7 +19,7 @@ int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int 
hwirq,
 int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num);
 void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num);
 int pnv_cxl_get_irq_count(struct pci_dev *dev);
-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev);
+struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev);
 
 #ifdef CONFIG_CXL_BASE
 int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs,
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c 
b/arch/powerpc/platforms/powernv/pci-ioda.c
index 5d52d6f..8be1d4f 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1460,13 +1460,13 @@ static void set_msi_irq_chip(struct pnv_phb *phb, 
unsigned int virq)
 
 #ifdef CONFIG_CXL_BASE
 
-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev)
+struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev)
 {
struct pci_controller *hose = pci_bus_to_host(dev-bus);
 
-   return hose-dn;
+   return of_node_get(hose-dn);
 }
-EXPORT_SYMBOL(pnv_pci_to_phb_node);
+EXPORT_SYMBOL(pnv_pci_get_phb_node);
 
 int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode)
 {
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 428ea8ba..cb25067 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -317,7 +317,7 @@ static int init_implementation_adapter_regs(struct cxl 
*adapter, struct pci_dev
u64 psl_dsnctl;
u64 chipid;
 
-   if (!(np = pnv_pci_to_phb_node(dev)))
+   if (!(np = pnv_pci_get_phb_node(dev)))
return -ENODEV;
 
while (np  !(prop = of_get_property(np, ibm,chip-id, NULL)))
-- 
1.9.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] CXL: Fix device_node reference counting

2015-01-28 Thread Ian Munsie
Acked-by: Ian Munsie imun...@au1.ibm.com

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH v2 09/10] clk: qoriq: Add support for the platform PLL

2015-01-28 Thread Yuantian Tang
 -Original Message-
 From: Emil Medve [mailto:emilian.me...@freescale.com]
 Sent: Wednesday, January 21, 2015 6:04 PM
 To: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421;
 mturque...@linaro.org; haoke...@gmail.com; Tang Yuantian-B29983
 Cc: Medve Emilian-EMMEDVE1
 Subject: [PATCH v2 09/10] clk: qoriq: Add support for the platform PLL
 
 Change-Id: Iac11ed95f274485a86d2c11f32a3dc502bcd020f
 Signed-off-by: Emil Medve emilian.me...@freescale.com
 ---
  drivers/clk/clk-qoriq.c | 83
 +
  1 file changed, 83 insertions(+)
 
 diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index
 07bdfc5..cda90a9 100644
 --- a/drivers/clk/clk-qoriq.c
 +++ b/drivers/clk/clk-qoriq.c
 @@ -271,9 +271,92 @@ static void __init sysclk_init(struct device_node
 *node)
   if (!IS_ERR(clk))
   of_clk_add_provider(np, of_clk_src_simple_get, clk);  }
 +
 +static void __init pltfrm_pll_init(struct device_node *np) {
 + void __iomem *base;
 + uint32_t mult;
 + const char *parent_name, *clk_name;
 + int i, _errno;
 + struct clk_onecell_data *cod;
 +
 + base = of_iomap(np, 0);
 + if (!base) {
 + pr_err(%s(): %s: of_iomap() failed\n, __func__, np-name);
 + return;
 + }
 +
 + /* Get the multiple of PLL */
 + mult = ioread32be(base);
 +
 + iounmap(base);
 +
 + /* Check if this PLL is disabled */
 + if (mult  PLL_KILL) {
 + pr_debug(%s(): %s: Disabled\n, __func__, np-name);
 + return;
 + }
 + mult = (mult  GENMASK(6, 1))  1;
 +
 + parent_name = of_clk_get_parent_name(np, 0);
 + if (!parent_name) {
 + pr_err(%s(): %s: of_clk_get_parent_name() failed\n,
 +__func__, np-name);
 + return;
 + }
 +
 + i = of_property_count_strings(np, clock-output-names);
 + if (i  0) {
 + pr_err(%s(): %s: of_property_count_strings(clock-output-
 names) = %d\n,
 +__func__, np-name, i);
 + return;
 + }
 +
 + cod = kmalloc(sizeof(*cod) + i * sizeof(struct clk *), GFP_KERNEL);
 + if (!cod)
 + return;
 + cod-clks = (struct clk **)(cod + 1);
 + cod-clk_num = i;
 +
 + for (i = 0; i  cod-clk_num; i++) {
 + _errno = of_property_read_string_index(np, clock-output-
 names,
 +i, clk_name);
 + if (_errno  0) {
 + pr_err(%s(): %s: of_property_read_string_index(clock-
 output-names) = %d\n,
 +__func__, np-name, _errno);
 + goto return_clk_unregister;
 + }
 +
 + cod-clks[i] = clk_register_fixed_factor(NULL, clk_name,
 +parent_name, 0, mult, 1 + i);
 + if (IS_ERR(cod-clks[i])) {
 + pr_err(%s(): %s: clk_register_fixed_factor(%s) =
 %ld\n,
 +__func__, np-name,
 +clk_name, PTR_ERR(cod-clks[i]));
 + goto return_clk_unregister;
 + }
 + }
 +
 + _errno = of_clk_add_provider(np, of_clk_src_onecell_get, cod);
 + if (_errno  0) {
 + pr_err(%s(): %s: of_clk_add_provider() = %d\n,
 +__func__, np-name, _errno);
 + goto return_clk_unregister;
 + }
 +
 + return;
 +
 +return_clk_unregister:
 + while (--i = 0)
 + clk_unregister(cod-clks[i]);
 + kfree(cod);
 +}
 +
  CLK_OF_DECLARE(qoriq_sysclk_1, fsl,qoriq-sysclk-1.0, sysclk_init);
 CLK_OF_DECLARE(qoriq_sysclk_2, fsl,qoriq-sysclk-2.0, sysclk_init);
 CLK_OF_DECLARE(qoriq_core_pll_1, fsl,qoriq-core-pll-1.0,
 core_pll_init);  CLK_OF_DECLARE(qoriq_core_pll_2, fsl,qoriq-core-pll-
 2.0, core_pll_init);  CLK_OF_DECLARE(qoriq_core_mux_1, fsl,qoriq-core-
 mux-1.0, core_mux_init);  CLK_OF_DECLARE(qoriq_core_mux_2, fsl,qoriq-
 core-mux-2.0, core_mux_init);
 +CLK_OF_DECLARE(qoriq_pltfrm_pll_1, fsl,qoriq-platform-pll-1.0,
 +pltfrm_pll_init); CLK_OF_DECLARE(qoriq_pltfrm_pll_2,
 +fsl,qoriq-platform-pll-2.0, pltfrm_pll_init);
 --
 2.2.1

Acked-by: Tang Yuantian yuantian.t...@freescale.com

Regards,
Yuantian


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-01-28 Thread Preeti U Murthy
On 01/29/2015 03:01 AM, Richard Cochran wrote:
 On Wed, Jan 28, 2015 at 03:32:58PM +0530, Preeti U Murthy wrote:
 Thomas ping. Would you be posting this patch?
 
 FYI, Thomas is temporarily out of action, in bed with the flu.

Oh I am sorry to hear that! Let me post out a patch based on Thomas's
suggestions around this.

Wishing him a speedy recovery.

Regards
Preeti U Murthy
 
 Thanks,
 Richard
 

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] mmc: sdhci: Apply FSL ESDHC reset handling quirk to OF

2015-01-28 Thread Martin Hicks

The reset code was pushed into the esdhc-imx driver, but missed being
pushed into the FSL OF driver at the same time.  The commit that broke
the OF ESDHC driver was 0718e59ae259f7c48155b4e852d8b0632d59028e

Signed-off-by: Martin Hicks m...@bork.org
---
 drivers/mmc/host/sdhci-of-esdhc.c |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c 
b/drivers/mmc/host/sdhci-of-esdhc.c
index 8872c85..4a654d4 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -276,6 +276,14 @@ static void esdhc_pltfm_set_bus_width(struct sdhci_host 
*host, int width)
ESDHC_CTRL_BUSWIDTH_MASK, ctrl);
 }
 
+static void esdhc_reset(struct sdhci_host *host, u8 mask)
+{
+   sdhci_reset(host, mask);
+
+   sdhci_writel(host, host-ier, SDHCI_INT_ENABLE);
+   sdhci_writel(host, host-ier, SDHCI_SIGNAL_ENABLE);
+}
+
 static const struct sdhci_ops sdhci_esdhc_ops = {
.read_l = esdhc_readl,
.read_w = esdhc_readw,
@@ -290,7 +298,7 @@ static const struct sdhci_ops sdhci_esdhc_ops = {
.platform_init = esdhc_of_platform_init,
.adma_workaround = esdhci_of_adma_workaround,
.set_bus_width = esdhc_pltfm_set_bus_width,
-   .reset = sdhci_reset,
+   .reset = esdhc_reset,
.set_uhs_signaling = sdhci_set_uhs_signaling,
 };
 
-- 
1.7.10.4


-- 
Martin Hicks P.Eng.|  m...@bork.org
Bork Consulting Inc.   |  +1 (613) 266-2296
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev