Steven Whitehouse [Fri, 29 Jan 2010 15:21:27 +0000 (15:21 +0000)]
GFS2: Extend umount wait coverage to full glock lifetime
Although all glocks are, by the time of the umount glock wait,
scheduled for demotion, some of them haven't made it far
enough through the process for the original set of waiting
code to wait for them.
This extends the ref count to the whole glock lifetime in order
to ensure that the waiting does catch all glocks. It does make
it a bit more invasive, but it seems the only sensible solution
at the moment.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Steven Whitehouse [Mon, 25 Jan 2010 11:20:19 +0000 (11:20 +0000)]
GFS2: Wait for unlock completion on umount
This patch adds a wait on umount between the point at which we
dispose of all glocks and the point at which we unmount the
lock protocol. This ensures that we've received all the replies
to our unlock requests before we stop the locking.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reported-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Linus Torvalds [Tue, 2 Feb 2010 20:54:37 +0000 (12:54 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
cfq-iosched: Do not idle on async queues
blk-cgroup: Fix potential deadlock in blk-cgroup
block: fix bugs in bio-integrity mempool usage
block: fix bio_add_page for non trivial merge_bvec_fn case
drbd: null dereference bug
drbd: fix max_segment_size initialization
Nick Piggin [Mon, 1 Feb 2010 11:25:57 +0000 (22:25 +1100)]
mm: purge fragmented percpu vmap blocks
Improve handling of fragmented per-CPU vmaps. We previously don't free
up per-CPU maps until all its addresses have been used and freed. So
fragmented blocks could fill up vmalloc space even if they actually had
no active vmap regions within them.
Add some logic to allow all CPUs to have these blocks purged in the case
of failure to allocate a new vm area, and also put some logic to trim
such blocks of a current CPU if we hit them in the allocation path (so
as to avoid a large build up of them).
Christoph reported some vmap allocation failures when using the per CPU
vmap APIs in XFS, which cannot be reproduced after this patch and the
previous bug fix.
Cc: linux-mm@kvack.org
Cc: stable@kernel.org
Tested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
--
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Mon, 1 Feb 2010 11:24:18 +0000 (22:24 +1100)]
mm: percpu-vmap fix RCU list walking
RCU list walking of the per-cpu vmap cache was broken. It did not use
RCU primitives, and also the union of free_list and rcu_head is
obviously wrong (because free_list is indeed the list we are RCU
walking).
While we are there, remove a couple of unused fields from an earlier
iteration.
These APIs aren't actually used anywhere, because of problems with the
XFS conversion. Christoph has now verified that the problems are solved
with these patches. Also it is an exported interface, so I think it
will be good to be merged now (and Christoph wants to get the XFS
changes into their local tree).
Cc: stable@kernel.org
Cc: linux-mm@kvack.org
Tested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
--
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 2 Feb 2010 20:48:49 +0000 (12:48 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
random: Remove unused inode variable
crypto: padlock-sha - Add import/export support
random: drop weird m_time/a_time manipulation
Linus Torvalds [Tue, 2 Feb 2010 20:48:26 +0000 (12:48 -0800)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
GFS2: Use GFP_NOFS for alloc structure
GFS2: Fix previous patch
GFS2: Don't withdraw on partial rindex entries
GFS2: Fix refcnt leak on gfs2_follow_link() error path
Linus Torvalds [Tue, 2 Feb 2010 20:47:51 +0000 (12:47 -0800)]
Merge branch 'sh/for-2.6.33' of git://git./linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Fix access to released memory in clk_debugfs_register_one()
sh: Fix access to released memory in dwarf_unwinder_cleanup()
usb: r8a66597-hdc disable interrupts fix
spi: spi_sh_msiof: Fixed data sampling on the correct edge
Linus Torvalds [Tue, 2 Feb 2010 20:45:33 +0000 (12:45 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: 64-bit: Detect virtual memory size
MIPS: AR7: Fix USB slave mem range typo
MIPS: Alchemy: Fix dbdma ring destruction memory debugcheck.
Linus Torvalds [Tue, 2 Feb 2010 20:37:44 +0000 (12:37 -0800)]
Fix 'flush_old_exec()/setup_new_exec()' split
Commit
221af7f87b9 ("Split 'flush_old_exec' into two functions") split
the function at the point of no return - ie right where there were no
more error cases to check. That made sense from a technical standpoint,
but when we then also combined it with the actual personality setting
going in between flush_old_exec() and setup_new_exec(), it needs to be a
bit more careful.
In particular, we need to make sure that we really flush the old
personality bits in the 'flush' stage, rather than later in the 'setup'
stage, since otherwise we might be flushing the _new_ personality state
that we're just setting up.
So this moves the flags and personality flushing (and 'flush_thread()',
which is the arch-specific function that generally resets lazy FP state
etc) of the old process into flush_old_exec(), so that it doesn't affect
any state that execve() is setting up for the new process environment.
This was reported by Michal Simek as breaking his Microblaze qemu
environment.
Reported-and-tested-by: Michal Simek <michal.simek@petalogix.com>
Cc: Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vivek Goyal [Tue, 2 Feb 2010 19:45:46 +0000 (20:45 +0100)]
cfq-iosched: Do not idle on async queues
Few weeks back, Shaohua Li had posted similar patch. I am reposting it
with more test results.
This patch does two things.
- Do not idle on async queues.
- It also changes the write queue depth CFQ drives (cfq_may_dispatch()).
Currently, we seem to driving queue depth of 1 always for WRITES. This is
true even if there is only one write queue in the system and all the logic
of infinite queue depth in case of single busy queue as well as slowly
increasing queue depth based on last delayed sync request does not seem to
be kicking in at all.
This patch will allow deeper WRITE queue depths (subjected to the other
WRITE queue depth contstraints like cfq_quantum and last delayed sync
request).
Shaohua Li had reported getting more out of his SSD. For me, I have got
one Lun exported from an HP EVA and when pure buffered writes are on, I
can get more out of the system. Following are test results of pure
buffered writes (with end_fsync=1) with vanilla and patched kernel. These
results are average of 3 sets of run with increasing number of threads.
AVERAGE[bufwfs][vanilla]
-------
job Set NR ReadBW(KB/s) MaxClat(us) WriteBW(KB/s) MaxClat(us)
--- --- -- ------------ ----------- ------------- -----------
bufwfs 3 1 0 0 95349 474141
bufwfs 3 2 0 0 100282 806926
bufwfs 3 4 0 0 109989 2.7301e+06
bufwfs 3 8 0 0 116642 3762231
bufwfs 3 16 0 0 118230 6902970
AVERAGE[bufwfs] [patched kernel]
-------
bufwfs 3 1 0 0 270722 404352
bufwfs 3 2 0 0 206770 1.06552e+06
bufwfs 3 4 0 0 195277 1.62283e+06
bufwfs 3 8 0 0 260960 2.62979e+06
bufwfs 3 16 0 0 299260 1.70731e+06
I also ran buffered writes along with some sequential reads and some
buffered reads going on in the system on a SATA disk because the potential
risk could be that we should not be driving queue depth higher in presence
of sync IO going to keep the max clat low.
With some random and sequential reads going on in the system on one SATA
disk I did not see any significant increase in max clat. So it looks like
other WRITE queue depth control logic is doing its job. Here are the
results.
AVERAGE[brr, bsr, bufw together] [vanilla]
-------
job Set NR ReadBW(KB/s) MaxClat(us) WriteBW(KB/s) MaxClat(us)
--- --- -- ------------ ----------- ------------- -----------
brr 3 1 850 546345 0 0
bsr 3 1 14650 729543 0 0
bufw 3 1 0 0 23908 8274517
brr 3 2 981.333 579395 0 0
bsr 3 2 14149.7 1175689 0 0
bufw 3 2 0 0 21921 1.28108e+07
brr 3 4 898.333 1.75527e+06 0 0
bsr 3 4 12230.7 1.40072e+06 0 0
bufw 3 4 0 0 19722.3 2.4901e+07
brr 3 8 900 3160594 0 0
bsr 3 8 9282.33 1.91314e+06 0 0
bufw 3 8 0 0 18789.3
23890622
AVERAGE[brr, bsr, bufw mixed] [patched kernel]
-------
job Set NR ReadBW(KB/s) MaxClat(us) WriteBW(KB/s) MaxClat(us)
--- --- -- ------------ ----------- ------------- -----------
brr 3 1 837 417973 0 0
bsr 3 1 14357.7 591275 0 0
bufw 3 1 0 0 24869.7 8910662
brr 3 2 1038.33 543434 0 0
bsr 3 2 13351.3 1205858 0 0
bufw 3 2 0 0 18626.3
13280370
brr 3 4 913 1.86861e+06 0 0
bsr 3 4 12652.3 1430974 0 0
bufw 3 4 0 0 15343.3 2.81305e+07
brr 3 8 890 2.92695e+06 0 0
bsr 3 8 9635.33 1.90244e+06 0 0
bufw 3 8 0 0 17200.3
24424392
So looks like it might make sense to include this patch.
Thanks
Vivek
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Guenter Roeck [Tue, 2 Feb 2010 16:52:20 +0000 (08:52 -0800)]
MIPS: 64-bit: Detect virtual memory size
Linux kernel 2.6.32 and later allocate address space from the top of the
kernel virtual memory address space.
This patch implements virtual memory size detection for 64 bit MIPS CPUs
to avoid resulting crashes.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/935/
Reviewed-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Marek Skuczynski [Sat, 30 Jan 2010 21:29:32 +0000 (22:29 +0100)]
sh: Fix access to released memory in clk_debugfs_register_one()
Signed-off-by: Marek Skuczynski <mareksk7@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Marek Skuczynski [Sat, 30 Jan 2010 21:27:41 +0000 (22:27 +0100)]
sh: Fix access to released memory in dwarf_unwinder_cleanup()
Signed-off-by: Marek Skuczynski <mareksk7@gmail.com>
Acked-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Magnus Damm [Wed, 27 Jan 2010 07:41:19 +0000 (07:41 +0000)]
usb: r8a66597-hdc disable interrupts fix
This patch improves disable_controller() in the r8a66597-hdc
driver to disable all interrupts and clear status flags. It
also makes sure that disable_controller() is called during
probe(). This fixes the relatively rare case of unexpected
pending interrupts after kexec reboot.
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Markus Pietrek [Tue, 2 Feb 2010 02:29:15 +0000 (11:29 +0900)]
spi: spi_sh_msiof: Fixed data sampling on the correct edge
The spi_sh_msiof.c driver presently misconfigures REDG and TEDG. TEDG==0
outputs data at the **rising edge** of the clock and REDG==0 samples data
at the **falling edge** of the clock. Therefore for SPI, TEDG must be
equal to REDG, otherwise the last byte received is not sampled in SPI
mode 3.
This brings the driver in line with the SH7723 HW Reference Manual
settings documented in Figures 20.20 and 20.21 ("SPI Clock and data
timing").
Signed-off-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Herbert Xu [Mon, 1 Feb 2010 10:48:28 +0000 (21:48 +1100)]
random: Remove unused inode variable
The previous changeset left behind an unused inode variable.
This patch removes it.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Herbert Xu [Sun, 31 Jan 2010 22:17:56 +0000 (09:17 +1100)]
crypto: padlock-sha - Add import/export support
As the padlock driver for SHA uses a software fallback to perform
partial hashing, it must implement custom import/export functions.
Otherwise hmac which depends on import/export for prehashing will
not work with padlock-sha.
Reported-by: Wolfgang Walter <wolfgang.walter@stwm.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Matt Mackall [Fri, 29 Jan 2010 08:50:36 +0000 (21:50 +1300)]
random: drop weird m_time/a_time manipulation
No other driver does anything remotely like this that I know of except
for the tty drivers, and I can't see any reason for random/urandom to do
it. In fact, it's a (trivial, harmless) timing information leak. And
obviously, it generates power- and flash-cycle wasting I/O, especially
if combined with something like hwrngd. Also, it breaks ubifs's
expectations.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Alexander Clouter [Sun, 31 Jan 2010 19:38:52 +0000 (19:38 +0000)]
MIPS: AR7: Fix USB slave mem range typo
Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/919/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Manuel Lauss [Tue, 26 Jan 2010 19:39:33 +0000 (20:39 +0100)]
MIPS: Alchemy: Fix dbdma ring destruction memory debugcheck.
DBDMA descriptors need to be located at 32-byte aligned addresses;
however kmalloc in conjunction with the SLAB allocator and
CONFIG_DEBUG_SLUB enabled doesn't deliver any. The dbdma code works
around that by allocating a larger area and realigning the start
address within it.
When freeing a channel however this adjustment is not taken into
account which results in an oops:
Kernel bug detected[#1]:
[...]
Call Trace:
[<
80186010>] cache_free_debugcheck+0x284/0x318
[<
801869d8>] kfree+0xe8/0x2a0
[<
8010b31c>] au1xxx_dbdma_chan_free+0x2c/0x7c
[<
80388dc8>] au1x_pcm_dbdma_free+0x34/0x4c
[<
80388fa8>] au1xpsc_pcm_close+0x28/0x38
[<
80383cb8>] soc_codec_close+0x14c/0x1cc
[<
8036dbb4>] snd_pcm_release_substream+0x60/0xac
[<
8036dc40>] snd_pcm_release+0x40/0xa0
[<
8018c7a8>] __fput+0x11c/0x228
[<
80188f60>] filp_close+0x7c/0x98
[<
80189018>] sys_close+0x9c/0xe4
[<
801022a0>] stack_done+0x20/0x3c
Fix this by recording the address delivered by kmalloc() and using
it as parameter to kfree().
This fix is only necessary with the SLAB allocator and CONFIG_DEBUG_SLAB
enabled; non-debug SLAB, SLUB do return nicely aligned addresses,
debug-enabled SLUB currently panics early in the boot process.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/878/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Linus Torvalds [Mon, 1 Feb 2010 18:57:12 +0000 (10:57 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ASoC: AM3517: ASoC driver not getting compiled
ASoC: AIC23: Fixing writes to non-existing registers in resume function
ALSA: hda - Add an ASUS mobo to MSI blacklist
Linus Torvalds [Mon, 1 Feb 2010 18:46:49 +0000 (10:46 -0800)]
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/radeon/kms: Fix oops after radeon_cs_parser_init() failure.
drm/radeon/kms: move radeon KMS on/off switch out of staging.
drm/radeon/kms: Bailout of blit if error happen & protect with mutex V3
drm/vmwgfx: Don't send bad flags to the host
drm/vmwgfx: Request SVGA version 2 and bail if not found
drm/vmwgfx: Correctly detect 3D
drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
drm/kms: Remove incorrect comment in struct drm_mode_modeinfo
drm/ttm: remove padding from ttm_ref_object on 64bit builds
drm/radeon/kms: release agp on error.
drm/kms/radeon/agp: Move the check of the aper_size after drm_acp_acquire and drm_agp_info
drm/kms/radeon/agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching.
drm/kms/radeon: pick digitial encoders smarter. (v3)
drm/radeon/kms: use active device to pick connector for encoder
drm/radeon/kms: fix incorrect logic in DP vs eDP connector checking.
Linus Torvalds [Mon, 1 Feb 2010 18:46:18 +0000 (10:46 -0800)]
Merge branch 'reiserfs/kill-bkl' of git://git./linux/kernel/git/frederic/random-tracing
* 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
reiserfs: Fix vmalloc call under reiserfs lock
Linus Torvalds [Mon, 1 Feb 2010 18:45:26 +0000 (10:45 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: Fix check_usage_backwards() error message
Linus Torvalds [Mon, 1 Feb 2010 18:45:00 +0000 (10:45 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf, hw_breakpoint, kgdb: Do not take mutex for kernel debugger
x86, hw_breakpoints, kgdb: Fix kgdb to use hw_breakpoint API
hw_breakpoints: Release the bp slot if arch_validate_hwbkpt_settings() fails.
perf: Ignore perf.data.old
perf report: Fix segmentation fault when running with '-g none'
Linus Torvalds [Mon, 1 Feb 2010 18:44:36 +0000 (10:44 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: Correct printk whitespace in warning from cpu down task check
sched: Fix incorrect sanity check
sched: Fix fork vs hotplug vs cpuset namespaces
Linus Torvalds [Mon, 1 Feb 2010 18:44:06 +0000 (10:44 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource: Prevent potential kgdb dead lock
Linus Torvalds [Mon, 1 Feb 2010 18:43:01 +0000 (10:43 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tracing/documentation: Cover new frame pointer semantics
tracing/documentation: Fix a typo in ftrace.txt
ring-buffer: Check for end of page in iterator
ring-buffer: Check if ring buffer iterator has stale data
tracing: Prevent kernel oops with corrupted buffer
Linus Torvalds [Mon, 1 Feb 2010 18:42:35 +0000 (10:42 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86/agp: Fix agp_amd64_init regression
x86: Add quirk for Intel DG45FC board to avoid low memory corruption
x86: Add Dell OptiPlex 760 reboot quirk
x86, UV: Fix RTC latency bug by reading replicated cachelines
oprofile/x86: add Xeon 7500 series support
oprofile/x86: fix crash when profiling more than 28 events
lib/dma-debug.c: mark file-local struct symbol static.
x86/amd-iommu: Fix deassignment of a device from the pt_domain
x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt
x86/amd-iommu: Fix NULL pointer dereference in __detach_device()
x86/amd-iommu: Fix possible integer overflow
Linus Torvalds [Mon, 1 Feb 2010 18:42:08 +0000 (10:42 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: Specify REGULATOR_CHANGE_STATUS for WM835x LED constraints
Linus Torvalds [Mon, 1 Feb 2010 18:37:58 +0000 (10:37 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: TIF_ABI_PENDING bit removal
powerpc/pseries: Fix xics build without CONFIG_SMP
powerpc/4xx: Add pcix type 1 transactions
powerpc/pci: Add missing call to header fixup
powerpc/pci: Add missing hookup to pci_slot
powerpc/pci: Add calls to set_pcie_port_type() and set_pcie_hotplug_bridge()
powerpc/40x: Update the PowerPC 40x board defconfigs
powerpc/44x: Update PowerPC 44x board defconfigs
Mark Brown [Mon, 4 Jan 2010 15:30:54 +0000 (15:30 +0000)]
regulator: Specify REGULATOR_CHANGE_STATUS for WM835x LED constraints
The WM8350 LED driver needs to be able to enable and disable the
regulators it is using. Previously the core wasn't properly enforcing
status change constraints so the driver was able to function but this
has always been intended to be required.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Steven Whitehouse [Fri, 29 Jan 2010 15:48:57 +0000 (15:48 +0000)]
GFS2: Use GFP_NOFS for alloc structure
This is called under a glock, so its a good plan to use GFP_NOFS
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Steven Whitehouse [Fri, 29 Jan 2010 15:20:34 +0000 (15:20 +0000)]
GFS2: Fix previous patch
The do_div() call needs to remain.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Benjamin Marzinski [Mon, 25 Jan 2010 17:23:24 +0000 (11:23 -0600)]
GFS2: Don't withdraw on partial rindex entries
ince gfs2 writes the rindex file a block at a time, and releases the
exclusive lock after each block, it is possible that another process
will grab the lock in the middle of the write. Since rindex entries are
not an even divisor of blocks, that other process may see partial
entries. On grows, this is fine. The process can simply ignore the the
partial entires. Previously, the code withdrew when it saw partial
entries. Now it simply ignores them.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Gui Jianfeng [Mon, 1 Feb 2010 08:58:54 +0000 (09:58 +0100)]
blk-cgroup: Fix potential deadlock in blk-cgroup
I triggered a lockdep warning as following.
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.33-rc2 #1
-------------------------------------------------------
test_io_control/7357 is trying to acquire lock:
(blkio_list_lock){+.+...}, at: [<
c053a990>] blkiocg_weight_write+0x82/0x9e
but task is already holding lock:
(&(&blkcg->lock)->rlock){......}, at: [<
c053a949>] blkiocg_weight_write+0x3b/0x9e
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&(&blkcg->lock)->rlock){......}:
[<
c04583b7>] validate_chain+0x8bc/0xb9c
[<
c0458dba>] __lock_acquire+0x723/0x789
[<
c0458eb0>] lock_acquire+0x90/0xa7
[<
c0692b0a>] _raw_spin_lock_irqsave+0x27/0x5a
[<
c053a4e1>] blkiocg_add_blkio_group+0x1a/0x6d
[<
c053cac7>] cfq_get_queue+0x225/0x3de
[<
c053eec2>] cfq_set_request+0x217/0x42d
[<
c052c8a6>] elv_set_request+0x17/0x26
[<
c0532a0f>] get_request+0x203/0x2c5
[<
c0532ae9>] get_request_wait+0x18/0x10e
[<
c0533470>] __make_request+0x2ba/0x375
[<
c0531985>] generic_make_request+0x28d/0x30f
[<
c0532da7>] submit_bio+0x8a/0x8f
[<
c04d827a>] submit_bh+0xf0/0x10f
[<
c04d91d2>] ll_rw_block+0xc0/0xf9
[<
f86e9705>] ext3_find_entry+0x319/0x544 [ext3]
[<
f86eae58>] ext3_lookup+0x2c/0xb9 [ext3]
[<
c04c3e1b>] do_lookup+0xd3/0x172
[<
c04c56c8>] link_path_walk+0x5fb/0x95c
[<
c04c5a65>] path_walk+0x3c/0x81
[<
c04c5b63>] do_path_lookup+0x21/0x8a
[<
c04c66cc>] do_filp_open+0xf0/0x978
[<
c04c0c7e>] open_exec+0x1b/0xb7
[<
c04c1436>] do_execve+0xbb/0x266
[<
c04081a9>] sys_execve+0x24/0x4a
[<
c04028a2>] ptregs_execve+0x12/0x18
-> #1 (&(&q->__queue_lock)->rlock){..-.-.}:
[<
c04583b7>] validate_chain+0x8bc/0xb9c
[<
c0458dba>] __lock_acquire+0x723/0x789
[<
c0458eb0>] lock_acquire+0x90/0xa7
[<
c0692b0a>] _raw_spin_lock_irqsave+0x27/0x5a
[<
c053dd2a>] cfq_unlink_blkio_group+0x17/0x41
[<
c053a6eb>] blkiocg_destroy+0x72/0xc7
[<
c0467df0>] cgroup_diput+0x4a/0xb2
[<
c04ca473>] dentry_iput+0x93/0xb7
[<
c04ca4b3>] d_kill+0x1c/0x36
[<
c04cb5c5>] dput+0xf5/0xfe
[<
c04c6084>] do_rmdir+0x95/0xbe
[<
c04c60ec>] sys_rmdir+0x10/0x12
[<
c04027cc>] sysenter_do_call+0x12/0x32
-> #0 (blkio_list_lock){+.+...}:
[<
c0458117>] validate_chain+0x61c/0xb9c
[<
c0458dba>] __lock_acquire+0x723/0x789
[<
c0458eb0>] lock_acquire+0x90/0xa7
[<
c06929fd>] _raw_spin_lock+0x1e/0x4e
[<
c053a990>] blkiocg_weight_write+0x82/0x9e
[<
c0467f1e>] cgroup_file_write+0xc6/0x1c0
[<
c04bd2f3>] vfs_write+0x8c/0x116
[<
c04bd7c6>] sys_write+0x3b/0x60
[<
c04027cc>] sysenter_do_call+0x12/0x32
other info that might help us debug this:
1 lock held by test_io_control/7357:
#0: (&(&blkcg->lock)->rlock){......}, at: [<
c053a949>] blkiocg_weight_write+0x3b/0x9e
stack backtrace:
Pid: 7357, comm: test_io_control Not tainted 2.6.33-rc2 #1
Call Trace:
[<
c045754f>] print_circular_bug+0x91/0x9d
[<
c0458117>] validate_chain+0x61c/0xb9c
[<
c0458dba>] __lock_acquire+0x723/0x789
[<
c0458eb0>] lock_acquire+0x90/0xa7
[<
c053a990>] ? blkiocg_weight_write+0x82/0x9e
[<
c06929fd>] _raw_spin_lock+0x1e/0x4e
[<
c053a990>] ? blkiocg_weight_write+0x82/0x9e
[<
c053a990>] blkiocg_weight_write+0x82/0x9e
[<
c0467f1e>] cgroup_file_write+0xc6/0x1c0
[<
c0454df5>] ? trace_hardirqs_off+0xb/0xd
[<
c044d93a>] ? cpu_clock+0x2e/0x44
[<
c050e6ec>] ? security_file_permission+0xf/0x11
[<
c04bcdda>] ? rw_verify_area+0x8a/0xad
[<
c0467e58>] ? cgroup_file_write+0x0/0x1c0
[<
c04bd2f3>] vfs_write+0x8c/0x116
[<
c04bd7c6>] sys_write+0x3b/0x60
[<
c04027cc>] sysenter_do_call+0x12/0x32
To prevent deadlock, we should take locks as following sequence:
blkio_list_lock -> queue_lock -> blkcg_lock.
The following patch should fix this bug.
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Andreas Schwab [Sat, 30 Jan 2010 10:20:59 +0000 (10:20 +0000)]
powerpc: TIF_ABI_PENDING bit removal
Here are the powerpc bits to remove TIF_ABI_PENDING now that
set_personality() is called at the appropriate place in exec.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michel Dänzer [Fri, 22 Jan 2010 08:20:00 +0000 (09:20 +0100)]
drm/radeon/kms: Fix oops after radeon_cs_parser_init() failure.
If radeon_cs_parser_init() fails, radeon_cs_ioctl() calls
radeon_cs_parser_fini() with the non-zero error value. The latter dereferenced
parser->ib which hasn't been initialized yet -> boom. Add a test for parser->ib
being non-NULL before dereferencing it.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Benjamin Herrenschmidt [Mon, 1 Feb 2010 02:32:41 +0000 (13:32 +1100)]
powerpc/pseries: Fix xics build without CONFIG_SMP
desc->affinity doesn't exit in that case. Let's use a macro for
the UP variant of get_irq_server(), it's the easiest way, avoids
evaluating arguments.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Dave Airlie [Mon, 1 Feb 2010 01:35:47 +0000 (11:35 +1000)]
drm/radeon/kms: move radeon KMS on/off switch out of staging.
We are happy enough that the KMS driver is stable enough for enough people
for the kms enable/disable to leave staging. Distros can now contemplate
turning this on.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jerome Glisse [Fri, 22 Jan 2010 14:19:00 +0000 (15:19 +0100)]
drm/radeon/kms: Bailout of blit if error happen & protect with mutex V3
If an error happen in r600_blit_prepare_copy report it rather
than WARNING and keeping execution. For instance if ib allocation
failed we did just warn about but then latter tried to access
NULL ib ptr causing oops. This patch also protect r600_copy_blit
with a mutex as otherwise one process might overwrite blit temporary
data with new one possibly leading to GPU lockup.
Should partialy or totaly fix:
https://bugzilla.redhat.com/show_bug.cgi?id=553279
V2 failing blit initialization is not fatal, fallback to memcpy when
this happen
V3 init blit before startup as we pin in startup, remove duplicate
code (this one was actualy tested unlike V2)
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jakob Bornecrantz [Sat, 30 Jan 2010 03:38:08 +0000 (03:38 +0000)]
drm/vmwgfx: Don't send bad flags to the host
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Peter Hanzel [Sat, 30 Jan 2010 03:38:07 +0000 (03:38 +0000)]
drm/vmwgfx: Request SVGA version 2 and bail if not found
This fixes the driver not loading on older versions of VMware.
Signed-off-by: Peter Hanzel <hanzelpeter@gmail.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jakob Bornecrantz [Sat, 30 Jan 2010 03:38:06 +0000 (03:38 +0000)]
drm/vmwgfx: Correctly detect 3D
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Austin Yuan [Thu, 21 Jan 2010 05:45:40 +0000 (13:45 +0800)]
drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Marcin Kościelnicki [Sat, 23 Jan 2010 00:25:28 +0000 (10:25 +1000)]
drm/kms: Remove incorrect comment in struct drm_mode_modeinfo
Signed-off-by: Dave Airlie <airlied@redhat.com>
Richard Kennedy [Tue, 26 Jan 2010 17:10:48 +0000 (17:10 +0000)]
drm/ttm: remove padding from ttm_ref_object on 64bit builds
Re-order structure ttm_ref_object to remove 8 bytes of alignment padding
on 64 bit builds, so shrinking its size from 72 to 64 bytes allowing it
to fit into a smaller slab.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 1 Feb 2010 01:22:10 +0000 (11:22 +1000)]
drm/radeon/kms: release agp on error.
if we get an error, release the AGP if we've acquired it already.
Signed-off-by: Dave Airlie <airlied@redhat.com>
John Kacur [Sun, 31 Jan 2010 19:38:03 +0000 (20:38 +0100)]
drm/kms/radeon/agp: Move the check of the aper_size after drm_acp_acquire and drm_agp_info
First call drm_agp_acquire to check if agp has been acquired.
Second call drm_agp_info to fill in the info data struct, including aper_size.
Finally do the check to see if the aper_size makes sense.
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
John Kacur [Sun, 31 Jan 2010 19:38:02 +0000 (20:38 +0100)]
drm/kms/radeon/agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
- Fix warning by using %zu instead of %d for size_t
- Fix spelling mistake, "to" should be "too".
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Francisco Jerez [Tue, 12 Jan 2010 17:49:43 +0000 (18:49 +0100)]
drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching.
Fixes errors like:
> reserve_ram_pages_type failed 0x15b7a000-0x15b7b000, track 0x8, req 0x10
when a BO is moved between WC and UC areas.
Reported-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 28 Jan 2010 07:15:25 +0000 (17:15 +1000)]
drm/kms/radeon: pick digitial encoders smarter. (v3)
booting a Lenovo W500 with LVDS + DP outputs showed up a TODO we had
on our list, to pick a correct digital encoder block. The LVTMA
encoder requires the second digital encoder, all others can use any
encoder at all.
This fixes the digital encoder selection logic to enable LVDS/DP combos
to work okay.
V2: fix silly addition of connector dig_block and cleanup the other
places in the code that pick the encoder.
V3: rename to dig_encoder and clean up further - also fix
the picking algorithm.
tested on Lenovo W500 + desktop 3650 cards.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 29 Jan 2010 05:55:30 +0000 (15:55 +1000)]
drm/radeon/kms: use active device to pick connector for encoder
On the W500 we have UNIPHY routed to both DVI and DP, this seems
to always pick the DVI connector which means link training fails.
Switch to using active device to pick the connector, this seems
like it should be safe from a code review, and it fixes things
a bit more here.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 29 Jan 2010 05:31:47 +0000 (15:31 +1000)]
drm/radeon/kms: fix incorrect logic in DP vs eDP connector checking.
This makes displayport work again here.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Takashi Iwai [Sun, 31 Jan 2010 13:41:05 +0000 (14:41 +0100)]
Merge branch 'fix/asoc' into for-linus
Takashi Iwai [Sun, 31 Jan 2010 13:40:58 +0000 (14:40 +0100)]
Merge branch 'fix/hda' into for-linus
FUJITA Tomonori [Mon, 25 Jan 2010 05:10:47 +0000 (14:10 +0900)]
x86/agp: Fix agp_amd64_init regression
This fixes the regression introduced by commit
42590a75019a50012f25a962246498dead428433 ("x86/agp: Fix
agp_amd64_init and agp_amd64_cleanup").
The above commit changes agp_amd64_init() not to do anything if
gart_iommu_aperture is not zero.
If GART iommu calls agp_amd64_init(), we need to skip
agp_amd64_init() when it's called later via module_init.
The problem is that gart_iommu_init() calls agp_amd64_init()
with not zero gart_iommu_aperture so agp_amd64_init() is never
initialized.
When gart_iommu_init() calls agp_amd64_init(), agp should be
always initialized.
Reported-by: Marin Mitov <mitov@issp.bas.bg>
Reported-by: Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Marin Mitov <mitov@issp.bas.bg>
Tested-by: Kevin Winchester <kjwinchester@gmail.com>
Cc: davej@redhat.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20100125141006O.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Chuck Ebbert [Sat, 30 Jan 2010 19:28:19 +0000 (20:28 +0100)]
block: fix bugs in bio-integrity mempool usage
Fix two bugs in the bio integrity code:
use_bip_pool() always returns 0 because it checks against the wrong limit,
causing the mempool to be used only when regular allocation fails.
When the mempool is used as a fallback we don't free the data properly.
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Jason Wessel [Thu, 28 Jan 2010 23:04:43 +0000 (17:04 -0600)]
perf, hw_breakpoint, kgdb: Do not take mutex for kernel debugger
This patch fixes the regression in functionality where the
kernel debugger and the perf API do not nicely share hw
breakpoint reservations.
The kernel debugger cannot use any mutex_lock() calls because it
can start the kernel running from an invalid context.
A mutex free version of the reservation API needed to get
created for the kernel debugger to safely update hw breakpoint
reservations.
The possibility for a breakpoint reservation to be concurrently
processed at the time that kgdb interrupts the system is
improbable. Should this corner case occur the end user is
warned, and the kernel debugger will prohibit updating the
hardware breakpoint reservations.
Any time the kernel debugger reserves a hardware breakpoint it
will be a system wide reservation.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: kgdb-bugreport@lists.sourceforge.net
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: torvalds@linux-foundation.org
LKML-Reference: <
1264719883-7285-3-git-send-email-jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jason Wessel [Thu, 28 Jan 2010 23:04:42 +0000 (17:04 -0600)]
x86, hw_breakpoints, kgdb: Fix kgdb to use hw_breakpoint API
In the 2.6.33 kernel, the hw_breakpoint API is now used for the
performance event counters. The hw_breakpoint_handler() now
consumes the hw breakpoints that were previously set by kgdb
arch specific code. In order for kgdb to work in conjunction
with this core API change, kgdb must use some of the low level
functions of the hw_breakpoint API to install, uninstall, and
deal with hw breakpoint reservations.
The kgdb core required a change to call kgdb_disable_hw_debug
anytime a slave cpu enters kgdb_wait() in order to keep all the
hw breakpoints in sync as well as to prevent hitting a hw
breakpoint while kgdb is active.
During the architecture specific initialization of kgdb, it will
pre-allocate 4 disabled (struct perf event **) structures. Kgdb
will use these to manage the capabilities for the 4 hw
breakpoint registers, per cpu. Right now the hw_breakpoint API
does not have a way to ask how many breakpoints are available,
on each CPU so it is possible that the install of a breakpoint
might fail when kgdb restores the system to the run state. The
intent of this patch is to first get the basic functionality of
hw breakpoints working and leave it to the person debugging the
kernel to understand what hw breakpoints are in use and what
restrictions have been imposed as a result. Breakpoint
constraints will be dealt with in a future patch.
While atomic, the x86 specific kgdb code will call
arch_uninstall_hw_breakpoint() and arch_install_hw_breakpoint()
to manage the cpu specific hw breakpoints.
The net result of these changes allow kgdb to use the same pool
of hw_breakpoints that are used by the perf event API, but
neither knows about future reservations for the available hw
breakpoint slots.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: kgdb-bugreport@lists.sourceforge.net
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: torvalds@linux-foundation.org
LKML-Reference: <
1264719883-7285-2-git-send-email-jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
David Härdeman [Thu, 28 Jan 2010 20:02:54 +0000 (21:02 +0100)]
x86: Add quirk for Intel DG45FC board to avoid low memory corruption
Commit
6aa542a694dc9ea4344a8a590d2628c33d1b9431 added a quirk for the
Intel DG45ID board due to low memory corruption. The Intel DG45FC
shares the same BIOS (and the same bug) as noted in:
http://bugzilla.kernel.org/show_bug.cgi?id=13736
Signed-off-by: David Härdeman <david@hardeman.nu>
LKML-Reference: <
20100128200254.GA9134@hardeman.nu>
Cc: <stable@kernel.org>
Cc: Alexey Fisher <bug-track@fisher-privat.net>
Cc: ykzhao <yakui.zhao@intel.com>
Cc: Tony Bones <aabonesml@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Linus Torvalds [Fri, 29 Jan 2010 21:57:50 +0000 (13:57 -0800)]
Linux 2.6.33-rc6
Dmitry Artamonow [Sat, 23 Jan 2010 21:20:20 +0000 (00:20 +0300)]
mfd: Fix asic3 build
asic3 also needs tmio_core or otherwise will fail to build.
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Torvalds [Fri, 29 Jan 2010 19:15:32 +0000 (11:15 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: update multi-touch protocol documentation
Input: add the ABS_MT_PRESSURE event
Input: winbond-cir - remove dmesg spam
Input: lifebook - add another Lifebook DMI signature
Input: ad7879 - support auxiliary GPIOs via gpiolib
Hugh Dickins [Fri, 29 Jan 2010 17:46:34 +0000 (17:46 +0000)]
mm: fix migratetype bug which slowed swapping
After memory pressure has forced it to dip into the reserves, 2.6.32's
5f8dcc21211a3d4e3a7a5ca366b469fb88117f61 "page-allocator: split per-cpu
list into one-list-per-migrate-type" has been returning MIGRATE_RESERVE
pages to the MIGRATE_MOVABLE free_list: in some sense depleting reserves.
Fix that in the most straightforward way (which, considering the overheads
of alternative approaches, is Mel's preference): the right migratetype is
already in page_private(page), but free_pcppages_bulk() wasn't using it.
How did this bug show up? As a 20% slowdown in my tmpfs loop kbuild
swapping tests, on PowerMac G5 with SLUB allocator. Bisecting to that
commit was easy, but explaining the magnitude of the slowdown not easy.
The same effect appears, but much less markedly, with SLAB, and even
less markedly on other machines (the PowerMac divides into fewer zones
than x86, I think that may be a factor). We guess that lumpy reclaim
of short-lived high-order pages is implicated in some way, and probably
this bug has been tickling a poor decision somewhere in page reclaim.
But instrumentation hasn't told me much, I've run out of time and
imagination to determine exactly what's going on, and shouldn't hold up
the fix any longer: it's valid, and might even fix other misbehaviours.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 29 Jan 2010 18:27:37 +0000 (10:27 -0800)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: check total number of devices when removing missing
Btrfs: check return value of open_bdev_exclusive properly
Btrfs: do not mark the chunk as readonly if in degraded mode
Btrfs: run orphan cleanup on default fs root
Btrfs: fix a memory leak in btrfs_init_acl
Btrfs: Use correct values when updating inode i_size on fallocate
Btrfs: remove tree_search() in extent_map.c
Btrfs: Add mount -o compress-force
David Miller [Fri, 29 Jan 2010 05:42:02 +0000 (21:42 -0800)]
sparc: TIF_ABI_PENDING bit removal
Here are the sparc bits to remove TIF_ABI_PENDING now that
set_personality() is called at the appropriate place in exec.
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H. Peter Anvin [Fri, 29 Jan 2010 06:14:43 +0000 (22:14 -0800)]
x86: get rid of the insane TIF_ABI_PENDING bit
Now that the previous commit made it possible to do the personality
setting at the point of no return, we do just that for ELF binaries.
And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
away, and we can just make SET_PERSONALITY() just do the obvious thing
for a 32-bit compat process.
Everything becomes much more straightforward this way.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 29 Jan 2010 06:14:42 +0000 (22:14 -0800)]
Split 'flush_old_exec' into two functions
'flush_old_exec()' is the point of no return when doing an execve(), and
it is pretty badly misnamed. It doesn't just flush the old executable
environment, it also starts up the new one.
Which is very inconvenient for things like setting up the new
personality, because we want the new personality to affect the starting
of the new environment, but at the same time we do _not_ want the new
personality to take effect if flushing the old one fails.
As a result, the x86-64 '32-bit' personality is actually done using this
insane "I'm going to change the ABI, but I haven't done it yet" bit
(TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the
personality, but just the "pending" bit, so that "flush_thread()" can do
the actual personality magic.
This patch in no way changes any of that insanity, but it does split the
'flush_old_exec()' function up into a preparatory part that can fail
(still called flush_old_exec()), and a new part that will actually set
up the new exec environment (setup_new_exec()). All callers are changed
to trivially comply with the new world order.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anuj Aggarwal [Fri, 29 Jan 2010 10:19:22 +0000 (15:49 +0530)]
ASoC: AM3517: ASoC driver not getting compiled
Commit
761c9d45 (ASoC: Fix build of OMAP sound drivers) changes
CONFIG_MACH_OMAP3517EVM -> CONFIG_SND_OMAP_SOC_OMAP3517EVM in the
Makefile. Whereas the config option defined in Kconfig is
SND_OMAP_SOC_AM3517EVM. Because of this, ASoC driver for AM3517
was not getting compiled.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Anuj Aggarwal [Fri, 29 Jan 2010 08:28:55 +0000 (13:58 +0530)]
ASoC: AIC23: Fixing writes to non-existing registers in resume function
Commit
e9ff5eb2 (Fixing infinite loop in resume path) uses wrong AIC23
register in resume function because of which register writes happen
on some non-existing registers.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Henrik Rydberg [Fri, 29 Jan 2010 06:28:28 +0000 (22:28 -0800)]
Input: update multi-touch protocol documentation
This patch documents a new ABS_MT parameter and adds further text to
clarify some points around the MT protocol.
Requested-by: Yoonyoung Shim <jy0922.shim@samsung.com>
Requested-by: Mika Kuoppala <mika.kuoppala@nokia.com>
Requested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Henrik Rydberg [Fri, 29 Jan 2010 06:28:27 +0000 (22:28 -0800)]
Input: add the ABS_MT_PRESSURE event
For pressure-based multi-touch devices, a direct way to send sensor
intensity data per finger is needed. This patch adds the ABS_MT_PRESSURE
event to the MT protocol.
Requested-by: Yoonyoung Shim <jy0922.shim@samsung.com>
Requested-by: Mika Kuoppala <mika.kuoppala@nokia.com>
Requested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
David Härdeman [Fri, 29 Jan 2010 06:28:27 +0000 (22:28 -0800)]
Input: winbond-cir - remove dmesg spam
I missed converting one dev_info call to deb_dbg before submitting the driver.
Without this change, a message will be printed to dmesg for each button press
if a RC6 remote is used.
Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: stable <stable@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Benjamin Herrenschmidt [Fri, 29 Jan 2010 05:52:27 +0000 (16:52 +1100)]
Merge commit 'jwb/merge' into merge
Stef van Os [Wed, 20 Jan 2010 03:59:39 +0000 (03:59 +0000)]
powerpc/4xx: Add pcix type 1 transactions
Some of the newer 4xx pci cores need an explicit bit set to send
type 1 transactions instead of just comparing the bus numbers.
This patch enables type 1 transations for pcix nodes, thus enabling
devices behind PCI bridges.
Signed-off-by: Stef van Os <stef.van.os@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Tue, 26 Jan 2010 17:10:05 +0000 (17:10 +0000)]
powerpc/pci: Add missing call to header fixup
Add missing call to pci_fixup_device(pci_fixup_early, ...) when
building the pci_dev from scratch off the Open Firmware device-tree
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Tue, 26 Jan 2010 17:10:05 +0000 (17:10 +0000)]
powerpc/pci: Add missing hookup to pci_slot
Add missing hookup to existing pci_slot when building the pci_dev from
scratch off the Open Firmware device-tree
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Tue, 26 Jan 2010 17:10:03 +0000 (17:10 +0000)]
powerpc/pci: Add calls to set_pcie_port_type() and set_pcie_hotplug_bridge()
We are missing these when building the pci_dev from scratch off
the Open Firmware device-tree
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Linus Torvalds [Fri, 29 Jan 2010 02:48:53 +0000 (18:48 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
Fix failure exit in ipathfs
fix oops in fs/9p late mount failure
fix leak in romfs_fill_super()
get rid of pointless checks after simple_pin_fs()
Fix failure exits in bfs_fill_super()
fix affs parse_options()
Fix remount races with symlink handling in affs
Fix a leak in affs_fill_super()
Linus Torvalds [Fri, 29 Jan 2010 00:33:12 +0000 (16:33 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
x86/PCI: remove IOH range fetching
PCI: fix nested spinlock hang in aer_inject
Linus Torvalds [Thu, 28 Jan 2010 22:34:11 +0000 (14:34 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] Update mach-types
[ARM] orion5x: D-link DNS-323 rev. B1 power-off
[ARM] Orion5x: add GPIO LED and buttons for wrt350n v2
[ARM] pxa: fix irq suspend/resume for pxa25x
[ARM] pxa: fix the incorrect naming of AC97 reset pin config for pxa26x
[ARM] pxa/corgi: fix incorrect default GPIO for UDC Vbus
[ARM] Kirkwood: drive USB VBUS pin on rd88f6192-nas high on boot
[ARM] Orion: fix PCIe inbound window programming when RAM size is not a power of two
Russell King [Thu, 28 Jan 2010 22:15:55 +0000 (22:15 +0000)]
[ARM] Update mach-types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Thu, 28 Jan 2010 21:59:58 +0000 (21:59 +0000)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6
Josef Bacik [Wed, 27 Jan 2010 02:09:38 +0000 (02:09 +0000)]
Btrfs: check total number of devices when removing missing
If you have a disk failure in RAID1 and then add a new disk to the
array, and then try to remove the missing volume, it will fail. The
reason is the sanity check only looks at the total number of rw devices,
which is just 2 because we have 2 good disks and 1 bad one. Instead
check the total number of devices in the array to make sure we can
actually remove the device. Tested this with a failed disk setup and
with this test we can now run
btrfs-vol -r missing /mount/point
and it works fine.
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Josef Bacik [Wed, 27 Jan 2010 02:09:00 +0000 (02:09 +0000)]
Btrfs: check return value of open_bdev_exclusive properly
Hit this problem while testing RAID1 failure stuff. open_bdev_exclusive
returns ERR_PTR(), not NULL. So change the return value properly. This
is important if you accidently specify a device that doesn't exist when
trying to add a new device to an array, you will panic the box
dereferencing bdev.
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Josef Bacik [Wed, 27 Jan 2010 02:07:59 +0000 (02:07 +0000)]
Btrfs: do not mark the chunk as readonly if in degraded mode
If a RAID setup has chunks that span multiple disks, and one of those
disks has failed, btrfs_chunk_readonly will return 1 since one of the
disks in that chunk's stripes is dead and therefore not writeable. So
instead if we are in degraded mode, return 0 so we can go ahead and
allocate stuff. Without this patch all of the block groups in a RAID1
setup will end up read-only, which will mean we can't add new disks to
the array since we won't be able to make allocations.
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Josef Bacik [Tue, 26 Jan 2010 14:30:53 +0000 (14:30 +0000)]
Btrfs: run orphan cleanup on default fs root
This patch revert's commit
6c090a11e1c403b727a6a8eff0b97d5fb9e95cb5
Since it introduces this problem where we can run orphan cleanup on a
volume that can have orphan entries re-added. Instead of my original
fix, Yan Zheng pointed out that we can just revert my original fix and
then run the orphan cleanup in open_ctree after we look up the fs_root.
I have tested this with all the tests that gave me problems and this
patch fixes both problems. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Yang Hongyang [Tue, 26 Jan 2010 00:48:23 +0000 (00:48 +0000)]
Btrfs: fix a memory leak in btrfs_init_acl
In btrfs_init_acl() cloned acl is not released
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Aneesh Kumar K.V [Wed, 20 Jan 2010 07:28:54 +0000 (07:28 +0000)]
Btrfs: Use correct values when updating inode i_size on fallocate
commit
f2bc9dd07e3424c4ec5f3949961fe053d47bc825
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date: Wed Jan 20 12:57:53 2010 +0530
Btrfs: Use correct values when updating inode i_size on fallocate
Even though we allocate more, we should be updating inode i_size
as per the arguments passed
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Miao Xie [Tue, 15 Dec 2009 06:54:17 +0000 (06:54 +0000)]
Btrfs: remove tree_search() in extent_map.c
This patch removes tree_search() in extent_map.c because it is not called by
anything.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason [Thu, 28 Jan 2010 21:18:15 +0000 (16:18 -0500)]
Btrfs: Add mount -o compress-force
The default btrfs mount -o compress mode will quickly back off
compressing a file if it notices that compression does not reduce the
size of the data being written. This can save considerable CPU because
all future writes to the file go through uncompressed.
But some files are both very large and have mixed data stored in
them. In that case, we want to add the ability to always try
compressing data before writing it.
This commit adds mount -o compress-force. A later commit will add
a new inode flag that does the same thing.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Linus Torvalds [Thu, 28 Jan 2010 20:59:43 +0000 (12:59 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: PowerTV: Fix support for timer interrupts with > 64 external IRQs
MIPS: PowerTV: Streamline access to platform device registers
MIPS: Fix vmlinuz build for 32bit-only math shells
MIPS: Add support of LZO-compressed kernels
Linus Torvalds [Thu, 28 Jan 2010 20:57:50 +0000 (12:57 -0800)]
Merge branch 'for-linus' of git://git.infradead.org/ubi-2.6
* 'for-linus' of git://git.infradead.org/ubi-2.6:
UBI: fix volume creation input checking
Linus Torvalds [Thu, 28 Jan 2010 20:56:23 +0000 (12:56 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: ohci: fix crashes with TSB43AB23 on 64bit systems
firewire: core: fix use-after-free regression in FCP handler
firewire: cdev: add_descriptor documentation fix
firewire: core: add_descriptor size check
Jeff Garrett [Thu, 28 Jan 2010 04:02:26 +0000 (22:02 -0600)]
x86/PCI: remove IOH range fetching
Turned out to cause trouble on single IOH machines, and is superceded by
_CRS on multi-IOH machines with production BIOSes.
Signed-off-by: Jeff Garrett <jeff@jgarrett.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Dmitry Monakhov [Wed, 27 Jan 2010 19:44:36 +0000 (22:44 +0300)]
block: fix bio_add_page for non trivial merge_bvec_fn case
We have to properly decrease bi_size in order to merge_bvec_fn return
right result. Otherwise this result in false merge rejects for two
absolutely valid bio_vecs. This may cause significant performance
penalty for example fs_block_size == 1k and block device is raid0 with
small chunk_size = 8k. Then it is impossible to merge 7-th fs-block in
to bio which already has 6 fs-blocks.
Cc: <stable@kernel.org>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Mahesh Salgaonkar [Thu, 21 Jan 2010 12:55:16 +0000 (18:25 +0530)]
hw_breakpoints: Release the bp slot if arch_validate_hwbkpt_settings() fails.
On a given architecture, when hardware breakpoint registration fails
due to un-supported access type (read/write/execute), we lose the bp
slot since register_perf_hw_breakpoint() does not release the bp slot
on failure.
Hence, any subsequent hardware breakpoint registration starts failing
with 'no space left on device' error.
This patch introduces error handling in register_perf_hw_breakpoint()
function and releases bp slot on error.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: K. Prasad <prasad@linux.vnet.ibm.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
LKML-Reference: <
20100121125516.GA32521@in.ibm.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Frederic Weisbecker [Thu, 28 Jan 2010 12:43:50 +0000 (13:43 +0100)]
reiserfs: Fix vmalloc call under reiserfs lock
Vmalloc is called to allocate journal->j_cnode_free_list but
we hold the reiserfs lock at this time, which raises a
{RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} lock inversion.
Just drop the reiserfs lock at this time, as it's not even
needed but kept for paranoid reasons.
This fixes:
[ INFO: inconsistent lock state ]
2.6.33-rc5 #1
---------------------------------
inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
kswapd0/313 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&REISERFS_SB(s)->lock){+.+.?.}, at: [<
c11118c8>]
reiserfs_write_lock_once+0x28/0x50
{RECLAIM_FS-ON-W} state was registered at:
[<
c104ee32>] mark_held_locks+0x62/0x90
[<
c104eefa>] lockdep_trace_alloc+0x9a/0xc0
[<
c108f7b6>] kmem_cache_alloc+0x26/0xf0
[<
c108621c>] __get_vm_area_node+0x6c/0xf0
[<
c108690e>] __vmalloc_node+0x7e/0xa0
[<
c1086aab>] vmalloc+0x2b/0x30
[<
c110e1fb>] journal_init+0x6cb/0xa10
[<
c10f90a2>] reiserfs_fill_super+0x342/0xb80
[<
c1095665>] get_sb_bdev+0x145/0x180
[<
c10f68e1>] get_super_block+0x21/0x30
[<
c1094520>] vfs_kern_mount+0x40/0xd0
[<
c1094609>] do_kern_mount+0x39/0xd0
[<
c10aaa97>] do_mount+0x2c7/0x6d0
[<
c10aaf06>] sys_mount+0x66/0xa0
[<
c16198a7>] mount_block_root+0xc4/0x245
[<
c1619a81>] mount_root+0x59/0x5f
[<
c1619b98>] prepare_namespace+0x111/0x14b
[<
c1619269>] kernel_init+0xcf/0xdb
[<
c100303a>] kernel_thread_helper+0x6/0x1c
irq event stamp:
63236801
hardirqs last enabled at (
63236801): [<
c134e7fa>]
__mutex_unlock_slowpath+0x9a/0x120
hardirqs last disabled at (
63236800): [<
c134e799>]
__mutex_unlock_slowpath+0x39/0x120
softirqs last enabled at (
63218800): [<
c102f451>] __do_softirq+0xc1/0x110
softirqs last disabled at (
63218789): [<
c102f4ed>] do_softirq+0x4d/0x60
other info that might help us debug this:
2 locks held by kswapd0/313:
#0: (shrinker_rwsem){++++..}, at: [<
c1074bb4>] shrink_slab+0x24/0x170
#1: (&type->s_umount_key#19){++++..}, at: [<
c10a2edd>]
shrink_dcache_memory+0xfd/0x1a0
stack backtrace:
Pid: 313, comm: kswapd0 Not tainted 2.6.33-rc5 #1
Call Trace:
[<
c134db2c>] ? printk+0x18/0x1c
[<
c104e7ef>] print_usage_bug+0x15f/0x1a0
[<
c104ebcf>] mark_lock+0x39f/0x5a0
[<
c104d66b>] ? trace_hardirqs_off+0xb/0x10
[<
c1052c50>] ? check_usage_forwards+0x0/0xf0
[<
c1050c24>] __lock_acquire+0x214/0xa70
[<
c10438c5>] ? sched_clock_cpu+0x95/0x110
[<
c10514fa>] lock_acquire+0x7a/0xa0
[<
c11118c8>] ? reiserfs_write_lock_once+0x28/0x50
[<
c134f03f>] mutex_lock_nested+0x5f/0x2b0
[<
c11118c8>] ? reiserfs_write_lock_once+0x28/0x50
[<
c11118c8>] ? reiserfs_write_lock_once+0x28/0x50
[<
c11118c8>] reiserfs_write_lock_once+0x28/0x50
[<
c10f05b0>] reiserfs_delete_inode+0x50/0x140
[<
c10a653f>] ? generic_delete_inode+0x5f/0x150
[<
c10f0560>] ? reiserfs_delete_inode+0x0/0x140
[<
c10a657c>] generic_delete_inode+0x9c/0x150
[<
c10a666d>] generic_drop_inode+0x3d/0x60
[<
c10a5597>] iput+0x47/0x50
[<
c10a2a4f>] dentry_iput+0x6f/0xf0
[<
c10a2af4>] d_kill+0x24/0x50
[<
c10a2d3d>] __shrink_dcache_sb+0x21d/0x2b0
[<
c10a2f0f>] shrink_dcache_memory+0x12f/0x1a0
[<
c1074c9e>] shrink_slab+0x10e/0x170
[<
c1075177>] kswapd+0x477/0x6a0
[<
c1072d10>] ? isolate_pages_global+0x0/0x1b0
[<
c103e160>] ? autoremove_wake_function+0x0/0x40
[<
c1074d00>] ? kswapd+0x0/0x6a0
[<
c103de6c>] kthread+0x6c/0x80
[<
c103de00>] ? kthread+0x0/0x80
[<
c100303a>] kernel_thread_helper+0x6/0x1c
Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Chris Mason <chris.mason@oracle.com>