pandora-kernel.git
17 years agoBlackfin arch: fix a few random warnings
Mike Frysinger [Mon, 21 May 2007 10:09:12 +0000 (18:09 +0800)]
Blackfin arch: fix a few random warnings

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoBlackfin arch: ISP1761 doesn't work for USB flash disk
Aubrey Li [Mon, 21 May 2007 10:09:11 +0000 (18:09 +0800)]
Blackfin arch: ISP1761 doesn't work for USB flash disk

ZONE_DMA is required for some drivers subsystem, such as USB/SCSI.

Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoBlackfin arch: add SPI MMC driver support on bf533-stamp, tested on STAMP-BF533
Bryan Wu [Mon, 21 May 2007 10:09:10 +0000 (18:09 +0800)]
Blackfin arch: add SPI MMC driver support on bf533-stamp, tested on STAMP-BF533

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoBlackfin arch: Add Workaround for ANOMALY 05000257
Michael Hennerich [Mon, 21 May 2007 10:09:09 +0000 (18:09 +0800)]
Blackfin arch: Add Workaround for ANOMALY 05000257

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoDetach sched.h from mm.h
Alexey Dobriyan [Sun, 20 May 2007 21:22:52 +0000 (01:22 +0400)]
Detach sched.h from mm.h

First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
alpha alpha-up
arm
i386 i386-up i386-defconfig i386-allnoconfig
ia64 ia64-up
m68k
mips
parisc parisc-up
powerpc powerpc-up
s390 s390-up
sparc sparc-up
sparc64 sparc64-up
um-x86_64
x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix "fs: convert core functions to zero_user_page"
OGAWA Hirofumi [Sun, 20 May 2007 14:39:40 +0000 (23:39 +0900)]
Fix "fs: convert core functions to zero_user_page"

The bug was introduced by 01f2705daf5a36208e69d7cf95db9c330f843af6.
It misses to convert the first argument, it should be "new_page".

This became a cause of fatfs corruption.

Cc: Nate Diller <nate.diller@gmail.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 21 May 2007 16:00:25 +0000 (09:00 -0700)]
Merge /pub/scm/linux/kernel/git/herbert/crypto-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] api: Read module pointer before freeing algorithm

17 years ago[S390] More verbose show_mem() like other architectures.
Heiko Carstens [Mon, 21 May 2007 09:25:23 +0000 (11:25 +0200)]
[S390] More verbose show_mem() like other architectures.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Make use of kretprobe_assert.
Heiko Carstens [Mon, 21 May 2007 09:25:22 +0000 (11:25 +0200)]
[S390] Make use of kretprobe_assert.

s390 change for git commit 0f95b7fc839bc3272b1bf2325d8748a649bd3534.
That is print kprobes debug data before BUG().

Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Wire up signald, timerfd and eventfd syscalls.
Heiko Carstens [Mon, 21 May 2007 09:25:21 +0000 (11:25 +0200)]
[S390] Wire up signald, timerfd and eventfd syscalls.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Wire up sys_utimensat.
Heiko Carstens [Mon, 21 May 2007 09:25:20 +0000 (11:25 +0200)]
[S390] Wire up sys_utimensat.

Wire up sys_utimensat, reserve syscall number for sys_fallocate and
add a couple of syscalls to the ignore list to get rid of warings.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Update documentation.
Cornelia Huck [Mon, 21 May 2007 09:25:19 +0000 (11:25 +0200)]
[S390] cio: Update documentation.

- read_dev_chars()/read_conf_data() are deprecated. Don't document them, but
  advise to issue the channel program from the driver itself.
- Remove some really obsolete and incorrect stuff.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years agosh: Fix dreamcast build for IRQ changes.
Paul Mundt [Mon, 21 May 2007 06:10:04 +0000 (15:10 +0900)]
sh: Fix dreamcast build for IRQ changes.

When the irq.h changes went in, the dreamcast code was still
referencing an old value. Switch it back to the IRQ number,
which fixes this:

arch/sh/boards/dreamcast/irq.c: In function `disable_systemasic_irq':
arch/sh/boards/dreamcast/irq.c:59: error: `OFFCHIP_IRQ_BASE' undeclared (first
use in this function)
arch/sh/boards/dreamcast/irq.c:59: error: (Each undeclared identifier is reported only once
arch/sh/boards/dreamcast/irq.c:59: error: for each function it appears in.)

Reported-by: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix clock multiplier on SH7722.
dmitry pervushin [Mon, 14 May 2007 23:42:22 +0000 (08:42 +0900)]
sh: Fix clock multiplier on SH7722.

This fixes up the master clock multiplier and initial rate
propagation for the SH7722 clocks.

Signed-off-by: dmitry pervushin <dimka@nomadgs.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Wire up kdump crash kernel exec in die().
Paul Mundt [Mon, 14 May 2007 23:36:36 +0000 (08:36 +0900)]
sh: Wire up kdump crash kernel exec in die().

Now that we have the basic kdump support in place, add it in to
die() so we can enter the crash kernel automatically.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: sr.bl toggling around idle sleep.
Paul Mundt [Mon, 14 May 2007 10:39:48 +0000 (19:39 +0900)]
sh: sr.bl toggling around idle sleep.

As pointed out by Saito-san, without the sr.bl manipulation we can
occasionally hit delays in the idle loop due to interrupt handling, so
ensure that interrupts are blocked before going to sleep.

At the same time, we throw in TIF_POLLING_NRFLAG for the !hlt_counter
case (primarily used by the ST-40 parts).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: disable genrtc support.
Paul Mundt [Mon, 14 May 2007 08:00:31 +0000 (17:00 +0900)]
sh: disable genrtc support.

sh never had support for this, so remove the option entirely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agofs: Kill sh dependency for binfmt_flat.
Paul Mundt [Mon, 14 May 2007 07:58:35 +0000 (16:58 +0900)]
fs: Kill sh dependency for binfmt_flat.

Not really sure where this bogosity came from, but there's certainly
nothing special about sh that lets us use flat files with the MMU on.

Kill the dependency, and leave it as !MMU, like it is for all of the
other nommu-wielding ports.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Disable psw support for R7785RP.
Paul Mundt [Mon, 14 May 2007 03:48:09 +0000 (12:48 +0900)]
sh: Disable psw support for R7785RP.

While R7780RP and R7780MP support this, R7785RP does not.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix page size alignment in __copy_user_page().
Paul Mundt [Mon, 14 May 2007 01:49:40 +0000 (10:49 +0900)]
sh: Fix page size alignment in __copy_user_page().

SH-3 comes up with the PAGE_SIZE on a misaligned boundary:

arch/sh/mm/copy_page.S: Assembler messages:
arch/sh/mm/copy_page.S:132: Warning: misaligned data

fix it up with explicit alignment.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up various compile warnings for SE boards.
Paul Mundt [Mon, 14 May 2007 01:48:01 +0000 (10:48 +0900)]
sh: Fix up various compile warnings for SE boards.

- setup-sh7750.c only defines the sh7751_ipr_map when building
  with SH7751 support.

- 7722 Solution Engine was missing a mach-type entry, causing
  the macro in cf-enabler to be undefined.

- arch/sh/mm/init.c needs linux/pagemap.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Wire up signalfd/timerfd/eventfd syscalls.
Paul Mundt [Mon, 14 May 2007 00:29:55 +0000 (09:29 +0900)]
sh: Wire up signalfd/timerfd/eventfd syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: revert addition of page fault notifiers
Christoph Hellwig [Sun, 13 May 2007 23:18:14 +0000 (08:18 +0900)]
sh: revert addition of page fault notifiers

Just at the time you added them on sh we're removing them from other
architectures. As there's no user yet this patch just removes them
completely. Once you actually have a kprobes patch it should follow
the direct call to kprobes_fault_handler model that powerpc, s390 and
sparc64 employ in 2.6.22-rc1 and that I'm updating other architectures
to.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agospelling fixes: arch/sh/
Simon Arlott [Sun, 13 May 2007 23:15:10 +0000 (08:15 +0900)]
spelling fixes: arch/sh/

Spelling fixes in arch/sh/.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoIB/mlx4: Check if SRQ is full when posting receive
Roland Dreier [Mon, 21 May 2007 03:19:24 +0000 (20:19 -0700)]
IB/mlx4: Check if SRQ is full when posting receive

Make mlx4_post_srq_recv() fail if the SRQ is full (head == tail).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[ARM] spelling fixes
Simon Arlott [Fri, 11 May 2007 19:40:30 +0000 (20:40 +0100)]
[ARM] spelling fixes

Spelling fixes in arch/arm/.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] at91_adc parenthesis balance
Mariusz Kozlowski [Fri, 18 May 2007 22:39:36 +0000 (00:39 +0200)]
[ARM] at91_adc parenthesis balance

Trivial unbalanced parenthesis macro fix.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4400/1: S3C24XX: Add high-speed MMC device definition
Ben Dooks [Sun, 20 May 2007 17:13:32 +0000 (18:13 +0100)]
[ARM] 4400/1: S3C24XX: Add high-speed MMC device definition

Add definition for high-speed MMC/SD device and add to SMDK2443
device list.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4399/2: S3C2443: Fix SMDK2443 nand timings
Ben Dooks [Sun, 20 May 2007 18:58:10 +0000 (19:58 +0100)]
[ARM] 4399/2: S3C2443: Fix SMDK2443 nand timings

Reduce the Twrph0 timing slightly to fit on an SMDK2443. This
should still produce valid timings for the NAND devices as it
is still over the smallest device fitted to these boards.

Signed-off-by: Ben Dooks <(address hidden)>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4398/1: S3C2443: Fix watchdog IRQ number
Ben Dooks [Sun, 20 May 2007 17:02:50 +0000 (18:02 +0100)]
[ARM] 4398/1: S3C2443: Fix watchdog IRQ number

Fix the IRQ number for watchdog on S3C2443

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4397/1: S3C2443: remove SDI0/1 IRQ ambiguity
Ben Dooks [Sun, 20 May 2007 16:32:39 +0000 (17:32 +0100)]
[ARM] 4397/1: S3C2443: remove SDI0/1 IRQ ambiguity

Change the name of the S3C2443_SDI1 to S3C2443_HSMMC to ensure
that it is correctly identified.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4396/1: S3C2443: Add missing HCLK clocks
Ben Dooks [Sun, 20 May 2007 16:17:32 +0000 (17:17 +0100)]
[ARM] 4396/1: S3C2443: Add missing HCLK clocks

Add the clocks missing form HCLKCON back into the set of
clocks being registered at initalisation time.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4395/1: S3C24XX: add include of <linux/sysdev.h> to relevant machines
Ben Dooks [Sun, 20 May 2007 10:55:53 +0000 (11:55 +0100)]
[ARM] 4395/1: S3C24XX: add include of <linux/sysdev.h> to relevant machines

Include <linux/sysdev.h> in any machines that use the PM functions
which require struct sys_device.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4388/1: no need for arm/mm mmap range checks for non-mmu
Greg Ungerer [Thu, 17 May 2007 05:22:41 +0000 (06:22 +0100)]
[ARM] 4388/1: no need for arm/mm mmap range checks for non-mmu

We don't need valid_phys_addr_range() or valid_mmap_phys_addr_range()
for the !CONFIG_MMU case.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4387/1: fix /proc/cpuinfo formatting for pre-ARM7 parts
Greg Ungerer [Thu, 17 May 2007 05:12:22 +0000 (06:12 +0100)]
[ARM] 4387/1: fix /proc/cpuinfo formatting for pre-ARM7 parts

Fix the formating of the "CPU part" field to be consistent with
the other fields for pre-ARM7 parts. One tab to many for them to
all line up.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoIB/mlx4: Pass send queue sizes from userspace to kernel
Eli Cohen [Thu, 17 May 2007 07:32:41 +0000 (10:32 +0300)]
IB/mlx4: Pass send queue sizes from userspace to kernel

Pass the number of WQEs for the send queue and their size from userspace
to the kernel to avoid having to keep the QP size calculations in sync
between the kernel driver and libmlx4.  This fixes a bug seen with the
current mlx4_ib driver and current libmlx4 caused by a difference in the
calculated sizes for SQ WQEs.  Also, this gives more flexibility for
userspace to experiment with using multiple WQE BBs for a single SQ WQE.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[NET]: Fix race condition about network device name allocation.
Stephen Hemminger [Sat, 19 May 2007 22:39:25 +0000 (15:39 -0700)]
[NET]: Fix race condition about network device name allocation.

Kenji Kaneshige found this race between device removal and
registration.  On unregister it is possible for the old device to
exist, because sysfs file is still open.  A new device with 'eth%d'
will select the same name, but sysfs kobject register will fial.

The following changes the shutdown order slightly. It hold a removes
the sysfs entries earlier (on unregister_netdevice), but holds a
kobject reference.  Then when todo runs the actual last put free
happens.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: icmp: fix crash with sysctl_icmp_errors_use_inbound_ifaddr
Patrick McHardy [Sat, 19 May 2007 21:44:15 +0000 (14:44 -0700)]
[IPV4]: icmp: fix crash with sysctl_icmp_errors_use_inbound_ifaddr

When icmp_send is called on the local output path before the
packet hits ip_output, skb->dev is not set, causing a crash
when sysctl_icmp_errors_use_inbound_ifaddr is set. This can
happen with the netfilter REJECT target or IPsec tunnels.

Let routing decide the ICMP source address in that case, since the
packet is locally generated there is no inbound interface and
the sysctl should not apply.

The option actually seems to be unfixable broken, on the path
after ip_output() skb->dev points to the outgoing device and
we don't know the incoming device anymore, so its going to do
the absolute wrong thing and pick the address of the outgoing
interface. Add a comment about this.

Reported by Curtis Doty <Curtis@GreenKey.net>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack_ipv4: fix incorrect #ifdef config name
Patrick McHardy [Sat, 19 May 2007 21:24:16 +0000 (14:24 -0700)]
[NETFILTER]: nf_conntrack_ipv4: fix incorrect #ifdef config name

The option is named CONFIG_NF_NAT not CONFIG_IP_NF_NAT. Remove the ifdef
completely since helpers also expect defragmented packet even without
NAT.

Noticed by Robert P. J. Day <rpjday@mindspring.com>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack: fix use-after-free in helper destroy callback invocation
Patrick McHardy [Sat, 19 May 2007 21:23:52 +0000 (14:23 -0700)]
[NETFILTER]: nf_conntrack: fix use-after-free in helper destroy callback invocation

When the helper module is removed for a master connection that has a
fulfilled expectation, but has already timed out and got removed from
the hash tables, nf_conntrack_helper_unregister can't find the master
connection to unset the helper, causing a use-after-free when the
expected connection is destroyed and releases the last reference to
the master.

The helper destroy callback was introduced for the PPtP helper to clean
up expectations and expected connections when the master connection
times out, but doing this from destroy_conntrack only works for
unfulfilled expectations since expected connections hold a reference
to the master, preventing its destruction. Move the destroy callback to
the timeout function, which fixes both problems.

Reported/tested by Gabor Burjan <buga@buvoshetes.hu>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPSEC] pfkey: Load specific algorithm in pfkey_add rather than all
Herbert Xu [Sat, 19 May 2007 21:21:18 +0000 (14:21 -0700)]
[IPSEC] pfkey: Load specific algorithm in pfkey_add rather than all

This is a natural extension of the changeset

    [XFRM]: Probe selected algorithm only.

which only removed the probe call for xfrm_user.  This patch does exactly
the same thing for af_key.  In other words, we load the algorithm requested
by the user rather than everything when adding xfrm states in af_key.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] FRTO: Prevent state inconsistency in corner cases
Ilpo Järvinen [Sat, 19 May 2007 20:56:57 +0000 (13:56 -0700)]
[TCP] FRTO: Prevent state inconsistency in corner cases

State could become inconsistent in two cases:

1) Userspace disabled FRTO by tuning sysctl when one of the TCP
   flows was in the middle of FRTO algorithm (and then RTO is
   again triggered)

2) SACK reneging occurs during FRTO algorithm

A simple solution is just to abort the previous FRTO when such
obscure condition occurs...

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] FRTO: Add missing ECN CWR sending to one of the responses
Ilpo Järvinen [Sat, 19 May 2007 20:56:23 +0000 (13:56 -0700)]
[TCP] FRTO: Add missing ECN CWR sending to one of the responses

The conservative spurious RTO response did not queue CWR even
though the sending rate was lowered. Whenever reduction happens
regardless of reason, CWR should be sent (forgetting to send it
is not very fatal though).

A better approach would be to queue CWR when one of the sending
rate reducing responses (rate-halving one or this conservative
response) is used already at RTO. Doing that would allow CWR to
be sent along with the two new data segments that are sent
during FRTO. However, it's a bit "racy" because userland could
tune the response sysctl to a more aggressive one in between.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error
Mikael Pettersson [Sat, 19 May 2007 20:55:25 +0000 (13:55 -0700)]
[NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error

Compiling 2.6.22-rc1 with gcc-3.2.3 for i486 fails with:

  gcc -m32 -Wp,-MD,net/core/.skbuff.o.d  -nostdinc -isystem /home/mikpe/pkgs/linux-x86/gnu/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=4  -march=i486 -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1  -Iinclude/asm-i386/mach-default -fomit-frame-pointer       -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(skbuff)"  -D"KBUILD_MODNAME=KBUILD_STR(skbuff)" -c -o net/core/skbuff.o net/core/skbuff.c
net/core/skbuff.c:648:1: directives may not be used inside a macro argument
net/core/skbuff.c:647:39: unterminated argument list invoking macro "memcpy"
net/core/skbuff.c: In function `pskb_expand_head':
net/core/skbuff.c:651: `memcpy' undeclared (first use in this function)
net/core/skbuff.c:651: (Each undeclared identifier is reported only once
net/core/skbuff.c:651: for each function it appears in.)
net/core/skbuff.c:651: syntax error before "skb"
make[2]: *** [net/core/skbuff.o] Error 1
make[1]: *** [net/core] Error 2
make: *** [net] Error 2

The patch below implements a simple workaround which is to
clone the offending memcpy() call and specialise it for the
two different scenarios.

Other workarounds are of course possible: e.g. bind the varying
parameter in a local variable, or use a macro or inline function
to perform the varying computation.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RFKILL]: Fix check for correct rfkill allocation
Ivo van Doorn [Sat, 19 May 2007 19:24:39 +0000 (12:24 -0700)]
[RFKILL]: Fix check for correct rfkill allocation

coverity has spotted a bug in rfkill.c (bug id #1627),
in rfkill_allocate() NULL was returns if the kzalloc() works,
and deref the NULL pointer if it fails,

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6]: Add ip6_tunnel.h to headers_install
Deepak Saxena [Sat, 19 May 2007 19:00:11 +0000 (12:00 -0700)]
[IPV6]: Add ip6_tunnel.h to headers_install

The Mobile IPv6 package (http://www.mobile-ipv6.org/software/) needs
this header file to build the tunnelctl component. The header
already looks sanitized so is safe to export.

Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoIB/mlx4: Fix check of opcode in mlx4_ib_post_send()
Roland Dreier [Sat, 19 May 2007 15:51:58 +0000 (08:51 -0700)]
IB/mlx4: Fix check of opcode in mlx4_ib_post_send()

wr->opcode is invalid if it's >= ARRAY_SIZE(mlx4_ib_opcode), not just
strictly >.

This was spotted by the Coverity checker (CID 1643).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Fix array overrun in dump_dev_cap_flags()
Roland Dreier [Sat, 19 May 2007 15:51:57 +0000 (08:51 -0700)]
mlx4_core: Fix array overrun in dump_dev_cap_flags()

Don't overrun fname[] array when decoding device flags.

This was spotted by the Coverity checker (CID 1642).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Fix RESET to RESET and RESET to ERROR transitions
Michael S. Tsirkin [Mon, 14 May 2007 04:26:51 +0000 (07:26 +0300)]
IB/mlx4: Fix RESET to RESET and RESET to ERROR transitions

According to the IB spec, a QP can be moved from RESET back to RESET
or to the ERROR state, but mlx4 firmware does not support this and
returns an error if we try.  Fix the RESET to RESET transition by
just returning 0 without doing anything, and fix RESET to ERROR by
moving the QP from RESET to INIT with dummy parameters and then
transitioning from INIT to ERROR.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mthca: Fix RESET to ERROR transition
Michael S. Tsirkin [Mon, 14 May 2007 04:26:51 +0000 (07:26 +0300)]
IB/mthca: Fix RESET to ERROR transition

According to the IB spec, a QP can be moved from RESET to the ERROR
state, but mthca firmware does not support this and returns an error if
we try.  Work around this FW limitation by moving the QP from RESET to
INIT with dummy parameters and then transitioning from INIT to ERROR.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Set GRH:HopLimit when sending globally routed MADs
Roland Dreier [Sat, 19 May 2007 15:51:57 +0000 (08:51 -0700)]
IB/mlx4: Set GRH:HopLimit when sending globally routed MADs

This is the same issue discovered in mthca by Rolf Manderscheid
<rvm@obsidianresearch.com>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mthca: Set GRH:HopLimit when building MLX headers
Rolf Manderscheid [Thu, 17 May 2007 15:45:48 +0000 (09:45 -0600)]
IB/mthca: Set GRH:HopLimit when building MLX headers

Global CM packets used by rmda_cm were being sent with a GRH:hopLimit
of zero, causing them to be dropped by the router.  The problem is a
missing initialization of the hop_limit field in mthca_read_ah(),
which was called by build_mlx_header() when sending a MAD on QP1.

Signed-off-by: Rolf Manderscheid <rvm@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Fix check of max_qp_dest_rdma in modify QP
Eli Cohen [Thu, 17 May 2007 13:32:39 +0000 (16:32 +0300)]
IB/mlx4: Fix check of max_qp_dest_rdma in modify QP

max_qp_dest_rdma is already in natural units - no need to shift.  This
was discovered by a test that deliberately requests more outstanding
atomic operation than the device supports.

Found by Sagi Rotem at Mellanox.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mthca: Fix use-after-free on device restart
Ali Ayoub [Thu, 17 May 2007 17:58:30 +0000 (20:58 +0300)]
IB/mthca: Fix use-after-free on device restart

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/ehca: Return proper error code if register_mr fails
Hoang-Nam Nguyen [Wed, 16 May 2007 12:50:55 +0000 (14:50 +0200)]
IB/ehca: Return proper error code if register_mr fails

Set the return code of ehca_register_mr() to ENOMEM if the corresponding
firmware call fails due to out of resources.  Some other error codes
were explicitly mapped to EINVAL -- just remove those cases so they
get mapped to the default case, which already returns EINVAL anyway.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIPoIB: Handle P_Key table reordering
Yosef Etigin [Sat, 19 May 2007 15:51:54 +0000 (08:51 -0700)]
IPoIB: Handle P_Key table reordering

SM reconfiguration or failover possibly causes a shuffling of the values
in the P_Key table. Right now, IPoIB only queries for the P_Key index
once when it creates the device QP, and hence there are problems if the
index of a P_Key value changes.  Fix this by using the PKEY_CHANGE event
to trigger a recheck of the P_Key index.

Signed-off-by: Yosef Etigin <yosefe@voltaire.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/core: Use start_port() and end_port()
Roland Dreier [Sat, 19 May 2007 15:51:54 +0000 (08:51 -0700)]
IB/core: Use start_port() and end_port()

Clean up ib_query_port() and ib_modify_port() slightly by using the
just-added start_port() and end_port() helpers.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/core: Add helpers for uncached GID and P_Key searches
Yosef Etigin [Mon, 14 May 2007 04:26:51 +0000 (07:26 +0300)]
IB/core: Add helpers for uncached GID and P_Key searches

Add ib_find_gid() and ib_find_pkey() functions that use uncached device
queries.  The calls might block but the returns are always up-to-date.
Cache P_Key and GID table lengths in core to avoid extra port info queries.

Signed-off-by: Yosef Etigin <yosefe@voltaire.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/ipath: Fix potential deadlock with multicast spinlocks
Roland Dreier [Sat, 19 May 2007 15:51:53 +0000 (08:51 -0700)]
IB/ipath: Fix potential deadlock with multicast spinlocks

Lockdep found the following potential deadlock between mcast_lock and
n_mcast_grps_lock: mcast_lock is taken from both interrupt context and
process context, so spin_lock_irqsave() must be used to take it.
n_mcast_grps_lock is only taken from process context, so at first it
seems safe to take it with plain spin_lock(); however, it also nests
inside mcast_lock, and hence we could deadlock:

  cpu A                                   cpu B
    ipath_mcast_add():
      spin_lock_irq(&mcast_lock);

                                            ipath_mcast_detach():
                                              spin_lock(&n_mcast_grps_lock);

                                            <enter interrupt>

                                            ipath_mcast_find():
                                              spin_lock_irqsave(&mcast_lock);

      spin_lock(&n_mcast_grps_lock);

Fix this by using spin_lock_irq() to take n_mcast_grps_lock.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/core: Free umem when mm is already gone
Eli Cohen [Mon, 14 May 2007 08:35:43 +0000 (11:35 +0300)]
IB/core: Free umem when mm is already gone

Free umem when task's mm is already destroyed by the time
ib_umem_release gets called.

Found by Dotan Barak at Mellanox.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomm/slab: fix section mismatch warning
Sam Ravnborg [Thu, 17 May 2007 21:48:19 +0000 (23:48 +0200)]
mm/slab: fix section mismatch warning

Use the new __init_refok marker to avoid the
section mismatch warning from slab.c

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agomm: fix section mismatch warnings
Sam Ravnborg [Thu, 17 May 2007 21:29:25 +0000 (23:29 +0200)]
mm: fix section mismatch warnings

modpost had two cases hardcoded for mm/
Shift over to __init_refok and kill the
hardcoded function names in modpost.

This has the drawback that the functions
will always be kept no matter configuration.
With previous code the function were placed in
init section if configuration allowed it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agoinit/main: use __init_refok to fix section mismatch
Sam Ravnborg [Thu, 17 May 2007 18:43:54 +0000 (20:43 +0200)]
init/main: use __init_refok to fix section mismatch

Kill a special case in modpost by introducing the
__init_refok marker.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings
Sam Ravnborg [Thu, 17 May 2007 18:14:48 +0000 (20:14 +0200)]
kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings

Throughout the kernel there are a few legitimite references
to init or exit sections. Most of these are covered by the
patterns included in modpost but a few nees special attention.
To avoid hardcoding a lot of function names in modpost introduce
a marker so relevant function/data can be marked.
When modpost see a reference to a init/exit function from
a function/data marked no warning will be issued.

Idea from: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
17 years agoall-archs: consolidate .data section definition in asm-generic
Sam Ravnborg [Thu, 17 May 2007 11:38:44 +0000 (13:38 +0200)]
all-archs: consolidate .data section definition in asm-generic

With this consolidation we can now modify the .data
section definition in one spot for all archs.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agoall-archs: consolidate .text section definition in asm-generic
Sam Ravnborg [Sat, 12 May 2007 22:31:33 +0000 (00:31 +0200)]
all-archs: consolidate .text section definition in asm-generic

Move definition of .text section to asm-generic.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokbuild: add "Section mismatch" warning whitelist for powerpc
Li Yang [Mon, 14 May 2007 10:04:28 +0000 (18:04 +0800)]
kbuild: add "Section mismatch" warning whitelist for powerpc

This patch fixes the following class of "Section mismatch" warnings when
building powerpc platforms.

WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from prom_entry (offset 0x0)
WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init.text:mpc8313_rdb_probe from .machine.desc after 'mach_mpc8313_rdb' (at offset 0x4)
....

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokbuild: make better section mismatch reports on i386, arm and mips
Atsushi Nemoto [Wed, 16 May 2007 16:14:38 +0000 (01:14 +0900)]
kbuild: make better section mismatch reports on i386, arm and mips

On i386, ARM and MIPS, warn_sec_mismatch() sometimes fails to show
usefull symbol name.  This is because empty 'refsym' due to 0 r_addend
value.  This patch is to adjust r_addend value, consulting with
apply_relocate() routine in kernel code.

Without this patch:
  MODPOST vmlinux
WARNING: init/built-in.o - Section mismatch: reference to .init.text: from .text between 'rest_init' (at offset 0xf4) and 'try_name'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

With this patch:
  MODPOST vmlinux
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

Now modpost can detect "kernel_init" name (and whitelist it) and show
"set_up_list3s" name.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokbuild: make modpost section warnings clearer
Russell King [Thu, 10 May 2007 22:03:25 +0000 (23:03 +0100)]
kbuild: make modpost section warnings clearer

Change modpost section mismatch warnings to be less confusing;
model them on the binutils linker warnings which we all know how
to interpret.

Also, fix the wrong ordering of arguments for the final case -
fromsec and refsymname were reversed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokconfig: search harder for curses library in check-lxdialog.sh
Mike Frysinger [Thu, 17 May 2007 19:06:31 +0000 (15:06 -0400)]
kconfig: search harder for curses library in check-lxdialog.sh

The check-lxdialog.sh script searches for "libFOO.so" which fails on OS X, due
to their special naming of libraries like "libfoo.dylib".  This patch turns
the curses lib search into extensible loops and adds dylib as a valid
extension.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokbuild: include limits.h in sumversion.c for PATH_MAX
Mike Frysinger [Thu, 17 May 2007 18:57:20 +0000 (14:57 -0400)]
kbuild: include limits.h in sumversion.c for PATH_MAX

POSIX says limits.h defines PATH_MAX so we should include it (which fixes
compiling on some systems like OS X).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agopowerpc: Fix the MODALIAS generation in modpost for of devices
Sylvain Munaut [Tue, 8 May 2007 09:59:29 +0000 (19:59 +1000)]
powerpc: Fix the MODALIAS generation in modpost for of devices

Since the devices may have multiple (or none) compatible properties,
the uevent generated internally by the kernel may have multiple
"C..." entries. So the MODALIAS stored in the module must have
wilcard before and after the compatible entry.
Also, if the 'compatible' field is not used for matching, there
will be no 'C' and that must handled as well.

The previous code handled all those case incorrectly and it
"mostly" worked ... but not always.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years ago[CRYPTO] api: Read module pointer before freeing algorithm
Herbert Xu [Sat, 19 May 2007 04:51:00 +0000 (14:51 +1000)]
[CRYPTO] api: Read module pointer before freeing algorithm

The function crypto_mod_put first frees the algorithm and then drops
the reference to its module.  Unfortunately we read the module pointer
which after freeing the algorithm and that pointer sits inside the
object that we just freed.

So this patch reads the module pointer out before we free the object.

Thanks to Luca Tettamanti for reporting this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years agoLinux v2.6.22-rc2 v2.6.22-rc2
Linus Torvalds [Sat, 19 May 2007 04:06:17 +0000 (21:06 -0700)]
Linux v2.6.22-rc2

17 years agocciss: Fix pci_driver.shutdown while device is still active
Gerald Britton [Mon, 14 May 2007 17:53:01 +0000 (13:53 -0400)]
cciss: Fix pci_driver.shutdown while device is still active

Fix an Oops in the cciss driver caused by system shutdown while a filesystem
on a cciss device is still active.  The cciss_remove_one function only
properly removes the device if the device has been cleanly released by its
users, which is not the case when the pci_driver.shutdown method is called.

This patch adds a new cciss_shutdown function to better match the pattern
used by various SCSI drivers: deactivate device interrupts and flush caches.
It also alters the cciss_remove_one function to match and readds the
__devexit annotation that was removed when cciss_remove_one was serving as
the pci_driver.shutdown method.

Signed-off-by: Gerald Britton <gbritton@alum.mit.edu>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFurther update of the i386 boot documentation
H. Peter Anvin [Thu, 17 May 2007 22:50:47 +0000 (15:50 -0700)]
Further update of the i386 boot documentation

A number of items in the i386 boot documentation have been either
vague, outdated or hard to read.  This text revision adds several more
examples, including a memory map for a modern kernel load.  It also
adds a field-by-field detailed description of the setup header, and a
bootloader ID for Qemu.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 19 May 2007 03:46:45 +0000 (20:46 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] tcrypt: Add missing error check
  [CRYPTO] padlock: Make CRYPTO_DEV_PADLOCK a tristate again

17 years agoFix roundup_pow_of_two(1)
Rolf Eike Beer [Thu, 17 May 2007 21:56:56 +0000 (23:56 +0200)]
Fix roundup_pow_of_two(1)

1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It does
in case the argument is a variable but in case it's a constant it behaves
wrong and returns 0. Probably nobody ever did it so this was never noticed.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[IA64] Yet another section mismatch warning
Tony Luck [Fri, 18 May 2007 22:11:34 +0000 (15:11 -0700)]
[IA64] Yet another section mismatch warning

reference to .init.data: from .text between 'sn_cpu_init' (at offset 0x1411) and 'nasid_slice_to_cpuid'
reference to .init.data: from .text between 'sn_cpu_init' (at offset 0x1420) and 'nasid_slice_to_cpuid'

The offending .init.data object is shub_1_1_found which should be declared
in __cpuinitdata, not in __initdata

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix bogus messages about system calls not implemented.
Tony Luck [Fri, 18 May 2007 21:15:58 +0000 (14:15 -0700)]
[IA64] Fix bogus messages about system calls not implemented.

There are seven legacy system calls that ia64 doesn't implement, but glibc
provides equivalent functionality by using more modern system calls. Stop
checksyscalls.sh from complaining about these seven.

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agotimerfd use waitqueue lock ...
Davide Libenzi [Fri, 18 May 2007 19:02:33 +0000 (12:02 -0700)]
timerfd use waitqueue lock ...

The timerfd was using the unlocked waitqueue operations, but it was
using a different lock, so poll_wait() would race with it.

This makes timerfd directly use the waitqueue lock.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoeventfd use waitqueue lock ...
Davide Libenzi [Fri, 18 May 2007 19:02:33 +0000 (12:02 -0700)]
eventfd use waitqueue lock ...

The eventfd was using the unlocked waitqueue operations, but it was
using a different lock, so poll_wait() would race with it.

This makes eventfd directly use the waitqueue lock.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Fri, 18 May 2007 15:26:28 +0000 (08:26 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/paulus/powerpc

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (32 commits)
  [POWERPC] Remove build warnings in windfarm_core
  [POWERPC] Pass per-file CFLAGs for platform specific op codes
  [POWERPC] Correct #endif comment
  [POWERPC] Fix ppc_rtas_progress_show()
  [POWERPC] Fix sed command lines for zlib source construction
  [POWERPC] Specify GNUTARGET on $(AR) invocations
  [POWERPC] Make sure device node type/name is not NULL on hot-added nodes
  [POWERPC] Small fixes for the Ebony device tree
  [POWERPC] Fix warning on UP
  [POWERPC] cell_defconfig: Disable cpufreq and pmi
  [POWERPC] Fix IO space on PCI buses created from of_platform
  [POWERPC] Add spinlock to request_phb_iospace()
  [POWERPC] Fix make rules for treeImage.initrd
  [POWERPC] Remove warning in mpic.c
  [POWERPC] Update pasemi_defconfig
  [POWERPC] pasemi: CONFIG_GENERIC_TBSYNC no longer needed
  [POWERPC] Update iseries_defconfig
  [POWERPC] Wire up some more syscalls
  [POWERPC] Fix bug adding properties with flatdevtree.c's ft_set_prop()
  [POWERPC] Remove fixup_bigphys_addr() for arch/powerpc to avoid link error
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 18 May 2007 15:25:28 +0000 (08:25 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix sched_clock() et al.

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 18 May 2007 15:25:14 +0000 (08:25 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPV4]: Remove IPVS icmp hack from route.c for now.
  [IPV4]: Correct rp_filter help text.
  [TCP]: TCP_CONG_YEAH requires TCP_CONG_VEGAS
  [TCP] slow start: Make comments and code logic clearer.
  [BLUETOOTH]: Fix locking in hci_sock_dev_event().
  [NET]: Fix BMSR_100{HALF,FULL}2 defines in linux/mii.h
  [NET]: lockdep classes in register_netdevice

17 years agoslub: another slabinfo fix
Christoph Lameter [Fri, 18 May 2007 07:36:43 +0000 (00:36 -0700)]
slub: another slabinfo fix

The slab manipulation functions should not be triggered by slabs that
are unresovable in the subset of slabs selected on the command line.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorevert "cancel_delayed_work: use del_timer() instead of del_timer_sync()"
Oleg Nesterov [Fri, 18 May 2007 07:36:42 +0000 (00:36 -0700)]
revert "cancel_delayed_work: use del_timer() instead of del_timer_sync()"

As pointed out by Jarek Poplawski, the patch

[WORKQUEUE]: cancel_delayed_work: use del_timer() instead of del_timer_sync()
commit: 071b638689464c6b39407025eedd810d5b5e6f5d

was wrong, it was merged by mistake after that.

From the changelog:

after this patch:
...
delayed_work_timer_fn->__queue_work() in progress.

The latter doesn't differ from the caller's POV,

it does make a difference if the caller calls flush_workqueue() after
cancel_delayed_work(), in that case flush_workqueue() can miss this
work_struct.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Jarek Poplawski <jarkao2@o2.pl>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[IPV4]: Remove IPVS icmp hack from route.c for now.
David S. Miller [Fri, 18 May 2007 09:07:50 +0000 (02:07 -0700)]
[IPV4]: Remove IPVS icmp hack from route.c for now.

Revert: 2d771cd86d4c3af26f34a7bcdc1b87696824cad9

This is dangerous if enabled and a better solution to the
problem is being worked on.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] tcrypt: Add missing error check
Herbert Xu [Fri, 18 May 2007 06:25:19 +0000 (16:25 +1000)]
[CRYPTO] tcrypt: Add missing error check

The return value of crypto_hash_final isn't checked in test_hash_cycles.
This patch corrects this.  Thanks to Eric Sesterhenn for reporting this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[SPARC64]: Fix sched_clock() et al.
David S. Miller [Fri, 18 May 2007 05:55:26 +0000 (22:55 -0700)]
[SPARC64]: Fix sched_clock() et al.

SPARC64_NSEC_PER_CYC_SHIFT was set too high.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoRevert "[PATCH] x86: Drop cc-options call for all options supported in gcc 3.2+"
Linus Torvalds [Fri, 18 May 2007 03:18:11 +0000 (20:18 -0700)]
Revert "[PATCH] x86: Drop cc-options call for all options supported in gcc 3.2+"

This reverts commit c8fdd247255a3a027cd9f66dcf93e6847d1d2f85.

It turns out the kernel was correct, and the gcc complaint was a gcc
bug.  The preferred stack boundary is expressed not in bytes, but in the
the log2() of the preferred boundary, so "-mpreferred-stack-boundary=2"
is in fact exactly what we want, but a gcc that is compiled for x86-64
will consider it an error (because the 64-bit calling sequence says that
the stack should be 16-byte aligned) even if we are then using "-m32" to
generate 32-bit code.

Noted-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Jan Hubicka <jh@suse.cz>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[CRYPTO] padlock: Make CRYPTO_DEV_PADLOCK a tristate again
Herbert Xu [Fri, 18 May 2007 03:17:22 +0000 (13:17 +1000)]
[CRYPTO] padlock: Make CRYPTO_DEV_PADLOCK a tristate again

Turning it into a boolean was unnecessary and caused ALGAPI to be
pinned down as a boolean to.  This patch makes it a tristate again.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years agoMerge git://git.linux-nfs.org/pub/linux/nfs-2.6
Linus Torvalds [Fri, 18 May 2007 03:14:43 +0000 (20:14 -0700)]
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6

* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  SUNRPC: Fix sparse warnings
  NLM: Fix sparse warnings
  NFS: Fix more sparse warnings
  NFS: Fix some 'sparse' warnings...
  SUNRPC: remove dead variable 'rpciod_running'
  NFS4: Fix incorrect use of sizeof() in fs/nfs/nfs4xdr.c
  NFS: use zero_user_page
  NLM: don't use CLONE_SIGHAND in nlmclnt_recovery
  NLM: Fix locking client timeouts...

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 18 May 2007 03:02:36 +0000 (20:02 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_via: pcim_iomap_regions() conversion missed BAR5
  libata: remove libata.spindown_compat
  sata_nv: fix fallout of devres conversion
  drivers/ata: remove the wildcard from sata_nv driver

17 years agosata_via: pcim_iomap_regions() conversion missed BAR5
Tejun Heo [Thu, 17 May 2007 11:37:12 +0000 (13:37 +0200)]
sata_via: pcim_iomap_regions() conversion missed BAR5

pcim_iomap_regions() conversion missed BAR5.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: remove libata.spindown_compat
Tejun Heo [Thu, 17 May 2007 14:43:26 +0000 (16:43 +0200)]
libata: remove libata.spindown_compat

With STANDBYDOWN tracking added, libata.spindown_compat isn't
necessary anymore.  If userspace shutdown(8) issues STANDBYNOW, libata
warns.  If userspace shutdown(8) doesn't issue STANDBYNOW, libata does
the right thing.  Userspace can tell whether kernel supports spindown
by testing whether sysfs node manage_start_stop exists as before.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_nv: fix fallout of devres conversion
Tejun Heo [Thu, 17 May 2007 11:13:57 +0000 (13:13 +0200)]
sata_nv: fix fallout of devres conversion

As with all other drivers, sata_nv's hpriv is allocated with
devm_kzalloc() and there's no need to free it explicitly.  Kill
nv_remove_one() which incorrectly used kfree() instead of devm_kfree()
and use ata_pci_remove_one() directly.

Original fix is from Peer Chen.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Peer Chen <pchen@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodrivers/ata: remove the wildcard from sata_nv driver
Peer Chen [Fri, 11 May 2007 05:48:49 +0000 (22:48 -0700)]
drivers/ata: remove the wildcard from sata_nv driver

Because nvidia SATA controllers onward base on AHCI, so wildcard in sata_nv
driver is unnecessary.  Also the wildcard sometimes cause sata_nv driver to
be loaded for AHCI controllers,which is not as expected.

Signed-off-by: Peer Chen <pchen@nvidia.com>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoe1000: Fix msi enable leak on error, don't print error message, cleanup
Auke Kok [Wed, 16 May 2007 08:49:46 +0000 (01:49 -0700)]
e1000: Fix msi enable leak on error, don't print error message, cleanup

pci_enable_msi failure is a normal event so we should not print any error.
Going over the code I spotted a missing pci_disable_msi() leak when irq
allocation fails. The whole code also needed a cleanup, so I combined the
two different calls to pci_request_irq into a single call making this
look a lot better. All #ifdef CONFIG_PCI_MSI's have been removed.

Compile tested with both CONFIG_PCI_MSI enabled and disabled.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoixgb: don't print error if pci_enable_msi() fails, cleanup minor leak
Auke Kok [Thu, 17 May 2007 22:29:07 +0000 (15:29 -0700)]
ixgb: don't print error if pci_enable_msi() fails, cleanup minor leak

pci_enable_msi calls can fail for normal operational reasons. Driver
should not print an error message in that case. Fix a leak that leaves
msi enabled if pci_request_irq fails. We can remove CONFIG_PCI_MSI
ifdefs alltogether

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>