]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
19 years ago[PATCH] pnp: consolidate kmalloc wrappers
Bjorn Helgaas [Tue, 6 Sep 2005 22:16:51 +0000 (15:16 -0700)]
[PATCH] pnp: consolidate kmalloc wrappers

ISAPNP, PNPBIOS, and PNPACPI all had their own kmalloc wrappers that
reimplemented kcalloc().  Remove the wrappers and just use kcalloc()
directly.

Note that this also removes the PNPBIOS error message when the kmalloc
fails.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] yenta: make ToPIC95 bridges work with 16bit cards
Daniel Ritz [Tue, 6 Sep 2005 22:16:50 +0000 (15:16 -0700)]
[PATCH] yenta: make ToPIC95 bridges work with 16bit cards

ToPIC95 brides (and maybe some other too) require to use the ExCA registers
to power up the socket if a 16bit card is pluged.  allow socket drivers to
set a flag so that yenta does just that.  also clean up yenta_get_status()
a bit to use the new yenta_get_power() function.

Side note: ToPIC97 bridges (at least in Rev.5 i have) don't require this.

Ryan Underwood <nemesis-lists@icequake.net> said:

 According to the mail that David Hinds received from a Toshiba engineer,
 ToPIC95 and 97 do require this, and ToPIC100 does not.  Maybe you have a
 later revision.

 For all chips, 16-bit cards can be enabled through ExCA.  So doesn't it
 make sense just to make this the default behavior for all Toshiba chips,
 to avoid corner cases showing up later?

Daniel responded:

 I disagree with ryan to change anything for topic97 bridges.  they work.
 and I couldn't find (read google) any report of a topic97 breaking on
 applying power with the CB registers.

 I'm having several toshba notebooks at work (and home) with topic95,97,100
 bridges.  Only the ones with a topic95 didn't work.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] auxiliary vector cleanups
H. J. Lu [Tue, 6 Sep 2005 22:16:49 +0000 (15:16 -0700)]
[PATCH] auxiliary vector cleanups

The size of auxiliary vector is fixed at 42 in linux/sched.h.  But it isn't
very obvious when looking at linux/elf.h.  This patch adds AT_VECTOR_SIZE
so that we can change it if necessary when a new vector is added.

Because of include file ordering problems, doing this necessitated the
extraction of the AT_* symbols into a standalone header file.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] radix_tag_get(): differentiate between no present node and tag unset cases
Marcelo Tosatti [Tue, 6 Sep 2005 22:16:48 +0000 (15:16 -0700)]
[PATCH] radix_tag_get(): differentiate between no present node and tag unset cases

Simple patch to radix_tree_tag_get() to return different values for non
present node and tag unset.

The function is not used by any in-kernel callers (yet), but this
information is definitely useful.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] radix-tree: Remove unnecessary indirections and clean up code
Christoph Lameter [Tue, 6 Sep 2005 22:16:46 +0000 (15:16 -0700)]
[PATCH] radix-tree: Remove unnecessary indirections and clean up code

- There is frequent use of indirections in the radix code. This patch
  removes those indirections, makes the code more readable and allows
  the compilers to generate better code.

- Removing indirections allows the removal of several casts.

- Removing indirections allows the reduction of the radix_tree_path
  size from 3 to 2 words.

- Use pathp-> consistently.

- Remove unnecessary tmp variable in radix_tree_insert

- Separate the upper layer processing from the lowest layer in __lookup()
  in order to make it easier to understand what is going on and allow
  compilers to generate better code for the loop.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Support powering sharp zaurus sl-5500 LCD up and down
Pavel Machek [Tue, 6 Sep 2005 22:16:45 +0000 (15:16 -0700)]
[PATCH] Support powering sharp zaurus sl-5500 LCD up and down

This adds support for powering Zaurus's video up and down.  PDA without
screen is kind of useless, so it is quite important...  I'll have to figure
out how to really control the frontlight, because LCD without that is quite
hard to read.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Clean up the old digi support and rescue it
Alan Cox [Tue, 6 Sep 2005 22:16:44 +0000 (15:16 -0700)]
[PATCH] Clean up the old digi support and rescue it

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] remove register_ioctl32_conversion and unregister_ioctl32_conversion
Adrian Bunk [Tue, 6 Sep 2005 22:16:43 +0000 (15:16 -0700)]
[PATCH] remove register_ioctl32_conversion and unregister_ioctl32_conversion

All users have been converted.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kill bio->bi_set
Peter Osterlund [Tue, 6 Sep 2005 22:16:42 +0000 (15:16 -0700)]
[PATCH] kill bio->bi_set

Jens:

->bi_set is totally unnecessary bloat of struct bio.  Just define a proper
destructor for the bio and it already knows what bio_set it belongs too.

Peter:

Fixed the bugs.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Strip local symbols from kallsyms
Ralf Baechle [Tue, 6 Sep 2005 22:16:41 +0000 (15:16 -0700)]
[PATCH] Strip local symbols from kallsyms

Local symbols generated by gcc start with a `$'; no point in including them
in the kernel.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fs/jbd/: cleanups
Adrian Bunk [Tue, 6 Sep 2005 22:16:41 +0000 (15:16 -0700)]
[PATCH] fs/jbd/: cleanups

This patch contains the following cleanups:
- make needlessly global functions static
- journal.c: remove the unused global function __journal_internal_check
             and move the check to journal_init
- remove the following write-only global variable:
  - journal.c: current_journal
- remove the following unneeded EXPORT_SYMBOL:
  - journal.c: journal_recover

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] compat: be more consistent about [ug]id_t
Stephen Rothwell [Tue, 6 Sep 2005 22:16:40 +0000 (15:16 -0700)]
[PATCH] compat: be more consistent about [ug]id_t

When I first wrote the compat layer patches, I was somewhat cavalier about
the definition of compat_uid_t and compat_gid_t (or maybe I just
misunderstood :-)).  This patch makes the compat types much more consistent
with the types we are being compatible with and hopefully will fix a few
bugs along the way.

compat type type in compat arch
__compat_[ug]id_t __kernel_[ug]id_t
__compat_[ug]id32_t __kernel_[ug]id32_t
compat_[ug]id_t [ug]id_t

The difference is that compat_uid_t is always 32 bits (for the archs we
care about) but __compat_uid_t may be 16 bits on some.

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>
19 years ago[PATCH] use select in sound/isa/Kconfig
Bodo Eggert [Tue, 6 Sep 2005 22:16:39 +0000 (15:16 -0700)]
[PATCH] use select in sound/isa/Kconfig

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed,
resulting in funny behaviour.  (Soundcarts get selectable if other
soundcards are selected).

This patch changes the "depend on ISAPNP"s to select.

Signed-Off-By: Bodo Eggert <7eggert@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] inotify speedup
John McCutchan [Tue, 6 Sep 2005 22:16:38 +0000 (15:16 -0700)]
[PATCH] inotify speedup

Bypass an inotify-related fastpath spinlock and several function calls on
systems which have no inotify watches registered.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] NMI: Update NMI users of RCU to use new API
Paul E. McKenney [Tue, 6 Sep 2005 22:16:35 +0000 (15:16 -0700)]
[PATCH] NMI: Update NMI users of RCU to use new API

Uses of RCU for dynamically changeable NMI handlers need to use the new
rcu_dereference() and rcu_assign_pointer() facilities.  This change makes
it clear that these uses are safe from a memory-barrier viewpoint, but the
main purpose is to document exactly what operations are being protected by
RCU.  This has been tested on x86 and x86-64, which are the only
architectures affected by this change.

Signed-off-by: <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Provide better printk() support for SMP machines
David Howells [Tue, 6 Sep 2005 22:16:34 +0000 (15:16 -0700)]
[PATCH] Provide better printk() support for SMP machines

The attached patch prevents oopses interleaving with characters from
other printks on other CPUs by only breaking the lock if the oops is
happening on the machine holding the lock.

It might be better if the oops generator got the lock and then called an
inner vprintk routine that assumed the caller holds the lock, thus
making oops reports "atomic".

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] More __read_mostly variables
Christoph Lameter [Tue, 6 Sep 2005 22:16:33 +0000 (15:16 -0700)]
[PATCH] More __read_mostly variables

Move some more frequently read variables that showed up during some of our
performance tests as sometimes ending up in hot cachelines to the
read_mostly section.

Fix: Move the __read_mostly from before hpet_usec_quotient to follow the
variable like the other uses of __read_mostly.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Christoph Lameter <christoph@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kallsyms: change compression algorithm
Paulo Marques [Tue, 6 Sep 2005 22:16:31 +0000 (15:16 -0700)]
[PATCH] kallsyms: change compression algorithm

This patch changes the way the compression algorithm works.  The base
algorithm is similiar to the previous but we force the compressed token
size to 2.

Having a fixed size compressed token allows for a lot of optimizations, and
that in turn allows this code to run over *all* the symbols faster than it
did before over just a subset.

Having it work over all the symbols will make it behave better when symbols
change positions between passes, and the "inconsistent kallsyms" messages
should become less frequent.

In my tests the compression ratio was degraded by about 0.5%, but the
results will depend greatly on the number of symbols to compress.

Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] relayfs
Tom Zanussi [Tue, 6 Sep 2005 22:16:30 +0000 (15:16 -0700)]
[PATCH] relayfs

Here's the latest version of relayfs, against linux-2.6.11-mm2.  I'm hoping
you'll consider putting this version back into your tree - the previous
rounds of comment seem to have shaken out all the API issues and the number
of comments on the code itself have also steadily dwindled.

This patch is essentially the same as the relayfs redux part 5 patch, with
some minor changes based on reviewer comments.  Thanks again to Pekka
Enberg for those.  The patch size without documentation is now a little
smaller at just over 40k.  Here's a detailed list of the changes:

- removed the attribute_flags in relay open and changed it to a
  boolean specifying either overwrite or no-overwrite mode, and removed
  everything referencing the attribute flags.
- added a check for NULL names in relayfs_create_entry()
- got rid of the unnecessary multiple labels in relay_create_buf()
- some minor simplification of relay_alloc_buf() which got rid of a
  couple params
- updated the Documentation

In addition, this version (through code contained in the relay-apps tarball
linked to below, not as part of the relayfs patch) tries to make it as easy
as possible to create the cooperating kernel/user pieces of a typical and
common type of logging application, one where kernel logging is kicked off
when a user space data collection app starts and stops when the collection
app exits, with the data being automatically logged to disk in between.  To
create this type of application, you basically just include a header file
(relay-app.h, included in the relay-apps tarball) in your kernel module,
define a couple of callbacks and call an initialization function, and on
the user side call a single function that sets up and continuously monitors
the buffers, and writes data to files as it becomes available.  Channels
are created when the collection app is started and destroyed when it exits,
not when the kernel module is inserted, so different channel buffer sizes
can be specified for each separate run via command-line options.  See the
README in the relay-apps tarball for details.

Also included in the relay-apps tarball are a couple examples
demonstrating how you can use this to create quick and dirty kernel
logging/debugging applications.  They are:

- tprintk, short for 'tee printk', which temporarily puts a kprobe on
  printk() and writes a duplicate stream of printk output to a relayfs
  channel.  This could be used anywhere there's printk() debugging code
  in the kernel which you'd like to exercise, but would rather not have
  your system logs cluttered with debugging junk.  You'd probably want
  to kill klogd while you do this, otherwise there wouldn't be much
  point (since putting a kprobe on printk() doesn't change the output
  of printk()).  I've used this method to temporarily divert the packet
  logging output of the iptables LOG target from the system logs to
  relayfs files instead, for instance.

- klog, which just provides a printk-like formatted logging function
  on top of relayfs.  Again, you can use this to keep stuff out of your
  system logs if used in place of printk.

The example applications can be found here:

http://prdownloads.sourceforge.net/dprobes/relay-apps.tar.gz?download

From: Christoph Hellwig <hch@lst.de>

  avoid lookup_hash usage in relayfs

Signed-off-by: Tom Zanussi <zanussi@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] detect soft lockups
Ingo Molnar [Tue, 6 Sep 2005 22:16:27 +0000 (15:16 -0700)]
[PATCH] detect soft lockups

This patch adds a new kernel debug feature: CONFIG_DETECT_SOFTLOCKUP.

When enabled then per-CPU watchdog threads are started, which try to run
once per second.  If they get delayed for more than 10 seconds then a
callback from the timer interrupt detects this condition and prints out a
warning message and a stack dump (once per lockup incident).  The feature
is otherwise non-intrusive, it doesnt try to unlock the box in any way, it
only gets the debug info out, automatically, and on all CPUs affected by
the lockup.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup
Jakub Jelinek [Tue, 6 Sep 2005 22:16:25 +0000 (15:16 -0700)]
[PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup

ATM pthread_cond_signal is unnecessarily slow, because it wakes one waiter
(which at least on UP usually means an immediate context switch to one of
the waiter threads).  This waiter wakes up and after a few instructions it
attempts to acquire the cv internal lock, but that lock is still held by
the thread calling pthread_cond_signal.  So it goes to sleep and eventually
the signalling thread is scheduled in, unlocks the internal lock and wakes
the waiter again.

Now, before 2003-09-21 NPTL was using FUTEX_REQUEUE in pthread_cond_signal
to avoid this performance issue, but it was removed when locks were
redesigned to the 3 state scheme (unlocked, locked uncontended, locked
contended).

Following scenario shows why simply using FUTEX_REQUEUE in
pthread_cond_signal together with using lll_mutex_unlock_force in place of
lll_mutex_unlock is not enough and probably why it has been disabled at
that time:

The number is value in cv->__data.__lock.
        thr1            thr2            thr3
0       pthread_cond_wait
1       lll_mutex_lock (cv->__data.__lock)
0       lll_mutex_unlock (cv->__data.__lock)
0       lll_futex_wait (&cv->__data.__futex, futexval)
0                       pthread_cond_signal
1                       lll_mutex_lock (cv->__data.__lock)
1                                       pthread_cond_signal
2                                       lll_mutex_lock (cv->__data.__lock)
2                                         lll_futex_wait (&cv->__data.__lock, 2)
2                       lll_futex_requeue (&cv->__data.__futex, 0, 1, &cv->__data.__lock)
                          # FUTEX_REQUEUE, not FUTEX_CMP_REQUEUE
2                       lll_mutex_unlock_force (cv->__data.__lock)
0                         cv->__data.__lock = 0
0                         lll_futex_wake (&cv->__data.__lock, 1)
1       lll_mutex_lock (cv->__data.__lock)
0       lll_mutex_unlock (cv->__data.__lock)
          # Here, lll_mutex_unlock doesn't know there are threads waiting
          # on the internal cv's lock

Now, I believe it is possible to use FUTEX_REQUEUE in pthread_cond_signal,
but it will cost us not one, but 2 extra syscalls and, what's worse, one of
these extra syscalls will be done for every single waiting loop in
pthread_cond_*wait.

We would need to use lll_mutex_unlock_force in pthread_cond_signal after
requeue and lll_mutex_cond_lock in pthread_cond_*wait after lll_futex_wait.

Another alternative is to do the unlocking pthread_cond_signal needs to do
(the lock can't be unlocked before lll_futex_wake, as that is racy) in the
kernel.

I have implemented both variants, futex-requeue-glibc.patch is the first
one and futex-wake_op{,-glibc}.patch is the unlocking inside of the kernel.
 The kernel interface allows userland to specify how exactly an unlocking
operation should look like (some atomic arithmetic operation with optional
constant argument and comparison of the previous futex value with another
constant).

It has been implemented just for ppc*, x86_64 and i?86, for other
architectures I'm including just a stub header which can be used as a
starting point by maintainers to write support for their arches and ATM
will just return -ENOSYS for FUTEX_WAKE_OP.  The requeue patch has been
(lightly) tested just on x86_64, the wake_op patch on ppc64 kernel running
32-bit and 64-bit NPTL and x86_64 kernel running 32-bit and 64-bit NPTL.

With the following benchmark on UP x86-64 I get:

for i in nptl-orig nptl-requeue nptl-wake_op; do echo time elf/ld.so --library-path .:$i /tmp/bench; \
for j in 1 2; do echo ( time elf/ld.so --library-path .:$i /tmp/bench ) 2>&1; done; done
time elf/ld.so --library-path .:nptl-orig /tmp/bench
real 0m0.655s user 0m0.253s sys 0m0.403s
real 0m0.657s user 0m0.269s sys 0m0.388s
time elf/ld.so --library-path .:nptl-requeue /tmp/bench
real 0m0.496s user 0m0.225s sys 0m0.271s
real 0m0.531s user 0m0.242s sys 0m0.288s
time elf/ld.so --library-path .:nptl-wake_op /tmp/bench
real 0m0.380s user 0m0.176s sys 0m0.204s
real 0m0.382s user 0m0.175s sys 0m0.207s

The benchmark is at:
http://sourceware.org/ml/libc-alpha/2005-03/txt00001.txt
Older futex-requeue-glibc.patch version is at:
http://sourceware.org/ml/libc-alpha/2005-03/txt00002.txt
Older futex-wake_op-glibc.patch version is at:
http://sourceware.org/ml/libc-alpha/2005-03/txt00003.txt
Will post a new version (just x86-64 fixes so that the patch
applies against pthread_cond_signal.S) to libc-hacker ml soon.

Attached is the kernel FUTEX_WAKE_OP patch as well as a simple-minded
testcase that will not test the atomicity of the operation, but at least
check if the threads that should have been woken up are woken up and
whether the arithmetic operation in the kernel gave the expected results.

Acked-by: Ingo Molnar <mingo@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Jamie Lokier <jamie@shareable.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] 3c59x PM fixes
Rafael J. Wysocki [Tue, 6 Sep 2005 22:16:22 +0000 (15:16 -0700)]
[PATCH] 3c59x PM fixes

This patch adds some missing pci-related calls to the suspend and resume
routines of the 3c59x driver.  It also makes the driver free/request IRQ on
suspend/resume, in accordance with the proposal at:
http://lists.osdl.org/pipermail/linux-pm/2005-May/000955.html

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] swsusp: update documentation
Pavel Machek [Tue, 6 Sep 2005 22:16:21 +0000 (15:16 -0700)]
[PATCH] swsusp: update documentation

This updates documentation a bit (mostly removing obsolete stuff), and
marks swsusp as no longer experimental in config.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64: Fix off by one in e820_mapped
Eric W. Biederman [Tue, 6 Sep 2005 22:16:20 +0000 (15:16 -0700)]
[PATCH] x86_64: Fix off by one in e820_mapped

This allows a valid iommu placed immediately after memory to work, to be
recognized as after the last byte of memory and not overlapping it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64: create sysfs entries for cpu only for present cpus
Ashok Raj [Tue, 6 Sep 2005 22:16:19 +0000 (15:16 -0700)]
[PATCH] x86_64: create sysfs entries for cpu only for present cpus

Need to create sysfs only for cpus that are present.  Without which we see
NR_CPUS entries created when we have CONFIG_HOTPLUG and CONFIG_HOTPLUG_CPU
enabled.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64: Fix cluster mode send_IPI_allbutself to use get_cpu()/put_cpu()
Ashok Raj [Tue, 6 Sep 2005 22:16:18 +0000 (15:16 -0700)]
[PATCH] x86_64: Fix cluster mode send_IPI_allbutself to use get_cpu()/put_cpu()

Need to ensure we dont get prempted when we clear ourself from mask when using
clustered mode genapic code.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64: prefetchw() can fall back to prefetch() if !3DNOW
Eric Dumazet [Tue, 6 Sep 2005 22:16:17 +0000 (15:16 -0700)]
[PATCH] x86_64: prefetchw() can fall back to prefetch() if !3DNOW

This is a multi-part message in MIME format.  If the cpu lacks 3DNOW
feature, we can use a normal prefetcht0 instruction instead of NOP5.
"prefetchw (%rxx)" and "prefetcht0 (%rxx)" have the same length, ranging
from 3 to 5 bytes depending on the register.  So this patch even helps
AMD64, shortening the length of the code.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64: print processor number in show_regs
Zwane Mwaikambo [Tue, 6 Sep 2005 22:16:16 +0000 (15:16 -0700)]
[PATCH] x86_64: print processor number in show_regs

Up to date I've been using the GS value to determine the processor number
in dumps from show_regs, however this can be cumbersome to do if you don't
have the vmlinux to verify with the address of cpu_pda, how about the
following?  I considered using hard_smp_processor_id for robustness but we
already dereference current so we're already relying on MSR_GS_BASE being
sane.

Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity
Ashok Raj [Tue, 6 Sep 2005 22:16:15 +0000 (15:16 -0700)]
[PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity

When handling writes to /proc/irq, current code is re-programming rte
entries directly. This is not recommended and could potentially cause
chipset's to lockup, or cause missing interrupts.

CONFIG_IRQ_BALANCE does this correctly, where it re-programs only when the
interrupt is pending. The same needs to be done for /proc/irq handling as well.
Otherwise user space irq balancers are really not doing the right thing.

- Changed pending_irq_balance_cpumask to pending_irq_migrate_cpumask for
  lack of a generic name.
- added move_irq out of IRQ_BALANCE, and added this same to X86_64
- Added new proc handler for write, so we can do deferred write at irq
  handling time.
- Display of /proc/irq/XX/smp_affinity used to display CPU_MASKALL, instead
  it now shows only active cpu masks, or exactly what was set.
- Provided a common move_irq implementation, instead of duplicating
  when using generic irq framework.

Tested on i386/x86_64 and ia64 with CONFIG_PCI_MSI turned on and off.
Tested UP builds as well.

MSI testing: tbd: I have cards, need to look for a x-over cable, although I
did test an earlier version of this patch.  Will test in a couple days.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Acked-by: Zwane Mwaikambo <zwane@holomorphy.com>
Grudgingly-acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: add missing sysfs node for ocp_func_emac_data.phy_feat_exc
Eugene Surovegin [Tue, 6 Sep 2005 22:16:14 +0000 (15:16 -0700)]
[PATCH] ppc32: add missing sysfs node for ocp_func_emac_data.phy_feat_exc

Add sysfs node for ocp_func_emac_data.phy_feat_exc field.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: fix ocp_device_suspend to use pm_message_t instead of u32
Eugene Surovegin [Tue, 6 Sep 2005 22:16:13 +0000 (15:16 -0700)]
[PATCH] ppc32: fix ocp_device_suspend to use pm_message_t instead of u32

Recent "u32 -> pm_message_t" change triggered hidden bug in
ocp_device_suspend.  Fix it to correctly use pm_message_t instead of u32.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6
Linus Torvalds [Tue, 6 Sep 2005 12:16:24 +0000 (05:16 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6

19 years agoMerge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Linus Torvalds [Tue, 6 Sep 2005 07:47:18 +0000 (00:47 -0700)]
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 6 Sep 2005 07:45:34 +0000 (00:45 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Tue, 6 Sep 2005 07:35:51 +0000 (00:35 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild

19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Tue, 6 Sep 2005 07:32:12 +0000 (00:32 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6

19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Linus Torvalds [Tue, 6 Sep 2005 07:31:02 +0000 (00:31 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6

19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 6 Sep 2005 07:29:52 +0000 (00:29 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

19 years ago[PATCH] remove linux/version.h include from arch/ppc64
Olaf Hering [Sun, 10 Jul 2005 19:35:15 +0000 (19:35 +0000)]
[PATCH] remove linux/version.h include from arch/ppc64

Changing CONFIG_LOCALVERSION rebuilds too much, for no apparent reason.

Use system_utsname for progress and debug header.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] Invert sense of SLB class bit
David Gibson [Tue, 6 Sep 2005 04:59:47 +0000 (14:59 +1000)]
[PATCH] Invert sense of SLB class bit

Currently, we set the class bit in kernel SLB entries, and clear it on
user SLB entries.  On POWER5, ERAT entries created in real mode have
the class bit clear.  So to avoid flushing kernel ERAT entries on each
context switch, this patch inverts our usage of the class bit, setting
it on user SLB entries and clearing it on kernel SLB entries.

Booted on POWER5 and G5.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[SPARC64]: Kconfig fix (GEN_RTC dependencies)
Al Viro [Tue, 6 Sep 2005 06:35:41 +0000 (23:35 -0700)]
[SPARC64]: Kconfig fix (GEN_RTC dependencies)

Yet another architecture not coverd by GEN_RTC - sparc64 never picked
it until now and it doesn't have asm/rtc.h to go with it, so it
wouldn't compile anyway (or have these ioctls in the user-visible
headers, for that matter).

FWIW, I'm very tempted to introduce ARCH_HAS_GEN_RTC and have it set
in arch/*/Kconfig for architectures that know what to do with this
stuff - for something supposedly generic the list of architectures
where it doesn't work is getting too long...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SUNSU]: Compile fixes.
Al Viro [Tue, 6 Sep 2005 06:35:05 +0000 (23:35 -0700)]
[SUNSU]: Compile fixes.

sunsu had been broken by ->stop_tx/->start_tx API changes.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Don't include drivers/firmware/Kconfig
David S. Miller [Tue, 6 Sep 2005 06:34:13 +0000 (23:34 -0700)]
[SPARC64]: Don't include drivers/firmware/Kconfig

It's really not relevant for this platform in any
way, after all.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[RTC]: Use SA_SHIRQ in sparc specific code.
David S. Miller [Tue, 6 Sep 2005 06:33:05 +0000 (23:33 -0700)]
[RTC]: Use SA_SHIRQ in sparc specific code.

Based upon a report from Jason Wever.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[MOXA]: Fix this driver properly.
Al Viro [Tue, 6 Sep 2005 06:30:15 +0000 (23:30 -0700)]
[MOXA]: Fix this driver properly.

Actually, proper fix of that breakage is embarrassingly simple - it's yet
another gratitious leftover include of asm/segment.h, so incremental to the
previos would be removal of that BROKEN and removal of bogus include from
mxser.c itself.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IEEE80211]: Use correct size_t printf format string in ieee80211_rx.c
David S. Miller [Tue, 6 Sep 2005 06:19:49 +0000 (23:19 -0700)]
[IEEE80211]: Use correct size_t printf format string in ieee80211_rx.c

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] ppc64: Fix build with oprofile disabled
Anton Blanchard [Tue, 6 Sep 2005 04:59:16 +0000 (14:59 +1000)]
[PATCH] ppc64: Fix build with oprofile disabled

Fix build with oprofile disabled.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Move oprofile_model into cpu feature struct
Anton Blanchard [Tue, 6 Sep 2005 04:57:52 +0000 (14:57 +1000)]
[PATCH] ppc64: Move oprofile_model into cpu feature struct

Move oprofile_model into cpu feature struct.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Move oprofile_impl.h into include/asm-ppc64
Anton Blanchard [Tue, 6 Sep 2005 04:55:35 +0000 (14:55 +1000)]
[PATCH] ppc64: Move oprofile_impl.h into include/asm-ppc64

Move oprofile_impl.h into include/asm-ppc64 in preparation for moving
oprofile_model into cpu feature struct.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Add oprofile cpu_type to cpu feature struct
Anton Blanchard [Tue, 6 Sep 2005 04:53:57 +0000 (14:53 +1000)]
[PATCH] ppc64: Add oprofile cpu_type to cpu feature struct

Add oprofile cpu_type to cpu feature struct.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Use num_pmcs in oprofile code
Anton Blanchard [Tue, 6 Sep 2005 04:52:12 +0000 (14:52 +1000)]
[PATCH] ppc64: Use num_pmcs in oprofile code

Change oprofile to use num_pmcs from the cpu feature struct.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: remove CPU_FTR_PMC8
Anton Blanchard [Tue, 6 Sep 2005 04:50:48 +0000 (14:50 +1000)]
[PATCH] ppc64: remove CPU_FTR_PMC8

Remove the CPU_FTR_PMC8 feature now we encode the number of PMCs
directly.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: add number of PMCs to cputable
Anton Blanchard [Tue, 6 Sep 2005 04:47:49 +0000 (14:47 +1000)]
[PATCH] ppc64: add number of PMCs to cputable

Add a field in the cputable struct to store the number of PMCs.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[IPW2200]: ipw2200.h needs linux/dma-mapping.h
David S. Miller [Tue, 6 Sep 2005 06:08:01 +0000 (23:08 -0700)]
[IPW2200]: ipw2200.h needs linux/dma-mapping.h

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] ppc64: Allow world readable /proc/ppc64/lparcfg
Wim Coekaerts [Tue, 6 Sep 2005 03:22:47 +0000 (20:22 -0700)]
[PATCH] ppc64: Allow world readable /proc/ppc64/lparcfg

I would like to be able to read the lparcfg data from any user so we
can make "intelligent" decisions based on underlying attributes when
running in lpars.  Yes there's software that likes to do this :) and
runs as non-root.

It's very similar to say VM where you can get CP to provide feedback
of the real hardware inside a VM guest.

Signed-off-by: Wim Coekaerts <wim.coekaerts@oracle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: remove use of asm/segment.h
Kumar Gala [Wed, 24 Aug 2005 16:56:56 +0000 (11:56 -0500)]
[PATCH] ppc64: remove use of asm/segment.h

Removed PPC64 architecture specific users of asm/segment.h.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc/ppc64: Merge more include files
Jon Loeliger [Thu, 1 Sep 2005 20:51:52 +0000 (15:51 -0500)]
[PATCH] ppc/ppc64: Merge more include files

This patch merges several include files from
asm-ppc and asm-ppc64 into the new asm-powerpc.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] Move 3 more headers to asm-powerpc
Becky Bruce [Sun, 4 Sep 2005 00:01:57 +0000 (19:01 -0500)]
[PATCH] Move 3 more headers to asm-powerpc

Merged several nearly-identical header files from asm-ppc and asm-ppc64
into asm-powerpc.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: speedup cmpxchg
Anton Blanchard [Tue, 6 Sep 2005 03:05:58 +0000 (13:05 +1000)]
[PATCH] ppc64: speedup cmpxchg

cmpxchg has the following code:

__typeof__(*(ptr)) _o_ = (o);
__typeof__(*(ptr)) _n_ = (n);

Unfortunately it makes gcc 4.0 store and load the variables to the stack.
Eg in atomic_dec_and_test we get:

  stw     r10,112(r1)
  stw     r9,116(r1)
  lwz     r9,112(r1)
  lwz     r0,116(r1)

x86 is just casting the values so do that instead. Also change __xchg*
and __cmpxchg* to take unsigned values, removing a few sign extensions.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: poison initmem
Anton Blanchard [Tue, 6 Sep 2005 02:05:26 +0000 (12:05 +1000)]
[PATCH] ppc64: poison initmem

Poison initmem after we free it so we catch use after free issues.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: systemcfg is now a pointer
Jimi Xenidis [Thu, 1 Sep 2005 15:57:10 +0000 (11:57 -0400)]
[PATCH] ppc64: systemcfg is now a pointer

The following patch fixes 2 issues:
  1) use PLATFORM_LPAR bit to test if running in LPAR mode
  2) systemcfg pointer is assigned from static data in
     arch/ppc64/kernel/pacaData.c.  The file arch/ppc64/kernel/head.S
     now refers to is using the GOT binding to the pointer and hence
     must deref it.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Consolidate early console and PPCDBG code
Milton Miller [Tue, 6 Sep 2005 01:57:27 +0000 (11:57 +1000)]
[PATCH] ppc64: Consolidate early console and PPCDBG code

Consolidate the early console and PPCDBG code in udbg.c

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Remove old includes
Milton Miller [Tue, 6 Sep 2005 01:57:00 +0000 (11:57 +1000)]
[PATCH] ppc64: Remove old includes

Trim some no longer needed includes from udbg.c and friends.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Take udbg out of ppc_md
Milton Miller [Tue, 6 Sep 2005 01:56:42 +0000 (11:56 +1000)]
[PATCH] ppc64: Take udbg out of ppc_md

Take udbg out of ppc_md. Allows us to not overwrite early udbg inits
when assigning ppc_md.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Split SCC and 15550 udbg code
Milton Miller [Tue, 6 Sep 2005 01:56:02 +0000 (11:56 +1000)]
[PATCH] ppc64: Split SCC and 15550 udbg code

Split scc and 15550 functions from udbg each into their own file.
This makes them more symetric with the lpar and btext code.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Make udbg_init_uart set the ppc_md udbg methods.
Milton Miller [Tue, 6 Sep 2005 01:55:38 +0000 (11:55 +1000)]
[PATCH] ppc64: Make udbg_init_uart set the ppc_md udbg methods.

make udbg_init_uart set the ppc_md udbg methods.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Clean up CR handling
Milton Miller [Tue, 6 Sep 2005 01:55:00 +0000 (11:55 +1000)]
[PATCH] ppc64: Clean up CR handling

Make the 16550 and real mode 16550 use tail recursion like the scc code
instead of repeating the routine except for the character sent.

Gcc recoginizes the tail recursion and handles it efficently without
stack allocations.  The maple real putc shrinks from 188 to 104 bytes
of instructions.  udbg_putc drops from 188 to 140 bytes.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Remove dummy getc routines
Milton Miller [Tue, 6 Sep 2005 01:54:42 +0000 (11:54 +1000)]
[PATCH] ppc64: Remove dummy getc routines

Now that xmon is fixed we should not need the dummy getc routines.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: dont bypass ppc_md.udbg* functions
Milton Miller [Tue, 6 Sep 2005 01:54:13 +0000 (11:54 +1000)]
[PATCH] ppc64: dont bypass ppc_md.udbg* functions

udbg_getc_poll is a ppc_md function.   don't call directly into udbg.c

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[PATCH] ppc64: Add missing include
Milton Miller [Tue, 6 Sep 2005 01:50:55 +0000 (11:50 +1000)]
[PATCH] ppc64: Add missing include

inline pmac_call_feature references ppc_md so include asm/machdep.h
in asm/pmac_feature.h

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
19 years ago[TCP]: Fix TCP_OFF() bug check introduced by previous change.
Herbert Xu [Tue, 6 Sep 2005 01:55:48 +0000 (18:55 -0700)]
[TCP]: Fix TCP_OFF() bug check introduced by previous change.

The TCP_OFF assignment at the bottom of that if block can indeed set
TCP_OFF without setting TCP_PAGE.  Since there is not much to be
gained from avoiding this situation, we might as well just zap the
offset.  The following patch should fix it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: 2.6.13 breaks libpcap (and tcpdump)
Herbert Xu [Tue, 6 Sep 2005 01:44:37 +0000 (18:44 -0700)]
[NET]: 2.6.13 breaks libpcap (and tcpdump)

Patrick McHardy says:

  Never mind, I got it, we never fall through to the second switch
  statement anymore. I think we could simply break when load_pointer
  returns NULL. The switch statement will fall through to the default
  case and return 0 for all cases but 0 > k >= SKF_AD_OFF.

Here's a patch to do just that.

I left BPF_MSH alone because it's really a hack to calculate the IP
header length, which makes no sense when applied to the special data.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Do not protect sysctl_optmem_max with CONFIG_SYSCTL
David S. Miller [Tue, 6 Sep 2005 01:14:11 +0000 (18:14 -0700)]
[NET]: Do not protect sysctl_optmem_max with CONFIG_SYSCTL

The ipv4 and ipv6 protocols need to access it unconditionally.
SYSCTL=n build failure reported by Russell King.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER] remove bogus hand-coded htonll() from nenetlink_queue
Harald Welte [Tue, 6 Sep 2005 01:09:08 +0000 (18:09 -0700)]
[NETFILTER] remove bogus hand-coded htonll() from nenetlink_queue

htonll() is nothing else than cpu_to_be64(), so we'd rather call the
latter.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IRDA]: IrDA prototype fixes
Adrian Bunk [Tue, 6 Sep 2005 01:08:11 +0000 (18:08 -0700)]
[IRDA]: IrDA prototype fixes

Every file should #include the header files containing the prototypes
of it's global functions.

In this case this showed that the prototype of irlan_print_filter()
was wrong which is also corrected in this patch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SCTP]: net/sctp/sysctl.c should #include <net/sctp/sctp.h>
Adrian Bunk [Tue, 6 Sep 2005 01:07:42 +0000 (18:07 -0700)]
[SCTP]: net/sctp/sysctl.c should #include <net/sctp/sctp.h>

Every file should #include the header files containing the prototypes of
it's global functions.

sctp.h contains the prototypes of sctp_sysctl_{,un}register().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: net/netfilter/nfnetlink*: make functions static
Adrian Bunk [Tue, 6 Sep 2005 01:06:45 +0000 (18:06 -0700)]
[NETFILTER]: net/netfilter/nfnetlink*: make functions static

This patch makes needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IPV4]: net/ipv4/ipconfig.c should #include <linux/nfs_fs.h>
Adrian Bunk [Tue, 6 Sep 2005 01:05:52 +0000 (18:05 -0700)]
[IPV4]: net/ipv4/ipconfig.c should #include <linux/nfs_fs.h>

Every file should #include the header files containing the prototypes of
it's global functions.

nfs_fs.h contains the prototype of root_nfs_parse_addr().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ATM]: net/atm/ioctl.c should #include "common.h"
Adrian Bunk [Tue, 6 Sep 2005 01:04:28 +0000 (18:04 -0700)]
[ATM]: net/atm/ioctl.c should #include "common.h"

Every file should #include the header files containing the prototypes
of it's global functions.

common.h contains the prototype for vcc_ioctl().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Update driver version and release date.
David S. Miller [Tue, 6 Sep 2005 00:56:11 +0000 (17:56 -0700)]
[TG3]: Update driver version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Use status tag to check for new events
Michael Chan [Tue, 6 Sep 2005 00:53:32 +0000 (17:53 -0700)]
[TG3]: Use status tag to check for new events

Use the status tag to determine if there are new events in
tg3_interrupt_tagged(). We discussed about this a while ago with Grant
Grundler and DaveM. This scheme makes it unnecessary to clear the
updated bit in the status block when using tagged mode, and only
a simple comparison is needed to determine if there are new events.

The tp->lock around netif_rx_complete() and tg3_restart_ints() is also
removed. It is unnecessary with DaveM's new locking scheme.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Remove status block access in tg3_msi() and add prefetches
Michael Chan [Tue, 6 Sep 2005 00:53:19 +0000 (17:53 -0700)]
[TG3]: Remove status block access in tg3_msi() and add prefetches

Remove unnecessary status block accesses in tg3_msi(). Since MSI is
not shared, it is unnecessary to read the status block to determine if
there are any new events in the MSI handler. It is also unnecessary to
clear the updated bit in the status block.

Since the poll list is per-cpu, tg3_poll() will be scheduled to run on
the same CPU that received the MSI. Prefetches for the status block
and the next rx descriptors are added in tg3_msi() to improve their
access times when tg3_poll() runs.

In the non-MSI irq handlers, we need to check the status block because
interrupts may be shared. Only prefetches for the next rx descriptors
are added.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add PHY loopback test
Michael Chan [Tue, 6 Sep 2005 00:53:06 +0000 (17:53 -0700)]
[TG3]: Add PHY loopback test

Improve ethtool loopback self test by adding PHY loopback to the
existing MAC loopback test.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add ethtool -p support
Michael Chan [Tue, 6 Sep 2005 00:52:54 +0000 (17:52 -0700)]
[TG3]: Add ethtool -p support

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Minor 5780 and 5752 fixes
Michael Chan [Tue, 6 Sep 2005 00:52:38 +0000 (17:52 -0700)]
[TG3]: Minor 5780 and 5752 fixes

Minor SerDes bug fixes for 5780S and nvram bug fixes for 5780 and
5752.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] klist: fix klist to have the same klist_add semantics as list_head
James Bottomley [Fri, 19 Aug 2005 13:14:01 +0000 (09:14 -0400)]
[PATCH] klist: fix klist to have the same klist_add semantics as list_head

at the moment, the list_head semantics are

list_add(node, head)

whereas current klist semantics are

klist_add(head, node)

This is bound to cause confusion, and since klist is the newcomer, it
should follow the list_head semantics.

I also added missing include guards to klist.h

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Driver core: small cleanup; remove check for NULL before kfree() in driver...
Jesper Juhl [Wed, 17 Aug 2005 20:06:34 +0000 (22:06 +0200)]
[PATCH] Driver core: small cleanup; remove check for NULL before kfree() in driver core

Remove needless checking of variable for NULL before calling kfree() on it.
Applies to 2.6.13-rc6-git9

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Driver core: hande sysdev suspend failure
Shaohua Li [Thu, 11 Aug 2005 02:37:39 +0000 (10:37 +0800)]
[PATCH] Driver core: hande sysdev suspend failure

This patch adds the return value check for sysdev suspend and does
restore in failure case. Send the patch to pm-list, but seems lost, so I
resend it.

Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Driver core: Documentation: use S_IRUSR | ... in stead of 0644
Jan Veldeman [Sun, 31 Jul 2005 11:12:10 +0000 (13:12 +0200)]
[PATCH] Driver core: Documentation: use S_IRUSR | ... in stead of 0644

Change filemode to use defines in stead of 0644,
based on suggestions by Walter Harms and Domen Puncer.

Signed-off-by: Jan Veldeman <Jan.Veldeman@advalvas.be>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Driver core: Documentation: fix whitespace between parameters
Jan Veldeman [Sun, 31 Jul 2005 11:12:09 +0000 (13:12 +0200)]
[PATCH] Driver core: Documentation: fix whitespace between parameters

Fix whitespace after comma between parameters.

Signed-off-by: Jan Veldeman <Jan.Veldeman@advalvas.be>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Floppy: add cmos attribute to floppy driver tidy
Andrew Morton [Thu, 28 Jul 2005 00:37:34 +0000 (17:37 -0700)]
[PATCH] Floppy: add cmos attribute to floppy driver tidy

Fiddle with coding style a bit.

Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Floppy: Add cmos attribute to floppy driver
Hannes Reinecke [Fri, 15 Jul 2005 08:09:25 +0000 (10:09 +0200)]
[PATCH] Floppy: Add cmos attribute to floppy driver

Currently only a device 'fdX' shows up in sysfs; the other possible
device for this drive (like fd0h1440 etc) must be guessed from there.

This patch corrects the floppy driver to create a platform device for
each floppy found; each platform device also has an attribute 'cmos'
which represents the cmos type for this drive. From this attribute the
other possible device types can be computed.

From: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Driver core: link device and all class devices derived from it.
Dmitry Torokhov [Sun, 10 Jul 2005 06:21:24 +0000 (01:21 -0500)]
[PATCH] Driver core: link device and all class devices derived from it.

Driver core: link device and all class devices derived from it.

To ease the task of locating class devices derived from a certain
device create symlinks from parent device to its class devices.
Change USB host class device name from usbX to usb_hostX to avoid
conflict when creating aforementioned links.

Tweaked by Greg to have the symlink be "class_name:class_device_name" in
order to prevent duplicate links.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] Fix manual binding infinite loop
Greg Kroah-Hartman [Thu, 18 Aug 2005 00:33:11 +0000 (17:33 -0700)]
[PATCH] Fix manual binding infinite loop

Fix for manual binding of drivers to devices.  Problem is if you pass in
a valid device id, but the driver refuses to bind.  Infinite loop as
write() tries to resubmit the data it just sent.

Thanks to Michal Ostrowski <mostrows@watson.ibm.com> for pointing the
problem out.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 years ago[PATCH] orinoco: New driver - spectrum_cs.
Pavel Roskin [Fri, 2 Sep 2005 00:10:06 +0000 (20:10 -0400)]
[PATCH] orinoco: New driver - spectrum_cs.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff-tree dee4f325520d4ea29397dd67ca657b7235bb1790 (from c88faac230cc9775445e5c644991c352e35c72a1)
Author: Pavel Roskin <proski@gnu.org>
Date:   Thu Sep 1 17:46:39 2005 -0400

    New driver - spectrum_cs.

    Driver for 802.11b cards using RAM-loadable Symbol firmware, such as
    Symbol Wireless Networker LA4100, CompactFlash cards by Socket
    Communications and Intel PRO/Wireless 2011B.

    The driver implements Symbol firmware download.  The rest is handled
    in hermes.c and orinoco.c.

    Utilities for downloading the Symbol firmware are available at
    http://sourceforge.net/projects/orinoco/
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
19 years ago[PATCH] orinoco: New driver - orinoco_nortel.
Pavel Roskin [Fri, 2 Sep 2005 00:08:56 +0000 (20:08 -0400)]
[PATCH] orinoco: New driver - orinoco_nortel.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff-tree dce61aef99ceb57370b70222dc34d788666c0ac3 (from ceb6695092be8dcdfe2dec6ee5097d613011489d)
Author: Pavel Roskin <proski@gnu.org>
Date:   Thu Sep 1 15:50:55 2005 -0400

    New driver - orinoco_nortel.

    This is a driver for Nortel emobility PCI adaptors, which consist of an
    Orinoco compatible PCMCIA card and a simple PCI-to-PCMCIA bridge.  The
    driver initializes the device and uses Orinoco core driver for actual
    wireless networking.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
19 years ago[PATCH] orinoco: Remove EXPERIMENTAL mark from PLX_HERMES, TMD_HERMES and PCI_HERMES.
Pavel Roskin [Fri, 2 Sep 2005 00:07:52 +0000 (20:07 -0400)]
[PATCH] orinoco: Remove EXPERIMENTAL mark from PLX_HERMES, TMD_HERMES and PCI_HERMES.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff-tree ceb6695092be8dcdfe2dec6ee5097d613011489d (from 6b39374a27eb4be7e9d82145ae270ba02ea90dc8)
Author: Pavel Roskin <proski@gnu.org>
Date:   Thu Sep 1 14:50:10 2005 -0400

    Remove EXPERIMENTAL mark from PLX_HERMES, TMD_HERMES and PCI_HERMES.

    Those drivers have been used for a long time, and there have been very
    few problem reports.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
19 years ago[PATCH] orinoco: Optimize orinoco_join_ap()
Pavel Roskin [Fri, 2 Sep 2005 00:06:06 +0000 (20:06 -0400)]
[PATCH] orinoco: Optimize orinoco_join_ap()

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff-tree cb289b9f9b2a0f3ae7070a008f22e383b37526ee (from 56bfcdb38b3d04c1f8c1fd705e411f4be53b663c)
Author: Pavel Roskin <proski@gnu.org>
Date:   Thu Sep 1 19:05:16 2005 -0400

    Optimize orinoco_join_ap() - break from loop once the requested
BSSID
    is found.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
19 years ago[PATCH] orinoco: Fix memory leak on error in processing hostscan frames.
Pavel Roskin [Fri, 2 Sep 2005 00:05:19 +0000 (20:05 -0400)]
[PATCH] orinoco: Fix memory leak on error in processing hostscan frames.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff-tree ca955293cdfd3139e150d3b4fed3922a7eb651fb (from cb289b9f9b2a0f3ae7070a008f22e383b37526ee)
Author: Pavel Roskin <proski@gnu.org>
Date:   Thu Sep 1 19:08:00 2005 -0400

    Fix memory leak on error in processing hostscan frames.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
19 years ago[PATCH] orinoco: Remove entry for Intel PRO/Wireless 2011B.
Pavel Roskin [Fri, 2 Sep 2005 00:04:20 +0000 (20:04 -0400)]
[PATCH] orinoco: Remove entry for Intel PRO/Wireless 2011B.

Signed-off-by: Pavel Roskin <proski@gnu.org>
diff-tree c88faac230cc9775445e5c644991c352e35c72a1 (from dce61aef99ceb57370b70222dc34d788666c0ac3)
Author: Pavel Roskin <proski@gnu.org>
Date:   Thu Sep 1 17:09:45 2005 -0400

    Remove entry for Intel PRO/Wireless 2011B.

    It is not supported by this driver because it has no firmware in
    flash.  spectrum_cs is needed for this device.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>