[PATCH] Watchdog driver for Intel IXP2000 Network Processor
Following patch adds support for the watchdog driver embedded in Intel's
IXP2000 family of network processors. The architecture-specific bits of
IXP2000 support will be merged upstream via the ARM tree once all the
various drivers have been merged.
Olaf Hering [Wed, 28 Jul 2004 16:13:40 +0000 (09:13 -0700)]
[PATCH] mark swim3 floppy controller as removable device
Mark the mac floppy controller driver as removable media. This prevents an
entry in /proc/partitions. Several tools will not try to access the floppy
anymore with this change.
Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrea Arcangeli [Wed, 28 Jul 2004 16:13:18 +0000 (09:13 -0700)]
[PATCH] writepages drops bh on not uptodate page
I think I understood why some ext2 fs corruption still happens even after
the last i_size fix.
what happened I believe is that the writepages layer got a not a fully
uptodate page (in turn with bh mapped on top of it), and then right before
unlocking the page and entering the writeback mode, it freed all the bh.
Without bh a not uptodate page will trigger a full readpage from disk, that
overwrites the pagecache before the multi-bio gets submitted, generating fs
corruption.
I believe the below patch should fix it (untested) against kernel CVS.
The testcases developed by Kurt showed the pagecache being overwritten with
on-disk data at block offsets, and Chris as well was wondering about races
between wait_on_page_writeback and readpage. the below fix just explains
everything we've seen since not-fully-uptodate pages must have always bh on
them and the below patch enforces just that invariant, and it should fix
our pagecache-overwritten-by-disk-data problem.
Signed-off-by: Andrea Arcangeli <andrea@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Wed, 28 Jul 2004 16:12:55 +0000 (09:12 -0700)]
[PATCH] Subject: PATCH: fix bogus ioctl return in mtrr
This is fairly self explanatory - ENOIOCTLCMD is an internal code outside
of the -1 to -511 range. The correct return for an unknown ioctl is
-ENOTTY although some Linux devices return the incorrect -EINVAL result.
Patch-By: Alan Cox <alan@redhat.com>
OSDL Developer Certificate of Origin 1.0 included herein by reference
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
s390 core changes:
- Rework system call entry cleanup code to fix a potential asynchronous
interrupt stack overflow if the user stack pointer happens to be in
the same range as the asynchronous stack.
- Replace broken schedule_timeout call with msleep.
- Regenerate default configuration
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 28 Jul 2004 16:11:37 +0000 (09:11 -0700)]
[PATCH] ncpfs: setattr return value fix
Arjan's new warning found a bug!
fs/ncpfs/inode.c: In function `ncp_notify_change':
fs/ncpfs/inode.c:960: warning: ignoring return value of `inode_setattr', declared with attribute warn_unused_result
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Add documentation about /proc/sys/vm/laptop_mode to various docs.
From: Bart Samwel <bart@samwel.tk>
A bunch of small laptop mode updates:
* Mention the laptop_mode and block_dump sysctls in the relevant docs,
referring to the laptop-mode.txt. Improve description of what the
laptop_mode knob means (i.e. seconds between last I/O and automatic
sync).
* Document the most relevant config file options.
* Change the installation instructions in the laptop mode doc to describe
the ACPI-bound version first, because this is the easiest. Explain
the non-ACPI version afterwards. Added a reference to my "packaged
version" of the scripts.
* Move the setting of hdparm and cpu frequency out of the ACPI script
and into the core laptop mode script. Add config option DO_HD to
enable hdparm. Add config setting HD to set device to do hdparm on.
Rename Dax's CPU_MANAGE to DO_CPU, with 0/1 instead of yes/no, to
improve consistency.
* Fix a problem where the root filesystem wouln't be remounted when
/etc/mtab listed its type as "unknown". Deduce the type of "unknown"
filesystems from /etc/fstab.
This depends on the patch that adds config files, which was submitted
to Linus by Dax Kelson on July 10.
Add support for a external configuration file for /sbin/laptop_mode, and
/etc/acpi/actions/battery.sh. Convert battery.sh to use CPUFreq (off by
default) instead of CPU throttling (that was off by default).
Cleanup some formating for 80 columns.
All changes were written by me on a plane flight from Philadelphia to Salt
Lake City on July 9th. :)
(Note from Bart Samwel: was submitted to Linus earlier, this patch is
unchanged from that. I needed to submit this into -mm for now because my
other changes are dependent on Dax's changes.)
Samuel Thibault [Wed, 28 Jul 2004 16:10:30 +0000 (09:10 -0700)]
[PATCH] front buttons wouldn't mute ESS Maestro
Here is a small fix to enable muting ESS Maestro sound card thanks to the
up/down buttons: when has reached the driver's minimum (! this is
something like -dB value), just mute. (It was working in OSS driver, but
not in ALSA)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Make code for hlist_for_each_safe use better code (same as
hlist_for_each_entry_safe). Get rid of comment about prefetch, because
that was fixed a while ago. Only current use of this is in the bridge
code, that I maintain.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Roland Dreier [Wed, 28 Jul 2004 16:10:10 +0000 (09:10 -0700)]
[PATCH] Export all functions in lib/string.c
Quite a few functions in lib/string.c are not exported. I ran into this
trying to use strnchr() in a module.
This patch
- exports every function defined in lib/string.c
- adds some missing __HAVE_ARCH_xxx defines for i386
- gets rid of the exports of functions from lib/string.c in arch/s390
(BTW, why is s390 exporting things NOVERS?)
Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Domen Puncer [Wed, 28 Jul 2004 16:09:59 +0000 (09:09 -0700)]
[PATCH] remove faulty __init's from drivers/video/fbmem.c
From: Geert Uytterhoeven <geert@linux-m68k.org>
These four are called from fb_show_logo, which is exported symbol, called
by fbcon_switch.
From: Domen Puncer <domen@coderock.org> Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Eger [Wed, 28 Jul 2004 16:09:36 +0000 (09:09 -0700)]
[PATCH] cirrusfb: update for amiga (zorro)
Cirrusfb updates:
- Cirrusfb depends on Zorro or PCI
- Revive Zorro support, using new Zorro driver framework
- Merge PCI and Zorro code where possible
- Use C99 initializers
- Kill superfluous whitespace
- #undef I/O ops before redefining them on Amiga
From: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David Eger <eger@havoc.gtf.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
M68k maintainership update:
- Transfer maintainership to Roman and me (ack'ed by Jes and Roman)
- Update main website URL
- Add Linux/m68k CVS repository website
M68k: Fix build after <asm/pgalloc.h> surgery in 2.6.8-rc1:
- Add missing include on machines with a standard m68k MMU
- Convert __pte_free_tlb() to a macro (like it is on most other archs) on
Sun-3, to avoid include hell
[PATCH] fix readahead breakage for sequential after random reads
Current readahead logic is broken when a random read pattern is followed by
a long sequential read. The cause is that on a window miss ra->next_size
is set to ra->average, but ra->average is only updated at the end of a
sequence, so window size will remain 1 until the end of the sequential
read.
This patch fixes this by taking the current sequence length into account
(code taken from towards end of page_cache_readahead()), and also setting
ra->average to a decent value in handle_ra_miss() when sequential access is
detected.
Khalid Aziz [Wed, 28 Jul 2004 16:03:11 +0000 (09:03 -0700)]
[PATCH] ipmi_msghandler module load failure fix
On a 2.6.7 kernel, when I try to modprobe ipmi_msghandler, it fails to load
with following message:
FATAL: Error inserting ipmi_msghandler (/lib/modules/2.6.7/kernel/drivers/char/ipmi/ipmi_msghandler.ko): Invalid module format
And there is an error message in dmesg:
ipmi_msghandler: init symbol 0xa000000200058080 used in module code at a000000200031b32
What I have been able to determine is that ipmi_msghandler.c defines
ipmi_init_msghandler() as the module_init() routine and then it also calls
ipmi_init_msghandler() diretcly from couple of other places. This does not
seem to be okay in 2.6.7 kernel. I was able to fix this by defining a new
module_init routine which in turn calls ipmi_init_msghandler(). I also
removed __init from ipmi_init_msghandler() since it gets called from
ipmi_open() on an open of the ipmi device file. So I would think we want
to keep ipmi_init_msghandler() around even after initialization.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix a bug in do_proc_doulongvec_minmax() where the the string buffer was
too short to parse a 64-bit number expressed in decimal. That was causing
problems with entries in /proc/sys using long and allowing large number
(such as -1)
[PATCH] Fix rivafb's NV_ARCH_, cleanup DEBUG, backlight control on ppc
- fixes the PCI-IDs (needed to get it to work on at least the NV17)
- cleans up the DEBUG option (similar to the new radeonfb). This also
makes it easy to replace printk by btext_printf() (on ppc) or similar to
ease debugging of the fb code when all else fails.
inadvertently broke ia64 because the patch assumed that pgd_offset_k() is
just an optimization of pgd_offset(), which it is not. This patch fixes
the problem by introducing pgd_offset_gate(). On architectures on which
the gate area lives in the user's address-space, this should be aliased to
pgd_offset() and on architectures on which the gate area lives in the
kernel-mapped segment, this should be aliased to pgd_offset_k().
This bug was found and tracked down by Peter Chubb.
Signed-off-by: <davidm@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ryan S. Arnold [Wed, 28 Jul 2004 15:59:52 +0000 (08:59 -0700)]
[PATCH] ppc64: HVCS driver
* include/asm-ppc64/hvcserver.h
New file added to wrap ppc64 architecture specific firmware calls for
use by HVCS. This file provides a struct hvcs_partner_info definition,
headers for partner info gathering and vterm connection and termination
interfaces.
* arch/ppc64/kernel/Makefile
Added build directive for hvcserver.o when HVCS is configured.
* arch/ppc64/kernel/hvconsole.c
Exported hvc_put_chars() and hvc_get_chars() for use by HVCS.
* arch/ppc64/kernel/hvcserver.c
Body of hvcserver module which accompanies the hvcs module and provides
ppc64 architecture firmware calls for use by HVCS. This file provides
function bodies for partner info gathering and vterm connection and
termination interfaces.
* drivers/char/Kconfig
Added CONFIG_HVCS option for both built-in version and module version
of hvcs.
* drivers/char/Makefile
Added build directive for hvcs.o when CONFIG_HVCS is configured.
* drivers/char/hvcs.c
This is the device driver for the IBM Hypervisor Virtual Console
Server, "hvcs". The IBM hvcs provides a tty driver interface to allow
Linux user space applications access to the system consoles of logically
partitioned operating systems, e.g. Linux, running on the same
partitioned Power5 ppc64 system. Physical hardware consoles per
partition are not practical on this hardware so system consoles are
accessed by this driver using inter-partition firmware interfaces to
virtual terminal devices.
* Documentation/powerpc/hvcs.txt
HVCS installation and usage documentation.
Thanks everyone for all the help with this driver [Andrew Morton, Paul
Mackerras, Ben Herrenschmidt, Dave Hansen, Paul Mackerras, Dave Boutcher,
Hollis Blanchard, Santiago Leon, Brian King, Randy Dunlap].
Signed-off-by: Ryan S. Arnold <rsa@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Joel Schopp [Wed, 28 Jul 2004 15:59:41 +0000 (08:59 -0700)]
[PATCH] ppc64 SMT bugfix
This patch is fairly straightforward. maxcpus should be per SMT thread and
not per physical processor. SUSE picked this up back in May (was discussed
on ppc64 mailing list) and has had no trouble with it.
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Wed, 28 Jul 2004 15:59:29 +0000 (08:59 -0700)]
[PATCH] ppc64: whitespace cleanup in prom.c
This patch, originally from Linas Vepstas, cleans up some wonky indentation
and other formatting issues in arch/ppc64/kernel/prom.c. It does not change
any actual code.
Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Wed, 28 Jul 2004 15:59:18 +0000 (08:59 -0700)]
[PATCH] ppc64: Fix RAS irq handlers
On pSeries systems, the firmware tells us a list of interrupt numbers
that we should enable in order to detect various error conditions.
When we get one of these interrupts we are supposed to call the
firmware, which will work out and tell us what the error was and
possibly also fix it.
We were not correctly parsing the property values that tell us which
interrupts need to be handled in this fashion. This patch fixes it.
It exports prom_n_intr_cells from prom.c since that is needed to do
the parsing properly.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Joel Schopp [Wed, 28 Jul 2004 15:59:08 +0000 (08:59 -0700)]
[PATCH] ppc64: cpu hotplug fix
On Power4 and earlier hardware there is no need to clear the CPPR (see RPAp
479 section 18.5.4.7.2 for what little info there is on the CPPR) when
stopping a cpu. On hardware that uses Power5 an undocumented change has
been made that requires the CPPR to be cleared if an isolate is to be done
on the stopped cpu. So the following patch lets cpu hotplug work on the
recent hardware.
I sent this patch to the ppc64-dev list back in mid April and Suse picked
it up then for SLES9 so it has been well tested for several months.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Anton Blanchard [Wed, 28 Jul 2004 15:58:57 +0000 (08:58 -0700)]
[PATCH] ppc64: remove multiple IRQ optimisation
ppc64 has an optimisation where it loops on get_irq until there are no more
interrupts to be handled. Mark Hack notes that this optimisation hardly
ever hits and costs us a potentially expensive extra read of an interrupt
register every interrupt.
Also make do_IRQ void, the callers never use the return value.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Gibson [Wed, 28 Jul 2004 15:58:46 +0000 (08:58 -0700)]
[PATCH] page align emergency stack
The PPC64 ABI requires the stack to be 128 byte aligned (and that can
become important if AltiVec registers are saved there). In the kernel,
that's usually dealt with by the fact that the stack has a page
more-or-less to itself. However, the emergency stacks (used in SMP bringup
and when we detect a bad stack pointer) aren't necessarily page aligned, or
anything aligned for that matter. This patch applies the necessary
alignement constraint to them.
Signed-off-by: David Gibson <dwg@au.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Wed, 28 Jul 2004 15:58:23 +0000 (08:58 -0700)]
[PATCH] DVB major number
The DVB merge forgot an important change - DVB is currently using
major 250, which is "local" while devices.txt (and thus FSSTND/LSB) require
it uses the officially allocated 212 major.
Fortunately most 2.6 users don't currently use DVB and vendors ship devfs
or versions of makedev that do the right thing and generate 212 majors.
Fix below, original author: Red Hat <alan@redhat.com>, OSDL certificate
of authorship included by reference.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Updating the mm lock ordering documentation drew attention to the fact that
we were wrong to blithely add down_read(&mm->mmap_sem) to swapoff's
unuse_process, while it holds swapcache page lock: not very likely, but it
could deadlock against, say, mlock faulting a page back in from swap.
But it looks like these days it's safe to drop and reacquire page lock if
down_read_trylock fails: the page lock is held to stop try_to_unmap
unmapping the page's ptes as fast as try_to_unuse is mapping them back in;
but the recent fix for get_user_pages works to prevent that too.
BK is still missing one piece for Oleg's install_page/vmtruncate races.
Oleg didn't explicitly ACK this, but I think he did implicitly: Oleg?
The previous patch to install_page, returning an error if !page_mapping
once page_table_lock is held, is not enough to guard against vmtruncate.
When unmap_mapping_range already did this vma, but truncate_inode_pages has
not yet done this page, page->mapping will still be set, but we must now
refrain from inserting the page into the page table.
Could check truncate_count, but that would need caller to read and pass it
down. Instead, recheck page->index against i_size, which is updated before
unmap_mapping_range. Better check page->mapping too: not really necessary,
but it's accidental that index is left when mapping is reset.
Also, callers are expecting -EINVAL for beyond end of file, not -EAGAIN.
[PATCH] selinux: fix clearing of new personality bit on security transitions
This patch moves the clearing of the new personality bit from
selinux_bprm_apply_creds (called from compute_creds) to
selinux_bprm_set_security (called from prepare_binprm). This ensures that the
bit is cleared at the same point in exec processing as for setuid/setgid
binaries, prior to setting up the new image.
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hopefully fixes the free-of-a-freed-page BUG caused during CDRW writing.
This also fixes a problem in the bouncing for io errors (it needs to free
the pages and clear the BIO_UPTODATE flag, not set it. it's already set.
passing -EIO to bio_endio() takes care of that).
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] compat_clock_getres shouldn't return -EFAULT if res == NULL
For clock_getres(clockid_t clock_id, struct timespec *res), the specification
says "If res is NULL, the clock resolution is not returned." So this kind of
call should succeed. The current implementation returns -EFAULT.
The patch fixes the bug in compat_clock_getres().
Signed-off-by: Gordon Jin <gordon.jin@intel.com> Signed-off-by: Arun Sharma <arun.sharma@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
rcu_offline_cpu and rcu_move_batch have been broken since the list_head's
in struct rcu_head and struct rcu_data were replaced with singly-linked
lists:
CC kernel/rcupdate.o
kernel/rcupdate.c: In function `rcu_move_batch':
kernel/rcupdate.c:222: warning: passing arg 2 of `list_add_tail' from
incompatible pointer type
kernel/rcupdate.c: In function `rcu_offline_cpu':
kernel/rcupdate.c:239: warning: passing arg 1 of `rcu_move_batch' from
incompatible pointer type
kernel/rcupdate.c:240: warning: passing arg 1 of `rcu_move_batch' from
incompatible pointer type
kernel/rcupdate.c:236: warning: label `unlock' defined but not used
Kernel crashes when you try to offline a cpu, not surprisingly.
It also looks like rcu_move_batch isn't preempt-safe so I touched that up,
and got rid of an unused label in rcu_offline_cpu.