[PATCH v5 3/3] powerpc: doc/dts-bindings: update doc of FSL I2C bindings

2010-01-31 Thread Wolfgang Grandegger
From: Wolfgang Grandegger This patch adds the MPC5121 to the list of supported devices, enhances the doc of the "clock-frequency" property and removes the obsolete "cell-index" property from the example nodes. Furthermore and example for the MPC5121 has been added. Signed-off-by: Wolfgang Grande

[PATCH v5 0/3] i2c-mpc: add support for the Freescale MPC512x and other fixes

2010-01-31 Thread Wolfgang Grandegger
This patch series adds support for the MPC512x from Freescale to the i2c-mpc driver. At that occasion, issues with __devinit[data] have been fixed and the doc of the FSL I2C dts bindings updated. It has been tested on a MPC5121ADS, TQM5200 and TQM8560 board Changes since v1: - use macro MPC_I2C_

[PATCH v5 2/3] i2c-mpc: add support for the MPC512x processors from Freescale

2010-01-31 Thread Wolfgang Grandegger
From: Wolfgang Grandegger The "setclock" initialization functions have been renamed to "setup" because I2C interrupts must be enabled for the MPC512x. This requires to handle "fsl,preserve-clocking" in a slighly different way. Also, the old settings are now reported calling dev_dbg(). For the MPC

[PATCH v5 1/3] i2c-mpc: use __devinit[data] for initialization functions and data

2010-01-31 Thread Wolfgang Grandegger
From: Wolfgang Grandegger "__devinit[data]" has not yet been used for all initialization functions and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has been renamed to "mpc_i2c_data", which is even the better name. Signed-off-by: Wolfgang Grandegger Tested-by: Wolfram Sang

[PATCH 4/7] powerpc: Remove whitespace in irq chip name fields

2010-01-31 Thread Anton Blanchard
Now we use printf style alignment there is no need to manually space these fields. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c === --- linux-cpumask.orig/arch/powerpc/platf

[PATCH 7/7] powerpc: Increase NR_IRQS Kconfig maximum to 32768

2010-01-31 Thread Anton Blanchard
With dynamic irq descriptors the overhead of a large NR_IRQS is much lower than it used to be. With more MSI-X capable adapters and drivers exploiting multiple vectors we may as well allow the user to increase it beyond the current maximum of 512. 32768 seems large enough that we'd never have to

[PATCH 3/7] powerpc: Rework /proc/interrupts

2010-01-31 Thread Anton Blanchard
On a large machine I noticed the columns of /proc/interrupts failed to line up with the header after CPU9. At sufficiently large numbers of CPUs it becomes impossible to line up the CPU number with the counts. While fixing this I noticed x86 has a number of updates that we may as well pull in. On

[PATCH 6/7] powerpc: Convert global "BAD" interrupt to per cpu spurious

2010-01-31 Thread Anton Blanchard
I often get asked if BAD interrupts are really bad. On some boxes (eg IBM machines running a hypervisor) there are valid cases where are presented with an interrupt that is not for us. These cases are common enough to show up as thousands of BAD interrupts a day. Tone them down by calling them sp

[PATCH 2/7] powerpc: Reduce footprint of xics_ipi_struct

2010-01-31 Thread Anton Blanchard
Right now we allocate a cacheline sized NR_CPUS array for xics IPI communication. Use DECLARE_PER_CPU_SHARED_ALIGNED to put it in percpu data in its own cacheline since it is written to by other cpus. On a kernel with NR_CPUS=1024, this saves quite a lot of memory: textdata bss d

[PATCH 5/7] powerpc: Add timer, performance monitor and machine check counts to /proc/interrupts

2010-01-31 Thread Anton Blanchard
With NO_HZ it is useful to know how often the decrementer is going off. The patch below adds an entry for it and also adds it into the /proc/stat summaries. While here, I added performance monitoring and machine check exceptions. I found it useful to keep an eye on the PMU exception rate when usi

[PATCH 1/7] powerpc: Reduce footprint of irq_stat

2010-01-31 Thread Anton Blanchard
PowerPC is currently using asm-generic/hardirq.h which statically allocates an NR_CPUS irq_stat array. Switch to an arch specific implementation which uses per cpu data: On a kernel with NR_CPUS=1024, this saves quite a lot of memory: textdata bss dec hexfilename 8767

Re: [PATCH] powerpc: Reduce footprint of xics_ipi_struct

2010-01-31 Thread Anton Blanchard
Hi, > > +#if defined(CONFIG_XICS) && defined(CONFIG_SMP) > > + unsigned long xics_ipi; > > +#endif > > } cacheline_aligned irq_cpustat_t; > > This is still a gross abuse of irq_cpustat_t ... Can't we do > a separate DECLARE_PER_CPU_SHARED_ALIGNED(unsigned long, xics_ipi) > inside xics.c i

[PATCH] powerpc/pseries: Pass CPPR value to H_XIRR hcall

2010-01-31 Thread Mark Nelson
Now that we properly keep track of the CPPR value (since 49bd3647134ea47420067aea8d1401e722bf2aac, "powerpc/pseries: Track previous CPPR values to correctly EOI interrupts") we can pass it to the H_XIRR hcall. This is needed because the Partition Adjunct Option of new versions of pHyp extend the H

Re: [PATCH] powerpc: Reduce footprint of irq_stat

2010-01-31 Thread Anton Blanchard
Hi, > > +static inline void ack_bad_irq(unsigned int irq) > > +{ > > + printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq); > > +} > > Looks like some unrelated gunk slipped into this patch :-) We need that to link :) kernel/irq/handle.c: In function ‘handle_bad_irq’: kernel/irq/h

powerpc -next branch

2010-01-31 Thread Benjamin Herrenschmidt
So I'm about to do a proper -next branch for the next round (it's about time !). I'll probably push a handful or two of things in my 'test' branch tonight, which are then going to hit -next in a day or two if nobody complains. There's more to pickup though. However, the bulk of the stuff pending

Re: [PATCH] powerpc: Reduce footprint of irq_stat

2010-01-31 Thread Benjamin Herrenschmidt
> +typedef struct { > + unsigned int __softirq_pending; > +} cacheline_aligned irq_cpustat_t; > + > +DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); > + > +#define __ARCH_IRQ_STAT > + > +#define local_softirq_pending() > __get_cpu_var(irq_stat).__softirq_pending > + > +stati

Re: [PATCH] powerpc: Reduce footprint of xics_ipi_struct

2010-01-31 Thread Benjamin Herrenschmidt
On Tue, 2010-01-12 at 21:58 +1100, Anton Blanchard wrote: > Index: linux-cpumask/arch/powerpc/include/asm/hardirq.h > === > --- linux-cpumask.orig/arch/powerpc/include/asm/hardirq.h 2010-01-12 > 12:36:47.174226189 +1100 > +++ lin

Re: [RFC:PATCH 01/03] powerpc: Extended ptrace interface

2010-01-31 Thread Benjamin Herrenschmidt
On Thu, 2010-01-21 at 15:47 +1300, Michael Neuling wrote: > > powerpc: Extended ptrace interface > > +static long ppc_set_hwdebug(struct task_struct *child, > > +struct ppc_hw_breakpoint *bp_info) > > +{ > > + /* > > +* We currently support one data breakpoint > > +*/ > >

Re: [PATCH] powerpc: Add DMA mask to MPSC serial and network and UART device to serial

2010-01-31 Thread Benjamin Herrenschmidt
On Fri, 2010-01-29 at 18:04 -0600, Corey Minyard wrote: > From: Corey Minyard > > The MPSC drivers that use DMA need to set coherent_dma_mask to allow > dma_alloc_xxx routines to work properly. Also, the mpsc serial driver > needed to set pi->port.dev to register properly. With these fixes, > t

[resend] Make the kernel accept ePAPR style phandle information

2010-01-31 Thread David Gibson
Grant, I've updated this for your current test-devicetree branch. Please apply. Currently when processing flattened device trees, the kernel expects the phandle in a property called "linux,phandle". The ePAPR spec - not being Linux specific - instead requires phandles to be encoded in a property

Re: [git pull] Please pull powerpc.git merge branch

2010-01-31 Thread Benjamin Herrenschmidt
On Sun, 2010-01-31 at 10:34 +1100, Benjamin Herrenschmidt wrote: > Hi Linus ! > > Here are some more defconfig updates that I missed before LCA and a > few PCI related fixes, some of them actually fixing regressions and > one of them (the 4xx one) trivial enough that's really not worth > delaying

[PATCH] powerpc/pseries: Fix xics build without CONFIG_SMP

2010-01-31 Thread Benjamin Herrenschmidt
desc->affinity doesn't exit in that case. Let's use a macro for the UP variant of get_irq_server(), it's the easiest way, avoids evaluating arguments. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/pseries/xics.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-)

Re: [PATCH 01/10] arch/powerpc: Fix continuation line formats

2010-01-31 Thread Benjamin Herrenschmidt
On Sun, 2010-01-31 at 12:02 -0800, Joe Perches wrote: > String constants that are continued on subsequent lines with \ > are not good. > > Signed-off-by: Joe Perches You want me to take that in the powerpc tree ? A minor glitch below tho... > --- > arch/powerpc/kernel/nvram_64.c

Re: [PATCH] nodmask.h: remove macro any_online_node

2010-01-31 Thread Benjamin Herrenschmidt
On Wed, 2010-01-06 at 16:24 -0700, H Hartley Sweeten wrote: > nodmask.h: remove macro any_online_node > > The macro any_online_node is prone to producing sparse warnings > due to the local symbol 'node'. Since all the in-tree users are really > requesting the first online node (the mask argument i

Re: [PATCH 5/5] powerpc: Increase NR_IRQS Kconfig maximum to 32768

2010-01-31 Thread Benjamin Herrenschmidt
On Sun, 2010-01-31 at 22:14 +1100, Anton Blanchard wrote: > With dynamic irq descriptors the overhead of a large NR_IRQS is much lower > than it used to be. With more MSI-X capable adapters and drivers exploiting > multiple vectors we may as well allow the user to increase it beyond the > current

[PATCH 01/10] arch/powerpc: Fix continuation line formats

2010-01-31 Thread Joe Perches
String constants that are continued on subsequent lines with \ are not good. Signed-off-by: Joe Perches --- arch/powerpc/kernel/nvram_64.c |6 +++--- arch/powerpc/platforms/pseries/hotplug-cpu.c |8 arch/powerpc/platforms/pseries/smp.c |4 ++-- 3 files

[PATCH 00/10] treewide: Fix format strings that misuse continuations

2010-01-31 Thread Joe Perches
Format strings that are continued with \ are frequently misused. Change them to use mostly single line formats, some longer than 80 chars. Fix a few miscellaneous typos at the same time. Joe Perches (10): arch/powerpc: Fix continuation line formats arch/blackfin: Fix continuation line formats

[PATCH] hwmon: (ams) Fix device removal sequence

2010-01-31 Thread Jean Delvare
Some code that is in ams_exit() (the module exit code) should instead be called when the device (not module) is removed. It probably doesn't make much of a difference in the PMU case, but in the I2C case it does matter. I make no guarantee that my fix isn't racy, I'm not familiar enough with the a

[PATCH] macintosh/therm_adt746x: Fix sysfs attributes lifetime

2010-01-31 Thread Jean Delvare
Looking at drivers/macintosh/therm_adt746x.c, the sysfs files are created in thermostat_init() and removed in thermostat_exit(), which are the driver's init and exit functions. These files are backed-up by a per-device structure, so it looks like the wrong thing to do: the sysfs files have a lifeti

[PATCH 5/5] powerpc: Increase NR_IRQS Kconfig maximum to 32768

2010-01-31 Thread Anton Blanchard
With dynamic irq descriptors the overhead of a large NR_IRQS is much lower than it used to be. With more MSI-X capable adapters and drivers exploiting multiple vectors we may as well allow the user to increase it beyond the current maximum of 512. 32768 seems large enough that we'd never have to

[PATCH 3/5] powerpc: Add timer, performance monitor and machine check counts to /proc/interrupts

2010-01-31 Thread Anton Blanchard
With NO_HZ it is useful to know how often the decrementer is going off. The patch below adds an entry for it and also adds it into the /proc/stat summaries. While here, I added performance monitoring and machine check exceptions. I found it useful to keep an eye on the PMU exception rate when usi

[PATCH 4/5] powerpc: Convert global "BAD" interrupt to per cpu spurious

2010-01-31 Thread Anton Blanchard
I often get asked if BAD interrupts are really bad. On some boxes (eg IBM machines running a hypervisor) there are valid cases where are presented with an interrupt that is not for us. These cases are common enough to show up as thousands of BAD interrupts a day. Tone them down by calling them sp

[PATCH 1/5] powerpc: Rework /proc/interrupts

2010-01-31 Thread Anton Blanchard
On a large machine I noticed the columns of /proc/interrupts failed to line up with the header after CPU9. At sufficiently large numbers of CPUs it becomes impossible to line up the CPU number with the counts. While fixing this I noticed x86 has a number of updates that we may as well pull in. On

[PATCH 2/5] powerpc: Remove whitespace in irq chip name fields

2010-01-31 Thread Anton Blanchard
Now we use printf style alignment there is no need to manually space these fields. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c === --- linux-cpumask.orig/arch/powerpc/platf

Re: i2c_powermac: Kernel access of bad area

2010-01-31 Thread Jean Delvare
On Sat, 30 Jan 2010 22:05:26 -0800 (PST), Christian Kujau wrote: > OK, I've now applied both the drivers/hwmon/ams/ patches and your earlier > one for drivers/macintosh/therm_adt746x.c [0] to a current -git checkout > and now I can unload i2c_powermac, list and read the remaining files in > /sys/

Re: ping, was Re: [PATCH 1/2] pmac-zilog: add platform driver, version 3

2010-01-31 Thread Geert Uytterhoeven
On Sun, Jan 31, 2010 at 08:25, wrote: > As I understand it, this patch needs Ben's ack before it (and the others) > can be merged into linux-next (?) He gave his ack on IRC. Still have to add them to m68k-queue and for-next, though. Gr{oetje,eeting}s,