sfrench/cifs-2.6.git
16 years ago[PATCH] do shrink_submounts() for all fs types
Al Viro [Sat, 22 Mar 2008 04:46:23 +0000 (00:46 -0400)]
[PATCH] do shrink_submounts() for all fs types

... and take it out of ->umount_begin() instances.  Call with all locks
already taken (by do_umount()) and leave calling release_mounts() to
caller (it will do release_mounts() anyway, so we can just put into
the same list).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] sanitize locking in mark_mounts_for_expiry() and shrink_submounts()
Al Viro [Sat, 22 Mar 2008 04:21:53 +0000 (00:21 -0400)]
[PATCH] sanitize locking in mark_mounts_for_expiry() and shrink_submounts()

... and fix a race on access of ->mnt_share et.al. without namespace_sem
in the latter.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] count ghost references to vfsmounts
Al Viro [Sat, 22 Mar 2008 03:59:49 +0000 (23:59 -0400)]
[PATCH] count ghost references to vfsmounts

make propagate_mount_busy() exclude references from the vfsmounts
that had been isolated by umount_tree() and are just waiting for
release_mounts() to dispose of their ->mnt_parent/->mnt_mountpoint.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] reduce stack footprint in namespace.c
Al Viro [Sat, 22 Mar 2008 00:48:19 +0000 (20:48 -0400)]
[PATCH] reduce stack footprint in namespace.c

A lot of places misuse struct nameidata when they need struct path.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agolguest: comment documentation update.
Rusty Russell [Fri, 28 Mar 2008 16:05:53 +0000 (11:05 -0500)]
lguest: comment documentation update.

Took some cycles to re-read the Lguest Journey end-to-end, fix some
rot and tighten some phrases.

Only comments change.  No new jokes, but a couple of recycled old jokes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: Don't need comment terminator before disk section.
Rusty Russell [Fri, 28 Mar 2008 16:05:52 +0000 (11:05 -0500)]
lguest: Don't need comment terminator before disk section.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: lguest.txt documentation fix
Paul Bolle [Tue, 11 Mar 2008 12:36:14 +0000 (13:36 +0100)]
lguest: lguest.txt documentation fix

Mention the config options for the Virtio drivers and move the Virtualization
menu to the toplevel.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: Add puppies which where previously missing.
Tim Ansell [Mon, 11 Feb 2008 07:43:42 +0000 (18:13 +1030)]
lguest: Add puppies which where previously missing.

lguest doesn't have features, it has puppies!

Signed-off-by: Timothy R Ansell <mithro@mithis.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio_pci: unregister virtio device at device remove
Anthony Liguori [Thu, 20 Mar 2008 01:35:04 +0000 (20:35 -0500)]
virtio_pci: unregister virtio device at device remove

Make sure to call unregister_virtio_device() when a virtio device is removed.
Otherwise, virtio_pci.ko cannot be rmmod'd.

This was spotted by Marcelo Tosatti.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 27 Mar 2008 23:12:25 +0000 (16:12 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] update pasemi_defconfig

16 years agox86: prefetch fix #2
Ingo Molnar [Thu, 27 Mar 2008 20:29:09 +0000 (21:29 +0100)]
x86: prefetch fix #2

Linus noticed a second bug and an uncleanliness:

 - we'd return on any instruction fetch fault

 - we'd use both the value of 16 and the PF_INSTR symbol which are
   the same and make no sense

the cleanup nicely unifies this piece of logic.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Thu, 27 Mar 2008 20:20:47 +0000 (13:20 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/x86/linux-2.6-x86

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  xen: fix UP setup of shared_info
  xen: fix RMW when unmasking events
  x86, documentation: nmi_watchdog=2 works on x86_64
  x86: stricter check in follow_huge_addr()
  rdc321x: GPIO routines bugfixes
  x86: ptrace.c: fix defined-but-unused warnings
  x86: fix prefetch workaround

16 years agofirewire: fw-ohci: plug dma memory leak in AR handler
Jarod Wilson [Tue, 25 Mar 2008 20:47:16 +0000 (16:47 -0400)]
firewire: fw-ohci: plug dma memory leak in AR handler

There's an ugly little memory leak in firewire-ohci's
ar_context_tasklet(), where we're not freeing up some of the memory we
use for each ar_buffer, due to a moving pointer. The problem has been
there for a while, but didn't get noticed until after converting the AR
routines over to use coherent DMA and I started running into I/O stall-
outs with the following message output repeatedly to the console:

PCI-DMA: Out of IOMMU space for 53248 bytes at device 0000:04:09.0

Plugging this leak is definitely necessary, but unfortunately, isn't the
entire answer to my problem, it only increases the amount of I/O that I
can do before hitting the problem. Still working on tracking down the
root cause..

Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoMerge branch 'avr32-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemo...
Linus Torvalds [Thu, 27 Mar 2008 16:14:07 +0000 (09:14 -0700)]
Merge branch 'avr32-fixes' of git://git./linux/kernel/git/hskinnemoen/avr32-2.6

* 'avr32-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Fix bug in early resource allocation code
  avr32: Build fix for CONFIG_BUG=n
  avr32: Work around byteswap bug in gcc < 4.2

16 years agoxen: fix UP setup of shared_info
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:53 +0000 (16:36 -0700)]
xen: fix UP setup of shared_info

We need to set up the shared_info pointer once we've mapped the real
shared_info into its fixmap slot.  That needs to happen once the general
pagetable setup has been done.  Previously, the UP shared_info was set
up one in xen_start_kernel, but that was left pointing to the dummy
shared info.  Unfortunately there's no really good place to do a later
setup of the shared_info in UP, so just do it once the pagetable setup
has been done.

[ Stable: needed in 2.6.24.x ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoxen: fix RMW when unmasking events
Jeremy Fitzhardinge [Mon, 17 Mar 2008 23:36:52 +0000 (16:36 -0700)]
xen: fix RMW when unmasking events

xen_irq_enable_direct and xen_sysexit were using "andw $0x00ff,
XEN_vcpu_info_pending(vcpu)" to unmask events and test for pending ones
in one instuction.

Unfortunately, the pending flag must be modified with a locked operation
since it can be set by another CPU, and the unlocked form of this
operation was causing the pending flag to get lost, allowing the processor
to return to usermode with pending events and ultimately deadlock.

The simple fix would be to make it a locked operation, but that's rather
costly and unnecessary.  The fix here is to split the mask-clearing and
pending-testing into two instructions; the interrupt window between
them is of no concern because either way pending or new events will
be processed.

This should fix lingering bugs in using direct vcpu structure access too.

[ Stable: needed in 2.6.24.x ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, documentation: nmi_watchdog=2 works on x86_64
Marcin Slusarz [Sun, 23 Mar 2008 20:06:30 +0000 (21:06 +0100)]
x86, documentation: nmi_watchdog=2 works on x86_64

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: stricter check in follow_huge_addr()
Christoph Lameter [Thu, 27 Mar 2008 04:03:04 +0000 (21:03 -0700)]
x86: stricter check in follow_huge_addr()

The first page of the compound page is determined in follow_huge_addr()
but then PageCompound() only checks if the page is part of a compound page.
PageHead() allows checking if this is indeed the first page of the
compound.

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agordc321x: GPIO routines bugfixes
Florian Fainelli [Wed, 26 Mar 2008 21:39:15 +0000 (22:39 +0100)]
rdc321x: GPIO routines bugfixes

This patch fixes the use of GPIO routines which are in the PCI
configuration space of the RDC321x, therefore reading/writing
to this space without spinlock protection can be problematic.

We also now request and free GPIOs and support the MGB100
board, previous code was very AR525W-centric.

Signed-off-by: Volker Weiss <volker@tintuc.de>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: ptrace.c: fix defined-but-unused warnings
Andrew Morton [Tue, 4 Mar 2008 23:05:39 +0000 (15:05 -0800)]
x86: ptrace.c: fix defined-but-unused warnings

arch/x86/kernel/ptrace.c:548: warning: 'ptrace_bts_get_size' defined but not used
arch/x86/kernel/ptrace.c:558: warning: 'ptrace_bts_read_record' defined but not used
arch/x86/kernel/ptrace.c:607: warning: 'ptrace_bts_clear' defined but not used
arch/x86/kernel/ptrace.c:617: warning: 'ptrace_bts_drain' defined but not used
arch/x86/kernel/ptrace.c:720: warning: 'ptrace_bts_config' defined but not used
arch/x86/kernel/ptrace.c:788: warning: 'ptrace_bts_status' defined but not used

Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix prefetch workaround
Ingo Molnar [Thu, 27 Mar 2008 14:58:28 +0000 (15:58 +0100)]
x86: fix prefetch workaround

some early Athlon XP's and Opterons generate bogus faults on prefetch
instructions. The workaround for this regressed over .24 - reinstate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Thu, 27 Mar 2008 15:03:22 +0000 (08:03 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: drivers/acpi: elide a non-zero test on a result that is never 0
  pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."
  cpuidle: fix 100% C0 statistics regression
  cpuidle: fix cpuidle time and usage overflow
  ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry
  ACPI: fix a regression of ACPI device driver autoloading
  ACPI: SBS: remove typo from sbchc.c

16 years agoGive futex init a proper name
Benjamin Herrenschmidt [Thu, 27 Mar 2008 03:52:15 +0000 (14:52 +1100)]
Give futex init a proper name

The futex init function is called init(). This is a pain in the neck
when debugging when you code dies in ... init :-)

This renames it to futex_init().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoavr32: Fix bug in early resource allocation code
Haavard Skinnemoen [Thu, 27 Mar 2008 14:24:12 +0000 (15:24 +0100)]
avr32: Fix bug in early resource allocation code

add_reserved_region() tries to keep the resource list sorted, so when
looking for a place to insert the new resource, it may break out
before the last entry.

When this happens, the list is broken in two because the sibling field
of the new entry doesn't point to the next resource. Fix it by
updating the new resource's sibling field appropriately.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agohwmon: (w83781d) Fix I/O resource conflict with PNP
Jean Delvare [Sun, 9 Mar 2008 12:34:28 +0000 (13:34 +0100)]
hwmon: (w83781d) Fix I/O resource conflict with PNP

Only request I/O ports 0x295-0x296 instead of the full I/O address
range. This solves a conflict with PNP resources on a few motherboards.

Also request the I/O ports in two parts (4 low ports, 4 high ports)
during device detection, otherwise the PNP resource makes the request
(and thus the detection) fail.

This fixes lm-sensors ticket #2306:
http://www.lm-sensors.org/ticket/2306

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
16 years agoACPI: drivers/acpi: elide a non-zero test on a result that is never 0
Julia Lawall [Thu, 27 Mar 2008 05:48:22 +0000 (01:48 -0400)]
ACPI: drivers/acpi: elide a non-zero test on a result that is never 0

The function thermal_cooling_device_register always returns either a valid
pointer or a value made with ERR_PTR, so a test for non-zero on the result
will always succeed.

The problem was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

//<smpl>
@a@
expression E, E1;
statement S,S1;
position p;
@@

E = thermal_cooling_device_register(...)
... when != E = E1
if@p (E) S else S1

@n@
position a.p;
expression E,E1;
statement S,S1;
@@

E = NULL
... when != E = E1
if@p (E) S else S1

@depends on !n@
expression E;
statement S,S1;
position a.p;
@@

* if@p (E)
  S else S1
//</smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoMerge branches 'release', 'idle', 'redhat-bugzilla-436589', 'sbs' and 'video' into...
Len Brown [Thu, 27 Mar 2008 02:50:09 +0000 (22:50 -0400)]
Merge branches 'release', 'idle', 'redhat-bugzilla-436589', 'sbs' and 'video' into release

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 27 Mar 2008 01:35:50 +0000 (18:35 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (43 commits)
  [IPSEC]: Fix BEET output
  [ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).
  [AX25]: Remove obsolete references to BKL from TODO file.
  [NET]: Fix multicast device ioctl checks
  [IRDA]: Store irnet_socket termios properly.
  [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
  netxen, phy/marvell, skge: minor checkpatch fixes
  S2io: Handle TX completions on the same CPU as the sender for MIS-X interrupts
  b44: Truncate PHY address
  skge napi->poll() locking bug
  rndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM fails
  cxgb3: Fix lockdep problems with sge.reg_lock
  ehea: Fix IPv6 support
  dm9000: Support promisc and all-multi modes
  dm9601: configure MAC to drop invalid (crc/length) packets
  dm9601: add Hirose USB-100 device ID
  Marvell PHY m88e1111 driver fix
  netxen: fix rx dropped stats
  netxen: remove low level tx lock
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 27 Mar 2008 01:35:22 +0000 (18:35 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Define TASK_SIZE_OF()
  [SPARC64]: flush_ptrace_access() needs preemption disable.
  [SPARC64]: Update defconfig.
  [SPARC64]: Fix allnoconfig build, ptrace.c missing CONFIG_COMPAT checks.
  [SPARC64]: Fix __get_cpu_var in preemption-enabled area.
  [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/signal.c
  [SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.c
  [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/time.c
  [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.c
  [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/irq.c
  [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.c
  [SPARC64]: Fix sparse errors in arch/sparc64/kernel/traps.c
  [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/{cpu,setup}.c
  [SPARC64]: Adjust {TLBTEMP,TSBMAP}_BASE.
  [SPARC64]: Make save_stack_trace() more efficient.

16 years ago[SPARC64]: Define TASK_SIZE_OF()
David S. Miller [Thu, 27 Mar 2008 00:32:33 +0000 (17:32 -0700)]
[SPARC64]: Define TASK_SIZE_OF()

This make "cat /proc/${PID}/pagemap" more efficient for
32-bit tasks.

Based upon a report by Mariusz Kozlowski.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Fix BEET output
Herbert Xu [Wed, 26 Mar 2008 23:51:09 +0000 (16:51 -0700)]
[IPSEC]: Fix BEET output

The IPv6 BEET output function is incorrectly including the inner
header in the payload to be protected.  This causes a crash as
the packet doesn't actually have that many bytes for a second
header.

The IPv4 BEET output on the other hand is broken when it comes
to handling an inner IPv6 header since it always assumes an
inner IPv4 header.

This patch fixes both by making sure that neither BEET output
function touches the inner header at all.  All access is now
done through the protocol-independent cb structure.  Two new
attributes are added to make this work, the IP header length
and the IPv4 option length.  They're filled in by the inner
mode's output function.

Thanks to Joakim Koskela for finding this problem.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 26 Mar 2008 23:09:43 +0000 (16:09 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Wed, 26 Mar 2008 22:02:12 +0000 (15:02 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/x86/linux-2.6-x86

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix performance drop for glx
  x86: fix trim mtrr not to setup_memory two times
  x86: GEODE: add missing module.h include
  x86, cpufreq: fix Speedfreq-SMI call that clobbers ECX
  x86: fix memoryless node oops during boot
  x86: add dmi quirk for io_delay
  x86: convert mtrr/generic.c to kernel-doc
  x86: Documentation/i386/IO-APIC.txt: fix description

16 years agohugetlb: fix potential livelock in return_unused_surplus_hugepages()
Nishanth Aravamudan [Wed, 26 Mar 2008 21:40:20 +0000 (14:40 -0700)]
hugetlb: fix potential livelock in return_unused_surplus_hugepages()

Running the counters testcase from libhugetlbfs results in on 2.6.25-rc5
and 2.6.25-rc5-mm1:

    BUG: soft lockup - CPU#3 stuck for 61s! [counters:10531]
    NIP: c0000000000d1f3c LR: c0000000000d1f2c CTR: c0000000001b5088
    REGS: c000005db12cb360 TRAP: 0901   Not tainted  (2.6.25-rc5-autokern1)
    MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 48008448  XER: 20000000
    TASK = c000005dbf3d6000[10531] 'counters' THREAD: c000005db12c8000 CPU: 3
    GPR00: 0000000000000004 c000005db12cb5e0 c000000000879228 0000000000000004
    GPR04: 0000000000000010 0000000000000000 0000000000200200 0000000000100100
    GPR08: c0000000008aba10 000000000000ffff 0000000000000004 0000000000000000
    GPR12: 0000000028000442 c000000000770080
    NIP [c0000000000d1f3c] .return_unused_surplus_pages+0x84/0x18c
    LR [c0000000000d1f2c] .return_unused_surplus_pages+0x74/0x18c
    Call Trace:
    [c000005db12cb5e0] [c000005db12cb670] 0xc000005db12cb670 (unreliable)
    [c000005db12cb670] [c0000000000d24c4] .hugetlb_acct_memory+0x2e0/0x354
    [c000005db12cb740] [c0000000001b5048] .truncate_hugepages+0x1d4/0x214
    [c000005db12cb890] [c0000000001b50a4] .hugetlbfs_delete_inode+0x1c/0x3c
    [c000005db12cb920] [c000000000103fd8] .generic_delete_inode+0xf8/0x1c0
    [c000005db12cb9b0] [c0000000001b5100] .hugetlbfs_drop_inode+0x3c/0x24c
    [c000005db12cba50] [c00000000010287c] .iput+0xdc/0xf8
    [c000005db12cbad0] [c0000000000fee54] .dentry_iput+0x12c/0x194
    [c000005db12cbb60] [c0000000000ff050] .d_kill+0x6c/0xa4
    [c000005db12cbbf0] [c0000000000ffb74] .dput+0x18c/0x1b0
    [c000005db12cbc70] [c0000000000e9e98] .__fput+0x1a4/0x1e8
    [c000005db12cbd10] [c0000000000e61ec] .filp_close+0xb8/0xe0
    [c000005db12cbda0] [c0000000000e62d0] .sys_close+0xbc/0x134
    [c000005db12cbe30] [c00000000000872c] syscall_exit+0x0/0x40
    Instruction dump:
    ebbe8038 38800010 e8bf0002 3bbd0008 7fa3eb78 38a50001 7ca507b4 4818df25
    60000000 38800010 38a00000 7c601b78 <7fa3eb782f800010 409d0008 38000010

This was tracked down to a potential livelock in
return_unused_surplus_hugepages().  In the case where we have surplus
pages on some node, but no free pages on the same node, we may never
break out of the loop. To avoid this livelock, terminate the search if
we iterate a number of times equal to the number of online nodes without
freeing a page.

Thanks to Andy Whitcroft and Adam Litke for helping with debugging and
the patch.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohugetlb: indicate surplus huge page counts in per-node meminfo
Nishanth Aravamudan [Wed, 26 Mar 2008 21:37:53 +0000 (14:37 -0700)]
hugetlb: indicate surplus huge page counts in per-node meminfo

Currently we show the surplus hugetlb pool state in /proc/meminfo, but
not in the per-node meminfo files, even though we track the information
on a per-node basis. Printing it there can help track down dynamic pool
bugs including the one in the follow-on patch.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: fix performance drop for glx
Suresh Siddha [Wed, 26 Mar 2008 00:39:12 +0000 (17:39 -0700)]
x86: fix performance drop for glx

fix the 3D performance drop reported at:

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

fb drivers are using ioremap()/ioremap_nocache(), followed by mtrr_add with
WC attribute. Recent changes in page attribute code made both
ioremap()/ioremap_nocache() mappings as UC (instead of previous UC-). This
breaks the graphics performance, as the effective memory type is UC instead
of expected WC.

The correct way to fix this is to add ioremap_wc() (which uses UC- in the
absence of PAT kernel support and WC with PAT) and change all the
fb drivers to use this new ioremap_wc() API.

We can take this correct and longer route for post 2.6.25. For now,
revert back to the UC- behavior for ioremap/ioremap_nocache.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix trim mtrr not to setup_memory two times
Yinghai Lu [Sun, 23 Mar 2008 07:16:49 +0000 (00:16 -0700)]
x86: fix trim mtrr not to setup_memory two times

we could call find_max_pfn() directly instead of setup_memory() to get
max_pfn needed for mtrr trimming.

otherwise setup_memory() is called two times... that is duplicated...

[ mingo@elte.hu: both Thomas and me simulated a double call to
  setup_bootmem_allocator() and can confirm that it is a real bug
  which can hang in certain configs. It's not been reported yet but
  that is probably due to the relatively scarce nature of
  MTRR-trimming systems. ]

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: GEODE: add missing module.h include
Andres Salomon [Wed, 26 Mar 2008 18:13:01 +0000 (14:13 -0400)]
x86: GEODE: add missing module.h include

On Wed, 26 Mar 2008 11:56:22 -0600
Jordan Crouse <jordan.crouse@amd.com> wrote:

> On 26/03/08 14:31 +0100, Stefan Pfetzing wrote:
> > Hello Jordan,
> >
> > I just tried to build your geodwdt driver for the geode watchdog. Therefore
> > I pulled your repository from http://git.infradead.org/geode.git (or more,
> > the git url).
> >
> > I tried to build the geodewdt driver as a module - which didn't work, and
> > it failed with the same problem as earlier mentioned on lkmk [1]. I also
> > checked the fix [2], but that seems to be already in your (or linus) tree -
> > and so I'm unsure what the problem is.
> >
> > [1] http://kerneltrap.org/mailarchive/linux-kernel/2008/2/17/884074
> > [2] http://kerneltrap.org/mailarchive/linux-kernel/2008/2/17/884174
> >
> > Building directly into the kernel seems to work.
> >
> > Maybe you have some idea?
>
> Hmm - that is strange.  Exporting the symbols should work.  I recommend
> starting over with a clean tree.
>
> CCing Andres - any thoughts?
>
> Jordan
>

Er, yeah.  The patch below should fix it.  This should probably go into
2.6.25.

Oops, EXPORT_SYMBOL_GPL wasn't being declared due to this header
being missing.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, cpufreq: fix Speedfreq-SMI call that clobbers ECX
Stephan Diestelhorst [Mon, 10 Mar 2008 15:05:41 +0000 (16:05 +0100)]
x86, cpufreq: fix Speedfreq-SMI call that clobbers ECX

I have found that using SMI to change the cpu's frequency on my DELL
Latitude L400 clobbers the ECX register in speedstep_set_state, causing
unneccessary retries because the "state" variable has changed silently (GCC
assumes it is still present in ECX).

play safe and avoid gcc caching any register across IO port accesses
that trigger SMIs.

Signed-off by: <Stephan.Diestelhorst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix memoryless node oops during boot
Yinghai Lu [Mon, 25 Feb 2008 07:23:09 +0000 (23:23 -0800)]
x86: fix memoryless node oops during boot

fix oops during boot reported in this thread:

  http://lkml.org/lkml/2008/2/6/65

enable booting on memoryless nodes.

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: add dmi quirk for io_delay
Ingo Molnar [Fri, 21 Mar 2008 09:06:32 +0000 (10:06 +0100)]
x86: add dmi quirk for io_delay

reported by mereandor@gmail.com, in:

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

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: convert mtrr/generic.c to kernel-doc
Randy Dunlap [Thu, 13 Mar 2008 23:59:12 +0000 (16:59 -0700)]
x86: convert mtrr/generic.c to kernel-doc

Convert function comment blocks to kernel-doc notation.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: Documentation/i386/IO-APIC.txt: fix description
Nick Andrew [Tue, 4 Mar 2008 23:05:40 +0000 (15:05 -0800)]
x86: Documentation/i386/IO-APIC.txt: fix description

The description of the interrupt routing doesn't match the (nice) diagram.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agokprobes: MAINTAINERS update
Masami Hiramatsu [Wed, 26 Mar 2008 19:53:19 +0000 (15:53 -0400)]
kprobes: MAINTAINERS update

Add Masami Hiramatsu to kprobes maintainers

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm
Linus Torvalds [Wed, 26 Mar 2008 18:30:17 +0000 (11:30 -0700)]
Merge branch 'slab-linus' of git://git./linux/kernel/git/christoph/vm

* 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm:
  slab: fix cache_cache bootstrap in kmem_cache_init()
  count_partial() is not used if !SLUB_DEBUG and !CONFIG_SLABINFO

16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux...
Linus Torvalds [Wed, 26 Mar 2008 18:29:35 +0000 (11:29 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/tglx/linux-2.6-hrt

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  NOHZ: reevaluate idle sleep length after add_timer_on()
  clocksource: revert: use init_timer_deferrable for clocksource_watchdog

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Wed, 26 Mar 2008 18:27:24 +0000 (11:27 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  relay: set an spd_release() hook for splice
  set relay file can not be read by pread(2)

16 years agoSVCRDMA: Check num_sge when setting LAST_CTXT bit
Tom Tucker [Wed, 26 Mar 2008 02:27:19 +0000 (22:27 -0400)]
SVCRDMA: Check num_sge when setting LAST_CTXT bit

The RDMACTXT_F_LAST_CTXT bit was getting set incorrectly
when the last chunk in the read-list spanned multiple pages. This
resulted in a kernel panic when the wrong context was used to
build the RPC iovec page list.

RDMA_READ is used to fetch RPC data from the client for
NFS_WRITE requests. A scatter-gather is used to map the
advertised client side buffer to the server-side iovec and
associated page list.

WR contexts are used to convey which scatter-gather entries are
handled by each WR. When the write data is large, a single RPC may
require multiple RDMA_READ requests so the contexts for a single RPC
are chained together in a linked list. The last context in this list
is marked with a bit RDMACTXT_F_LAST_CTXT so that when this WR completes,
the CQ handler code can enqueue the RPC for processing.

The code in rdma_read_xdr was setting this bit on the last two
contexts on this list when the last read-list chunk spanned multiple
pages. This caused the svc_rdma_recvfrom logic to incorrectly build
the RPC and caused the kernel to crash because the second-to-last
context doesn't contain the iovec page list.

Modified the condition that sets this bit so that it correctly detects
the last context for the RPC.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Tested-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRevert "PCI: remove transparent bridge sizing"
Linus Torvalds [Wed, 26 Mar 2008 18:22:40 +0000 (11:22 -0700)]
Revert "PCI: remove transparent bridge sizing"

This reverts commit 8fa5913d54f3b1e09948e6a0db34da887e05ff1f, which
caused various interesting problems for people, including wrong resource
allocations.  See for example bugzilla entry "2.6.25-rc2: ohci1394
problem (MMIO broken)" at

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

And Gary Hade says:

 "The same change had also exposed an issue reported by Paul Martin that
  has been causing an Oops while hotplugging ThinkPads to a ThinkPad
  Dock II.  See

http://lkml.org/lkml/2008/2/19/405
http://bugzilla.kernel.org/show_bug.cgi?id=9961

  I have a fix for the ThinkPad docking Oops but if the issue being
  discussed here is caused by the transparent bridge sizing removal
  change I totally agree that it should be reverted."

  The transparent bridge sizing removal change was motivated by
  insufficient PCI memory resource for a transparent bridge window that
  was being created as a result of expansion ROM(s) being included in
  the transparent bridge sizing calculations.

  A later "PCI: Remove default PCI expansion ROM memory allocation"
  change ( re: http://lkml.org/lkml/2007/12/11/361 ) removes the
  expansion ROM(s) from the transparent bridge sizing calculations which
  actually resolves the original issue in a different manner.  So, even
  if the "PCI: remove transparent bridge sizing" is not problematic it
  is no longer needed anyway."

Identified-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Tested-by: Thomas Meyer <thomas@m3y3r.de>
Acked-by: Gary Hade <garyhade@us.ibm.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."
Len Brown [Wed, 26 Mar 2008 17:29:32 +0000 (13:29 -0400)]
pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."

We have been printing these messages at KERN_ERR since 2.6.24,
per http://bugzilla.kernel.org/show_bug.cgi?id=9535

But KERN_ERR pops up on a console booted with "quiet"
and causes users to get alarmed and file bugs
about the message itself:
https://bugzilla.redhat.com/show_bug.cgi?id=436589

So reduce the severity of these messages to
KERN_WARNING, which is not printed by "quiet".

This message will still be seen without "quiet",
but a lot of messages are printed in that mode
and it will be less likely to cause undue alarm.

We could go all the way to KERN_DEBUG, but this
is a real warning after all, so it seems prudent
not to require "debug" to see it.

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoslab: fix cache_cache bootstrap in kmem_cache_init()
Daniel Yeisley [Tue, 25 Mar 2008 21:59:08 +0000 (23:59 +0200)]
slab: fix cache_cache bootstrap in kmem_cache_init()

Commit 556a169dab38b5100df6f4a45b655dddd3db94c1 ("slab: fix bootstrap on
memoryless node") introduced bootstrap-time cache_cache list3s for all nodes
but forgot that initkmem_list3 needs to be accessed by [somevalue + node]. This
patch fixes list_add() corruption in mm/slab.c seen on the ES7000.

Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Olaf Hering <olaf@aepfle.de>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
16 years agocount_partial() is not used if !SLUB_DEBUG and !CONFIG_SLABINFO
Christoph Lameter [Wed, 19 Mar 2008 20:42:07 +0000 (13:42 -0700)]
count_partial() is not used if !SLUB_DEBUG and !CONFIG_SLABINFO

Avoid warnings about unused functions if neither SLUB_DEBUG nor CONFIG_SLABINFO
is defined. This patch will be reversed when slab defrag is merged since slab
defrag requires count_partial() to determine the fragmentation status of
slab caches.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
16 years ago[SPARC64]: flush_ptrace_access() needs preemption disable.
David S. Miller [Wed, 26 Mar 2008 11:51:12 +0000 (04:51 -0700)]
[SPARC64]: flush_ptrace_access() needs preemption disable.

Based upon a report by Mariusz Kozlowski.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Update defconfig.
David S. Miller [Wed, 26 Mar 2008 11:34:04 +0000 (04:34 -0700)]
[SPARC64]: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix allnoconfig build, ptrace.c missing CONFIG_COMPAT checks.
David S. Miller [Wed, 26 Mar 2008 11:31:50 +0000 (04:31 -0700)]
[SPARC64]: Fix allnoconfig build, ptrace.c missing CONFIG_COMPAT checks.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix __get_cpu_var in preemption-enabled area.
David S. Miller [Wed, 26 Mar 2008 11:25:00 +0000 (04:25 -0700)]
[SPARC64]: Fix __get_cpu_var in preemption-enabled area.

Reported by Mariusz Kozlowski.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorelay: set an spd_release() hook for splice
Jens Axboe [Wed, 26 Mar 2008 11:04:09 +0000 (12:04 +0100)]
relay: set an spd_release() hook for splice

relay doesn't reference the pages it adds, however we need a non-NULL
hook or splice_to_pipe() can oops.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoset relay file can not be read by pread(2)
Lai Jiangshan [Wed, 26 Mar 2008 11:01:28 +0000 (12:01 +0100)]
set relay file can not be read by pread(2)

I found that relay files can be read by pread(2). I fix it,
for relay files are not capable of seeking.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agosh: Fix TIF_USEDFPU clearing under FPU emulation.
Paul Mundt [Wed, 26 Mar 2008 10:09:21 +0000 (19:09 +0900)]
sh: Fix TIF_USEDFPU clearing under FPU emulation.

The unlazy_fpu() path calls in to save_fpu() if the task has
TIF_USEDFPU set. save_fpu() being the crap API that it is has the side
effect of clearing the flag itself, which presently doesn't happen
if we're using FPU emulation. Fix this up for now, pending an overhaul
in 2.6.26.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix occasional FPU register corruption under preempt.
Paul Mundt [Wed, 26 Mar 2008 10:02:47 +0000 (19:02 +0900)]
sh: Fix occasional FPU register corruption under preempt.

Presently with preempt enabled there's the possibility to be preempted
after the TIF_USEDFPU test and the register save, leading to bogus
state post-__switch_to(). Use an explicit preempt_disable()/enable()
pair around unlazy_fpu()/clear_fpu() to avoid this. Follows the x86
change.

Reported-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years ago[ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).
Pavel Emelyanov [Wed, 26 Mar 2008 09:27:09 +0000 (02:27 -0700)]
[ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).

Commit 8b7817f3a959ed99d7443afc12f78a7e1fcc2063 ([IPSEC]: Add ICMP host
relookup support) introduced some dst leaks on error paths: the rt
pointer can be forgotten to be put. Fix it bu going to a proper label.

Found after net namespace's lo refused to unregister :) Many thanks to
Den for valuable help during debugging.

Herbert pointed out, that xfrm_lookup() will put the rtable in case
of error itself, so the first goto fix is redundant.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25]: Remove obsolete references to BKL from TODO file.
Robert P. J. Day [Wed, 26 Mar 2008 09:14:38 +0000 (02:14 -0700)]
[AX25]: Remove obsolete references to BKL from TODO file.

Given that there are no apparent calls to lock_kernel() or
unlock_kernel() under net/ax25, delete the TODO reference related to
that.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix multicast device ioctl checks
Patrick McHardy [Wed, 26 Mar 2008 09:12:11 +0000 (02:12 -0700)]
[NET]: Fix multicast device ioctl checks

SIOCADDMULTI/SIOCDELMULTI check whether the driver has a set_multicast_list
method to determine whether it supports multicast. Drivers implementing
secondary unicast support use set_rx_mode however.

Check for both dev->set_multicast_mode and dev->set_rx_mode to determine
multicast capabilities.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/signal.c
David S. Miller [Wed, 26 Mar 2008 08:52:18 +0000 (01:52 -0700)]
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/signal.c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.c
David S. Miller [Wed, 26 Mar 2008 08:43:29 +0000 (01:43 -0700)]
[SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.c

Sparse still doesn't like the funny cast we make from a scalar to a
"union semun" (which is correct by the C language and in particular
works with the sparc64 calling conventions, but sparse doesn't grok
that yet).

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/time.c
David S. Miller [Wed, 26 Mar 2008 08:11:55 +0000 (01:11 -0700)]
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/time.c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IRDA]: Store irnet_socket termios properly.
David S. Miller [Wed, 26 Mar 2008 07:55:50 +0000 (00:55 -0700)]
[IRDA]: Store irnet_socket termios properly.

It should be a "struct ktermios" not a "struct termios".

Based upon a build warning reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.c
David S. Miller [Wed, 26 Mar 2008 07:46:21 +0000 (00:46 -0700)]
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/irq.c
David S. Miller [Wed, 26 Mar 2008 07:37:51 +0000 (00:37 -0700)]
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/irq.c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoNOHZ: reevaluate idle sleep length after add_timer_on()
Thomas Gleixner [Sat, 22 Mar 2008 08:20:24 +0000 (09:20 +0100)]
NOHZ: reevaluate idle sleep length after add_timer_on()

add_timer_on() can add a timer on a CPU which is currently in a long
idle sleep, but the timer wheel is not reevaluated by the nohz code on
that CPU. So a timer can be delayed for quite a long time. This
triggered a false positive in the clocksource watchdog code.

To avoid this we need to wake up the idle CPU and enforce the
reevaluation of the timer wheel for the next timer event.

Add a function, which checks a given CPU for idle state, marks the
idle task with NEED_RESCHED and sends a reschedule IPI to notify the
other CPU of the change in the timer wheel.

Call this function from add_timer_on().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
--
 include/linux/sched.h |    6 ++++++
 kernel/sched.c        |   43 +++++++++++++++++++++++++++++++++++++++++++
 kernel/timer.c        |   10 +++++++++-
 3 files changed, 58 insertions(+), 1 deletion(-)

16 years ago[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.c
David S. Miller [Wed, 26 Mar 2008 05:44:10 +0000 (22:44 -0700)]
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.c

Fix local variable shadowing in dma_4u_map_sg().

Mark sun4u_dma_ops static.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix sparse errors in arch/sparc64/kernel/traps.c
David S. Miller [Wed, 26 Mar 2008 07:19:43 +0000 (00:19 -0700)]
[SPARC64]: Fix sparse errors in arch/sparc64/kernel/traps.c

Add 'UL' markers to DCU_* macros.

Declare C functions called from assembler in entry.h

Declare C functions called from within the sparc64 arch
code in include/asm-sparc64/*.h headers as appropriate.

Remove unused routines in traps.c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
Patrick McHardy [Wed, 26 Mar 2008 07:16:29 +0000 (00:16 -0700)]
[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list

IFF_ALLMULTI is an indication from the network stack to the driver
to disable multicast filters, drivers should never set it directly.

Since the UML networking device doesn't have any filtering capabilites,
it doesn't the set_multicast_list function at all, it is kept so userspace
can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
Patrick McHardy [Wed, 26 Mar 2008 07:15:17 +0000 (00:15 -0700)]
[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device

Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
or dev_change_flags. Setting it directly causes two unwanted effects:

- the next dev_change_flags call will notice a difference between
  dev->gflags and the actual flags, enable promisc/allmulti
  mode and incorrectly update dev->gflags

- this keeps the underlying device in promisc/allmulti mode until
  the VLAN device is deleted

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocpuidle: fix 100% C0 statistics regression
Venki Pallipadi [Fri, 29 Feb 2008 18:24:32 +0000 (10:24 -0800)]
cpuidle: fix 100% C0 statistics regression

commit 9b12e18cdc1553de62d931e73443c806347cd974
'ACPI: cpuidle: Support C1 idle time accounting'
was implicated in a 100% C0 idle regression.
http://bugzilla.kernel.org/show_bug.cgi?id=10076

It pointed out a potential problem where the menu governor
may get confused by the C-state residency time from poll
idle or C1 idle, where this timing info is not accurate.
This inaccuracy is due to interrupts being handled
before we account for C-state exit.

Do not mark TIME_VALID for CO poll state.
Mark C1 time as valid only with the MWAIT (CSTATE_FFH) entry method.

This makes governors use the timing information only when it is correct and
eliminates any wrong policy decisions that may result from invalid timing
information.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years ago[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/{cpu,setup}.c
David S. Miller [Wed, 26 Mar 2008 04:51:40 +0000 (21:51 -0700)]
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/{cpu,setup}.c

We create a local header file entry.h, under arch/sparc64/kernel/,
that we can use to declare routines either defined in assembler
or only invoked from assembler.  As well as other data objects
which are private to the inner sparc64 kernel arch code.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocpuidle: fix cpuidle time and usage overflow
Yi Yang [Mon, 25 Feb 2008 00:46:12 +0000 (08:46 +0800)]
cpuidle: fix cpuidle time and usage overflow

cpuidle C-state sysfs node time and usage are very easy to overflow because
they are all of unsigned int type, time will overflow within about two hours,
usage will take longer time to overflow, but they are increasing for ever.

This patch will convert them to unsigned long long.

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry
Venki Pallipadi [Mon, 24 Mar 2008 21:24:10 +0000 (14:24 -0700)]
ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry

This original patch
http://ussg.iu.edu/hypermail/linux/kernel/0712.2/1451.html
was intending to add acpi_unlazy_tlb() to acpi_idle_enter_bm(),
which is used for C3 entry.

But it was merged incorrectly as commmit

bde6f5f59c2b2b48a7a849c129d5b48838fe77ee
'x86: voluntary leave_mm before entering ACPI C3'

so the call was instead added to acpi_idle_enter_simple()
(which is C2 entry routine), probably due to identical
context in that function.

Move the call back to acpi_idle_enter_bm().

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years ago[SPARC64]: Adjust {TLBTEMP,TSBMAP}_BASE.
David S. Miller [Wed, 26 Mar 2008 04:13:22 +0000 (21:13 -0700)]
[SPARC64]: Adjust {TLBTEMP,TSBMAP}_BASE.

Move them further from the main kernel image area
to facilitate larger kernel sizes.

Adjust comments to match.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetxen, phy/marvell, skge: minor checkpatch fixes
Jeff Garzik [Wed, 26 Mar 2008 03:53:24 +0000 (23:53 -0400)]
netxen, phy/marvell, skge: minor checkpatch fixes

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Handle TX completions on the same CPU as the sender for MIS-X interrupts
Sreenivasa Honnur [Tue, 25 Mar 2008 19:11:56 +0000 (15:11 -0400)]
S2io: Handle TX completions on the same CPU as the sender for MIS-X interrupts

- Handling TX completions on the same cpu as the sender.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agob44: Truncate PHY address
Michael Buesch [Tue, 25 Mar 2008 17:04:46 +0000 (18:04 +0100)]
b44: Truncate PHY address

Some ROMs on embedded devices store incorrect values for
the PHY address of the ethernet device.
It looks like the number is sign-extended.
Truncate the value by applying the PHY-address mask to it.
The patch was tested on a bcm47xx embedded system (where the bug
triggers) and a bcm4400 PCI card.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge napi->poll() locking bug
Marin Mitov [Sun, 23 Mar 2008 08:20:09 +0000 (10:20 +0200)]
skge napi->poll() locking bug

According to: Documentation/networking/netdevices.txt:

<cite>
napi->poll:
..........
Context: softirq
         will be called with interrupts disabled by netconsole.
</cite>

napi->poll() could be called either with interrupts enabled
(in softirq context) or disabled (by netconsole), so the irq flag
should be preserved.

Inspired by Ingo's resent forcedeth patch :-)

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agorndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM fails
Jussi Kivilinna [Sun, 23 Mar 2008 10:45:44 +0000 (12:45 +0200)]
rndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM fails

When query for OID_GEN_PHYSICAL_MEDIUM fails, uninitialized pointer
'phym' is being accessed in generic_rndis_bind(), resulting OOPS.
Patch fixes phym to be initialized and setup correctly when
rndis_query() for physical medium fails.

Bug was introduced by following commit:
commit 039ee17d1baabaa21783a0d5ab3e8c6d8c794bdf
Author: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Date:   Sun Jan 27 23:34:33 2008 +0200

Reported-by: Dmitri Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb3: Fix lockdep problems with sge.reg_lock
Roland Dreier [Thu, 20 Mar 2008 20:30:48 +0000 (13:30 -0700)]
cxgb3: Fix lockdep problems with sge.reg_lock

Using iWARP with a Chelsio T3 NIC generates the following lockdep warning:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.25-rc6 #50
    ---------------------------------
    inconsistent {softirq-on-W} -> {in-softirq-W} usage.
    swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
     (&adap->sge.reg_lock){-+..}, at: [<ffffffff880e5ee2>] cxgb_offload_ctl+0x3af/0x507 [cxgb3]

The problem is that reg_lock is used with plain spin_lock() in
drivers/net/cxgb3/sge.c but is used with spin_lock_irqsave() in
drivers/net/cxgb3/cxgb3_offload.c.  This is technically a false
positive, since the uses in sge.c are only in the initialization and
cleanup paths and cannot overlap with any use in interrupt context.

The best fix is probably just to use spin_lock_irq() with reg_lock in
sge.c.  Even though it's not strictly required for correctness, it
avoids triggering lockdep and the extra overhead of disabling
interrupts is not important at all in the initialization and cleanup
slow paths.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoehea: Fix IPv6 support
Thomas Klein [Wed, 19 Mar 2008 12:55:43 +0000 (13:55 +0100)]
ehea: Fix IPv6 support

Indicate that HEA calculates IPv4 checksums only

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9000: Support promisc and all-multi modes
Peter Korsgaard [Tue, 18 Mar 2008 22:17:16 +0000 (23:17 +0100)]
dm9000: Support promisc and all-multi modes

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9601: configure MAC to drop invalid (crc/length) packets
Peter Korsgaard [Tue, 18 Mar 2008 22:16:54 +0000 (23:16 +0100)]
dm9601: configure MAC to drop invalid (crc/length) packets

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9601: add Hirose USB-100 device ID
Peter Korsgaard [Tue, 18 Mar 2008 22:16:53 +0000 (23:16 +0100)]
dm9601: add Hirose USB-100 device ID

The Hirose USB-100 adapter uses a dm9601 chip.
Reported by Robert Brockway.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMarvell PHY m88e1111 driver fix
Alexandr Smirnov [Tue, 18 Mar 2008 21:37:24 +0000 (00:37 +0300)]
Marvell PHY m88e1111 driver fix

Marvell PHY m88e1111 (not sure about other models, but think they too)
works in two modes: fiber and copper. In Marvell PHY driver (that we
have in current community kernels) code supported only copper mode,
and this is not configurable, bits for copper mode are simply written
in registers during PHY initialization.

This patch adds support for both modes.

Signed-off-by: Alexandr Smirnov <asmirnov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: fix rx dropped stats
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:51 +0000 (19:59 -0700)]
netxen: fix rx dropped stats

Don't count rx dropped packets based on return value of netif_receive_skb(),
which is misleading.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: remove low level tx lock
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:50 +0000 (19:59 -0700)]
netxen: remove low level tx lock

o eliminate tx lock in netxen adapter struct, instead pound on netdev
  tx lock appropriately.
o remove old "concurrent transmit" code that unnecessarily drops and
  reacquires tx lock in hard_xmit_frame(), this is already serialized
  the netdev xmit lock.
o reduce scope of tx lock in tx cleanup. tx cleanup operates on
  different section of the ring than transmitting cpus and is
  guarded by producer and consumer indices. This fixes a race
  caused by rx softirq preemption on realtime kernels.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: napi and irq cleanup
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:49 +0000 (19:59 -0700)]
netxen: napi and irq cleanup

o separate and simpler irq handler for msi interrupts, avoids few checks
  than legacy mode.
o avoid redudant tx_has_work() and rx_has_work() checks in interrupt
  and napi, which can uncork irq based on racy (lockless) access to tx
  and rx ring indices. If we get interrupt, there's sufficient reason to
  schedule napi.
o replenish rx ring more often, remove self-imposed threshold rcv_free
  that prevents posting rx desc to card. This improves performance in
  low memory.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: improve msi support
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:48 +0000 (19:59 -0700)]
netxen: improve msi support

Recent netxen firmware has new scheme of generating MSI interrupts, it
raises interrupt and blocks itself, waiting for driver to unmask. This
reduces chance of spurious interrupts.

The driver will be able to deal with older firmware as well.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosmc91x: fix build breakage from the SMC_GET_MAC_ADDR API upgrade
Bryan Wu [Mon, 17 Mar 2008 21:18:31 +0000 (14:18 -0700)]
smc91x: fix build breakage from the SMC_GET_MAC_ADDR API upgrade

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Deepak Saxena <dsaxena@plexity.net>
Cc: Nicolas Pitre <nico@cam.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: remove unused variable
Julia Lawall [Mon, 17 Mar 2008 17:12:27 +0000 (10:12 -0700)]
ixgb: remove unused variable

The variable num_group_tail_writes is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe100: endianness annotations
Al Viro [Sun, 16 Mar 2008 22:21:44 +0000 (22:21 +0000)]
e100: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoigb trivial annotations
Al Viro [Sun, 16 Mar 2008 22:23:24 +0000 (22:23 +0000)]
igb trivial annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoigb: endianness fix
Al Viro [Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)]
igb: endianness fix

le16_to_cpu() should be done before mask and shift...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agobonding: update version
Jay Vosburgh [Sat, 22 Mar 2008 05:29:36 +0000 (22:29 -0700)]
bonding: update version

Update version to 3.2.5.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>