openwrt/staging/blogic.git
16 years agoUBI: create ltree_entry slab on initialization
Artem Bityutskiy [Sun, 16 Dec 2007 10:32:51 +0000 (12:32 +0200)]
UBI: create ltree_entry slab on initialization

Since the ltree_entry slab cache is a global entity, which is
used by all UBI devices, it is more logical to create it on
module initialization time and destro on module exit time.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: improve error messages
Artem Bityutskiy [Sat, 15 Dec 2007 17:56:51 +0000 (19:56 +0200)]
UBI: improve error messages

Always print error code with error messages, sometimes it is
extremely helpful info.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: remove redundant field
Artem Bityutskiy [Sat, 15 Dec 2007 16:13:56 +0000 (18:13 +0200)]
UBI: remove redundant field

Remove redundant ubi->major field - we have it in ubi->cdev.dev
already.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: minor tidy-ups
Artem Bityutskiy [Sat, 15 Dec 2007 13:09:07 +0000 (15:09 +0200)]
UBI: minor tidy-ups

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: silence a warning
Jesper Juhl [Thu, 13 Dec 2007 22:53:08 +0000 (23:53 +0100)]
UBI: silence a warning

This patch silences the following warning :

  drivers/mtd/ubi/vmt.c:73: warning: 'ret' may be used uninitialized in this function

gcc can't see that we always initialize ret in all situations where it is
actually used. The one case where it's not initialized is when we BUG(),
but gcc doesn't know that we won't then continue and use an uninitialized
'ret'.

This patch results in code that does exactely the same as before, but it
also makes gcc shut up, so we generate one less line of warning noise.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: add ubi_leb_map interface
Artem Bityutskiy [Thu, 6 Dec 2007 16:47:30 +0000 (18:47 +0200)]
UBI: add ubi_leb_map interface

The idea of this interface belongs to Adrian Hunter. The
interface is extremely useful when one has to have a guarantee
that an LEB will contain all 0xFFs even in case of an unclean
reboot. UBI does have an 'ubi_leb_erase()' call which may do
this, but it is stupid and ineffecient, because it flushes whole
queue. I should be re-worked to just be a pair of unmap,
map calls.

The user of the interfaci is UBIFS at the moment.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: bugfix: allocate mandatory EBs first
Artem Bityutskiy [Tue, 4 Dec 2007 19:36:12 +0000 (21:36 +0200)]
UBI: bugfix: allocate mandatory EBs first

First allocate the necessary eraseblocks, then the optional ones.
Otherwise it allocates all PEBs for bad EB handling, and fails
on then following EBA LEB allocation.

Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years agoUBI: fix error code in ubi_io_read()
Artem Bityutskiy [Thu, 18 Oct 2007 17:09:41 +0000 (20:09 +0300)]
UBI: fix error code in ubi_io_read()

When NAND detects an ECC error, it returns -EBADMSG. It does not
stop reading requested data if one page has an ECC error, it keeps
going and reads all the requested data. If it fails to read all
the data, it does not return -EBADMSG, but returns the error code
which reflects the reason of the failure.

But some drivers may have bugs (e.g., OneNAND had) and stop reading
after the first ECC error, so it returns -EBADMSG. In turn, UBI
propagates this up to the caller. The caller will treat this as
"all the requested data was read, but there was an ECC error".

So we change the error code to -EIO if it is -EBADMSG and the read
length is less then the requested length. We also add an assertion,
so if UBI debugging is enabled, UBI will bug.

Pointed-to-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 years ago[MTD] mtdoops cleanup
Peter Korsgaard [Tue, 6 Nov 2007 10:56:02 +0000 (11:56 +0100)]
[MTD] mtdoops cleanup

Use memcpy instead of open coding a copy loop.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] mtdoops: Document usage in Kconfig
Peter Korsgaard [Tue, 6 Nov 2007 10:55:00 +0000 (11:55 +0100)]
[MTD] mtdoops: Document usage in Kconfig

Add usage instructions to Kconfig for mtdoops driver.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NAND] Marvell Orion device bus NAND controller
Tzachi Perelstein [Tue, 16 Oct 2007 23:10:40 +0000 (01:10 +0200)]
[MTD] [NAND] Marvell Orion device bus NAND controller

Driver for the device bus NAND controller in the Marvell Orion family
of ARM SoCs.

Signed-off-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NOR] Attempt to clean up the JEDEC unlock address confusion
David Woodhouse [Mon, 3 Dec 2007 13:01:21 +0000 (13:01 +0000)]
[MTD] [NOR] Attempt to clean up the JEDEC unlock address confusion

Use a single unlock address, adjust it for the device type in the
knowledge that it'll be adjusted back again. This has the desirable
effect of masking out the least significant bit of the address for x16
devices.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NOR] Fix overflow check in jedec_probe
David Woodhouse [Fri, 30 Nov 2007 16:24:52 +0000 (16:24 +0000)]
[MTD] [NOR] Fix overflow check in jedec_probe

Having laid the code out so that it's easier to read instead of sticking
to the 80-column guideline even when it doesn't make sense, a bug is
immediately spotted... we were only checking _one_ of the unlock
addresses to see if it runs off the end of the map.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NOR] Clean up jedec_probe, remove unlock address arrays
David Woodhouse [Mon, 3 Dec 2007 12:48:57 +0000 (12:48 +0000)]
[MTD] [NOR] Clean up jedec_probe, remove unlock address arrays

This should have no functional effects -- we've been ignoring all but
the first address in the array for a long time, and using it only to
indicate which device types are supported.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] Always initialise mutex in new mtd_blktrans_dev.
David Woodhouse [Mon, 3 Dec 2007 12:46:12 +0000 (12:46 +0000)]
[MTD] Always initialise mutex in new mtd_blktrans_dev.

We were only initialising the mutex in the case where the new device was
automatically allocated the highest minor number. If the caller
specified a minor number, or if it filled in a free slot which was made
by a previous device deregistering, the mutex wouldn't get initialised
when we jumped out of the loop.

Reported by Monte Copeland <catboat@texas.net>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NAND] pasemi_nand driver
Egor Martovetsky [Thu, 29 Nov 2007 00:37:31 +0000 (18:37 -0600)]
[MTD] [NAND] pasemi_nand driver

Plumbing for NAND connected via localbus on PA Semi PWRficient-based
boards.

From: Egor Martovetsky <egor@pasemi.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NAND] S3C2410 correctly set nFCE over resume
Ben Dooks [Mon, 19 Nov 2007 23:28:07 +0000 (23:28 +0000)]
[MTD] [NAND] S3C2410 correctly set nFCE over resume

Ensure the nFCE line is de-asserted over suspend and
then re-initialised when the system resumes. This is
to ensure that the NAND is kept in lowest power mode
over suspend (power settings are only specified for
nFCE inactive) as well as fixing the Simtec Osiris
which relies on nFCE being inactive.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] fix CONFIG_MTD_SHARP_SL if CONFIG_MTD=m
Stanislav Brabec [Mon, 19 Nov 2007 21:33:02 +0000 (22:33 +0100)]
[MTD] fix CONFIG_MTD_SHARP_SL if CONFIG_MTD=m

Sharp Zaurus SL-C3200 with CONFIG_MTD=m and CONFIG_MTD_SHARP_SL=y (as it
is bool) lost support for the ROM flash. With CONFIG_MTD=y it has no
problems.

It is caused by losing of compiled code of
drivers/mtd/maps/sharpsl-flash.o.
It was linked to drivers/mtd/maps/built-in.o and drivers/mtd/built-in.o,
but lost and not linked to drivers/built-in.o (because CONFIG_MTD!=y).

Patch below fixes this problem by creating sharpsl-flash.ko (and the
code works correctly as a module).

Signed-off-by: Stanislav Brabec <utx@penguin.cz>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] mtd_dataflash: Incorrect compare-after-write check
Andrew Victor [Mon, 19 Nov 2007 13:37:23 +0000 (15:37 +0200)]
[MTD] mtd_dataflash: Incorrect compare-after-write check

After writing to a Dataflash page, the built-in compare operation is
used to check that the page was successfully written.  A logic bug in
checking the results of the comparison currently causes the compare to
never fail.

This bug was originally in the legacy at91_dataflash.c driver.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[JFFS2] Fix return value check for mtd->point() in check_node_data()
Alexey Korolev [Tue, 27 Nov 2007 11:25:10 +0000 (11:25 +0000)]
[JFFS2] Fix return value check for mtd->point() in check_node_data()

If we ask it to map 'len' bytes of the device, don't compare against
some other number and whine that it's different. That's a little silly.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NOR] Prevent erase command invocation on suspended chip
Alexander Belyakov [Wed, 7 Nov 2007 08:58:07 +0000 (11:58 +0300)]
[MTD] [NOR] Prevent erase command invocation on suspended chip

while running stress tests we have met cfi_cmdset_0001.c driver issue.
Working on multipartitional devices with erase suspend on write
feature enabled it is possible to get erase operation invoked on chip
with suspended erase. get_chip() looses information about earlier
suspended erase and new erase operation gets issued. New erase
operations report successful completion, but blocks remain dirty
causing, for example, JFFS2 error messages like:

...
Newly-erased block contained word 0x20031985 at offset 0x00200000
Newly-erased block contained word 0x20031985 at offset 0x00280000
Newly-erased block contained word 0x20031985 at offset 0x00240000
...

The patch below fixes that issue.

Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [OneNAND] Do not stop reading for ECC errors
Adrian Hunter [Tue, 6 Nov 2007 07:17:25 +0000 (09:17 +0200)]
[MTD] [OneNAND] Do not stop reading for ECC errors

When an ECC error occurs, the read should be completed
anyway before returning -EBADMSG.  Returning -EBADMSG
straight away is incorrect.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [NOR] Support Intel P3x flash support with CFI version 1.5
Alexey Korolev [Fri, 23 Nov 2007 09:31:56 +0000 (09:31 +0000)]
[MTD] [NOR] Support Intel P3x flash support with CFI version 1.5

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] Fix data CRC checking on NOR flash.
David Woodhouse [Wed, 21 Nov 2007 17:08:16 +0000 (12:08 -0500)]
[JFFS2] Fix data CRC checking on NOR flash.

We were failing to check the data CRC on data nodes on non-writebuffered
flash, which led to "interesting" behaviour on unclean shutdowns.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [NOR] Add support for the SST 39VF1601 flash chip
David Howells [Fri, 9 Nov 2007 15:34:42 +0000 (15:34 +0000)]
[MTD] [NOR] Add support for the SST 39VF1601 flash chip

Add support for the SST 39VF1601 flash chip.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] Provide mtdram.h with mtdram_init_device() prototype
Jesper Nilsson [Tue, 6 Nov 2007 08:40:24 +0000 (08:40 +0000)]
[MTD] Provide mtdram.h with mtdram_init_device() prototype

This is used by axisflashmap.c to boot from ram.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] make jffs2_get_acl() static
Adrian Bunk [Tue, 6 Nov 2007 08:36:49 +0000 (08:36 +0000)]
[JFFS2] make jffs2_get_acl() static

jffs2_get_acl() can now become static again.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] Fix misapplied patch causing compile breakage
David Woodhouse [Tue, 6 Nov 2007 08:29:59 +0000 (08:29 +0000)]
[JFFS2] Fix misapplied patch causing compile breakage

Somehow, the patch in commit 15953580e79b58caefb107e77f218e009b9992e6
was misapplied and part of the old list-traversal remained. Remove it.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] Don't strip sgid bit from inode permissions
David Woodhouse [Thu, 1 Nov 2007 20:27:38 +0000 (16:27 -0400)]
[JFFS2] Don't strip sgid bit from inode permissions

<viro> dwmw2: anyway, removing sgid from directories or from
       files without S_IXGRP is a plain and simple bug
<viro> these days you don't need that logics at all - simply remove it

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] Improve getdents vs. f_pos handling on NOR flash.
David Woodhouse [Thu, 1 Nov 2007 20:25:56 +0000 (16:25 -0400)]
[JFFS2] Improve getdents vs. f_pos handling on NOR flash.

Commit a491486a2087ac3dfc00efb4f838c8d684afaf54 started obliterating
dirents directly on the medium, when jffs2_can_mark_obsolete(). Removing
them immediately from the f->dents list, however, screws up handling of
f_pos within a directory -- because the offset is equivalent to the
number of entries through the list we are, and the existence of
deletion dirents served to provide 'placeholders' for unlinked
entries. Now, 'rm -r' doesn't even manage to unlink everything in the
directory.

Revert to keeping 'deletion' dirents in the list, at least in memory
even though we no longer write anything to the medium.

Spotted, debugged and mostly fixed by Joakim Tjernlund

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [NOR] More CFI fixups for Atmel chips
Hans-Christian Egtvedt [Tue, 30 Oct 2007 15:33:07 +0000 (16:33 +0100)]
[MTD] [NOR] More CFI fixups for Atmel chips

Convert CFI tables from Atmel cmdset_0001 chips to Intel format and set
BufWrite timeouts to 0 for Atmel cmdset_0001 and cmdset_0002 chips.
Some chips may indicate support for buffered writes even though they
only support dual-word writes.

The CFI fixup must run before fixup_use_write_buffers for this to work.

Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoMTD: small physmap_of partition parsing fixes
Valentine Barshak [Mon, 29 Oct 2007 20:29:02 +0000 (23:29 +0300)]
MTD: small physmap_of partition parsing fixes

Use of_get_next_child for proper ref counting as suggested by Stephen Rothwell
and remove add_mtd_partitions from parse_partitions to avoid duplicate
mtd device registration for RedBoot partitions.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Heckled-for-on-IRC-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [NAND] Add Blackfin BF52x support in bf5xx_nand driver
Michael Hennerich [Tue, 30 Oct 2007 09:08:29 +0000 (17:08 +0800)]
[MTD] [NAND] Add Blackfin BF52x support in bf5xx_nand driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] Skip bad blocks when checking for RedBoot partition table
David Woodhouse [Mon, 29 Oct 2007 01:57:02 +0000 (21:57 -0400)]
[MTD] Skip bad blocks when checking for RedBoot partition table

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [NAND] Check for RedBoot partitions on CAFÉ NAND
David Woodhouse [Mon, 29 Oct 2007 01:56:39 +0000 (21:56 -0400)]
[MTD] [NAND] Check for RedBoot partitions on CAFÉ NAND

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sun, 28 Oct 2007 19:03:14 +0000 (12:03 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: add SH-S202J to ivb_list[]
  drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings
  drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n
  hpt366: fix build for CONFIG_HOTPLUG=n
  cy82c693: fix build for CONFIG_HOTPLUG=n

17 years agoduplicate initializer in sound/pci/hda/patch_realtek.c
Al Viro [Sat, 27 Oct 2007 20:20:02 +0000 (21:20 +0100)]
duplicate initializer in sound/pci/hda/patch_realtek.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix breakage in pegasos_eth
Al Viro [Sat, 27 Oct 2007 20:02:32 +0000 (21:02 +0100)]
fix breakage in pegasos_eth

Fix fallout from commit b45d9147f1582333e180e1023624c003874b7312
("mv643xx_eth: Remove unused register defines")

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Sun, 28 Oct 2007 05:18:55 +0000 (22:18 -0700)]
Merge git://git./linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: Dump filtering supports x86_64 sparsemem
  x86: fix compiler warnings in arch/x86/kernel/early-quirks.c
  x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c
  x86: Fix boot protocol KEEP_SEGMENTS check.
  x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info
  x86: export smp_ops to allow modular build of KVM
  Revert "i386: export i386 smp_call_function_mask() to modules"

17 years agocirrusfb nonsense
Al Viro [Sat, 27 Oct 2007 18:46:58 +0000 (19:46 +0100)]
cirrusfb nonsense

(pointer > 0) is deeply weird; (pointer >= 0) is even dumber...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoscatterlist fallout: mmc
Al Viro [Sat, 27 Oct 2007 18:40:46 +0000 (19:40 +0100)]
scatterlist fallout: mmc

 #include <scatterlist/scatterlist.h>
is an odd thing to do...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoide/arm/icside: fallout from commit 86f3a492bb09eee5745b93af35f2212179c251fd
Al Viro [Sat, 27 Oct 2007 18:39:23 +0000 (19:39 +0100)]
ide/arm/icside: fallout from commit 86f3a492bb09eee5745b93af35f2212179c251fd

struct device doesn't have ->dma; it's in struct expansion_card where
that struct device is embedded into.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoscatterlist fallout: frv
Al Viro [Sat, 27 Oct 2007 18:23:30 +0000 (19:23 +0100)]
scatterlist fallout: frv

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86: Dump filtering supports x86_64 sparsemem
Ken'ichi Ohmichi [Fri, 26 Oct 2007 05:19:26 +0000 (14:19 +0900)]
x86: Dump filtering supports x86_64 sparsemem

This patch adds the symbol "init_level4_pgt" to the vmcoreinfo data so
that makedumpfile (dump filtering command) supports x86_64 sparsemem
kernel of linux-2.6.24.

makedumpfile creates a small dumpfile by excluding unnecessary pages for
the analysis. It checks attributes in page structures and distinguishes
necessary pages and unnecessary ones. To check them, makedumpfile gets
the vmcoreinfo data which has the minimum debugging information only for
dump filtering.

For older x86_64 kernel (linux-2.6.23 or before), makedumpfile translates
the virtual address of page structure into physical address by subtracting
PAGE_OFFSET from virtual address, but this translation isn't effective for
linux-2.6.24 sparsemem kernel, because its page structures are in virtual
memmap area. makedumpfile should translate their virtual address by 4-levels
paging and it needs the symbol "init_level4_pgt".

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix compiler warnings in arch/x86/kernel/early-quirks.c
Jeff Garzik [Sat, 27 Oct 2007 18:57:43 +0000 (20:57 +0200)]
x86: fix compiler warnings in arch/x86/kernel/early-quirks.c

fix this warning:

arch/x86/kernel/early-quirks.c:40: warning: nvidia_hpet_check defined but not used

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c
Jeff Garzik [Sat, 27 Oct 2007 18:57:43 +0000 (20:57 +0200)]
x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c

Fix !CONFIG_SMP warning:

arch/x86/kernel/acpi/processor.c: In function arch_acpi_processor_init_pdc:
arch/x86/kernel/acpi/processor.c:65: warning: unused variable cpu

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Fix boot protocol KEEP_SEGMENTS check.
Eric W. Biederman [Fri, 26 Oct 2007 17:29:04 +0000 (11:29 -0600)]
x86: Fix boot protocol KEEP_SEGMENTS check.

The kernel only ever supports 1 version of the boot protocol
so there is no need to check the boot protocol revision to
see if a feature is supported.

Both x86 and x86_64 support the same boot protocol so we need
to implement the KEEP_SEGMENTS on x86_64 as well.  It isn't
just paravirt bootloaders that could use this functionality.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: voyager: fix bogus conversion to per_cpu for boot_cpu_info
James Bottomley [Fri, 26 Oct 2007 17:17:19 +0000 (12:17 -0500)]
x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info

There were two problems.  Firstly, someone forgot the struct keyword in
front of cpuinfo_x86, so I take it this wasn't even compile checked.
Secondly, the actual definition has this as a SHARED_ALIGNED, so the
definitions mismatch.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: export smp_ops to allow modular build of KVM
Thomas Gleixner [Sat, 27 Oct 2007 18:57:43 +0000 (20:57 +0200)]
x86: export smp_ops to allow modular build of KVM

KVM uses smp_call_function_mask and therefor need smp_ops to be exported.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoRevert "i386: export i386 smp_call_function_mask() to modules"
Thomas Gleixner [Fri, 26 Oct 2007 15:22:17 +0000 (17:22 +0200)]
Revert "i386: export i386 smp_call_function_mask() to modules"

This reverts commit 6442eea937ef797d4b66733f49c82e2fdc2aca6f.

The patch breaks smp_ops and needs to be reverted. The solution to
allow modular build of KVM is to export smp_ops instead.

Pointed-out-by: James Bottomley
  <jejb> tglx, so write out 100 times "voyager is a useful architecture" ...
  <tglx> yes, Sir

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Sat, 27 Oct 2007 17:14:04 +0000 (10:14 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  [JFFS2] Update MAINTAINERS entry -- the jffs-dev list is dead
  [JFFS2] Prevent return of initialised variable in jffs2_init_acl_post()

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sat, 27 Oct 2007 17:12:39 +0000 (10:12 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc_spi: Fix mmc-over-spi regression
  mmc: use common byte swap macros
  mmc: fix cid and csd byte order
  at91_mci: Fix bad reference

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 27 Oct 2007 17:11:12 +0000 (10:11 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC32]: Fix build-warning in io-unit.c
  [SPARC64]: Fix BACKOFF_SPIN on non-SMP.
  [SPARC32]: __inline__ --> inline
  [SPARC64]: __inline__ --> inline

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 27 Oct 2007 17:10:40 +0000 (10:10 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [CRYPTO] users: Fix up scatterlist conversion errors
  [CRYPTO] tcrypt: Move sg_init_table out of timing loops
  [NETNS]: Fix get_net_ns_by_pid
  [NET]: Marking struct pernet_operations __net_initdata was inappropriate
  [INET] ESP: Must #include <linux/scatterlist.h>
  [TCP] IPV6: fix softnet build breakage

17 years ago[JFFS2] Update MAINTAINERS entry -- the jffs-dev list is dead
David Woodhouse [Sat, 27 Oct 2007 14:39:48 +0000 (10:39 -0400)]
[JFFS2] Update MAINTAINERS entry -- the jffs-dev list is dead

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[JFFS2] Prevent return of initialised variable in jffs2_init_acl_post()
David Woodhouse [Sat, 27 Oct 2007 14:36:44 +0000 (10:36 -0400)]
[JFFS2] Prevent return of initialised variable in jffs2_init_acl_post()

Spotted by the Coverity checker, and pointed out by Adrian Bunk.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agommc_spi: Fix mmc-over-spi regression
David Brownell [Sat, 27 Oct 2007 12:47:20 +0000 (14:47 +0200)]
mmc_spi: Fix mmc-over-spi regression

Patch 49dce689ad4ef0fd1f970ef762168e4bd46f69a3 changed the sysfs data
structures for SPI in a way which broke the MMC-over-SPI host driver.

This patch fixes that regression by changing the scheme used to keep
from knowingly trying to use a shared bus segment, and updates the
adjacent comments slightly to better explain the issue.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: use common byte swap macros
Pierre Ossman [Sat, 27 Oct 2007 12:41:04 +0000 (14:41 +0200)]
mmc: use common byte swap macros

Use the more generic byte swapping macros instead of the socket variants.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: fix cid and csd byte order
Pierre Ossman [Sat, 27 Oct 2007 12:14:23 +0000 (14:14 +0200)]
mmc: fix cid and csd byte order

MMC over SPI sends the CID and CSD registers as data, not responses,
which means that the host driver won't do the necessary byte flipping
for us.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoat91_mci: Fix bad reference
Pierre Ossman [Mon, 22 Oct 2007 16:16:16 +0000 (18:16 +0200)]
at91_mci: Fix bad reference

The flags parameter got removed in a previous commit, but some
references were overlooked.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years ago[SPARC32]: Fix build-warning in io-unit.c
David S. Miller [Sat, 27 Oct 2007 07:54:14 +0000 (00:54 -0700)]
[SPARC32]: Fix build-warning in io-unit.c

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] users: Fix up scatterlist conversion errors
Herbert Xu [Sat, 27 Oct 2007 07:52:07 +0000 (00:52 -0700)]
[CRYPTO] users: Fix up scatterlist conversion errors

This patch fixes the errors made in the users of the crypto layer during
the sg_init_table conversion.  It also adds a few conversions that were
missing altogether.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO] tcrypt: Move sg_init_table out of timing loops
Herbert Xu [Sat, 27 Oct 2007 07:51:21 +0000 (00:51 -0700)]
[CRYPTO] tcrypt: Move sg_init_table out of timing loops

This patch moves the sg_init_table out of the timing loops for hash
algorithms so that it doesn't impact on the speed test results.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix BACKOFF_SPIN on non-SMP.
David S. Miller [Sat, 27 Oct 2007 07:23:22 +0000 (00:23 -0700)]
[SPARC64]: Fix BACKOFF_SPIN on non-SMP.

It can't be just empty, it has to at least branch
back to 'label'.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC32]: __inline__ --> inline
David S. Miller [Sat, 27 Oct 2007 07:17:01 +0000 (00:17 -0700)]
[SPARC32]: __inline__ --> inline

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: __inline__ --> inline
David S. Miller [Sat, 27 Oct 2007 07:13:04 +0000 (00:13 -0700)]
[SPARC64]: __inline__ --> inline

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETNS]: Fix get_net_ns_by_pid
Eric W. Biederman [Sat, 27 Oct 2007 05:56:12 +0000 (22:56 -0700)]
[NETNS]: Fix get_net_ns_by_pid

The pid namespace patches changed the semantics of
find_task_by_pid without breaking the compile resulting
in get_net_ns_by_pid doing the wrong thing.

So switch to using the intended find_task_by_vpid.

Combined with Denis' earlier patch to make netlink traffic
fully synchronous the inadvertent race I introduced with
accessing current is actually removed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Marking struct pernet_operations __net_initdata was inappropriate
Eric W. Biederman [Sat, 27 Oct 2007 05:54:53 +0000 (22:54 -0700)]
[NET]: Marking struct pernet_operations __net_initdata was inappropriate

It is not safe to to place struct pernet_operations in a special section.
We need struct pernet_operations to last until we call unregister_pernet_subsys.
Which doesn't happen until module unload.

So marking struct pernet_operations is a disaster for modules in two ways.
- We discard it before we call the exit method it points to.
- Because I keep struct pernet_operations on a linked list discarding
  it for compiled in code removes elements in the middle of a linked
  list and does horrible things for linked insert.

So this looks safe assuming __exit_refok is not discarded
for modules.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET] ESP: Must #include <linux/scatterlist.h>
Adrian Bunk [Sat, 27 Oct 2007 05:53:58 +0000 (22:53 -0700)]
[INET] ESP: Must #include <linux/scatterlist.h>

This patch fixes the following compile errors in some configurations:

<--  snip  -->

...
  CC      net/ipv4/esp4.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv4/esp4.c: In function 'esp_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv4/esp4.c:113: error: implicit declaration of function 'sg_init_table'
make[3]: *** [net/ipv4/esp4.o] Error 1
...
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv6/esp6.c: In function 'esp6_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv6/esp6.c:112: error: implicit declaration of function 'sg_init_table'
make[3]: *** [net/ipv6/esp6.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] IPV6: fix softnet build breakage
Jeff Garzik [Sat, 27 Oct 2007 05:53:14 +0000 (22:53 -0700)]
[TCP] IPV6: fix softnet build breakage

net/ipv6/tcp_ipv6.c: In function 'tcp_v6_rcv':
net/ipv6/tcp_ipv6.c:1736: error: implicit declaration of function
'get_softnet_dma'
net/ipv6/tcp_ipv6.c:1736: warning: assignment makes pointer from integer
without a cast

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux...
Linus Torvalds [Fri, 26 Oct 2007 20:56:01 +0000 (13:56 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/hpa/linux-2.6-x86setup

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
  x86 setup: sizeof() is unsigned, unbreak comparisons
  x86 setup: handle boot loaders which set up the stack incorrectly

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
Linus Torvalds [Fri, 26 Oct 2007 20:49:29 +0000 (13:49 -0700)]
Merge git://git./pub/scm/linux/kernel/git/sam/x86

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86:
  x86: kill the old i386 and x86_64 directories
  x86: move i386 and x86_64 Kconfig files to x86 directory
  kconfig: small code refactoring in kconfig Makefile
  x86: unification of i386 and x86_64 Kconfig.debug
  x86: move defconfig files for i386 and x86_64 to x86
  x86: move i386 and x86_64 Makefiles to arch/x86

17 years agoide: add SH-S202J to ivb_list[]
Bartlomiej Zolnierkiewicz [Fri, 26 Oct 2007 18:31:16 +0000 (20:31 +0200)]
ide: add SH-S202J to ivb_list[]

From the report by Nick Warne.

Tested-by: Nick Warne <nick@ukfsn.org>
Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agodrivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings
Jeff Garzik [Fri, 26 Oct 2007 18:31:15 +0000 (20:31 +0200)]
drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings

* We shouldn't bother with dev->current_state, the PCI API functions we
  call manage this for us (and do a far better job at it too).

* Remove pci_set_power_state(dev, PCI_D0) call in resume, as
  pci_enable_device() does the same thing.

* Check pci_enable_device() return value.  If it failed, fail
  the entire resume and avoid programming timings into the [potentially
  dead/asleep] chip.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agodrivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n
Bartlomiej Zolnierkiewicz [Fri, 26 Oct 2007 18:31:15 +0000 (20:31 +0200)]
drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n

It turns out that const and __{dev}initdata cannot be mixed currently
and that generic IDE PCI host driver is also affected by the same issue:

On Thursday 25 October 2007, Ralf Baechle wrote:
>   CC      drivers/ide/pci/generic.o
> drivers/ide/pci/generic.c:52: error: __setup_str_ide_generic_all_on causes a
> +section type conflict

[ Also reported by Martijn Uffing <mp3project@sarijopen.student.utwente.nl>. ]

This patch workarounds the problem in a bit hackish way but without
removing const from generic_chipsets[] (it adds const to __setup() so
__setup_str_ide_generic_all becomes const).

Now all __{dev}initdata data in generic IDE PCI host driver are read-only
so it builds again (driver's .init.data section gets marked as READONLY).

Cc: Martijn Uffing <mp3project@sarijopen.student.utwente.nl>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: fix build for CONFIG_HOTPLUG=n
Bartlomiej Zolnierkiewicz [Fri, 26 Oct 2007 18:31:15 +0000 (20:31 +0200)]
hpt366: fix build for CONFIG_HOTPLUG=n

On Saturday 20 October 2007, Avuton Olrich wrote:

> My randconfig script the attached config caught an error on:
> drivers/ide/pci/cy82c693.c:439: error: primary causes a section type conflict
>
> My git tree: c00046c279a2521075250fad682ca0acc10d4fd7
>
> Bisected to:
8562043606430185cad26d085d46adcc7ad67fd1 is first bad commit
> commit 8562043606430185cad26d085d46adcc7ad67fd1
> Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Date:   Sat Oct 20 00:32:34 2007 +0200
>
>     ide: constify struct ide_port_info
>
>     Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

It turns out that const and __{dev}initdata cannot be mixed currently
and that hpt366 host driver is also affected by the same issue:

> drivers/ide/pci/hpt366.c:1428: error: hpt366_chipsets causes a section type
> conflict

This patch workarounds the problem by making static struct hpt_info instances
const.  Now all __devinitdata data in hpt366 host driver are read-only so it
builds again (driver's .init.data section gets marked as READONLY).

While at it:

* Bump driver version.

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: "Avuton Olrich" <avuton@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agocy82c693: fix build for CONFIG_HOTPLUG=n
Bartlomiej Zolnierkiewicz [Fri, 26 Oct 2007 18:31:15 +0000 (20:31 +0200)]
cy82c693: fix build for CONFIG_HOTPLUG=n

On Saturday 20 October 2007, Avuton Olrich wrote:

> My randconfig script the attached config caught an error on:
> drivers/ide/pci/cy82c693.c:439: error: primary causes a section type conflict
>
> My git tree: c00046c279a2521075250fad682ca0acc10d4fd7
>
> Bisected to:
8562043606430185cad26d085d46adcc7ad67fd1 is first bad commit
> commit 8562043606430185cad26d085d46adcc7ad67fd1
> Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Date:   Sat Oct 20 00:32:34 2007 +0200
>
>     ide: constify struct ide_port_info
>
>     Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

It turns out that const and __{dev}initdata cannot be mixed currently.

This patch workarounds the problem by removing __devinitdata tag from 'primary'
variable (which makes 'primary' to be moved from .init.data to .bss section).
Now all __devinitdata data in cy82c693 host driver are read-only so it builds
again (driver's .init.data section gets marked as READONLY).

While at it:

* Move 'primary' variable to its only user, init_iops_cy82c693().

* Bump driver version.

Cc: "Avuton Olrich" <avuton@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 26 Oct 2007 15:43:05 +0000 (08:43 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/davem/net-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
  [NetLabel]: correct usage of RCU locking
  [TCP]: fix D-SACK cwnd handling
  [NET] napi: use non-interruptible sleep in napi_disable
  [SCTP] net/sctp/auth.c: make 3 functions static
  [TCP]: Add missing I/O AT code to ipv6 side.
  [SCTP]: #if 0 sctp_update_copy_cksum()
  [INET]: Unexport icmpmsg_statistics
  [NET]: Unexport sock_enable_timestamp().
  [TCP]: Make tcp_match_skb_to_sack() static.
  [IRDA]: Make ircomm_tty static.
  [NET] fs/proc/proc_net.c: make a struct static
  [NET] dev_change_name: ignore changes to same name
  [NET]: Document some simple rules for actions
  [NET_CLS_ACT]: Use skb_act_clone
  [NET_CLS_ACT]: Introduce skb_act_clone
  [TCP]: Fix scatterlist handling in MD5 signature support.
  [IPSEC]: Fix scatterlist handling in skb_icv_walk().
  [IPSEC]: Add missing sg_init_table() calls to ESP.
  [CRYPTO]: Initialize TCRYPT on-stack scatterlist objects correctly.
  [CRYPTO]: HMAC needs some more scatterlist fixups.
  ...

17 years agoDe-constify sched.h
Alexey Dobriyan [Fri, 26 Oct 2007 08:17:22 +0000 (12:17 +0400)]
De-constify sched.h

[PATCH] De-constify sched.h

This reverts commit a8972ccf00b7184a743eb6cd9bc7f3443357910c ("sched:
constify sched.h")

 1) Patch doesn't change any code here, so gcc is already smart enough
    to "feel" constness in such simple functions.
 2) There is no such thing as const task_struct.  Anyone who think
    otherwise deserves compiler warning.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[NetLabel]: correct usage of RCU locking
Paul Moore [Fri, 26 Oct 2007 11:29:08 +0000 (04:29 -0700)]
[NetLabel]: correct usage of RCU locking

This fixes some awkward, and perhaps even problematic, RCU lock usage in the
NetLabel code as well as some other related trivial cleanups found when
looking through the RCU locking.  Most of the changes involve removing the
redundant RCU read locks wrapping spinlocks in the case of a RCU writer.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: fix D-SACK cwnd handling
Ryousei Takano [Fri, 26 Oct 2007 11:27:59 +0000 (04:27 -0700)]
[TCP]: fix D-SACK cwnd handling

In the current net-2.6 kernel, handling FLAG_DSACKING_ACK is broken.
The flag is cleared to 1 just after FLAG_DSACKING_ACK is set.

        if (found_dup_sack)
                flag |= FLAG_DSACKING_ACK;
:
flag = 1;

To fix it, this patch introduces a part of the tcp_sacktag_state patch:
http://marc.info/?l=linux-netdev&m=119210560431519&w=2

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] napi: use non-interruptible sleep in napi_disable
Benjamin Herrenschmidt [Fri, 26 Oct 2007 11:23:22 +0000 (04:23 -0700)]
[NET] napi: use non-interruptible sleep in napi_disable

The current napi_disable() uses msleep_interruptible() but doesn't
(and can't) exit in case there's a signal, thus ending up doing a
hot spin without a cpu_relax. Use uninterruptible sleep instead.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP] net/sctp/auth.c: make 3 functions static
Adrian Bunk [Fri, 26 Oct 2007 11:21:23 +0000 (04:21 -0700)]
[SCTP] net/sctp/auth.c: make 3 functions static

This patch makes three needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Add missing I/O AT code to ipv6 side.
David S. Miller [Fri, 26 Oct 2007 11:20:13 +0000 (04:20 -0700)]
[TCP]: Add missing I/O AT code to ipv6 side.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: #if 0 sctp_update_copy_cksum()
Adrian Bunk [Fri, 26 Oct 2007 11:07:20 +0000 (04:07 -0700)]
[SCTP]: #if 0 sctp_update_copy_cksum()

sctp_update_copy_cksum() is no longer used.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Unexport icmpmsg_statistics
Adrian Bunk [Fri, 26 Oct 2007 11:06:08 +0000 (04:06 -0700)]
[INET]: Unexport icmpmsg_statistics

This patch removes the unused EXPORT_SYMBOL(icmpmsg_statistics).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Unexport sock_enable_timestamp().
Adrian Bunk [Fri, 26 Oct 2007 10:59:45 +0000 (03:59 -0700)]
[NET]: Unexport sock_enable_timestamp().

sock_enable_timestamp() no longer has any modular users.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Make tcp_match_skb_to_sack() static.
Adrian Bunk [Fri, 26 Oct 2007 10:57:36 +0000 (03:57 -0700)]
[TCP]: Make tcp_match_skb_to_sack() static.

tcp_match_skb_to_sack() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IRDA]: Make ircomm_tty static.
Adrian Bunk [Fri, 26 Oct 2007 10:56:43 +0000 (03:56 -0700)]
[IRDA]: Make ircomm_tty static.

ircomm_tty can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] fs/proc/proc_net.c: make a struct static
Adrian Bunk [Fri, 26 Oct 2007 10:55:44 +0000 (03:55 -0700)]
[NET] fs/proc/proc_net.c: make a struct static

Struct proc_net_ns_ops can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] dev_change_name: ignore changes to same name
Stephen Hemminger [Fri, 26 Oct 2007 10:53:42 +0000 (03:53 -0700)]
[NET] dev_change_name: ignore changes to same name

Prevent error/backtrace from dev_rename() when changing
name of network device to the same name. This is a common
situation with udev and other scripts that bind addr to device.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
David S. Miller [Fri, 26 Oct 2007 10:50:02 +0000 (03:50 -0700)]
Merge /pub/scm/linux/kernel/git/acme/net-2.6

17 years ago[NET]: Document some simple rules for actions
Jamal Hadi Salim [Fri, 26 Oct 2007 09:49:09 +0000 (02:49 -0700)]
[NET]: Document some simple rules for actions

This patch adds documentation on what is expected of an
action which branches away from the action-graph or when it
needs to trample on actins. It also describes what is expected of
users of such actions.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_CLS_ACT]: Use skb_act_clone
Jamal Hadi Salim [Fri, 26 Oct 2007 09:47:54 +0000 (02:47 -0700)]
[NET_CLS_ACT]: Use skb_act_clone

clean skb_clone of any signs of CONFIG_NET_CLS_ACT and
have mirred us skb_act_clone()

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_CLS_ACT]: Introduce skb_act_clone
Jamal Hadi Salim [Fri, 26 Oct 2007 09:47:23 +0000 (02:47 -0700)]
[NET_CLS_ACT]: Introduce skb_act_clone

Reworked skb_clone looks uglier with the single ifdef
CONFIG_NET_CLS_ACT This patch introduces skb_act_clone which will
replace skb_clone in tc actions

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Fix scatterlist handling in MD5 signature support.
David S. Miller [Fri, 26 Oct 2007 07:41:21 +0000 (00:41 -0700)]
[TCP]: Fix scatterlist handling in MD5 signature support.

Use sg_init_table() and sg_mark_end() as needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPSEC]: Fix scatterlist handling in skb_icv_walk().
David S. Miller [Fri, 26 Oct 2007 07:39:27 +0000 (00:39 -0700)]
[IPSEC]: Fix scatterlist handling in skb_icv_walk().

Use sg_init_one() and sg_init_table() as needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPSEC]: Add missing sg_init_table() calls to ESP.
David S. Miller [Fri, 26 Oct 2007 07:38:39 +0000 (00:38 -0700)]
[IPSEC]: Add missing sg_init_table() calls to ESP.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO]: Initialize TCRYPT on-stack scatterlist objects correctly.
David S. Miller [Fri, 26 Oct 2007 07:38:10 +0000 (00:38 -0700)]
[CRYPTO]: Initialize TCRYPT on-stack scatterlist objects correctly.

Use sg_init_one() and sg_init_table() as needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CRYPTO]: HMAC needs some more scatterlist fixups.
David S. Miller [Fri, 26 Oct 2007 07:37:12 +0000 (00:37 -0700)]
[CRYPTO]: HMAC needs some more scatterlist fixups.

hmac_setkey(), hmac_init(), and hmac_final() have
a singular on-stack scatterlist.  Initialit is
using sg_init_one() instead of using sg_set_buf().

Signed-off-by: David S. Miller <davem@davemloft.net>