Andrew Morton [Tue, 16 Mar 2004 23:09:29 +0000 (15:09 -0800)]
[PATCH] clean up devices.txt
From: "Cagle, John (ISS-Houston)" <john.cagle@hp.com>
Patch 1 cleans up the format by making devices.txt easily parsable.
Mainly this involved adding the word "block" after all the block major
numbers since the previous format didn't include it.
Andrew Morton [Tue, 16 Mar 2004 23:09:08 +0000 (15:09 -0800)]
[PATCH] make config_max_raw_devices work
From: "Kenneth Chen" <kenneth.w.chen@intel.com>
Even though there is a CONFIG_MAX_RAW_DEVS option, it doesn't actually
increase the number of raw devices beyond 256 because during the char
registration, it uses the standard register_chrdev() interface which has
hard coded 256 minor in it. Here is a patch that fix this problem by using
register_chrdev_region() and cdev_(init/add/del) functions.
Andrew Morton [Tue, 16 Mar 2004 23:08:58 +0000 (15:08 -0800)]
[PATCH] x86 vsyscall alignment fix
From: Andy Whitcroft <andyw@uk.ibm.com>
The vsyscall implementation for ia32 provides two different vsyscall pages;
one to use int80 and the other to use sysenter. Each includes a common
signal trailer. The kernel requires the alignment of routines in this
trailer be consistent in both copies. However this is not enforced at
compile time. Failure to maintain this alignment typically leads to an
obscure SIGSEGV in init during boot. This critical alignment requirement
is not well documented.
Below is a patch to better document the alignment requirements and to
enforce the requirement.
Andrew Morton [Tue, 16 Mar 2004 23:08:29 +0000 (15:08 -0800)]
[PATCH] s390: dasd driver fixes.
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
dasd driver fixes:
- Remove additional dasd attributes for a ccw-device if the discipline
(=driver) gets unloaded.
- Fix race of dasd_generic_offline against dasd_open.
- Remove irq_exit calls from diag interrupt handler. The irq_enter/
irq_exit is done in the external interrupt handler.
Andrew Morton [Tue, 16 Mar 2004 23:08:18 +0000 (15:08 -0800)]
[PATCH] s390: network driver fixes.
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
network driver fixes:
- Use SET_NETDEV_DEV to create the link from the network device to the
physical device. Remove link from physical to network device.
- Remove some unnecessary casts in netiucv.
- Add missing strings to dev_stat_names & dev_event_names.
- Add missing preempt_disable/preempt_enable pairs in iucv.
- Allow to change the peer username in netiucv.
Andrew Morton [Tue, 16 Mar 2004 23:07:59 +0000 (15:07 -0800)]
[PATCH] s390: common i/o layer.
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Common i/o layer fixes:
- Improve blacklist argument parsing.
- Fix device recognition for devices where SenseID fails.
- Don't try to set a device online that has no driver.
- Chain a release ccw to the unconditional reserve ccw for forced online.
- Fix irb accumulation for pure status pending with eswf set.
- Fix rc handling in qdio_shutdown.
- Improve retry behavious for busy conditions on qdio.
- Fix activity check in ccw_device_start/read_dev_chars and read_conf_data.
Andrew Morton [Tue, 16 Mar 2004 23:07:50 +0000 (15:07 -0800)]
[PATCH] s390: core
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390 core changes:
- Merge 31 and 64 bit NR_CPUS config option. Default to 32 cpus.
- Remove unused system calls from compat_linux.c.
- Add statfs64 and fstatfs64. Reserve system call number for
remap_file_pages.
- Merge do_signal32 into do_signal.
- Don't remove the per bit and the program mask from the user psw
due to a signal.
- Fix a problem with gdb and interrupted system calls.
- Fix single stepping of interrupted system calls.
- Fix compiler warnings in bitops.h.
Andrew Morton [Tue, 16 Mar 2004 23:07:29 +0000 (15:07 -0800)]
[PATCH] ppc32: Fix thinko in PCI_DMA_FOO to DMA_FOO conversion
From: Tom Rini <trini@kernel.crashing.org>
When I converted the use of PCI_DMA_foo constants to DMA_foo constants, I
forgot that it's PCI_DMA_FROMDEVICE and DMA_FROM_DEVICE. The following
fixes that.
Andrew Morton [Tue, 16 Mar 2004 23:07:19 +0000 (15:07 -0800)]
[PATCH] ppc32: Update <asm-ppc/dma-mapping.h>
From: Tom Rini <trini@kernel.crashing.org>
include/asm-ppc/dma-mapping.h was made to be a 'real' header recently and
therefore missed out on the updates that davem did to all of the other
versions. This updates <asm-ppc/dma-mapping.h> to match what's expected
now.
Andrew Morton [Tue, 16 Mar 2004 23:07:10 +0000 (15:07 -0800)]
[PATCH] ppc32: Fix PCI DMA API changes
From: Tom Rini <trini@kernel.crashing.org>
When Dave Miller updated <asm-ppc/pci.h> for the _for_device and _for_cpu
portions of the PCI DMA API, he assumed that on PPC32 consistent_sync*
would also need to be changed for device or cpu. This is not the case, so
what this does is the pci_*_for_{cpu,device} calls call
consistent_sync{,page} again.
Chen Yang [Tue, 16 Mar 2004 12:53:34 +0000 (04:53 -0800)]
[PATCH] Make intermezzo work again
- Chen Yang's fix to work with NGROUPS
- Chen Yang's fix to handle file deletion
- Remove TCGETS handling and return -ENOTTY for unknown ioctl code.
- Removed InterMezzo from BROKEN state
ATAPI multi-lun support has been broken for a long time.
It used to be that "(drive->id->last_id & 0x7) + 1" was used as
shost->max_lun and the "hdXlun=" kernel parameter could be used to
override this value.
However it was far from optimal:
- people played with "hdXlun=" and then complained about multiple instances
of the same device (most ATAPI drives respond to each LUN)
- probably some devices return 7 not 0 in id->last_id (=> 7 x same device)
This patch from Willem Riede <wrlk@riede.org> fixes it w/o need
for "hdXlun=" option. It was tested by Willem on ATAPI PD/CD drive.
Rusty Russell [Tue, 16 Mar 2004 08:38:36 +0000 (00:38 -0800)]
[PATCH] wait_task_inactive should not return on preempt
wait_task_inactive is now only used in two non-time-critical places: the
ptrace code to guarantee a schedule and kthread_bind so we can change
the thread CPU. Unfortunately with preempt, the code as stands has a
race: we might return because the thread is preempted, not because it
actually reached schedule(). The ptrace code (probably) doesn't care,
but the kthread code does.
This patch simplifies the (now over-optimized) code, and does a yield()
for the preemption case.
Jeff Garzik [Tue, 16 Mar 2004 10:15:18 +0000 (05:15 -0500)]
[netdrvr natsemi] Fix RX DMA mapping
RX skbs are always considered maximally sized, until actual reception
of the RX frame occurs. So, update this driver to always map and
unmap a maximally sized skb. This fixes this driver on several
non-x86 platforms.
Bjorn Helgaas [Tue, 16 Mar 2004 02:22:41 +0000 (18:22 -0800)]
[PATCH] ia64: fix up DMA API breakage in generic build
We also need the following patch to build the generic_defconfig
after the DMA API change:
http://linux.bkbits.net:8080/linux-2.5/cset@405490e15inT3T0H2x887j9SaMkYRQ
Andrew Morton [Mon, 15 Mar 2004 23:29:37 +0000 (15:29 -0800)]
[PATCH] ppc64: fix for massive OF properties
From: Anton Blanchard <anton@samba.org>
We have some versions of firmware out there that have huge OF properties.
So huge that we end up overwriting our initrd.
Place a 1MB limit and warn bitterly if its over this. Also fix a use of
package-to-path where the variable was 64bytes but we would pass in a
length of 255.
Andrew Morton [Mon, 15 Mar 2004 23:28:51 +0000 (15:28 -0800)]
[PATCH] Cleanup ppc64 procfs code
From: Anton Blanchard <anton@samba.org>
Cleanup ppc64 procfs code:
- Use initcalls everywhere. This allowed us to remove the iseries proc
callback interface.
- Kill proc_pmc.c. Most of it wasnt used (and we are planning to export the
PMCs via sysfs). The few things left were iseries specific so they
got moved into iSeries_proc.c.
- Kill pmc.c. We dont use those statistics and the ones that are left
can be gained via PMCs.
- Create /proc/iSeries and /proc/ppc64 very early. This means we no
longer have to call proc_ppc64_init in all the drivers, we can
assume its there.
- Fix some error return cases in rtas-proc.c and rtas-flash
- Dont even try some pseries specific drivers on pmac.
Andrew Morton [Mon, 15 Mar 2004 23:27:40 +0000 (15:27 -0800)]
[PATCH] Add slow path lookup in xics_get_irq
From: Jake Moilanen <moilanen@austin.ibm.com>
In xics_get_irq(), for a real-to-virt irq lookup, go down the
slowpath by looking through the entire virt_irq_to_real_map array
if take a miss on the radix tree. This is possible, when an
interrupt is taken before the driver has called request_irq() (eg IDE).
Andrew Morton [Mon, 15 Mar 2004 23:26:41 +0000 (15:26 -0800)]
[PATCH] Fix xics IRQ affinity
From: Anton Blanchard <anton@samba.org>
- Merge some whitespace differences with the ameslab tree
- We check for CPU_MASK_ALL in xics to send irqs to all cpus.
In some cases CPU_MASK_ALL is smaller than the cpumask (eg
NR_CPUS == 32 and cpumask is a long), so we mask it here to
be consistent.
Andrew Morton [Mon, 15 Mar 2004 23:26:29 +0000 (15:26 -0800)]
[PATCH] Fix multiple EEH-related bugs
From: Linas Vepstas <linas@austin.ibm.com>
This patch fixes multiple EEH-related bugs:
- Fixes the eeh_check_failure() usage in an interrupt context.
This routine is now safe to use in an interrupt. The fix was to
build a cache of IO addresses and check that, instead of using
the pci routines.
- Merges in Olof Johansson's sizeof patch when checking for failure
- Adds EEH tests to array/string reads
- Fixes bugs with address resolution (some i/o addresses were handled
incorrectly, resulting in EEH errors slipping by undetected.)
- Adds EEH support to the PCI Hotplug system (so that devices that
get added/removed get properly registered with the EEH subsystem.)
- Fixes improper use of /proc filesystem.
- Adds some misc statistics.
While merging Linas' patch I also converted the proc usage to
seq_single, used per cpu variables for the stats and removed the
eeh-force-off option.
Andrew Morton [Mon, 15 Mar 2004 23:26:19 +0000 (15:26 -0800)]
[PATCH] Fix for hotplug of multifunction cards.
From: Linda Xie <lxiep@us.ibm.com>
The changes in this patch are for multifunction cards insertions/removals
and bug fixes:
1. fix up new nodes' linux_phandle field.
2. new nodes' phb, devfn(and so on) need to be fixed even the nodes don't
have "interrupts".
3. change of_remove_node to non-recurisve func. The recursions will be done
by the caller.
4. add a new function -- of_finish_dynamic_node_interrupts()
Andrew Morton [Mon, 15 Mar 2004 23:22:49 +0000 (15:22 -0800)]
[PATCH] iostats averaging fix
From: Rick Lindsley <ricklind@us.ibm.com>
Fix bug #2230.
I've corresponded with the submitter and he did find a real bug -- when we
were merging I/O requests we didn't always take the oldest request start
time, which would cause a couple of the calculations like wait time and
average queue size to be too small. He found it mathematically but having
done so, I think logic and inspection makes it easy to verify.
Andrew Morton [Mon, 15 Mar 2004 23:22:38 +0000 (15:22 -0800)]
[PATCH] blk: statically initialise the congestion waitqueue_heads
On a really small memory machine (or one with a monstrous kernel memory leak)
we can end up calling blk_congestion_wait() before the waitqueue_heads are set
up.
Andrew Morton [Mon, 15 Mar 2004 23:22:26 +0000 (15:22 -0800)]
[PATCH] kill INIT_THREAD_SIZE
From: Matt Mackall <mpm@selenic.com>
This piece of the THREAD_SIZE cleanup got dropped. If you make THREAD_SIZE
> 8k, the init thread overlaps the .init section and gets smashed. I've
gone ahead and killed INIT_THREAD_SIZE throughout as it wasn't doing much.
This also saves 4k when we use 4k stacks. Please apply. Couple more minor
pieces remaining.
Andrew Morton [Mon, 15 Mar 2004 23:22:03 +0000 (15:22 -0800)]
[PATCH] slab: fix display of object length in corruption detector
From: Manfred Spraul <manfred@colorfullife.com>
print_objinfo() dumps the first few characters of an interesting object for
debugging. It used the wrong object len (including debug padding, instead
of just the data area), which could cause an oops if DEBUG_PAGEALLOC is
enabled.
Andrew Morton [Mon, 15 Mar 2004 23:21:39 +0000 (15:21 -0800)]
[PATCH] do_write_mem() return value check
From: BlaisorBlade <blaisorblade_spam@yahoo.it>, and me
- remove unused `file *' arg from do_write_mem()
- Add checking for copy_from_user() failures in do_write_mem()
- Return correct value from kmem writes() when a fault is encountered. A
write()-style syscall's return values are:
0 when nothing was written and there was no error (someone tried to
write zero bytes)
>0: the number of bytes copied, whether or not there was an error.
Userspace detects errors by noting that the write() return value is less
than was requested.
Andrew Morton [Mon, 15 Mar 2004 23:21:05 +0000 (15:21 -0800)]
[PATCH] reiserfs: fix transaction sizes
From: Chris Mason <mason@suse.com>
Make sure reiserfs uses a reasonable number when restarting long unbounded
transactions (creating holes or deleting files).
Without this patch, the number of blocks requested grows with each
transaction restart, until it hits MAX_BATCH_COUNT and starts forcing
commits with every new transaction.
Andrew Morton [Mon, 15 Mar 2004 23:20:29 +0000 (15:20 -0800)]
[PATCH] reiserfs: fix null pointer deref
From: Chris Mason <mason@suse.com>
From: Jeff Mahoney <jeffm@suse.de>
fsstress manages to setup a sequence of events that allow an attempt to
perform direct-io on a tail. bh_result->b_page == NULL, which causes the
PageLocked and PageWriteback checks to perform a NULL deref, causing the
oops.
Andrew Morton [Mon, 15 Mar 2004 23:20:05 +0000 (15:20 -0800)]
[PATCH] fbdev: character drawing enhancement.
From: James Simmons <jsimmons@infradead.org>
This patch merges two of the drawing functions. The patch uses aligned
transfers when possible even on displays where the characters are not byte
align. Tested on my my laptop for 12 bit width fonts and 8 bit wide fonts.
It works very nicely.
Andrew Morton [Mon, 15 Mar 2004 23:19:52 +0000 (15:19 -0800)]
[PATCH] page_referenced() simplification
There's no point in calling mark_page_accessed() here. The page is never on
the LRU so all mark_page_accessed() will do is to set PG_referenced, which we
immediately clear again.
Andrew Morton [Mon, 15 Mar 2004 23:19:29 +0000 (15:19 -0800)]
[PATCH] flush_scheduled_work() deadlock fix
Because keventd is a resource which is shared between unrelated parts of the
kernel it is possible for one person's workqueue handler to accidentally call
another person's flush_scheduled_work(). thockin managed it by calling
mntput() from a workqueue handler. It deadlocks.
It's simple enough to fix: teach flush_scheduled_work() to go direct when it
discovers that the calling thread is the one which should be running the
work.
Note that this can cause recursion. The depth of that recursion is equal to
the number of currently-queued works which themselves want to call
flush_scheduled_work(). If this ever exceeds three I'll eat my hat.
Andrew Morton [Mon, 15 Mar 2004 23:19:18 +0000 (15:19 -0800)]
[PATCH] selinux: fix compute_av bug
From: Stephen Smalley <sds@epoch.ncsc.mil>
This patch fixes a bug in the SELinux compute_av code; the current code
yields the right access computation but can cause unnecessary (but
harmless) processing to occur when transition permission wasn't granted in
the first place by the TE configuration. Thanks to Chad Hanson of TCS for
reporting the bug.
Andrew Morton [Mon, 15 Mar 2004 23:19:07 +0000 (15:19 -0800)]
[PATCH] kbuild: fix modpost when used with O=
From: Sam Ravnborg <sam@ravnborg.org>
modpost or to be more specific sumversion.c was not behaving correct when
used with O= and MODULE_VERSION was used. Previously it failed to use
local .h when calculation the md-sum in case of a O= build.
The following patch introduces the following:
- A generic get_next_line()
- Check that the topmost part of the directory matches
- Using strrch when checking for file with suffix .o
- Use NOFAIL for allocations in sumversion
- Avoid memory leak in new_module
The generic get_next_line will pay off when Andreas implmentation of
storing symbol addresses in a seperate file is introduced.
ver_linux hasn't displayed binutils version right for some time. This patch
corrects that and preserves the old behaviour as well, as suggested by Rusty.