Valentin Longchamp [Wed, 6 May 2009 09:44:20 +0000 (11:44 +0200)]
mx31: remove gpio_request calls from iomux code
Since iomux code is not directly related to gpio on mx31, the calls
to gpio_request are removed from iomux.c file.
These calls have to be done in platform initialization files. The
name of the singe pin call for iomux is also changed to
mxc_iomux_alloc_pin.
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Tue, 5 May 2009 09:13:23 +0000 (11:13 +0200)]
MXC qonq: mxc_map_io is now mx31_map_io
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 29 Apr 2009 11:55:13 +0000 (13:55 +0200)]
mxc: fix wrong register access in timer code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 29 Apr 2009 11:41:40 +0000 (13:41 +0200)]
mx1ads: rename mxc_map_io to mx1_map_io
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 29 Apr 2009 11:41:06 +0000 (13:41 +0200)]
mx1: add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 29 Apr 2009 11:17:21 +0000 (13:17 +0200)]
mx1ads: setup iomux pins at once
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 29 Apr 2009 11:14:19 +0000 (13:14 +0200)]
mx1ads: remove ifdefs, reorder include alphabetically
header is part of the kernel now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Guennadi Liakhovetski [Mon, 4 May 2009 11:13:52 +0000 (13:13 +0200)]
ARM: add USB device support to pcm037
Add OTG device definition and resources to i.MX31 and a pure USB device mode
support to the pcm037 board.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 29 Apr 2009 07:17:03 +0000 (09:17 +0200)]
PCM038: Remove unnecessary ifdefs, reorder includes alphabetically
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Thu, 16 Apr 2009 13:45:45 +0000 (15:45 +0200)]
pcm038: Setup all iomux pins at once
Also, remove usage of set_irq_type after request_irq.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vladimir Barinov [Thu, 30 Apr 2009 11:31:20 +0000 (15:31 +0400)]
MX27ADS: Add SDHC support
Add SDHC support for MX27ADS board
Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vladimir Barinov [Wed, 29 Apr 2009 00:00:52 +0000 (04:00 +0400)]
MX27ADS: Add 1-wire support
Add 1-wire support for MX27ADS board
Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vladimir Barinov [Wed, 29 Apr 2009 00:00:51 +0000 (04:00 +0400)]
MX27ADS: Add framebuffer support
Add Sharp-QVGA panel support for MX27ADS board
Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vladimir Barinov [Wed, 29 Apr 2009 00:00:50 +0000 (04:00 +0400)]
MX27ADS: Add I2C support
Add I2C support for MX27ADS board
Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vladimir Barinov [Wed, 29 Apr 2009 00:00:49 +0000 (04:00 +0400)]
MX27ADS: Add NAND support
Add NAND support for MX27ADS board
Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vladimir Barinov [Wed, 29 Apr 2009 00:00:48 +0000 (04:00 +0400)]
MX27ADS: setup all pins at once in one table
Setup all pins at once in one table
Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Magnus Lilja [Tue, 14 Apr 2009 20:00:07 +0000 (22:00 +0200)]
i.MX31: Add ethernet support to i.MX31 Litekit board.
This patch adds the SMSC platform device to the Litekit board.
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Magnus Lilja [Tue, 14 Apr 2009 20:00:06 +0000 (22:00 +0200)]
i.MX31: Correct comments on CONFIG_DEBUG_LL.
Several comments in board config files stated "mandatory for
CONFIG_LL_DEBUG" but the correct name is CONFIG_DEBUG_LL.
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Magnus Lilja [Tue, 14 Apr 2009 20:00:05 +0000 (22:00 +0200)]
i.MX31: Removed unused items from board-mx31lite.h.
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Magnus Lilja [Tue, 14 Apr 2009 20:00:03 +0000 (22:00 +0200)]
i.MX31: Add UART1 device to Litekit board.
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Valentin Longchamp [Tue, 21 Apr 2009 08:24:56 +0000 (10:24 +0200)]
mx31moboard: add sdhc support (v3)
This support both sdhc1 and sdhc2 with WP and CD for the marxbot and
devboard mx31moboard baseboards.
sdhc2 is present on both, but is not directly included in the
mx31moboard file because a third baseboard (not supported yet) without
sdhc2 is planned.
Changes since v1: removed pin initialization from init/exit function and
taken different comments into account
Changes since v2: pin initialiation now is done in another patch for all
current mx31moboard pins
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Valentin Longchamp [Tue, 21 Apr 2009 08:24:22 +0000 (10:24 +0200)]
mx31moboard: add i2c support (v2)
Changes since v1: all the pins needed for the drivers are claimed in
another patch
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Valentin Longchamp [Wed, 22 Apr 2009 08:55:50 +0000 (10:55 +0200)]
mx31moboard: setup all pins (v2)
As suggested by Sascha, here we setup all the pins that we are using in
the current (and currently reviewed) drivers for mx31moboard system.
changes since v1: changed I2C1 pin names
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Valentin Longchamp [Wed, 22 Apr 2009 08:54:14 +0000 (10:54 +0200)]
mx31: define various pins used on mx31moboard (v2)
As suggested by Sascha, I regroup them in a single patch so that the
other patches become more orthogonal.
changes since v1: changed I2C1 pin names
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Alan Carvalho de Assis [Thu, 2 Apr 2009 15:38:41 +0000 (12:38 -0300)]
i.MX31: Add hw-random for RNGA
This hw-random driver add support to RNGA hardware found
on some i.MX processors.
Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Valentin Longchamp [Fri, 17 Apr 2009 13:20:25 +0000 (15:20 +0200)]
mx31moboard: clean-up of board support
Various improvements (includes in alphabetical order, platform devices
declaration order change, ...)
The pins now are claimed in a single function call from a main table for
every board for a better clarity and to adopt the current agreement for
mx31 devices.
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fabio Estevam [Thu, 16 Apr 2009 19:45:01 +0000 (12:45 -0700)]
MX27: Add basic support to MX27PDK
This patch adds basic support to MX27PDK board http://www.freescale.com/imx27pdk ).
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ivo Clarysse [Wed, 15 Apr 2009 08:45:19 +0000 (10:45 +0200)]
MXC: mx2_defconfig file
Adds a defconfig file for the i.MX21 SoC, targeting
the Freescale i.MX21ADS (M9328MX21ADSE) Application
Development System.
Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Holger Schurig [Tue, 14 Apr 2009 10:50:20 +0000 (12:50 +0200)]
imx: re-work of PWM, add i.MX21 support
* Kconfig enables now HAVE_PWM (this enables in turn the selection of
CONFIG_BACKLIGHT_PWM)
* changes CONFIG_ARCH_MXyy to CONFIG_MACH_MXyy
* fix some register names to match those of the reference manual
* write a stub code so that the PWM can be used to program the
LCD backlight
* convert from #ifdef CONFIG_ARCH_MXxx to cpu_is_mxXX()
* remove unneeded defines and fix 80-column "violations" of checkpatch.pl
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ivo Clarysse [Wed, 15 Apr 2009 13:39:27 +0000 (15:39 +0200)]
MXC: mx21ads base support
[PATCH v6] MXC: mx21ads base support
Base machine support for the Freescale i.MX21ADS
(M9328MX21ADSE) Application Development System.
Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Guennadi Liakhovetski [Wed, 15 Apr 2009 12:32:52 +0000 (14:32 +0200)]
ARM: framebuffer support for pcm037
Add support for a QVGA Sharp LCD on pcm037.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Guennadi Liakhovetski [Thu, 12 Mar 2009 11:46:41 +0000 (12:46 +0100)]
mxc: emulate GPIO interrupt on both-edges
MXC GPIO controller does not support generation of interrupts on both
edges. Emulate this mode in software by reconfiguring the irq trigger
polarity on each interrupt. This follows an example of
drivers/mfd/asic3.c.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Holger Schurig [Mon, 30 Mar 2009 13:35:39 +0000 (14:35 +0100)]
imx: exit functions can/should be void
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 1 Apr 2009 10:41:21 +0000 (12:41 +0200)]
[ARM] remove arch-imx
arch-imx is superseeded by the MXC architecture support.
This patch removes arch/arm/mach-imx from the kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 1 Apr 2009 10:40:15 +0000 (12:40 +0200)]
[ARM] Remove arch-imx from build system
arch-imx is superseeded by the MXC architecture support.
This patch removes arch-imx from the build system.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 18 Feb 2009 19:59:04 +0000 (20:59 +0100)]
mxc irq: make architecture runtime dependent
Currently we depend on hardcoded base addresses for the interrupt
controller. This prevents us from compiling in more than one i.MX
architecture at a time. This patch changes the base address to a
runtime calculated one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 18 Feb 2009 19:58:40 +0000 (20:58 +0100)]
mxc timer: make compile time independent
Currently we depend on hardcoded base addresses for the timer.
This prevents us from compiling in more than one i.MX architecture
at a time. This patch changes the base address to a runtime
calculated one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Thu, 2 Apr 2009 20:32:10 +0000 (22:32 +0200)]
MXC: rename mxc_map_io to architecture specific versions
This allows us to have more mapping functions for more than one
i.MX architecture in the kernel. As this is the earliest board
specific hook we have, also use it to set the cpu type.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Mon, 30 Mar 2009 13:04:38 +0000 (15:04 +0200)]
pcm037: Add support for UART2
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 1 Apr 2009 08:09:18 +0000 (10:09 +0200)]
MX35: Fix IPU/Framebuffer clock names
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Tue, 10 Mar 2009 10:56:10 +0000 (11:56 +0100)]
pcm037: add SDHC card detection
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Fri, 13 Mar 2009 18:52:41 +0000 (19:52 +0100)]
pcm037: setup all pins at once and not in init functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Mon, 23 Mar 2009 09:07:48 +0000 (10:07 +0100)]
i.MX35 clock support: remove automotive path
It is no longer present in newer cores. Unfortunately Freescale decided
to put the bit which decides between automotive clock path and consumer
clock path in the automotive clock path direction. With current code we
cannot detect the core revision, so just remove automotive path completely.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Fri, 6 Feb 2009 14:42:26 +0000 (15:42 +0100)]
[ARM] MX35: Add PCM043 board support
The PCM043 is a i.MX35 based board from Phytec also known as the
phyCORE-i.MX35.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 1 Apr 2009 09:13:22 +0000 (11:13 +0200)]
MX35: Add iomux pin defintions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 1 Apr 2009 09:11:48 +0000 (11:11 +0200)]
MXC: Add iomux support for MX35 SoCs
This iomux is called iomux-v3 in the tree because it is the third known
incarnation of MXC iomuxers. It is not only found on the MX35 but also
on the MX51 and probably others.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Tue, 31 Mar 2009 18:51:52 +0000 (20:51 +0200)]
MXC irq: remove unused defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Magnus Lilja [Sat, 18 Apr 2009 16:20:50 +0000 (18:20 +0200)]
i.MX31: Disable CPU_32v6K in mx3_defconfig.
The i.MX31 ARM11 core is not a v6K core. Disable this option as it
is incompatible with non v6K cores.
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Wed, 8 Apr 2009 09:45:47 +0000 (11:45 +0200)]
mx3fb: Fix compilation with CONFIG_PM
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Uwe Kleine-König [Tue, 21 Apr 2009 20:56:14 +0000 (22:56 +0200)]
mx27ads: move PBC mapping out of vmalloc space
Before this patch I got the following line in my dmesg:
[ 0.000000] BUG: mapping for 0xd4000000 at 0xeb000000 overlaps vmalloc space
VMALLOC_END is 0xf4000000 and there are the following other mappings
defined for mx27ads:
(0xa0500000,+0x00001000) maps to 0xffff0000
(0x10000000,+0x00100000) maps to 0xf4000000
(0x80000000,+0x00100000) maps to 0xf4100000
(0xd8000000,+0x00100000) maps to 0xf4200000
So map PBC to 0xf4300000.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer [Tue, 21 Apr 2009 10:39:59 +0000 (12:39 +0200)]
MXC: remove BUG_ON in interrupt handler
On i.MX31 I sometimes get spurious interrupts. There is no need
to crash the whole system when this happens. Instead, silently
ignore it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Valentin Longchamp [Fri, 17 Apr 2009 13:20:26 +0000 (15:20 +0200)]
mx31: remove mx31moboard_defconfig
We want to have a mx31_defconfig file that builds a kernel that is able
to boot on all support mx31 systems and thus also can be better tested
by automatic build scripts. For these reasons, this config file is not
needed anymore.
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Guennadi Liakhovetski [Thu, 16 Apr 2009 12:12:54 +0000 (14:12 +0200)]
ARM: ARCH_MXC should select HAVE_CLK
All i.MX platforms support <linux/clk.h> calls and should select HAVE_CLK.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Martin Fuzzey [Thu, 26 Mar 2009 21:27:52 +0000 (22:27 +0100)]
mxc : BUG in imx_dma_request
On MX2 platforms imx_dma_request() calls request_irq() which may sleep
with interrupts disabled.
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Martin Fuzzey [Thu, 26 Mar 2009 21:21:16 +0000 (22:21 +0100)]
mxc : Clean up properly when imx_dma_free() used without imx_dma_disable()
The sequence
imx_dma_request()
imx_dma_enable()
imx_dma_free()
left the dma channel in_use mode and did not release the timer.
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Linus Torvalds [Sat, 2 May 2009 23:52:50 +0000 (16:52 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: fix getbmap vs mmap deadlock
xfs: a couple getbmap cleanups
xfs: add more checks to superblock validation
xfs_file_last_byte() needs to acquire ilock
David Gibson [Thu, 30 Apr 2009 05:25:53 +0000 (15:25 +1000)]
Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtc
The powerpc kernel always requires an Open Firmware like device tree
to supply device information. On systems without OF, this comes from
a flattened device tree blob. This blob is usually generated by dtc,
a tool which compiles a text description of the device tree into the
flattened format used by the kernel. Sometimes, the bootwrapper makes
small changes to the pre-compiled device tree blob (e.g. filling in
the size of RAM). To do this it uses the libfdt library.
Because these are only used on powerpc, the code for both these tools
is included under arch/powerpc/boot (these were imported and are
periodically updated from the upstream dtc tree).
However, the microblaze architecture, currently being prepared for
merging to mainline also uses dtc to produce device tree blobs. A few
other archs have also mentioned some interest in using dtc.
Therefore, this patch moves dtc and libfdt from arch/powerpc into
scripts, where it can be used by any architecture.
The vast bulk of this patch is a literal move, the rest is adjusting
the various Makefiles to use dtc and libfdt correctly from their new
locations.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 2 May 2009 23:50:46 +0000 (16:50 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/configfs
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/configfs:
configfs: Fix Trivial Warning in fs/configfs/symlink.c
Linus Torvalds [Sat, 2 May 2009 23:48:32 +0000 (16:48 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bart/ide-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide-cd: fix REQ_QUIET tests in cdrom_decode_status
Fix up trivial conflicts in include/linux/blkdev.h
Linus Torvalds [Sat, 2 May 2009 23:40:20 +0000 (16:40 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
[ARM] 5489/1: ARM errata: Data written to the L2 cache can be overwritten with stale data
[ARM] 5490/1: ARM errata: Processor deadlock when a false hazard is created
[ARM] 5487/1: ARM errata: Stale prediction on replaced interworking branch
[ARM] 5488/1: ARM errata: Invalidation of the Instruction Cache operation can fail
davinci: DM644x: NAND: update partitioning
davinci: update DM644x support in preparation for more SoCs
davinci: DM644x: rename board file
davinci: update pin-multiplexing support
davinci: serial: generalize for more SoCs
davinci: DM355 IRQ Definitions
davinci: DM646x: add interrupt number and priorities
davinci: PSC: Clear bits in MDCTL reg before setting new bits
davinci: gpio bugfixes
davinci: add EDMA driver
davinci: timers: use clk_get_rate()
[ARM] pxa/littleton: add missing da9034 touchscreen support
[ARM] pxa/zylonite: configure GPIO18/19 correctly, used by 2 GPIO expanders
[ARM] pxa/zylonite: fix the issue of unused SDATA_IN_1 pin get AC97 not working
[ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC
[ARM] pxa: remove unused CPU_FREQ_PXA Kconfig symbol
...
Linus Torvalds [Sat, 2 May 2009 23:38:30 +0000 (16:38 -0700)]
Merge branch 'x86-mce-for-linus' of git://git./linux/kernel/git/x86/linux-2.6-tip
* 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
x86, mce: fix boot logging logic
x86, mce: make polling timer interval per CPU
Linus Torvalds [Sat, 2 May 2009 23:36:34 +0000 (16:36 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (53 commits)
[SCSI] libosd: OSD2r05: on-the-wire changes for latest OSD2 revision 5.
[SCSI] libosd: OSD2r05: OSD_CRYPTO_KEYID_SIZE will grow 20 => 32 bytes
[SCSI] libosd: OSD2r05: Prepare for rev5 attribute list changes
[SCSI] libosd: fix potential ERR_PTR dereference in osd_initiator.c
[SCSI] mpt2sas : bump driver version to 01.100.02.00
[SCSI] mpt2sas: fix hotplug event processing
[SCSI] mpt2sas : release diagnotic buffers prior host reset
[SCSI] mpt2sas : Broadcast Primative AEN bug fix
[SCSI] mpt2sas : Identify Dell series-7 adapters at driver load time
[SCSI] mpt2sas : driver name needs to be in the MPT2IOCINFO ioctl
[SCSI] mpt2sas : running out of message frames
[SCSI] mpt2sas : fix oops when firmware sends large sense buffer size
[SCSI] mpt2sas : the sanity check in base_interrupt needs to be on dword boundary
[SCSI] mpt2sas : unique ioctl magic number
[SCSI] fix sign extension with 1.5TB usb-storage LBD=y
[SCSI] ipr: Fix sleeping function called with interrupts disabled
[SCSI] fcoe: fip: add multicast filter to receive FIP advertisements.
[SCSI] libfc: Fix compilation warnings with allmodconfig
[SCSI] fcoe: fix spelling typos and bad comments
[SCSI] fcoe: don't export functions that are internal to fcoe
...
Linus Torvalds [Sat, 2 May 2009 23:35:45 +0000 (16:35 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: document the multi-touch (MT) protocol
Input: add detailed multi-touch finger data report protocol
Input: allow certain EV_ABS events to bypass all filtering
Input: bcm5974 - add documentation for the driver
Input: bcm5974 - augment debug information
Input: bcm5974 - Add support for the Macbook 5 (Unibody)
Input: bcm5974 - add quad-finger tapping
Input: bcm5974 - prepare for a new trackpad header type
Input: appletouch - fix DMA to/from stack buffer
Input: wacom - fix TabletPC touch bug
Input: lifebook - add DMI entry for Fujitsu B-2130
Input: ALPS - add signature for Toshiba Satellite Pro M10
Input: elantech - make sure touchpad is really in absolute mode
Input: elantech - provide a workaround for jumpy cursor on firmware 2.34
Input: ucb1400 - use disable_irq_nosync() in irq handler
Input: tsc2007 - use disable_irq_nosync() in irq handler
Input: sa1111ps2 - use disable_irq_nosync() in irq handlers
Input: omap-keypad - use disable_irq_nosync() in irq handler
Trond Myklebust [Tue, 21 Apr 2009 21:18:20 +0000 (17:18 -0400)]
SUNRPC: Fix the problem of EADDRNOTAVAIL syslog floods on reconnect
See http://bugzilla.kernel.org/show_bug.cgi?id=13034
If the port gets into a TIME_WAIT state, then we cannot reconnect without
binding to a new port.
Tested-by: Petr Vandrovec <petr@vandrovec.name>
Tested-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 2 May 2009 23:33:56 +0000 (16:33 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/sam/kbuild-fixes
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
kbuild: fix comment in modpost.c
kbuild: fix scripts/setlocalversion with git
kbuild: fix Module.markers permission error under cygwin
docs: also clean index.html
kbuild: remove a tag file before it is regenerated
kbuild: "make prepare" should be "make modules_prepare"
kbuild: clean Module.markers and modules.order for out-of-tree modules
avr32: drop unused CLEAN_FILES
Linus Torvalds [Sat, 2 May 2009 23:30:47 +0000 (16:30 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
ocfs2: Change repository in MAINTAINERS.
ocfs2: Fix a missing credit when deleting from indexed directories.
ocfs2/trivial: Remove unused variable in ocfs2_rename.
ocfs2: Add missing iput() during error handling in ocfs2_dentry_attach_lock()
ocfs2: Fix some printk() warnings.
ocfs2: Fix 2 warning during ocfs2 make.
ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.
Linus Torvalds [Sat, 2 May 2009 23:29:47 +0000 (16:29 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: fix oops in hid_check_keys_pressed()
HID: fix possible deadlock in usbhid_close()
HID: Fix the support for apple mini aluminium keyboard
HID: Add support for the G25 force feedback wheel in native mode
HID: hidraw -- fix missing unlocks in unlocked_ioctl
Linus Torvalds [Sat, 2 May 2009 23:28:58 +0000 (16:28 -0700)]
Merge branch 'for-linus' of git://linux-m32r.org/git/takata/linux-2.6_dev
* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
m32r: use __stringify() macro in assembler.h
m32r: build fix for __stringify macro
Ashutosh Naik [Thu, 30 Apr 2009 22:08:58 +0000 (15:08 -0700)]
ibft: fix the display of a few fields in the NIC attribute structure in sysfs
Fix the display of a few fields in the iBFT NIC attribute structure in
sysfs.
Ensure that, if the DHCP IP address and the subnet mask for the interface
is present in the iBFT NIC structure, the corresponding entries are
created in sysfs tree for the device. This would hence create the
additional entries in the tree based on the iBFT table and would not
delete any existing entries.
Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com>
Cc: Vishnu V <vishnu@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrea Righi [Thu, 30 Apr 2009 22:08:57 +0000 (15:08 -0700)]
mm: prevent divide error for small values of vm_dirty_bytes
Avoid setting less than two pages for vm_dirty_bytes: this is necessary to
avoid potential division by 0 (like the following) in get_dirty_limits().
[ 49.951610] divide error: 0000 [#1] PREEMPT SMP
[ 49.952195] last sysfs file: /sys/devices/pci0000:00/0000:00:01.1/host0/target0:0:0/0:0:0:0/block/sda/uevent
[ 49.952195] CPU 1
[ 49.952195] Modules linked in: pcspkr
[ 49.952195] Pid: 3064, comm: dd Not tainted 2.6.30-rc3 #1
[ 49.952195] RIP: 0010:[<
ffffffff802d39a9>] [<
ffffffff802d39a9>] get_dirty_limits+0xe9/0x2c0
[ 49.952195] RSP: 0018:
ffff88001de03a98 EFLAGS:
00010202
[ 49.952195] RAX:
00000000000000c0 RBX:
ffff88001de03b80 RCX:
28f5c28f5c28f5c3
[ 49.952195] RDX:
0000000000000000 RSI:
00000000000000c0 RDI:
0000000000000000
[ 49.952195] RBP:
ffff88001de03ae8 R08:
0000000000000000 R09:
0000000000000000
[ 49.952195] R10:
ffff88001ddda9a0 R11:
0000000000000001 R12:
0000000000000001
[ 49.952195] R13:
ffff88001fbc8218 R14:
ffff88001de03b70 R15:
ffff88001de03b78
[ 49.952195] FS:
00007fe9a435b6f0(0000) GS:
ffff8800025d9000(0000) knlGS:
0000000000000000
[ 49.952195] CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
[ 49.952195] CR2:
00007fe9a39ab000 CR3:
000000001de38000 CR4:
00000000000006e0
[ 49.952195] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 49.952195] DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[ 49.952195] Process dd (pid: 3064, threadinfo
ffff88001de02000, task
ffff88001ddda250)
[ 49.952195] Stack:
[ 49.952195]
ffff88001fa0de00 ffff88001f2dbd70 ffff88001f9fe800 000080b900000000
[ 49.952195]
00000000000000c0 ffff8800027a6100 0000000000000400 ffff88001fbc8218
[ 49.952195]
0000000000000000 0000000000000600 ffff88001de03bb8 ffffffff802d3ed7
[ 49.952195] Call Trace:
[ 49.952195] [<
ffffffff802d3ed7>] balance_dirty_pages_ratelimited_nr+0x1d7/0x3f0
[ 49.952195] [<
ffffffff80368f8e>] ? ext3_writeback_write_end+0x9e/0x120
[ 49.952195] [<
ffffffff802cc7df>] generic_file_buffered_write+0x12f/0x330
[ 49.952195] [<
ffffffff802cce8d>] __generic_file_aio_write_nolock+0x26d/0x460
[ 49.952195] [<
ffffffff802cda32>] ? generic_file_aio_write+0x52/0xd0
[ 49.952195] [<
ffffffff802cda49>] generic_file_aio_write+0x69/0xd0
[ 49.952195] [<
ffffffff80365fa6>] ext3_file_write+0x26/0xc0
[ 49.952195] [<
ffffffff803034d1>] do_sync_write+0xf1/0x140
[ 49.952195] [<
ffffffff80290d1a>] ? get_lock_stats+0x2a/0x60
[ 49.952195] [<
ffffffff80280730>] ? autoremove_wake_function+0x0/0x40
[ 49.952195] [<
ffffffff8030411b>] vfs_write+0xcb/0x190
[ 49.952195] [<
ffffffff803042d0>] sys_write+0x50/0x90
[ 49.952195] [<
ffffffff8022ff6b>] system_call_fastpath+0x16/0x1b
[ 49.952195] Code: 00 00 00 2b 05 09 1c 17 01 48 89 c6 49 0f af f4 48 c1 ee 02 48 89 f0 48 f7 e1 48 89 d6 31 d2 48 c1 ee 02 48 0f af 75 d0 48 89 f0 <48> f7 f7 41 8b 95 ac 01 00 00 48 89 c7 49 0f af d4 48 c1 ea 02
[ 49.952195] RIP [<
ffffffff802d39a9>] get_dirty_limits+0xe9/0x2c0
[ 49.952195] RSP <
ffff88001de03a98>
[ 50.096523] ---[ end trace
008d7aa02f244d7b ]---
Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Thu, 30 Apr 2009 22:08:55 +0000 (15:08 -0700)]
vmscan: avoid multiplication overflow in shrink_zone()
Local variable `scan' can overflow on zones which are larger than
(2G * 4k) / 100 = 80GB.
Making it 64-bit on 64-bit will fix that up.
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Oleg Nesterov [Thu, 30 Apr 2009 22:08:54 +0000 (15:08 -0700)]
ptrace: s/parent/real_parent/ in binfmt_elf_fdpic.c
->real_parent is the parent. ->parent may be the tracer.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Thu, 30 Apr 2009 22:08:53 +0000 (15:08 -0700)]
kernel-doc: restrict syntax for private: and public:
scripts/kernel-doc can (incorrectly) delete struct members that are
surrounded by /* ... */ <struct members> /* ... */ if there is a /*
private: */ comment in there somewhere also.
Fix that by making the "/* private:" only allow whitespace between /* and
"private:", not anything/everything in the world.
This fixes some erroneous kernel-doc warnings that popped up while
processing include/linux/usb/composite.h.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KOSAKI Motohiro [Thu, 30 Apr 2009 22:08:51 +0000 (15:08 -0700)]
mm: fix Committed_AS underflow on large NR_CPUS environment
The Committed_AS field can underflow in certain situations:
> # while true; do cat /proc/meminfo | grep _AS; sleep 1; done | uniq -c
> 1 Committed_AS:
18446744073709323392 kB
> 11 Committed_AS:
18446744073709455488 kB
> 6 Committed_AS: 35136 kB
> 5 Committed_AS:
18446744073709454400 kB
> 7 Committed_AS: 35904 kB
> 3 Committed_AS:
18446744073709453248 kB
> 2 Committed_AS: 34752 kB
> 9 Committed_AS:
18446744073709453248 kB
> 8 Committed_AS: 34752 kB
> 3 Committed_AS:
18446744073709320960 kB
> 7 Committed_AS:
18446744073709454080 kB
> 3 Committed_AS:
18446744073709320960 kB
> 5 Committed_AS:
18446744073709454080 kB
> 6 Committed_AS:
18446744073709320960 kB
Because NR_CPUS can be greater than 1000 and meminfo_proc_show() does
not check for underflow.
But NR_CPUS proportional isn't good calculation. In general,
possibility of lock contention is proportional to the number of online
cpus, not theorical maximum cpus (NR_CPUS).
The current kernel has generic percpu-counter stuff. using it is right
way. it makes code simplify and percpu_counter_read_positive() don't
make underflow issue.
Reported-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: <stable@kernel.org> [All kernel versions]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grant Likely [Thu, 30 Apr 2009 22:08:50 +0000 (15:08 -0700)]
of: make of_(un)register_platform_driver common code
Some drivers using of_register_platform_driver() wrapper break on sparc
because the wrapper isn't in the header file. This patch moves it from
Microblaze and PowerPC implementations and makes it common code.
Fixes this sparc64 allmodconfig build error (at least):
drivers/leds/leds-gpio.c: In function `gpio_led_init':
drivers/leds/leds-gpio.c:295: error: implicit declaration of function `of_register_platform_driver'
drivers/leds/leds-gpio.c: In function `gpio_led_exit':
drivers/leds/leds-gpio.c:311: error: implicit declaration of function `of_unregister_platform_driver'
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:49 +0000 (15:08 -0700)]
alpha: binfmt_aout fix
This fixes the problem introduced by commit
3bfacef412 (get rid of
special-casing the /sbin/loader on alpha): osf/1 ecoff binary segfaults
when binfmt_aout built as module. That happens because aout binary
handler gets on the top of the binfmt list due to late registration, and
kernel attempts to execute the binary without preparatory work that must
be done by binfmt_loader.
Fixed by changing the registration order of the default binfmt handlers
using list_add_tail() and introducing insert_binfmt() function which
places new handler on the top of the binfmt list. This might be generally
useful for installing arch-specific frontends for default handlers or just
for overriding them.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:48 +0000 (15:08 -0700)]
alpha: futex implementation
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:47 +0000 (15:08 -0700)]
alpha: exception table sorting
Exception fixups for sections other than .text (like one in futex_init())
break the natural ordering of fixup entries, so sorting is required.
Without that the result of the exception table search depends on phase of
the moon.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:45 +0000 (15:08 -0700)]
alpha: titan and marvel build fixes
These platforms got broken after u64 => 'long long' conversion.
Apparently that change was compile-tested with 'make allmodconfig', but it
doesn't include systems that depend on !ALPHA_LEGACY_START_ADDRESS.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stefan Bader [Thu, 30 Apr 2009 22:08:44 +0000 (15:08 -0700)]
vgacon: return the upper half of 512 character fonts
Uwe Geuder noted that he gets random bitmaps on a text console if he tried
to type extended characters (like the e acute). For him everything above
unicode 0xa0 was corrupted.
After some digging there seems to be a little culprit in vgacon since the
beginning of ages (well git). The function vgacon_font_get will store the
number of characters correctly in font->charcount but then calls to
vgacon_do_font_op(..., 0, 0). Which means only the lower 256 characters
are actually stored to the fontdata. The rest is left untouched. So the
next time that saved data is used, the garbled font appears. This happens
on every switch between text consoles.
Addresses https://bugs.launchpad.net/ubuntu/+source/linux/+bug/355057
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Tested-by: Uwe Geuder <ubuntuLp-ugeuder@sneakemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daisuke Nishimura [Thu, 30 Apr 2009 22:08:19 +0000 (15:08 -0700)]
memcg: fix mem_cgroup_shrink_usage()
Current mem_cgroup_shrink_usage() has two problems.
1. It doesn't call mem_cgroup_out_of_memory and doesn't update
last_oom_jiffies, so pagefault_out_of_memory invokes global OOM.
2. Considering hierarchy, shrinking has to be done from the
mem_over_limit, not from the memcg which the page would be charged to.
mem_cgroup_try_charge_swapin() does all of these things properly, so we
use it and call cancel_charge_swapin when it succeeded.
The name of "shrink_usage" is not appropriate for this behavior, so we
change it too.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.cn>
Cc: Paul Menage <menage@google.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vitaly Mayatskikh [Thu, 30 Apr 2009 22:08:18 +0000 (15:08 -0700)]
pagemap: require aligned-length, non-null reads of /proc/pid/pagemap
The intention of commit
aae8679b0ebcaa92f99c1c3cb0cd651594a43915
("pagemap: fix bug in add_to_pagemap, require aligned-length reads of
/proc/pid/pagemap") was to force reads of /proc/pid/pagemap to be a
multiple of 8 bytes, but now it allows to read 0 bytes, which actually
puts some data to user's buffer. According to POSIX, if count is zero,
read() should return zero and has no other results.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Cc: Thomas Tuttle <ttuttle@google.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Thu, 30 Apr 2009 22:08:16 +0000 (15:08 -0700)]
mm: close page_mkwrite races
Change page_mkwrite to allow implementations to return with the page
locked, and also change it's callers (in page fault paths) to hold the
lock until the page is marked dirty. This allows the filesystem to have
full control of page dirtying events coming from the VM.
Rather than simply hold the page locked over the page_mkwrite call, we
call page_mkwrite with the page unlocked and allow callers to return with
it locked, so filesystems can avoid LOR conditions with page lock.
The problem with the current scheme is this: a filesystem that wants to
associate some metadata with a page as long as the page is dirty, will
perform this manipulation in its ->page_mkwrite. It currently then must
return with the page unlocked and may not hold any other locks (according
to existing page_mkwrite convention).
In this window, the VM could write out the page, clearing page-dirty. The
filesystem has no good way to detect that a dirty pte is about to be
attached, so it will happily write out the page, at which point, the
filesystem may manipulate the metadata to reflect that the page is no
longer dirty.
It is not always possible to perform the required metadata manipulation in
->set_page_dirty, because that function cannot block or fail. The
filesystem may need to allocate some data structure, for example.
And the VM cannot mark the pte dirty before page_mkwrite, because
page_mkwrite is allowed to fail, so we must not allow any window where the
page could be written to if page_mkwrite does fail.
This solution of holding the page locked over the 3 critical operations
(page_mkwrite, setting the pte dirty, and finally setting the page dirty)
closes out races nicely, preventing page cleaning for writeout being
initiated in that window. This provides the filesystem with a strong
synchronisation against the VM here.
- Sage needs this race closed for ceph filesystem.
- Trond for NFS (http://bugzilla.kernel.org/show_bug.cgi?id=12913).
- I need it for fsblock.
- I suspect other filesystems may need it too (eg. btrfs).
- I have converted buffer.c to the new locking. Even simple block allocation
under dirty pages might be susceptible to i_size changing under partial page
at the end of file (we also have a buffer.c-side problem here, but it cannot
be fixed properly without this patch).
- Other filesystems (eg. NFS, maybe btrfs) will need to change their
page_mkwrite functions themselves.
[ This also moves page_mkwrite another step closer to fault, which should
eventually allow page_mkwrite to be moved into ->fault, and thus avoiding a
filesystem calldown and page lock/unlock cycle in __do_fault. ]
[akpm@linux-foundation.org: fix derefs of NULL ->mapping]
Cc: Sage Weil <sage@newdream.net>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Heiko Carstens [Thu, 30 Apr 2009 22:08:14 +0000 (15:08 -0700)]
atomic: fix atomic_long_cmpxchg/xchg for 64 bit architectures
On a linux-next allyesconfig build:
kernel/trace/ring_buffer.c:1726:
warning: passing argument 1 of 'atomic_cmpxchg' from incompatible pointer type
linux-next/arch/s390/include/asm/atomic.h:112:
note: expected 'struct atomic_t *' but argument is of type 'struct atomic64_t *'
atomic_long_cmpxchg and atomic_long_xchg are incorrectly defined for 64
bit architectures. They should be mapped to the atomic64_* variants.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jesper Nilsson [Thu, 30 Apr 2009 22:08:13 +0000 (15:08 -0700)]
CRISv10: fix serial driver proc-usage
drivers/serial/crisv10.c:4428: error: unknown field 'read_proc' specified in initializer
Commit
0f043a81ebe84be3576667f04fdda481609e3816 ("proc tty: remove struct
tty_operations::read_proc") removes the read_proc entry from struct
tty_operations.
Rework the proc handling in the CRISv10 serial driver to use proc_fops
instead.
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Christoph Hellwig [Thu, 30 Apr 2009 22:08:12 +0000 (15:08 -0700)]
MAINTAINERS: add ptrace entry
Add Roland and Oleg as formal ptrace maintainers, they've been doing the
job for a while.
Includes the file patterns requested by Joe.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daisuke Nishimura [Thu, 30 Apr 2009 22:08:11 +0000 (15:08 -0700)]
memcg: fix try_get_mem_cgroup_from_swapcache()
This is a bugfix for commit
3c776e64660028236313f0e54f3a9945764422df
("memcg: charge swapcache to proper memcg").
Used bit of swapcache is solid under page lock, but considering
move_account, pc->mem_cgroup is not.
We need lock_page_cgroup() anyway.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Florian Fainelli [Thu, 30 Apr 2009 22:08:10 +0000 (15:08 -0700)]
MAINTAINERS: Florian has moved
I will finish school soon, so replace my student address with this one.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Thu, 30 Apr 2009 22:08:09 +0000 (15:08 -0700)]
autofs4: fix incorrect return in autofs4_mount_busy()
Fix an obvious incorrect return status in autofs4_mount_busy().
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Johannes Weiner [Thu, 30 Apr 2009 22:08:08 +0000 (15:08 -0700)]
mm: fix pageref leak in do_swap_page()
By the time the memory cgroup code is notified about a swapin we
already hold a reference on the fault page.
If the cgroup callback fails make sure to unlock AND release the page
reference which was taken by lookup_swap_cach(), or we leak the reference.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert Moore [Sat, 2 May 2009 18:48:37 +0000 (11:48 -0700)]
acpica: validate package element more carefully in acpi_rs_get_pci_routing_table_length
acpi_rs_get_pci_routing_table_length is not performing sufficient
validation on the package returned from _PRT. It assumes a package of
packages and fails/faults if this is not the case.
We should validate each subpackage when extracted from the parent
package, and not accept objects of the wrong type, since that will just
cause the scanning to fail (likely with a kernel oops).
This can only happen with a serious BIOS bug, and is accompanied by a
warning something like this:
ACPI Warning (nspredef-0949): \_SB_.PCI0.PEG4._PRT: Return Package type mismatch at index 0 - found Integer, expected Package [
20090320]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hirokazu Takata [Sat, 2 May 2009 13:08:33 +0000 (22:08 +0900)]
m32r: use __stringify() macro in assembler.h
Replace #x with __stringify(x).
Also, #ifndef __STR is removed and undefine __STR macro at the beginning.
The __STR() macro is still remained, because the assembler.h might be
included from assembly codes as well as C codes.
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Hirokazu Takata [Sat, 2 May 2009 11:29:00 +0000 (20:29 +0900)]
m32r: build fix for __stringify macro
This patch fixes the following build error of 2.6.30-rc3-git2:
AS arch/m32r/kernel/head.o
In file included from /include/linux/init.h:7,
from /arch/m32r/kernel/head.S:11:
/include/linux/stringify.h:9: error: syntax error in macro parameter list
/include/linux/stringify.h:10: error: syntax error in macro parameter list
This build error was caused at __HEAD macro in arch/m32r/kernel/head.S,
which uses __stringify() macro.
Remove -traditional option from EXTRA_AFLAGS for the m32r,
because the __stringify() macro depends on the gcc's variadic macro
extension function, due to commit:
Make __stringify support variable argument macros too
commit:
8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Jiri Kosina [Fri, 1 May 2009 22:02:57 +0000 (00:02 +0200)]
HID: fix oops in hid_check_keys_pressed()
If the device is not claimed by hid-input (i.e devices driver by userspace
hiddev/hidraw-based drivers, or completely detached from HID
and driver by libusb), we must not check the hid->inptus, as it
is not guaranteed to be initialized, as this is performed only for devices
handled by hid-input.
Reported-by: Guillaume Chazarain <guichaz@gmail.com>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Anders Kaseorg [Thu, 23 Apr 2009 20:49:33 +0000 (16:49 -0400)]
kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
When you put
.section ".foo"
in an assembly file instead of
.section "foo", "ax"
, one of the possible symptoms is that modpost will see an
ld-generated section name ".foo.1" in section_rel() or section_rela().
But this heuristic has two problems: it will miss a bad section that
has no relocations, and it will incorrectly flag many gcc-generated
sections as bad when compiling with -ffunction-sections
-fdata-sections.
On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.
So instead of checking whether the section name matches a particular
pattern, we directly check for a missing SHF_ALLOC in the section
flags.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg [Sun, 26 Apr 2009 09:17:42 +0000 (11:17 +0200)]
kbuild: fix comment in modpost.c
There is some confusion on naming of the head section.
Correct naming is .head.text.
Fix comment so we use correct naming.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Nico Schottelius [Sat, 25 Apr 2009 07:48:39 +0000 (09:48 +0200)]
kbuild: fix scripts/setlocalversion with git
When using trees like wireless-testing, which have untagged tags,
scripts/setlocalversion does not display any git indication for
localversion.
This patch fixes it: If git is available, but no usable tag is found,
it uses -g${head}. It skips the detection of unanottated tags via
git name-rev.
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cedric Hombourger [Sat, 25 Apr 2009 07:38:21 +0000 (09:38 +0200)]
kbuild: fix Module.markers permission error under cygwin
While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers). This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.
We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.
The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers. When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.
Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.
Tested on both cygwin (1.3.22) and Linux. Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()
Signed-off-by: Cedric Hombourger <chombourger@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Randy Dunlap [Sat, 18 Apr 2009 01:28:55 +0000 (18:28 -0700)]
docs: also clean index.html
Missed index.html in "make cleandocs", so add it.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Matt Kraai [Wed, 22 Apr 2009 03:38:23 +0000 (20:38 -0700)]
kbuild: remove a tag file before it is regenerated
If a tag file is not removed before it is regenerated, the newly
generated data is appended to the old, which preserves stale data and
makes the tag file grow over time.
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>