Cyrill Gorcunov [Mon, 9 Nov 2009 22:06:59 +0000 (01:06 +0300)]
x86: apic: Do not use stacked physid_mask_t
We should not use physid_mask_t as a stack based
variable in apic code. This type depends on MAX_APICS
parameter which may be huge enough.
Especially it became a problem with apic NOOP driver which
is portable between 32 bit and 64 bit environment
(where we have really huge MAX_APICS).
So apic driver should operate with pointers and a caller
in turn should aware of allocation physid_mask_t variable.
As a side (but positive) effect -- we may use already
implemented physid_set_mask_of_physid function eliminating
default_apicid_to_cpu_present completely.
Note that physids_coerce and physids_promote turned into static
inline from macro (since macro hides the fact that parameter is
being interpreted as unsigned long, make it explicit).
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
LKML-Reference: <20091109220659.GA5568@lenovo> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cyrill Gorcunov [Sun, 8 Nov 2009 15:54:31 +0000 (18:54 +0300)]
x86, ioapic: Use snrpintf while set names for IO-APIC resourses
We should be ready that one day MAX_IO_APICS may raise its
number. To prevent memory overwrite we're to use safe
snprintf while set IO-APIC resourse name.
Suresh Siddha [Mon, 26 Oct 2009 22:24:36 +0000 (14:24 -0800)]
x86: Remove local_irq_enable()/local_irq_disable() in fixup_irqs()
To ensure that we handle all the pending interrupts (destined
for this cpu that is going down) in the interrupt subsystem
before the cpu goes offline, fixup_irqs() does:
Enabling interrupts is not a good thing as this cpu is already
offline. So this patch replaces that logic with,
mdelay(1);
check APIC_IRR bits
Retrigger the irq at the new destination if any interrupt has arrived
via IPI.
For IO-APIC level triggered interrupts, this retrigger IPI will
appear as an edge interrupt. ack_apic_level() will detect this
condition and IO-APIC RTE's remoteIRR is cleared using directed
EOI(using IO-APIC EOI register) on Intel platforms and for
others it uses the existing mask+edge logic followed by
unmask+level.
We can also remove mdelay() and then send spuriuous interrupts
to new cpu targets for all the irqs that were handled previously
by this cpu that is going offline. While it works, I have seen
spurious interrupt messages (nothing wrong but still annoying
messages during cpu offline, which can be seen during
suspend/resume etc)
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Gary Hade <garyhade@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <20091026230002.043281924@sbs-t61.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Suresh Siddha [Mon, 26 Oct 2009 22:24:35 +0000 (14:24 -0800)]
x86: Use EOI register in io-apic on intel platforms
IO-APIC's in intel chipsets support EOI register starting from
IO-APIC version 2. Use that when ever we need to clear the
IO-APIC RTE's RemoteIRR bit explicitly.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Gary Hade <garyhade@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <20091026230001.947855317@sbs-t61.sc.intel.com>
[ Marked use_eio_reg as __read_mostly, fixed small details ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
Suresh Siddha [Mon, 26 Oct 2009 22:24:34 +0000 (14:24 -0800)]
x86: Force irq complete move during cpu offline
When a cpu goes offline, fixup_irqs() try to move irq's
currently destined to the offline cpu to a new cpu. But this
attempt will fail if the irq is recently moved to this cpu and
the irq still hasn't arrived at this cpu (for non intr-remapping
platforms this is when we free the vector allocation at the
previous destination) that is about to go offline.
This will endup with the interrupt subsystem still pointing the
irq to the offline cpu, causing that irq to not work any more.
Fix this by forcing the irq to complete its move (its been a
long time we moved the irq to this cpu which we are offlining
now) and then move this irq to a new cpu before this cpu goes
offline.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Gary Hade <garyhade@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <20091026230001.848830905@sbs-t61.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Suresh Siddha [Mon, 26 Oct 2009 22:24:33 +0000 (14:24 -0800)]
x86: Remove move_cleanup_count from irq_cfg
move_cleanup_count for each irq in irq_cfg is keeping track of
the total number of cpus that need to free the corresponding
vectors associated with the irq which has now been migrated to
new destination. As long as this move_cleanup_count is non-zero
(i.e., as long as we have n't freed the vector allocations on
the old destinations) we were preventing the irq's further
migration.
This cleanup count is unnecessary and it is enough to not allow
the irq migration till we send the cleanup vector to the
previous irq destination, for which we already have irq_cfg's
move_in_progress. All we need to make sure is that we free the
vector at the old desintation but we don't need to wait till
that gets freed.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Gary Hade <garyhade@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <20091026230001.752968906@sbs-t61.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Suresh Siddha [Mon, 26 Oct 2009 22:24:32 +0000 (14:24 -0800)]
x86, intr-remap: Avoid irq_chip mask/unmask in fixup_irqs() for intr-remapping
In the presence of interrupt-remapping, irqs will be migrated in
the process context and we don't do (and there is no need to)
irq_chip mask/unmask while migrating the interrupt.
Similarly fix the fixup_irqs() that get called during cpu
offline and avoid calling irq_chip mask/unmask for irqs that are
ok to be migrated in the process context.
While we didn't observe any race condition with the existing
code, this change takes complete advantage of
interrupt-remapping in the newer generation platforms and avoids
any potential HW lockup's (that often worry Eric :)
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Cc: garyhade@us.ibm.com
LKML-Reference: <20091026230001.661423939@sbs-t61.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Suresh Siddha [Mon, 26 Oct 2009 22:24:31 +0000 (14:24 -0800)]
x86: Unify fixup_irqs() for 32-bit and 64-bit kernels
There is no reason to have different fixup_irqs() for 32-bit and
64-bit kernels. Unify by using the superior 64-bit version for
both the kernels.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Gary Hade <garyhade@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <20091026230001.562512739@sbs-t61.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Andreas Herrmann [Tue, 27 Oct 2009 10:01:38 +0000 (11:01 +0100)]
x86, apic: Clear APIC Timer Initial Count Register on shutdown
Commit a98f8fd24fb24fcb9a359553e64dd6aac5cf4279 (x86: apic reset
counter on shutdown) set the counter to max to avoid spurious
interrupts when the timer is re-enabled.
(In theory) you'll still get a spurious interrupt if spending
more than 344 seconds with this interrupt disabled and then
unmasking it.
The right thing to do is to clear the register. This disables
the interrupt from happening (at least it does on AMD hardware).
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20091027100138.GB30802@alberich.amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cyrill Gorcunov [Thu, 15 Oct 2009 15:04:16 +0000 (19:04 +0400)]
x86: apic: Allow noop operations to be called almost at any time
As only apic noop is used we allow to use almost any operation
caller wants (and which of them noop driver supports of
course).
Initially it was reported by Ingo Molnar that apic noop
issue a warning for pkg id (which is actually false positive
and should be eliminated).
So we save checking (and warning issue) for read/write
operations while allow any other ops to be freely used.
Also:
- fix noop_cpu_to_logical_apicid, it should be 0.
- rename noop_default_phys_pkg_id to noop_phys_pkg_id
(we use default_ prefix for more general routines
in apic subsystem).
Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Maciej W. Rozycki <macro@linux-mips.org>
LKML-Reference: <20091015150416.GC5331@lenovo> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Wed, 14 Oct 2009 13:06:42 +0000 (15:06 +0200)]
x86, apic: Fix prototype in hw_irq.h
This warning:
In file included from arch/x86/include/asm/ipi.h:23,
from arch/x86/kernel/apic/apic_noop.c:27:
arch/x86/include/asm/hw_irq.h:105: warning: ‘struct irq_desc’ declared inside parameter list
arch/x86/include/asm/hw_irq.h:105: warning: its scope is only this definition or declaration, which is probably not what you want
triggers because irq_desc is defined after hw_irq.h is included
in irq.h. Since it's pointer reference only, a forward declaration
of the type will solve the problem.
Dimitri Sivanich [Tue, 13 Oct 2009 20:32:36 +0000 (15:32 -0500)]
x86, apic: Move SGI UV functionality out of generic IO-APIC code
Move UV specific functionality out of the generic IO-APIC code.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
LKML-Reference: <20091013203236.GD20543@sgi.com>
[ Cleaned up the code some more in their new places. ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
x86: SGI UV: Fix irq affinity for hub based interrupts
This patch fixes handling of uv hub irq affinity. IRQs with ALL or
NODE affinity can be routed to cpus other than their originally
assigned cpu. Those with CPU affinity cannot be rerouted.
Cyrill Gorcunov [Tue, 13 Oct 2009 20:07:05 +0000 (00:07 +0400)]
x86, apic: Limit apic dumping, introduce new show_lapic= setup option
In case if a system has a large number of cpus printing apics
contents may consume a long time period.
We limit such an output by 1 apic by default. But to have an
ability to see all apics or some part of them we introduce
"show_lapic" setup option which allow us to limit/unlimit the
number of APICs being dumped.
Example: apic=debug show_lapic=5, or apic=debug show_lapic=all
Also move apic_verbosity checking upper that way so helper routines
do not need to inspect it at all.
Cyrill Gorcunov [Tue, 13 Oct 2009 20:07:03 +0000 (00:07 +0400)]
x86, apic: Introduce the NOOP apic driver
Introduce NOOP APIC driver. We should use it in case if apic was
disabled due to hardware of software/firmware problems (including
user requested to disable it case).
The driver is attempting to catch any inappropriate apic operation
call with warning issue.
Also it is possible to use some apic operation like IPI calls,
read/write without checking for apic presence which should make
callers code easier.
Linus Torvalds [Tue, 13 Oct 2009 17:21:33 +0000 (10:21 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
cciss: Add cciss_allow_hpsa module parameter
cciss: Fix multiple calls to pci_release_regions
blk-settings: fix function parameter kernel-doc notation
writeback: kill space in debugfs item name
writeback: account IO throttling wait as iowait
elv_iosched_store(): fix strstrip() misuse
cfq-iosched: avoid probable slice overrun when idling
cfq-iosched: apply bool value where we return 0/1
cfq-iosched: fix think time allowed for seekers
cfq-iosched: fix the slice residual sign
cfq-iosched: abstract out the 'may this cfqq dispatch' logic
block: use proper BLK_RW_ASYNC in blk_queue_start_tag()
block: Seperate read and write statistics of in_flight requests v2
block: get rid of kblock_schedule_delayed_work()
cfq-iosched: fix possible problem with jiffies wraparound
cfq-iosched: fix issue with rq-rq merging and fifo list ordering
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: revert "save ARCH & CROSS_COMPILE ..."
warn about use of uninstalled kernel headers
kbuild: mkcompile_h: trivial cleanups
kbuild: fix warning when domainname is not available
kbuild: Fix size_append issue for bzip2/lzma kernel
kbuild,scripts: use non-builtin echo for '-e'
kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
Ingo Molnar [Mon, 12 Oct 2009 14:22:46 +0000 (16:22 +0200)]
headers: Fix build after <linux/sched.h> removal
Commit d43c36dc6b357fa1806800f18aa30123c747a6d1 ("headers: remove
sched.h from interrupt.h") left some build errors in some configurations
due to drivers having depended on getting header files "accidentally".
Signed-off-by: Ingo Molnar <mingo@elte.hu>
[ Combined several one-liners from Ingo into one single patch - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 13 Oct 2009 17:10:33 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: fix possible deadlock in hidraw_read
HID: fix kerneldoc comment for hid_input_report()
HID: add __init/__exit macros to twinhan.c
Linus Torvalds [Tue, 13 Oct 2009 17:10:18 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Allow all formats as default for Nvidia HDMI
ALSA: aaci: ARM1176 aaci-pl041 AC97 register read timeout
ALSA: hda - Fix volume-knob setup for Dell laptops with STAC9228
ALSA: hda - Fix mute sound with STAC9227/9228 codecs
ALSA: bt87x - Add a whitelist for Pinnacle PCTV (11bd:0012)
ALSA: hda - Fix overflow of spec->init_verbs in patch_realtek.c
ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@
ALSA: ice1724: Fix surround on Chaintech AV-710
ALSA: hda - Add full rates/formats support for Nvidia HDMI
Linus Torvalds [Tue, 13 Oct 2009 17:05:36 +0000 (10:05 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
ext3: Update documentation about ext3 quota mount options
ext3: Don't update superblock write time when filesystem is read-only
Linus Torvalds [Tue, 13 Oct 2009 17:04:40 +0000 (10:04 -0700)]
Merge git://git.infradead.org/~dwmw2/iommu-2.6.32
* git://git.infradead.org/~dwmw2/iommu-2.6.32:
x86: Move pci_iommu_init to rootfs_initcall()
Run pci_apply_final_quirks() sooner.
Mark pci_apply_final_quirks() __init rather than __devinit
Rename pci_init() to pci_apply_final_quirks(), move it to quirks.c
intel-iommu: Yet another BIOS workaround: Isoch DMAR unit with no TLB space
intel-iommu: Decode (and ignore) RHSA entries
intel-iommu: Make "Unknown DMAR structure" message more informative
Takashi Iwai [Tue, 13 Oct 2009 14:07:59 +0000 (16:07 +0200)]
ALSA: hda - Allow all formats as default for Nvidia HDMI
In the commit f0613d5752d8f7d1d02e6d40947f38877fdf9c90
ALSA: hda - Add full rates/formats support for Nvidia HDMI
the flag LIMITIED_RATE_FMT_SUPPORT was set as default, as I forgot
to clear before commit.
After a reboot on an ARM1176 which amounts to a softreset, it has been
noted that the ALSA driver does not get registered and the probe fails
with the error "aaci-pl041 fpga:04: ac97 read back fail". In the process
of reading from a register the SL1TxBusy bit is set indicating that the
transceiver is busy and remains so until the default timeout occurs.
Set the Power down register 0x26 to an arbitrary value as specified in
the PL041 manual (page: 3-18) so that AACISL1TX/AACISL2TX registers take
their default state.
Signed-off-by: Philby John <pjohn@in.mvista.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sun, 11 Oct 2009 15:38:29 +0000 (17:38 +0200)]
ALSA: hda - Fix mute sound with STAC9227/9228 codecs
On FSC laptops, the sound gets muted gradually when the volume is chnaged.
This is due to the wrong volume-knob widget setup. The delta bit (bit 7)
shouldn't be set for these devices.
This patch adds a new quirk to set the value 0x7f to the widget 0x24
instead of 0xff.
Add cciss_allow_hpsa module parameter. This parameter causes
the cciss driver to ignore any Smart Array devices known to be
supported by the hpsa driver.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Fix multiple calls to pci_release_regions. If cciss_pci_init
fails, it already does any necessary call to pci_release_regions,
so this does not need to be done again in cciss_init_one in that
case.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
ext3: Don't update superblock write time when filesystem is read-only
This avoids updating the superblock write time when we are mounting
the root file system read/only but we need to replay the journal; at
that point, for people who are east of GMT and who make their clock
tick in localtime for Windows bug-for-bug compatibility, and this will
cause e2fsck to complain and force a full file system check.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Jan Kara <jack@suse.cz>
Linus Torvalds [Mon, 12 Oct 2009 21:38:34 +0000 (14:38 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: Prevent AER driver from being loaded on non-root port PCIE devices
PCI: get larger bridge ranges when space is available
PCI: pci.c: fix kernel-doc notation
PCI quirk: TI XIO200a erroneously reports support for fast b2b transfers
PCI PM: Read device power state from register after updating it
PCI: remove pci_assign_resource_fixed()
PCI: PCIe portdrv: remove "-driver" from driver name
Mike Frysinger [Mon, 12 Oct 2009 13:49:56 +0000 (09:49 -0400)]
USB: musb: invert arch depend string
The MUSB code relies on platform implementations that currently only
exists for Arm and Blackfin processors, so have the MUSB Kconfig depend
upon those arches.
This should prevent other arches from building MUSB via randconfig.
Nitin Gupta [Mon, 12 Oct 2009 08:50:23 +0000 (14:20 +0530)]
ARM: force dcache flush if dcache_dirty bit set
On ARM, update_mmu_cache() does dcache flush for a page only if
it has a kernel mapping (page_mapping(page) != NULL). The correct
behavior would be to force the flush based on dcache_dirty bit only.
One of the cases where present logic would be a problem is when
a RAM based block device[1] is used as a swap disk. In this case,
we would have in-memory data corruption as shown in steps below:
do_swap_page()
{
- Allocate a new page (if not already in swap cache)
- Issue read from swap disk
- Block driver issues flush_dcache_page()
- flush_dcache_page() simply sets PG_dcache_dirty bit and does not
actually issue a flush since this page has no user space mapping yet.
- Now, if swap disk is almost full, this newly read page is removed
from swap cache and corrsponding swap slot is freed.
- Map this page anonymously in user space.
- update_mmu_cache()
- Since this page does not have kernel mapping (its not in page/swap
cache and is mapped anonymously), it does not issue dcache flush
even if dcache_dirty bit is set by flush_dcache_page() above.
<user now gets stale data since dcache was never flushed>
}
Same problem exists on mips too.
[1] example:
- brd (RAM based block device)
- ramzswap (RAM based compressed swap device)
Signed-off-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
David Woodhouse [Mon, 12 Oct 2009 11:51:22 +0000 (12:51 +0100)]
Run pci_apply_final_quirks() sooner.
Having this as a device_initcall() means that some real device drivers
can actually initialise _before_ the quirks are run, which is wrong.
We want it to run _before_ device_initcall(), but _after_ fs_initcall(),
since some arch-specific PCI initialisation like pcibios_assign_resources()
is done at fs_initcall().
We could use rootfs_initcall() but I actually want to use that for the
IOMMU initialisation, which has to come after the quirks, but still
before the real devices. So use fs_initcall_sync() instead -- since this
is entirely synchronous, it doesn't hurt that it'll escape the
synchronisation.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Mon, 12 Oct 2009 11:48:43 +0000 (12:48 +0100)]
Rename pci_init() to pci_apply_final_quirks(), move it to quirks.c
This function may have done more in the past, but all it does now is
apply the PCI_FIXUP_FINAL quirks. So name it sensibly and put it where
it belongs.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Roger Quadros [Wed, 30 Sep 2009 15:26:37 +0000 (18:26 +0300)]
mfd: Fix twl4030 boot with twl4030 usb transceiver enabled
The usb regulator supplies (usb1v5, usb1v8 & usb3v1) must be available
before adding the twl4030_usb child, else twl4030_usb_ldo_init() will
always fail thus causing boot lock-up.
This patch fixes boot on OMAP systems using the twl4030 usb transceiver.
CONFIG_TWL4030_USB=y
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Tejun Heo [Sun, 4 Oct 2009 00:31:05 +0000 (09:31 +0900)]
percpu: fix compile warnings
Fix the following two compile warnings which show up on i386.
mm/percpu.c:1873: warning: comparison of distinct pointer types lacks a cast
mm/percpu.c:1879: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'size_t'
Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Antonio Ospite [Fri, 2 Oct 2009 14:24:02 +0000 (16:24 +0200)]
[ARM] pxamci: fix printing gpio numbers in pxamci_probe
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Julia Lawall [Wed, 16 Sep 2009 09:06:52 +0000 (11:06 +0200)]
[ARM] pxa/csb726: adjust duplicate structure field initialization
Currently the irq_type field of the csb726_lan_config structure is
initialized twice. The value in the first case,
SMSC911X_IRQ_POLARITY_ACTIVE_LOW, is normally stored in the irq_polarity
field, so I have renamed the field in the first initialization to that.
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
We simply can't do the USB handoff at FIXUP_HEADER time, since it will
often require us to have valid IO mappings etc. But that in turn
requires a whole different approach, not this trivial one-liner.
Maybe we could teach all the USB quirk handoff handlers to only do the
quirk if the device has all its registers set up (since if it isn't
initialized, it's unlikely to be active), but regardless that will need
a whole lot more code than just saying "let's do it really early".
The proper fix is almost certainly to just leave the legacy IOMMU
mappings active until after all devices have been initialized.
Reported-by: Nick Piggin <npiggin@suse.de> Cc: David Woodhouse <David.Woodhouse@intel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Yinghai Lu [Sun, 11 Oct 2009 21:17:16 +0000 (14:17 -0700)]
pci: increase alignment to make more space for hidden code
As reported in
http://bugzilla.kernel.org/show_bug.cgi?id=13940
on some system when acpi are enabled, acpi clears some BAR for some
devices without reason, and kernel will need to allocate devices for
them. It then apparently hits some undocumented resource conflict,
resulting in non-working devices.
Try to increase alignment to get more safe range for unassigned devices.
Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- On architectures where ARCH= setting is used to select between
32 and 64 bit this was no longer possible without "make mrproper"
- If ARCH was changed then kbuild refused to run "make mrproper"
because ARCH had changed
- When CROSS_COMPILE was changed people were asked to run "make mrproper"
but kbuild refused to run "make mrproper" because CROSS_COMPILE changed.
- Spaces in CROSS_COMPILE was not 'supported'
- If an non-existing ARCH= was used kbuild could get stuck
Lessons learned:
. Despite being simple and straghtforward people uses very different
approaches when building the kernel.
. CROSS_COMPILE is sometimes used for ccache despite cache being
only a CC frontend so one would have expected CC to be
used for this purpose.
. And obviously this was not tested widely enough.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org>
Felipe Contreras [Wed, 16 Sep 2009 21:38:40 +0000 (00:38 +0300)]
kbuild: mkcompile_h: trivial cleanups
UTS_TRUNCATTE is simpler this way, and now editors idetify this as a
shell script.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Felipe Contreras [Wed, 16 Sep 2009 21:38:39 +0000 (00:38 +0300)]
kbuild: fix warning when domainname is not available
Otherwise we get:
"dnsdomainname: Unknown host"
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Alek Du [Wed, 19 Aug 2009 09:18:39 +0000 (17:18 +0800)]
kbuild: Fix size_append issue for bzip2/lzma kernel
The Makefile.lib will call "echo -ne" to append uncompressed kernel size to
bzip2/lzma kernel image.
The "echo" here depends on the shell that /bin/sh pointing to.
On Ubuntu system, the /bin/sh is pointing to dash, which does not support
"echo -e" at all. Use /bin/echo instead of shell echo should always be safe.
Signed-off-by: Alek Du <alek.du@intel.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Frans Pop [Tue, 25 Aug 2009 20:15:39 +0000 (22:15 +0200)]
kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
The binrpm-pkg target (binary RPM only) fails when called with
KBUILD_OUTPUT set. This patch makes it work.
For the rpm-pkg target (source + binary RPM), building with
KBUILD_OUTPUT set is not possible and also not needed as the
actual build is done in a temporary directory anyway, so check
that KBUILD_OUTPUT is not set in that case to avoid later errors.
Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Bernd Schmidt [Tue, 6 Oct 2009 08:55:26 +0000 (09:55 +0100)]
ROMFS: fix length used with romfs_dev_strnlen() function
An interestingly corrupted romfs file system exposed a problem with the
romfs_dev_strnlen function: it's passing the wrong value to its helpers.
Rather than limit the string to the length passed in by the callers, it
uses the size of the device as the limit.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (32 commits)
USB: serial: no unnecessary GFP_ATOMIC in oti6858
USB: serial: fix race between unthrottle and completion handler in visor
USB: serial: fix assumption that throttle/unthrottle cannot sleep
USB: serial: fix race between unthrottle and completion handler in symbolserial
USB: serial: fix race between unthrottle and completion handler in opticon
USB: ehci: Fix isoc scheduling boundary checking.
USB: storage: When a device returns no sense data, call it a Hardware Error
USB: small fix in error case of suspend in generic usbserial code
USB: visor: fix trivial accounting bug in visor driver
USB: Fix throttling in generic usbserial driver
USB: cp210x: Add support for the DW700 UART
USB: ipaq: fix oops when device is plugged in
USB: isp1362: fix build warnings on 64-bit systems
USB: gadget: imx_udc: Use resource size
USB: storage: iRiver P7 UNUSUAL_DEV patch
USB: musb: make HAVE_CLK support optional
USB: xhci: Fix dropping endpoints from the xHC schedule.
USB: xhci: Don't wait for a disable slot cmd when HC dies.
USB: xhci: Handle canceled URBs when HC dies.
USB: xhci: Stop debugging polling loop when HC dies.
...
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: fix file clone ioctl for bookend extents
Btrfs: fix uninit compiler warning in cow_file_range_nocow
Btrfs: constify dentry_operations
Btrfs: optimize back reference update during btrfs_drop_snapshot
Btrfs: remove negative dentry when deleting subvolumne
Btrfs: optimize fsync for the single writer case
Btrfs: async delalloc flushing under space pressure
Btrfs: release delalloc reservations on extent item insertion
Btrfs: delay clearing EXTENT_DELALLOC for compressed extents
Btrfs: cleanup extent_clear_unlock_delalloc flags
Btrfs: fix possible softlockup in the allocator
Btrfs: fix deadlock on async thread startup
Alexey Dobriyan [Wed, 7 Oct 2009 13:09:06 +0000 (17:09 +0400)]
headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (34 commits)
[SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create
[SCSI] st: fix possible memory use after free after MTSETBLK ioctl
[SCSI] be2iscsi: Moving to pci_pools v3
[SCSI] libiscsi: iscsi_session_setup to allow for private space
[SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver
[SCSI] zfcp: Fix hang when offlining device with offline chpid
[SCSI] zfcp: Fix lockdep warning when offlining device with offline chpid
[SCSI] zfcp: Fix oops during shutdown of offline device
[SCSI] zfcp: Fix initial device and cfdc for delayed adapter allocation
[SCSI] zfcp: correctly initialize unchained requests
[SCSI] mpt2sas: Bump version 02.100.03.00
[SCSI] mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT
[SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on firmware to ACK.
[SCSI] mpt2sas: Call init_completion on a per request basis.
[SCSI] mpt2sas: Target Reset will be issued from Interrupt context.
[SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
[SCSI] mpt2sas: Copyright change to 2009.
[SCSI] mpt2sas: Added mpi2_history.txt for MPI2 headers.
[SCSI] mpt2sas: Update driver to MPI2 REV K headers.
[SCSI] bfa: Brocade BFA FC SCSI driver
...
ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@
If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.
Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Russell King [Sun, 11 Oct 2009 14:25:05 +0000 (15:25 +0100)]
ARM: update die() output
Make die() better match x86:
- add printing of the last accessed sysfs file
- ensure console_verbose() is called under the lock
- ensure we panic outside of oops_exit()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Sun, 11 Oct 2009 14:03:11 +0000 (15:03 +0100)]
ARM: Dump memory and backtrace as one printk per line
dump_mem and dump_backtrace were both using multiple printk statements
to print each line. With DEBUG_LL enabled, this causes OOPS to become
very difficult to read. Solve this by only using one printk per line.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hartley Sweeten [Thu, 8 Oct 2009 22:44:41 +0000 (23:44 +0100)]
ARM: 5756/1: ep93xx: introduce clk parent
The clock generation system in the ep93xx uses two external oscillator's
and two internal PLLs to derive all the internal clocks. Many of these
internal clocks can be stopped to save power.
This introduces a "parent" hierarchy for the clocks so that the users
count can be correctly tracked for power management.
The "parent" for the video clock can either be one of the PLL outputs
or the external oscillator. In order to correctly track the "parent"
for the video clock calc_clk_div() needed to be modified. It now
returns an error code if the desired rate cannot be generated.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hartley Sweeten [Wed, 7 Oct 2009 23:45:00 +0000 (00:45 +0100)]
ARM: 5754/1: ep93xx: update i2c support
Update the ep93xx i2c support:
1) The platform init code passes the configuration data for the
i2c-gpio driver. This allows any gpio pin do be used for the
sda and scl pins. It also allows the platform to specify the
udelay and timeout.
2) Program the gpio configuration register to enable/disable the
open drain drivers. Note that this really only works if the
sda and scl pins are set to EP93XX_GPIO_LINE_EEDAT and
EP93XX_GPIO_LINE_EECLK.
3) Update the edb93xx.c platform init to use the new support.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hartley Sweeten [Wed, 7 Oct 2009 22:43:26 +0000 (23:43 +0100)]
ARM: 5753/1: ep93xx: remove old EP93XX_GPIO_* defines
Most of the EP93XX_GPIO_*_INT_* register defines in ep93xx-regs.h
not required due to how the ep93xx core and gpiolib support handle
gpio interrupts. Remove the defines to prevent future confusion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Robert Hancock [Sat, 10 Oct 2009 04:08:58 +0000 (22:08 -0600)]
ALSA: ice1724: Fix surround on Chaintech AV-710
Fix the num_total_dacs setting for Chaintech AV710. The existing comment
that only PSDOUT0 is connected is correct, but since the card is using
packed AC97 mode to send 6 channels to the codec, num_total_dacs should be
set to 6 and not 2. This allows 6-channel surround to work. Also clarify
a comment regarding the additional WM8728 codec on this card (it's connected
to the SPDIF output and always receives the same data).
Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Oliver Neukum [Wed, 7 Oct 2009 08:50:23 +0000 (10:50 +0200)]
USB: serial: fix assumption that throttle/unthrottle cannot sleep
many serial subdrivers are clearly written as if throttle/unthrottle
cannot sleep. This leads to unneeded atomic submissions. This
patch converts affected drivers in a way to makes very clear that
throttle/unthrottle can sleep. Thus future misdesigns can be avoided
and efficiency and reliability improved.
This removes any such assumption using GFP_KERNEL and spin_lock_irq()
Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Tue, 6 Oct 2009 20:45:59 +0000 (13:45 -0700)]
USB: ehci: Fix isoc scheduling boundary checking.
The EHCI driver does some bounds checking when it's scheduling an iTD for
an active endpoint. It sets the local variable start to
stream->next_uframe and moves that variable further in the schedule if
necessary. However, the driver fails to do anything with start before
jumping to the ready label and setting the URB's starting frame to
stream->next_uframe. Alan Stern confirms the EHCI driver should set
stream->next_uframe to start before jumping.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 6 Oct 2009 18:07:57 +0000 (14:07 -0400)]
USB: storage: When a device returns no sense data, call it a Hardware Error
This patch (as1294) fixes a problem that has plagued users for several
kernel releases. Some USB mass-storage devices don't return any sense
data when they encounter certain kinds of errors. The SCSI layer
interprets this to mean that the operation should be retried, and the
same thing happens -- over and over again with no limit. In some
circumstances (such as when a bus reset occurs) that is the right
thing to do, but not here.
The patch checks for this condition (a transport failure with no sense
data) and changes the result code to DID_ERROR and the sense code to
Hardware Error. This does get only a limited number of retries, and
so the command will fail relatively quickly instead of getting stuck
in an infinite loop.
The generic usbserial driver in Linux 2.6.31 halts its receiving
channel in response to throttle requests from the line discipline.
Unfortunately it drops the contents of the first URB received after
throttling takes effect. This patch corrects that problem.
Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl> Acked-by: Johan Hovold <jhovold@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Éric Piel [Sun, 4 Oct 2009 11:45:07 +0000 (13:45 +0200)]
USB: cp210x: Add support for the DW700 UART
In the Dell inspiron mini 10, the GPS is connected via a cp2102. This patch
adds detection of this USB device. (I haven't managed to use the GPS under
Linux yet, though)
Alan Stern [Mon, 5 Oct 2009 19:53:58 +0000 (15:53 -0400)]
USB: ipaq: fix oops when device is plugged in
This patch (as1293) fixes a problem with the ipaq serial driver. It
tries to bind to all the interfaces, even those that don't have enough
endpoints. The symptom is an invalid memory reference and oops when
the device is plugged in.