7 years agoMerge branch 'om-gta02-2.6.37' into om-2.6.37 om-2.6.37 github/om-2.6.37
Lars-Peter Clausen [Sat, 8 Jan 2011 18:36:48 +0000 (19:36 +0100)]
Merge branch 'om-gta02-2.6.37' into om-2.6.37

7 years agoMerge branch 'pcf50633-2.6.37' into om-gta02-2.6.37 om-gta02-2.6.37 github/om-gta02-2.6.37
Lars-Peter Clausen [Sat, 8 Jan 2011 18:26:41 +0000 (19:26 +0100)]
Merge branch 'pcf50633-2.6.37' into om-gta02-2.6.37

7 years agopcf50633: Set cell id to -1 if there is only one instance of the cell pcf50633-2.6.37 github/pcf50633-2.6.37
Lars-Peter Clausen [Sat, 8 Jan 2011 18:17:06 +0000 (19:17 +0100)]
pcf50633: Set cell id to -1 if there is only one instance of the cell

This ensures sysfs path backwards compatibility with older kernel versions

7 years agoremove left over irq workqueue
Lars-Peter Clausen [Thu, 6 Jan 2011 15:21:37 +0000 (16:21 +0100)]
remove left over irq workqueue

7 years agoMerge branch 'om-gta02-2.6.37' into om-2.6.37
Lars-Peter Clausen [Thu, 6 Jan 2011 14:24:34 +0000 (15:24 +0100)]
Merge branch 'om-gta02-2.6.37' into om-2.6.37

7 years agoMerge branches 'gta01-machine-2.6.37', 'jbt6k74-2.6.37', 'wm8753-2.6.37', 'om-s3c...
Lars-Peter Clausen [Thu, 6 Jan 2011 14:04:34 +0000 (15:04 +0100)]
Merge branches 'gta01-machine-2.6.37', 'jbt6k74-2.6.37', 'wm8753-2.6.37', 'om-s3c-2.6.37' and 'pcf50606-2.6.37' into om-gta01-2.6.37

7 years agoMark pmu probe callback __devinit gta01-machine-2.6.37 github/gta01-machine-2.6.37
Lars-Peter Clausen [Mon, 19 Oct 2009 23:37:21 +0000 (01:37 +0200)]
Mark pmu probe callback __devinit

7 years agogta01: Add default config
Lars-Peter Clausen [Sat, 17 Oct 2009 19:31:07 +0000 (21:31 +0200)]
gta01: Add default config

7 years agogta01: reenable TS driver
Paul Fertser [Wed, 17 Nov 2010 20:38:37 +0000 (23:38 +0300)]
gta01: reenable TS driver

Signed-off-by: Paul Fertser <>

7 years agogta01: Disable battery driver for now.
Lars-Peter Clausen [Sat, 17 Oct 2009 18:44:17 +0000 (20:44 +0200)]
gta01: Disable battery driver for now.

7 years agoAdd gta01 machine support.
Lars-Peter Clausen [Sat, 17 Oct 2009 12:48:00 +0000 (14:48 +0200)]
Add gta01 machine support.

7 years agoInital pcf50606 support pcf50606-2.6.37 github/pcf50606-2.6.37
Lars-Peter Clausen [Fri, 16 Oct 2009 23:51:11 +0000 (01:51 +0200)]
Inital pcf50606 support

7 years agoMerge branch 'bq27x00-2.6.37' into om-gta02-2.6.37
Lars-Peter Clausen [Wed, 5 Jan 2011 21:42:33 +0000 (22:42 +0100)]
Merge branch 'bq27x00-2.6.37' into om-gta02-2.6.37

7 years agoPOWER: bq27x00: Add external_power_changed callback bq27x00-2.6.37 github/bq27x00-2.6.37
Lars-Peter Clausen [Wed, 5 Jan 2011 21:38:33 +0000 (22:38 +0100)]
POWER: bq27x00: Add external_power_changed callback

When the external power changes we should reread the battery registers to see if
anything has changed.

Signed-off-by: Lars-Peter Clausen <>

7 years agoMerge branch 'gta02-machine-2.6.37' into om-gta02-2.6.37
Lars-Peter Clausen [Wed, 5 Jan 2011 19:01:30 +0000 (20:01 +0100)]
Merge branch 'gta02-machine-2.6.37' into om-gta02-2.6.37

7 years agoMerge branch 'platform_battery-2.6.37' into om-gta02-2.6.37
Lars-Peter Clausen [Wed, 5 Jan 2011 19:01:22 +0000 (20:01 +0100)]
Merge branch 'platform_battery-2.6.37' into om-gta02-2.6.37

7 years agoMerge branches 'wm8753-2.6.37', 'pcf50633-2.6.37', 'om-s3c-2.6.37', 'om-misc-2.6...
Lars-Peter Clausen [Wed, 5 Jan 2011 19:01:13 +0000 (20:01 +0100)]
Merge branches 'wm8753-2.6.37', 'pcf50633-2.6.37', 'om-s3c-2.6.37', 'om-misc-2.6.37', 'jbt6k74-2.6.37', 'glamo-2.6.37', 'ar6000-2.6.37' and 'bq27x00-2.6.37' into om-gta02-2.6.37

7 years agogta02_drm_defconfig gta02-machine-2.6.37 github/gta02-machine-2.6.37
Martin Jansa [Fri, 9 Apr 2010 07:25:52 +0000 (09:25 +0200)]

config used in SHR-U, KMS enabled

7 years agogta02_defconfig
Radek Polak [Fri, 9 Apr 2010 07:24:43 +0000 (09:24 +0200)]

config used for qtmoko-v20. It has all freerunner hardware built in - so that
you can boot and your phone hardware is working even without /lib/modules. I
have (hopefully) all drivers from 2.6.29 as modules (usb keyboards etc).

7 years agoPOWER: bq27x00: Add health property.
Lars-Peter Clausen [Mon, 24 May 2010 20:40:18 +0000 (22:40 +0200)]
POWER: bq27x00: Add health property.

This patch adds the health property to the bq27x00 driver.

Signed-off-by: Lars-Peter Clausen <>

7 years agobq27000: Give more specific reports on battery status
Lars-Peter Clausen [Sat, 18 Sep 2010 15:31:16 +0000 (17:31 +0200)]
bq27000: Give more specific reports on battery status

Signed-off-by: Lars-Peter Clausen <>

7 years agoCache values
Lars-Peter Clausen [Tue, 25 May 2010 20:32:34 +0000 (22:32 +0200)]
Cache values

7 years agoPOWER: bq27x00: Add bq27000 support
Lars-Peter Clausen [Mon, 24 May 2010 17:55:27 +0000 (19:55 +0200)]
POWER: bq27x00: Add bq27000 support

This patch adds support for the bq27000 battery to the bq27x00 driver.
The bq27000 is similar to the bq27200 except that it uses the HDQ bus instead
of I2C to communicate with the host system.

The driver is implemented as a platform driver. The driver expects to be
provided with a read callback function through its platform data. The read
function is used assumed to do the lowlevel HDQ handling and return the value of
a certain register.

Signed-off-by: Lars-Peter Clausen <>

7 years agoPOWER: bq27x00-battery: Prepare code for addition of bq27000 platform driver
Lars-Peter Clausen [Mon, 24 May 2010 17:37:58 +0000 (19:37 +0200)]
POWER: bq27x00-battery: Prepare code for addition of bq27000 platform driver

This patch simplifies the drivers data structure and moves code to be shared by
both init functions into a common function.
This patch has no functional changes, it only moves code around.

Signed-off-by: Lars-Peter Clausen <>

7 years agoPOWER: bq27x00: Add charge-full property
Lars-Peter Clausen [Mon, 24 May 2010 19:13:02 +0000 (21:13 +0200)]
POWER: bq27x00: Add charge-full property

This patch adds the charge-full property to the bq27x00 driver.

Signed-off-by: Lars-Peter Clausen <>

7 years agoPOWER: bq27x00: Return -ENODEV for properties if the battery is not present
Lars-Peter Clausen [Mon, 24 May 2010 19:57:33 +0000 (21:57 +0200)]
POWER: bq27x00: Return -ENODEV for properties if the battery is not present

This patch changes get_property callback of the bq27x00 battery to return
-ENODEV for properties other then the PROP_PRESENT if the battery is not
The power subsystem core expects a driver to behave that way.

Signed-off-by: Lars-Peter Clausen <>

7 years agoPOWER: bq27x00: Fix current now property
Lars-Peter Clausen [Mon, 24 May 2010 18:52:13 +0000 (20:52 +0200)]
POWER: bq27x00: Fix current now property

According to the bq27000 datasheet to obtain the current value in Micro-ampere
from the AI register it has to be transformed by the following formula:
    current = AI * 3570 / 20

This patch adjust the drivers code accordingly.

Signed-off-by: Lars-Peter Clausen <>

7 years agoPOWER: bq27x00: Improve temperature precession
Lars-Peter Clausen [Mon, 24 May 2010 18:20:57 +0000 (20:20 +0200)]
POWER: bq27x00: Improve temperature precession

This patch improves the precession of the temperature property of the bq27x00

Signed-off-by: Lars-Peter Clausen <>

7 years agoPOWER: bq27x00: Add type property
Lars-Peter Clausen [Mon, 24 May 2010 18:36:52 +0000 (20:36 +0200)]
POWER: bq27x00: Add type property

This patch adds the type property to the bq27x00 battery driver.
All bq27x00 are lithion ion battiers.

Signed-off-by: Lars-Peter Clausen <>

7 years agoGTA02: Set irq_base for the pcf50633 driver
Lars-Peter Clausen [Wed, 29 Dec 2010 01:43:10 +0000 (02:43 +0100)]
GTA02: Set irq_base for the pcf50633 driver

7 years agogta02: select S3C24XX_GPIO_EXTRA64
Lars-Peter Clausen [Sun, 20 Jun 2010 21:49:14 +0000 (23:49 +0200)]
gta02: select S3C24XX_GPIO_EXTRA64

7 years agogta02: add support for platform_battery
Paul Fertser [Wed, 4 Nov 2009 11:27:52 +0000 (14:27 +0300)]
gta02: add support for platform_battery

This adds support for platform_battery driver which allows to specify a set
of power supply properties and callbacks to acquire them. It is needed to
support dumb batteries where all the information about their status can
only be obtained by platform-specific actions such as specific ADC
measurements, some guessimation etc.

Signed-off-by: Paul Fertser <>

7 years agogta02: Add battery driver
Lars-Peter Clausen [Mon, 5 Oct 2009 13:18:43 +0000 (15:18 +0200)]
gta02: Add battery driver


7 years agogta02: Add fiq handler
Lars-Peter Clausen [Mon, 5 Oct 2009 14:53:09 +0000 (16:53 +0200)]
gta02: Add fiq handler

7 years agogta02: Add touchscreen device
Lars-Peter Clausen [Mon, 17 May 2010 18:56:19 +0000 (20:56 +0200)]
gta02: Add touchscreen device

7 years agogta02: Remove usage of pcf50633 gpio api
Lars-Peter Clausen [Mon, 17 May 2010 17:53:21 +0000 (19:53 +0200)]
gta02: Remove usage of pcf50633 gpio api

This is the only user of the pcf50633 gpio api. Since the custom interface is
going to be replaced with gpiolib all users need to be remove or replaced.
It is safe to be remove it in this case since it is used used to turn a gpio
off which is never going to be turned on.

Signed-off-by: Lars-Peter Clausen <>

7 years agoAdd jbt device.
Lars-Peter Clausen [Sun, 4 Apr 2010 19:14:05 +0000 (21:14 +0200)]
Add jbt device.

7 years agogta02: Add glamo device
Lars-Peter Clausen [Sun, 4 Apr 2010 18:59:26 +0000 (20:59 +0200)]
gta02: Add glamo device

7 years agogta02: Add wlan power management device
Lars-Peter Clausen [Mon, 17 May 2010 18:27:00 +0000 (20:27 +0200)]
gta02: Add wlan power management device

7 years agogta02: Add gsm power management device
Lars-Peter Clausen [Mon, 17 May 2010 18:25:20 +0000 (20:25 +0200)]
gta02: Add gsm power management device

7 years agogta02: Add gps power management device
Lars-Peter Clausen [Mon, 17 May 2010 18:22:47 +0000 (20:22 +0200)]
gta02: Add gps power management device

7 years agogta02: Add bt power management device
Lars-Peter Clausen [Mon, 17 May 2010 18:19:36 +0000 (20:19 +0200)]
gta02: Add bt power management device

7 years agogta02: Add notify handler to probe device children
Lars-Peter Clausen [Sun, 4 Apr 2010 18:37:28 +0000 (20:37 +0200)]
gta02: Add notify handler to probe device children

On the gta02 we often have a child parent relationship between different
devices. The child devices can only be probed after their parant has been.
Instead of adding a probe completed handler to each device we handle this in a
generic way with a bus notifier.

7 years agogta02: Configure pcf50633 gpios.
Lars-Peter Clausen [Sun, 4 Apr 2010 18:49:19 +0000 (20:49 +0200)]
gta02: Configure pcf50633 gpios.

7 years agogta02: Disable hardware ECC unless we get instructed to enable it
Holger Freyther [Wed, 19 Nov 2008 17:10:51 +0000 (17:10 +0000)]
gta02: Disable hardware ECC unless we get instructed to enable it

Early verions off uboot used for the gta02 flashed the nand with ecc information
incompatible to s3c2440 hardware ecc. Disable hardware error correction by
default, unless the bootloader explicitly enables it.

Signed-off-by: Lars-Peter Clausen <>

7 years agogta02: request usb pullup pin before using it.
Lars-Peter Clausen [Thu, 8 Oct 2009 22:40:13 +0000 (00:40 +0200)]
gta02: request usb pullup pin before using it.

7 years agogta02: Call regulator_has_full_constraints at then end of gta02_pmu_attach_child_devices
Lars-Peter Clausen [Wed, 15 Sep 2010 21:06:03 +0000 (23:06 +0200)]
gta02: Call regulator_has_full_constraints at then end of gta02_pmu_attach_child_devices

By doing so we signal the regulator core that it can turn off all regulators
which are not active right now.

7 years agogta02: Get rid of state_mem constraints for the pcf50633 regulators
Lars-Peter Clausen [Wed, 15 Sep 2010 21:02:49 +0000 (23:02 +0200)]
gta02: Get rid of state_mem constraints for the pcf50633 regulators

Those constraints are never used so there is no need to set them.

7 years agogta02: Fix regulator valid_modes_ops
Lars-Peter Clausen [Sun, 4 Apr 2010 19:17:04 +0000 (21:17 +0200)]
gta02: Fix regulator valid_modes_ops

7 years agogta02: Select missing device symbols.
Lars-Peter Clausen [Mon, 5 Oct 2009 12:38:03 +0000 (14:38 +0200)]
gta02: Select missing device symbols.

Select usb host and nand device.

7 years agoARM: gta02: Add LED support
Lars-Peter Clausen [Thu, 24 Sep 2009 17:20:02 +0000 (19:20 +0200)]
ARM: gta02: Add LED support

The gta02 has three leds which are connected though gpio pins and thus can get
supported by using the generic leds-gpio driver.

Signed-off-by: Lars-Peter Clausen <>

7 years agoARM: gta02: Add button support
Lars-Peter Clausen [Thu, 24 Sep 2009 17:11:52 +0000 (19:11 +0200)]
ARM: gta02: Add button support

The gta02 has two buttons which are connected to gpio pins and thus can get
supported by using the generic gpio-keys driver.

Signed-off-by: Lars-Peter Clausen <>

7 years agoARM: s3c2440: gta02: Register PCM device
Lars-Peter Clausen [Thu, 16 Dec 2010 22:32:01 +0000 (23:32 +0100)]
ARM: s3c2440: gta02: Register PCM device

7 years agoARM: s3c2442: gta02: Fix usage gpio bank j pin definitions
Lars-Peter Clausen [Mon, 5 Oct 2009 20:35:30 +0000 (22:35 +0200)]
ARM: s3c2442: gta02: Fix usage gpio bank j pin definitions

The gta02 header file still uses the old S3C2410_GPJx defines instead of the
S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been removed
this causes a build failure.
This patches fixes the issue by doing a s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g
on the file.

Signed-off-by: Lars-Peter Clausen <>

7 years agopower: implement platform battery driver platform_battery-2.6.37 github/platform_battery-2.6.37
Paul Fertser [Thu, 22 Oct 2009 21:49:10 +0000 (01:49 +0400)]
power: implement platform battery driver

This driver can be used for dumb batteries when all knowledge about
their state belongs to the platform that does necessary ADC readings,
conversions, guessimations etc.

Signed-off-by: Paul Fertser <>

7 years agoAdd ar6000 wireless driver. ar6000-2.6.37 github/ar6000-2.6.37
Lars-Peter Clausen [Wed, 23 Sep 2009 12:27:26 +0000 (14:27 +0200)]
Add ar6000 wireless driver.

7 years agoAdd atheros sdio ids.
Lars-Peter Clausen [Mon, 5 Oct 2009 12:43:00 +0000 (14:43 +0200)]
Add atheros sdio ids.

7 years agoAdd glamo driver. glamo-2.6.37 github/glamo-2.6.37
Lars-Peter Clausen [Sun, 4 Oct 2009 11:47:44 +0000 (13:47 +0200)]
Add glamo driver.

7 years agoAdd jbt6k74 display driver. jbt6k74-2.6.37 github/jbt6k74-2.6.37
Lars-Peter Clausen [Sun, 4 Oct 2009 11:37:37 +0000 (13:37 +0200)]
Add jbt6k74 display driver.

7 years agoLEDS: leds-pwm: Add init, notfiy and exit callbacks om-misc-2.6.37 github/om-misc-2.6.37
Lars-Peter Clausen [Thu, 13 May 2010 21:20:53 +0000 (23:20 +0200)]
LEDS: leds-pwm: Add init, notfiy and exit callbacks

This patch adds init, notify and exit callbacks to the leds-pwm driver similar
to those seen for the pwm-backlight driver;

On certain platforms with pin muxing the output of a pwm pin is bogus until the
pwm is been properly configured. On these platforms it is usefull to have the
added callbacks, so that the gpio pin can be configured after the pwm device has
been successfully configured.

Signed-off-by: Lars-Peter Clausen <>

7 years agoARM: s3c24xx: Set ARCH_NR_GPIOS according to the selected SoC types. om-s3c-2.6.37 github/om-s3c-2.6.37
Lars-Peter Clausen [Fri, 17 Sep 2010 11:48:41 +0000 (13:48 +0200)]
ARM: s3c24xx: Set ARCH_NR_GPIOS according to the selected SoC types.

Currently the code in gpiolib.c tries to register GPIO BANKA-BANKM.
ARCH_NR_GPIOS on the other hand is set only to 256, which would be the
equivalent of BANKA-BANKH. Thus the registration of all other banks will fail.

This patch fixes this by setting S3C_GPIO_END according to the selected SoC
types. S3C_GPIO_END is set to the maximum of the number of GPIOs over all
selected SoC types. Thus it is ensured that memory is not wasted if support for
SoCs with higher GPIO numbers is not built-in.  When registering the bank it is
made sure that banks which are outside of that range are not even tried to be
registered.  Otherwise there would be problems with configs where
CONFIG_S3C24XX_GPIO_EXTRA is set to a non zero value.

Signed-off-by: Lars-Peter Clausen <>

7 years agoAdd s3c24xx_serial_console_set_silence
Lars-Peter Clausen [Mon, 5 Oct 2009 12:27:40 +0000 (14:27 +0200)]
Add s3c24xx_serial_console_set_silence

7 years agomtd: s3c2410_nand: Add config option to disable hw ecc at runtime
Holger Freyther [Wed, 19 Nov 2008 17:10:51 +0000 (17:10 +0000)]
mtd: s3c2410_nand: Add config option to disable hw ecc at runtime

This patch adds a flag to the s3c2410_nand platform data, which configures
whether hardware ecc is used for that chip.

Currently hardware ecc is used if it was compiled into the kernel. But if you
want to build a kernel which runs on multiple devices you might have a
configuration where you have devices which require hw ecc as well as devices
which want software ecc.

Signed-off-by: Lars-Peter Clausen <>

7 years agos3c24xx: Fix level irqs on external interrupts.
Lars-Peter Clausen [Sat, 8 May 2010 12:32:09 +0000 (14:32 +0200)]
s3c24xx: Fix level irqs on external interrupts.

Although the external interrupts support level and edge triggered irqs their
handler is currently always set to handle_edge_irq().
While being technically wrong for a level triggered irq to be handled by
handle_edge_irq() it will cause serious problems in combination with a oneshot
irq. handle_edge_irq() will unmask the irq immediately and as a result the irq
will be triggered again before the threaded irq handler had a chance to run and
clear the irq source.

Thus level triggered irqs should be handled by handle_level_irq.
According to the specs the irq controller will remember if an irq has been
triggered while it had been masked and will issue it when the irq gets
unmasked. Thus it is sufficient to use handle_level_irq() for edge triggered
irqs as well. Hence handle_level_irq() can always be used for external

Signed-off-by: Lars-Peter Clausen <>

7 years agoS3C: Allow to completly disable low-level messages
Lars-Peter Clausen [Thu, 5 Nov 2009 22:04:42 +0000 (23:04 +0100)]
S3C: Allow to completly disable low-level messages

In some cases it is desirable to completly disable low-level messages. For
example if you have no uart available for a serial console.
With this patch it is possible to disable low-level messages by setting
CONFIG_S3C_LOWLEVEL_UART_PORT to less then zero.

Signed-off-by: Lars-Peter Clausen <>

7 years agos3c2410_udc-2440_dual_packet-workaround.patch
mokopatches [Wed, 19 Nov 2008 17:03:14 +0000 (17:03 +0000)]
This is a patch that seems to make the USB hangs on the S3C2440 go away. At
least a good amount of ping torture didn't make them come back so far.

The issue is that, if there are several back-to-back packets,
sometimes no interrupt is generated for one of them. This
seems to be caused by the mysterious dual packet mode, which
the USB hardware enters automatically if the endpoint size is
half that of the FIFO. (On the 2440, this is the normal
situation for bulk data endpoints.)

There is also a timing factor in this. I think what happens is
that the USB hardware automatically sends an acknowledgement
if there is only one packet in the FIFO (the FIFO has space
for two). If another packet arrives before the host has
retrieved and acknowledged the previous one, no interrupt is
generated for that second one.

However, there may be an indication. There is one undocumented
bit (none of the 244x manuals document it), OUT_CRS1_REG[1],
that seems to be set suspiciously often when this condition
occurs. There is also CLR_DATA_TOGGLE, OUT_CRS1_REG[7], which
may have a function related to this. (The Samsung manual is
rather terse on that, as usual.)

This needs to be examined further. For now, the patch seems to do the

Note that this is not a clean solution by any means, because we
might potentially get stuck in that interrupt for quite a while.

7 years agos3c24xx: Add number of board irqs for the gta02
Lars-Peter Clausen [Sat, 10 Oct 2009 23:23:35 +0000 (01:23 +0200)]
s3c24xx: Add number of board irqs for the gta02

The gta02 uses the glamo mfd driver which requires 9 board irqs and the pcf50633
mfd driver which requires 40 irqs.

Signed-off-by: Lars-Peter Clausen <>

7 years agos3c24xx: Add support for board IRQs
Lars-Peter Clausen [Sat, 10 Oct 2009 22:33:51 +0000 (00:33 +0200)]
s3c24xx: Add support for board IRQs

Some boards have a need for a set of extra IRQ numbers, for example some
multifunction devices which do irq demultiplexing require them.
This patch adds S3C2410_BOARD_NR_IRQS which specifies the number of extra board
IRQs. Board specific code would use S3C2410_BOARD_IRQ_START to get the number of
it's first irq.

Since it is possible to support a multiple boards with a single kernel and
there is no easy way to set a CONFIG option to multiple values and only use the
maximum each board which needs board IRQs has do be explicitly added to irqs.h

Signed-off-by: Lars-Peter Clausen <>

7 years agoAdd c fiq handler.
Lars-Peter Clausen [Mon, 5 Oct 2009 11:39:17 +0000 (13:39 +0200)]
Add c fiq handler.

7 years agoMFD: pcf50633: Use the genirq for irq handling
Lars-Peter Clausen [Mon, 27 Dec 2010 20:48:40 +0000 (21:48 +0100)]
MFD: pcf50633: Use the genirq for irq handling

7 years agoMFD: pcf50633: Use mfd cells to register child devices
Lars-Peter Clausen [Mon, 24 May 2010 21:37:19 +0000 (23:37 +0200)]
MFD: pcf50633: Use mfd cells to register child devices

This patch changes the pcf50633 core code to use mfd cells to register child
devices instead of calling platform_device_{alloc,add} for each child.

Signed-off-by: Lars-Peter Clausen <>

7 years agoMFD: PCF50633: Use dev_pm_ops instead of legacy i2c suspend/resume callbacks
Lars-Peter Clausen [Tue, 8 Jun 2010 13:07:13 +0000 (15:07 +0200)]
MFD: PCF50633: Use dev_pm_ops instead of legacy i2c suspend/resume callbacks

Right now in 2.6.34 the legacy powermanagement callbacks are broken, so we work
around it by switching to dev_pm_ops.

7 years agopcf50633: Move pcf50633-gpio driver to the gpio drivers folder
Lars-Peter Clausen [Fri, 22 Jan 2010 11:48:41 +0000 (12:48 +0100)]
pcf50633: Move pcf50633-gpio driver to the gpio drivers folder

7 years agopcf50633-gpio: Add gpiolib support.
Lars-Peter Clausen [Fri, 22 Jan 2010 11:47:01 +0000 (12:47 +0100)]
pcf50633-gpio: Add gpiolib support.

7 years agoASoC: codecs: wm8753: Fix DAI mode switching wm8753-2.6.37 github/wm8753-2.6.37
Lars-Peter Clausen [Thu, 23 Dec 2010 21:49:27 +0000 (22:49 +0100)]
ASoC: codecs: wm8753: Fix DAI mode switching

The wm8753 codec supports switching between different DAI modes.
The current drivers tries to implement this by changing the dai driver at
runtime. But to properly work this would require support from the ASoC core.

The only difference, from a driver point of view, between the different DAI modes
is how to setup the DAI format.

This patch fixes DAI mode switching, by storing the current format for each DAI
in the drivers private struct and when the DAI mode is changed the format get
reprogrammed according to the requirements of the new DAI mode.

Signed-off-by: Lars-Peter Clausen <>

7 years agoMerge gta01 and gta02 sound soc driver.
Lars-Peter Clausen [Sat, 17 Oct 2009 13:02:22 +0000 (15:02 +0200)]
Merge gta01 and gta02 sound soc driver.

7 years agosound: SoC: neo1973_wm8753: Move lm4857 specefic code to its own module
Lars-Peter Clausen [Thu, 13 May 2010 22:39:26 +0000 (00:39 +0200)]
sound: SoC: neo1973_wm8753: Move lm4857 specefic code to its own module

7 years agosound: ASoC: neo_wm8753: remove szenario mangement code.
Lars-Peter Clausen [Thu, 13 May 2010 21:55:51 +0000 (23:55 +0200)]
sound: ASoC: neo_wm8753: remove szenario mangement code.

It has been proven unflexible to do szenario management in kernel space.

7 years agoASoC: neo1973_gta02_wm8753: Get rid of lm4853_{set,get}_state and some minor
Lars-Peter Clausen [Mon, 5 Oct 2009 20:54:30 +0000 (22:54 +0200)]
ASoC: neo1973_gta02_wm8753: Get rid of lm4853_{set,get}_state and some minor

7 years agoLinux 2.6.37
Linus Torvalds [Wed, 5 Jan 2011 00:50:19 +0000 (16:50 -0800)]
Linux 2.6.37

7 years agoMerge git://
Linus Torvalds [Tue, 4 Jan 2011 21:55:49 +0000 (13:55 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://
  ipv4/route.c: respect prefsrc for local routes
  bridge: stp: ensure mac header is set
  bridge: fix br_multicast_ipv6_rcv for paged skbs
  atl1: fix oops when changing tx/rx ring params
  drivers/atm/atmtcp.c: add missing atm_dev_put
  starfire: Fix dma_addr_t size test for MIPS
  tg3: fix return value check in tg3_read_vpd()
  Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
  ISDN, Gigaset: Fix memory leak in do_disconnect_req()
  CAN: Use inode instead of kernel address for /proc file
  skfp: testing the wrong variable in skfp_driver_init()
  ppp: allow disabling multilink protocol ID compression
  ehea: Avoid changing vlan flags
  ueagle-atm: fix PHY signal initialization race

7 years agoipv4/route.c: respect prefsrc for local routes
Joel Sing [Mon, 3 Jan 2011 20:24:20 +0000 (20:24 +0000)]
ipv4/route.c: respect prefsrc for local routes

The preferred source address is currently ignored for local routes,
which results in all local connections having a src address that is the
same as the local dst address. Fix this by respecting the preferred source
address when it is provided for local routes.

This bug can be demonstrated as follows:

 # ifconfig dummy0
 # ip route show table local | grep local.*dummy0
 local dev dummy0  proto kernel  scope host  src
 # ip route change table local local dev dummy0 \
     proto kernel scope host src
 # ip route show table local | grep local.*dummy0
 local dev dummy0  proto kernel  scope host  src

We now establish a local connection and verify the source IP
address selection:

 # nc -l 3128 &
 # nc 3128 &
 # netstat -ant | grep*EST
 tcp        0      0 ESTABLISHED
 tcp        0      0  ESTABLISHED

Signed-off-by: Joel Sing <>
Signed-off-by: David S. Miller <>

7 years agoremove trim_fs method from Documentation/filesystems/Locking
Christoph Hellwig [Tue, 4 Jan 2011 06:14:24 +0000 (07:14 +0100)]
remove trim_fs method from Documentation/filesystems/Locking

The ->trim_fs has been removed meanwhile, so remove it from the documentation
as well.

Signed-off-by: Christoph Hellwig <>
Reported-by: Ryusuke Konishi <>
Signed-off-by: Linus Torvalds <>

7 years agoMerge
Linus Torvalds [Tue, 4 Jan 2011 00:37:01 +0000 (16:37 -0800)]

  ARM: pxa: fix page table corruption on resume
  ARM: it8152: add IT8152_LAST_IRQ definition to fix build error
  ARM: pxa: PXA_ESERIES depends on FB_W100.
  ARM: 6605/1: Add missing include "asm/memory.h"
  ARM: 6540/1: Stop irqsoff trace on return to user
  ARM: 6537/1: update Nomadik, U300 and Ux500 maintainers
  ARM: 6536/1: Add missing SZ_{32,64,128}
  ARM: fix cache-feroceon-l2 after stack based kmap_atomic()
  ARM: fix cache-xsc3l2 after stack based kmap_atomic()
  ARM: get rid of kmap_high_l1_vipt()
  ARM: smp: avoid incrementing mm_users on CPU startup
  ARM: pxa: PXA_ESERIES depends on FB_W100.

7 years agoarch/mn10300/kernel/irq.c: fix build
Andrew Morton [Mon, 3 Jan 2011 22:59:11 +0000 (14:59 -0800)]
arch/mn10300/kernel/irq.c: fix build


Reported-by: Martin Ettl <>
Cc: David Howells <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>

7 years agoima: fix add LSM rule bug
Mimi Zohar [Mon, 3 Jan 2011 22:59:10 +0000 (14:59 -0800)]
ima: fix add LSM rule bug

If security_filter_rule_init() doesn't return a rule, then not everything
is as fine as the return code implies.

This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.

Adding an empty LSM rule causes ima_match_rules() to always succeed,
ignoring any remaining rules.

 default IMA TCB policy:
  dont_measure fsmagic=0x9fa0
  dont_measure fsmagic=0x62656572
  dont_measure fsmagic=0x64626720
  dont_measure fsmagic=0x01021994
  dont_measure fsmagic=0x73636673

  < LSM specific rule >
  dont_measure obj_type=var_log_t

  measure func=BPRM_CHECK
  measure func=FILE_MMAP mask=MAY_EXEC
  measure func=FILE_CHECK mask=MAY_READ uid=0

Thus without the patch, with the boot parameters 'tcb selinux=0', adding
the above 'dont_measure obj_type=var_log_t' rule to the default IMA TCB
measurement policy, would result in nothing being measured.  The patch
prevents the default TCB policy from being replaced.

Signed-off-by: Mimi Zohar <>
Cc: James Morris <>
Acked-by: Serge Hallyn <>
Cc: David Safford <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>

7 years agoMerge branch 'fix' of git://
Russell King [Mon, 3 Jan 2011 22:55:21 +0000 (22:55 +0000)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6

7 years agobridge: stp: ensure mac header is set
Florian Westphal [Mon, 3 Jan 2011 04:16:28 +0000 (04:16 +0000)]
bridge: stp: ensure mac header is set

commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
(llc: use dev_hard_header) removed the
skb_reset_mac_header call from llc_mac_hdr_init.

This seems fine itself, but br_send_bpdu() invokes ebtables LOCAL_OUT.

We oops in ebt_basic_match() because it assumes eth_hdr(skb) returns
a meaningful result.

Signed-off-by: Florian Westphal <>
Signed-off-by: David S. Miller <>

7 years agoMerge branch 'perf-fixes-for-linus' of git://
Linus Torvalds [Mon, 3 Jan 2011 19:51:22 +0000 (11:51 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://
  perf: Fix callchain hit bad cast on ascii display
  arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
  watchdog: Improve initialisation error message and documentation

7 years agoMerge branch 'v4l_for_linus' of git://
Linus Torvalds [Mon, 3 Jan 2011 19:50:26 +0000 (11:50 -0800)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://
  [media] em28xx: radio_fops should also use unlocked_ioctl
  [media] wm8775: Revert changeset fcb9757333 to avoid a regression
  [media] cx25840: Prevent device probe failure due to volume control ERANGE error

7 years agoMerge branch 'fixes' of git://
Linus Torvalds [Mon, 3 Jan 2011 19:48:54 +0000 (11:48 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://
  dmaengine: provide dummy functions for DMA_ENGINE=n
  mv_xor: fix race in tasklet function

7 years agoname_to_dev_t() must not call __init code
Jan Beulich [Mon, 3 Jan 2011 15:07:02 +0000 (15:07 +0000)]
name_to_dev_t() must not call __init code

The function can't be __init itself (being called from some sysfs
handler), and hence none of the functions it calls can be either.

Signed-off-by: Jan Beulich <>
Acked-by: Randy Dunlap <>
Signed-off-by: Linus Torvalds <>

7 years agobridge: fix br_multicast_ipv6_rcv for paged skbs
Tomas Winkler [Mon, 3 Jan 2011 19:26:08 +0000 (11:26 -0800)]
bridge: fix br_multicast_ipv6_rcv for paged skbs

use pskb_may_pull to access ipv6 header correctly for paged skbs
It was omitted in the bridge code leading to crash in blind

since the skb is cloned undonditionally we also simplify the
the exit path

this fixes bug

Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: authenticated
Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: associated (aid 2)
Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 RADIUS: starting accounting session 4D0608A3-00000005
Dec 15 14:36:41 User-PC kernel: [175576.120287] ------------[ cut here ]------------
Dec 15 14:36:41 User-PC kernel: [175576.120452] kernel BUG at include/linux/skbuff.h:1178!
Dec 15 14:36:41 User-PC kernel: [175576.120609] invalid opcode: 0000 [#1] SMP
Dec 15 14:36:41 User-PC kernel: [175576.120749] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
Dec 15 14:36:41 User-PC kernel: [175576.121035] Modules linked in: approvals binfmt_misc bridge stp llc parport_pc ppdev arc4 iwlagn snd_hda_codec_realtek iwlcore i915 snd_hda_intel mac80211 joydev snd_hda_codec snd_hwdep snd_pcm snd_seq_midi drm_kms_helper snd_rawmidi drm snd_seq_midi_event snd_seq snd_timer snd_seq_device cfg80211 eeepc_wmi usbhid psmouse intel_agp i2c_algo_bit intel_gtt uvcvideo agpgart videodev sparse_keymap snd shpchp v4l1_compat lp hid video serio_raw soundcore output snd_page_alloc ahci libahci atl1c
Dec 15 14:36:41 User-PC kernel: [175576.122712]
Dec 15 14:36:41 User-PC kernel: [175576.122769] Pid: 0, comm: kworker/0:0 Tainted: G        W   2.6.37-rc5-wl+ #3 1015PE/1016P
Dec 15 14:36:41 User-PC kernel: [175576.123012] EIP: 0060:[<f83edd65>] EFLAGS: 00010283 CPU: 1
Dec 15 14:36:41 User-PC kernel: [175576.123193] EIP is at br_multicast_rcv+0xc95/0xe1c [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.123362] EAX: 0000001c EBX: f5626318 ECX: 00000000 EDX: 00000000
Dec 15 14:36:41 User-PC kernel: [175576.123550] ESI: ec512262 EDI: f5626180 EBP: f60b5ca0 ESP: f60b5bd8
Dec 15 14:36:41 User-PC kernel: [175576.123737]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Dec 15 14:36:41 User-PC kernel: [175576.123902] Process kworker/0:0 (pid: 0, ti=f60b4000 task=f60a8000 task.ti=f60b0000)
Dec 15 14:36:41 User-PC kernel: [175576.124137] Stack:
Dec 15 14:36:41 User-PC kernel: [175576.124181]  ec556500 f6d06800 f60b5be8 c01087d8 ec512262 00000030 00000024 f5626180
Dec 15 14:36:41 User-PC kernel: [175576.124181]  f572c200 ef463440 f5626300 3affffff f6d06dd0 e60766a4 000000c4 f6d06860
Dec 15 14:36:41 User-PC kernel: [175576.124181]  ffffffff ec55652c 00000001 f6d06844 f60b5c64 c0138264 c016e451 c013e47d
Dec 15 14:36:41 User-PC kernel: [175576.124181] Call Trace:
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01087d8>] ? sched_clock+0x8/0x10
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0138264>] ? enqueue_entity+0x174/0x440
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c016e451>] ? sched_clock_cpu+0x131/0x190
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c013e47d>] ? select_task_rq_fair+0x2ad/0x730
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0524fc1>] ? nf_iterate+0x71/0x90
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4914>] ? br_handle_frame_finish+0x184/0x220 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4790>] ? br_handle_frame_finish+0x0/0x220 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e46e9>] ? br_handle_frame+0x189/0x230 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4790>] ? br_handle_frame_finish+0x0/0x220 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4560>] ? br_handle_frame+0x0/0x230 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04ff026>] ? __netif_receive_skb+0x1b6/0x5b0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04f7a30>] ? skb_copy_bits+0x110/0x210
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0503a7f>] ? netif_receive_skb+0x6f/0x80
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82cb74c>] ? ieee80211_deliver_skb+0x8c/0x1a0 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82cc836>] ? ieee80211_rx_handlers+0xeb6/0x1aa0 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04ff1f0>] ? __netif_receive_skb+0x380/0x5b0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c016e242>] ? sched_clock_local+0xb2/0x190
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c012b688>] ? default_spin_lock_flags+0x8/0x10
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d83df>] ? _raw_spin_lock_irqsave+0x2f/0x50
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82cd621>] ? ieee80211_prepare_and_rx_handle+0x201/0xa90 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82ce154>] ? ieee80211_rx+0x2a4/0x830 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f815a8d6>] ? iwl_update_stats+0xa6/0x2a0 [iwlcore]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f8499212>] ? iwlagn_rx_reply_rx+0x292/0x3b0 [iwlagn]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d83df>] ? _raw_spin_lock_irqsave+0x2f/0x50
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f8483697>] ? iwl_rx_handle+0xe7/0x350 [iwlagn]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f8486ab7>] ? iwl_irq_tasklet+0xf7/0x5c0 [iwlagn]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01aece1>] ? __rcu_process_callbacks+0x201/0x2d0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0150d05>] ? tasklet_action+0xc5/0x100
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0150a07>] ? __do_softirq+0x97/0x1d0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d910c>] ? nmi_stack_correct+0x2f/0x34
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0150970>] ? __do_softirq+0x0/0x1d0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  <IRQ>
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01508f5>] ? irq_exit+0x65/0x70
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05df062>] ? do_IRQ+0x52/0xc0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01036b0>] ? common_interrupt+0x30/0x38
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c03a1fc2>] ? intel_idle+0xc2/0x160
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04daebb>] ? cpuidle_idle_call+0x6b/0x100
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0101dea>] ? cpu_idle+0x8a/0xf0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d2702>] ? start_secondary+0x1e8/0x1ee

Cc: David Miller <>
Cc: Johannes Berg <>
Cc: Stephen Hemminger <>
Signed-off-by: Tomas Winkler <>
Signed-off-by: David S. Miller <>

7 years agoatl1: fix oops when changing tx/rx ring params
J. K. Cliburn [Sat, 1 Jan 2011 05:02:12 +0000 (05:02 +0000)]
atl1: fix oops when changing tx/rx ring params

Commit 3f5a2a713aad28480d86b0add00c68484b54febc zeroes out the statistics
message block (SMB) and coalescing message block (CMB) when adapter ring
resources are freed.  This is desirable behavior, but, as a side effect,
the commit leads to an oops when atl1_set_ringparam() attempts to alter
the number of rx or tx elements in the ring buffer (by using ethtool
-G, for example).  We don't want SMB or CMB to change during this

Modify atl1_set_ringparam() to preserve SMB and CMB when changing ring

Signed-off-by: Jay Cliburn <>
Reported-by: T├Ánu Raitviir <>
Signed-off-by: David S. Miller <>

7 years agoMerge branch 'perf/urgent' of git://
Ingo Molnar [Mon, 3 Jan 2011 18:59:24 +0000 (19:59 +0100)]
Merge branch 'perf/urgent' of git://git./linux/kernel/git/frederic/random-tracing into perf/urgent

7 years agoARM: pxa: fix page table corruption on resume
Aric D. Blumer [Wed, 29 Dec 2010 16:18:29 +0000 (11:18 -0500)]
ARM: pxa: fix page table corruption on resume

Before this patch, the following error would sometimes occur after a
resume on pxa3xx:

    /path/to/mm/memory.c:144: bad pmd 8040542e.

The problem was that a temporary page table mapping was being improperly

The PXA3xx resume code creates a temporary mapping of resume_turn_on_mmu
to avoid a prefetch abort.  The pxa3xx_resume_after_mmu code requires
that the r1 register holding the address of this mapping not be
modified, however, resume_turn_on_mmu does modify it. It is mostly
correct in that r1 receives the base table address, but it may also
get other bits in 13:0.  This results in pxa3xx_resume_after_mmu
restoring the original mapping to the wrong place, corrupting memory
and leaving the temporary mapping in place.

Signed-off-by: Matt Reimer <>
Signed-off-by: Eric Miao <>

7 years agoARM: it8152: add IT8152_LAST_IRQ definition to fix build error
Mike Rapoport [Wed, 29 Dec 2010 07:06:26 +0000 (09:06 +0200)]
ARM: it8152: add IT8152_LAST_IRQ definition to fix build error

The commit 6ac6b817f3f4c23c5febd960d8deb343e13af5f3 (ARM: pxa: encode
IRQ number into .nr_irqs) removed definition of ITE_LAST_IRQ which
caused the following build error:

CC arch/arm/common/it8152.o
arch/arm/common/it8152.c: In function 'it8152_init_irq':
arch/arm/common/it8152.c:86: error: 'IT8152_LAST_IRQ' undeclared (first use in this function)
arch/arm/common/it8152.c:86: error: (Each undeclared identifier is reported only once
arch/arm/common/it8152.c:86: error: for each function it appears in.)
make[2]: *** [arch/arm/common/it8152.o] Error 1

Defining the IT8152_LAST_IRQ in the arch/arm/include/hardware/it8152.c
fixes the build.

Signed-off-by: Mike Rapoport <>
Signed-off-by: Eric Miao <>

7 years agoARM: pxa: PXA_ESERIES depends on FB_W100.
Lennert Buytenhek [Tue, 14 Dec 2010 23:20:16 +0000 (07:20 +0800)]
ARM: pxa: PXA_ESERIES depends on FB_W100.

As arch/arm/mach-pxa/eseries.c references w100fb_gpio_{read,write}()

Signed-off-by: Lennert Buytenhek <>
Signed-off-by: Eric Miao <>

7 years agoperf: Fix callchain hit bad cast on ascii display
Frederic Weisbecker [Mon, 3 Jan 2011 15:13:11 +0000 (16:13 +0100)]
perf: Fix callchain hit bad cast on ascii display

ipchain__fprintf_graph() casts the number of hits in a branch as an
int, which means we lose its highests bits.

This results in meaningless number of callchain hits in
that have a high number of hits recorded, typically those that have
callchain branches hits appearing more than INT_MAX. This happens
easily as those are pondered by the event period.

Reported-by: Nick Piggin <>
Signed-off-by: Frederic Weisbecker <>
Cc: Ingo Molnar <>
Cc: Peter Zijlstra <>
Cc: Arnaldo Carvalho de Melo <>
Cc: Paul Mackerras <>

7 years agoarch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
Robert Richter [Mon, 3 Jan 2011 11:15:14 +0000 (12:15 +0100)]
arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU

Disable preemption in init_ibs(). The function only checks the
ibs capabilities and sets up pci devices (if necessary). It runs
only on one cpu but operates with the local APIC and some MSRs,
thus it is better to disable preemption.

[    7.034377] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/483
[    7.034385] caller is setup_APIC_eilvt+0x155/0x180
[    7.034389] Pid: 483, comm: modprobe Not tainted 2.6.37-rc1-20101110+ #1
[    7.034392] Call Trace:
[    7.034400]  [<ffffffff812a2b72>] debug_smp_processor_id+0xd2/0xf0
[    7.034404]  [<ffffffff8101e985>] setup_APIC_eilvt+0x155/0x180
[ ... ]


Reported-by: <>
Signed-off-by: Robert Richter <>
Cc: <>
Cc: Peter Zijlstra <>
Cc: Frederic Weisbecker <>
Cc: Rafael J. Wysocki <>
Cc: Dan Carpenter <>
Cc: Andrew Morton <>
Cc: <> [2.6.37.x]
LKML-Reference: <>
[ small cleanups ]
Signed-off-by: Ingo Molnar <>