safe/jmp/linux-2.6
18 years ago[MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtd
David Woodhouse [Sun, 14 May 2006 00:51:54 +0000 (01:51 +0100)]
[MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtd

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Deal correctly with NOR chips which are smaller than the map window
David Woodhouse [Sun, 14 May 2006 00:40:50 +0000 (01:40 +0100)]
[MTD] Deal correctly with NOR chips which are smaller than the map window

We used to calculate the number of chips to be zero, allocate an array
of that size, then nasty things would happen when we attempt to access
the first object in that zero-sized array.

Now, if the number of _full_ chips that would fit into the map is zero,
we allocate an array of one anyway, and then artificially reduce the
total size of the resulting MTD device to fit in the map.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agomtd: fix memory leak in block2mtd_setup()
Jesper Juhl [Sat, 13 May 2006 23:42:25 +0000 (01:42 +0200)]
mtd: fix memory leak in block2mtd_setup()

There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup()

We can leak 'name' allocated with kmalloc in 'parse_name' if leave via
the 'parse_err' macro since it contains a return but doesn't do any
freeing.

Spotted by coverity checker as bug 615.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Fix module refcounting in NAND board drivers.
David Woodhouse [Sun, 14 May 2006 00:20:46 +0000 (01:20 +0100)]
[MTD] Fix module refcounting in NAND board drivers.

The _board_ driver needs to be mtd->owner, and it in turn pins the
nand.ko module. Fix them all to actually do that, and fix nand.ko not to
overwrite it -- and also to check that the caller sets it, if the caller
is a module.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agomtd: fix memory leaks in phram_setup
Jesper Juhl [Sat, 13 May 2006 23:07:18 +0000 (01:07 +0200)]
mtd: fix memory leaks in phram_setup

There are two code paths in drivers/mtd/devices/phram.c::phram_setup() that
will leak memory.
Memory is allocated to the variable 'name' with kmalloc() by the
parse_name() function, but if we leave by way of the parse_err() macro,
then that memory is never kfree()'d, nor is it ever used with
register_device() so it won't be freed later either - leak.

Found by the Coverity checker as #593 - simple fix below.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD NAND] Indent all of drivers/mtd/nand/*.c.
David Woodhouse [Sat, 13 May 2006 17:07:53 +0000 (18:07 +0100)]
[MTD NAND] Indent all of drivers/mtd/nand/*.c.

It was just too painful to deal with.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD NAND] Reduce paranoia level when scanning for bad blocks on virgin chips
David Woodhouse [Sat, 13 May 2006 15:14:26 +0000 (16:14 +0100)]
[MTD NAND] Reduce paranoia level when scanning for bad blocks on virgin chips

We were scanning for 0xFF through the entire chip -- which takes a while
when it's a 512MiB device as I have on my current toy. The specs only say
we need to check certain bytes -- so do only that.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD NAND] Update CS553x NAND driver: Hardware ECC support, optimisations.
David Woodhouse [Sat, 13 May 2006 03:12:40 +0000 (04:12 +0100)]
[MTD NAND] Update CS553x NAND driver: Hardware ECC support, optimisations.

- Implement HW ECC support,
- Provide read_buf() and write_buf() routines using memcpy
- Use on-flash bad block table
- Fix module refcounting
- Avoid read/modify/write in hwcontrol()
- Minor cosmetic fixes

Partly based on code and ideas from Tom Sylla <tom.sylla@amd.com>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD NAND] Use vmalloc for buffer when scanning for bad blocks.
David Woodhouse [Sat, 13 May 2006 03:03:42 +0000 (04:03 +0100)]
[MTD NAND] Use vmalloc for buffer when scanning for bad blocks.

These new chips have 128KiB blocks. Don't try to kmalloc that.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoTrivial typo fixes in Kconfig files (MTD).
Egry Gábor [Fri, 12 May 2006 16:35:02 +0000 (17:35 +0100)]
Trivial typo fixes in Kconfig files (MTD).

Signed-off-by: Egry Gábor <gaboregry@t-online.hu>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoOneNAND: fix block command typo
Kyungmin Park [Fri, 12 May 2006 14:03:23 +0000 (17:03 +0300)]
OneNAND: fix block command typo

We need to check block cmd only instead with comparing with cmd

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
18 years agoOneNAND: One-Time Programmable (OTP) support
Kyungmin Park [Fri, 12 May 2006 14:03:07 +0000 (17:03 +0300)]
OneNAND: One-Time Programmable (OTP) support

One Block of the NAND Flash Array memory is reserved as
a One-Time Programmable Block memory area.
Also, 1st Block of NAND Flash Array can be used as OTP.

The OTP block can be read, programmed and locked using the same
operations as any other NAND Flash Array memory block.
OTP block cannot be erased.

OTP block is fully-guaranteed to be a valid block.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
18 years agoOneNAND: Handle erase correctly in Double Density Package (DDP)
Kyungmin Park [Fri, 12 May 2006 14:02:51 +0000 (17:02 +0300)]
OneNAND: Handle erase correctly in Double Density Package (DDP)

There's erase bug in DDP.
We need to add DDP select in erase

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
18 years agoOneNAND: Write oob area with aligned size, mtd->oobsize
Kyungmin Park [Fri, 12 May 2006 14:02:46 +0000 (17:02 +0300)]
OneNAND: Write oob area with aligned size, mtd->oobsize

There's some problem with write oob in serveral platform.
So we write oob with oobsize aligned (16bytes) instead of 3 bytes (from {2,
3})

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
18 years agoOneNAND: Add write_oob verify function
Kyungmin Park [Fri, 12 May 2006 14:02:41 +0000 (17:02 +0300)]
OneNAND: Add write_oob verify function

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
18 years agoOneNand: Fix free byte positions.
Jarkko Lavinen [Fri, 12 May 2006 14:02:35 +0000 (17:02 +0300)]
OneNand: Fix free byte positions.

Some free byte positions at onenand_oob_64 were wrong. This was also
reported by Christian Lehne. 3 byte slots are at 2+16*i and 2 byte
slots at 14+16*i.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
18 years agoOneNAND: handle byte access on BufferRAM
Kyungmin Park [Fri, 12 May 2006 14:02:31 +0000 (17:02 +0300)]
OneNAND: handle byte access on BufferRAM

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
18 years agoOneNAND: Add touch_softlock_watchdog()
Kyungmin Park [Fri, 12 May 2006 14:02:24 +0000 (17:02 +0300)]
OneNAND: Add touch_softlock_watchdog()

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
18 years ago[JFFS2] Remove number of pointer dereferences in fs/jffs2/summary.c
Jesper Juhl [Fri, 12 May 2006 10:55:51 +0000 (11:55 +0100)]
[JFFS2] Remove number of pointer dereferences in fs/jffs2/summary.c

Reduce the nr.  of pointer dereferences in fs/jffs2/summary.c

Benefits:
 - micro speed optimization due to fewer pointer derefs
 - generated code is slightly smaller
 - better readability

(The first two sound like a compiler problem but I'll go with the third. dwmw2).

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Fix invalid default value of CONFIG_MTD_PCMCIA_ANONYMOUS in Kconfig
Jean-Luc Leger [Fri, 12 May 2006 10:53:40 +0000 (11:53 +0100)]
[MTD] Fix invalid default value of CONFIG_MTD_PCMCIA_ANONYMOUS in Kconfig

Default values for boolean and tristate options can only be 'y', 'm' or 'n'.
This patch removes wrong default for MTD_PCMCIA_ANONYMOUS.

Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[JFFS2] Remove obsolete histo.h
Domen Puncer [Fri, 12 May 2006 10:51:46 +0000 (11:51 +0100)]
[JFFS2] Remove obsolete histo.h

This file hasn't actually been used since the very early days of JFFS2
when Arjan was playing with compression methods. It can go now.

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Fix capitalisation in export of old doc2001.c initfunc
David Woodhouse [Fri, 12 May 2006 10:40:13 +0000 (11:40 +0100)]
[MTD] Fix capitalisation in export of old doc2001.c initfunc

Oops. Stupid StudlyCaps. Again.

This driver is doubly-deprecated because is was subsumed into doc2000.c
and _also_ we want people to start using the new NAND wrapper for these
devices anyway. But ISTR there was still one person using it because
something didn't work for them. Must chase that up and then I can kill
this.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Basic NAND driver for AMD/NatSemi CS5535/CS5536 Geode companion chip
David Woodhouse [Thu, 11 May 2006 21:35:28 +0000 (22:35 +0100)]
[MTD] Basic NAND driver for AMD/NatSemi CS5535/CS5536 Geode companion chip

This lacks hardware ECC support and a few optimisations we're going to
want fairly soon, but it works well enough to mount and use JFFS2.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Fix capitalisation in export of DiskOnChip Millennium initfunc
David Woodhouse [Wed, 10 May 2006 15:16:13 +0000 (16:16 +0100)]
[MTD] Fix capitalisation in export of DiskOnChip Millennium initfunc

Stupid StudlyCaps. Who did that?

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoExport cfi_cmdset_0020 and cfi_cmdset_0002 with EXPORT_SYMBOL_GPL
David Woodhouse [Mon, 8 May 2006 21:58:25 +0000 (22:58 +0100)]
Export cfi_cmdset_0020 and cfi_cmdset_0002 with EXPORT_SYMBOL_GPL

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoFinally remove the obnoxious inter_module_xxx()
David Woodhouse [Mon, 8 May 2006 21:40:05 +0000 (22:40 +0100)]
Finally remove the obnoxious inter_module_xxx()

This was already a bad plan when I argued against adding it in the first
place. Good riddance.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoRemove use of inter_module_crap in NOR flash chip drivers.
David Woodhouse [Mon, 8 May 2006 21:35:05 +0000 (22:35 +0100)]
Remove use of inter_module_crap in NOR flash chip drivers.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoFix non-modular case for DiskOnChip probe
David Woodhouse [Mon, 8 May 2006 16:10:11 +0000 (17:10 +0100)]
Fix non-modular case for DiskOnChip probe

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoRemove inter_module_xxx() from DiskOnChip drivers.
David Woodhouse [Mon, 8 May 2006 13:05:05 +0000 (14:05 +0100)]
Remove inter_module_xxx() from DiskOnChip drivers.

Finally putting it back how it was before Keith got at it -- yay :)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Convert physmap to platform driver
Lennert Buytenhek [Sun, 7 May 2006 16:16:36 +0000 (17:16 +0100)]
[MTD] Convert physmap to platform driver

After dwmw2 let me know it ought to be done, I rewrote the physmap map
driver to be a platform driver.  I know zilch about the driver model,
so I probably botched it in some way, but I've done some tests on an
ixp23xx board which uses physmap, and it all seems to work.

In order to not break existing physmap users, I've added some compat
code that will instantiate a platform device iff CONFIG_MTD_PHYSMAP_LEN
is defined and != 0.  Also, I've changed the default value for
CONFIG_MTD_PHYSMAP_LEN to zero, so that people who inadvertently
compile in physmap (or new, platform-style, users of physmap) don't get
burned.

This works pretty well -- the new physmap driver is a drop-in replacement
for the old one, and works on said ixp23xx board without any code changes
needed.  (This should hold as long as users don't touch 'physmap_map'
directly.)

Once all physmap users have been converted to instantiate their own
platform devices, the compat code can go.  (Or we decide that we can
change all the in-tree users at the same time, and never merge the
compat code.)

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[JFFS2] Fix race in setting file attributes
Dmitry Bazhenov [Fri, 5 May 2006 21:46:49 +0000 (22:46 +0100)]
[JFFS2] Fix race in setting file attributes

It seems like there is a potential race in the function jffs2_do_setattr()
in the case when attributes of a symlink are updated. The symlink metadata
is read without having f->sem locked.

The following patch should fix the race.

Signed-off-by: Dmitry Bazhenov <atrey@emcraft.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
David Woodhouse [Wed, 3 May 2006 12:30:35 +0000 (13:30 +0100)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6

18 years agoMove jffs2_fs_i.h and jffs2_fs_sb.h from include/linux/ to fs/jffs2/
David Woodhouse [Wed, 3 May 2006 12:07:27 +0000 (13:07 +0100)]
Move jffs2_fs_i.h and jffs2_fs_sb.h from include/linux/ to fs/jffs2/

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[NETFILTER] SCTP conntrack: fix infinite loop
Patrick McHardy [Tue, 2 May 2006 21:23:07 +0000 (23:23 +0200)]
[NETFILTER] SCTP conntrack: fix infinite loop

fix infinite loop in the SCTP-netfilter code: check SCTP chunk size to
guarantee progress of for_each_sctp_chunk(). (all other uses of
for_each_sctp_chunk() are preceded by do_basic_checks(), so this fix
should be complete.)

Based on patch from Ingo Molnar <mingo@elte.hu>

CVE-2006-1527

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoforcedeth: fix multi irq issues
Ayaz Abdulla [Tue, 2 May 2006 19:26:06 +0000 (15:26 -0400)]
forcedeth: fix multi irq issues

This patch fixes the issues with multiple irqs.

I am resending based on feedback. I decoupled the dma mask for
consistent memory and fixed leak with multiple irq in error path.

Thanks to Manfred for catching the spin lock problem.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
18 years ago[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards
Craig Brind [Thu, 27 Apr 2006 09:30:46 +0000 (02:30 -0700)]
[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards

Fixes Rhine I cards disclosing fragments of previously transmitted frames
in new transmissions.

Before transmission, any socket buffer (skb) shorter than the ethernet
minimum length of 60 bytes was zero-padded.  On Rhine I cards the data can
later be copied into an aligned transmission buffer without copying this
padding.  This resulted in the transmission of the frame with the extra
bytes beyond the provided content leaking the previous contents of this
buffer on to the network.

Now zero-padding is repeated in the local aligned buffer if one is used.

Following a suggestion from the via-rhine maintainer, no attempt is made
here to avoid the duplicated effort of padding the skb if it is known that
an aligned buffer will definitely be used.  This is to make the change
"obviously correct" and allow it to be applied to a stable kernel if
necessary.  There is no change to the flow of control and the changes are
only to the Rhine I code path.

The patch has run on an in-service Rhine-I host without incident.  Frames
shorter than 60 bytes are now correctly zero-padded when captured on a
separate host.  I see no unusual stats reported by ifconfig, and no unusual
log messages.

Signed-off-by: Craig Brind <craigbrind@gmail.com>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[PATCH] mv643xx_eth: provide sysfs class device symlink
Olaf Hering [Fri, 28 Apr 2006 01:23:49 +0000 (18:23 -0700)]
[PATCH] mv643xx_eth: provide sysfs class device symlink

On Sat, Mar 11, Olaf Hering wrote:
> Why is the /sys/class/net/eth0/device symlink not created for the
> mv643xx_eth driver? Does this work for other platform device drivers?
> Seems to work for the ps2 keyboard at least.

The SET_NETDEV_DEV has to be done before a call to register_netdev.  With
the new patch below, the device symlink for the platform device was
created.  Unfortunately, after the 4 ls commands, the network connection
died.  No idea if the box crashed or if something else broke, lost remote
access.

Provide sysfs 'device' in /class/net/ethN Also, set module owner field,
like pcnet32 driver does.

Signed-off-by: Olaf Hering <olh@suse.de>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[PATCH] vmsplice: restrict stealing a little more
Jens Axboe [Tue, 2 May 2006 13:29:57 +0000 (15:29 +0200)]
[PATCH] vmsplice: restrict stealing a little more

Apply the same rules as the anon pipe pages, only allow stealing
if no one else is using the page.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: fix page LRU accounting
Jens Axboe [Tue, 2 May 2006 13:03:27 +0000 (15:03 +0200)]
[PATCH] splice: fix page LRU accounting

Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly
to know whether we need to fiddle with page LRU state after stealing it,
however for some origins we just don't know if the page is on the LRU
list or not.

So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file()
instead.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] vmsplice: fix badly placed end paranthesis
Jens Axboe [Tue, 2 May 2006 10:57:18 +0000 (12:57 +0200)]
[PATCH] vmsplice: fix badly placed end paranthesis

We need to use the minium of {len, PAGE_SIZE-off}, not {len, PAGE_SIZE}-off.
The latter doesn't make any sense, and could cause us to attempt negative
length transfers...

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years agoMerge branch 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Tue, 2 May 2006 04:43:05 +0000 (21:43 -0700)]
Merge branch 'audit.b10' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] Audit Filter Performance
  [PATCH] Rework of IPC auditing
  [PATCH] More user space subject labels
  [PATCH] Reworked patch for labels on user space messages
  [PATCH] change lspp ipc auditing
  [PATCH] audit inode patch
  [PATCH] support for context based audit filtering, part 2
  [PATCH] support for context based audit filtering
  [PATCH] no need to wank with task_lock() and pinning task down in audit_syscall_exit()
  [PATCH] drop task argument of audit_syscall_{entry,exit}
  [PATCH] drop gfp_mask in audit_log_exit()
  [PATCH] move call of audit_free() into do_exit()
  [PATCH] sockaddr patch
  [PATCH] deal with deadlocks in audit_free()

18 years ago[NETFILTER] x_tables: fix compat related crash on non-x86
Patrick McHardy [Tue, 2 May 2006 03:12:22 +0000 (05:12 +0200)]
[NETFILTER] x_tables: fix compat related crash on non-x86

When iptables userspace adds an ipt_standard_target, it calculates the size
of the entire entry as:

sizeof(struct ipt_entry) + XT_ALIGN(sizeof(struct ipt_standard_target))

ipt_standard_target looks like this:

  struct xt_standard_target
  {
        struct xt_entry_target target;
        int verdict;
  };

xt_entry_target contains a pointer, so when compiled for 64 bit the
structure gets an extra 4 byte of padding at the end. On 32 bit
architectures where iptables aligns to 8 byte it will also have 4
byte padding at the end because it is only 36 bytes large.

The compat_ipt_standard_fn in the kernel adjusts the offsets by

  sizeof(struct ipt_standard_target) - sizeof(struct compat_ipt_standard_target),

which will always result in 4, even if the structure from userspace
was already padded to a multiple of 8. On x86 this works out by
accident because userspace only aligns to 4, on all other
architectures this is broken and causes incorrect adjustments to
the size and following offsets.

Thanks to Linus for lots of debugging help and testing.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Tue, 2 May 2006 01:33:40 +0000 (18:33 -0700)]
Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] vmsplice: allow user to pass in gift pages
  [PATCH] pipe: enable atomic copying of pipe data to/from user space
  [PATCH] splice: call handle_ra_miss() on failure to lookup page
  [PATCH] Add ->splice_read/splice_write to def_blk_fops
  [PATCH] pipe: introduce ->pin() buffer operation
  [PATCH] splice: fix bugs in pipe_to_file()
  [PATCH] splice: fix bugs with stealing regular pipe pages

18 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Tue, 2 May 2006 01:26:31 +0000 (18:26 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ipath: tidy up white space in a few files
  IB/ipath: fix label name in interrupt handler
  IB/ipath: improve sparse annotation
  IB/ipath: simplify IB timer usage
  IB/ipath: simplify RC send posting
  IB/ipath: prevent hardware from being accessed during reset
  IB/ipath: fix verbs registration
  IB/ipath: change handling of PIO buffers
  IB/ipath: iterate over correct number of ports during reset
  IB/ipath: set up 32-bit DMA mask if 64-bit setup fails
  IB/ipath: fix race with exposing reset file
  IB/mthca: Fix offset in query_gid method

18 years ago[PATCH] timer TSC check suspend notifier change
Shaohua Li [Mon, 1 May 2006 19:16:19 +0000 (12:16 -0700)]
[PATCH] timer TSC check suspend notifier change

At suspend time, the TSC CPUFREQ_SUSPENDCHANGE notifier change might
wrongly enable interrupt.  cpufreq driver suspend/resume is in interrupt
disabled environment.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86_64: make PC Speaker driver work
Mikael Pettersson [Mon, 1 May 2006 19:16:18 +0000 (12:16 -0700)]
[PATCH] x86_64: make PC Speaker driver work

The PC Speaker driver's ->probe() routine doesn't even get called in the
64-bit kernels.  The reason for that is that the arch code apparently has
to explictly add a "pcspkr" platform device in order for the driver core to
call the ->probe() routine.  arch/i386/kernel/setup.c unconditionally adds
a "pcspkr" device, but the x86_64 kernel has no code at all related to the
PC Speaker.

The patch below copies the relevant code from i386 to x86_64, which makes
the PC Speaker work for me on x86_64.

Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] genrtc: fix read on 64-bit platforms
Atsushi Nemoto [Mon, 1 May 2006 19:16:17 +0000 (12:16 -0700)]
[PATCH] genrtc: fix read on 64-bit platforms

Fix genrtc's read() routine for 64-bit platforms.  Current gen_rtc_read()
stores 64bit integer and returns 8 even if an user tried to read a 32bit
integer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] RTC: rtc-dev tweak for 64-bit kernel
Atsushi Nemoto [Mon, 1 May 2006 19:16:16 +0000 (12:16 -0700)]
[PATCH] RTC: rtc-dev tweak for 64-bit kernel

Make rtc-dev work well on 64-bit platforms with 32-bit userland.  On those
platforms, users might try to read 32-bit integer value.  This patch make
rtc-dev's read() work well for both "int" and "long" size.  This tweak is came
from genrtc driver.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: bug in setup_rt_frame
Heiko Carstens [Mon, 1 May 2006 19:16:15 +0000 (12:16 -0700)]
[PATCH] s390: bug in setup_rt_frame

Consider return value of __put_user() when setting up a signal frame
instead of ignoring it.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: fix ipd handling
Heiko Carstens [Mon, 1 May 2006 19:16:14 +0000 (12:16 -0700)]
[PATCH] s390: fix ipd handling

As pointed out by Paulo Marques <pmarques@grupopie.com> MAX_IPD_TIME is by
a factor of ten too small.  Since this means that we allow ten times more
IPDs in the intended time frame this could result in a cpu check stop of a
physical cpu.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: cell: Add numa id to struct spu
Jeremy Kerr [Mon, 1 May 2006 19:16:13 +0000 (12:16 -0700)]
[PATCH] powerpc: cell: Add numa id to struct spu

Add an nid member to the spu structure, and store the numa id of the spu there
on creation.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: Allow devices to register with numa topology
Jeremy Kerr [Mon, 1 May 2006 19:16:12 +0000 (12:16 -0700)]
[PATCH] powerpc: Allow devices to register with numa topology

Change of_node_to_nid() to traverse the device tree, looking for a numa id.
Cell uses this to assign ids to SPUs, which are children of the CPU node.
Existing users of of_node_to_nid() are altered to use of_node_to_nid_single(),
which doesn't do the traversal.

Export an attach_sysdev_to_node() function, allowing system devices (eg.
SPUs) to link themselves into the numa topology in sysfs.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] spufs: fix for CONFIG_NUMA
Joel H Schopp [Mon, 1 May 2006 19:16:11 +0000 (12:16 -0700)]
[PATCH] spufs: fix for CONFIG_NUMA

Based on an older patch from  Mike Kravetz <kravetz@us.ibm.com>

We need to have a mem_map for high addresses in order to make fops->no_page
work on spufs mem and register files.  So far, we have used the
memory_present() function during early bootup, but that did not work when
CONFIG_NUMA was enabled.

We now use the __add_pages() function to add the mem_map when loading the
spufs module, which is a lot nicer.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sparsemem interaction with memory add bug fixes
Mike Kravetz [Mon, 1 May 2006 19:16:09 +0000 (12:16 -0700)]
[PATCH] sparsemem interaction with memory add bug fixes

This patch fixes two bugs with the way sparsemem interacts with memory add.
They are:

- memory leak if memmap for section already exists

- calling alloc_bootmem_node() after boot

These bugs were discovered and a first cut at the fixes were provided by
Arnd Bergmann <arnd@arndb.de> and Joel Schopp <jschopp@us.ibm.com>.

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Altix: correct ioc3 port order
Pat Gefre [Mon, 1 May 2006 19:16:08 +0000 (12:16 -0700)]
[PATCH] Altix: correct ioc3 port order

Currently loading the ioc3 as a module will cause the ports to be numbered
in reverse order.  This mod maintains the proper order of cards for port
numbering.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page migration: Fix fallback behavior for dirty pages
Christoph Lameter [Mon, 1 May 2006 19:16:08 +0000 (12:16 -0700)]
[PATCH] page migration: Fix fallback behavior for dirty pages

Currently we check PageDirty() in order to make the decision to swap out
the page.  However, the dirty information may be only be contained in the
ptes pointing to the page.  We need to first unmap the ptes before checking
for PageDirty().  If unmap is successful then the page count of the page
will also be decreased so that pageout() works properly.

This is a fix necessary for 2.6.17.  Without this fix we may migrate dirty
pages for filesystems without migration functions.  Filesystems may keep
pointers to dirty pages.  Migration of dirty pages can result in the
filesystem keeping pointers to freed pages.

Unmapping is currently not be separated out from removing all the
references to a page and moving the mapping.  Therefore try_to_unmap will
be called again in migrate_page() if the writeout is successful.  However,
it wont do anything since the ptes are already removed.

The coming updates to the page migration code will restructure the code
so that this is no longer necessary.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: uml-makefile-nicer uses SYMLINK incorrectly
Jeff Dike [Mon, 1 May 2006 19:16:06 +0000 (12:16 -0700)]
[PATCH] uml: uml-makefile-nicer uses SYMLINK incorrectly

Blaisorblade's uml-makefile-nicer makes a V=0 build say SYMLINK where
what's happening is really a LINK.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: export symbols added by GCC hardened
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:06 +0000 (12:16 -0700)]
[PATCH] uml: export symbols added by GCC hardened

GCC hardened introduces additional symbol refererences (for the canary and
friends), also in modules - add weak export_symbols for them.  We already
tested that the weak declaration creates no problem on both GCC's providing
the function definition and on GCC's which don't provide it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: cleanup unprofile expression and build infrastructure
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:05 +0000 (12:16 -0700)]
[PATCH] uml: cleanup unprofile expression and build infrastructure

*) Rather than duplicate in various buggy ways the application of
   CFLAGS_NO_HARDENING and UNPROFILE (which apply to the same files),
   centralize it in Makefile.rules.  UNPROFILE_OBJS mustn't be listed in
   USER_OBJS but are compiled as such.

I've also verified that unprofile didn't work in the current form, because we
set _c_flags directly (using CFLAGS and not USER_CFLAGS, which is wrong),
which is normally used by c_flags, but we also override c_flags for all
USER_OBJS, and there we don't call unprofile.

Instead it only worked for unmap.o, the only one which wasn't a USER_OBJ.

We need to set c_flags (which is not a public Kbuild API) to clear a lot of
compilation flags like -nostdinc which Kbuild forces on everything.

*) Rather than $(CFLAGS_$(notdir $@)), which expands to CFLAGS_anObj.s when
   building "anObj.s", use $(CFLAGS_$(*F).o) which always accesses
   CFLAGS_anObj.o, like done by Kbuild.

*) Make c_flags apply to all targets having the same basename, rather than
   listing .s, .i, .lst and .o, with the use (which I tested) of

$(USER_OBJS:.o=.%): c_flags = ...

and of

 -      $(obj)/unmap.c: _c_flags = ...
 +      $(obj)/unmap.%: _c_flags = ...

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix compilation and execution with hardened GCC
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:04 +0000 (12:16 -0700)]
[PATCH] uml: fix compilation and execution with hardened GCC

To make some half-assembly stubs compile, disable various "hardened" GCC
features:

*) we can't make it build PIC code as we need %ebx to do syscalls and GCC
   wants it free for PIC

*) we can't leave stack protection as the stub is moved (not relocated!) in
   memory so the RIP-relative access to the canary tries reading from an
   unmapped address and causes a segfault, since we move the stub of various
   megabytes (the exact amount will be decided at runtime) away from the
   link-time address.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: use Kbuild tracking for all files and fix compilation output
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:03 +0000 (12:16 -0700)]
[PATCH] uml: use Kbuild tracking for all files and fix compilation output

Move the build of user-offsets to arch/um/sys-$(SUBARCH), where it's located.
So we can also build it via Kbuild with its dependency tracking rather than by
hand.  While hacking here, fix also a lot of little cosmetic things.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: search from uml_net in a more reasonable PATH
Mattia Dongili [Mon, 1 May 2006 19:16:01 +0000 (12:16 -0700)]
[PATCH] uml: search from uml_net in a more reasonable PATH

Append /usr/lib/uml to the existing PATH environment variable to let execvp()
search uml_net in FHS compliant locations.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix patch mismerge
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:01 +0000 (12:16 -0700)]
[PATCH] uml: fix patch mismerge

I sent a patch, it was applied as cda402b283c34a24b091f78eee116963e9494762,
then it was applied again as 181ae4005d0a4010802be534d929b38c42b9ac06 by
mistake.  But while the 1st time it modified (correctly) cow_header_v3, the
2nd it modified cow_header_v3_broken.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: error handling fixes
Jeff Dike [Mon, 1 May 2006 19:16:00 +0000 (12:16 -0700)]
[PATCH] uml: error handling fixes

Blairsorblade noticed some confusion between our use of a system
call's return value and errno.  This patch fixes a number of related
bugs -
using errno instead of a return value
using a return value instead of errno
forgetting to negate a error return to get a positive error code

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: update defconfig
Jeff Dike [Mon, 1 May 2006 19:15:59 +0000 (12:15 -0700)]
[PATCH] uml: update defconfig

Bring defconfig up to date.

Also disable CONFIG_BLK_DEV_UBD_SYNC by default.  By performing synchronous
I/O to the host, it slows things down, only protects against host crashes, and
can make a UML appear to hang while it waits for the host's disk.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: clean up after MADVISE_REMOVE
Jeff Dike [Mon, 1 May 2006 19:15:58 +0000 (12:15 -0700)]
[PATCH] uml: clean up after MADVISE_REMOVE

The MADVISE_REMOVE-checking code didn't clean up after itself.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: remove NULL checks and add some CodingStyle
Jesper Juhl [Mon, 1 May 2006 19:15:57 +0000 (12:15 -0700)]
[PATCH] uml: remove NULL checks and add some CodingStyle

Remove redundant NULL checks before [kv]free + small CodingStyle cleanup for
arch/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: skas0 support for 2G/2G hosts
Joris van Rantwijk [Mon, 1 May 2006 19:15:56 +0000 (12:15 -0700)]
[PATCH] uml: skas0 support for 2G/2G hosts

A quick hack to allow skas0 mode to run on 2G/2G hosts.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix iomem list traversal
Victor V. Vengerov [Mon, 1 May 2006 19:15:53 +0000 (12:15 -0700)]
[PATCH] uml: fix iomem list traversal

We need to walk the region list properly.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] silence initcall warnings
Andrew Morton [Mon, 1 May 2006 19:15:52 +0000 (12:15 -0700)]
[PATCH] silence initcall warnings

Suppress the initcall-return-value warnings unless initcall_debug was
specified.

They do find bugs, but they're extremely small ones and as Andi points out,
people get distressed.

Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: Remove apic= warning
Andi Kleen [Mon, 1 May 2006 19:15:51 +0000 (12:15 -0700)]
[PATCH] i386: Remove apic= warning

The apic= option can be used to set the APIC driver too.  When that is done
this code would always produce bogus warnings.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: Fix overflow in e820_all_mapped
Andi Kleen [Mon, 1 May 2006 19:15:50 +0000 (12:15 -0700)]
[PATCH] i386: Fix overflow in e820_all_mapped

The 32bit version of e820_all_mapped() needs to use u64 to avoid overflows on
PAE systems.  Pointed out by Jan Beulich

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386/x86-64: Fix ACPI disabled LAPIC handling mismerge
Andi Kleen [Mon, 1 May 2006 19:15:49 +0000 (12:15 -0700)]
[PATCH] i386/x86-64: Fix ACPI disabled LAPIC handling mismerge

The patch I submitted earlier to fix disabled LAPIC handling in ACPI was
mismerged for some reason I still don't quite understand.  Parts of it was
applied to the wrong function.

This patch fixes it up.

Cc: <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86_64: Add compat_sys_vmsplice and use it in x86-64
Andi Kleen [Mon, 1 May 2006 19:15:48 +0000 (12:15 -0700)]
[PATCH] x86_64: Add compat_sys_vmsplice and use it in x86-64

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Fix 'rdev->nr_pending' count when retrying barrier requests
NeilBrown [Mon, 1 May 2006 19:15:47 +0000 (12:15 -0700)]
[PATCH] md: Fix 'rdev->nr_pending' count when retrying barrier requests

When retrying a failed BIO_RW_BARRIER request, we need to keep the reference
in ->nr_pending over the whole retry.  Currently, we only hold the reference
if the failed request is the *last* one to finish - which is silly, because it
would normally be the first to finish.

So move the rdev_dec_pending call up into the didn't-fail branch.  As the rdev
isn't used in the later code, calling rdev_dec_pending earlier doesn't hurt.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Improve detection of lack of barrier support in raid1
NeilBrown [Mon, 1 May 2006 19:15:47 +0000 (12:15 -0700)]
[PATCH] md: Improve detection of lack of barrier support in raid1

Move the test for 'do barrier work' down a bit so that if the first write to a
raid1 is a BIO_RW_BARRIER write, the checking done by superblock writes will
cause the right thing to happen.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Change ENOTSUPP to EOPNOTSUPP
NeilBrown [Mon, 1 May 2006 19:15:46 +0000 (12:15 -0700)]
[PATCH] md: Change ENOTSUPP to EOPNOTSUPP

Because that is what you get if a BIO_RW_BARRIER isn't supported!

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Fixed refcounting/locking when attempting read error correction in raid10
NeilBrown [Mon, 1 May 2006 19:15:45 +0000 (12:15 -0700)]
[PATCH] md: Fixed refcounting/locking when attempting read error correction in raid10

We need to hold a reference to rdevs while reading and writing to attempt to
correct read errors.  This reference must be taken under an rcu lock.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Avoid oops when attempting to fix read errors on raid10
NeilBrown [Mon, 1 May 2006 19:15:44 +0000 (12:15 -0700)]
[PATCH] md: Avoid oops when attempting to fix read errors on raid10

We should add to the counter for the rdev *after* checking if the rdev is
NULL!!!

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: make qeth buildable
Bastian Blank [Mon, 1 May 2006 19:15:42 +0000 (12:15 -0700)]
[PATCH] s390: make qeth buildable

Signed-off-by: Bastian Blank <bastian@waldi.eu.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoIB/ipath: tidy up white space in a few files
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:09 +0000 (14:23 -0700)]
IB/ipath: tidy up white space in a few files

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: fix label name in interrupt handler
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:08 +0000 (14:23 -0700)]
IB/ipath: fix label name in interrupt handler

Names that are the opposite of their intended meanings are not so helpful.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: improve sparse annotation
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:07 +0000 (14:23 -0700)]
IB/ipath: improve sparse annotation

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: simplify IB timer usage
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:06 +0000 (14:23 -0700)]
IB/ipath: simplify IB timer usage

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: simplify RC send posting
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:05 +0000 (14:23 -0700)]
IB/ipath: simplify RC send posting

Remove some unnecessarily complicated tests.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: prevent hardware from being accessed during reset
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:03 +0000 (14:23 -0700)]
IB/ipath: prevent hardware from being accessed during reset

The reset code now turns off the PRESENT flag during a reset, so that
other code won't attempt to access a device that's in mid-reset.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: fix verbs registration
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:02 +0000 (14:23 -0700)]
IB/ipath: fix verbs registration

Remember when the verbs layer unregisters from the lower-level code.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: change handling of PIO buffers
Bryan O'Sullivan [Mon, 24 Apr 2006 21:23:00 +0000 (14:23 -0700)]
IB/ipath: change handling of PIO buffers

Different ipath hardware types have different numbers of buffers
available, so we decide on the counts ourselves unless we are specifically
overridden with a module parameter.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: iterate over correct number of ports during reset
Bryan O'Sullivan [Mon, 24 Apr 2006 21:22:59 +0000 (14:22 -0700)]
IB/ipath: iterate over correct number of ports during reset

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: set up 32-bit DMA mask if 64-bit setup fails
Bryan O'Sullivan [Mon, 24 Apr 2006 21:22:58 +0000 (14:22 -0700)]
IB/ipath: set up 32-bit DMA mask if 64-bit setup fails

Some systems do not set up 64-bit maps on systems with 2GB or less of
memory installed, so we have to fall back to trying a 32-bit setup.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: fix race with exposing reset file
Bryan O'Sullivan [Mon, 24 Apr 2006 21:22:57 +0000 (14:22 -0700)]
IB/ipath: fix race with exposing reset file

We were accidentally exposing the "reset" sysfs file more than once
per device.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years ago[PATCH] vmsplice: allow user to pass in gift pages
Jens Axboe [Mon, 1 May 2006 18:02:33 +0000 (20:02 +0200)]
[PATCH] vmsplice: allow user to pass in gift pages

If SPLICE_F_GIFT is set, the user is basically giving this pages away to
the kernel. That means we can steal them for eg page cache uses instead
of copying it.

The data must be properly page aligned and also a multiple of the page size
in length.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] pipe: enable atomic copying of pipe data to/from user space
Jens Axboe [Mon, 1 May 2006 18:02:05 +0000 (20:02 +0200)]
[PATCH] pipe: enable atomic copying of pipe data to/from user space

The pipe ->map() method uses kmap() to virtually map the pages, which
is both slow and has known scalability issues on SMP. This patch enables
atomic copying of pipe pages, by pre-faulting data and using kmap_atomic()
instead.

lmbench bw_pipe and lat_pipe measurements agree this is a Good Thing. Here
are results from that on a UP machine with highmem (1.5GiB of RAM), running
first a UP kernel, SMP kernel, and SMP kernel patched.

Vanilla-UP:
Pipe bandwidth: 1622.28 MB/sec
Pipe bandwidth: 1610.59 MB/sec
Pipe bandwidth: 1608.30 MB/sec
Pipe latency: 7.3275 microseconds
Pipe latency: 7.2995 microseconds
Pipe latency: 7.3097 microseconds

Vanilla-SMP:
Pipe bandwidth: 1382.19 MB/sec
Pipe bandwidth: 1317.27 MB/sec
Pipe bandwidth: 1355.61 MB/sec
Pipe latency: 9.6402 microseconds
Pipe latency: 9.6696 microseconds
Pipe latency: 9.6153 microseconds

Patched-SMP:
Pipe bandwidth: 1578.70 MB/sec
Pipe bandwidth: 1579.95 MB/sec
Pipe bandwidth: 1578.63 MB/sec
Pipe latency: 9.1654 microseconds
Pipe latency: 9.2266 microseconds
Pipe latency: 9.1527 microseconds

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: call handle_ra_miss() on failure to lookup page
Jens Axboe [Mon, 1 May 2006 17:59:54 +0000 (19:59 +0200)]
[PATCH] splice: call handle_ra_miss() on failure to lookup page

Notify the readahead logic of the missing page. Suggested by
Oleg Nesterov.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] Add ->splice_read/splice_write to def_blk_fops
Jens Axboe [Mon, 1 May 2006 17:59:32 +0000 (19:59 +0200)]
[PATCH] Add ->splice_read/splice_write to def_blk_fops

It can use the generic handlers.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] pipe: introduce ->pin() buffer operation
Jens Axboe [Mon, 1 May 2006 17:59:03 +0000 (19:59 +0200)]
[PATCH] pipe: introduce ->pin() buffer operation

The ->map() function is really expensive on highmem machines right now,
since it has to use the slower kmap() instead of kmap_atomic(). Splice
rarely needs to access the virtual address of a page, so it's a waste
of time doing it.

Introduce ->pin() to take over the responsibility of making sure the
page data is valid. ->map() is then reduced to just kmap(). That way we
can also share a most of the pipe buffer ops between pipe.c and splice.c

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: fix bugs in pipe_to_file()
Jens Axboe [Mon, 1 May 2006 17:50:48 +0000 (19:50 +0200)]
[PATCH] splice: fix bugs in pipe_to_file()

Found by Oleg Nesterov <oleg@tv-sign.ru>, fixed by me.

- Only allow full pages to go to the page cache.
- Check page != buf->page instead of using PIPE_BUF_FLAG_STOLEN.
- Remember to clear 'stolen' if add_to_page_cache() fails.

And as a cleanup on that:

- Make the bottom fall-through logic a little less convoluted. Also make
  the steal path hold an extra reference to the page, so we don't have
  to differentiate between stolen and non-stolen at the end.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years agoIB/mthca: Fix offset in query_gid method
Roland Dreier [Mon, 1 May 2006 17:40:23 +0000 (10:40 -0700)]
IB/mthca: Fix offset in query_gid method

GuidInfo records have 8 byte GUIDs in them, so an index should be
multiplied by 8 to get an offset.  mthca_query_gid() was incorrectly
multiplying by 16.

Noticed by Leonid Keller <leonid@mellanox.co.il>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 1 May 2006 15:14:03 +0000 (08:14 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [TG3]: Update version and reldate
  [TG3]: Fix bug in nvram write
  [TG3]: Add reset_phy parameter to chip reset functions
  [TG3]: Reset chip when changing MAC address
  [TG3]: Add phy workaround
  [TG3]: Call netif_carrier_off() during phy reset
  [IPV6]: Fix race in route selection.
  [XFRM]: fix incorrect xfrm_policy_afinfo_lock use
  [XFRM]: fix incorrect xfrm_state_afinfo_lock use
  [TCP]: Fix unlikely usage in tcp_transmit_skb()
  [XFRM]: fix softirq-unsafe xfrm typemap->lock use
  [IPSEC]: Fix IP ID selection
  [NET]: use hlist_unhashed()
  [IPV4]: inet_init() -> fs_initcall
  [NETLINK]: cleanup unused macro in net/netlink/af_netlink.c
  [PKT_SCHED] netem: fix loss
  [X25]: fix for spinlock recurse and spinlock lockup with timer handler

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 1 May 2006 15:12:39 +0000 (08:12 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Disable preemption during flush_tlb_pending().
  [SPARC64]: Kill __flush_tlb_page() prototype.