Andrew Morton [Sat, 15 May 2004 03:21:16 +0000 (20:21 -0700)]
[PATCH] Update laptop mode control script with XFS_HZ=100
From: Bart Samwel <bart@samwel.tk>
The laptop mode control script incorrectly guesses XFS_HZ=1000. This is
incorrect, since the patches that made XFS use USER_HZ went into 2.6.6 as
well. This changes XFS_HZ to 100 and removes the warning from the doc about
checking XFS_HZ.
Andrew Morton [Sat, 15 May 2004 03:20:24 +0000 (20:20 -0700)]
[PATCH] ib700wdt watchdog driver fix #2
From: Patrice Bouchand <PBouchand@cyberdeck.com>
The value written in the WDT_STOP register is not important. As soon as
something is written, the watchdog timer stops. But things will be cleaner
if we use the following patch.
Andrew Morton [Sat, 15 May 2004 03:20:03 +0000 (20:20 -0700)]
[PATCH] expose backing dev max read-ahead
From: Jens Axboe <axboe@suse.de>
Expose the blockdev's VM readahead in /sys/block/hda/queue/read_ahead_kbytes
This duplicates `blockdev --setra', but we're trying to get away from
ioctls.
It would be nice to have a readahead-setting mechanism which also allows,
say, NFS to be tuned. But there is no common exposure point for
backing_dev_infos. One option might be per-superblock:
mount -o remount,read_ahead_kbytes=64
but the generic remount code also has no visibility of the backing_dev, so it
would need a new super_block operation. One which doesn't accidentally modify
default_backing_dev_info.
Andrew Morton [Sat, 15 May 2004 03:19:52 +0000 (20:19 -0700)]
[PATCH] efivars: check that it's enabled
From: "Randy.Dunlap" <rddunlap@osdl.org>
EFI-enabled kernels crash on non-EFI machines. efivars_init() and
efivars_exit() need to check efi_enabled instead of assuming that the
system is using EFI.
Andrew Morton [Sat, 15 May 2004 03:19:35 +0000 (20:19 -0700)]
[PATCH] make buildcheck
From: Arjan van de Ven <arjanv@redhat.com>
the patch below adds a "make buildcheck" target which checks for the "uses
exit in init" bug using Keith Owen's script. In the future other similar
sanity checks can be added to this target, but even just this one has been
quite useful already. I use it in the kernel rpm build process for
example, and I'm sure the OSDL build testers can/want to use it too.
From: Keith Owens <kaos@ocs.com.au>
They commented out the progress print statements, I prefer to have them
present but no big deal. The licence is missing.
Andrew Morton [Sat, 15 May 2004 03:19:25 +0000 (20:19 -0700)]
[PATCH] Include Aliases in kallsyms
From: Rusty Russell <rusty@rustcorp.com.au>
Kallsyms discards symbols with the same address, but these are sometimes
useful. Skip this minor optimization and make kallsyms_lookup deal with
aliases
Andrew Morton [Sat, 15 May 2004 03:19:11 +0000 (20:19 -0700)]
[PATCH] show last kernel-image symbol in /proc/kallsyms
From: Rusty Russell <rusty@rustcorp.com.au>
The current code doesn't show the last symbol (usually _einittext) in
/proc/kallsyms. The reason for this is subtle: s_start() returns an empty
string for position 0 (ignored by s_show()), and s_next() returns the first
symbol for position 1.
What should happen is that update_iter() for position 0 should fill in the
first symbol. Unfortunately, the get_ksymbol_core() fills in the symbol
information, *and* updates the iterator: we have to split these functions,
which we do by making it return the length of the name offset.
Then we can call get_ksymbol_core() without moving the iterator, meaning
that we can call it at position 0 (ie. s_start()).
Andrew Morton [Sat, 15 May 2004 03:18:39 +0000 (20:18 -0700)]
[PATCH] Fix i2o_proc kernel panic on access of /proc/i2o/iop0/lct
From: Markus Lidel <Markus.Lidel@shadowconnect.com>
The patch converts i2o_proc to seq_file, thereby fixing a bug in the
i2o_proc.c module, where the kernel panics, if you access /proc/i2o/iop0/lct
and read more then 1024 bytes of it.
Andrew Morton [Sat, 15 May 2004 03:17:56 +0000 (20:17 -0700)]
[PATCH] fbdev: Vesa Fbdev update fix
From: Geert Uytterhoeven <geert@linux-m68k.org>
On Sun, 25 Apr 2004, James Simmons wrote:
> This patch migrates the Vesa Framebuffer driver over to the
> framebuffer_alloc/framebuffer_release api. It also fixes the error
> handling paths. The mtrr issue that Geert brought up has been fixed.
> With your approval Geert, Ben please apply this patch.
> + /* Set video size according to vram boot option */
> + if (vram && vram * 1024 * 1024 != vesafb_fix.smem_len)
> + vesafb_fix.smem_len = vram * 1024 * 1024;
The second part of the test can be removed. The rest looks OK to me.
Andrew Morton [Sat, 15 May 2004 03:17:45 +0000 (20:17 -0700)]
[PATCH] fbdev: Vesa Fbdev update
From: James Simmons <jsimmons@infradead.org>
This patch migrates the Vesa Framebuffer driver over to the
framebuffer_alloc/framebuffer_release api. It also fixes the error
handling paths. The mtrr issue that Geert brought up has been fixed.
Andrew Morton [Sat, 15 May 2004 03:17:34 +0000 (20:17 -0700)]
[PATCH] fbdev: Virtual fbdev updates
From: James Simmons <jsimmons@infradead.org>
This is attempt 2 at the virtual framebuffer patch. It migrates the driver
to the framebuffer_release/framebuffer_alloc api. It doesn't enable the
driver by default.
Andrew Morton [Sat, 15 May 2004 03:17:12 +0000 (20:17 -0700)]
[PATCH] fbdev: set a default access_align value
From: James Simmons <jsimmons@infradead.org>
Set the default access_align variable. This variable tells us how much data
the hardware can handle in a single read/write cycle. For example the epson
chipset can handle only 16 bit reads and writes to the framebuffer.
Andrew Morton [Sat, 15 May 2004 03:16:30 +0000 (20:16 -0700)]
[PATCH] fbdev: video/imsttfb.c warning fix
From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
drivers/video/imsttfb.c:1089: warning: `imsttfb_load_cursor_image' defined but not used
drivers/video/imsttfb.c:1159: warning: `imstt_set_cursor' defined but not used
Andrew Morton [Sat, 15 May 2004 03:16:20 +0000 (20:16 -0700)]
[PATCH] fbdev: video/tdfxfb.c warning fix
From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
Fix this:
drivers/video/tdfxfb.c:1005: warning: `tdfxfb_cursor' defined but not used
and make the acceleration function selectable (like hgafb and tridentfb)
Geert says:
tdfxfb_cursor() was not used before, causing a compiler warning.
tdfxfb_cursor() may work, but we don't know, so we didn't dare to enable it
by default. Now the user (he who has the hardware) can enable it, and tell
us whether it works or not.
Andrew Morton [Sat, 15 May 2004 03:16:09 +0000 (20:16 -0700)]
[PATCH] fbdev: video/hgafb.c warning fix
From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
Make HGA acceleration functions selectable in kernel config, fix these
warnings:
drivers/video/hgafb.c:452: warning: `hgafb_fillrect' defined but not used
drivers/video/hgafb.c:472: warning: `hgafb_copyarea' defined but not used
drivers/video/hgafb.c:502: warning: `hgafb_imageblit' defined but not used
Andrew Morton [Sat, 15 May 2004 03:15:59 +0000 (20:15 -0700)]
[PATCH] fbdev: video/tridentfb.c warning fix
From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
Speaking with frame buffer people, we agree with this patch to fix the
warning:
drivers/video/tridentfb.c:455: warning: `tridentfb_fillrect' defined but not used
drivers/video/tridentfb.c:473: warning: `tridentfb_copyarea' defined but not used
Andrew Morton [Sat, 15 May 2004 03:15:37 +0000 (20:15 -0700)]
[PATCH] fbdev: radeonfb: fix garbled screen
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> My screen is still a bit garbeld after booting.
> Still like http://zodiac.dnsalias.org/images/garbage.jpg
Yes, usual boot-time x86 garbage. Well, let's imagine it's as simple
as clearing the framebuffer during boot :) Try this patch and let me
know. If that doesn't help, then the problem is definitely in fbcon.
Andrew Morton [Sat, 15 May 2004 03:15:15 +0000 (20:15 -0700)]
[PATCH] autofs4 race fix
From: Ian Kent <raven@themaw.net>
The case where two process similtaneously trigger a mount in autofs4 can
cause multiple requests to the daemon for the same mount. The daemon
handles this OK but it's possible an incorrect error to be returned. For
this reason I believe it is better to change the spin lock to a semaphore
in waitq.c. This makes the second and subsequent request wait on the q as
ther supposed to.
Andrew Morton [Sat, 15 May 2004 03:14:32 +0000 (20:14 -0700)]
[PATCH] autofs4: readdir fixes
From: Ian Kent <raven@themaw.net>
a. Implement readdir and friends for directory lookup for late mounting.
This is done largely by replacing a catch all condition in
try_to_fill_dentry with appropriate cases.
b. Add path calc. function in waitq.c to get extended path to return to
daemon (for direct mounts).
c. Add revalidate calls to sys_chdir and sys_chroot so that pwd lookups
work correctly.
d. Add ioctl to retrieve minor version for automount daemon (and me) to
recognise module fix level. Bumped minor version to 5.
From: Hugh Dickins <hugh@veritas.com>
After chdir (or chroot) to non-existent directory on 2.6.5-mm5, you can no
longer unmount filesystem holding working directory (or root).
Andrew Morton [Sat, 15 May 2004 03:14:11 +0000 (20:14 -0700)]
[PATCH] autofs4: expiry refcount fixes
From: Ian Kent <raven@themaw.net>
This patch is the result of an e-mail discussion with Soni Maneesh. He felt
that the use of reference counts in the expire module is unreliable (in the
presence of rcu) and suggested it should use standard VFS calls where
possible. This has been done. Once the boundary in autofs is reached we
have no choice but to resort using reference counts (but under the
vfsmount_lock).
After review by hch:
- renamed autofs4_may_umount to __may_umount_tree, made it static and moved
it to namespace.c.
- added stub function may_umount_tree with description
- altered may_umount to use above stub function and added little description
Andrew Morton [Sat, 15 May 2004 03:14:00 +0000 (20:14 -0700)]
[PATCH] autofs4: locking rework
From: Ian Kent <raven@themaw.net>
Remove BKL from autofs4 module and add spinlock to serialise access to the
automount daemon communication waitq.
Locking requirements are different in 2.6 and so I'm seeking comments and
suggestions on this. I have taken a rather heavy handed approach to this in
the patch. For example, the VFS operations that directly change the
filesystem, such as autofs4_mkdir etc, hold the inode semaphore on entry so
the BKL has been removed. I can't see why two locking mechanisms are needed.
Rather than add locking all over the place, I'm looking for justification
it's needed, as I don't see it myself.
Andrew Morton [Sat, 15 May 2004 03:13:39 +0000 (20:13 -0700)]
[PATCH] autofs4: dnotify + autofs may create signal/restart syscall loop
From: Ian Kent <raven@themaw.net>
From: Jeff Mahoney <jeffm@suse.com>
I saw a recent bug report that showed when a process set up a dnotify
against the autofs root and then attempted an access(2) call inside the
autofs namespace on a mount that would fail, it would create a
signal/restart loop.
The cause is that the autofs code checks to see if any signals are pending
after it waits on a response from the autofs daemon. If it finds any, it
assumes that autofs_wait was interrupted, and that it should return
-ERESTARTNOINTR. The problem with this is that a signal_pending(current)
check will return true if *any* signals were received, not just if a signal
that interrupted the wait was received. autofs_wait explicitly blocks all
signals except for SIGKILL, SIGQUIT, and SIGINT before calling
interruptible_sleep_on.
The effect is that if a dnotify is set against the autofs root, when the
autofs daemon creates the directory, a dnotify event will be sent to the
originating process. Since the code in autofs_root_lookup doesn't check to
see what signals are actually pending, it bails early, telling the caller
to try again. The loop goes on forever until interrupted via one of the
actual interrupting signals.
The following patch makes both autofs_root_lookup and autofs4_root_lookup
verify that one of its defined "shutdown" signals are pending before
bailing out early. Any other signal should be delivered later, as
expected. It doesn't matter if the signal occured outside of the sleep in
autofs_wait. The calling process will either go away or try again.
Andrew Morton [Sat, 15 May 2004 03:13:17 +0000 (20:13 -0700)]
[PATCH] sched: reduce node balancing interval
From: Nick Piggin <nickpiggin@yahoo.com.au>
From: Suresh Siddha <suresh.b.siddha@intel.com>
Node max rebalance interval is too large. It is currently dependent on
number of online cpus. For 16 cpu system, max node balance interval in
busy case is 32 seconds. Agreed that it will use max 32 seconds only when
it doesn't find imbalance for a long time. But this will lead to slow
response time in cases where load runs for a second with no imbalance and
suddently creates an imbalance. My patch makes the busy max node rebalance
interval equal to the base [scheduler].
Andrew Morton [Sat, 15 May 2004 03:13:06 +0000 (20:13 -0700)]
[PATCH] sched: less locking in balancing
From: Nick Piggin <nickpiggin@yahoo.com.au>
Analysis and basic idea from Suresh Siddha <suresh.b.siddha@intel.com>
"This small change in load_balance() brings the performance back upto base
scheduler(infact I see a ~1.5% performance improvement now). Basically
this fix removes the unnecessary double_lock.."
Andrew Morton [Sat, 15 May 2004 03:12:56 +0000 (20:12 -0700)]
[PATCH] sched: fix scheduler for unsynched processor sched_clock
From: Nick Piggin <nickpiggin@yahoo.com.au>
Fine-tune the unsynched sched_clock handling.
Basically, you need to be careful about ensuring timestamps get correctly
adjusted when moving CPUs, and you *can't* look at your unadjusted
sched_clock() and a remote task's ->timestamp and try to come up with
anything meaningful.
I think this second problem will really hit hard in the activate_task path
on systems with unsynched sched_clock when you're waking up a remote task,
which happens very often. Andi, I thought some Opterons have unsynched
tscs? Maybe this is causing your unexplained bad interactivity?
Another problem is a fixup in pull_task. When adjusting ->timestamp from
one processor to another, you must use timestamp_last_tick for the local
processor too. Using sched_clock() will cause ->timestamp to creep
forward.
A final small fix is for sync wakeups. They were using __activate_task for
some reason, thus they don't get credited for sleeping at all AFAIKS.
And another thing, do we want to #ifdef timestamp_last_tick so it doesn't
show on UP?
Andrew Morton [Sat, 15 May 2004 03:12:44 +0000 (20:12 -0700)]
[PATCH] sched: improved cpu_load rounding
From: Nick Piggin <nickpiggin@yahoo.com.au>
"Siddha, Suresh B" <suresh.b.siddha@intel.com> noticed a problem in the
cpu_load averaging where the integer truncation could sometimes cause cpu_load
to never quite reach its target.
I'm not sure that you could demonstrate a real world problem, but I quite
like this fix.
Andrew Morton [Sat, 15 May 2004 03:12:33 +0000 (20:12 -0700)]
[PATCH] Fix writeback_inodes-vs-umount race
Fix bug identified by Chris Mason.
If writeback_inodes is left holding a ref on the superblock's last inode then
the superblock list walk can race with umount and the superblock can be
released.
Take and put a ref against the superblock to fix that.
Andrew Morton [Sat, 15 May 2004 03:12:23 +0000 (20:12 -0700)]
[PATCH] x86: stack dumps using frame pointers
From: Adam Litke <agl@us.ibm.com>
Teach the x86 stack tracing code to use frame pointers, if they are available.
It eliminates all the false-positives in the normal stack traces.
This is a big improvement, and -fomit-frame-pointer seems to make no
difference at all to generated code size. Maybe we should kill off
-fomit-frame-pointer.
Shai Fultheim [Sat, 15 May 2004 02:42:40 +0000 (19:42 -0700)]
[PATCH] Multiple (ICH3) IDE-controllers in a system
This fixes a problem with multiple IDE controllers in a system.
The problem is that pcibios_fixups table (in arch/i386/pci/fixup.c) uses
the pci_fixup_ide_trash() quirk for Intel's ICH3 (my case specifically
8086:248b). This clears any bogus BAR information set up by the BIOS.
In a system which has multiple ICH3's can't use any of the IDE
controllers beside the one on the first ICH3.
Anyhow, the fix is to make sure pci_fixup_ide_trash resets the BARs only
for first time being called, so the subsequent IDE controllers will use
the BIOS BARs. This is better than "loosing" all these IDE controllers
in the case their BARs set right.
The issue discussed and agreed with Bartlomiej Zolnierkiewicz (see below).
Santiago Leon [Fri, 14 May 2004 13:47:05 +0000 (06:47 -0700)]
[PATCH] PowerPC Virtual Ethernet duplicate MAC addresses
This fixes a bug where different partitions were assigned the same MAC
address. Also, according to Anton, gcc 3.5 didn't like our mac_addr_p
gymnastics, so this ends up fixing that as well.
Andrew Morton [Fri, 14 May 2004 12:56:29 +0000 (05:56 -0700)]
[PATCH] ppc64 iSeries: allow read only virtual disks
From: Stephen Rothwell <sfr@canb.auug.org.au>
It is possible to attach a virtual disk to a logical partition on an iSeries
machine so that it is read only to the partition. This patch allows Linux to
use such virtual disks.
Andrew Morton [Fri, 14 May 2004 12:56:19 +0000 (05:56 -0700)]
[PATCH] ppc64: strengthen I/O and memory barriers
From: Paul Mackerras <paulus@samba.org>
After I sent the recent patch to include/asm-ppc64/io.h which put stronger
barriers in the I/O accessor macros, Paul McKenney pointed out to me that a
writex/outx could still slide out from inside a spinlocked region. This patch
makes the barriers a bit stronger so that this can't happen. It means that we
need to use a sync instruction for wmb (a full "heavyweight" sync), since
drivers rely on wmb for ordering between writes to system memory and writes to
a device.
I have left smb_wmb() as a lighter-weight barrier that orders stores, and
doesn't impose an ordering between cacheable and non-cacheable accesses (the
amusingly-named eieio instruction). I am assuming here that smp_wmb is only
used for ordering stores to system memory so that another cpu will see them in
order. It can't be used for enforcing any ordering that a device will see,
because it is just a gcc barrier on UP.
This also changes the spinlock/rwlock unlock code to use lwsync ("light-weight
sync") rather than eieio, since eieio doesn't order loads, and we need to
ensure that loads stay inside the spinlocked region.
Andrew Morton [Fri, 14 May 2004 12:56:08 +0000 (05:56 -0700)]
[PATCH] ppc64: Kconfig bits for CONFIG_SPINLINE
From: Paul Mackerras <paulus@samba.org>
When I sent the patch to uninline the spinlocks, I inadvertently left out
the change to arch/ppc64/Kconfig which defines the config symbol for
inlining the locks (CONFIG_SPINLINE now). This patch adds it. It also
adds a symbol CONFIG_PPC_SPLPAR which enables the code for calling the
hypervisor on shared-processor logically-partitioned system to yield the
physical processor to the lock holder when spinning. (The code that
depends on this symbol is already present in arch/ppc64/lib/locks.c.)
Andrew Morton [Fri, 14 May 2004 12:55:37 +0000 (05:55 -0700)]
[PATCH] ppc64: align some heavily used variables
From: Anton Blanchard <anton@samba.org>
Based on feedback from the hardware guys align jiffies and tb_last_stamp.
We update both regularly and there are other read only, heavily accessed
things that share those cachelines.
Andrew Morton [Fri, 14 May 2004 12:55:05 +0000 (05:55 -0700)]
[PATCH] ppc32: Move declarations into headers
From: Paul Mackerras <paulus@samba.org>
The patch below moves some declarations from C files into the appropriate
header file in include/asm-ppc (and removes an unused local variable in a
function).
Andrew Morton [Fri, 14 May 2004 12:54:54 +0000 (05:54 -0700)]
[PATCH] ppc32: Fix pmac compile after OCP changes
From: Paul Mackerras <paulus@samba.org>
Matt Porter's recent changes broke the compile for non-4xx ppc32 systems,
unfortunately. I get an error that mfdcr is not defined in
include/asm-ppc/ocp.h when compiling for powermac (reasonable, since the
mfdcr instruction only exists on 4xx processors). The patch below fixes
it.
Andrew Morton [Fri, 14 May 2004 12:52:21 +0000 (05:52 -0700)]
[PATCH] PPC32: Fix copy prefetch on non coherent PPCs
From: Matt Porter <mporter@kernel.crashing.org>
This patch fixes the condition where prefetching cache lines beyond a
buffer can cause data corruption on non cache coherent PPCs. It is a port
of the version that went into 2.4. From Eugene Surovegin
<ebs@ebshome.net>.
Andrew Morton [Fri, 14 May 2004 12:52:10 +0000 (05:52 -0700)]
[PATCH] PPC32: Fix __flush_dcache_icache_phys() for Book E
From: Matt Porter <mporter@kernel.crashing.org>
This patch implements/uses __flush_dcache_icache_page() which kmaps on a
Book E part, but keeps the existing behavior on other PowerPCs which can
disable the MMU.
Andrew Morton [Fri, 14 May 2004 12:51:48 +0000 (05:51 -0700)]
[PATCH] befs: inode->i_flags thinko fix
Jorn Engel <joern@wohnheim.fh-wedel.de>
inode->i_flags should never contain fs-specific flags. In fact, it doesn't;
the checks against it cause "chattr +T" to be useless for ext[23]. Same bug
was in befs as well.
Andrew Morton [Fri, 14 May 2004 12:50:55 +0000 (05:50 -0700)]
[PATCH] befs: microoptimisation, use befs_bread() instead of befs_bread_iaddr()
From: "Sergey S. Kostyliov" <rathamahata@php4.ru>
We already have block number (inode->i_ino), so there is no need to calculate
it from befs_block_run before sb_bread() call (this is what befs_bread_iaddr()
do).
Andrew Morton [Fri, 14 May 2004 12:50:33 +0000 (05:50 -0700)]
[PATCH] s390: network driver
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Network driver changes:
- lcs: Add missing irb error checking.
- lcs: Fix multicasting.
- lcs: Use a seperate lock (ipm_lock) for multicast list.
- lcs: Add missing in_dev_put in multicase address list handling.
- iucv: Set static variables to NULL after kfree.
- iucv: Do bus_unregister if module initialization fails.
- netiucv: Convert iucvMagic to EBCDIC in con_action_start.
- netiucv: Remove administration of ifno-stuff for device name,
- netiucv: Add attribute to remove a netiucv device.
- qeth: Add version string that is displayed at driver load time.
- qeth: Fix memory leak in qeth_arp_query.
- qeth: Remove duplicate case statements in qeth_do_ioctl.
- qeth: Fix OSA broadcast filtering.
- qeth: Increase timeout for purge ARP cache IPA.
- qeth: Fix hsi device naming.
- qeth: Add do_QDIO count to qeth performance statistics.
- qeth: Allow writing to IP address takeover attribute only in
state DOWN or RECOVER.
- qeth: Fix hang when removing a vlan device.
- qeth: Cleanup error messages for ARP commands.
- qeth: Return EOPNOTSUPP for purge ARP on HiperSockets.
- qeth: Drop skbs if the net_device of a qeth device is down.
- qeth: Simplify ip address list processing.
Andrew Morton [Fri, 14 May 2004 12:50:22 +0000 (05:50 -0700)]
[PATCH] s390: zfcp host adapter
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
zfcp host adapter change:
- Prevent infinite retry of SCSI commands when FCP adapter is unavailable.
- Always queue error recovery structure to the error recovery running list.
- Add help text to zfcp config option.