pandora-kernel.git
15 years agoHOWTO: Sync patch for jp_JP/HOWTO
Tsugikazu Shibata [Mon, 27 Oct 2008 09:05:40 +0000 (18:05 +0900)]
HOWTO: Sync patch for jp_JP/HOWTO

Sync the jp_JP version of HOWTO to contain the latest updates

From: Tsugikazu Shibata <tshibata@ab.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUpdate stable tree documentation
Josh Boyer [Fri, 24 Oct 2008 14:10:42 +0000 (10:10 -0400)]
Update stable tree documentation

Update the documentation for the stable tree rules to reflect
that device IDs and quirks are also suitable for -stable
kernels.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysfs: Fix return values for sysdev_store_{ulong,int}
Andi Kleen [Mon, 13 Oct 2008 10:03:03 +0000 (12:03 +0200)]
sysfs: Fix return values for sysdev_store_{ulong,int}

SYSFS: Fix return values for sysdev_store_{ulong,int}

Always return the full size instead of the consumed
length of the string in sysdev_store_{ulong,int}

This avoids EINVAL errors in some echo versions.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: drivers/base/sys.c: update comments
Qinghuang Feng [Mon, 13 Oct 2008 10:05:04 +0000 (18:05 +0800)]
driver core: drivers/base/sys.c: update comments

There are no functions named sys_device_shutdown or sys_device_suspend
in the kernel.
They should be fixed to sysdev_shutdown and sysdev_suspend respectively.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoDocument kernel taint flags properly
Greg Kroah-Hartman [Fri, 17 Oct 2008 22:01:07 +0000 (15:01 -0700)]
Document kernel taint flags properly

This fills in the documentation for all of the current kernel taint
flags, and fixes the number for TAINT_CRAP, which was incorrectly
described.

Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years ago[ARM] 5323/1: Remove outdated empeg documentation.
Mike Crowe [Mon, 27 Oct 2008 12:52:49 +0000 (13:52 +0100)]
[ARM] 5323/1: Remove outdated empeg documentation.

The documents aren't particularly useful anyway and the hardware in
question has never run anything newer than a v2.2.14 kernel to my
knowledge.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5299/1: Add maintainer for Mobilepro 900/c
Kristoffer Ericson [Thu, 9 Oct 2008 15:50:46 +0000 (16:50 +0100)]
[ARM] 5299/1: Add maintainer for Mobilepro 900/c

This patch adds the new maintainer for the
Mobilepro 900/c handheld.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Acked-by: Michael Petchkovsky <mkpetch@internode.on.net>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoUSB: prevent autosuspend during hub initialization
Alan Stern [Mon, 27 Oct 2008 16:07:44 +0000 (12:07 -0400)]
USB: prevent autosuspend during hub initialization

This patch (as1153) fixes a potential problem in hub initialization.
Starting in 2.6.28, initialization was split into several tasks to
help speed up booting.  This opens the possibility that the hub may be
autosuspended before all the initialization tasks can complete.

Normally that wouldn't matter, but with incomplete initialization
there is a risk that the hub would never autoresume -- especially if
devices were plugged into the hub beforehand.  The solution is a
simple one-line change to suppress autosuspend until the
initialization is finished.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.
Jens Taprogge [Sun, 26 Oct 2008 17:16:09 +0000 (18:16 +0100)]
USB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.

The camera reports an incorrect size and fails to handle PREVENT-ALLOW
MEDIUM REMOVAL commands.  The patch marks the camera as an unusual dev
and adds the flags to enable the workarounds for both shortcomings.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usbtmc: Use explicit unsigned type for input buffer instead of char*
Chris Malley [Sat, 25 Oct 2008 21:07:32 +0000 (22:07 +0100)]
USB: usbtmc: Use explicit unsigned type for input buffer instead of char*

Silences compiler warning about comparison with 0x80, and type now matches the
corresponding _bulk_out function.

drivers/usb/class/usbtmc.c: In function ‘usbtmc_ioctl_abort_bulk_in’:
drivers/usb/class/usbtmc.c:163: warning: comparison is always false due to limited range of data type

Signed-off-by: Chris Malley <mail@chrismalley.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix crash when URBs are unlinked after the device is gone
Alan Stern [Tue, 21 Oct 2008 19:28:46 +0000 (15:28 -0400)]
USB: fix crash when URBs are unlinked after the device is gone

This patch (as1151) protects usbcore against drivers that try to
unlink an URB after the URB's device or bus have been removed.  The
core does not currently check for this, and certain drivers can cause
a crash if they are running while an HCD is unloaded.

Certainly it would be best to fix the guilty drivers.  But a little
defensive programming doesn't hurt, especially since it appears that
quite a few drivers need to be fixed.

The patch prevents the problem by grabbing a reference to the device
while an unlink is in progress and using a new spinlock to synchronize
unlinks with device removal.  (There's no need to acquire a reference
to the bus as well, since the device structure itself keeps a
reference to the bus.)  In addition, the kerneldoc is updated to
indicate that URBs should not be unlinked after the disconnect method
returns.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoath5k: add self to MAINTAINERS
Bob Copeland [Wed, 29 Oct 2008 12:30:57 +0000 (08:30 -0400)]
ath5k: add self to MAINTAINERS

I might as well be on the official list for ath5k.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: honor FIF_BCN_PRBRESP_PROMISC in STA mode
Bob Copeland [Wed, 29 Oct 2008 12:30:56 +0000 (08:30 -0400)]
ath5k: honor FIF_BCN_PRBRESP_PROMISC in STA mode

We were setting RX_FILTER_BEACON even after entering STA mode,
which leads to a lot of unnecessary wakeups.  This should fix the
bug "Ath5k driver has too many interrupts per second at idle" at
http://bugzilla.kernel.org/show_bug.cgi?id=11749.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Fix reset sequence for AR5212 in general and RF5111 in particular
Elias Oltmanns [Wed, 29 Oct 2008 13:25:42 +0000 (14:25 +0100)]
ath5k: Fix reset sequence for AR5212 in general and RF5111 in particular

Take care to handle register 0xa228 exactly as in the HAL released by
Atheros. This change is required to make ath5k work again on my system
since commit 2203d6be (ath5k: Misc hw_reset updates), thus fixing a
regression in 2.6.27 and therefore hopefully eligible for inclusion into
a stable release.

v2: Only overwrite initial register values on later revisions of AR5212
    chips.
v3: Use standard macros to manipulate the register.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix build error when mac80211=M rt2x00=Y
Ivo van Doorn [Wed, 29 Oct 2008 16:19:08 +0000 (17:19 +0100)]
rt2x00: Fix build error when mac80211=M rt2x00=Y

Make menuconfig RT2X00 a tristate instead of boolean,
otherwise we do not correctly inherit the mac80211 value
on which RT2X00 depends, and makes it possible to
compile rt2x00 into the kernel while mac80211 is a
module.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: correct misspelling in debug help
Bob Copeland [Wed, 29 Oct 2008 12:30:53 +0000 (08:30 -0400)]
ath5k: correct misspelling in debug help

Change "mamagement" to "management"

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: fix buffer overrun
Johannes Berg [Wed, 29 Oct 2008 10:43:32 +0000 (11:43 +0100)]
libertas: fix buffer overrun

If somebody sends an invalid beacon/probe response, that can trash the
whole BSS descriptor. The descriptor is, luckily, large enough so that
it cannot scribble past the end of it; it's well above 400 bytes long.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.24-2.6.27, bug present in some form since driver was added (2.6.22)]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: remove two libertas sparse warning
Holger Schurig [Wed, 29 Oct 2008 09:35:02 +0000 (10:35 +0100)]
libertas: remove two libertas sparse warning

Johannes Berg detected this two sparse warnings:

drivers/net/wireless/libertas/cmd.c:609:16: warning: cast to restricted __le16
drivers/net/wireless/libertas/cmd.c:611:16: warning: cast to restricted __le16

... but cmd.minlevel is "s8", so we can access it directly and hope
for the sign-extension-code in the compiler to convert that to the
"s16" type.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix suspend to RAM in iwlwifi
Tomas Winkler [Tue, 28 Oct 2008 23:03:01 +0000 (01:03 +0200)]
iwlwifi: fix suspend to RAM in iwlwifi

This patch fixes suspend to RAM after by moving
notify_mac out of iwlwifi mutex

http://bugzilla.kernel.org/show_bug.cgi?id=11845

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Carlos R. Mafra <crmafra2@gmail.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoFix incompatibility with versions of Perl less than 5.6.0
Jeremy Huntwork [Wed, 29 Oct 2008 21:20:13 +0000 (14:20 -0700)]
Fix incompatibility with versions of Perl less than 5.6.0

Fix headers_install.pl and headers_check.pl to be compatible with versions
of Perl less than 5.6.0.  It has been tested with Perl 5.005_03 and 5.8.8.
I realize this may not be an issue for most people, but there will still
be some that hit it, I imagine.  There are three basic issues:

1. Prior to 5.6.0 open() only used 2 arguments, and the versions of
the scripts in 2.6.27.1 use 3.
2. 5.6.0 also introduced the ability to use uninitialized scalar
variables as file handles, which the current scripts make use of.
3. Lastly, 5.6.0 also introduced the pragma 'use warnings'. We can use
the -w switch and be backwards compatible.

Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: do not include arch/<ARCH>/include/asm in find-sources twice.
Ian Campbell [Tue, 28 Oct 2008 13:36:25 +0000 (13:36 +0000)]
kbuild: do not include arch/<ARCH>/include/asm in find-sources twice.

Architectures which have moved their includes to arch/<ARCH>/include
now list the headers twice in the source listing used by "make
cscope" and friends, causing those tools to list symbols twice.

Skipping these files in the ALLSOURCE_ARCHS pass rather than removing
the ALLINCLUDE_ARCHS pass preserves the semantics of the later.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: tag with git revision when git describe is missing
Trent Piepho [Fri, 12 Sep 2008 19:26:24 +0000 (12:26 -0700)]
kbuild: tag with git revision when git describe is missing

setlocalversion used to use an abbreviated git commit sha1 to generate the
tag.  This was changed in commit d882421f4e08ddf0a94245cdbe516db260aa6f41
"kbuild: change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish format"
to use git describe to come up with a tag.  Which is nice, but git describe
sometimes can't describe the revision.
Commit 56b2f0706d82535fd8d85503f2dcc0be40c8e55d ("setlocalversion: do not
describe if there is nothing to describe") addressed this, but there is still
no tag generated.

So, generate a plain abbreviated sha1 tag like setlocalversion used to when
git describe comes up short.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
CC: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: prevent modpost from looking for a .cmd file for a static library linked...
Ashutosh Naik [Sat, 25 Oct 2008 22:02:53 +0000 (15:02 -0700)]
kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module

This fixes a compile time warning which occurs whenever a static library
is linked into a kernel module.  MODPOST tries to look for a
".<modulename>.cmd" file to look for its dependencies, but that file
doesn't exist or get generated for static libraries.

This patch prevents modpost from looking for a .cmd file when a module is
linked with a static library

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: fix KBUILD_EXTRA_SYMBOLS
Peter Volkov [Sat, 25 Oct 2008 22:02:52 +0000 (15:02 -0700)]
kbuild: fix KBUILD_EXTRA_SYMBOLS

Taken from http://bugzilla.kernel.org/show_bug.cgi?id=11567

If you even define KBUILD_EXTRA_SYMBOLS in Makefile it will not be expanded
into command line argument for modpost.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoadjust init section definitions
Jan Beulich [Sat, 25 Oct 2008 22:02:51 +0000 (15:02 -0700)]
adjust init section definitions

Add rodata equivalents for assembly use, and fix the section attributes
used by __REFCONST.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoscripts/checksyscalls.sh: fix for non-gnu sed
Thomas Volpini [Sat, 25 Oct 2008 22:02:50 +0000 (15:02 -0700)]
scripts/checksyscalls.sh: fix for non-gnu sed

Make the checksyscalls script work even on systems where sed is non-gnu.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoscripts/package: don't break if %{_smp_mflags} isn't set
Jeremy Kerr [Sat, 25 Oct 2008 22:02:47 +0000 (15:02 -0700)]
scripts/package: don't break if %{_smp_mflags} isn't set

Currently, if we do a 'make rpm-pkg' without the _smp_mflags rpm macro
defined, the build fails with:

  [snip]
  Executing(%build): /bin/bash -e /var/tmp/rpm-tmp.67959
  + umask 022
  + cd /home/jk/devel/kernel-snapshot/rpm/BUILD
  + cd kernel-2.6.26
  + make clean
  + make '%{_smp_mflags}'
  make[3]: *** No rule to make target `%{_smp_mflags}'.  Stop.
  error: Bad exit status from /var/tmp/rpm-tmp.67959 (%build)

This change uses the 'null if not set' reference to the _smp_mflags
macro instead.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: setlocalversion: dont include svn change count
Mike Frysinger [Sat, 25 Oct 2008 21:43:50 +0000 (17:43 -0400)]
kbuild: setlocalversion: dont include svn change count

The number of pending changes is pretty useless, so encoding it into the
version is just annoying by the constant shuffle in corresponding modules.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: improve check-symlink
Sam Ravnborg [Sat, 25 Oct 2008 20:58:23 +0000 (22:58 +0200)]
kbuild: improve check-symlink

o if include/asm point to a nonexisting directory remove the asm symlink
o if include/asm is a directory error out

This fixes a situation where one could be left with a symlink
to asm-x86 but that directory no longer exist and thus the build
would error out.

include/asm may be a directory if the kernel tree has been copied

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: mkspec - fix build rpm
Evgeniy Manachkin [Wed, 15 Oct 2008 17:37:26 +0000 (23:37 +0600)]
kbuild: mkspec - fix build rpm

This is patch to fix incorrect mkspec script to make rpm correctly at 2.6.27 vanilla kernel.
This is regression in 2.6.27. 2.6.26 make rpm work good.
In 2.6.27 'make rpm' say error from rpmbuild "Many unpacked files (*.fw)."

Signed-off-by: Evgeniy Manachkin <sfstudio@mail.ru>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Stable <stable@kernel.org>
15 years agonetlabel: Fix compiler warnings in netlabel_mgmt.c
Paul Moore [Wed, 29 Oct 2008 20:09:12 +0000 (16:09 -0400)]
netlabel: Fix compiler warnings in netlabel_mgmt.c

Fix the compiler warnings below, thanks to Andrew Morton for finding them.

 net/netlabel/netlabel_mgmt.c: In function `netlbl_mgmt_listentry':
 net/netlabel/netlabel_mgmt.c:268: warning: 'ret_val' might be used
  uninitialized in this function

Signed-off-by: Paul Moore <paul.moore@hp.com>
15 years agocipso: unsigned buf_len cannot be negative
roel kluin [Wed, 29 Oct 2008 19:55:53 +0000 (15:55 -0400)]
cipso: unsigned buf_len cannot be negative

unsigned buf_len cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Moore <paul.moore@hp.com>
15 years agoprintk: remove %p6 format specifier, fix up comments
Harvey Harrison [Wed, 29 Oct 2008 19:53:10 +0000 (12:53 -0700)]
printk: remove %p6 format specifier, fix up comments

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: replace %p6 with %pI6
Harvey Harrison [Wed, 29 Oct 2008 19:52:50 +0000 (12:52 -0700)]
net: replace %p6 with %pI6

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: replace %#p6 format specifier with %pi6
Harvey Harrison [Wed, 29 Oct 2008 19:50:24 +0000 (12:50 -0700)]
net: replace %#p6 format specifier with %pi6

gcc warns when using the # modifier with the %p format specifier,
so we can't use this to omit the colons when needed, introduces
%pi6 instead.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoprintk: add %I4, %I6, %i4, %i6 format specifiers
Harvey Harrison [Wed, 29 Oct 2008 19:49:58 +0000 (12:49 -0700)]
printk: add %I4, %I6, %i4, %i6 format specifiers

For use in printing IPv4, or IPv6 addresses in the usual way:

%i4 and %I4 are currently equivalent and print the address in
dot-separated decimal x.x.x.x

%I6 prints 16-bit network order hex with colon separators:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

%i6 omits the colons.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: introduce sk_for_each_rcu_safenext()
Eric Dumazet [Wed, 29 Oct 2008 18:19:58 +0000 (11:19 -0700)]
udp: introduce sk_for_each_rcu_safenext()

Corey Minyard found a race added in commit 271b72c7fa82c2c7a795bc16896149933110672d
(udp: RCU handling for Unicast packets.)

 "If the socket is moved from one list to another list in-between the
 time the hash is calculated and the next field is accessed, and the
 socket has moved to the end of the new list, the traversal will not
 complete properly on the list it should have, since the socket will
 be on the end of the new list and there's not a way to tell it's on a
 new list and restart the list traversal.  I think that this can be
 solved by pre-fetching the "next" field (with proper barriers) before
 checking the hash."

This patch corrects this problem, introducing a new
sk_for_each_rcu_safenext() macro.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: udp_get_next() should use spin_unlock_bh()
Eric Dumazet [Wed, 29 Oct 2008 18:19:11 +0000 (11:19 -0700)]
udp: udp_get_next() should use spin_unlock_bh()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoftrace: fix trace_nop config select
Steven Rostedt [Wed, 29 Oct 2008 15:15:57 +0000 (11:15 -0400)]
ftrace: fix trace_nop config select

Impact: build fix on non-function-tracing architectures

The trace_nop is the tracer that is defined when no tracer is set in
the ftrace infrastructure.

The trace_nop was mistakenly selected by HAVE_FTRACE due to the confusion
between ftrace infrastructure and the ftrace function tracer (which has
been solved by renaming the function tracer).

This patch changes the select to the approriate TRACING.

This patch should fix compile errors on architectures that do not define
the FUNCTION_TRACER.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linus
Takashi Iwai [Wed, 29 Oct 2008 15:40:00 +0000 (16:40 +0100)]
Merge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linus

15 years agoALSA: hda - Add reboot notifier
Takashi Iwai [Wed, 29 Oct 2008 15:18:25 +0000 (16:18 +0100)]
ALSA: hda - Add reboot notifier

The current snd-hda-intel driver seems blocking the power-off on some
devices like eeepc.  Although this is likely a BIOS problem, we can add
a workaround by disabling IRQ lines before power-off operation.
This patch adds the reboot notifier to achieve it.

The detailed problem description is found in bug#11889:
    http://bugme.linux-foundation.org/show_bug.cgi?id=11889

Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: Warn when control names are truncated
Mark Brown [Wed, 29 Oct 2008 14:40:30 +0000 (14:40 +0000)]
ALSA: Warn when control names are truncated

This is likely to confuse user interfaces since the end of the control
name is interpreted (eg, "Volume", "Switch").

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: intel8x0 - add Dell Optiplex GX620 (AD1981B) to AC97 clock whitelist
Bastien Nocera [Wed, 29 Oct 2008 12:59:05 +0000 (12:59 +0000)]
ALSA: intel8x0 - add Dell Optiplex GX620 (AD1981B) to AC97 clock whitelist

alsa-info.sh output at:
https://bugzilla.redhat.com/show_bug.cgi?id=441087#c49

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoudp: calculate udp_mem based on low memory instead of all memory
Eric Dumazet [Wed, 29 Oct 2008 09:32:32 +0000 (02:32 -0700)]
udp: calculate udp_mem based on low memory instead of all memory

This patch mimics commit 57413ebc4e0f1e471a3b4db4aff9a85c083d090e
(tcp: calculate tcp_mem based on low memory instead of all memory)

The udp_mem array which contains limits on the total amount of memory
used by UDP sockets is calculated based on nr_all_pages.  On a 32 bits
x86 system, we should base this on the number of lowmem pages.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: RCU handling for Unicast packets.
Eric Dumazet [Wed, 29 Oct 2008 09:11:14 +0000 (02:11 -0700)]
udp: RCU handling for Unicast packets.

Goals are :

1) Optimizing handling of incoming Unicast UDP frames, so that no memory
 writes should happen in the fast path.

 Note: Multicasts and broadcasts still will need to take a lock,
 because doing a full lockless lookup in this case is difficult.

2) No expensive operations in the socket bind/unhash phases :
  - No expensive synchronize_rcu() calls.

  - No added rcu_head in socket structure, increasing memory needs,
  but more important, forcing us to use call_rcu() calls,
  that have the bad property of making sockets structure cold.
  (rcu grace period between socket freeing and its potential reuse
   make this socket being cold in CPU cache).
  David did a previous patch using call_rcu() and noticed a 20%
  impact on TCP connection rates.
  Quoting Cristopher Lameter :
   "Right. That results in cacheline cooldown. You'd want to recycle
    the object as they are cache hot on a per cpu basis. That is screwed
    up by the delayed regular rcu processing. We have seen multiple
    regressions due to cacheline cooldown.
    The only choice in cacheline hot sensitive areas is to deal with the
    complexity that comes with SLAB_DESTROY_BY_RCU or give up on RCU."

  - Because udp sockets are allocated from dedicated kmem_cache,
  use of SLAB_DESTROY_BY_RCU can help here.

Theory of operation :
---------------------

As the lookup is lockfree (using rcu_read_lock()/rcu_read_unlock()),
special attention must be taken by readers and writers.

Use of SLAB_DESTROY_BY_RCU is tricky too, because a socket can be freed,
reused, inserted in a different chain or in worst case in the same chain
while readers could do lookups in the same time.

In order to avoid loops, a reader must check each socket found in a chain
really belongs to the chain the reader was traversing. If it finds a
mismatch, lookup must start again at the begining. This *restart* loop
is the reason we had to use rdlock for the multicast case, because
we dont want to send same message several times to the same socket.

We use RCU only for fast path.
Thus, /proc/net/udp still takes spinlocks.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: introduce struct udp_table and multiple spinlocks
Eric Dumazet [Wed, 29 Oct 2008 08:41:45 +0000 (01:41 -0700)]
udp: introduce struct udp_table and multiple spinlocks

UDP sockets are hashed in a 128 slots hash table.

This hash table is protected by *one* rwlock.

This rwlock is readlocked each time an incoming UDP message is handled.

This rwlock is writelocked each time a socket must be inserted in
hash table (bind time), or deleted from this table (close time)

This is not scalable on SMP machines :

1) Even in read mode, lock() and unlock() are atomic operations and
 must dirty a contended cache line, shared by all cpus.

2) A writer might be starved if many readers are 'in flight'. This can
 happen on a machine with some NIC receiving many UDP messages. User
 process can be delayed a long time at socket creation/dismantle time.

This patch prepares RCU migration, by introducing 'struct udp_table
and struct udp_hslot', and using one spinlock per chain, to reduce
contention on central rwlock.

Introducing one spinlock per chain reduces latencies, for port
randomization on heavily loaded UDP servers. This also speedup
bindings to specific ports.

udp_lib_unhash() was uninlined, becoming to big.

Some cleanups were done to ease review of following patch
(RCUification of UDP Unicast lookups)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agox86: remove debug code from arch_add_memory()
Gary Hade [Tue, 28 Oct 2008 23:43:14 +0000 (16:43 -0700)]
x86: remove debug code from arch_add_memory()

Impact: remove incorrect WARN_ON(1)

Gets rid of dmesg spam created during physical memory hot-add which
will very likely confuse users.  The change removes what appears to
be debugging code which I assume was unintentionally included in:

  x86: arch/x86/mm/init_64.c printk fixes
  commit 10f22dde556d1ed41d55355d1fb8ad495f9810c8

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: start annotating early ioremap pointers with __iomem
Harvey Harrison [Wed, 29 Oct 2008 05:46:04 +0000 (22:46 -0700)]
x86: start annotating early ioremap pointers with __iomem

Impact: some new sparse warnings in e820.c etc, but no functional change.

As with regular ioremap, iounmap etc, annotate with __iomem.

Fixes the following sparse warnings, will produce some new ones
elsewhere in arch/x86 that will get worked out over time.

arch/x86/mm/ioremap.c:402:9: warning: cast removes address space of expression
arch/x86/mm/ioremap.c:406:10: warning: cast adds address space to expression (<asn:2>)
arch/x86/mm/ioremap.c:782:19: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoALSA: hda - Fix SPDIF mute on IDT/STAC codecs
Takashi Iwai [Wed, 29 Oct 2008 07:03:42 +0000 (08:03 +0100)]
ALSA: hda - Fix SPDIF mute on IDT/STAC codecs

The SPDIF mute switch code seems broken.  It doesn't set unmute bits
properly.  Also it contains the duplicated lines (merge error?) to be
cleaned up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: two trivial sparse annotations
Harvey Harrison [Wed, 29 Oct 2008 06:05:22 +0000 (23:05 -0700)]
x86: two trivial sparse annotations

Impact: fewer sparse warnings, no functional changes

arch/x86/kernel/vsmp_64.c:87:14: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kernel/vsmp_64.c:87:14:    expected void const volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:87:14:    got void *[assigned] address
arch/x86/kernel/vsmp_64.c:88:22: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kernel/vsmp_64.c:88:22:    expected void const volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:88:22:    got void *
arch/x86/kernel/vsmp_64.c:100:23: warning: incorrect type in argument 2 (different address spaces)
arch/x86/kernel/vsmp_64.c:100:23:    expected void volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:100:23:    got void *
arch/x86/kernel/vsmp_64.c:101:23: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kernel/vsmp_64.c:101:23:    expected void const volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:101:23:    got void *
arch/x86/mm/gup.c:235:6: warning: incorrect type in argument 1 (different base types)
arch/x86/mm/gup.c:235:6:    expected void const volatile [noderef] <asn:1>*<noident>
arch/x86/mm/gup.c:235:6:    got unsigned long [unsigned] [assigned] start

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agonet: remove NIP6(), NIP6_FMT, NIP6_SEQFMT and final users
Harvey Harrison [Wed, 29 Oct 2008 05:38:52 +0000 (22:38 -0700)]
net: remove NIP6(), NIP6_FMT, NIP6_SEQFMT and final users

Open code NIP6_FMT in the one call inside sscanf and one user
of NIP6() that could use %p6 in the netfilter code.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agouwb: use the %pM formatting specifier in eda.c
Harvey Harrison [Wed, 29 Oct 2008 05:38:06 +0000 (22:38 -0700)]
uwb: use the %pM formatting specifier in eda.c

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinfiniband: remove IPOIB_GID_RAW_ARG, IPOIB_GID_ARG, IPOIB_GID_FMT
Harvey Harrison [Wed, 29 Oct 2008 05:37:41 +0000 (22:37 -0700)]
infiniband: remove IPOIB_GID_RAW_ARG, IPOIB_GID_ARG, IPOIB_GID_FMT

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinfiniband: ipoib replace IPOIB_GID_FMT with %p6
Harvey Harrison [Wed, 29 Oct 2008 05:37:22 +0000 (22:37 -0700)]
infiniband: ipoib replace IPOIB_GID_FMT with %p6

Replace all uses of IPOIB_GID_FMT, IPOIB_GID_RAW_ARG() and IPOIB_GID_ARG()

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinfiniband: use %p6 for printing message ids
Harvey Harrison [Wed, 29 Oct 2008 05:36:33 +0000 (22:36 -0700)]
infiniband: use %p6 for printing message ids

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovlan: propogate ethtool speed values
Stephen Hemminger [Wed, 29 Oct 2008 05:12:36 +0000 (22:12 -0700)]
vlan: propogate ethtool speed values

This enables more ethtool information. The speed and settings of the
underlying device are propagated up. This makes services like SNMP that
use ethtool to get speed setting, work when managing a vlan, without adding
silly heurtistics into SNMP daemon.

For the driver info, just use existing driver strings.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoveth: remove unused list
Daniel Lezcano [Wed, 29 Oct 2008 05:08:46 +0000 (22:08 -0700)]
veth: remove unused list

The veth network device is stored in a list in the netdev private.
AFAICS, this list is never used so I removed this list from the code.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoveth: Remove useless veth field
Daniel Lezcano [Wed, 29 Oct 2008 05:08:19 +0000 (22:08 -0700)]
veth: Remove useless veth field

The veth private structure contains a netdev pointer refering to its peer.
This field is never used and it is pointless because if we can access,
the veth_priv, that means we already have the netdev which is stored
in veth_priv->dev.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet, misc: replace uses of NIP6_FMT with %p6
Harvey Harrison [Tue, 28 Oct 2008 23:10:17 +0000 (16:10 -0700)]
net, misc: replace uses of NIP6_FMT with %p6

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: replace uses of NIP6_FMT with %p6
Harvey Harrison [Tue, 28 Oct 2008 23:09:23 +0000 (16:09 -0700)]
net: replace uses of NIP6_FMT with %p6

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[ARM] corgi_lcd: fix simultaneous compilation with corgi_bl
Dmitry Baryshkov [Tue, 28 Oct 2008 17:26:40 +0000 (20:26 +0300)]
[ARM] corgi_lcd: fix simultaneous compilation with corgi_bl

corgi_lcd has symbol conflict with corgi_bl driver.
Fix it by renaming common symbol in new corgi_lcd driver.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa/spitz: fix spi cs on spitz
Dmitry Baryshkov [Wed, 29 Oct 2008 03:40:46 +0000 (11:40 +0800)]
[ARM] pxa/spitz: fix spi cs on spitz

On spitz configure SPI CS GPIOs as outputs to unbreak spi chip selection.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agoHID: fix hid_device_id for cross compiling
Andreas Schwab [Sat, 25 Oct 2008 22:30:18 +0000 (00:30 +0200)]
HID: fix hid_device_id for cross compiling

struct hid_device_id contains hidden padding which is bad for cross
compiling.  Make the padding explicit and consistent across
architectures.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agonetfilter: replace uses of NIP6_FMT with %p6
Harvey Harrison [Tue, 28 Oct 2008 23:08:13 +0000 (16:08 -0700)]
netfilter: replace uses of NIP6_FMT with %p6

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomisc: replace NIP6_FMT with %p6 format specifier
Harvey Harrison [Tue, 28 Oct 2008 23:06:44 +0000 (16:06 -0700)]
misc: replace NIP6_FMT with %p6 format specifier

The iscsi_ibft.c changes are almost certainly a bugfix as the
pointer 'ip' is a u8 *, so they never print the last 8 bytes
of the IPv6 address, and the eight bytes they do print have
a zero byte with them in each 16-bit word.

Other than that, this should cause no difference in functionality.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: replace all current users of NIP6_SEQFMT with %#p6
Harvey Harrison [Tue, 28 Oct 2008 23:05:40 +0000 (16:05 -0700)]
net: replace all current users of NIP6_SEQFMT with %#p6

The define in kernel.h can be done away with at a later time.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoprintk: add %p6 format specifier for IPv6 addresses
Harvey Harrison [Tue, 28 Oct 2008 23:04:44 +0000 (16:04 -0700)]
printk: add %p6 format specifier for IPv6 addresses

Takes a pointer to a IPv6 address and formats it in the usual
colon-separated hex format:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

Each 16 bit word is printed in network-endian byteorder.

%#p6 is also supported and will omit the colons.

%p6 is a replacement for NIP6_FMT and NIP6()
%#p6 is a replacement for NIP6_SEQFMT and NIP6()

Note that NIP6() took a struct in6_addr whereas this takes a pointer
to a struct in6_addr.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxfrm: Notify changes in UDP encapsulation via netlink
Martin Willi [Tue, 28 Oct 2008 23:01:07 +0000 (16:01 -0700)]
xfrm: Notify changes in UDP encapsulation via netlink

Add new_mapping() implementation to the netlink xfrm_mgr to notify
address/port changes detected in UDP encapsulated ESP packets.

Signed-off-by: Martin Willi <martin@strongswan.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoamd8111e: Fix rx return code
Chris Friesen [Tue, 28 Oct 2008 22:50:54 +0000 (15:50 -0700)]
amd8111e: Fix rx return code

The amd8111e rx poll routine currently mishandles the case when we
process exactly the number of packets specified in the budget.

This patch is basically as suggested by David Miller.

Signed-off-by: Chris Friesen <cfriesen@nortel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoregulator: Build on non-ARM platforms
Mark Brown [Wed, 15 Oct 2008 10:53:34 +0000 (11:53 +0100)]
regulator: Build on non-ARM platforms

When the regulator API was merged it was added to the separate Kconfig
which ARM uses for drivers but not the generic one in drivers/.  Since
there is nothing ARM-specific about the API add it there too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agonet: don't use INIT_RCU_HEAD
Alexey Dobriyan [Tue, 28 Oct 2008 20:25:09 +0000 (13:25 -0700)]
net: don't use INIT_RCU_HEAD

call_rcu() will unconditionally rewrite RCU head anyway.
Applies to
struct neigh_parms
struct neigh_table
struct net
struct cipso_v4_doi
struct in_ifaddr
struct in_device
rt->u.dst

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: reduce structures when XFRM=n
Alexey Dobriyan [Tue, 28 Oct 2008 20:24:06 +0000 (13:24 -0700)]
net: reduce structures when XFRM=n

ifdef out
* struct sk_buff::sp (pointer)
* struct dst_entry::xfrm (pointer)
* struct sock::sk_policy (2 pointers)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopktgen: fix multiple queue warning
Jesse Brandeburg [Tue, 28 Oct 2008 20:21:51 +0000 (13:21 -0700)]
pktgen: fix multiple queue warning

when testing the new pktgen module with multiple queues and ixgbe with:
pgset "flag QUEUE_MAP_CPU"

I found that I was getting errors in dmesg like:
pktgen: WARNING: QUEUE_MAP_CPU disabled because CPU count (8) exceeds number
<4>pktgen: WARNING: of tx queues (8) on eth15

you'll note, 8 really doesn't exceed 8.

This patch seemed to fix the logic errors and also the attempts at
limiting line length in printk (which didn't work anyway)

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agox86: fix init_memory_mapping for [dc000000 - e0000000) - v2
Yinghai Lu [Tue, 28 Oct 2008 19:39:23 +0000 (12:39 -0700)]
x86: fix init_memory_mapping for [dc000000 - e0000000) - v2

Impact: change over-mapping to precise mapping, fix /proc/meminfo output

v2: fix less than 1G ram system handling

when gart aperture is 0xdc000000 - 0xe0000000
it return 0xc0000000 - 0xe0000000

that is not right.

this patch fix that will get exact mapping

on 256g sytem with that aperture after patch
LBSuse:~ # cat /proc/meminfo
MemTotal:       264742432 kB
MemFree:        263920628 kB
Buffers:            1416 kB
Cached:            24468 kB
...
DirectMap4k:      5760 kB
DirectMap2M:   3205120 kB
DirectMap1G:  265289728 kB

it is consistent to
LBSuse:~ # cat /sys/kernel/debug/kernel_page_tables
..
---[ Low Kernel Mapping ]---
0xffff880000000000-0xffff880000200000           2M     RW             GLB x  pte
0xffff880000200000-0xffff880040000000        1022M     RW         PSE GLB x  pmd
0xffff880040000000-0xffff8800c0000000           2G     RW         PSE GLB NX pud
0xffff8800c0000000-0xffff8800d7e00000         382M     RW         PSE GLB NX pmd
0xffff8800d7e00000-0xffff8800d7fa0000        1664K     RW             GLB NX pte
0xffff8800d7fa0000-0xffff8800d8000000         384K                           pte
0xffff8800d8000000-0xffff8800dc000000          64M                           pmd
0xffff8800dc000000-0xffff8800e0000000          64M     RW         PSE GLB NX pmd
0xffff8800e0000000-0xffff880100000000         512M                           pmd
0xffff880100000000-0xffff880800000000          28G     RW         PSE GLB NX pud
0xffff880800000000-0xffff880824600000         582M     RW         PSE GLB NX pmd
0xffff880824600000-0xffff8808247f0000        1984K     RW             GLB NX pte
0xffff8808247f0000-0xffff880824800000          64K     RW     PCD     GLB NX pte
0xffff880824800000-0xffff880840000000         440M     RW         PSE GLB NX pmd
0xffff880840000000-0xffff884000000000         223G     RW         PSE GLB NX pud
0xffff884000000000-0xffff884028000000         640M     RW         PSE GLB NX pmd
0xffff884028000000-0xffff884040000000         384M                           pmd
0xffff884040000000-0xffff888000000000         255G                           pud
0xffff888000000000-0xffffc20000000000       58880G                           pgd

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoSUNRPC: Fix potential race in put_rpccred()
Trond Myklebust [Tue, 28 Oct 2008 19:21:42 +0000 (15:21 -0400)]
SUNRPC: Fix potential race in put_rpccred()

We have to be careful when we try to unhash the credential in
put_rpccred(), because we're not holding the credcache lock, so the call to
rpcauth_unhash_cred() may fail if someone else has looked the cred up, and
obtained a reference to it.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years agoSUNRPC: Fix rpcauth_prune_expired
Trond Myklebust [Tue, 28 Oct 2008 19:21:41 +0000 (15:21 -0400)]
SUNRPC: Fix rpcauth_prune_expired

We need to make sure that we don't remove creds from the cred_unused list
if they are still under the moratorium, or else they will never get
garbage collected.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years agoNFS: Convert nfs_attr_generation_counter into an atomic_long
Trond Myklebust [Tue, 28 Oct 2008 19:21:40 +0000 (15:21 -0400)]
NFS: Convert nfs_attr_generation_counter into an atomic_long

The most important property we need from nfs_attr_generation_counter is
monotonicity, which is not guaranteed by the current system of smp memory
barriers. We should convert it to an atomic_long_t, and drop the memory
barriers.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years agoSUNRPC: Respond promptly to server TCP resets
Trond Myklebust [Tue, 28 Oct 2008 19:21:39 +0000 (15:21 -0400)]
SUNRPC: Respond promptly to server TCP resets

If the server sends us an RST error while we're in the TCP_ESTABLISHED
state, then that will not result in a state change, and so the RPC client
ends up hanging forever (see
http://bugzilla.kernel.org/show_bug.cgi?id=11154)

We can intercept the reset by setting up an sk->sk_error_report callback,
which will then allow us to initiate a proper shutdown and retry...

We also make sure that if the send request receives an ECONNRESET, then we
shutdown too...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years ago[PATCH] Switch all my contributions stuff to a single common address
Alan Cox [Mon, 27 Oct 2008 15:17:56 +0000 (15:17 +0000)]
[PATCH] Switch all my contributions stuff to a single common address

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years agonetlink: constify struct nlattr * arg to parsing functions
Patrick McHardy [Tue, 28 Oct 2008 18:59:11 +0000 (11:59 -0700)]
netlink: constify struct nlattr * arg to parsing functions

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoresources: fix x86info results ioremap.c:226 __ioremap_caller+0xf2/0x2d6() WARNINGs
Suresh Siddha [Tue, 28 Oct 2008 18:45:42 +0000 (11:45 -0700)]
resources: fix x86info results ioremap.c:226 __ioremap_caller+0xf2/0x2d6() WARNINGs

Impact: avoid false-positive WARN_ON()

Andi Kleen reported:
> When running x86info on a 2.6.27-git8 system I get
>
> resource map sanity check conflict: 0x9e000 0x9efff 0x10000 0x9e7ff System RAM
> ------------[ cut here ]------------
> WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6()
> ...

Some of the pages below the 1MB ISA addresses will be shared typically by both
BIOS and system usable RAM. For example:
BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)

x86info reads the low physical address using /dev/mem, which internally
uses ioremap() for accessing non RAM pages. ioremap() of such low
pages conflicts with multiple resource entities leading to the
above warning.

Change the iomem_map_sanity_check() to allow mapping a page spanning multiple
resource entities (minimum granularity that one can map is a page anyhow).

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: perform an initialization for ftrace to enable it
Frederic Weisbecker [Tue, 28 Oct 2008 19:17:38 +0000 (20:17 +0100)]
ftrace: perform an initialization for ftrace to enable it

Impact: corrects a bug which made the non-dyn function tracer not functional

With latest git, the non-dynamic function tracer didn't get any trace.

The problem was the fact that ftrace_enabled wasn't initialized to 1
because ftrace hasn't any init function when DYNAMIC_FTRACE is disabled.

So when a tracer tries to register an ftrace_ops struct,
__register_ftrace_function failed to set the hook.

This patch corrects it by setting an init function to initialize
ftrace during the boot.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Tue, 28 Oct 2008 18:01:07 +0000 (11:01 -0700)]
Merge branch 'davem-fixes' of /linux/kernel/git/jgarzik/netdev-2.6

15 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 28 Oct 2008 16:52:25 +0000 (09:52 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
  ftrace: fix current_tracer error return
  tracing: fix a build error on alpha
  ftrace: use a real variable for ftrace_nop in x86
  tracing/ftrace: make boot tracer select the sched_switch tracer
  tracepoint: check if the probe has been registered
  asm-generic: define DIE_OOPS in asm-generic
  trace: fix printk warning for u64
  ftrace: warning in kernel/trace/ftrace.c
  ftrace: fix build failure
  ftrace, powerpc, sparc64, x86: remove notrace from arch ftrace file
  ftrace: remove ftrace hash
  ftrace: remove mcount set
  ftrace: remove daemon
  ftrace: disable dynamic ftrace for all archs that use daemon
  ftrace: add ftrace warn on to disable ftrace
  ftrace: only have ftrace_kill atomic
  ftrace: use probe_kernel
  ftrace: comment arch ftrace code
  ftrace: return error on failed modified text.
  ftrace: dynamic ftrace process only text section
  ...

15 years agoMerge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 28 Oct 2008 16:50:11 +0000 (09:50 -0700)]
Merge branch 'kvm-updates/2.6.28' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: ia64: Makefile fix for forcing to re-generate asm-offsets.h
  KVM: Future-proof device assignment ABI
  KVM: ia64: Fix halt emulation logic
  KVM: Fix guest shared interrupt with in-kernel irqchip
  KVM: MMU: sync root on paravirt TLB flush

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 28 Oct 2008 16:49:27 +0000 (09:49 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: fix irqs on/off ip tracing
  lockdep: minor fix for debug_show_all_locks()
  x86: restore the old swiotlb alloc_coherent behavior
  x86: use GFP_DMA for 24bit coherent_dma_mask
  swiotlb: remove panic for alloc_coherent failure
  xen: compilation fix of drivers/xen/events.c on IA64
  xen: portability clean up and some minor clean up for xencomm.c
  xen: don't reload cr3 on suspend
  kernel/resource: fix reserve_region_with_split() section mismatch
  printk: remove unused code from kernel/printk.c

15 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 28 Oct 2008 16:48:25 +0000 (09:48 -0700)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  irq: make variable static

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 28 Oct 2008 16:46:20 +0000 (09:46 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: fix documentation reference for sched_min_granularity_ns
  sched: virtual time buddy preemption
  sched: re-instate vruntime based wakeup preemption
  sched: weaken sync hint
  sched: more accurate min_vruntime accounting
  sched: fix a find_busiest_group buglet
  sched: add CONFIG_SMP consistency

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 28 Oct 2008 16:45:31 +0000 (09:45 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, memory hotplug: remove wrong -1 in calling init_memory_mapping()
  x86: keep the /proc/meminfo page count correct
  x86/uv: memory allocation at initialization
  xen: fix Xen domU boot with batched mprotect

15 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 28 Oct 2008 16:44:59 +0000 (09:44 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] s390: Fix build for !CONFIG_S390_GUEST + CONFIG_VIRTIO_CONSOLE
  [S390] No more 4kb stacks.
  [S390] Change default IPL method to IPL_VM.
  [S390] tape: disable interrupts in tape_open and tape_release
  [S390] appldata: unsigned ops->size cannot be negative
  [S390] tape block: complete request with correct locking
  [S390] Fix sysdev class file creation.
  [S390] pgtables: Fix race in enable_sie vs. page table ops
  [S390] qdio: remove incorrect memset
  [S390] qdio: prevent double qdio shutdown in case of I/O errors

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 28 Oct 2008 16:42:48 +0000 (09:42 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: ahci enclosure management bit mask
  libata: ahci enclosure management led sync
  pata_ninja32: suspend/resume support
  libata: Fix LBA48 on pata_it821x RAID volumes.
  libata: clear saved xfer_mode and ncq_enabled on device detach
  sata_sil24: configure max read request size to 4k
  libata: add missing kernel-doc
  libata: fix device iteration bugs
  ahci: Add support for Promise PDC42819
  ata: Switch all my stuff to a common address

15 years agox86, gart: fix gart detection for Fam11h CPUs
Joerg Roedel [Tue, 28 Oct 2008 15:13:54 +0000 (16:13 +0100)]
x86, gart: fix gart detection for Fam11h CPUs

Impact: fix AMD Family 11h boot hangs / USB device problems

The AMD Fam11h CPUs have a K8 northbridge. This northbridge is different
from other family's because it lacks GART support (as I just learned).

But the kernel implicitly expects a GART if it finds an AMD northbridge.

Fix this by removing the Fam11h northbridge id from the scan list of K8
northbridges. This patch also changes the message in the GART driver
about missing K8 northbridges to tell that the GART is missing which is
the correct information in this case.

Reported-by: Jouni Malinen <jkmalinen@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: 64 bit print out absent pages num too
Yinghai Lu [Wed, 15 Oct 2008 01:59:18 +0000 (18:59 -0700)]
x86: 64 bit print out absent pages num too

so users are not confused with memhole causing big total ram

we don't need to worry about 32 bit, because memhole is always
above max_low_pfn.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, kdump: fix invalid access on i386 sparsemem
Ken'ichi Ohmichi [Mon, 20 Oct 2008 04:51:52 +0000 (13:51 +0900)]
x86, kdump: fix invalid access on i386 sparsemem

Impact: fix kdump crash on 32-bit sparsemem kernels

Since linux-2.6.27, kdump has failed on i386 sparsemem kernel.
1st-kernel gets a panic just before switching to 2nd-kernel.

The cause is that a kernel accesses invalid mem_section by
page_to_pfn(image->swap_page) at machine_kexec().
image->swap_page is allocated if kexec for hibernation, but
it is not allocated if kdump. So if kdump, a kernel should
not access the mem_section corresponding to image->swap_page.

The attached patch fixes this invalid access.

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: kexec-ml <kexec@lists.infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix APIC_DEBUG with inquire_remote_apic
Yinghai Lu [Wed, 15 Oct 2008 01:59:17 +0000 (18:59 -0700)]
x86: fix APIC_DEBUG with inquire_remote_apic

APIC_DEBUG is always 2.
need to update inquire_remote_apic to check apic_verbosity with
it instead.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: AMD microcode patch loader author update
Peter Oruba [Fri, 17 Oct 2008 13:30:38 +0000 (15:30 +0200)]
x86: AMD microcode patch loader author update

Removed author's email address from MODULE_AUTHOR.

Signed-off-by: Peter Oruba <peter.oruba@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: microcode patch loader author update
Peter Oruba [Fri, 17 Oct 2008 13:30:37 +0000 (15:30 +0200)]
x86: microcode patch loader author update

Removed one author's email address from module init message.

Signed-off-by: Peter Oruba <peter.oruba@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agomailmap: add Peter Oruba
Peter Oruba [Fri, 17 Oct 2008 13:30:36 +0000 (15:30 +0200)]
mailmap: add Peter Oruba

Signed-off-by: Peter Oruba <peter.oruba@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: improve help text for BTS config
Markus Metzger [Fri, 17 Oct 2008 07:09:27 +0000 (09:09 +0200)]
x86, bts: improve help text for BTS config

Improve the help text of the X86_PTRACE_BTS config.
Make X86_DS invisible and depend on X86_PTRACE_BTS.

Reported-by: Roland Dreier <rdreier@cisco.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agodoc/x86: fix doc subdirs
Uwe Hermann [Mon, 20 Oct 2008 16:32:21 +0000 (09:32 -0700)]
doc/x86: fix doc subdirs

The Documentation/i386 and Documentation/x86_64 directories and their
contents have been moved into Documentation/x86. Fix references to
those files accordingly.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>