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
Cc: Ben Dooks <ben-linux@fluff.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>
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
Cc: Ben Dooks <ben-linux@fluff.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>
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
Cc: Ben Dooks <ben-linux@fluff.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>
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
Cc: Ben Dooks <ben-linux@fluff.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>
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
Cc: Ben Dooks <ben-linux@fluff.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>
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
Cc: Ben Dooks <ben-linux@fluff.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>
Andy Green [Mon, 30 May 2011 14:43:05 +0000 (07:43 -0700)]
I2C: OMAP2+: Tag all OMAP2+ hwmod defintions with I2C IP revision
Since we cannot trust (or even reliably find) the OMAP I2C
peripheral unit's own revision register, we must inform the
OMAP i2c driver of which IP version it is running on. We
do this by tagging the omap_hwmod_class for i2c on all the
OMAP2+ platform / cpu specific hwmod init and passing it up
to the driver (next patches).
Cc: patches@linaro.org
Cc: Ben Dooks <ben-linux@fluff.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>
Andy Green [Mon, 30 May 2011 14:43:04 +0000 (07:43 -0700)]
I2C: OMAP2+: Introduce I2C IP versioning constants
These represent the two kinds of (incompatible) OMAP I2C
peripheral unit in use so far.
The constants are in linux/i2c-omap.h so the omap i2c driver can have
them too.
Cc: patches@linaro.org
Cc: Ben Dooks <ben-linux@fluff.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>
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
Cc: Ben Dooks <ben-linux@fluff.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>
Andy Green [Mon, 30 May 2011 14:43:00 +0000 (07:43 -0700)]
I2C: OMAP2+: Set hwmod flags to only allow 16-bit accesses to i2c
Peter Maydell noticed when running under QEMU he was getting
errors reporting 32-bit access to I2C peripheral unit registers
that are documented to be 8 or 16-bit only[1][2]
The I2C driver is blameless as it wraps its accesses in a
function using __raw_writew and __raw_readw, it turned out it
is the hwmod stuff.
However the hwmod code already has a flag to force a
perhipheral unit to only be accessed using 16-bit operations.
This patch applies the 16-bit only flag to the 2430,
OMAP3xxx and OMAP44xx hwmod structs. 2420 was already
correctly marked up as 16-bit.
The 2430 change will need testing by TI as arranged
in the comments to the previous patch version.
When the 16-bit flag is or-ed with other flags, it is placed
first as requested in comments.
[1] OMAP4430 Technical reference manual section 23.1.6.2
[2] OMAP3530 Techincal reference manual section 18.6
Cc: patches@linaro.org
Cc: Ben Dooks <ben-linux@fluff.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>
Stephen Rothwell [Mon, 30 May 2011 03:12:18 +0000 (13:12 +1000)]
Add linux-next specific files for
20110530
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Stephen Rothwell [Mon, 30 May 2011 03:05:56 +0000 (13:05 +1000)]
Revert "kgdbts: unify/generalize gdb breakpoint adjustment"
This reverts commit
63ab25ebbc50f74550bd8d164a34724b498f6fb9.
Stephen Rothwell [Mon, 30 May 2011 02:47:10 +0000 (12:47 +1000)]
Merge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:47:07 +0000 (12:47 +1000)]
Merge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:45:40 +0000 (12:45 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Mon, 30 May 2011 02:44:24 +0000 (12:44 +1000)]
Merge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Mon, 30 May 2011 02:38:50 +0000 (12:38 +1000)]
Merge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Mon, 30 May 2011 02:38:42 +0000 (12:38 +1000)]
Merge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Mon, 30 May 2011 02:37:32 +0000 (12:37 +1000)]
Merge remote-tracking branch 'gpio/gpio/next'
Stephen Rothwell [Mon, 30 May 2011 02:36:07 +0000 (12:36 +1000)]
Merge remote-tracking branch 'devicetree/devicetree/next'
Stephen Rothwell [Mon, 30 May 2011 02:36:05 +0000 (12:36 +1000)]
Merge remote-tracking branch 'i7300_edac/linux_next'
Stephen Rothwell [Mon, 30 May 2011 02:34:45 +0000 (12:34 +1000)]
Merge remote-tracking branch 'i7core_edac/linux_next'
Stephen Rothwell [Mon, 30 May 2011 02:32:22 +0000 (12:32 +1000)]
Merge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:31:02 +0000 (12:31 +1000)]
Merge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:29:42 +0000 (12:29 +1000)]
Merge remote-tracking branch 'dwmw2-iommu/master'
Stephen Rothwell [Mon, 30 May 2011 02:28:23 +0000 (12:28 +1000)]
Merge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Mon, 30 May 2011 02:28:00 +0000 (12:28 +1000)]
Merge remote-tracking branch 'agp/agp-next'
Stephen Rothwell [Mon, 30 May 2011 02:27:49 +0000 (12:27 +1000)]
Merge remote-tracking branch 'voltage/for-next'
Conflicts:
drivers/mfd/Kconfig
drivers/mfd/Makefile
drivers/regulator/Makefile
Stephen Rothwell [Mon, 30 May 2011 02:18:42 +0000 (12:18 +1000)]
Merge remote-tracking branch 'leds/for-mm'
Conflicts:
drivers/leds/Kconfig
Stephen Rothwell [Mon, 30 May 2011 02:17:05 +0000 (12:17 +1000)]
Merge remote-tracking branch 'block/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:15:37 +0000 (12:15 +1000)]
Merge branch 'quilt/rr'
Stephen Rothwell [Mon, 30 May 2011 02:14:18 +0000 (12:14 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:14:12 +0000 (12:14 +1000)]
Merge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:13:03 +0000 (12:13 +1000)]
Merge remote-tracking branch 'crypto/master'
Stephen Rothwell [Mon, 30 May 2011 02:11:50 +0000 (12:11 +1000)]
Merge remote-tracking branch 'bluetooth/master'
Conflicts:
net/bluetooth/l2cap_core.c
Stephen Rothwell [Mon, 30 May 2011 02:10:35 +0000 (12:10 +1000)]
Merge remote-tracking branch 'wireless/master'
Stephen Rothwell [Mon, 30 May 2011 02:10:21 +0000 (12:10 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Mon, 30 May 2011 02:09:00 +0000 (12:09 +1000)]
Merge remote-tracking branch 'cpupowerutils/master'
Stephen Rothwell [Mon, 30 May 2011 02:04:12 +0000 (12:04 +1000)]
Merge remote-tracking branch 'idle-test/idle-test'
Conflicts:
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process.c
Stephen Rothwell [Mon, 30 May 2011 01:52:52 +0000 (11:52 +1000)]
Merge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:51:28 +0000 (11:51 +1000)]
Merge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:50:16 +0000 (11:50 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Mon, 30 May 2011 01:49:00 +0000 (11:49 +1000)]
Merge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Mon, 30 May 2011 01:48:46 +0000 (11:48 +1000)]
Merge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:48:32 +0000 (11:48 +1000)]
Merge remote-tracking branch 'logfs/master'
Conflicts:
fs/logfs/logfs.h
Stephen Rothwell [Mon, 30 May 2011 01:47:01 +0000 (11:47 +1000)]
Merge remote-tracking branch 'hfsplus/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:45:50 +0000 (11:45 +1000)]
Merge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Mon, 30 May 2011 01:44:38 +0000 (11:44 +1000)]
Merge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Mon, 30 May 2011 01:44:35 +0000 (11:44 +1000)]
Merge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Mon, 30 May 2011 01:44:28 +0000 (11:44 +1000)]
Merge remote-tracking branch 'ceph/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:43:13 +0000 (11:43 +1000)]
Merge remote-tracking branch 'xtensa/master'
Conflicts:
arch/xtensa/configs/iss_defconfig
Stephen Rothwell [Mon, 30 May 2011 01:41:40 +0000 (11:41 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'
Conflicts:
drivers/rtc/Kconfig
Stephen Rothwell [Mon, 30 May 2011 01:41:34 +0000 (11:41 +1000)]
Merge remote-tracking branch 'galak/next'
Conflicts:
arch/powerpc/boot/dts/p2020ds.dts
arch/powerpc/boot/dts/p2020rdb.dts
Stephen Rothwell [Mon, 30 May 2011 01:40:23 +0000 (11:40 +1000)]
Merge remote-tracking branch '52xx-and-virtex/powerpc/next'
Stephen Rothwell [Mon, 30 May 2011 01:40:16 +0000 (11:40 +1000)]
Merge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:38:57 +0000 (11:38 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Mon, 30 May 2011 01:37:49 +0000 (11:37 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:36:38 +0000 (11:36 +1000)]
Merge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:35:29 +0000 (11:35 +1000)]
Merge remote-tracking branch 'xilinx/arm-next'
Stephen Rothwell [Mon, 30 May 2011 01:34:07 +0000 (11:34 +1000)]
Merge remote-tracking branch 'msm/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:34:02 +0000 (11:34 +1000)]
Merge remote-tracking branch 'davinci/davinci-next'
Stephen Rothwell [Mon, 30 May 2011 01:32:40 +0000 (11:32 +1000)]
Merge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Mon, 30 May 2011 01:31:27 +0000 (11:31 +1000)]
Merge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Mon, 30 May 2011 01:26:02 +0000 (11:26 +1000)]
Merge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'
Stephen Rothwell [Mon, 30 May 2011 01:26:01 +0000 (11:26 +1000)]
Merge remote-tracking branch 'rmobile-current/rmobile-fixes-for-linus'
Stephen Rothwell [Mon, 30 May 2011 01:26:00 +0000 (11:26 +1000)]
Merge remote-tracking branch 'sh-current/sh-fixes-for-linus'
Stephen Rothwell [Mon, 30 May 2011 01:25:48 +0000 (11:25 +1000)]
Merge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Mon, 30 May 2011 01:25:42 +0000 (11:25 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Mon, 30 May 2011 01:25:37 +0000 (11:25 +1000)]
Merge remote-tracking branch 'sparc-current/master'
Conflicts:
arch/sparc/include/asm/smp_32.h
arch/sparc/kernel/smp_32.c
Rusty Russell [Thu, 26 May 2011 23:38:04 +0000 (19:38 -0400)]
param: fix return value handling in param_set_*
In STANDARD_PARAM_DEF, param_set_* handles the case in which strtolfn
returns -EINVAL but it may return -ERANGE. If it returns -ERANGE,
param_set_* may set uninitialized value to the paramerter. We should handle
both cases.
The one of the cases in which strtolfn() returns -ERANGE is following:
*Type of module parameter is long
*Set the parameter more than LONG_MAX
Signed-off-by: Satoru Moriya <satoru.moriya@hds.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:11:23 +0000 (02:11 +0300)]
virtio_net: delay TX callbacks
Ask for delayed callbacks on TX ring full, to give the
other side more of a chance to make progress.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:11:14 +0000 (02:11 +0300)]
virtio: add api for delayed callbacks
Add an API that tells the other side that callbacks
should be delayed until a lot of work has been done.
Implement using the new event_idx feature.
Note: it might seem advantageous to let the drivers
ask for a callback after a specific capacity has
been reached. However, as a single head can
free many entries in the descriptor table,
we don't really have a clue about capacity
until get_buf is called. The API is the simplest
to implement at the moment, we'll see what kind of
hints drivers can pass when there's more than one
user of the feature.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:11:05 +0000 (02:11 +0300)]
virtio_test: support event index
Add ability to test the new event idx feature,
enable by default.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:10:54 +0000 (02:10 +0300)]
vhost: support event index
Support the new event index feature. When acked,
utilize it to reduce the # of interrupts sent to the guest.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:10:44 +0000 (02:10 +0300)]
virtio_ring: support event idx feature
Support for the new event idx feature:
1. When enabling interrupts, publish the current avail index
value to the host to get interrupts on the next update.
2. Use the new avail_event feature to reduce the number
of exits from the guest.
Simple test with the simulator:
[virtio]# time ./virtio_test
spurious wakeus: 0x7
real 0m0.169s
user 0m0.140s
sys 0m0.019s
[virtio]# time ./virtio_test --no-event-idx
spurious wakeus: 0x11
real 0m0.649s
user 0m0.295s
sys 0m0.335s
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:10:27 +0000 (02:10 +0300)]
virtio ring: inline function to check for events
With the new used_event and avail_event and features, both
host and guest need similar logic to check whether events are
enabled, so it helps to put the common code in the header.
Note that Xen has similar logic for notification hold-off
in include/xen/interface/io/ring.h with req_event and req_prod
corresponding to event_idx + 1 and new_idx respectively.
+1 comes from the fact that req_event and req_prod in Xen start at 1,
while event index in virtio starts at 0.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Michael S. Tsirkin [Thu, 19 May 2011 23:10:17 +0000 (02:10 +0300)]
virtio: event index interface
Define a new feature bit for the guest and host to utilize
an event index (like Xen) instead if a flag bit to enable/disable
interrupts and kicks.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Mon, 30 May 2011 01:23:21 +0000 (11:23 +1000)]
virtio-license-clarification
It's unclear to me if it's important, but it's obviously causing my
technical colleages some headaches and I'd hate such imprecision to
slow virtio adoption.
I've emailed this to all non-trivial contributors for approval, too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Ryan Harper <ryanh@us.ibm.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
Acked-by: john cooper <john.cooper@redhat.com>
Acked-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Dave Hansen [Thu, 7 Apr 2011 17:43:25 +0000 (10:43 -0700)]
virtio balloon: kill tell-host-first logic
The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST
feature bit. Whenever the bit is set, the guest kernel must
always tell the host before we free pages back to the allocator.
Without this feature, we might free a page (and have another
user touch it) while the hypervisor is unprepared for it.
But, if the bit is _not_ set, we are under no obligation to
reverse the order; we're under no obligation to do _anything_.
As of now, qemu-kvm defines the bit, but doesn't set it.
This patch makes the "tell host first" logic the only case. This
should make everybody happy, and reduce the amount of untested or
untestable code in the kernel.
This _also_ means that we don't have to preserve a pfn list
after the pages are freed, which should let us get rid of some
temporary storage (vb->pfns) eventually.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Mon, 30 May 2011 01:23:21 +0000 (11:23 +1000)]
virtio_console-dont-manually-set-features
virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT.
That's already been done by the virtio infrastructure before the probe
function is called.
Reported-by: alexey.kardashevskiy@au1.ibm.com
Acked-by: Amit Shah <amit.shah@redhat.com>
Tested-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Liu Yuan [Sat, 23 Apr 2011 18:49:26 +0000 (02:49 +0800)]
drivers, block: virtio_blk: Replace cryptic number with the macro
It is easier to figure out the context by reading SCSI_SENSE_BUFFERSIZE
instead of plain '96'.
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Christoph Hellwig [Tue, 1 Feb 2011 20:43:48 +0000 (21:43 +0100)]
virtio_blk: allow re-reading config space at runtime
Wire up the virtio_driver config_changed method to get notified about
config changes raised by the host. For now we just re-read the device
size to support online resizing of devices, but once we add more
attributes that might be changeable they could be added as well.
Note that the config_changed method is called from irq context, so
we'll have to use the workqueue infrastructure to provide us a proper
user context for our changes.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Mon, 30 May 2011 01:23:20 +0000 (11:23 +1000)]
lguest-remove-notify-on-empty
No virtio device does this any more, so no need to clutter lguest with it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Mon, 30 May 2011 01:23:20 +0000 (11:23 +1000)]
lguest-launcher-move-fix
ed16648eb5b86917f0b90bdcdbc857202da72f90 "Move kvm, uml, and lguest
subdirectories" broke the lguest example launcher.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Mon, 30 May 2011 01:23:20 +0000 (11:23 +1000)]
lguest-fix-timer-setup-WARN_ON
Without an IRQ chip set, we now get a WARN_ON and no timer interrupt. This
prevents booting.
Fortunately, the fix is a one-liner: set up the timer IRQ like everything
else.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org # .39.x
Hans de Goede [Mon, 30 May 2011 01:23:05 +0000 (11:23 +1000)]
hwmon: New driver sch5636
This patch adds a new driver for SMSC SCH5636 Super I/O chips.
The chips include an embedded microcontroller for hardware monitoring
solutions, allowing motherboard manufacturers to create their own
custom hwmon solution based upon the SCH5636.
Currently the sch5636 driver only supports the Fujitsu Theseus SCH5636
based hwmon solution. The sch5636 driver runs a sanity check on
loading to ensure it is dealing with a Fujitsu Theseus and not with
another custom SCH5636 based hwmon solution.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Hans de Goede [Mon, 30 May 2011 01:23:05 +0000 (11:23 +1000)]
hwmon: Use <> rather than () around my e-mail address
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Hans de Goede [Mon, 30 May 2011 01:23:04 +0000 (11:23 +1000)]
hwmon (sch5627): Factor out some code shared with sch5636 driver
This patch adds a new sch56xx-common.ko which contains code which will also
be used in the new sch5636 driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Mon, 30 May 2011 01:23:04 +0000 (11:23 +1000)]
hwmon: (emc6w201) Properly handle all errors
Handle errors on 8-bit register reads and writes too. Also use likely
and unlikely to make the functions faster on success.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Linus Torvalds [Mon, 30 May 2011 00:43:36 +0000 (17:43 -0700)]
Linux 3.0-rc1
.. except there are various scripts that really know that there are
three numbers, so it calls itself "3.0.0-rc1".
Hopefully by the time the final 3.0 is out, we'll have that extra zero
all figured out.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Habeck [Sat, 28 May 2011 18:15:07 +0000 (13:15 -0500)]
intel-iommu: Add domain check in domain_remove_one_dev_info
The comment in domain_remove_one_dev_info() states "No need to compare
PCI domain; it has to be the same". But for the si_domain that isn't
going to be true, as it consists of all the PCI devices that are
identity mapped thus multiple PCI domains can be in si_domain. The
code needs to validate the PCI domain too.
Signed-off-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Mike Travis [Sat, 28 May 2011 18:15:06 +0000 (13:15 -0500)]
intel-iommu: Remove Host Bridge devices from identity mapping
When using the 1:1 (identity) PCI DMA remapping, PCI Host Bridge devices
that do not use the IOMMU causes a kernel panic. Fix that by not
inserting those devices into the si_domain.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Mike Travis [Sat, 28 May 2011 18:15:05 +0000 (13:15 -0500)]
intel-iommu: Use coherent DMA mask when requested
The __intel_map_single function is not honoring the passed in DMA mask.
This results in not using the coherent DMA mask when called from
intel_alloc_coherent().
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Chris Wright [Sat, 28 May 2011 18:15:04 +0000 (13:15 -0500)]
intel-iommu: Dont cache iova above 32bit
Mike Travis and Mike Habeck reported an issue where iova allocation
would return a range that was larger than a device's dma mask.
https://lkml.org/lkml/2011/3/29/423
The dmar initialization code will reserve all PCI MMIO regions and copy
those reservations into a domain specific iova tree. It is possible for
one of those regions to be above the dma mask of a device. It is typical
to allocate iovas with a 32bit mask (despite device's dma mask possibly
being larger) and cache the result until it exhausts the lower 32bit
address space. Freeing the iova range that is >= the last iova in the
lower 32bit range when there is still an iova above the 32bit range will
corrupt the cached iova by pointing it to a region that is above 32bit.
If that region is also larger than the device's dma mask, a subsequent
allocation will return an unusable iova and cause dma failure.
Simply don't cache an iova that is above the 32bit caching boundary.
Reported-by: Mike Travis <travis@sgi.com>
Reported-by: Mike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Acked-by: Mike Travis <travis@sgi.com>
Tested-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Mike Travis [Sat, 28 May 2011 18:15:03 +0000 (13:15 -0500)]
intel-iommu: Speed up processing of the identity_mapping function
When there are a large count of PCI devices, and the pass through
option for iommu is set, much time is spent in the identity_mapping
function hunting though the iommu domains to check if a specific
device is "identity mapped".
Speed up the function by checking the cached info to see if
it's mapped to the static identity domain.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Chris Wright [Sat, 28 May 2011 18:15:02 +0000 (13:15 -0500)]
intel-iommu: Check for identity mapping candidate using system dma mask
The identity mapping code appears to make the assumption that if the
devices dma_mask is greater than 32bits the device can use identity
mapping. But that is not true: take the case where we have a 40bit
device in a 44bit architecture. The device can potentially receive a
physical address that it will truncate and cause incorrect addresses
to be used.
Instead check to see if the device's dma_mask is large enough
to address the system's dma_mask.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Mike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Alex Williamson [Tue, 24 May 2011 16:19:04 +0000 (12:19 -0400)]
intel-iommu: Only unlink device domains from iommu
Commit
a97590e5 added unlinking domains from iommus to reciprocate the
iommu from domains unlinking that was already done. We actually want
to only do this for device domains and never for the static
identity map domain or VM domains. The SI domain is special and
never freed, while VM domain->id lives in their own special address
space, separate from iommu->domain_ids.
In the current code, a VM can get domain->id zero, then mark that
domain unused when unbound from pci-stub. This leads to DMAR
write faults when the device is re-bound to the host driver.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Linus Torvalds [Sun, 29 May 2011 21:13:25 +0000 (14:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ecryptfs/ecryptfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
eCryptfs: Remove ecryptfs_header_cache_2
eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()
eCryptfs: Return useful code from contains_ecryptfs_marker
eCryptfs: Fix new inode race condition
eCryptfs: Cleanup inode initialization code
eCryptfs: Consolidate inode functions into inode.c
Linus Torvalds [Sun, 29 May 2011 21:10:13 +0000 (14:10 -0700)]
Merge branch 'pnfs-submit' of git://git.open-osd.org/linux-open-osd
* 'pnfs-submit' of git://git.open-osd.org/linux-open-osd: (32 commits)
pnfs-obj: pg_test check for max_io_size
NFSv4.1: define nfs_generic_pg_test
NFSv4.1: use pnfs_generic_pg_test directly by layout driver
NFSv4.1: change pg_test return type to bool
NFSv4.1: unify pnfs_pageio_init functions
pnfs-obj: objlayout_encode_layoutcommit implementation
pnfs: encode_layoutcommit
pnfs-obj: report errors and .encode_layoutreturn Implementation.
pnfs: encode_layoutreturn
pnfs: layoutret_on_setattr
pnfs: layoutreturn
pnfs-obj: osd raid engine read/write implementation
pnfs: support for non-rpc layout drivers
pnfs-obj: define per-inode private structure
pnfs: alloc and free layout_hdr layoutdriver methods
pnfs-obj: objio_osd device information retrieval and caching
pnfs-obj: decode layout, alloc/free lseg
pnfs-obj: pnfs_osd XDR client implementation
pnfs-obj: pnfs_osd XDR definitions
pnfs-obj: objlayoutdriver module skeleton
...
Linus Torvalds [Sun, 29 May 2011 21:06:42 +0000 (14:06 -0700)]
arm gpio drivers: make them 'depends on ARM'
We had a few drivers move from arch/arm into drivers/gpio, but they
don't actually compile without the ARM platform headers etc. As a
result they were messing up allyesconfig on x86.
Make them depend on ARM.
Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>