Corey Minyard [Thu, 7 Dec 2006 04:40:54 +0000 (20:40 -0800)]
[PATCH] IPMI: Fix device model name
Add the product id to the driver model platform device name, in addition to
the device id. The IPMI spec does not require that individual BMCs in a
system have unique devices IDs, but it does require that the product id/device
id combination be unique.
This also removes a redundant check and cleans up error handling
when the sysfs registration fails.
Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Carol Hebert <cah@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Thu, 7 Dec 2006 04:40:51 +0000 (20:40 -0800)]
[PATCH] add ignore_loglevel boot option
Sometimes the kernel prints something interesting while userspace bootup
keeps messages turned off via loglevel. Enable the printing of /all/
kernel messages via the "ignore_loglevel" boot option. Off by default.
Ingo Molnar [Thu, 7 Dec 2006 04:40:50 +0000 (20:40 -0800)]
[PATCH] lockdep: register_lock_class() fix
The hash_lock must only ever be taken with irqs disabled. This happens in
all the important places, except one codepath: register_lock_class(). The
race should trigger rarely because register_lock_class() is quite rare and
single-threaded (happens during init most of the time).
The fix is to disable irqs.
( bug found live in -rt: there preemption is alot more agressive and
preempting with the hash-lock held caused a lockup.)
Johann Lombardi [Thu, 7 Dec 2006 04:40:46 +0000 (20:40 -0800)]
[PATCH] ext4: fix credit calculation in ext4_ext_calc_credits_for_insert
Fix a nit in ext4_ext_calc_credits_for_insert(). Besides, credits for the
new root are already added in the index split accounting.
Signed-off-by: Johann Lombardi <johann.lombardi@bull.net> Signed-off-by: Alex Tomas <alex@clusterfs.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Remove the ki_retried member from struct kiocb. I think the idea was
bounced around a while back, but Arnaldo pointed out another reason that we
should dig it up when he pointed out that the last cacheline of struct
kiocb only contains 4 bytes. By removing the debugging member, we save
more than the 8 byte on 64 bit machines.
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Acked-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chen, Kenneth W [Thu, 7 Dec 2006 04:40:43 +0000 (20:40 -0800)]
[PATCH] aio: kill pointless ki_nbytes assignment in aio_setup_single_vector
io_submit_one assigns ki_left = ki_nbytes = iocb->aio_nbytes, then calls
down to aio_setup_iocb, then to aio_setup_single_vector. In there,
ki_nbytes is reassigned to the same value it got two call stack above it.
There is no need to do so.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Zach Brown <zach.brown@oracle.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Magnus Damm [Thu, 7 Dec 2006 04:40:41 +0000 (20:40 -0800)]
[PATCH] Kexec / Kdump: Unify elf note code
The elf note saving code is currently duplicated over several
architectures. This cleanup patch simply adds code to a common file and
then replaces the arch-specific code with calls to the newly added code.
The only drawback with this approach is that s390 doesn't fully support
kexec-on-panic which for that arch leads to introduction of unused code.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: Andi Kleen <ak@suse.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexey Dobriyan [Thu, 7 Dec 2006 04:40:39 +0000 (20:40 -0800)]
[PATCH] do_coredump() and not stopping rewrite attacks?
On Sat, Dec 02, 2006 at 11:47:44PM +0300, Alexey Dobriyan wrote:
> David Binderman compiled 2.6.19 with icc and grepped for "was set but never
> used". Many warnings are on
> http://coderock.org/kj/unused-2.6.19-fs
Heh, the very first line:
fs/exec.c(1465): remark #593: variable "flag" was set but never used
fs/exec.c:
1477 /*
1478 * We cannot trust fsuid as being the "true" uid of the
1479 * process nor do we know its entire history. We only know it
1480 * was tainted so we dump it as root in mode 2.
1481 */
1482 if (mm->dumpable == 2) { /* Setuid core dump mode */
1483 flag = O_EXCL; /* Stop rewrite attacks */
1484 current->fsuid = 0; /* Dump root private */
1485 }
And then filp_open follows with "flag" totally ignored.
(akpm: this restores the code to Alan's original version. Andi's "Support
piping into commands in /proc/sys/kernel/core_pattern" (cset d025c9db) broke
it).
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: <stable@kerenl.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Thu, 7 Dec 2006 04:40:38 +0000 (20:40 -0800)]
[PATCH] cleanup asm/setup.h userspace visibility
Make the contents of the userspace asm/setup.h header consistent on all
architectures:
- export setup.h to userspace on all architectures
- export only COMMAND_LINE_SIZE to userspace
- frv: move COMMAND_LINE_SIZE from param.h
- i386: remove duplicate COMMAND_LINE_SIZE from param.h
- arm:
- export ATAGs to userspace
- change u8/u16/u32 to __u8/__u16/__u32
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jun Chen [Thu, 7 Dec 2006 04:40:37 +0000 (20:40 -0800)]
[PATCH] fs: make nls_cp936.c handle some U00XY characters and U20AC correctly
Twenty characters in cp936 are not correctly handled. They're all in the
U00 plane. nls_cp936 converts all U00XY to XY but this is not correct for
some characters.(e.g. U00B7 -> A1A4, U00A8 -> A1A7).
This problem is fixed by generating u2c_00 based on all c2u_xx and changing
uni2char() to give U00 plane a special handling. The "â\82¬"(U20AC,80 in
cp936) is also be handled properly.
Acked-by: Gang Chen <cgdlut@gmail.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ralf Baechle [Thu, 7 Dec 2006 04:40:26 +0000 (20:40 -0800)]
[PATCH] futex: remove unneeded barrier
When disassembling a kernel I found around over 90 sync Instructions from
mb, rmb and wmb calls in the kernel and only few of those make any sense to
me. So here's the first one - I think the wmb() in kernel/futex.c is not
needed on uniprocessors so should become an smb_wmb().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Fulghum [Thu, 7 Dec 2006 04:40:24 +0000 (20:40 -0800)]
[PATCH] generic HDLC synclink config mismatch fix
Fix compile errors on mismatch between generic HDLC and synclink drivers.
Notes:
generic HDLC support for synclink drivers is *optional* so you can't just
use depend on in Kconfig
This solution is deemed the best after 7 months of review and criticism by
many developers including AKPM. Read the threads on LKML before posting
about this solution.
Signed-off-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Thu, 7 Dec 2006 04:40:23 +0000 (20:40 -0800)]
[PATCH] remove NFSD_OPTIMIZE_SPACE
This patch removes the unused NFSD_OPTIMIZE_SPACE.
Additionally, it does differently what NFSD_OPTIMIZE_SPACE was supposed to do:
Nowadays, gcc knows best when to inline code, and CONFIG_CC_OPTIMIZE_FOR_SIZE
even tells gcc globally whether to optimize for size or for speed. Therefore,
this patch also removes all inline's from these files.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
"extern inline" generates a warning with -Wmissing-prototypes and I'm
currently working on getting the kernel cleaned up for adding this to the
CFLAGS since it will help us to avoid a nasty class of runtime errors.
If there are places that really need a forced inline, __always_inline would be
the correct solution.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
"extern inline" generates a warning with -Wmissing-prototypes and I'm
currently working on getting the kernel cleaned up for adding this to the
CFLAGS since it will help us to avoid a nasty class of runtime errors.
If there are places that really need a forced inline, __always_inline would be
the correct solution.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Josh Triplett [Thu, 7 Dec 2006 04:40:19 +0000 (20:40 -0800)]
[PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture
The SRCU wrapper functions srcu_torture_read_lock and
srcu_torture_read_unlock in rcutorture intentionally change the SRCU
context; annotate them accordingly, to avoid a warning.
Signed-off-by: Josh Triplett <josh@freedesktop.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kbuild: add 3 more header files to get properly "unifdef"ed
Add 3 more files to get "unifdef"ed when creating sanitized headers with
"make headers_install".
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: David Woodhouse <dwmw2@infradead.org> Acked-by: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jordan Crouse [Thu, 7 Dec 2006 04:40:07 +0000 (20:40 -0800)]
[PATCH] Trivial cleanup in the PCI IDs for the CS5535
Rename a poorly worded PCI ID for the Geode GX and CS5535 companion chips.
The graphics processor and host bridge actually live in the northbridge on
the integrated processor, not in the companion chip.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Thu, 7 Dec 2006 04:40:03 +0000 (20:40 -0800)]
[PATCH] proper prototype for remove_inode_dquot_ref()
Add a proper prototype for remove_inode_dquot_ref() in
include/linux/quotaops.h
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Thu, 7 Dec 2006 04:39:59 +0000 (20:39 -0800)]
[PATCH] gcc-4.1.0 is bust
Keith says
Compiling 2.6.19-rc6 with gcc version 4.1.0 (SUSE Linux), wait_hpet_tick is
optimized away to a never ending loop and the kernel hangs on boot in timer
setup.
The pl010 primecell documentation specifies that an error indicated via RSR
should be cleared by a write to ECR. We didn't do this, which was causing
errors to be re-reported on every call to pl010_rx_chars().
Doing a write to ECR once we detect an error appears to prevent the ep93xx
console UART driver from going into a mode where it reports "ttyAM0: X
input overrun(s)" every couple of keystrokes.
Olaf Hering [Thu, 7 Dec 2006 04:39:55 +0000 (20:39 -0800)]
[PATCH] winbond IDE depends on IDEDMA
winbond ide depends on idedma.
Move the option into the IDEDMA section.
drivers/built-in.o: In function `.sl82c105_ide_dma_timeout':
sl82c105.c:(.text+0x624d0): undefined reference to `.__ide_dma_timeout'
drivers/built-in.o: In function `.sl82c105_ide_dma_off_quietly':
sl82c105.c:(.text+0x6274c): undefined reference to `.__ide_dma_off_quietly'
drivers/built-in.o: In function `.sl82c105_ide_dma_on':
sl82c105.c:(.text+0x6284c): undefined reference to `.__ide_dma_on'
drivers/built-in.o: In function `.sl82c105_check_drive':
sl82c105.c:(.text+0x628ec): undefined reference to `.__ide_dma_bad_drive'
sl82c105.c:(.text+0x62934): undefined reference to `.__ide_dma_good_drive'
drivers/built-in.o: In function `.sl82c105_ide_dma_start':
sl82c105.c:(.text+0x62c24): undefined reference to `.ide_dma_start'
make[1]: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: "Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The real time clocks ds1742 and ds1743 differs only in the size of the
nvram. This patch changes the existing ds1742 driver to support also
ds1743. The main change is that the nvram size is determined from the
resource attached to the device.
The patch have benefitted from suggestions from Atsushi Nemeto, who is the
author of the ds1742 driver.
Zachary Amsden [Thu, 7 Dec 2006 04:39:39 +0000 (20:39 -0800)]
[PATCH] softirq: remove BUG_ONs which can incorrectly trigger
It is possible to have tasklets get scheduled before softirqd has had a chance
to spawn on all CPUs. This is totally harmless; after success during action
CPU_UP_PREPARE, action CPU_ONLINE will be called, which immediately wakes
softirqd on the appropriate CPU to process the already pending tasklets. So
there is no danger of having a missed wakeup for any tasklets that were
already pending.
In particular, i386 is affected by this during startup, and is visible when
using a very large initrd; during the time it takes for the initrd to be
decompressed, a timer IRQ can come in and schedule RCU callbacks. It is also
possible that resending of a hardware IRQ via a softirq triggers the same bug.
Because of different timing conditions, this shows up in all emulators and
virtual machines tested, including Xen, VMware, Virtual PC, and Qemu. It is
also possible to trigger on native hardware with a large enough initrd,
although I don't have a reliable case demonstrating that.
Jiri Kosina [Thu, 7 Dec 2006 04:39:38 +0000 (20:39 -0800)]
[PATCH] autofs: fix error code path in autofs_fill_sb()
When kernel is compiled with old version of autofs (CONFIG_AUTOFS_FS), and
new (observed at least with 5.x.x) automount deamon is started, kernel
correctly reports incompatible version of kernel and userland daemon, but
then screws things up instead of correct handling of the error:
autofs: kernel does not match daemon version
=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
automount/4199 is trying to release lock (&type->s_umount_key) at:
[<c0163b9e>] get_sb_nodev+0x76/0xa4
but there are no more locks to release!
other info that might help us debug this:
no locks held by automount/4199.
The problem: autofs_fill_super() returns EINVAL to get_sb_nodev(), but
before that, it calls kill_anon_super() to destroy the superblock which
won't be needed. This is however way too soon to call kill_anon_super(),
because get_sb_nodev() has to perform its own cleanup of the superblock
first (deactivate_super(), etc.). The correct time to call
kill_anon_super() is in the autofs_kill_sb() callback, which is called by
deactivate_super() at proper time, when the superblock is ready to be
killed.
I can see the same faulty codepath also in autofs4. This patch solves
issues in both filesystems in a same way - it postpones the
kill_anon_super() until the proper time is signalized by deactivate_super()
calling the kill_sb() callback.
[raven@themaw.net: update comment] Signed-off-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Ian Kent <raven@themaw.net> Cc: <stable@kernel.org> Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Galbraith [Thu, 7 Dec 2006 04:39:35 +0000 (20:39 -0800)]
[PATCH] make 8250_pnp serial driver work after suspend to ram
Add suspend/resume methods to drivers/serial/8250_pnp.c. Tested on a
P4/HT 16550A box, ttyS0 login survives across suspend to ram.
[akpm@osdl.org: cleanups] Signed-off-by: Mike Galbraith <efault@gmx.de> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Thu, 7 Dec 2006 04:39:33 +0000 (20:39 -0800)]
[PATCH] ide_scsi: allow it to be used for non CD only
Some people want to use ide_cd for CD-ROM but still dynamically load
ide-scsi for things like tape drives. If you compile in the CD driver this
works out but if you want them modular you need an option to ensure that
whoever loads first the right things happen.
This replaces the original draft patch which leaked a scsi host reference
Hugh Dickins [Thu, 7 Dec 2006 04:39:26 +0000 (20:39 -0800)]
[PATCH] ext4 balloc: fix _with_rsv freeze
Port fix to the off-by-one in find_next_usable_block's memscan from ext2 to
ext4; but it didn't cause a serious problem for ext4 because the additional
ext4_test_allocatable check rescued it from the error.
Hugh Dickins [Thu, 7 Dec 2006 04:39:18 +0000 (20:39 -0800)]
[PATCH] ext4 balloc: reset windowsz when full
ext4_new_blocks should reset the reservation window size to 0 when squeezing
the last blocks out of an almost full filesystem, so the retry doesn't skip
any groups with less than half that free, reporting ENOSPC too soon.
Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hisashi Hifumi [Thu, 7 Dec 2006 04:39:17 +0000 (20:39 -0800)]
[PATCH] jbd2: wait for already submitted t_sync_datalist buffer to complete
In the current jbd code, if a buffer on BJ_SyncData list is dirty and not
locked, the buffer is refiled to BJ_Locked list, submitted to the IO and
waited for IO completion.
But the fsstress test showed the case that when a buffer was already
submitted to the IO just before the buffer_dirty(bh) check, the buffer was
not waited for IO completion.
Following patch solves this problem. If it is assumed that a buffer is
submitted to the IO before the buffer_dirty(bh) check and still being
written to disk, this buffer is refiled to BJ_Locked list.
Signed-off-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp> Cc: Jan Kara <jack@ucw.cz> Cc: "Stephen C. Tweedie" <sct@redhat.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Remove the carta_random32.h header file. The carta_random32() function was
was put in and removed in favor of random32(). In the removal process, the
header file was forgotten.
According to the datasheet rs5c372 supports three different methods for
reading register values. Change from method #1 to method #3, since method #3
is the only one that works on Thecus N2100 board with this RTC.
[PATCH] reiserfs: do not add save links for O_DIRECT writes
We add a save link for O_DIRECT writes to protect the i_size against the
crashes before we actually finish the I/O. If we hit an -ENOSPC in
aops->prepare_write(), we would do a truncate() to release the blocks which
might have got initialized. Now the truncate would add another save link
for the same inode causing a reiserfs panic for having multiple save links
for the same inode.
Signed-off-by: Vladimir V. Saveliev <vs@namesys.com> Signed-off-by: Amit Arora <amitarora@in.ibm.com> Signed-off-by: Suzuki K P <suzuki@in.ibm.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Chris Mason <mason@suse.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
BP, Praveen [Thu, 7 Dec 2006 04:39:09 +0000 (20:39 -0800)]
[PATCH] sysctl: string length calculated is wrong if it contains negative numbers
In the functions do_proc_dointvec() and do_proc_doulongvec_minmax(),
there seems to be a bug in string length calculation if string contains
negative integer.
The console log given below explains the bug. Setting negative values
may not be a right thing to do for "console log level" but then the test
(given below) can be used to demonstrate the bug in the code.
This a set of fixes mostly to make the driver actually work:
1. Actually select the line for setting parameters and receiver
disable/enable.
2. Select the line for receive and transmit interrupt handling correctly.
3. Report the transmitter empty state correctly.
4. Set the I/O type of ports correctly.
5. Perform polled transmission correctly.
6. Don't fix the console line at ttyS3.
7. Magic SysRq support.
8. Various small bits here and there.
Tested with a DECstation 2100 (thanks Flo for making this possible).
[akpm@osdl.org: fix typo] Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ralf Baechle [Thu, 7 Dec 2006 04:38:56 +0000 (20:38 -0800)]
[PATCH] Pass struct dev pointer to dma_cache_sync()
Pass struct dev pointer to dma_cache_sync()
dma_cache_sync() is ill-designed in that it does not have a struct device
pointer argument which makes proper support for systems that consist of a
mix of coherent and non-coherent DMA devices hard. Change dma_cache_sync
to take a struct device pointer as first argument and fix all its callers
to pass it.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ralf Baechle [Thu, 7 Dec 2006 04:38:54 +0000 (20:38 -0800)]
[PATCH] Add struct dev pointer to dma_is_consistent()
dma_is_consistent() is ill-designed in that it does not have a struct
device pointer argument which makes proper support for systems that consist
of a mix of coherent and non-coherent DMA devices hard. Change
dma_is_consistent to take a struct device pointer as first argument and fix
the sole caller to pass it.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Dumazet [Thu, 7 Dec 2006 04:38:53 +0000 (20:38 -0800)]
[PATCH] fs: reorder some 'struct inode' fields to speedup i_size manipulations
On 32bits SMP platforms, 64bits i_size is protected by a seqcount
(i_size_seqcount).
When i_size is read or written, i_size_seqcount is read/written as well, so
it make sense to group these two fields together in the same cache line.
This patch moves i_size_seqcount next to i_size, and also moves i_version
to let offsetof(struct inode, i_size) being 0x40 instead of 0x3c (for
32bits platforms).
For 64 bits platforms, i_size_seqcount doesnt exist, and the move of a
'long i_version' should not introduce a new hole because of padding.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Dumazet [Thu, 7 Dec 2006 04:38:49 +0000 (20:38 -0800)]
[PATCH] net: don't insert socket dentries into dentry_hashtable
We currently insert socket dentries into the global dentry hashtable. This
is suboptimal because there is currently no way these entries can be used
for a lookup(). (/proc/xxx/fd/xxx uses a different mechanism). Inserting
them in dentry hashtable slows dcache lookups.
To let __dpath() still work correctly (ie not adding a " (deleted)") after
dentry name, we do :
- Right after d_alloc(), pretend they are hashed by clearing the
DCACHE_UNHASHED bit.
- Call d_instantiate() instead of d_add() : dentry is not inserted in
hash table.
__dpath() & friends work as intended during dentry lifetime.
- At dismantle time, once dput() must clear the dentry, setting again
DCACHE_UNHASHED bit inside the custom d_delete() function provided by
socket code, so that dput() can just kill_it.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Acked-by: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Dumazet [Thu, 7 Dec 2006 04:38:48 +0000 (20:38 -0800)]
[PATCH] dcache: avoid RCU for never-hashed dentries
Some dentries don't need to be globally visible in dentry hashtable.
(pipes & sockets)
Such dentries dont need to wait for a RCU grace period at delete time.
Being able to free them permits a better CPU cache use (hot cache)
This patch combined with (dont insert pipe dentries into dentry_hashtable)
reduced time of { pipe(p); close(p[0]); close(p[1]);} on my UP machine (1.6
GHz Pentium-M) from 3.23 us to 2.86 us (But this patch does not depend on
other patches, only bench results)
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Maneesh Soni <maneesh@in.ibm.com> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Cc: Dipankar Sarma <dipankar@in.ibm.com> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Dumazet [Thu, 7 Dec 2006 04:38:45 +0000 (20:38 -0800)]
[PATCH] don't insert pipe dentries into dentry_hashtable.
We currently insert pipe dentries into the global dentry hashtable. This
is suboptimal because there is currently no way these entries can be used
for a lookup(). (/proc/xxx/fd/xxx uses a different mechanism). Inserting
them in dentry hashtable slows dcache lookups.
To let __dpath() still work correctly (ie not adding a " (deleted)") after
dentry name, we do :
- Right after d_alloc(), pretend they are hashed by clearing the
DCACHE_UNHASHED bit.
- Call d_instantiate() instead of d_add() : dentry is not inserted in
hash table.
__dpath() & friends work as intended during dentry lifetime.
- At dismantle time, once dput() must clear the dentry, setting again
DCACHE_UNHASHED bit inside the custom d_delete() function provided by
pipe code, so that dput() can just kill_it.
This patch, combined with (avoid RCU for never hashed dentries) reduced
time of { pipe(p); close(p[0]); close(p[1]);} on my UP machine (1.6GHz
Pentium-M) from 3.23 us to 2.86 us (But this patch does not depend on other
patches, only bench results)
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Dumazet [Thu, 7 Dec 2006 04:38:44 +0000 (20:38 -0800)]
[PATCH] rcu: add a prefetch() in rcu_do_batch()
On some workloads, (for example when lot of close() syscalls are done), RCU
qlen can be quite large, and RCU heads are no longer in cpu cache when
rcu_do_batch() is called.
This patch adds a prefetch() in rcu_do_batch() to give CPU a hint to bring
back cache lines containing 'struct rcu_head's.
Most list manipulations macros include prefetch(), but not open coded ones
(at least with current C compilers :) )
I got a nice speedup on a trivial benchmark (3.48 us per iteration instead
of 3.95 us on a 1.6 GHz Pentium-M)
while (1) { pipe(p); close(fd[0]); close(fd[1]);}
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Thu, 7 Dec 2006 04:38:40 +0000 (20:38 -0800)]
[PATCH] CISS: require same SCSI module support
Building CCISS SCSI tape support in-kernel when SCSI=m causes build errors,
so require SCSI support to be =y or same as CCISS SCSI tape support.
drivers/built-in.o: In function `cciss_remove_one':
cciss.c:(.text+0x79d4c): undefined reference to `scsi_remove_host'
cciss.c:(.text+0x79d55): undefined reference to `scsi_host_put'
drivers/built-in.o: In function `cciss_update_non_disk_devices':
cciss.c:(.text+0x7bb54): undefined reference to `scsi_device_type'
cciss.c:(.text+0x7bcc8): undefined reference to `scsi_device_type'
cciss.c:(.text+0x7be81): undefined reference to `scsi_device_type'
cciss.c:(.text+0x7bf81): undefined reference to `scsi_device_type'
drivers/built-in.o: In function `cciss_proc_write':
cciss.c:(.text+0x7c175): undefined reference to `scsi_host_alloc'
cciss.c:(.text+0x7c1ed): undefined reference to `scsi_add_host'
cciss.c:(.text+0x7c1f9): undefined reference to `scsi_scan_host'
cciss.c:(.text+0x7c206): undefined reference to `scsi_host_put'
make: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Brownell [Thu, 7 Dec 2006 04:38:36 +0000 (20:38 -0800)]
[PATCH] add rtc-omap driver
This creates a new RTC-framework driver for the RTC/calendar module found
in various OMAP1 chips. (OMAP2 and OMAP3 use external RTCs, like those in
TI's multifunction PM companion chips.) It's been in the Linux-OMAP tree
for several months now, and other trees before that, so it's quite stable.
The most notable issue is that the OMAP IRQ code doesn't yet support the
RTC IRQ as a wakeup event. Once that's fixed, a patch will be needed.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Thu, 7 Dec 2006 04:38:35 +0000 (20:38 -0800)]
[PATCH] agp-amd64: section mismatches with HOTPLUG=n
When CONFIG_HOTPLUG=n, agp_amd64_resume() calls nforce3_agp_init(), which is
__devinit == __init, so has been discarded and is not usable for resume.
WARNING: drivers/char/agp/amd64-agp.o - Section mismatch: reference to .init.text: from .text between 'agp_amd64_resume' (at offset 0x249) and 'amd64_tlbflush'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Thu, 7 Dec 2006 04:38:33 +0000 (20:38 -0800)]
[PATCH] parport: section mismatches with HOTPLUG=n
When CONFIG_HOTPLUG=n, parport_pc calls some __devinit == __init code that
could be discarded. These calls are made from parport_irq_probe(), which is
called from parport_pc_probe_port(), which is an exported symbol, so the calls
could (possibly) happen after init time.
WARNING: drivers/parport/parport_pc.o - Section mismatch: reference to .init.text: from .text between 'parport_irq_probe' (at offset 0x31d) and 'parport_pc_probe_port'
WARNING: drivers/parport/parport_pc.o - Section mismatch: reference to .init.text: from .text between 'parport_irq_probe' (at offset 0x346) and 'parport_pc_probe_port'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Thu, 7 Dec 2006 04:38:31 +0000 (20:38 -0800)]
[PATCH] make fs/proc/base.c:proc_pid_instantiate() static
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>