Ben Dooks [Tue, 1 Nov 2011 00:54:17 +0000 (00:54 +0000)]
Merge branches 'for-32/i2c/nomadik', 'for-32/i2c/s3c2410-dt' and 'for-32/i2c/tegra-iomem' into for-linus/i2c-3.2
Ben Dooks [Tue, 1 Nov 2011 00:52:53 +0000 (00:52 +0000)]
Merge branch 'for-32/i2c/irqflags' into for-linus/i2c-3.2
Conflicts:
drivers/i2c/busses/i2c-designware-core.c
Fixed up merge conflic
Ben Dooks [Tue, 1 Nov 2011 00:50:09 +0000 (00:50 +0000)]
Merge branches 'for-32/i2c/omap-v4', 'for-32/i2c/imx-dt', 'for-32/i2c/eg20t-v4', 'for-32/i2c/designware-v5' and 'for-32/i2c/au1550' into for-linus/i2c-3.2
Thomas Abraham [Tue, 13 Sep 2011 04:16:05 +0000 (09:46 +0530)]
i2c-s3c2410: Add device tree support
Add device tree probe support for Samsung's s3c2410 i2c driver.
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Thomas Abraham [Tue, 13 Sep 2011 04:16:04 +0000 (09:46 +0530)]
i2c-s3c2410: Keep a copy of platform data and use it
The platform data is copied into driver's private data and the copy is
used for all access to the platform data. This simpifies the addition
of device tree support for the i2c-s3c2410 driver.
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Jonas Aaberg [Thu, 20 Oct 2011 16:23:01 +0000 (18:23 +0200)]
i2c-nomadik: cosmetic coding style corrections
This fixes a number of whitespace and punctuation problems
around the Nomadik I2C driver.
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Manuel Lauss [Sat, 22 Oct 2011 11:34:39 +0000 (13:34 +0200)]
i2c-au1550: dev_pm_ops conversion
use newer dev_pm_ops for PM
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Manuel Lauss [Sat, 22 Oct 2011 11:34:38 +0000 (13:34 +0200)]
i2c-au1550: increase timeout waiting for master done
Double the timeout in the loop which busy-waits for the "master-done"
bit to be set. This bit indicates whether an i2c transaction has
completed; on the DB1300 and DB1550 boards this timeout is slightly
too short and causes transactions to the WM8731 codec to be falsely flagged
as failed. The timeout itself is necessary since transactions to
non-existant slaves never set this bit in the first place (and cause
i2cdetect to hang).
With this change the WM8731 codec on the DB1300/DB1550 boards is correctly
detected and initialized.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Manuel Lauss [Sat, 22 Oct 2011 11:34:37 +0000 (13:34 +0200)]
i2c-au1550: remove unused ack_timeout
The ack_timeout context member is unused, get rid of it.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Manuel Lauss [Sat, 22 Oct 2011 11:34:36 +0000 (13:34 +0200)]
i2c-au1550: remove usage of volatile keyword
Replace the usage of "volatile"s with register accessor functions.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Olof Johansson [Thu, 13 Oct 2011 00:33:00 +0000 (17:33 -0700)]
i2c-tegra: __iomem annotation fix
drivers/i2c/busses/i2c-tegra.c:585:7: warning: incorrect type in assignment (different address spaces)
drivers/i2c/busses/i2c-tegra.c:585:7: expected void *base
drivers/i2c/busses/i2c-tegra.c:585:7: got void [noderef] <asn:2>*
drivers/i2c/busses/i2c-tegra.c:619:16: warning: incorrect type in assignment (different address spaces)
drivers/i2c/busses/i2c-tegra.c:619:16: expected void [noderef] <asn:2>*base
drivers/i2c/busses/i2c-tegra.c:619:16: got void *base
drivers/i2c/busses/i2c-tegra.c:689:10: warning: incorrect type in argument 1 (different address spaces)
drivers/i2c/busses/i2c-tegra.c:689:10: expected void volatile [noderef] <asn:2>*addr
drivers/i2c/busses/i2c-tegra.c:689:10: got void *base
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by; Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:06 +0000 (13:13 +0900)]
i2c-eg20t: Add initialize processing in case i2c-error occurs
In case disconnecting physical connection,
need to initialize i2c device for retry access.
This patch adds initialize process in case bus-idle fails and Lost arbitration.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:05 +0000 (13:13 +0900)]
i2c-eg20t: Fix flag setting issue
Currently, in case occurring abnormal event,
internal flag variable(=pch_event_flag) is not reset.
This patch fixes the issue.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:04 +0000 (13:13 +0900)]
i2c-eg20t: add stop sequence in case wait-event timeout occurs
add stop sequence in case wait-event timeout in write processing.
(read processing already had it)
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:03 +0000 (13:13 +0900)]
i2c-eg20t: Separate error processing
Error processing for NACK or wait-event must be precessed separately.
So divide wait-event error processing into NACK-receiving and timeout.
Add arbitration lost processing.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:02 +0000 (13:13 +0900)]
i2c-eg20t: Fix 10bit access issue
Reported-by: Jeffrey (Sheng-Hui) Chu <jeffchu@broadcom.com>
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:01 +0000 (13:13 +0900)]
i2c-eg20t: Modify returned value s32 to long
Type of wait_event_timeout is long not s32.
This patch replaces s32 with long.
Additionally, delete negative processing(ret < 0).
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Tomoya MORINAGA [Wed, 12 Oct 2011 04:13:00 +0000 (13:13 +0900)]
i2c-eg20t: Fix bus-idle waiting issue
Currently, when checking whether bus is idle or not,
if timeout occurs,
this function always returns success(zero).
This patch fixes the issue.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Octavian Purdila [Thu, 6 Oct 2011 18:26:37 +0000 (11:26 -0700)]
i2c-designware: Fix PCI core warning on suspend/resume
PCI core warns if the legacy PM and new PM functions are
present. Update the driver to only use the new power management
framework.
This patch fixes the following warning seen during suspend/resume:
<7>[ 24.193850] i2c-designware-pci 0000:08:13.0: suspend
<4>[ 24.193866] ------------[ cut here ]------------
<4>[ 24.193892] WARNING: at drivers/pci/pci-driver.c:605 pci_has_legacy_pm_support+0x48/0x4d()
<4>[ 24.193925] Hardware name: OakTrail
<4>[ 24.193936] Modules linked in:
<4>[ 24.193958] Pid: 2834, comm: kworker/u:22 Tainted: G W
2.6.36greenridge-01402-gc8047e6 #171
<4>[ 24.193974] Call Trace:
<4>[ 24.193999] [<
c1033a93>] warn_slowpath_common+0x66/0xc2
<4>[ 24.194025] [<
c1164143>] ? pci_has_legacy_pm_support+0x48/0x4d
<4>[ 24.194052] [<
c1033afe>] warn_slowpath_null+0xf/0x13
<4>[ 24.194079] [<
c1164143>] pci_has_legacy_pm_support+0x48/0x4d
<4>[ 24.194106] [<
c11643ff>] pci_pm_suspend+0x22/0x154
<4>[ 24.194131] [<
c11643dd>] ? pci_pm_suspend+0x0/0x154
<4>[ 24.194156] [<
c11e8a7a>] pm_op+0x3e/0x95
<4>[ 24.194182] [<
c11e931d>] __device_suspend+0x12e/0x194
<4>[ 24.194208] [<
c11e974d>] ? dpm_drv_timeout+0x0/0x47
<4>[ 24.194237] [<
c11e9729>] async_suspend+0x16/0x3a
<4>[ 24.194265] [<
c104de8e>] async_run_entry_fn+0x97/0x135
<4>[ 24.194291] [<
c1043c34>] process_one_work+0x1c9/0x2db
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:36 +0000 (11:26 -0700)]
i2c-designware: Add runtime power management support
Add runtime power management to the PCI driver.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:35 +0000 (11:26 -0700)]
i2c-designware: Add support for Designware core behind PCI devices.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:34 +0000 (11:26 -0700)]
i2c-designware: Push all register reads/writes into the core code.
Move all register manipulation code into the core, also move register
offset definitions to i2c-designware-core.c since the bus specific
portions of the driver no longer need/use them.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:33 +0000 (11:26 -0700)]
i2c-designware: Support multiple cores using same ISR
Add check to make sure that the core is enabled and has outstanding
interrupts. The activity bit is masked due to the fact that it will
stay active even after the controller has been disabled until the
contoller internal state machines have settled.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:32 +0000 (11:26 -0700)]
i2c-designware: move controller config to bus specific portion of driver
With multiple I2C adapters possible in the system each running at
(possibly) different speeds we need to move the controller
configuration bit field to the adapter.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:31 +0000 (11:26 -0700)]
i2c-designware: move i2c functionality bit field to be adapter specific
The functionality of the adapter depends on the configuration of the
IP block at silicon compile time and is adapter specific.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:30 +0000 (11:26 -0700)]
i2c-designware: Move retriveving the clock speed out of core code.
The clock frequecy supplied to the IP core is specific to a single
instance of the driver. This patch makes it possible to have multiple
Designware I2C cores in the system possibly running at different core
frequencies.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Sat, 29 Oct 2011 09:57:23 +0000 (10:57 +0100)]
i2c-designware: split of i2c-designware.c into core and bus specific parts
This patch splits i2c-designware.c into three pieces:
i2c-designware-core.c, contains the code that interacts directly
with the core.
i2c-designware-platdrv.c, contains the code specific to the
platform driver using the core.
i2c-designware-core.h contains the definitions and declareations
shared by i2c-designware-core.c and i2c-designware-platdrv.c.
This patch is the first in a set to allow multiple instances of the
designware I2C core in the system.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Dirk Brandewie [Thu, 6 Oct 2011 18:26:28 +0000 (11:26 -0700)]
i2c-designware: Move checking of IP core version to i2c_dw_init()
Move checking IP core version to i2c_dw_init() in preparation for
splitting i2c-designware.c into core and bus specific portions.
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Jean-Hugues Deschenes [Thu, 6 Oct 2011 18:26:27 +0000 (11:26 -0700)]
i2c-designware: Allow mixed endianness accesses
Allows CPUs of a given endianness to access a dw controller of a different
endianness. Endianncess difference is detected at run time through the dw
component type register.
Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Jean-Hugues Deschenes [Thu, 6 Oct 2011 18:26:26 +0000 (11:26 -0700)]
i2c-designware: Check component type register
Designware component type register is checked before attaching to the device.
Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Jean-Hugues Deschenes [Thu, 6 Oct 2011 18:26:25 +0000 (11:26 -0700)]
i2c-designware: Use local version of readl & writel
Use local versions of readl & writel, so per-access manipulations may be performed
Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Yong Zhang [Wed, 21 Sep 2011 09:28:33 +0000 (17:28 +0800)]
i2c: irq: Remove IRQF_DISABLED
Since commit [
c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [
b738a50a:
genirq: Warn when handler enables interrupts]).
So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Kevin Hilman [Thu, 4 Aug 2011 15:01:56 +0000 (08:01 -0700)]
I2C: OMAP: remove unused function pointers from pdata
Now that this driver is using runtime PM, there is no longer a need
for the idle/enable/shutdown function pointers in pdata.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Kevin Hilman [Tue, 17 May 2011 14:31:38 +0000 (16:31 +0200)]
I2C: OMAP: remove dev->idle, use usage counting provided by runtime PM
Current usage of runtime PM is not quite correct. The actual
idle/unidle of the I2C hardware should not happen until the runtime PM
callbacks are called. Therefore, change omap_i2c_[un]idle() functions
to only be called from the runtime PM callbacks (when usage count
transitions to/from zero.)
Also, the runtime PM core does usage counting and replaces
functionality currently managed by the dev->idle flag. Remove usage
of dev->idle in favor of using runtime PM, and checking status using
pm_runtime_suspended().
Signed-off-by: Kevin Hilman <khilman@ti.com>
Kevin Hilman [Tue, 17 May 2011 14:31:37 +0000 (16:31 +0200)]
I2C: OMAP: remove unneccesary use of pdev
A pointer to the struct device associated with the i2c device is
already kept in the struct omap_i2c_dev, so use omap_i2c_device to
find the pointer to struct device.
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Shubhrajyoti D [Wed, 3 Aug 2011 08:28:08 +0000 (13:58 +0530)]
OMAP4: I2C: Enable the wakeup in I2C_WE
Currently for OMAP4 the I2C_WE is not programmed.
This patch enables the programming for OMAP4.
This patch fixes a bad conflict resolution.
This effectively restores the following commit
Commit
120bdaa47[i2c-omap: Program I2C_WE on OMAP4 to enable i2c wakeup]
which got changed by
Commit
a3a7acbc[I2C: OMAP2+: address confused probed version naming]
Reviewed-by: Felipe Balbi <balbi@ti.com>
Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:10 +0000 (07:43 -0700)]
I2C: OMAP1/OMAP2+: prepend I2C IP version to probed version shown in dev_info
The IP version is prepended to the existing printed probed
version as an "epoch" version.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:09 +0000 (07:43 -0700)]
I2C: OMAP2+: Convert omap I2C driver to use feature implementation flags from platform data
This patch eliminates all cpu_...() tests from the OMAP I2C driver.
Instead, it uses the functionality flags in the platform data to make
the decisions about product variations the driver needs to handle.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:09 +0000 (07:43 -0700)]
I2C: OMAP1: set i2c unit feature implementation flags in platform data
Most of the OMAP1 implementation flags are set statically, with the
exception that omap7xx has its data bus wired up differently.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:08 +0000 (07:43 -0700)]
I2C: OMAP2+: Pass flags up to omap i2c platform_data as well
This is how the driver can find the flags for its implementation
functionality in its platform_data
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:08 +0000 (07:43 -0700)]
I2C: OMAP1/OMAP2+: add flags field to omap i2c platform data
OMAP I2C driver can access the configuration flags through
its platform data.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:07 +0000 (07:43 -0700)]
I2C: OMAP2+: address confused probed version naming
The driver reflects the confusion that probed I2C revision
from the hardware of 0x40 means it is on an OMAP4430.
However, you will probe the same 0x40 ID on an OMAP3530. So
this patch changes the name to reflect that.
It also clarifies that the original name OMAP_I2C_REV_2 is
referring to some ancient OMAP1 revision number, not to be
confused with the IP revisions this patch series introduces.
Similarly the term "rev" is used in the ancient OMAP1 ISR,
the term is changed to use omap1 instead.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:07 +0000 (07:43 -0700)]
I2C: OMAP2+: Solve array bounds overflow error on i2c idle
This solves the main problem the patch series is about. Prior
to this patch on OMAP3530 the driver wrongly interprets the I2C
peripheral unit's own reported revision as meaning it is running
on an IP V2 device and must use the extended registers.
In fact OMAP3530 is IP V1 with the smaller register set, the
reason for the confusion is that the hardware does in fact report
having the same IP revision index as is found on an OMAP4430,
which really is IP V2 and has the extended registers.
This corrects the test for which registers to use so that it
decides using hwmod knowledge found in the platform_data.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:06 +0000 (07:43 -0700)]
I2C: OMAP2+: use platform_data ip revision to select register map
Change the register map names to reflect the IP revision they
are representing, and use the platform_data IP revision index
to select between them at init time.
Eliminates 1 of 17 cpu_...() calls in the driver.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:06 +0000 (07:43 -0700)]
I2C: OMAP2+: Pass hwmod rev knowledge via platform_data when i2c bus added
Mark each OMAP I2C bus with the hwmod's knowledge of which I2C
IP version is in the chip we're running on.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:06 +0000 (07:43 -0700)]
I2C: OMAP1: set IP revision in platform data
All OMAP1 are using "IP revision 1" in terms of register
layout. We set this information in omap1_i2c_add_bus() so
we don't have to use cpu_is_xxx() any more in the omap i2c
driver.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:05 +0000 (07:43 -0700)]
I2C: OMAP: add rev to omap i2c platform data
We need to pass the I2C IP revision from the hwmod class up
into the OMAP I2C driver, which does not have direct
access to it.
This adds a member to the platform data the OMAP I2C driver
does use already to hold the I2C IP revision.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Andy Green [Mon, 30 May 2011 14:43:04 +0000 (07:43 -0700)]
I2C: OMAP2+: Name registers in I2C IP V2 only accordingly
The OMAP I2C driver dynamically chooses between two register sets of
differing sizes depending on the cpu type it finds itself on.
It has been observed that the existing code references non-existing
registers on OMAP3530, because while it correctly chose the smaller
register layout based on cpu type, the code uses the probed register
ID to decide if to execute code referencing an extra register, and
both register layout devices on OMAP3530 and OMAP4430 report the same
probed ID of 0x40.
This patch changes the extended register names only found on IP V2
of the I2C peripheral unit accordingly to help show up errors in usage.
Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Linus Torvalds [Fri, 28 Oct 2011 19:02:27 +0000 (12:02 -0700)]
Merge branch 'devel-stable' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (178 commits)
ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large TEXT_OFFSET
ARM: gic, local timers: use the request_percpu_irq() interface
ARM: gic: consolidate PPI handling
ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H
ARM: mach-s5p64x0: remove mach/memory.h
ARM: mach-s3c64xx: remove mach/memory.h
ARM: plat-mxc: remove mach/memory.h
ARM: mach-prima2: remove mach/memory.h
ARM: mach-zynq: remove mach/memory.h
ARM: mach-bcmring: remove mach/memory.h
ARM: mach-davinci: remove mach/memory.h
ARM: mach-pxa: remove mach/memory.h
ARM: mach-ixp4xx: remove mach/memory.h
ARM: mach-h720x: remove mach/memory.h
ARM: mach-vt8500: remove mach/memory.h
ARM: mach-s5pc100: remove mach/memory.h
ARM: mach-tegra: remove mach/memory.h
ARM: plat-tcc: remove mach/memory.h
ARM: mach-mmp: remove mach/memory.h
ARM: mach-cns3xxx: remove mach/memory.h
...
Fix up mostly pretty trivial conflicts in:
- arch/arm/Kconfig
- arch/arm/include/asm/localtimer.h
- arch/arm/kernel/Makefile
- arch/arm/mach-shmobile/board-ap4evb.c
- arch/arm/mach-u300/core.c
- arch/arm/mm/dma-mapping.c
- arch/arm/mm/proc-v7.S
- arch/arm/plat-omap/Kconfig
largely due to some CONFIG option renaming (ie CONFIG_PM_SLEEP ->
CONFIG_ARM_CPU_SUSPEND for the arm-specific suspend code etc) and
addition of NEED_MACH_MEMORY_H next to HAVE_IDE.
Linus Torvalds [Fri, 28 Oct 2011 17:49:34 +0000 (10:49 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/hch/vfs-queue
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue: (21 commits)
leases: fix write-open/read-lease race
nfs: drop unnecessary locking in llseek
ext4: replace cut'n'pasted llseek code with generic_file_llseek_size
vfs: add generic_file_llseek_size
vfs: do (nearly) lockless generic_file_llseek
direct-io: merge direct_io_walker into __blockdev_direct_IO
direct-io: inline the complete submission path
direct-io: separate map_bh from dio
direct-io: use a slab cache for struct dio
direct-io: rearrange fields in dio/dio_submit to avoid holes
direct-io: fix a wrong comment
direct-io: separate fields only used in the submission path from struct dio
vfs: fix spinning prevention in prune_icache_sb
vfs: add a comment to inode_permission()
vfs: pass all mask flags check_acl and posix_acl_permission
vfs: add hex format for MAY_* flag values
vfs: indicate that the permission functions take all the MAY_* flags
compat: sync compat_stats with statfs.
vfs: add "device" tag to /proc/self/mountstats
cleanup: vfs: small comment fix for block_invalidatepage
...
Fix up trivial conflict in fs/gfs2/file.c (llseek changes)
Linus Torvalds [Fri, 28 Oct 2011 17:44:50 +0000 (10:44 -0700)]
Merge http://sucs.org/~rohan/git/gfs2-3.0-nmw
* http://sucs.org/~rohan/git/gfs2-3.0-nmw: (24 commits)
GFS2: Move readahead of metadata during deallocation into its own function
GFS2: Remove two unused variables
GFS2: Misc fixes
GFS2: rewrite fallocate code to write blocks directly
GFS2: speed up delete/unlink performance for large files
GFS2: Fix off-by-one in gfs2_blk2rgrpd
GFS2: Clean up ->page_mkwrite
GFS2: Correctly set goal block after allocation
GFS2: Fix AIL flush issue during fsync
GFS2: Use cached rgrp in gfs2_rlist_add()
GFS2: Call do_strip() directly from recursive_scan()
GFS2: Remove obsolete assert
GFS2: Cache the most recently used resource group in the inode
GFS2: Make resource groups "append only" during life of fs
GFS2: Use rbtree for resource groups and clean up bitmap buffer ref count scheme
GFS2: Fix lseek after SEEK_DATA, SEEK_HOLE have been added
GFS2: Clean up gfs2_create
GFS2: Use ->dirty_inode()
GFS2: Fix bug trap and journaled data fsync
GFS2: Fix inode allocation error path
...
Linus Torvalds [Fri, 28 Oct 2011 17:43:32 +0000 (10:43 -0700)]
Merge branch '3.2-without-smb2' of git://git.samba.org/sfrench/cifs-2.6
* '3.2-without-smb2' of git://git.samba.org/sfrench/cifs-2.6: (52 commits)
Fix build break when freezer not configured
Add definition for share encryption
CIFS: Make cifs_push_locks send as many locks at once as possible
CIFS: Send as many mandatory unlock ranges at once as possible
CIFS: Implement caching mechanism for posix brlocks
CIFS: Implement caching mechanism for mandatory brlocks
CIFS: Fix DFS handling in cifs_get_file_info
CIFS: Fix error handling in cifs_readv_complete
[CIFS] Fixup trivial checkpatch warning
[CIFS] Show nostrictsync and noperm mount options in /proc/mounts
cifs, freezer: add wait_event_freezekillable and have cifs use it
cifs: allow cifs_max_pending to be readable under /sys/module/cifs/parameters
cifs: tune bdi.ra_pages in accordance with the rsize
cifs: allow for larger rsize= options and change defaults
cifs: convert cifs_readpages to use async reads
cifs: add cifs_async_readv
cifs: fix protocol definition for READ_RSP
cifs: add a callback function to receive the rest of the frame
cifs: break out 3rd receive phase into separate function
cifs: find mid earlier in receive codepath
...
Linus Torvalds [Fri, 28 Oct 2011 17:31:42 +0000 (10:31 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (69 commits)
xfs: add AIL pushing tracepoints
xfs: put in missed fix for merge problem
xfs: do not flush data workqueues in xfs_flush_buftarg
xfs: remove XFS_bflush
xfs: remove xfs_buf_target_name
xfs: use xfs_ioerror_alert in xfs_buf_iodone_callbacks
xfs: clean up xfs_ioerror_alert
xfs: clean up buffer allocation
xfs: remove buffers from the delwri list in xfs_buf_stale
xfs: remove XFS_BUF_STALE and XFS_BUF_SUPER_STALE
xfs: remove XFS_BUF_SET_VTYPE and XFS_BUF_SET_VTYPE_REF
xfs: remove XFS_BUF_FINISH_IOWAIT
xfs: remove xfs_get_buftarg_list
xfs: fix buffer flushing during unmount
xfs: optimize fsync on directories
xfs: reduce the number of log forces from tail pushing
xfs: Don't allocate new buffers on every call to _xfs_buf_find
xfs: simplify xfs_trans_ijoin* again
xfs: unlock the inode before log force in xfs_change_file_space
xfs: unlock the inode before log force in xfs_fs_nfs_commit_metadata
...
J. Bruce Fields [Wed, 21 Sep 2011 14:58:13 +0000 (10:58 -0400)]
leases: fix write-open/read-lease race
In setlease, we use i_writecount to decide whether we can give out a
read lease.
In open, we break leases before incrementing i_writecount.
There is therefore a window between the break lease and the i_writecount
increment when setlease could add a new read lease.
This would leave us with a simultaneous write open and read lease, which
shouldn't happen.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Thu, 15 Sep 2011 23:06:52 +0000 (16:06 -0700)]
nfs: drop unnecessary locking in llseek
This makes NFS follow the standard generic_file_llseek locking scheme.
Cc: Trond.Myklebust@netapp.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Thu, 15 Sep 2011 23:06:51 +0000 (16:06 -0700)]
ext4: replace cut'n'pasted llseek code with generic_file_llseek_size
This gives ext4 the benefits of unlocked llseek.
Cc: tytso@mit.edu
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Thu, 15 Sep 2011 23:06:50 +0000 (16:06 -0700)]
vfs: add generic_file_llseek_size
Add a generic_file_llseek variant to the VFS that allows passing in
the maximum file size of the file system, instead of always
using maxbytes from the superblock.
This can be used to eliminate some cut'n'paste seek code in ext4.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Thu, 15 Sep 2011 23:06:48 +0000 (16:06 -0700)]
vfs: do (nearly) lockless generic_file_llseek
The i_mutex lock use of generic _file_llseek hurts. Independent processes
accessing the same file synchronize over a single lock, even though
they have no need for synchronization at all.
Under high utilization this can cause llseek to scale very poorly on larger
systems.
This patch does some rethinking of the llseek locking model:
First the 64bit f_pos is not necessarily atomic without locks
on 32bit systems. This can already cause races with read() today.
This was discussed on linux-kernel in the past and deemed acceptable.
The patch does not change that.
Let's look at the different seek variants:
SEEK_SET: Doesn't really need any locking.
If there's a race one writer wins, the other loses.
For 32bit the non atomic update races against read()
stay the same. Without a lock they can also happen
against write() now. The read() race was deemed
acceptable in past discussions, and I think if it's
ok for read it's ok for write too.
=> Don't need a lock.
SEEK_END: This behaves like SEEK_SET plus it reads
the maximum size too. Reading the maximum size would have the
32bit atomic problem. But luckily we already have a way to read
the maximum size without locking (i_size_read), so we
can just use that instead.
Without i_mutex there is no synchronization with write() anymore,
however since the write() update is atomic on 64bit it just behaves
like another racy SEEK_SET. On non atomic 32bit it's the same
as SEEK_SET.
=> Don't need a lock, but need to use i_size_read()
SEEK_CUR: This has a read-modify-write race window
on the same file. One could argue that any application
doing unsynchronized seeks on the same file is already broken.
But for the sake of not adding a regression here I'm
using the file->f_lock to synchronize this. Using this
lock is much better than the inode mutex because it doesn't
synchronize between processes.
=> So still need a lock, but can use a f_lock.
This patch implements this new scheme in generic_file_llseek.
I dropped generic_file_llseek_unlocked and changed all callers.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:09 +0000 (21:38 -0700)]
direct-io: merge direct_io_walker into __blockdev_direct_IO
This doesn't change anything for the compiler, but hch thought it would
make the code clearer.
I moved the reference counting into its own little inline.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:08 +0000 (21:38 -0700)]
direct-io: inline the complete submission path
Add inlines to all the submission path functions. While this increases
code size it also gives gcc a lot of optimization opportunities
in this critical hotpath.
In particular -- together with some other changes -- this
allows gcc to get rid of the unnecessary clearing of
sdio at the beginning and optimize the messy parameter passing.
Any non inlining of a function which takes a sdio parameter
would break this optimization because they cannot be done if the
address of a structure is taken.
Note that benefits are only seen with CONFIG_OPTIMIZE_INLINING
and CONFIG_CC_OPTIMIZE_FOR_SIZE both set to off.
This gives about 2.2% improvement on a large database benchmark
with a high IOPS rate.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:07 +0000 (21:38 -0700)]
direct-io: separate map_bh from dio
Only a single b_private field in the map_bh buffer head is needed after
the submission path. Move map_bh separately to avoid storing
this information in the long term slab.
This avoids the weird 104 byte hole in struct dio_submit which also needed
to be memseted early.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:06 +0000 (21:38 -0700)]
direct-io: use a slab cache for struct dio
A direct slab call is slightly faster than kmalloc and can be better cached
per CPU. It also avoids rounding to the next kmalloc slab.
In addition this enforces cache line alignment for struct dio to avoid
any false sharing.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:05 +0000 (21:38 -0700)]
direct-io: rearrange fields in dio/dio_submit to avoid holes
Fix most problems reported by pahole.
There is still a weird 104 byte hole after map_bh. I'm not sure what
causes this.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:04 +0000 (21:38 -0700)]
direct-io: fix a wrong comment
There's nothing on the stack, even before my changes.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andi Kleen [Tue, 2 Aug 2011 04:38:03 +0000 (21:38 -0700)]
direct-io: separate fields only used in the submission path from struct dio
This large, but largely mechanic, patch moves all fields in struct dio
that are only used in the submission path into a separate on stack
data structure. This has the advantage that the memory is very likely
cache hot, which is not guaranteed for memory fresh out of kmalloc.
This also gives gcc more optimization potential because it can easier
determine that there are no external aliases for these variables.
The sdio initialization is a initialization now instead of memset.
This allows gcc to break sdio into individual fields and optimize
away unnecessary zeroing (after all the functions are inlined)
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Christoph Hellwig [Fri, 28 Oct 2011 08:03:41 +0000 (10:03 +0200)]
vfs: fix spinning prevention in prune_icache_sb
We need to move the inode to the end of the list to actually make the
spinning prevention explained in the comment above it work. With a
plain list_move it will simply stay in place as we're always reclaiming
from the head of the list.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andreas Gruenbacher [Sun, 23 Oct 2011 17:43:33 +0000 (23:13 +0530)]
vfs: add a comment to inode_permission()
Acked-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andreas Gruenbacher [Sun, 23 Oct 2011 17:43:32 +0000 (23:13 +0530)]
vfs: pass all mask flags check_acl and posix_acl_permission
Acked-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Aneesh Kumar K.V [Sun, 23 Oct 2011 17:43:31 +0000 (23:13 +0530)]
vfs: add hex format for MAY_* flag values
We are going to add more flags and having them in hex format
make it simpler
Acked-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Andreas Gruenbacher [Sun, 23 Oct 2011 17:43:30 +0000 (23:13 +0530)]
vfs: indicate that the permission functions take all the MAY_* flags
Acked-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Eric W. Biederman [Mon, 17 Oct 2011 20:40:02 +0000 (13:40 -0700)]
compat: sync compat_stats with statfs.
This was found by inspection while tracking a similar
bug in compat_statfs64, that has been fixed in mainline
since decemeber.
- This fixes a bug where not all of the f_spare fields
were cleared on mips and s390.
- Add the f_flags field to struct compat_statfs
- Copy f_flags to userspace in case someone cares.
- Use __clear_user to copy the f_spare field to userspace
to ensure that all of the elements of f_spare are cleared.
On some architectures f_spare is has 5 ints and on some
architectures f_spare only has 4 ints. Which makes
the previous technique of clearing each int individually
broken.
I don't expect anyone actually uses the old statfs system
call anymore but if they do let them benefit from having
the compat and the native version working the same.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Linus Torvalds [Fri, 28 Oct 2011 12:54:23 +0000 (05:54 -0700)]
Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux
* 'drm-core-next' of git://people.freedesktop.org/~airlied/linux: (290 commits)
Revert "drm/ttm: add a way to bo_wait for either the last read or last write"
Revert "drm/radeon/kms: add a new gem_wait ioctl with read/write flags"
vmwgfx: Don't pass unused arguments to do_dirty functions
vmwgfx: Emulate depth 32 framebuffers
drm/radeon: Lower the severity of the radeon lockup messages.
drm/i915/dp: Fix eDP on PCH DP on CPT/PPT
drm/i915/dp: Introduce is_cpu_edp()
drm/i915: use correct SPD type value
drm/i915: fix ILK+ infoframe support
drm/i915: add DP test request handling
drm/i915: read full receiver capability field during DP hot plug
drm/i915/dp: Remove eDP special cases from bandwidth checks
drm/i915/dp: Fix the math in intel_dp_link_required
drm/i915/panel: Always record the backlight level again (but cleverly)
i915: Move i915_read/write out of line
drm/i915: remove transcoder PLL mashing from mode_set per specs
drm/i915: if transcoder disable fails, say which
drm/i915: set watermarks for third pipe on IVB
drm/i915: export a CPT mode set verification function
drm/i915: fix transcoder PLL select masking
...
Linus Torvalds [Fri, 28 Oct 2011 12:46:02 +0000 (05:46 -0700)]
Merge branch 'x86-vdso-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86-64, doc: Remove int 0xcc from entry_64.S documentation
x86, vsyscall: Add missing <asm/fixmap.h> to arch/x86/mm/fault.c
Fix up trivial conflicts in arch/x86/mm/fault.c (asm/fixmap.h vs
asm/vsyscall.h: both work, which to use? Whatever..)
Linus Torvalds [Fri, 28 Oct 2011 12:43:56 +0000 (05:43 -0700)]
Merge branch 'x86-uv-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86: uv2: Workaround for UV2 Hub bug (system global address format)
Linus Torvalds [Fri, 28 Oct 2011 12:43:29 +0000 (05:43 -0700)]
Merge branch 'x86-spinlocks-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, ticketlock: remove obsolete comment
x86, cmpxchg: Use __compiletime_error() to make usage messages a bit nicer
x86, ticketlock: Make __ticket_spin_trylock common
x86, ticketlock: Convert __ticket_spin_lock to use xadd()
x86, ticketlock: Convert spin loop to C
x86, ticketlock: Clean up types and accessors
x86: Use xadd helper more widely
x86: Add xadd helper macro
x86, cmpxchg: Unify cmpxchg into cmpxchg.h
x86, cmpxchg: Move 64-bit set64_bit() to match 32-bit
x86, cmpxchg: Move 32-bit __cmpxchg_wrong_size to match 64 bit.
x86, cmpxchg: <linux/alternative.h> has LOCK_PREFIX
Linus Torvalds [Fri, 28 Oct 2011 12:29:07 +0000 (05:29 -0700)]
Merge branch 'x86-rdrand-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-rdrand-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, random: Verify RDRAND functionality and allow it to be disabled
x86, random: Architectural inlines to get random integers with RDRAND
random: Add support for architectural random hooks
Fix up trivial conflicts in drivers/char/random.c: the architectural
random hooks touched "get_random_int()" that was simplified to use MD5
and not do the keyptr thing any more (see commit
6e5714eaf77d: "net:
Compute protocol sequence numbers and fragment IDs using MD5").
Linus Torvalds [Fri, 28 Oct 2011 12:14:48 +0000 (05:14 -0700)]
Merge branch 'x86-microcode-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, microcode, AMD: Add microcode revision to /proc/cpuinfo
x86, microcode: Correct microcode revision format
coretemp: Get microcode revision from cpu_data
x86, intel: Use c->microcode for Atom errata check
x86, intel: Output microcode revision in /proc/cpuinfo
x86, microcode: Don't request microcode from userspace unnecessarily
Fix up trivial conflicts in arch/x86/kernel/cpu/amd.c (conflict between
moving AMD BSP code to cpu_dev helper function and adding AMD microcode
revision to /proc/cpuinfo code)
Linus Torvalds [Fri, 28 Oct 2011 12:08:40 +0000 (05:08 -0700)]
Merge branch 'x86-hyperv-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86: Hyper-V: Integrate the clocksource with Hyper-V detection code
Fix up conflicts in drivers/staging/hv/Makefile manually (some of the hv
code has moved out of staging to drivers/hv/)
Linus Torvalds [Fri, 28 Oct 2011 12:04:26 +0000 (05:04 -0700)]
Merge branch 'x86-geode-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-geode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86: geode: New PCEngines Alix system driver
Linus Torvalds [Fri, 28 Oct 2011 12:04:04 +0000 (05:04 -0700)]
Merge branch 'x86-cpufeature-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, cpu: Add cpufeature flag for PCIDs
Linus Torvalds [Fri, 28 Oct 2011 12:03:12 +0000 (05:03 -0700)]
Merge branch 'x86-cpu-for-linus' of git://git./linux/kernel/git/tip/tip
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, amd: Include linux/elf.h since we use stuff from asm/elf.h
x86: cache_info: Update calculation of AMD L3 cache indices
x86: cache_info: Kill the atomic allocation in amd_init_l3_cache()
x86: cache_info: Kill the moronic shadow struct
x86: cache_info: Remove bogus free of amd_l3_cache data
x86, amd: Include elf.h explicitly, prepare the code for the module.h split
x86-32, amd: Move va_align definition to unbreak 32-bit build
x86, amd: Move BSP code to cpu_dev helper
x86: Add a BSP cpu_dev helper
x86, amd: Avoid cache aliasing penalties on AMD family 15h
Bryan Schumaker [Fri, 7 Oct 2011 17:41:15 +0000 (13:41 -0400)]
vfs: add "device" tag to /proc/self/mountstats
nfsiostat was failing to find mounted filesystems on kernels after
2.6.38 because of changes to show_vfsstat() by commit
c7f404b40a3665d9f4e9a927cc5c1ee0479ed8f9. This patch adds back the
"device" tag before the nfs server entry so scripts can parse the
mountstats file correctly.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
CC: stable@kernel.org [>=2.6.39]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Wang Sheng-Hui [Thu, 1 Sep 2011 00:22:57 +0000 (08:22 +0800)]
cleanup: vfs: small comment fix for block_invalidatepage
The patch is aganist 3.1-rc3.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Jeff Layton [Thu, 27 Oct 2011 21:53:08 +0000 (23:53 +0200)]
vfs: iov_iter: have iov_iter_advance decrement nr_segs appropriately
Currently, when you call iov_iter_advance, then the pointer to the iovec
array can be incremented, but it does not decrement the nr_segs value in
the iov_iter struct. The result is a iov_iter struct with a nr_segs
value that goes beyond the end of the array.
While I'm not aware of anything that's specifically broken by this, it
seems odd and a bit dangerous not to decrement that value. If someone
were to trust the nr_segs value to be correct, then they could end up
walking off the end of the array.
Changing this might also provide some micro-optimization when dealing
with the last iovec in an array. Many of the other routines that deal
with iov_iter have optimized codepaths when nr_segs == 1.
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Steve French [Tue, 25 Oct 2011 15:02:53 +0000 (10:02 -0500)]
Fix build break when freezer not configured
fs/cifs/transport.c: In function 'wait_for_response':
fs/cifs/transport.c:328: error: implicit declaration of function 'wait_event_freezekillable'
Caused by commit
f06ac72e9291 ("cifs, freezer: add
wait_event_freezekillable and have cifs use it"). In this config,
CONFIG_FREEZER is not set.
Reviewed-by: Shirish Pargaonkar <shirishp@us.ibm.com>
CC: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Steve French [Tue, 25 Oct 2011 01:46:50 +0000 (20:46 -0500)]
Add definition for share encryption
Samba supports a setfs info level to negotiate encrypted
shares. This patch adds the defines so we recognize
this info level. Later patches will add the enablement
for it.
Acked-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Dave Airlie [Thu, 27 Oct 2011 16:28:37 +0000 (18:28 +0200)]
Revert "drm/ttm: add a way to bo_wait for either the last read or last write"
This reverts commit
dfadbbdb57b3f2bb33e14f129a43047c6f0caefa.
Further upstream discussion between Marek and Thomas decided this wasn't
fully baked and needed further work, so revert it before it hits mainline.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 27 Oct 2011 16:15:10 +0000 (18:15 +0200)]
Revert "drm/radeon/kms: add a new gem_wait ioctl with read/write flags"
This reverts commit
d3ed74027f1dd197b7e08247a40d3bf9be1852b0.
Further upstream discussion between Thomas and Marek decided this needed
more work and driver specifics. So revert before it goes upstream.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Linus Torvalds [Thu, 27 Oct 2011 06:44:20 +0000 (08:44 +0200)]
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: (68 commits)
Input: adp5589-keys - add support for the ADP5585 derivatives
Input: imx_keypad - add pm suspend and resume support
Input: force feedback - potential integer wrap in input_ff_create()
Input: tsc2007 - make sure that X plate resistance is specified
Input: serio_raw - fix memory leak when closing char device
Input: serio_raw - kick clients when disconnecting port
Input: serio_raw - explicitly mark disconnected ports as dead
Input: serio_raw - fix coding style issues
Input: serio_raw - use dev_*() for messages
Input: serio_raw - use bool for boolean data
Input: serio_raw - perform proper locking when adding clients to list
Input: serio_raw - rename serio_raw_list to serio_raw_client
Input: serio_raw - use kref instead of rolling out its own refcounting
Input: psmouse - switch to using dev_*() for messages
Input: wacom - correct max Y value on medium bamboos
Input: wacom - add ABS_DISTANCE to Bamboo Pen reports
Input: wacom - remove unneeded touch pressure initialization
Input: lm8323 - wrap suspend and resume in CONFIG_PM_SLEEP
Input: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEP
Input: synaptics_i2c - wrap suspend and resume in CONFIG_PM_SLEEP
...
Linus Torvalds [Thu, 27 Oct 2011 06:41:50 +0000 (08:41 +0200)]
Merge branch 'clk' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'clk' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
ARM: 7131/1: clkdev: Add Common Macro for clk_lookup
clk: spi-pl022: convert to clk_prepare()/clk_unprepare()
clk: timer-sp: convert to clk_prepare()/clk_unprepare()
clk: sa1111: convert to clk_prepare()/clk_unprepare()
clk: mmci: convert to clk_prepare()/clk_unprepare()
clk: amba-pl011: convert to clk_prepare()/clk_unprepare()
clk: amba-pl010: convert to clk_prepare()/clk_unprepare()
clk: amba-clcd: convert to clk_prepare()/clk_unprepare()
clk: amba bus: convert to clk_prepare()/clk_unprepare()
clk: provide prepare/unprepare functions
Linus Torvalds [Thu, 27 Oct 2011 06:40:50 +0000 (08:40 +0200)]
Merge branch 'amba' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'amba' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
ARM: 7079/1: spi: Fix builderror in spi-pl022.c
PM: add runtime PM support to MMCI
PM: add runtime PM support to core Primecell driver
Linus Torvalds [Thu, 27 Oct 2011 06:39:10 +0000 (08:39 +0200)]
Merge branch 'gpio' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'gpio' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (43 commits)
ARM: 7135/1: ep93xx: bring back missing <mach/gpio.h>
ARM: 7104/1: plat-pxa: break out GPIO driver specifics
ARM: 7103/1: plat-pxa: move PXA GPIO driver to GPIO subsystem
ARM: 7042/3: mach-ep93xx: break out GPIO driver specifics
ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
ARM: 7094/1: arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
ARM: 7083/1: rewrite U300 GPIO to use gpiolib
ARM: 7074/1: gpio: davinci: eliminate unused variable warnings
ARM: 7063/1: Orion: gpio: add missing include of linux/types.h
ARM: 7055/1: arm/tegra: mach/gpio.h: include linux/types.h to fix build
ARM: 7054/1: arm/tegra: Delete custom gpio_to_irq, and irq_to_gpio
ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irq
ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpio
ARM: 7057/1: mach-pnx4008: rename GPIO header
ARM: 7056/1: plat-nomadik: kill off <plat/gpio.h>
ARM: 7050/1: mach-sa1100: delete irq_to_gpio() function
ARM: 7049/1: mach-sa1100: move SA1100 GPIO driver to GPIO subsystem
ARM: 7045/1: mach-lpc32xx: break out GPIO driver specifics
ARM: 7044/1: mach-lpc32xx: move LPC32XX GPIO driver to GPIO subsystem
ARM: 7043/1: mach-ixp2000: rename GPIO header
...
Fix up trivial conflicts in arch/arm/mach-u300/Kconfig manually
Boaz Harrosh [Thu, 27 Oct 2011 01:26:49 +0000 (18:26 -0700)]
fs/Makefile: Stupid typo breakage of exofs inclusion
In my last patch I did a stupid mistake and broke the exofs
compilation completely. Fix it ASAP.
Instead of obj-y I did obj-$(y)
Really Really sorry. Me totally blushing :-{|
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 27 Oct 2011 06:35:41 +0000 (08:35 +0200)]
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6:
of_mdio: Don't phy_scan_fixups() twice
Devicetree: Expand on ARM Primecell binding documentation
dt: Add empty of_match_node() macro
dt: add empty dt helpers for non-dt build
devicetree: fix build error on drivers/tty/serial/altera_jtaguart.c
devicetree: Add ARM pl022 spi controller binding doc
devicetree: Add ARM pl061 gpio controller binding doc
of/irq: of_irq_find_parent: check for parent equal to child
MAINTAINERS: update devicetree maintainers
dt: add helper to read 64-bit integers
tty: use of_match_ptr() for of_match_table entry
OF: Add of_match_ptr() macro
dt: add empty for_each_child_of_node, of_find_property
devicetree: Document Qualcomm and Atmel prefixes
serial/imx: add of_alias_get_id() reference back
dt: add of_alias_scan and of_alias_get_id
devicetree: Add a registry of vendor prefixes
Linus Torvalds [Thu, 27 Oct 2011 06:32:37 +0000 (08:32 +0200)]
Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev
* 'upstream-linus' of git://github.com/jgarzik/libata-dev: (50 commits)
pata_efar: fix register naming used in efar_set_piomode()
pata_rdc: add Power Management support
ata_piix: unify code for programming PIO and MWDMA timings
ata_piix: SITRE handling fix
libata: make ata_sff_data_xfer_noirq() work with 32-bit PIO
pata_artop: add Power Management support
pata_sl82c105: add Power Management support
pata_pdc2027x: add Power Management support
pata_legacy: use PIO mask defines
pata_legacy: unify QDI ->set_piomode methods
libata: remove no longer needed pata_qdi driver
pata_it8213: fix register naming used in it8213_set_piomode()
pata_it8213: add UDMA100 and UDMA133 support
pata_rdc: parallel scanning needs an extra locking
pata_via: add via_fixup()
libata: ata_timing_compute() fixup
pata_scc: add proper cable detection method
pata_arasan_cf: remove bogus to_platform_device() calls
pata_atiixp: add proper ->prereset method
pata_serverworks: add serverworks_fixup()
...
Dmitry Torokhov [Thu, 27 Oct 2011 04:46:20 +0000 (21:46 -0700)]
Merge branch 'next' into for-linus
Linus Torvalds [Wed, 26 Oct 2011 19:46:18 +0000 (21:46 +0200)]
Merge branch 'slab/for-linus' of git://git./linux/kernel/git/penberg/linux
* 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
tools, slub: Fix off-by-one buffer corruption after readlink() call
slub: Discard slab page when node partial > minimum partial number
slub: correct comments error for per cpu partial
mm: restrict access to slab files under procfs and sysfs
slub: Code optimization in get_partial_node()
slub: doc: update the slabinfo.c file path
slub: explicitly document position of inserting slab to partial list
slub: update slabinfo tools to report per cpu partial list statistics
slub: per cpu cache for partial pages
slub: return object pointer from get_partial() / new_slab().
slub: pass kmem_cache_cpu pointer to get_partial()
slub: Prepare inuse field in new_slab()
slub: Remove useless statements in __slab_alloc
slub: free slabs without holding locks
slub: use print_hex_dump
slab: use print_hex_dump
Linus Torvalds [Wed, 26 Oct 2011 19:43:07 +0000 (21:43 +0200)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin:
Blackfin: irq: remove IRQF_DISABLED
Blackfin: boards: clean up i2c_board_info
Blackfin: drop unused Kconfig symbol
Blackfin: bf537-stamp: register ASoC EVAL-ADAU1373 board driver
Blackfin: bf537-stamp: Register adav801 codec and ASoC machine driver
Blackfin: bf537-stamp: register adau1701 codec and asoc machine driver
Blackfin: merge asm/mutex.h into kbuild too
Blackfin: bf537-stamp: fix
ad73311 codec config macro
Blackfin: bf537-stamp: fix ad1836 name
Blackfin: kgdb_test: rework code to avoid -O0 usage
Blackfin: fix sparse warnings in copy_to/from_user
Blackfin: bf548-ezkit: update defconfig
Blackfin: SMP: fix scheduling deadlock
Blackfin: H8606: fixup bogus ioresource init
Blackfin: SMP: convert to common asm-generic/atomic.h
Linus Torvalds [Wed, 26 Oct 2011 19:39:42 +0000 (21:39 +0200)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: (34 commits)
md: Fix some bugs in recovery_disabled handling.
md/raid5: fix bug that could result in reads from a failed device.
lib/raid6: Fix filename emitted in generated code
md.c: trivial comment fix
MD: Allow restarting an interrupted incremental recovery.
md: clear In_sync bit on devices added to an active array.
md: add proper write-congestion reporting to RAID1 and RAID10.
md: rename "mdk_personality" to "md_personality"
md/bitmap remove fault injection options.
md/raid5: typedef removal: raid5_conf_t -> struct r5conf
md/raid1: typedef removal: conf_t -> struct r1conf
md/raid10: typedef removal: conf_t -> struct r10conf
md/raid0: typedef removal: raid0_conf_t -> struct r0conf
md/multipath: typedef removal: multipath_conf_t -> struct mpconf
md/linear: typedef removal: linear_conf_t -> struct linear_conf
md/faulty: remove typedef: conf_t -> struct faulty_conf
md/linear: remove typedefs: dev_info_t -> struct dev_info
md: remove typedefs: mirror_info_t -> struct mirror_info
md: remove typedefs: r10bio_t -> struct r10bio and r1bio_t -> struct r1bio
md: remove typedefs: mdk_thread_t -> struct md_thread
...
Linus Torvalds [Wed, 26 Oct 2011 19:33:50 +0000 (21:33 +0200)]
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
* 'for-linus' of git://git.open-osd.org/linux-open-osd: (21 commits)
ore: Enable RAID5 mounts
exofs: Support for RAID5 read-4-write interface.
ore: RAID5 Write
ore: RAID5 read
fs/Makefile: Always inspect exofs/
ore: Make ore_calc_stripe_info EXPORT_SYMBOL
ore/exofs: Change ore_check_io API
ore/exofs: Define new ore_verify_layout
ore: Support for partial component table
ore: Support for short read/writes
exofs: Support for short read/writes
ore: Remove check for ios->kern_buff in _prepare_for_striping to later
ore: cleanup: Embed an ore_striping_info inside ore_io_state
ore: Only IO one group at a time (API change)
ore/exofs: Change the type of the devices array (API change)
ore: Make ore_striping_info and ore_calc_stripe_info public
exofs: Remove unused data_map member from exofs_sb_info
exofs: Rename struct ore_components comps => oc
exofs/super.c: local functions should be static
exofs/ore.c: local functions should be static
...