]> git.hungrycats.org Git - linux/log
linux
22 years ago[PATCH] fbcon: EDD-based blacklisting
Antonino Daplas [Mon, 23 Aug 2004 05:49:47 +0000 (22:49 -0700)]
[PATCH] fbcon: EDD-based blacklisting

1. Created a database of broken displays and their associated fixes.
Original patch from Brian S. Julin <bri@tull.umassp.edu>.  Only the
monitor manufacturer and model is checked, perhaps we can also check
for the serial number?

2. Added an all_null check in edid_checksum since the checksum will also be
zero if the entire block is zeroed.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Rivafb I2C fixes
Nicolas Boichat [Mon, 23 Aug 2004 05:49:36 +0000 (22:49 -0700)]
[PATCH] Rivafb I2C fixes

The I2C busses opened by rivafb were deleted immediately after reading the
EDID, but they should be kept open, so user-space applications can use them.

They are now deleted when the driver is unloaded.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] radeonfb: cleanup and little fixes
David Eger [Mon, 23 Aug 2004 05:49:24 +0000 (22:49 -0700)]
[PATCH] radeonfb: cleanup and little fixes

Very similar to Francois Romieu's fixes for cirrusfb, here we:
* Provide meaningful error values from radeonfb_pci_register()
* Fix unbalanced pci_enable_device()
* Fix unbalanced fb_alloc_cmap()
* Fix a failure-case bug where we accidentally memset_io(0, 0, size);
* Use pci_request_regions() instead of request_mem_region()

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>
22 years ago[PATCH] break out zone free list initialization
Dave Hansen [Mon, 23 Aug 2004 05:49:13 +0000 (22:49 -0700)]
[PATCH] break out zone free list initialization

The following patch removes the individual free area initialization from
free_area_init_core(), and puts it in a new function
zone_init_free_lists().  It also creates pages_to_bitmap_size(), which is
then used in zone_init_free_lists() as well as several times in my free
area bitmap resizing patch.

First of all, I think it looks nicer this way, but it's also necessary to
have this if you want to initialize a zone after system boot, like if a
NUMA node was hot-added.  In any case, it should be functionally equivalent
to the old code.

Compiles and boots on x86.  I've been running with this for a few weeks,
and haven't seen any problems with it yet.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] make shrinker_sem an rwsem
Nick Piggin [Mon, 23 Aug 2004 05:49:02 +0000 (22:49 -0700)]
[PATCH] make shrinker_sem an rwsem

Use an rwsem to protect the shrinker list instead of a regular
semaphore.  Modifications to the list are now done under the write lock,
shrink_slab takes the read lock, and access to shrinker->nr becomes racy
(which is no different to how the page lru scanner is implemented).  The
shrinker functions become concurrent.

Previously, having the slab scanner get preempted or scheduling while
holding the semaphore would cause other tasks to skip putting pressure on
the slab.

Also, make shrink_icache_memory return -1 if it can't do anything in order
to hold pressure on this cache and prevent useless looping in shrink_slab.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] IO-APIC debug message reduction
Mark Broadbent [Mon, 23 Aug 2004 05:48:50 +0000 (22:48 -0700)]
[PATCH] IO-APIC debug message reduction

The APIC and IO-APIC code is very verbose on startup especially on SMP
machines.  This patch allows the verbosity of the APIC code to be controlled
through the boot-time option apic= using three levels: quiet, verbose and
debug.  The default level is quiet.

Signed-off-by: Mark Broadbent <markb@wetlettuce.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] x86: move PIT code to timer_pit
Zwane Mwaikambo [Mon, 23 Aug 2004 05:48:39 +0000 (22:48 -0700)]
[PATCH] x86: move PIT code to timer_pit

Now that things got cleaned up a bit, there is no real reason why the pit
initialisation code has to be in i8259.c. Move it to timer_pit.ca

Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] slab: locking optimization for cache_reap
Dimitri Sivanich [Mon, 23 Aug 2004 05:48:27 +0000 (22:48 -0700)]
[PATCH] slab: locking optimization for cache_reap

Here is another cache_reap optimization that reduces latency when applied
after the 'Move cache_reap out of timer context' patch I submitted on 7/14
(for inclusion in -mm next week).

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] get_random_bytes() returns the same on every boot
Bálint Márton [Mon, 23 Aug 2004 05:48:16 +0000 (22:48 -0700)]
[PATCH] get_random_bytes() returns the same on every boot

At boot time, get_random_bytes always returns the same random data, as if
there were a constant random seed.  For example, if I use the kernel level
ip autoconfiguration with dhcp, the kernel will create a dhcp request
packet with always the same transaction ID.  (If you have more than one
computers, and they are booting at the same time, then this is a big
problem)

That happens, because only the primary entropy pool is initialized with the
system time, in function rand_initialize.  The secondary pool is only
cleared.  In this early stage of booting, there is usually no user
interaction, or usable disk interrupts, so the kernel can't add any real
random bytes to the primary pool.  And altough the system time is in the
primary pool, the kernel does not consider it real random data, so you
can't read from the primary pool, before at least a part of it will be
filled with some real randomness (interrupt timing).  Therefore all random
data will come from the secondary pool, and the kernel cannot reseed the
secondary pool, because there is no real randomness in the primary one.

The solution is simple: Initialize not just the primary, but also the
secondary pool with the system time.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Subject: cdrom.c get_last_written fixup
Samuel Thibault [Mon, 23 Aug 2004 05:48:04 +0000 (22:48 -0700)]
[PATCH] Subject: cdrom.c get_last_written fixup

There's something wrong in cdrom.c: cdrom_get_last_written() for instance
calls cdrom_get_disc_info() and cdrom_get_track_info() to get information
about tracks, but these functions don't ensure that all the
track_information or disc_information structure is filled:

/* (buflen was first set to 8 to get track_information_length field) */

if ((ret = cdo->generic_packet(cdi, &cgc)))
return ret;

cgc.buflen = be16_to_cpu(ti->track_information_length) +
     sizeof(ti->track_information_length);

if (cgc.buflen > sizeof(track_information))
cgc.buflen = sizeof(track_information);

cgc.cmd[8] = cgc.buflen;
return cdo->generic_packet(cdi, &cgc);

The second test ensures that at least we won't overflow the structure, but
nothing ensures that all the structure will be filled.

And indeed, we have a drive here that won't fill it all: the returned
track_information_length field will be *less than*
sizeof(track_information) - sizeof(ti->track_information_length), so that
cdrom_get_last_written() reads values that weren't filled in!  As a result,
we are sometimes unable to read some parts of CDROMs, depending on the
uninitialized state of the structure...

Here is a patch that adds filling checks: cdrom_get_disc_info() and
cdrom_get_track_info() return the actual filled length, and it's up to the
caller to check that this is enough for him to get the values it wants.

Note: adding something like a
#define spanof(TYPE, MEMBER) ((size_t) ((&((TYPE *)0)->MEMBER)+1))
definition just near that of offsetof() in include/linux/stddef.h would
make it more pretty, but still it won't help for bitfields :/

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] s390: Use include/asm-generic/dma-mapping-broken.h
Arthur Othieno [Mon, 23 Aug 2004 05:47:53 +0000 (22:47 -0700)]
[PATCH] s390: Use include/asm-generic/dma-mapping-broken.h

ChangeSet 1.1371.413.23 [1] introduced the file
include/asm-generic/dma-mapping-broken.h for architectures that don't
support the new DMA API. I don't know if this is the case with s390,
however, ChangeSet 1.1371.445.6 [2] introduced a set of changes that
duplicate those in include/asm-generic/dma-mapping-broken.h.

This patch squishes that duplication by simply including
include/asm-generic/dma-mapping-broken.h in
include/asm-s390/dma-mapping.h.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] remove dead prototypes
Carl Spalletta [Mon, 23 Aug 2004 05:47:41 +0000 (22:47 -0700)]
[PATCH] remove dead prototypes

Remove a whole bunch of prototypes which declare no-longer-present functions.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix x86-64 singlestep through sigreturn system call
Roland McGrath [Mon, 23 Aug 2004 05:47:28 +0000 (22:47 -0700)]
[PATCH] Fix x86-64 singlestep through sigreturn system call

This patch just directly clones Davide Libenzi's i386 code for x86-64 in
both 64-bit and 32-bit cases.  With this, the behavior of single-stepping
all system calls is consistent.

The syscall exit tracing caused by TIF_SINGLESTEP is superfluous in the
case of sysret returns, but harmlessly so (since continuing afterward with
PTRACE_CONT will have cleared TF as well as TIF_SINGLESTEP).  I figured
that little bit of extra processing in the single-step case was better than
adding code to ignore the flag in the sysret case.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gettimeofday nanoseconds patch
Christoph Lameter [Mon, 23 Aug 2004 05:47:16 +0000 (22:47 -0700)]
[PATCH] gettimeofday nanoseconds patch

This issue was discussed on lkml and linux-ia64.  The patch introduces
"getnstimeofday" and removes all the code scaling gettimeofday to
nanoseoncs.  It makes it possible for the posix-timer functions to return
higher accuracy.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Move cache_reap out of timer context
Dimitri Sivanich [Mon, 23 Aug 2004 05:47:04 +0000 (22:47 -0700)]
[PATCH] Move cache_reap out of timer context

I'm submitting two patches associated with moving cache_reap functionality
out of timer context.  Note that these patches do not make any further
optimizations to cache_reap at this time.

The first patch adds a function similiar to schedule_delayed_work to allow
work to be scheduled on another cpu.

The second patch makes use of schedule_delayed_work_on to schedule
cache_reap to run from keventd.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] remove sync() from panic
Christian Bornträger [Mon, 23 Aug 2004 05:46:53 +0000 (22:46 -0700)]
[PATCH] remove sync() from panic

Various people have reported deadlocks and it has aways seemed a bit risky
to try to sync the filesystems at this stage anyway.

"I have seen panic failing two times lately on an SMP system. The box
 panic'ed but was running happily on the other cpus. The culprit of this
 failure is the fact, that these panics have been caused by a block device
 or a filesystem (e.g. using errors=panic). In these cases the  likelihood
 of a failure/hang of  sys_sync() is high. This is exactly what happened in
 both cases I have seen. Meanwhile the other cpus are happily continuing
 destroying data as the kernel has a severe problem but its not aware of
 that as smp_send_stop happens after sys_sync."

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] warning on NUMA-Q
Martin J. Bligh [Mon, 23 Aug 2004 05:46:42 +0000 (22:46 -0700)]
[PATCH] warning on NUMA-Q

arch-i386-kernel-smpc-gcc341-inlining-fix.patch seems to cause
the following warning:

include/asm-i386/mach-numaq/mach_ipi.h:4: warning: static declaration for `send_
IPI_mask_sequence' follows non-static.

This should fix it (and make it match the other subarches):

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Enable all events for initramfs
Hannes Reinecke [Mon, 23 Aug 2004 05:46:30 +0000 (22:46 -0700)]
[PATCH] Enable all events for initramfs

Currently most driver events are not sent out when using initramfs as
driver_init() (which triggers the events) is called before init_workqueues.

This patch rearranges the init calls so that the hotplug event queue is
enabled prior to calling driver_init(), hence we're getting all hotplug
events again.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] send_IPI_mask_bitmask() build fix
Andrew Morton [Mon, 23 Aug 2004 05:46:19 +0000 (22:46 -0700)]
[PATCH] send_IPI_mask_bitmask() build fix

With gcc-3.4.1:

arch/i386/kernel/smp.c: In function `flush_tlb_others':
arch/i386/kernel/smp.c:161: sorry, unimplemented: inlining failed in call
to 'send_IPI_mask_bitmask': function not considered for inlining
arch/i386/kernel/smp.c:9: sorry, unimplemented: called from here

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Make i/dhash_entries cmdline work as it use to.
Jose R. Santos [Mon, 23 Aug 2004 05:46:07 +0000 (22:46 -0700)]
[PATCH] Make i/dhash_entries cmdline work as it use to.

I was looking at the recent for >MAX_ORDER hash tables but it seems that
the patch limits the number of entries to what it thinks are good values
and the i/dhash_entries cmdline options can not exceed this.

This seems to limit the usability of the patch on systems were larger
allocations that the ones the kernel calculates are desired.

- Make ihash_entries and dhash_entries cmdline option behave like it use to.

- Remove MAX_SYS_HASH_TABLE_ORDER.  Limit the max size to 1/16 the total
  number of pages.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] split generic_file_aio_write into buffered and direct I/O parts
Christoph Hellwig [Mon, 23 Aug 2004 05:45:56 +0000 (22:45 -0700)]
[PATCH] split generic_file_aio_write into buffered and direct I/O parts

If the generic code falls back to buffered I/O on a hole XFS needs to
relock, so we need to have separate functions to call unless we want to
duplicate everything.  The XFS patch still needs some cleaning up, but I'll
try to get it in before 2.6.8.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] arch/i386/kernel/smp.c gcc341 inlining fix
Mikael Pettersson [Mon, 23 Aug 2004 05:45:44 +0000 (22:45 -0700)]
[PATCH] arch/i386/kernel/smp.c gcc341 inlining fix

gcc-3.4.1 errors out in 2.6.8-rc1-mm1 at arch/i386/kernel/smp.c:

arch/i386/kernel/smp.c: In function `flush_tlb_others':
arch/i386/kernel/smp.c:161: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_bitmask': function not considered for inlining
arch/i386/kernel/smp.c:9: sorry, unimplemented: called from here
make[1]: *** [arch/i386/kernel/smp.o] Error 1
make: *** [arch/i386/kernel] Error 2

The <mach_ipi.h> inlines depend on functions defined further down in smp.c.
 Moving the #include eliminates the problem.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] clean up __always_inline__ usage
Arnd Bergmann [Mon, 23 Aug 2004 05:45:33 +0000 (22:45 -0700)]
[PATCH] clean up __always_inline__ usage

I find it somewhat annoying that the preprocessor expands every "inline" to
"__inline__ __attribute__((always_inline)) __attribute__((always_inline))"
in the current code.

Fix that up.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] #define inline as __attribute__((always_inline)) also for gcc >= 3.4
Adrian Bunk [Mon, 23 Aug 2004 05:45:22 +0000 (22:45 -0700)]
[PATCH] #define inline as __attribute__((always_inline)) also for gcc >= 3.4

Rationale:

- if gcc 3.4 can't inline a function marked as "inline" that's a strong
  hint that further investigation is required

- I strongly prefer a compile error over a potential runtime problem

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:45:10 +0000 (22:45 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:44:58 +0000 (22:44 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:44:47 +0000 (22:44 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:44:35 +0000 (22:44 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:44:24 +0000 (22:44 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:44:13 +0000 (22:44 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:44:01 +0000 (22:44 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:43:48 +0000 (22:43 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5: fixmap.h fix
Andi Kleen [Mon, 23 Aug 2004 05:43:38 +0000 (22:43 -0700)]
[PATCH] gcc-3.5: fixmap.h fix

Not strictly needed, since we're forcing `inline' to always_inline, but it's
good for documentation purposes - This function needs the always_inline
otherwise you get a link error when the compile time test is not optimized
away.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:43:26 +0000 (22:43 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:43:14 +0000 (22:43 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:43:03 +0000 (22:43 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:42:47 +0000 (22:42 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] gcc-3.5 fixes
Andi Kleen [Mon, 23 Aug 2004 05:42:36 +0000 (22:42 -0700)]
[PATCH] gcc-3.5 fixes

Trivial gcc-3.5 build fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] percpu: cpu_tlbstate
Shai Fultheim [Mon, 23 Aug 2004 05:42:21 +0000 (22:42 -0700)]
[PATCH] percpu: cpu_tlbstate

Use the percpu infrastructure rather than open-coded array[NR_CPUS].

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] percpu: init_tss
Shai Fultheim [Mon, 23 Aug 2004 05:42:10 +0000 (22:42 -0700)]
[PATCH] percpu: init_tss

Use the percpu infrastructure rather than open-coded array[NR_CPUS].

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] percpu: cpu_gdt_table
Shai Fultheim [Mon, 23 Aug 2004 05:41:58 +0000 (22:41 -0700)]
[PATCH] percpu: cpu_gdt_table

Use the percpu infrastructure rather than open-coded array[NR_CPUS].

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] idr.c: remove stale comment
Christoph Hellwig [Mon, 23 Aug 2004 05:41:46 +0000 (22:41 -0700)]
[PATCH] idr.c: remove stale comment

The generation counters were removed from the idr code.  Update idr.c
comments, now uses doc-book style API documentation.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] i810_audio: Fix the error path of resource management
Takashi Iwai [Mon, 23 Aug 2004 05:41:34 +0000 (22:41 -0700)]
[PATCH] i810_audio: Fix the error path of resource management

The patch adds the check of return value from resquest_region() to avoid
the confliction of resource management with ALSA intel8x0 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] cleanup of ipc/msg.c
Manfred Spraul [Mon, 23 Aug 2004 05:41:21 +0000 (22:41 -0700)]
[PATCH] cleanup of ipc/msg.c

Attached is a cleanup of the main loops in sys_msgrcv and sys_msgsnd, based on
ipc_lock_by_ptr().  Most backward gotos are gone, instead normal "for(;;)"
loops until a suitable message is found.

Description:

- General cleanup of sys_msgrcv and sys_msgsnd: the function were too
  convoluted.

- Enable lockless receive, update comments.

- Use ipc_getref for sys_msgsnd(), it's better than rechecking that the
  msqid is still valid.

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ipc: enforce SEMVMX limit for undo
Manfred Spraul [Mon, 23 Aug 2004 05:41:02 +0000 (22:41 -0700)]
[PATCH] ipc: enforce SEMVMX limit for undo

Independent from the other patches:

undo operations should not result in out of range semaphore values.  The test
for newval > SEMVMX is missing.  The attached patch adds the test and a
comment.

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ipc: remove sem_revalidate
Manfred Spraul [Mon, 23 Aug 2004 05:40:49 +0000 (22:40 -0700)]
[PATCH] ipc: remove sem_revalidate

The attached patch removes sem_revalidate and replaces it with
ipc_rcu_getref() calls followed by ipc_lock_by_ptr().

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ipc: Add refcount to ipc_rcu_alloc
Manfred Spraul [Mon, 23 Aug 2004 05:40:37 +0000 (22:40 -0700)]
[PATCH] ipc: Add refcount to ipc_rcu_alloc

The lifetime of the ipc objects (sem array, msg queue, shm mapping) is
controlled by kern_ipc_perms->lock - a spinlock.  There is no simple way to
reacquire this spinlock after it was dropped to
schedule()/kmalloc/copy_{to,from}_user/whatever.

The attached patch adds a reference count as a preparation to get rid of
sem_revalidate().

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] devicemapper: use an IDR tree for tracking minors
Kevin Corry [Mon, 23 Aug 2004 05:40:26 +0000 (22:40 -0700)]
[PATCH] devicemapper: use an IDR tree for tracking minors

Keep track of allocated minor numbers with an IDR instead of a bit-set.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] err2-6: hashbin_remove_this() locking fix
Andrew Morton [Mon, 23 Aug 2004 05:40:14 +0000 (22:40 -0700)]
[PATCH] err2-6: hashbin_remove_this() locking fix

Fix locking error identified by the Stanford locking checker.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Don't use SYSGOOD for ptrace singlestep
Davide Libenzi [Mon, 23 Aug 2004 05:40:02 +0000 (22:40 -0700)]
[PATCH] Don't use SYSGOOD for ptrace singlestep

The ptrace single step mode should not use the SYSGOOD bit and should not
report SIGTRAP|0x80 to the ptrace parent.  The following patch add an
explicit check and to not add 0x80 in this is a singlestep trap.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] memory-backed inodes fix
Andrew Morton [Mon, 23 Aug 2004 05:39:51 +0000 (22:39 -0700)]
[PATCH] memory-backed inodes fix

If an inode is backed by a memory-backed backing_dev, and it is not a blockdev
inode, we can skip the entire superblock duwing writeback scanning.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] multipath readahead fix fix
Neil Brown [Mon, 23 Aug 2004 05:39:38 +0000 (22:39 -0700)]
[PATCH] multipath readahead fix fix

Make sure the right errno is return from a readahead error in multipath

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] handle blk_queue_tags_resize() allocation failures
Brian King [Mon, 23 Aug 2004 05:39:26 +0000 (22:39 -0700)]
[PATCH] handle blk_queue_tags_resize() allocation failures

Fixes blk_queue_resize_tags to properly handle allocation failures.

Currently, if a memory allocation failure occurs during
blk_queue_resize_tags, the tag map ends up getting freed, which should
not happen.  The old tag map should be preserved and only the resize
should fail.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] blk_resize_tags() fix
Brian King [Mon, 23 Aug 2004 05:39:14 +0000 (22:39 -0700)]
[PATCH] blk_resize_tags() fix

init_tag_map should not initialize the busy_list, refcnt, or busy fields in
the tag map since blk_queue_resize_tags can call it while requests are
active.  Patch moves this initialization into blk_queue_init_tags.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] blk_queue_free_tags() fix
Brian King [Mon, 23 Aug 2004 05:39:02 +0000 (22:39 -0700)]
[PATCH] blk_queue_free_tags() fix

This is a resend of three ll_rw_blk patches related to tagged queuing.

Currently blk_queue_free_tags cannot be called with ops outstanding.  The
scsi_tcq API defined to LLD scsi drivers allows for scsi_deactivate_tcq to
be called (which calls blk_queue_free_tags) with ops outstanding.  Change
blk_queue_free_tags to no longer free the tags, but rather just disable
tagged queuing and also modify blk_queue_init_tags to handle re-enabling
tagged queuing after it has been disabled.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ext3 barrier support
Jens Axboe [Mon, 23 Aug 2004 05:38:49 +0000 (22:38 -0700)]
[PATCH] ext3 barrier support

Mount with "mount -o barrier=1" to enable barriers.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] reiserfs v3 barrier support
Chris Mason [Mon, 23 Aug 2004 05:38:37 +0000 (22:38 -0700)]
[PATCH] reiserfs v3 barrier support

Add reiserfs support for flush barriers, mount with -o barrier=flush to enable
them.  Barriers are triggered on fsync and for log commits.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] add BH_Eopnotsupp for testing async barrier failures
Chris Mason [Mon, 23 Aug 2004 05:38:24 +0000 (22:38 -0700)]
[PATCH] add BH_Eopnotsupp for testing async barrier failures

In order for filesystems to detect asynchronous ordered write failures for
buffers sent via submit_bh, they need a bit they can test for in the buffer
head.  This adds BH_Eopnotsupp and the related buffer operations

end_buffer_write_sync is changed to avoid a printk for BH_Eoptnotsupp
related failures, since the FS is responsible for a retry.

sync_dirty_buffer is changed to test for BH_Eopnotsupp and return
-EOPNOTSUPP to the caller

Some of this came from Jens Axboe

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] make sync_dirty_buffer() return something useful
Andrew Morton [Mon, 23 Aug 2004 05:38:12 +0000 (22:38 -0700)]
[PATCH] make sync_dirty_buffer() return something useful

Make sync_dirty_buffer() return the result of its syncing.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] disk barriers: MD
Jens Axboe [Mon, 23 Aug 2004 05:38:00 +0000 (22:38 -0700)]
[PATCH] disk barriers: MD

md bits

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] disk barriers: devicemapper
Jens Axboe [Mon, 23 Aug 2004 05:37:47 +0000 (22:37 -0700)]
[PATCH] disk barriers: devicemapper

dm bits

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] disk barriers: scsi
Jens Axboe [Mon, 23 Aug 2004 05:37:31 +0000 (22:37 -0700)]
[PATCH] disk barriers: scsi

scsi bits

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] disk barriers: IDE
Jens Axboe [Mon, 23 Aug 2004 05:37:19 +0000 (22:37 -0700)]
[PATCH] disk barriers: IDE

ide bits

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] disk barriers: core
Jens Axboe [Mon, 23 Aug 2004 05:37:06 +0000 (22:37 -0700)]
[PATCH] disk barriers: core

IDE disk barrier core.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ptrace single-stepping fix
Davide Libenzi [Mon, 23 Aug 2004 05:36:54 +0000 (22:36 -0700)]
[PATCH] ptrace single-stepping fix

This patch permits a ptrace process on x86 to "see" the instruction following
the INT #80h op.  This has been tested on 2.6.6 using the appended test
source.  Running over this:

80485a9:       b8 14 00 00 00          mov    $0x14,%eax
80485ae:       cd 80                   int    $0x80
80485b0:       89 45 ec                mov    %eax,0xffffffec(%ebp)
80485b3:       eb f4                   jmp    80485a9 <main+0x85>

it produces:

waiting ...
done: pid=12387  status=1407
sig=5
EIP=0x080485a9
waiting ...
done: pid=12387  status=1407
sig=5
EIP=0x080485ae
waiting ...
done: pid=12387  status=1407
sig=5
EIP=0x080485b0
waiting ...
done: pid=12387  status=1407
sig=5
EIP=0x080485b3

(Andi says: "I think this patch is a bad idea.  The ptrace handling is
traditionally fragile (I remember when merging a rather simple patch from IBM
for DR allocation long ago into the suse it broke several debuggers).  If you
really want to do that wait for 2.7.")

test-program.c:

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <linux/user.h>
#include <linux/unistd.h>

int main(int ac, char **av) {
int i, status, res;
long start, end;
pid_t cpid, pid;
struct user_regs_struct ur;
struct sigaction sa;

sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
sigaction(SIGCHLD, &sa, NULL);

printf("nargs=%d\n", ac);
if (ac == 1)
goto tracer;

printf("arg=%s\n", av[1]);
loop:
__asm__ volatile ("int $0x80"
  : "=a" (res)
  : "0" (__NR_getpid));
goto loop;
endloop:
exit(0);

tracer:
if ((cpid = fork()) != 0)
goto parent;

printf("child=%d\n", getpid());
ptrace(PTRACE_TRACEME, 0, NULL, NULL);

execl(av[0], av[0], "child", NULL);

exit(0);

parent:
start = (long) &&loop;
end = (long) &&endloop;

printf("pchild=%d\n", cpid);

for (;;) {
pid = wait(&status);
if (pid != cpid)
continue;
res = WSTOPSIG(status);
if (ptrace(PTRACE_GETREGS, pid, NULL, &ur)) {
printf("[%d] error: ptrace(PTRACE_GETREGS, %d)\n",
       pid, pid);
return 1;
}

if (ptrace(PTRACE_SINGLESTEP, pid, NULL, res != SIGTRAP ? res: 0)) {
perror("ptrace(PTRACE_SINGLESTEP)");
return 1;
}

if (ur.eip >= start && ur.eip <= end)
break;
}

for (i = 0; i < 15; i++) {
printf("waiting ...\n");
pid = wait(&status);
printf("done: pid=%d  status=%d\n", pid, status);
if (pid != cpid)
continue;
res = WSTOPSIG(status);
printf("sig=%d\n", res);
if (ptrace(PTRACE_GETREGS, pid, NULL, &ur)) {
printf("[%d] error: ptrace(PTRACE_GETREGS, %d)\n",
       pid, pid);
return 1;
}

printf("EIP=0x%08x\n", ur.eip);

if (ptrace(PTRACE_SINGLESTEP, pid, NULL, res != SIGTRAP ? res: 0)) {
perror("ptrace(PTRACE_SINGLESTEP)");
return 1;
}
}

if (ptrace(PTRACE_CONT, cpid, NULL, SIGKILL)) {
perror("ptrace(PTRACE_SINGLESTEP)");
return 1;
}

return 0;
}

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] i386 oops output: dump preceding code
Keith Owens [Mon, 23 Aug 2004 05:36:42 +0000 (22:36 -0700)]
[PATCH] i386 oops output: dump preceding code

This teaches the i386 oops dumper to dump opcodes preceding and after the
offending EIP.  Supporting code against ksymoops has been tested and produces
output like the below.

Support for this was added to ksymoops-2.4.9.

Note that ksymoops will guarantee that the disassembly after the <eip> value
is always in sync - if the disassembly from the start of the Code: line does
not sync up with the EIP address ksymoops will perform the resync.

Warning (merge_maps): no symbols in merged map
Mar 18 23:47:36 vmm kernel: kernel BUG at fs/open.c:802!
Mar 18 23:47:36 vmm kernel: invalid operand: 0000 [#1]
Mar 18 23:47:36 vmm kernel: CPU:    0
Mar 18 23:47:36 vmm kernel: EIP:    0060:[<c014fedf>] VLI    Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
Mar 18 23:47:36 vmm kernel: EFLAGS: 00010246
Mar 18 23:47:36 vmm kernel: eax: ccdfb900   ebx: 4001020d   ecx: 00000000   edx: 0000007b
Mar 18 23:47:36 vmm kernel: esi: 00000000   edi: bfffdd70   ebp: ccdfdfbc   esp: ccdfdfb0
Mar 18 23:47:36 vmm kernel: ds: 007b   es: 007b   ss: 0068
Mar 18 23:47:36 vmm kernel: Stack: 4001020d 00000000 bfffdd70 ccdfc000 c0109213 4001020d 00000000 00000003
Mar 18 23:47:36 vmm kernel:        00000000 bfffdd70 bfffdc88 00000005 0000007b 0000007b 00000005 4000ef94
Mar 18 23:47:36 vmm kernel:        00000073 00000206 bfffdbd8 0000007b
Mar 18 23:47:36 vmm kernel: Call Trace:
Mar 18 23:47:36 vmm kernel:  [<c0109213>] syscall_call+0x7/0xb
Mar 18 23:47:36 vmm kernel: Code: 14 98 f0 81 41 04 00 00 00 01 5b 89 ec 5d c3 90 b8 00 e0 ff ff 21 e0 55 89 e5 57 56 53 8b 00 81 b8 e4 01 00 00 0f 27 00 00 75 08 <0f> 0b 22 03 85 18 2f c0 8b 45 08 50 e8 30 d4 00 00 89 c7 83 c4

>>EIP; c014fedf No symbols available   <=====

Trace; c0109213 No symbols available

This architecture has variable length instructions, decoding before eip
is unreliable, take these instructions with a pinch of salt.

Code;  c014feb4 No symbols available
00000000 <_EIP>:
Code;  c014feb4 No symbols available
   0:   14 98                     adc    $0x98,%al
Code;  c014feb6 No symbols available
   2:   f0 81 41 04 00 00 00      lock addl $0x1000000,0x4(%ecx)
Code;  c014febd No symbols available
   9:   01
Code;  c014febe No symbols available
   a:   5b                        pop    %ebx
Code;  c014febf No symbols available
   b:   89 ec                     mov    %ebp,%esp
Code;  c014fec1 No symbols available
   d:   5d                        pop    %ebp
Code;  c014fec2 No symbols available
   e:   c3                        ret
Code;  c014fec3 No symbols available
   f:   90                        nop
Code;  c014fec4 No symbols available
  10:   b8 00 e0 ff ff            mov    $0xffffe000,%eax
Code;  c014fec9 No symbols available
  15:   21 e0                     and    %esp,%eax
Code;  c014fecb No symbols available
  17:   55                        push   %ebp
Code;  c014fecc No symbols available
  18:   89 e5                     mov    %esp,%ebp
Code;  c014fece No symbols available
  1a:   57                        push   %edi
Code;  c014fecf No symbols available
  1b:   56                        push   %esi
Code;  c014fed0 No symbols available
  1c:   53                        push   %ebx
Code;  c014fed1 No symbols available
  1d:   8b 00                     mov    (%eax),%eax
Code;  c014fed3 No symbols available
  1f:   81 b8 e4 01 00 00 0f      cmpl   $0x270f,0x1e4(%eax)
Code;  c014feda No symbols available
  26:   27 00 00
Code;  c014fedd No symbols available
  29:   75 08                     jne    33 <_EIP+0x33> c014fee7 No symbols available

This decode from eip onwards should be reliable

Code;  c014fedf No symbols available
00000000 <_EIP>:
Code;  c014fedf No symbols available   <=====
   0:   0f 0b                     ud2a      <=====
Code;  c014fee1 No symbols available
   2:   22 03                     and    (%ebx),%al
Code;  c014fee3 No symbols available
   4:   85 18                     test   %ebx,(%eax)
Code;  c014fee5 No symbols available
   6:   2f                        das
Code;  c014fee6 No symbols available
   7:   c0 8b 45 08 50 e8 30      rorb   $0x30,0xe8500845(%ebx)
Code;  c014feed No symbols available
   e:   d4 00                     aam    $0x0
Code;  c014feef No symbols available
  10:   00                        .byte 0x0
Code;  c014fef0 No symbols available
  11:   89 c7                     mov    %eax,%edi
Code;  c014fef2 No symbols available
  13:   83                        .byte 0x83
Code;  c014fef3 No symbols available
  14:   c4                        .byte 0xc4

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix visws kernel build
Andrey Panin [Mon, 23 Aug 2004 05:36:30 +0000 (22:36 -0700)]
[PATCH] fix visws kernel build

  CC      arch/i386/kernel/cpu/intel.o
In file included from arch/i386/kernel/cpu/intel.c:19:
include/asm-i386/mach-visws/mach_apic.h: In function `cpu_present_to_apicid':
include/asm-i386/mach-visws/mach_apic.h:67: error: `BAD_APICID' undeclared (first use in this function)
include/asm-i386/mach-visws/mach_apic.h:67: error: (Each undeclared identifier is reported only once
include/asm-i386/mach-visws/mach_apic.h:67: error: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ibmveth: add memory barrier for hypervisor synchronisation
Santiago Leon [Mon, 23 Aug 2004 05:36:18 +0000 (22:36 -0700)]
[PATCH] ibmveth: add memory barrier for hypervisor synchronisation

This patch adds a memory barrier to ensure synchronization with the
hypervisor (and avoid a panic when the hypervisor is halfway through
writing to the descriptor).  It also removes an unnecessary check that is
flawed anyway because the value can change between the atomic_inc() and the
assert.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ibmveth: hypervisor return value fix
Santiago Leon [Mon, 23 Aug 2004 05:36:06 +0000 (22:36 -0700)]
[PATCH] ibmveth: hypervisor return value fix

This patch checks for the LongBusy return code from the hypervisor, and
retries the operation (which is what the hypervisor expects the driver
to do). Please apply.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ibmveth: race fixes
Dave Hansen [Mon, 23 Aug 2004 05:35:55 +0000 (22:35 -0700)]
[PATCH] ibmveth: race fixes

This patch fixes a race condition that would panic the kernel when
replenishing a buffer pool.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ibmveth: module tag fixes
Santiago Leon [Mon, 23 Aug 2004 05:35:43 +0000 (22:35 -0700)]
[PATCH] ibmveth: module tag fixes

This and the following three patches contain bug fixes found in the
stabilization of SLES9.

This patch adds a call to MODULE_VERSION and changes the MODULE_AUTHOR call
to me (obviously with Dave Larson's permission).  It also increments the
version number to keep track of the bug fixes.  Please apply.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] HVCS fixes
Ryan S. Arnold [Mon, 23 Aug 2004 05:35:31 +0000 (22:35 -0700)]
[PATCH] HVCS fixes

Here are a set of HVCS (drivers/char/hvcs.c) fixes that were suggested by Jeff
Garzik on July 29th in his review of this driver as well as some other fixes
for problems I found while reviewing the driver.  These are all relatively
minor, but necessary.

- Cleaned up curly braces on single line conditional blocks.

- Replaced debug memset(...,0x3F,...) with memset(...,0x00,...).

- Removed explicit '= 0' after static int declarations since these default
  to zero.

- Removed list_for_each_safe() instances and replaced with
  list_for_each_entry() which cut down on amt of code.  The 'safe' version is
  un-needed now that the driver is using spinlocks.

- Changed spin_lock_irqsave() to spin_lock() when locking hvcs_structs_lock
  and hvcs_pi_lock since these are not touched in an int handler.

- changed spin_lock_irqsave() to spin_lock() in interrupt handler.

- Initialized hvcs_structs_lock and hvcs_pi_lock to SPIN_LOCK_UNLOCKED at
  declaration tiem rather than in hvcs_module_init().

- Added spin_lock around list_del() in destroy_hvcs_struct() to protect the
  list traversal from deletion.  The original omission was an oversight.

- Removed '= NULL' from pointer declarations since they are initialized NULL
  by default.

- Removed wmb() instance from hvcs_try_write().  They probably aren't needed
  with locking in place.

- Added check and cleanup for hvcs_pi_buff = kmalloc() in
  hvcs_module_init().

- Exposed hvcs_struct.index via a sysfs attribute so that the coupling
  between /dev/hvcs* and a vty-server can be systematically determined.

- Moved kobject_put() in hvcs_open() outside of the
  spin_unlock_irqrestore().

- In hvcs_probe() changed kmalloc(sizeof(*hvcsd),...) to
  kmalloc(sizeof(struct hvcs_struct)) because hvcsd references a NULL pointer
  at the time of kmalloc.

- Incremented the HVCS_DRIVER_VERSION to 1.3.1

arch/ppc64/kernel/hvcserver.c:

- Changed function documentation of EXPORTed functions to comply with proper
  kernel-doc documentation style.

- Changed 'unsigned int' types to 'uint32_t' to comply with how unit
  addresses and partition IDs are handled in other arch/ppc64 vterm code.

- Cleaned up curly braces on single line conditional blocks.

include/asm-ppc64/hvcserver.h:

- Added kernel-doc style documentation for hvcs_partner_info struct.

- changed 'unsigned int' types to 'uint32_t' to comply with how unit
  addresses and partition IDs are handled in other arch/ppc64 vterm code.

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>
22 years ago[PATCH] ppc64: mf_proc file position fix
Dave Boutcher [Mon, 23 Aug 2004 05:35:19 +0000 (22:35 -0700)]
[PATCH] ppc64: mf_proc file position fix

arch/ppc64/kernel/mf_proc.c uses a bad interface for moving along file
position in a proc_write routine.  This quit working altogether in 2.6.8.
Patch to fix.  And I did a quick scan of the kernel to see if anyone else
was similarly broken...apparantly not :-)

Fixes a broken update of f_pos in a proc file write routine.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: Use correct buffer size in RTAS call
Paul Mackerras [Mon, 23 Aug 2004 05:35:08 +0000 (22:35 -0700)]
[PATCH] ppc64: Use correct buffer size in RTAS call

Firmware expects the size of the buffer that you hand it when you ask it
for information about a hardware error to be of a very specific size, but
different versions of firmware appearently expect different sizes; using
the wrong size results in a painful, hard-to-debug crash in firmware.  Benh
provided a patch for this some months ago, but appreantly missed this code
path.  This patch sets up the log buffer size dynamically; it also fixes a
bug with the return code not being handled correctly.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: Extend ioremap/iounmap infrastructure
Paul Mackerras [Mon, 23 Aug 2004 05:34:52 +0000 (22:34 -0700)]
[PATCH] ppc64: Extend ioremap/iounmap infrastructure

The patch below implements the ability to query outstanding imalloc regions
for a given virtual address range.  (Imalloc is the allocator of virtual
space for ioremap.) The patch extends im_get_area() to allow a region
criterion of IM_REGION_SUPERSET.  For a particular "superset" virtual
address and size passed into im_get_area(), the function returns the first
outstanding region that is contained within this superset region.

The patch also changes iounmap_explicit() to allow for the unmapping of all
regions that fit under a "superset".

This ability is necessary for dynamic (runtime) removal of pci host bridges
(PHBs).  For a PHB removal, the platform specification (the RPA) requires
that all of its children slots already be dynamically removed.  Each of
these slot-level removals has fractured the imalloc region assigned to the
PHB at boot.  At PHB removal time, it is necessary to iounmap() the
remaining artifacts of the initial PHB region.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64 iSeries virtual DVD-RAM
Stephen Rothwell [Mon, 23 Aug 2004 05:34:40 +0000 (22:34 -0700)]
[PATCH] ppc64 iSeries virtual DVD-RAM

This patch adds the ability to use DVD-RAM drives to the iSeries virtual
cdrom driver.  This version adresses (hopefully) Jens comments on the
previous one.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: better little-endian bitops
Paul Mackerras [Mon, 23 Aug 2004 05:34:28 +0000 (22:34 -0700)]
[PATCH] ppc64: better little-endian bitops

Below patch reuses the big-endian bitops for the little endian ones, and
moves the ext2_{set,clear}_bit_atomic functions to be truly atomic instead
of lock based.

This requires that the bitmaps passed to the ext2_* bitop functions are
8-byte aligned.  I have been assured that they will be 512-byte or
1024-byte aligned, and sparc and ppc32 also impose an alignment requirement
on the bitmap.

Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: rtas_call was calling kmalloc too early
Paul Mackerras [Mon, 23 Aug 2004 05:34:16 +0000 (22:34 -0700)]
[PATCH] ppc64: rtas_call was calling kmalloc too early

At present rtas_call() can be called before the kmalloc subsystem is
initialized, and if RTAS reports a hardware error, the code tries to do a
kmalloc to make a copy of the error report.  This patch changes it so that
we don't do the kmalloc in that situation.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: fix eeh_memcpy_toio() prototype
Linas Vepstas [Mon, 23 Aug 2004 05:34:04 +0000 (22:34 -0700)]
[PATCH] ppc64: fix eeh_memcpy_toio() prototype

Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: tweak schedule_timeout in __cpu_die
Nathan Lynch [Mon, 23 Aug 2004 05:33:51 +0000 (22:33 -0700)]
[PATCH] ppc64: tweak schedule_timeout in __cpu_die

The current code does schedule_timeout(HZ) when waiting for a cpu to die,
which is a bit coarse and tends to limit the "throughput" of my stress
tests :)

Change the HZ timeout to HZ/5, increase the number of tries to 25 so the
overall wait time is similar.  In practice, I've never seen the loop need
more than two iterations.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: switch screen_info init to C99
Olof Johansson [Mon, 23 Aug 2004 05:33:39 +0000 (22:33 -0700)]
[PATCH] ppc64: switch screen_info init to C99

Minor cleanup: Use C99 initializers for the screen_info struct.

Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: bolted SLB entry for iSeries
David Gibson [Mon, 23 Aug 2004 05:33:27 +0000 (22:33 -0700)]
[PATCH] ppc64: bolted SLB entry for iSeries

Tested, at least basically, on Power4 iSeries with shared processors, on
Power4 pSeries and RS64 (non-SLB) iSeries machines.

On pSeries SLB machines we "bolt" an SLB entry for the first segment of the
vmalloc() area into the SLB, to reduce the SLB miss rate.  This caused
problems, so was disabled, on iSeries because the bolted entry was not
restored properly on shared processor switch.  This patch adds information
about the bolted vmalloc segment to the lpar map, which should be restored
on shared processor switch.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: HVSI driver
Hollis Blanchard [Mon, 23 Aug 2004 05:33:17 +0000 (22:33 -0700)]
[PATCH] ppc64: HVSI driver

This is a console driver for IBM's p5 servers; please consider it for
inclusion.  I've addressed all the comments I've received so far.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: Fix v_regs pointer setup
Srivatsa Vaddagiri [Mon, 23 Aug 2004 05:33:05 +0000 (22:33 -0700)]
[PATCH] ppc64: Fix v_regs pointer setup

During some signal test, we found that v_regs pointer was not setup
correctly.  v_regs was made to point to itself, as a result of which the
pointer was corrupted when vec registers were copied over.  When the signal
handler returned, restore_sigcontext tried derefering the invalid pointer
and in the process killed the app with SIGSEGV.

Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: Reduce verbosity of RTAS error logs
Paul Mackerras [Mon, 23 Aug 2004 05:32:53 +0000 (22:32 -0700)]
[PATCH] ppc64: Reduce verbosity of RTAS error logs

Currently on pSeries systems the kernel will print out a hex dump of any
error events reported by the platform at boot time.  These can be rather
large and are practically incomprehensible to humans.  With this patch, the
kernel will by default print a 1-line summary for each error reported with
the severity, type, etc.  printed as text strings.  The old behaviour is
still available by using the rtasmsgs=on kernel command line option.  The
patch also renames some RTAS-specific symbols to start with "RTAS_".

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64 Fix unbalanced pci_dev_put in EEH code
Paul Mackerras [Mon, 23 Aug 2004 05:32:41 +0000 (22:32 -0700)]
[PATCH] ppc64 Fix unbalanced pci_dev_put in EEH code

The EEH code currently can end up doing an extra pci_dev_put() in the case
where we hot-unplug a card for which we are ignoring EEH errors (e.g.  a
graphics card).  This patch fixes that problem by only maintaining a
reference to the PCI device if we have entered any of its resource
addresses into our address -> PCI device cache.  This patch is based on an
earlier patch by Linas Vepstas.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: log firmware errors during boot
Paul Mackerras [Mon, 23 Aug 2004 05:32:30 +0000 (22:32 -0700)]
[PATCH] ppc64: log firmware errors during boot

Firmware can report errors at any time, and not atypically during boot.
However, these reports were being discarded until th rtasd comes up, which
occurs fairly late in the boot cycle.  As a result, firmware errors during
boot were being silently ignored.

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>
22 years ago[PATCH] ppc64: C99 initializers in INIT_THREAD
David Gibson [Mon, 23 Aug 2004 05:32:18 +0000 (22:32 -0700)]
[PATCH] ppc64: C99 initializers in INIT_THREAD

Fairly trivial PPC64 cleanup.  This patch makes the ppc64 INIT_THREAD
#define use C99 initializers, which will make it less likely to get broken
if we need to change thread_struct.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: fix idle loop for offline cpu
Paul Mackerras [Mon, 23 Aug 2004 05:32:07 +0000 (22:32 -0700)]
[PATCH] ppc64: fix idle loop for offline cpu

In the default_idle and dedicated_idle loops, there are some inner loops
out of which we should break if the cpu is marked offline.  Otherwise, it
is possible for the cpu to get stuck and never actually go offline.
shared_idle is unaffected.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: Don't call scheduler on offline cpu
Paul Mackerras [Mon, 23 Aug 2004 05:31:55 +0000 (22:31 -0700)]
[PATCH] ppc64: Don't call scheduler on offline cpu

When taking a cpu offline, once the cpu has been removed from
cpu_online_map, it is not supposed to service any more interrupts.  This
presents a problem on ppc64 because we cannot truly disable the
decrementer.  There used to be cpu_is_offline() checks in several scheduler
functions (e.g.  rebalance_tick()) which papered over this issue, but these
checks were removed recently.  So with recent 2.6 kernels, an attempt to
offline a cpu can result in a crash in find_busiest_group().  This patch
prevents such crashes.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: set tbl->it_type in iommu code
Paul Mackerras [Mon, 23 Aug 2004 05:31:43 +0000 (22:31 -0700)]
[PATCH] ppc64: set tbl->it_type in iommu code

Here is a patch that sets struct iommu_table->it_type to TCE_PCI in
pSeries_iommu.c.  This is just for code completeness (and it is updated in
iSeries_iommu.c, but was somehow missed in pSeries_iommu.c).

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: Fix oprofile error messages
Anton Blanchard [Mon, 23 Aug 2004 05:31:31 +0000 (22:31 -0700)]
[PATCH] ppc64: Fix oprofile error messages

Clean up an oprofile error message, it was missing a newline.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: add missing EXPORT_SYMBOLS for oprofile
Anton Blanchard [Mon, 23 Aug 2004 05:31:20 +0000 (22:31 -0700)]
[PATCH] ppc64: add missing EXPORT_SYMBOLS for oprofile

Add some missing exports, required for oprofile to be compiled as a module.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: allow oprofile module to be safely unloaded
Anton Blanchard [Mon, 23 Aug 2004 05:31:08 +0000 (22:31 -0700)]
[PATCH] ppc64: allow oprofile module to be safely unloaded

Allow the oprofile module to be unloaded, before we never removed the
oprofile specific interrupt handler.  Handle the pending exception case in
the dummy interrupt handler instead.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: disable oprofile debug messages
Anton Blanchard [Mon, 23 Aug 2004 05:30:56 +0000 (22:30 -0700)]
[PATCH] ppc64: disable oprofile debug messages

Disable oprofile debug messages.  They arent much use now things are
working reliably.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: POWER4 oprofile update
Anton Blanchard [Mon, 23 Aug 2004 05:30:44 +0000 (22:30 -0700)]
[PATCH] ppc64: POWER4 oprofile update

POWER4 oprofile updates from Carl Love.

- Create mmcr0, mmcr1, mmcra oprofilefs files.
- Use kernel and user profile disable bits. (Some modifications by me)

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: remove unnecessary cpu maps
Paul Mackerras [Mon, 23 Aug 2004 05:30:32 +0000 (22:30 -0700)]
[PATCH] ppc64: remove unnecessary cpu maps

With cpu_present_map, we don't need these any longer.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: rework secondary SMT thread setup at boot
Paul Mackerras [Mon, 23 Aug 2004 05:30:20 +0000 (22:30 -0700)]
[PATCH] ppc64: rework secondary SMT thread setup at boot

Our (ab)use of cpu_possible_map in setup_system to start secondary SMT
threads bothers me.  Mark such threads in cpu_possible_map during early
boot; let RTAS tell us which present cpus are still offline later so we can
start them.

I'm not totally sure about this one, it might be better to set up
cpu_sibling_map in prom_hold_cpus and use that in setup_system.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: use cpu_present_map in ppc64
Paul Mackerras [Mon, 23 Aug 2004 05:30:08 +0000 (22:30 -0700)]
[PATCH] ppc64: use cpu_present_map in ppc64

Adopt the "standard" cpu_present_map for describing cpus which are present
in the system, but not necessarily online.  cpu_present_map is meant to be
a superset of cpu_online_map and a subset of cpu_possible_map.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc64: use platform numbering of cpus for hypervisor calls.
Paul Mackerras [Mon, 23 Aug 2004 05:29:56 +0000 (22:29 -0700)]
[PATCH] ppc64: use platform numbering of cpus for hypervisor calls.

We were using Linux's cpu numbering for cpu-related hypervisor calls (e.g.
vpa registration, H_CONFER).  It happened to work most of the time because
Linux and the hypervisor usually, but not always, have the same numbering
for cpus.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>