[RFC] possible null dereference in 'pm121_create_sys_fans()'

2013-11-17 Thread Geyslan Gregório Bem
Hello Benjamin, In file 'windfarm_pm121'.c: If this branch is true: if (param == NULL) { printk(KERN_WARNING pm121: %s fan config not found for this machine model\n, loop_names[loop_id]); goto fail; } control that is NULL will suffer a

[PATCH v5 01/17] powerpc/fsl-pci: improve clock API use

2013-11-17 Thread Gerhard Sittig
make the Freescale PCI driver get, prepare and enable the PCI clock during probe(); the clock gets put upon device shutdown by the devm approach clock lookup is non-fatal as not all platforms may provide clock specs in their device tree or implement a device tree based clock provider, but failure

[PATCH v5 00/17] add COMMON_CLK support for PowerPC MPC512x

2013-11-17 Thread Gerhard Sittig
this series introduces support for the common clock framework (CCF, COMMON_CLK Kconfig option) in the PowerPC based MPC512x platform, which brings device tree based clock lookup as well at subsystem maintainers: this series was streamlined for conflict free application through the subsystems'

[PATCH v5 02/17] dts: mpc512x: introduce dt-bindings/clock/ header

2013-11-17 Thread Gerhard Sittig
introduce a dt-bindings/ header file for MPC512x clocks, providing symbolic identifiers for those SoC clocks which clients will reference from their device tree nodes Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren

[PATCH v5 03/17] dts: mpc512x: add clock related device tree specs

2013-11-17 Thread Gerhard Sittig
this addresses the clock driver aka provider's side of clocks - introduce a 'clocks' subtree with an 'osc' node for the crystal or oscillator SoC input (fixed frequency) - the 'clock@f00' clock-control-module node references the 'osc' for its input, and is another provider for all the clocks

[PATCH v5 04/17] clk: mpc512x: introduce COMMON_CLK for MPC512x (disabled)

2013-11-17 Thread Gerhard Sittig
this change implements a clock driver for the MPC512x PowerPC platform which follows the COMMON_CLK approach and uses common clock drivers shared with other platforms this driver implements the publicly announced set of clocks (those listed in the dt-bindings header file), as well as generates

[PATCH v5 05/17] clk: mpc512x: add backwards compat to the CCF code

2013-11-17 Thread Gerhard Sittig
extend the recently added COMMON_CLK platform support for MPC512x such that it works with incomplete device tree data which lacks clock specs Cc: Mike Turquette mturque...@linaro.org Cc: Anatolij Gustschin ag...@denx.de Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org

[PATCH v5 06/17] dts: mpc512x: add clock specs for client lookups

2013-11-17 Thread Gerhard Sittig
this addresses the client side of device tree based clock lookups add clock specifiers to the mbx, nfc, mscan, sdhc, i2c, axe, diu, viu, mdio, fec, usb, pata, psc, psc fifo, and pci nodes in the shared mpc5121.dtsi include Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com

[PATCH v5 07/17] clk: mpc5xxx: switch to COMMON_CLK, retire PPC_CLOCK

2013-11-17 Thread Gerhard Sittig
the setup before the change was - arch/powerpc/Kconfig had the PPC_CLOCK option, off by default - depending on the PPC_CLOCK option the arch/powerpc/kernel/clock.c file was built, which implements the clk.h API but always returns -ENOSYS unless a platform registers specific callbacks - the

[PATCH v5 08/17] spi: mpc512x: adjust to OF based clock lookup

2013-11-17 Thread Gerhard Sittig
after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the PSC index, remove the psc%d_mclk template and unconditionally use 'mclk' acquire and release the 'ipg' clock item for register access as well Cc: Mark Brown

[PATCH v5 09/17] serial: mpc512x: adjust for OF based clock lookup

2013-11-17 Thread Gerhard Sittig
after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the PSC index, remove the psc%d_mclk template and unconditionally use 'mclk' acquire and release the ipg clock item for register access as well Cc: Greg Kroah-Hartman

[PATCH v5 10/17] serial: mpc512x: setup the PSC FIFO clock as well

2013-11-17 Thread Gerhard Sittig
prepare and enable the FIFO clock upon PSC FIFO initialization, check for and propagage errors when enabling the PSC FIFO clock, disable and unprepare the FIFO clock upon PSC FIFO uninitialization devm_{get,put}_clk() doesn't apply here, as the SoC provides a single FIFO component which is shared

[PATCH v5 12/17] mtd: mpc5121_nfc: adjust for OF based clock lookup

2013-11-17 Thread Gerhard Sittig
after device tree based clock lookup became available, the NAND flash driver need no longer use the previous global nfc_clk name, but should use the ipg clock name specific to the OF node Cc: David Woodhouse dw...@infradead.org Cc: Artem Bityutskiy artem.bityuts...@linux.intel.com Cc:

[PATCH v5 11/17] USB: fsl-mph-dr-of: adjust for OF based clock lookup

2013-11-17 Thread Gerhard Sittig
after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the component index -- remove the usb%d_clk template, always use ipg instead Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: linux-...@vger.kernel.org

[PATCH v5 14/17] net: can: mscan: adjust to common clock support for mpc512x

2013-11-17 Thread Gerhard Sittig
implement a .get_clock() callback for the MPC512x platform which uses the common clock infrastructure (eliminating direct access to the clock control registers from within the CAN network driver), and provide the corresponding .put_clock() callback to release resources after use acquire both the

[PATCH v5 13/17] [media] fsl-viu: adjust for OF based clock lookup

2013-11-17 Thread Gerhard Sittig
after device tree based clock lookup became available, the VIU driver need no longer use the previous global viu_clk name, but should use the ipg clock name specific to the OF node Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-me...@vger.kernel.org Signed-off-by: Gerhard Sittig

[PATCH v5 15/17] net: can: mscan: remove non-CCF code for MPC512x

2013-11-17 Thread Gerhard Sittig
transition to the common clock framework has completed and the PPC_CLOCK is no longer available for the MPC512x platform, remove the now obsolete code path of the mpc5xxx mscan driver which accessed clock control module registers directly Cc: Wolfgang Grandegger w...@grandegger.com Cc: Marc

[PATCH v5 16/17] powerpc/mpc512x: improve DIU related clock setup

2013-11-17 Thread Gerhard Sittig
adapt the DIU clock initialization to the COMMON_CLK approach: device tree based clock lookup, prepare and unprepare for clocks, work with frequencies not dividers, call the appropriate clk_*() routines and don't access CCM registers the best clock determination now completely relies on the

[PATCH v5 17/17] clk: mpc512x: remove migration support workarounds

2013-11-17 Thread Gerhard Sittig
this change removes workarounds which have become obsolete after migration to common clock support has completed - remove clkdev registration calls (compatibility clock item aliases) after all peripheral drivers were adjusted for device tree based clock lookup - remove pre-enable workarounds

Re: [PATCH v2] powerpc: kvm: optimize sc 1 as fast return

2013-11-17 Thread liu ping fan
On Sat, Nov 16, 2013 at 3:00 PM, Paul Mackerras pau...@samba.org wrote: On Fri, Nov 15, 2013 at 04:35:01PM +0800, Liu Ping Fan wrote: +sc_1_fast_return: + mtspr SPRN_SRR0,r10 + mtspr SPRN_SRR1,r11 + li r10, BOOK3S_INTERRUPT_SYSCALL + li r11, (MSR_ME 1) | 1 /*

[PATCH v3] powerpc: kvm: optimize sc 1 as fast return

2013-11-17 Thread Liu Ping Fan
In some scene, e.g openstack CI, PR guest can trigger sc 1 frequently, this patch optimizes the path by directly delivering BOOK3S_INTERRUPT_SYSCALL to HV guest, so powernv can return to HV guest without heavy exit, i.e, no need to swap TLB, HTAB,.. etc Signed-off-by: Liu Ping Fan

[PATCH] powerpc: Only print PACATMSCRATCH in oops when TM is active

2013-11-17 Thread Anton Blanchard
If TM is not active there is no need to print PACATMSCRATCH so we can save ourselves a line. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/kernel/process.c === --- a/arch/powerpc/kernel/process.c +++

Re: [PATCH] powerpc: Only print PACATMSCRATCH in oops when TM is active

2013-11-17 Thread Michael Neuling
Anton Blanchard an...@samba.org wrote: If TM is not active there is no need to print PACATMSCRATCH so we can save ourselves a line. Signed-off-by: Anton Blanchard an...@samba.org Acked-by: Michael Neuling mi...@neuling.org --- Index: b/arch/powerpc/kernel/process.c

[PATCH] powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled

2013-11-17 Thread Anton Blanchard
Commit fba2369e6ceb (mm: use vm_unmapped_area() on powerpc architecture) has a bug in slice_scan_available() where we compare an unsigned long (high_slices) against a shifted int. As a result, comparisons against the top 32 bits of high_slices (representing the top 32TB) always returns 0 and the

[PATCH v2] powerpc/powernv: infrastructure to read opal messages in generic format.

2013-11-17 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar mah...@linux.vnet.ibm.com Opal now has a new messaging infrastructure to push the messages to linux in a generic format for different type of messages using only one event bit. The format of the opal message is as below: struct opal_msg { uint32_t msg_type;

[PATCH] powerpc: Don't use ELFv2 ABI to build the kernel

2013-11-17 Thread Alistair Popple
The kernel doesn't build correctly using the ELFv2 ABI. This patch ensures that the ELFv1 ABI is used when building a kernel with an ELFv2 enabled compiler. Signed-off-by: Alistair Popple alist...@popple.id.au --- arch/powerpc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH V3] powerpc: Add a vga alias node for P1022

2013-11-17 Thread Jason Jin
In u-boot, when set the video as console, the name 'vga' is used as a general name for the video device, during the fdt_fixup_stdout process, the 'vga' name is used to search in the dtb to setup the 'linux,stdout-path' node. Though the P1022 DIU is not VGA-compatible device, to meet the 'vga' name