[PATCH 3/3] powerpc/mpic: Properly set default triggers

2012-04-19 Thread Benjamin Herrenschmidt
This gets rid of the unused default senses array, and replaces the incorrect use of IRQ_TYPE_NONE with the new IRQ_TYPE_DEFAULT for the initial set_trigger() call when mapping an interrupt. This in turn makes us read the HW state and update the irq desc accordingly. Signed-off-by: Benjamin Herren

[PATCH 2/3] irq: Add IRQ_TYPE_DEFAULT for use by PIC drivers

2012-04-19 Thread Benjamin Herrenschmidt
This is meant typically to allow a PIC driver's irq domain map() callback to establish sane defaults for the interrupt (and make sure that the HW and the irq_desc are in sync as far as the trigger is concerned). The irq core may not call the set_trigger callback if it thinks the trigger is already

[PATCH 1/3] powerpc/mpic: Fix confusion between hw_irq and virq

2012-04-19 Thread Benjamin Herrenschmidt
mpic_is_ipi() takes a virq and immediately converts it to a hw_irq. However, one of the two call sites calls it with a ... hw_irq. The other call site also happens to have the hw_irq at hand, so let's change it to just take that as an argument. Also change mpic_is_tm() for consistency. Signed-off

[PATCH 1/3] powerpc/mpic: Fix confusion between hw_irq and virq

2012-04-19 Thread Benjamin Herrenschmidt
mpic_is_ipi() takes a virq and immediately converts it to a hw_irq. However, one of the two call sites calls it with a ... hw_irq. The other call site also happens to have the hw_irq at hand, so let's change it to just take that as an argument. Also change mpic_is_tm() for consistency. Signed-off

[git pull] Please pull powerpc.git merge branch

2012-04-19 Thread Kumar Gala
Ben, Some bug fix patches for v3.4. - k The following changes since commit fae2e0fb24c61ca68c98d854a34732549ebc1854: powerpc: Fix typo in runlatch code (2012-04-11 10:42:15 +1000) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git merge

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Benjamin Herrenschmidt
On Thu, 2012-04-19 at 11:37 +0200, Jean Delvare wrote: > Benjamin, thanks a lot for doing this! These drivers were the last ones > blocking the removal of the legacy binding model in i2c-core. There's a couple left :-) I haven't done therm_windtunnel.c (here too, I need testers when I'm done) and

Re: [PATCH 4/4] powerpc/mpc85xx: add MPIC message dts node

2012-04-19 Thread Kumar Gala
On Apr 15, 2012, at 9:05 PM, Mingkai Hu wrote: > Signed-off-by: Mingkai Hu > --- > arch/powerpc/boot/dts/fsl/pq3-mpic-message-B.dtsi | 43 + > arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi | 10 + > 2 files changed, 53 insertions(+), 0 deletions(-) > create mode 100

Re: [PATCH 3/4] powerpc/mpic_msgr: fix offset error when setting mer register

2012-04-19 Thread Kumar Gala
On Apr 15, 2012, at 9:05 PM, Mingkai Hu wrote: > Signed-off-by: Mingkai Hu > --- > arch/powerpc/sysdev/mpic_msgr.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) applied to merge - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozla

Re: [PATCH 2/4] powerpc/mpic_msgr: add lock for MPIC message global variable

2012-04-19 Thread Kumar Gala
On Apr 15, 2012, at 9:05 PM, Mingkai Hu wrote: > Also fix issue of accessing invalid msgr pointer issue. The local > msgr pointer in fucntion mpic_msgr_get will be accessed before > getting a valid address which will cause kernel crash. > > Signed-off-by: Mingkai Hu > --- > arch/powerpc/sysdev/

Re: [PATCH 1/4] powerpc/mpic_msgr: fix compile error when SMP disabled

2012-04-19 Thread Kumar Gala
On Apr 15, 2012, at 9:05 PM, Mingkai Hu wrote: > In file included from arch/powerpc/sysdev/mpic_msgr.c:20:0: > ~/arch/powerpc/include/asm/mpic_msgr.h: In function > 'mpic_msgr_set_destination': > ~/arch/powerpc/include/asm/mpic_msgr.h:117:2: > error: implicit declaration of function 'get_hard_sm

Re: [PATCH] powerpc: fix build when CONFIG_BOOKE_WDT is enabled

2012-04-19 Thread Kumar Gala
On Apr 19, 2012, at 1:32 AM, Baruch Siach wrote: > Commit ae3a197e (Disintegrate asm/system.h for PowerPC) broke build of > assembly files when CONFIG_BOOKE_WDT is enabled as follows: > > AS arch/powerpc/lib/string.o > /home/baruch/git/stable/arch/powerpc/include/asm/reg_booke.h: Assembler

Re: [PATCH] powerpc/85xx: don't call of_platform_bus_probe() twice

2012-04-19 Thread Kumar Gala
On Nov 30, 2011, at 10:19 AM, Timur Tabi wrote: > Commit 46d026ac ("powerpc/85xx: consolidate of_platform_bus_probe calls") > replaced platform-specific of_device_id tables with a single function > that probes the most of the busses in 85xx device trees. If a specific > platform needed additiona

Re: [PATCH v5 06/27] irq_domain/powerpc: eliminate irq_map; use irq_alloc_desc() instead

2012-04-19 Thread Grant Likely
On Thu, 12 Apr 2012 07:37:28 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-04-11 at 14:57 -0600, Grant Likely wrote: > > > > Yeah, I've got a different way to fix it though. There is exactly one > > user of irq_virq_count in-tree right now: PS3. Also, irq_virq_count > > is only useful fo

Re: [PATCH 1/2] powerpc/8xx: Fix NR_IRQ bugs and refactor 8xx interrupt controller

2012-04-19 Thread Grant Likely
On Tue, 17 Apr 2012 09:03:02 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2012-04-16 at 14:13 -0600, Grant Likely wrote: > > The mpc8xx driver uses a reference to NR_IRQS that is buggy. It uses > > NR_IRQs for the array size of the ppc_cached_irq_mask bitmap, but > > NR_IRQs could be smaller t

Re: [PATCH 2/2] irqdomain/powerpc: Fix broken NR_IRQ references

2012-04-19 Thread Grant Likely
On Thu, 19 Apr 2012 10:45:01 +1000, Michael Ellerman wrote: > On Mon, 2012-04-16 at 14:13 -0600, Grant Likely wrote: > > > diff --git a/arch/powerpc/platforms/cell/axon_msi.c > > b/arch/powerpc/platforms/cell/axon_msi.c > > index d09f3e8..fc9df1a 100644 > > --- a/arch/powerpc/platforms/cell/axo

Re: [PATCH] edac: change the mem allocation scheme to make Documentation/kobject.txt happy

2012-04-19 Thread Greg K H
On Thu, Apr 19, 2012 at 10:21:30AM -0300, Mauro Carvalho Chehab wrote: > Kernel kobjects have rigid rules: each container object should be > dynamically allocated, and can't be allocated into a single kmalloc. > > EDAC never obeyed this rule: it has a single malloc function that > allocates all ne

[PATCH] edac: change the mem allocation scheme to make Documentation/kobject.txt happy

2012-04-19 Thread Mauro Carvalho Chehab
Kernel kobjects have rigid rules: each container object should be dynamically allocated, and can't be allocated into a single kmalloc. EDAC never obeyed this rule: it has a single malloc function that allocates all needed data into a single kzalloc. As this is not accepted anymore, change the all

Re: [EDAC ABI v13 24/25] edac: change the mem allocation scheme to make Documentation/kobject.txt happy

2012-04-19 Thread Mauro Carvalho Chehab
Hi Joe, Em 17-04-2012 18:17, Joe Perches escreveu: > On Mon, 2012-04-16 at 17:38 -0300, Mauro Carvalho Chehab wrote: >> Kernel kobjects have rigid rules: each container object should be >> dynamically allocated, and can't be allocated into a single kmalloc. >> >> EDAC never obeyed this rule: it ha

Re: [PATCH 02/15] powerpc/pmac: Convert therm_adt746x to new i2c probing

2012-04-19 Thread Andreas Schwab
Tested on iBook G4 (PowerBook6,7). Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ___ Linuxppc-dev mailing list Linuxppc-dev@lists

Re: PowerPC radeon KMS - is it possible?

2012-04-19 Thread Michel Dänzer
On Don, 2012-04-19 at 13:48 +0200, Gerhard Pircher wrote: > > Von: "Michel Dänzer" > > On Mit, 2012-04-18 at 18:23 +0200, Gerhard Pircher wrote: > > > > Von: "Michel Dänzer" > > > > On Mit, 2012-04-18 at 17:49 +0200, Gerhard Pircher wrote: > > > > > > > > > > That may be a stupid question, bu

Re: PowerPC radeon KMS - is it possible?

2012-04-19 Thread Gerhard Pircher
Original-Nachricht > Datum: Thu, 19 Apr 2012 08:32:51 +0200 > Von: "Michel Dänzer" > An: Gerhard Pircher > CC: ojordan12...@hotmail.co.uk, sch...@linux-m68k.org, > linuxppc-dev@lists.ozlabs.org > Betreff: Re: PowerPC radeon KMS - is it possible? > On Mit, 2012-04-18 at 18:23

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Jean Delvare
Hallo Andreas, On Thu, 19 Apr 2012 12:11:25 +0200, Andreas Schwab wrote: > Jean Delvare writes: > > > These drivers were the last ones blocking the removal of the legacy > > binding model in i2c-core. > > There are also still some uses in snd-aoa. You're right, there are still 3 sound drivers

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Andreas Schwab
Andreas Schwab writes: > Andreas Schwab writes: > >> Jean Delvare writes: >> >>> These drivers were the last ones blocking the removal of the legacy >>> binding model in i2c-core. >> >> There are also still some uses in snd-aoa. > > Never mind, I just found the commit in tiwai/sound.git. Confu

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Andreas Schwab
Andreas Schwab writes: > Jean Delvare writes: > >> These drivers were the last ones blocking the removal of the legacy >> binding model in i2c-core. > > There are also still some uses in snd-aoa. Never mind, I just found the commit in tiwai/sound.git. Andreas. -- Andreas Schwab, sch...@linux

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Christian Kujau
Jean Delvare wrote: >On Thu, 19 Apr 2012 18:16:41 +1000, Benjamin Herrenschmidt wrote: >> The goal of this series is to convert a bulk of PowerMac i2c drivers >> to the new "proper" i2c driver registration model. This series is >> not complete in that there are still a few drivers to do but it >>

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Andreas Schwab
Jean Delvare writes: > These drivers were the last ones blocking the removal of the legacy > binding model in i2c-core. There are also still some uses in snd-aoa. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And no

Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Jean Delvare
On Thu, 19 Apr 2012 18:16:41 +1000, Benjamin Herrenschmidt wrote: > The goal of this series is to convert a bulk of PowerMac i2c drivers > to the new "proper" i2c driver registration model. This series is > not complete in that there are still a few drivers to do but it > goes through the bulk of t

Re: [PATCH 01/15] i2c/powermac: Register i2c devices from device-tree

2012-04-19 Thread Andreas Schwab
Benjamin Herrenschmidt writes: > + /* Make up a modalias. Note: we to _NOT_ want the standard > + * i2c drivers to match with any of our powermac stuff > + * unless they have been specifically modified to handle > + * it on a case by case basis.

[PATCH 01/15] i2c/powermac: Register i2c devices from device-tree

2012-04-19 Thread Benjamin Herrenschmidt
This causes i2c-powermac to register i2c devices exposed in the device-tree, enabling new-style probing of devices. Note that we prefix the IDs with "MAC," in order to prevent the generic drivers from matching. This is done on purpose as we only want drivers specifically tested/designed to operate

[PATCH 13/15] powerpc/windfarm: Updates to lm75 and max6690 sensors

2012-04-19 Thread Benjamin Herrenschmidt
This allows those modules to load on PowerMac7,2 PowerMac7,3 and RackMac3,1 and add the sensor name conversion for those machines. This will be used by the corresponding new windfarm modules for those machines. Note that since therm_pm72 is linked first, it will still take priority on those i2c d

[PATCH 07/15] powerpc/pmac: Don't add_timer() twice

2012-04-19 Thread Benjamin Herrenschmidt
If the interrupt and the timeout happen roughly at the same time, we can get into a situation where the timer function is run while the interrupt has already been processed. In this case, the timer function might end up doing an add_timer on an already pending timer, causing a BUG_ON() to trigger.

[PATCH 00/15] PowerMac i2c API conversions & windfarm updates

2012-04-19 Thread Benjamin Herrenschmidt
The goal of this series is to convert a bulk of PowerMac i2c drivers to the new "proper" i2c driver registration model. This series is not complete in that there are still a few drivers to do but it goes through the bulk of thermal control and some of the nastiest. The biggest change is that windf

[PATCH 10/15] powerpc/windfarm: Add useful accessors

2012-04-19 Thread Benjamin Herrenschmidt
Makes the code more readable Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm.h | 25 + drivers/macintosh/windfarm_pm81.c | 25 - drivers/macintosh/windfarm_pm91.c | 33 +++-- 3 files chang

[PATCH 08/15] powerpc/windfarm: Remove spurrious sysfs_attr_init()

2012-04-19 Thread Benjamin Herrenschmidt
The windfarm core will do it, so this is a duplicate. Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_smu_controls.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c index 3c2be51..c1

[PATCH 02/15] powerpc/pmac: Convert therm_adt746x to new i2c probing

2012-04-19 Thread Benjamin Herrenschmidt
This simplifies the driver to stop using the deprecated attach interface, Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/therm_adt746x.c | 480 - 1 file changed, 204 insertions(+), 276 deletions(-) diff --git a/drivers/macintosh/therm_adt746x.c

[PATCH 11/15] powerpc/windfarm: Add ad7417 sensor

2012-04-19 Thread Benjamin Herrenschmidt
For user by the upcoming windfarm_pm72 and windfarm_rm31 Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_ad7417_sensor.c | 347 1 file changed, 347 insertions(+) create mode 100644 drivers/macintosh/windfarm_ad7417_sensor.c diff --git a/driver

[PATCH 14/15] powerpc/windfarm: Add Fan Control Unit controls for G5s

2012-04-19 Thread Benjamin Herrenschmidt
The FCU operates the fans on the earlier generation G5 machines, this module will be used by upcoming windfarm drivers. Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_fcu_controls.c | 617 + 1 file changed, 617 insertions(+) create mode 100644

[PATCH 12/15] powerpc/windfarm: Add lm87 sensor

2012-04-19 Thread Benjamin Herrenschmidt
For use by the upcoming windfarm_rm31 Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_lm87_sensor.c | 201 ++ 1 file changed, 201 insertions(+) create mode 100644 drivers/macintosh/windfarm_lm87_sensor.c diff --git a/drivers/macintosh/windfarm_

[PATCH 05/15] powerpc/pmac: Convert windfarm_smu_sat to new i2c probing

2012-04-19 Thread Benjamin Herrenschmidt
This simplifies the driver to stop using the deprecated attach interface. While at it we also implement teardown properly and fix the refcounting by using a kref. Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_smu_sat.c | 126 +- 1 file cha

[PATCH 04/15] powerpc/pmac: Convert windfarm_max6690 to new i2c probing

2012-04-19 Thread Benjamin Herrenschmidt
This simplifies the driver to stop using the deprecated attach interface Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_max6690_sensor.c | 100 ++- 1 file changed, 21 insertions(+), 79 deletions(-) diff --git a/drivers/macintosh/windfarm_max6690_se

[PATCH 15/15] powerpc/powermac: New windfarm driver for PowerMac G5 (AGP) and Xserve G5

2012-04-19 Thread Benjamin Herrenschmidt
This replaces the old therm_pm72 using the same windfarm infrastructure that was used for other PowerMac G5 models. The fan speeds and sensors should now be visible in the same location in sysfs. The driver is split into separate core modules for PowerMac7,2 (and 7,3) and RackMac3,1, with a lot of

[PATCH 06/15] powerpc/windfarm: const'ify and add "priv" field to controls & sensors

2012-04-19 Thread Benjamin Herrenschmidt
const'ify the sensor ops and name and add a void* for use by the control and sensor drivers to point back to their private data, avoiding the need to create a wrapper data structure per sensor or control instance. Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm.h | 23

[PATCH 03/15] powerpc/pmac: Convert windfarm_lm75 to new i2c probing

2012-04-19 Thread Benjamin Herrenschmidt
This simplifies the driver to stop using the deprecated attach interface Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_lm75_sensor.c | 124 -- 1 file changed, 30 insertions(+), 94 deletions(-) diff --git a/drivers/macintosh/windfarm_lm75_senso

[PATCH 09/15] powerpc/windfarm: Improve display of fan speeds in sysfs

2012-04-19 Thread Benjamin Herrenschmidt
Controls registered as RPM and PWM fans are now displayed with the "RPM" or "%" suffix respectively to make it clearer to the user what the value actually means since the fan type isn't otherwise obvious. Signed-off-by: Benjamin Herrenschmidt --- drivers/macintosh/windfarm_core.c | 13

[PATCH] powerpc: fix build when CONFIG_BOOKE_WDT is enabled

2012-04-19 Thread Baruch Siach
Commit ae3a197e (Disintegrate asm/system.h for PowerPC) broke build of assembly files when CONFIG_BOOKE_WDT is enabled as follows: AS arch/powerpc/lib/string.o /home/baruch/git/stable/arch/powerpc/include/asm/reg_booke.h: Assembler messages: /home/baruch/git/stable/arch/powerpc/include/asm