Peter Osterlund [Sun, 21 Mar 2004 07:23:11 +0000 (23:23 -0800)]
[PATCH] Revert UDF inode semaphore locking
For some reason I don't understand, the last UDF filesystem update makes
the UDF deadlock when I write a bunch of mp3 files to a CDRW using the
packet writing patch. Both "cp" and pdflush get stuck in __down.
Reverting the semaphore changes makes the problem go away. Use the
kernel lock again, until whatever recursive offender gets fixed.
(The offensive recursion seems to be: write() takes the inode semaphore,
causes memory pressure, and then trying to write back the inode or dirty
data to disk tries to get the semaphore again and deadlocks.)
Wim Van Sebroeck [Sun, 21 Mar 2004 21:33:23 +0000 (22:33 +0100)]
[WATCHDOG] v2.6.5-rc2 pcwd.c-patch1
Version 1.14 of pcwd.c - Changes that were made are:
* Extract the start code in a seperate function (pcwd_start)
* Extract the stop code in a seperate function (pcwd_stop)
* Extract the get_temperature code in a seperate function (pcwd_get_temperature)
* Make /dev/watchdog and /dev/temperature to different misc devices with their own fops
* Small clean-up's
Wim Van Sebroeck [Sun, 21 Mar 2004 12:28:25 +0000 (13:28 +0100)]
[WATCHDOG] v2.6.5-rc2 softdog.c-patch
Version 0.07 of softdog.c - Changes that were made are:
* Extract the start/keepalive code in a seperate function (softdog_keepalive)
* Extract the stop code in a seperate function (softdog_stop)
* Add notifier support
* Extract softdog_set_heartbeat code to seperate subroutine
* Small clean-up's
Wim Van Sebroeck [Sun, 21 Mar 2004 12:22:23 +0000 (13:22 +0100)]
[WATCHDOG] v2.6.5-rc2 wdt_pci.c-patch
Version 0.10 of wdt_pci.c - Changes that were made are:
* Extract the start code in a seperate function (wdtpci_start)
* Extract the stop code in a seperate function (wdtpci_stop)
* Convert wdtpci_ping so that it return an int value (0=succes).
* Extract the get_temperature code in a seperate function (wdtpci_get_temperature)
* Make /dev/watchdog and /dev/temperature to different misc devices with their own fops.
* Reorganize init and exit functions
* Make heartbeat (the emulated heartbeat) a module parameter
* Rewrite status flag code so that we could add a new tachometer module parameter
+ make clear distinction between PCI-WDT500 and PCI-WDT501.
* Small clean-up's
Wim Van Sebroeck [Sun, 21 Mar 2004 12:18:43 +0000 (13:18 +0100)]
[WATCHDOG] v2.6.5-rc2 wdt.c-patch
Version 0.10 of wdt.c - Changes that were made are:
* Extract the start code in a seperate function (wdt_start)
* Extract the stop code in a seperate function (wdt_stop)
* Convert wdt_ping so that it return an int value (0=succes).
* Extract the get_temperature code in a seperate function (wdt_get_temperature)
* Make /dev/watchdog and /dev/temperature to different misc devices with their own fops.
* Reorganize init and exit functions
* Make heartbeat (the emulated heartbeat) a module parameter
* Rewrite status flag code so that we could add a new tachometer module parameter
* Small clean-up's
Andrew Morton [Sun, 21 Mar 2004 00:38:26 +0000 (16:38 -0800)]
[PATCH] make inflate use less stack space with gcc3.5
From: Matt Mackall <mpm@selenic.com>
Quick fix to work around gcc3.5's automatic inline and broken stack
requirements calculation. Without this, I see stack overflows at boot
with 4k stacks.
Andrew Morton [Sun, 21 Mar 2004 00:37:44 +0000 (16:37 -0800)]
[PATCH] kbuild ordering fix
From: Sam Ravnborg <sam@ravnborg.org>
In the i386 case we need to generate asm-offset.h, before starting building
the kernel tree. Building asm-offset.h causes us to use one of the
shorthands in the top-level makefile, namely the one for .s files. The one
that allows us to do: make some/dir/file.s
And this shorthand happens to have a dependency to scripts, therefore I did
not see this problem on i386. But David hit it with sparc64, because there
is no asm-offset.h file. No parallel stuff involved here, just an ordinary
error.
Andi Kleen [Sun, 21 Mar 2004 04:17:28 +0000 (23:17 -0500)]
[PATCH] Hack mptfusion to work on >4GB machines
fusion needs several separately allocated coherent regions and
requires that they all be in the same 4GB segment. Obviously this may
fail. The hack is to force the coherent_dma_mask to 0xffffffff thus
ensuring that all the allocations occur within the first 4GB. This
hack breaks Altix entirely.
Adam Belay [Sat, 20 Mar 2004 13:49:10 +0000 (13:49 +0000)]
[ISAPNP] MEM Config Fix
This patch fixes a bug in the resource configuration function. If
there are more than one memory ranges, the isapnp driver will write
into the incorrect configuration register.
Samuel Rydh [Sat, 20 Mar 2004 11:39:50 +0000 (03:39 -0800)]
[PATCH] keywest bugfix
This fixes a deadlock in I2C probing.
- keywest holds the pmac_low_i2c_lock while registering the i2c adapter.
- i2c_add_adapter() notifies registered drivers by calling
driver->attach_adapter().
- a driver might access the i2c bus from attach_adapter() which
deadlocks since all xfer routines take the lock.
Andrew Morton [Sat, 20 Mar 2004 01:45:57 +0000 (17:45 -0800)]
[PATCH] fix console oops/race
Finally nailed this sucker.
con_close() checks the tty->count and then sleeps in acquire_console_sem().
But another process can come in and grab a ref against the tty while
con_close() dropped the BKL. But con_close() then proceeds to deallocate the
tty->driver_data anyway, even though the tty now has ->count == 2.
Fix that by moving the check for ->tty_count inside console_sem.
Andi Kleen [Sat, 20 Mar 2004 01:44:56 +0000 (17:44 -0800)]
[PATCH] critical x86-64 merge
There were some nasty bugs in the x86-64 code, including one race that
could cause random reboots, especially on Intel machines, with the NMI
watchdog. This patch fixes them and also includes some harmless
cleanups.
Main fixes were for some buglets in the IOMMU code and the plugging of a
race in the exception stack handling. Also disables an broken MCE on K8
explicitely.
Also finally the preempt compile issues are fixed.
- Declare hpet interrupt separately in drivers/char/rtc.c
- Fix rtc.h/hpet.h to not depend on interrupt.h
- Finally include smp_lock.h in hardirq.h
- Update defconfig
- Export bad_dma_address
- Merge with 2.6.5rc2
- Never schedule on interrupt stacks.
- Add option to force software iotlb (iommu=soft)
- Add ifdefs to gsi patch to match i386 (Bjorn Helgaas)
- Fix K8 GART TLB MCE workaround to actually work
- Fix dwarf2 unwind table in SAVE_ARGS (Jim Houston)
- Disable APIC on VIA/NVidia even with acpi=off (Gwenole Beauchesne)
- Fix parsing bug in "apic" option (Gwenole Beauchesne)
- Fix dma mask handling in pci_alloc_consistent
- Make pci_alloc_consistent more robust in low memory situations.
- Print version number in oopses (from i386)
- ACPI GSI cleanup (Bjorn Helgaas)
- Disable K8 GART TLB walk error MCE explicitely
- Add support to disable individual MCEs in the various banks.
Andrew Morton [Sat, 20 Mar 2004 01:41:51 +0000 (17:41 -0800)]
[PATCH] therm_adt7467 update
From: "Colin Leroy" <colin@colino.net>
The fan driver I wrote for adt746x looks like it only handles the adt7467
chip found in iBooks G4; but it also handles the adt7460 chip found in the
Powerbook G4 Alu. Here's a patch that updates therm_adt7467.c, Kconfig and
Makefile.
Adam Belay [Sat, 20 Mar 2004 00:36:51 +0000 (00:36 +0000)]
[ISAPNP] Fix Device Detection Issue
Some isapnp devices were not getting detected as a result of a bug in the isapnp
driver. It was not following the specifications and calculating a checksum when
it was not reliable. This problem was originally discovered by Paul L. Rogers
<rogerspl@datasync.com>. He made an initial patch. This release has some small
modifications, including a check to see if we run out of CSNs.
Matthew Wilcox [Fri, 19 Mar 2004 06:08:16 +0000 (22:08 -0800)]
[PATCH] PCI: Use insert_resource in pci_claim_resource
On ia64, the parent resources are not necessarily PCI resources and
so won't get found by pci_find_parent_resource. Use the shiny new
insert_resource() function instead, which I think we would have used
here had it been available at the time.
Russell King [Fri, 19 Mar 2004 04:52:30 +0000 (20:52 -0800)]
[PATCH] fix "optimize && ?"
This prevents the "optimize && ?" message appearing when the kernel
configuration tool is run. The message could be eliminated from the
tool, but I'd rather fix the needlessly over-complicated expression:
Rusty Russell [Fri, 19 Mar 2004 00:04:03 +0000 (16:04 -0800)]
[PATCH] Hotplug CPUs: Kswapd Changes
Keep track of kswapds: it's OK that they get moved off a node when the
last CPU goes down, but when a CPU comes back, we should try to move
the kswapd back onto its node.
Rusty Russell [Fri, 19 Mar 2004 00:03:44 +0000 (16:03 -0800)]
[PATCH] Hotplug CPUs: Make ksoftirqd Handle CPU Going Down
Change ksoftirqd not to assume it's on the CPU: when a cpu goes down,
it will be rudely dragged off. Since do_softirq() uses
smp_processor_id(), it's easiest to disable preemption, check that the
cpu is still up, then call do_softirq().
If the cpu is actually offline, wait for the notifier, which kills us.
Take over tasklets from dead cpu in the notifier.
Clean up redundant double assignment in CPU_UP callback.
Rusty Russell [Fri, 19 Mar 2004 00:03:35 +0000 (16:03 -0800)]
[PATCH] Hotplug CPUs: Read Copy Update Changes
Add hook for RCU to handle jobs on dead cpu. Requires new
tasklet_kill_immediate for RCU to clean up its tasklet (which might
have been about to run, so tasklet_kill won't work).
Rusty Russell [Fri, 19 Mar 2004 00:03:25 +0000 (16:03 -0800)]
[PATCH] Hotplug CPUs: Make Migration Thread Handle CPUs Going
Change the migration thread to directly use its cpu arg, rather than
smp_processor_id(): if a cpu goes up then down rapidly, it can be on
the wrong cpu just before it is stopped.
Add code to stop the migration thread on CPU_DEAD and CPU_UP_CANCELED.
Rusty Russell [Fri, 19 Mar 2004 00:03:16 +0000 (16:03 -0800)]
[PATCH] Hotplug CPUs: Set prio of migration thread before CPU
We need the migration thread to be RT as soon as the CPU comes online:
for example, stop_machine() (another RT task) expects to yield to it.
Extract the core of setscheduler() and do that when the migration
thread is created. rq lock is a precaution against the (theoretical)
possibility of someone else doing setscheduer on this thread at the
same time.
Rusty Russell [Fri, 19 Mar 2004 00:03:06 +0000 (16:03 -0800)]
[PATCH] Hotplug CPUs: Keep IRQs off in Migration Thread Calling
Currently the migration thread re-enables irqs, then calls
move_task_away which disables IRQs again and actually does the move.
This means there is a race where the migration thread gets preempted,
and the target CPU can go down.
Hold irqs disabled in migration thread across move_task_away(), which
now doesn't need to save flags (the other caller is the hotplug CPU
code, where irqs are also disabled).
Rusty Russell [Fri, 19 Mar 2004 00:02:56 +0000 (16:02 -0800)]
[PATCH] Hotplug CPUs: Take cpu Lock Around Migration
Grab cpu lock around sched_migrate_task() and sys_sched_setaffinity().
This is a noop without CONFIG_HOTPLUG_CPU.
The sched_migrate_task may have a performance penalty on NUMA if lots
of exec rebalancing is happening, however this only applies to
CONFIG_NUMA and CONFIG_HOTPLUG_CPU, which noone does at the moment
anyway.
Also, the scheduler in -mm solves the race another way, so this will
vanish then.
Andrew Morton [Thu, 18 Mar 2004 23:04:08 +0000 (15:04 -0800)]
[PATCH] remove_suid() should return error code
From: Nikita Danilov <Nikita@Namesys.COM>
remove_suid() ignores return value of notify_change()->i_op->setattr().
This mean, that even if file system fails to clear suid bit,
generic_file_aio_write_nolock() proceeds with write, which is unsafe.
Actually, even ext2's ->setattr() can fail, when trying to update ACL, for
example.
Attached patch modifies remove_suid() to return result of ->setattr(), and
updates in-tree callers.
Andrew Morton [Thu, 18 Mar 2004 23:03:58 +0000 (15:03 -0800)]
[PATCH] meye driver update
From: Stelian Pop <stelian@popies.net>
This patchlet is just a resync with my tree, it only increments the meye
driver version number and makes some small comment changes as suggested by
Randy Dunlap.
Andrew Morton [Thu, 18 Mar 2004 23:03:49 +0000 (15:03 -0800)]
[PATCH] VM overcommit documentation fixes
From: Andy Whitcroft <andyw@uk.ibm.com>
Whilst looking at the memory overcommit logic I noticed that the pointer to
the documentation from the *_vm_enough_memory calls is incorrect. Also
that in one instance the routine does not have the expected pointers.
Andrew Morton [Thu, 18 Mar 2004 23:03:30 +0000 (15:03 -0800)]
[PATCH] add note about "Copyright" to SubmittingDrivers
From: Grant Grundler <grundler@parisc-linux.org>
This patch adds a comment to "Documentation/SubmittingDrivers" about the
importance of adding a Copyright notice in submitted code.
The parisc-linux port has neglected this in the past and I've been slowly
trying to correct that (along with proper GPL header).
While I make it sound like GPL is the "only" acceptable license, I'll leave
it up to lawyers to determine what other appropriate license could be used
for a new driver.
Andrew Morton [Thu, 18 Mar 2004 23:02:40 +0000 (15:02 -0800)]
[PATCH] EDD: move code from i386-specific locations to generic
From: Matt Domsch <Matt_Domsch@dell.com>
Three patches to move the BIOS Enhanced Disk Drive code from i386-specific
locations into more generic locations, which will allow it to be used on
x86-64 as well.
Andrew Morton [Thu, 18 Mar 2004 23:02:23 +0000 (15:02 -0800)]
[PATCH] Fix uninlined memcmp on i386
From: DHollenbeck <dick@softplc.com>
This patch was needed against a pristine 2.6.4 kernel when compiling with
"gcc 3.4 _very recent_" using the -Os option.
Without this patch, modules would use a non-inline memcmp() and then not
find it in the kernel, causing depmod to complain and some modules not to
load.
Andrew Morton [Thu, 18 Mar 2004 23:01:15 +0000 (15:01 -0800)]
[PATCH] doc. updates/typos
From: "Randy.Dunlap" <rddunlap@osdl.org>
Remove the rest of references to smp.tex
Documentation/cpufreq => Documentation/cpu-freq
DocBook/tulip.{pdf,ps,html} => DocBook/tulip-user.{pdf,ps,html}
Bunch of other typos.
Andrew Morton [Thu, 18 Mar 2004 23:00:47 +0000 (15:00 -0800)]
[PATCH] config: choice fix
From: Roman Zippel <zippel@linux-m68k.org>
When a boolean choice value has a dependency of 'm' it can be shortly
treated as a tristate symbol. This fixes this and also add a small
optimization to precompute the value of the module symbol instead of
checking it all the time.