GitHub/LineageOS/android_kernel_samsung_universal7580.git
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 agoLinux 2.6.25-rc7
Linus Torvalds [Wed, 26 Mar 2008 01:38:14 +0000 (18:38 -0700)]
Linux 2.6.25-rc7

16 years agoACPI: fix Medion _PRT quirk (use "ISA_", not "ISA")
Bjorn Helgaas [Tue, 25 Mar 2008 17:21:11 +0000 (11:21 -0600)]
ACPI: fix Medion _PRT quirk (use "ISA_", not "ISA")

This fixes the builtin RTL8139 NIC on the Medion MD9580-F laptop.  The
BIOS reports the interrupt routing incorrectly.  I recently added a
quirk to work around this, and this patch fixes a typo in the quirk.

We pad every ACPI pathname component to four characters, so ".ISA." will
never match anything.  We need ".ISA_." instead.

Thank you Johann-Nikolaus Andreae <johann-nikolaus.andreae@nacs.de>
for patiently testing this patch.

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

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Tue, 25 Mar 2008 16:06:44 +0000 (09:06 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Fix docbook problem
  ASoC/TLV320AIC3X: Stop I2C driver ID abuse
  i2c-omap: Fix unhandled fault
  i2c-bfin-twi: Disable BF54x support for now

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
Linus Torvalds [Tue, 25 Mar 2008 16:06:19 +0000 (09:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/avi/kvm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: MMU: Fix memory leak on guest demand faults
  KVM: VMX: convert init_rmode_tss() to slots_lock
  KVM: MMU: handle page removal with shadow mapping
  KVM: MMU: Fix is_rmap_pte() with io ptes
  KVM: VMX: Restore tss even on x86_64

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Tue, 25 Mar 2008 15:57:47 +0000 (08:57 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] get stack footprint of pathname resolution back to relative sanity
  [PATCH] double iput() on failure exit in hugetlb
  [PATCH] double dput() on failure exit in tiny-shmem
  [PATCH] fix up new filp allocators
  [PATCH] check for null vfsmount in dentry_open()
  [PATCH] reiserfs: eliminate private use of struct file in xattr
  [PATCH] sanitize hppfs
  hppfs pass vfsmount to dentry_open()
  [PATCH] restore export of do_kern_mount()

16 years agoKVM: MMU: Fix memory leak on guest demand faults
Avi Kivity [Sun, 23 Mar 2008 12:21:08 +0000 (14:21 +0200)]
KVM: MMU: Fix memory leak on guest demand faults

While backporting 72dc67a69690288538142df73a7e3ac66fea68dc, a gfn_to_page()
call was duplicated instead of moved (due to an unrelated patch not being
present in mainline).  This caused a page reference leak, resulting in a
fairly massive memory leak.

Fix by removing the extraneous gfn_to_page() call.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: convert init_rmode_tss() to slots_lock
Marcelo Tosatti [Tue, 18 Mar 2008 20:42:34 +0000 (17:42 -0300)]
KVM: VMX: convert init_rmode_tss() to slots_lock

init_rmode_tss was forgotten during the conversion from mmap_sem to
slots_lock.

INFO: task qemu-system-x86:3748 blocked for more than 120 seconds.
Call Trace:
 [<ffffffff8053d100>] __down_read+0x86/0x9e
 [<ffffffff8053fb43>] do_page_fault+0x346/0x78e
 [<ffffffff8053d235>] trace_hardirqs_on_thunk+0x35/0x3a
 [<ffffffff8053dcad>] error_exit+0x0/0xa9
 [<ffffffff8035a7a7>] copy_user_generic_string+0x17/0x40
 [<ffffffff88099a8a>] :kvm:kvm_write_guest_page+0x3e/0x5f
 [<ffffffff880b661a>] :kvm_intel:init_rmode_tss+0xa7/0xf9
 [<ffffffff880b7d7e>] :kvm_intel:vmx_vcpu_reset+0x10/0x38a
 [<ffffffff8809b9a5>] :kvm:kvm_arch_vcpu_setup+0x20/0x53
 [<ffffffff8809a1e4>] :kvm:kvm_vm_ioctl+0xad/0x1cf
 [<ffffffff80249dea>] __lock_acquire+0x4f7/0xc28
 [<ffffffff8028fad9>] vfs_ioctl+0x21/0x6b
 [<ffffffff8028fd75>] do_vfs_ioctl+0x252/0x26b
 [<ffffffff8028fdca>] sys_ioctl+0x3c/0x5e
 [<ffffffff8020b01b>] system_call_after_swapgs+0x7b/0x80

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: handle page removal with shadow mapping
Marcelo Tosatti [Mon, 17 Mar 2008 13:08:18 +0000 (10:08 -0300)]
KVM: MMU: handle page removal with shadow mapping

Do not assume that a shadow mapping will always point to the same host
frame number.  Fixes crash with madvise(MADV_DONTNEED).

[avi: move after first printk(), add another printk()]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Fix is_rmap_pte() with io ptes
Avi Kivity [Sun, 23 Mar 2008 10:18:19 +0000 (12:18 +0200)]
KVM: MMU: Fix is_rmap_pte() with io ptes

is_rmap_pte() doesn't take into account io ptes, which have the avail bit set.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: Restore tss even on x86_64
Avi Kivity [Sun, 16 Mar 2008 16:48:26 +0000 (18:48 +0200)]
KVM: VMX: Restore tss even on x86_64

The vmx hardware state restore restores the tss selector and base address, but
not its length.  Usually, this does not matter since most of the tss contents
is within the default length of 0x67.  However, if a process is using ioperm()
to grant itself I/O port permissions, an additional bitmap within the tss,
but outside the default length is consulted.  The effect is that the process
will receive a SIGSEGV instead of transparently accessing the port.

Fix by restoring the tss length.  Note that i386 had this working already.

Closes bugzilla 10246.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Tue, 25 Mar 2008 06:24:16 +0000 (23:24 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: Fix cut-and-paste error in rtl8150.c
  USB: ehci: stop vt6212 bus hogging
  USB: sierra: add another device id
  USB: sierra: dma fixes
  USB: add support for Motorola ROKR Z6 cellphone in mass storage mode
  USB: isd200: fix memory leak in isd200_get_inquiry_data
  USB: pl2303: another product ID
  USB: new quirk flag to avoid Set-Interface
  USB: fix gadgetfs class request delegation

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Tue, 25 Mar 2008 06:23:39 +0000 (23:23 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  driver core: debug for bad dev_attr_show() return value.
  UIO: add pgprot_noncached() to UIO mmap code

16 years agoPCI: revert "pcie: utilize pcie transaction pending bit"
Andrew Morton [Mon, 17 Mar 2008 21:21:18 +0000 (14:21 -0700)]
PCI: revert "pcie: utilize pcie transaction pending bit"

Revert as it is reported to cause problems for people.

commit 4348a2dc49f9baecd34a9b0904245488c6189398
Author: Shaohua Li <shaohua.li@intel.com>
Date:   Wed Oct 24 10:45:08 2007 +0800

    pcie: utilize pcie transaction pending bit

    PCIE has a mechanism to wait for Non-Posted request to complete. I think
    pci_disable_device is a good place to do this.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Due to the regression reported at
http://bugzilla.kernel.org/show_bug.cgi?id=10065

Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Soeren Sonnenburg <kernel@nn7.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: iova: lockdep false alarm fix
Mark Gross [Tue, 4 Mar 2008 22:59:31 +0000 (14:59 -0800)]
PCI: iova: lockdep false alarm fix

lockdep goes off on the iova copy_reserved_iova() because it and a function
it calls grabs locks in the from, and the to of the copy operation.

The function grab locks of the same lock classes triggering the warning.  The
first lock grabbed is for the constant reserved areas that is never accessed
after early boot.  Technically you could do without grabbing the locks for the
"from" structure its copying reserved areas from.

But dropping the from locks to me looks wrong, even though it would be ok.

The affected code only runs in early boot as its setting up the DMAR
engines.

This patch gives the reserved_ioval_list locks special lockdep classes.

Signed-off-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: debug for bad dev_attr_show() return value.
Andrew Morton [Tue, 4 Mar 2008 23:09:07 +0000 (15:09 -0800)]
driver core: debug for bad dev_attr_show() return value.

Try to find the culprit who caused
http://bugzilla.kernel.org/show_bug.cgi?id=10150

Cc: <balajirrao@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUIO: add pgprot_noncached() to UIO mmap code
Jean-Samuel Chenard [Fri, 14 Mar 2008 10:28:36 +0000 (11:28 +0100)]
UIO: add pgprot_noncached() to UIO mmap code

Mapping of physical memory in UIO needs pgprot_noncached() to ensure
that IO memory is not cached. Without pgprot_noncached(), it (accidentally)
works on x86 and arm, but fails on PPC.

Signed-off-by: Jean-Samuel Chenard <jsamch@gmail.com>
Signed-off-by: Hans J Koch <hjk@linutronix.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix cut-and-paste error in rtl8150.c
Robert P. J. Day [Mon, 10 Mar 2008 00:44:52 +0000 (20:44 -0400)]
USB: Fix cut-and-paste error in rtl8150.c

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ehci: stop vt6212 bus hogging
Rene Herman [Thu, 20 Mar 2008 07:58:16 +0000 (00:58 -0700)]
USB: ehci: stop vt6212 bus hogging

The VIA VT6212 defaults to only waiting 1us between passes over EHCI's
async ring, which hammers PCI badly ... and by preventing other devices
from accessing the bus, causes problems like drops in IDE throughput,
a problem that's been bugging users of those chips for several years.

A (partial) datasheet for this chip eventually turned up, letting us
see how to make it use a VIA-specific register to switch over to the
the normal 10us value instead, as suggested by the EHCI specification
Solution noted by Lev A. Melnikovsky.

It's not clear whether this register exists on other VIA chips; we
know that it's ineffective on the vt8235.  So this patch only applies
to chips that seem to be incarnations of the (discrete) vt6212.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Tested-by: Lev A. Melnikovsky <melnikovsky@mail.ru>
Tested-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sierra: add another device id
Kevin Lloyd [Fri, 14 Mar 2008 07:53:24 +0000 (00:53 -0700)]
USB: sierra: add another device id

Add support for the MC8775 device to the sierra driver.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sierra: dma fixes
Oliver Neukum [Fri, 14 Mar 2008 07:53:24 +0000 (00:53 -0700)]
USB: sierra: dma fixes

while I was adding autosuspend to that driver I noticed a few issues.
You were having DMAed buffers as a part of a structure.
This will fail on platforms that are not DMA-coherent (arm, sparc, ppc, ...)
Please test this patch to fix it.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add support for Motorola ROKR Z6 cellphone in mass storage mode
Constantin Baranov [Sun, 16 Mar 2008 20:04:23 +0000 (20:04 +0000)]
USB: add support for Motorola ROKR Z6 cellphone in mass storage mode

Motorola ROKR Z6 cellphone has bugs in its USB, so it is impossible to use
it as mass storage. Patch describes new "unusual" USB device for it with
FIX_INQUIRY and FIX_CAPACITY flags and new BULK_IGNORE_TAG flag.
Last flag relaxes check for equality of bcs->Tag and us->tag in
usb_stor_Bulk_transport routine.

Signed-off-by: Constantin Baranov <const@tltsu.ru>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: isd200: fix memory leak in isd200_get_inquiry_data
Boaz Harrosh [Mon, 17 Mar 2008 21:21:01 +0000 (14:21 -0700)]
USB: isd200: fix memory leak in isd200_get_inquiry_data

If the inquiry fails then the info structure on us->extra was not freed.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: pl2303: another product ID
Max Arnold [Thu, 20 Mar 2008 09:43:56 +0000 (16:43 +0700)]
USB: pl2303: another product ID

Device like this http://aldiga.com/english/A-100-USB-EDGE10.htm
contains Prolific 2303 chip.
Actually their site a bit outdated - I have AlDiga AL-11U
GSM/GPRS/EDGE modem and it works with pl2303 module after adding
corresponding product ID.

By default modem uses baud rate 460800.  GSM chipset - SIMCom SIM600,
quad band 850/900/1800/1900 MHz

Device info:

T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=067b ProdID=0611 Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=pl2303
E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

From: Max Arnold <lwarxx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: new quirk flag to avoid Set-Interface
Alan Stern [Tue, 11 Mar 2008 14:20:12 +0000 (10:20 -0400)]
USB: new quirk flag to avoid Set-Interface

This patch (as1057) fixes a problem with the X-Rite/Gretag-Macbeth
Eye-One Pro display colorimeter; the device crashes when it receives a
Set-Interface request.  A new quirk (USB_QUIRK_NO_SET_INTF) is
introduced and a quirks entry is created for this device.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix gadgetfs class request delegation
Roy Hashimoto [Wed, 12 Mar 2008 21:55:31 +0000 (13:55 -0800)]
USB: fix gadgetfs class request delegation

gadgetfs (drivers/usb/gadget/inode.c) was not delegating all
non-device requests to userspace.  This patch makes the handling of
all request cases consistent.

Signed-off-by: Roy Hashimoto <hashimot@alumni.caltech.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 25 Mar 2008 03:35:48 +0000 (20:35 -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] mpc5200: Fix incorrect compatible string for the mdio node
  [POWERPC] Update some defconfigs

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 25 Mar 2008 03:02:32 +0000 (20:02 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] ahci: SB600 workaround is suspect... play it safe for now
  sata_promise: fix hardreset hotplug events, take 2
  libata: improve HPA error handling
  libata: assume no device is attached if both IDENTIFYs are aborted
  pata_it821x: use raw nbytes in check_atapi_dma
  libata: implement ata_qc_raw_nbytes()

16 years ago[libata] ahci: SB600 workaround is suspect... play it safe for now
Jeff Garzik [Tue, 25 Mar 2008 02:40:40 +0000 (22:40 -0400)]
[libata] ahci: SB600 workaround is suspect... play it safe for now

At least one report claims that a878539ef994787c447a98c2e3ba0fe3dad984ec
failed to solve lockups, whereas the old limit-to-32-bit trick worked.

Restore the 32-bit limit, but also leave the 255-sector limit in place,
because we know that's needed as well.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus
Linus Torvalds [Tue, 25 Mar 2008 02:32:38 +0000 (19:32 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus:
  kbuild: soften modpost checks when doing cross builds

16 years agoMerge branch 'linux-2.6' into merge
Paul Mackerras [Tue, 25 Mar 2008 02:31:46 +0000 (13:31 +1100)]
Merge branch 'linux-2.6' into merge

16 years agosata_promise: fix hardreset hotplug events, take 2
Mikael Pettersson [Sun, 23 Mar 2008 17:41:01 +0000 (18:41 +0100)]
sata_promise: fix hardreset hotplug events, take 2

A Promise SATA controller will signal hotplug events when a hard
reset (COMRESET) is done on a port. These events aren't masked by
the driver, and the unexpected interrupts will cause a sequence
of failed reset attempts util libata's EH finally gives up.

This has not been a common problem so far, but the pending libata
hardreset-by-default changes makes it a critical issue.

The solution is to disable hotplug events before a reset, and to
reenable them afterwards. (Promise's driver does this too.)

This patch adds SATA-specific versions of ->freeze() and ->thaw()
that also disable and enable hotplug events. PATA ports continue
to use the old versions of ->freeze() and ->thaw().

Accesses to the hotplug register must be serialised via host->lock.
We rely on ap->lock == &ap->host->lock and that libata takes this
lock before ->freeze() and ->thaw(). Document this requirement.
The interrupt handler is adjusted so its hotplug register accesses
are inside the region protected by host->lock.

Tested on various chips (SATA300TX4, SATA300TX2plus, SATAII150TX4,
FastTrack TX4000) with various combinations of SATA and PATA disks,
with and without the pending hardreset-by-default changes.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMake printk() console semaphore accesses sensible
Linus Torvalds [Tue, 25 Mar 2008 02:25:08 +0000 (19:25 -0700)]
Make printk() console semaphore accesses sensible

The printk() logic on when/how to get the console semaphore was
unreadable, this splits the code up into a few helper functions and
makes it easier to follow what is going on.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobsd_acct: using task_struct->tgid is not right in pid-namespaces
Pavel Emelyanov [Mon, 24 Mar 2008 19:29:53 +0000 (12:29 -0700)]
bsd_acct: using task_struct->tgid is not right in pid-namespaces

In case we're accounting from a sub-namespace, the tgids reported will not
refer to the right namespace.

Save the pid_namespace we're accounting in on the acct_glbs and use it in
do_acct_process.

Two less :) places using the task_struct.tgid member.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobsd_acct: plain current->real_parent access is not always safe
Pavel Emelyanov [Mon, 24 Mar 2008 19:29:52 +0000 (12:29 -0700)]
bsd_acct: plain current->real_parent access is not always safe

This is minor, but dereferencing even current real_parent is not safe on debug
kernels, since the memory, this points to, can be unmapped - RCU protection is
required.

Besides, the tgid field is deprecated and is to be replaced with task_tgid_xxx
call (the 2nd patch), so RCU will be required anyway.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorevert "kswapd should only wait on IO if there is IO"
Andrew Morton [Mon, 24 Mar 2008 19:29:52 +0000 (12:29 -0700)]
revert "kswapd should only wait on IO if there is IO"

Revert commit f1a9ee758de7de1e040de849fdef46e6802ea117:

  Author: Rik van Riel <riel@redhat.com>
  Date:   Thu Feb 7 00:14:08 2008 -0800

    kswapd should only wait on IO if there is IO

    The current kswapd (and try_to_free_pages) code has an oddity where the
    code will wait on IO, even if there is no IO in flight.  This problem is
    notable especially when the system scans through many unfreeable pages,
    causing unnecessary stalls in the VM.

    Additionally, tasks without __GFP_FS or __GFP_IO in the direct reclaim path
    will sleep if a significant number of pages are encountered that should be
    written out.  This gives kswapd a chance to write out those pages, while
    the direct reclaim task sleeps.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Because of large latencies and interactivity problems reported by Carlos,
here: http://lkml.org/lkml/2008/3/22/211

Cc: Rik van Riel <riel@redhat.com>
Cc: "Carlos R. Mafra" <crmafra2@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohw_random doc updates
David Brownell [Mon, 24 Mar 2008 19:29:51 +0000 (12:29 -0700)]
hw_random doc updates

Update documentation for the hw_random support to be current:

 - Documentation/hw_random.txt has been updated to reflect the
   current code:  it's a framework now, a "core" with a small
   sysfs interface, that hardware-specific drivers plug in to.
   Text specific to Intel hardware is now at the end.

 - Kconfig now references the Documentation/hw_random.txt file
   and better explains what this really does.

Both chunks of documentation now higlight the fact that the kernel entropy
pool is maintained by "rngd", and this driver has nothing directly to do with
that important task.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmackfs: remove redundant lock, fix open(,O_RDWR)
Ahmed S. Darwish [Mon, 24 Mar 2008 19:29:49 +0000 (12:29 -0700)]
smackfs: remove redundant lock, fix open(,O_RDWR)

Older smackfs was parsing MAC rules by characters, thus a need of locking
write sessions on open() was needed.  This lock is no longer useful now since
each rule is handled by a single write() call.

This is also a bugfix since seq_open() was not called if an open() O_RDWR flag
was given, leading to a seq_read() without an initialized seq_file, thus an
Oops.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Reported-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomarkers: remove ACCESS_ONCE
Mathieu Desnoyers [Mon, 24 Mar 2008 19:29:49 +0000 (12:29 -0700)]
markers: remove ACCESS_ONCE

As Paul pointed out, the ACCESS_ONCE are not needed because we already have
the explicit surrounding memory barriers.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Mike Mason <mmlnx@us.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: David Smith <dsmith@redhat.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomarkers: update preempt_disable. call_rcu, rcu_barrier comments
Mathieu Desnoyers [Mon, 24 Mar 2008 19:29:47 +0000 (12:29 -0700)]
markers: update preempt_disable. call_rcu, rcu_barrier comments

Add comments requested by Andrew.

Updated comments about synchronize_sched().  Since we use call_rcu and
rcu_barrier now, these comments were out of sync with the code.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Mike Mason <mmlnx@us.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: David Smith <dsmith@redhat.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm: fix boundary checking in free_bootmem_core
Yinghai Lu [Mon, 24 Mar 2008 19:29:45 +0000 (12:29 -0700)]
mm: fix boundary checking in free_bootmem_core

With numa enabled, some callers could have a range of memory on one node
but try to free that on other node.  This can cause some pages to be
freed wrongly.

For example: when we try to allocate 128g boot ram early for
gart/swiotlb, and free that range later so gart/swiotlb can get some
range afterwards.

With this patch, we don't need to care which node holds the range, just
loop to call free_bootmem_node for all online nodes.

This patch makes free_bootmem_core() more robust by trimming the sidx
and eidx according the ram range that the node has.

And make the free_bootmem_core handle this out of range case.  We could
use bdata_list to make sure the range can be freed for sure.  So next
time, we don't need to loop online nodes and could use free_bootmem
directly.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomtd: memory corruption in block2mtd.c
Ingo van Lil [Mon, 24 Mar 2008 19:29:44 +0000 (12:29 -0700)]
mtd: memory corruption in block2mtd.c

The block2mtd driver (drivers/mtd/devices/block2mtd.c) will kfree an on-stack
pointer when handling an invalid argument line (e.g.
block2mtd=/dev/loop0,xxx).

The kfree was added some time ago when "name" was dynamically allocated.

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Acked-by: Joern Engel <joern@lazybastard.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: <stable@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel-parameters.txt: document memmap option better
Pavel Machek [Mon, 24 Mar 2008 19:29:43 +0000 (12:29 -0700)]
kernel-parameters.txt: document memmap option better

Provide example for memmap exclude option (it is slightly strange and
non-trivial) and provide nice small HOWTO for people with bad memory.

Signed-off-by: Jan-Simon Moeller <dl9pf@gmx.de>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[POWERPC] mpc5200: Fix incorrect compatible string for the mdio node
Grant Likely [Sat, 22 Mar 2008 03:25:15 +0000 (14:25 +1100)]
[POWERPC] mpc5200: Fix incorrect compatible string for the mdio node

The MDIO node in the lite5200b.dts file needs to also claim compatibility
with the older mpc5200 chip.  Otherwise the driver won't find the device.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agolibata: improve HPA error handling
Tejun Heo [Sun, 23 Mar 2008 12:05:15 +0000 (21:05 +0900)]
libata: improve HPA error handling

There's no point in retrying and eventually failing device detection
when the device rejects READ_NATIVE_MAX[_EXT].  Disable HPA unlocking
if READ_NATIVE_MAX[_EXT] is rejected as done when SET_MAX[_EXT] is
rejected.

This allows some old drives to work even if they aren't blacklisted.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: assume no device is attached if both IDENTIFYs are aborted
Tejun Heo [Sun, 23 Mar 2008 06:16:53 +0000 (15:16 +0900)]
libata: assume no device is attached if both IDENTIFYs are aborted

This is to fix bugzilla #10254.  QSI cdrom attached to pata_sis as
secondary master appears as phantom device for the slave.
Interestingly, instead of not setting DRQ after IDENTIFY which
triggers NODEV_HINT, it aborts both IDENTIFY and IDENTIFY PACKET which
makes EH retry.

Modify EH such that it assumes no device is attached if both flavors
of IDENTIFY are aborted by the device.  There really isn't much point
in retrying when the device actively aborts the commands.

While at it, convert NODEV detection message to ata_dev_printk() to
help debugging obscure detection problems.

This problem was reported by Jan Bücken.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jan Bücken <jb.faq@gmx.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_it821x: use raw nbytes in check_atapi_dma
Tejun Heo [Tue, 18 Mar 2008 08:56:12 +0000 (17:56 +0900)]
pata_it821x: use raw nbytes in check_atapi_dma

pata_it821x needs to look at raw request size in check_atapi_dma().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: implement ata_qc_raw_nbytes()
Tejun Heo [Tue, 18 Mar 2008 08:47:43 +0000 (17:47 +0900)]
libata: implement ata_qc_raw_nbytes()

Implement ata_qc_raw_nbytes() which determines the raw user-requested
size of a PC command.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 24 Mar 2008 20:09:34 +0000 (13:09 -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] Fix Oops with TQM5200 on TQM5200
  [POWERPC] mpc5200: Fix null dereference if bestcomm fails to initialize
  [POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driver
  [POWERPC] Fix crash in init_ipic_sysfs on efika
  [POWERPC] Don't use 64k pages for ioremap on pSeries

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 24 Mar 2008 20:08:01 +0000 (13:08 -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]: exec PT_DTRACE
  [SPARC64]: Use shorter list_splice_init() for brevity.
  [SPARC64]: Remove most limitations to kernel image size.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 24 Mar 2008 20:07:24 +0000 (13:07 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  sch_htb: fix "too many events" situation
  connector: convert to single-threaded workqueue
  [ATM]: When proc_create() fails, do some error handling work and return -ENOMEM.
  [SUNGEM]: Fix NAPI assertion failure.
  BNX2X: prevent ethtool from setting port type
  [9P] net/9p/trans_fd.c: remove unused variable
  [IPV6] net/ipv6/ndisc.c: remove unused variable
  [IPV4] fib_trie: fix warning from rcu_assign_poinger
  [TCP]: Let skbs grow over a page on fast peers
  [DLCI]: Fix tiny race between module unload and sock_ioctl.
  [SCTP]: Fix build warnings with IPV6 disabled.
  [IPV4]: Fix null dereference in ip_defrag

16 years agoSVCRDMA: Use only 1 RDMA read scatter entry for iWARP adapters
Roland Dreier [Mon, 24 Mar 2008 16:03:03 +0000 (12:03 -0400)]
SVCRDMA: Use only 1 RDMA read scatter entry for iWARP adapters

The iWARP protocol limits RDMA read requests to a single scatter
entry.  NFS/RDMA has code in rdma_read_max_sge() that is supposed to
limit the sge_count for RDMA read requests to 1, but the code to do
that is inside an #ifdef RDMA_TRANSPORT_IWARP block.  In the mainline
kernel at least, RDMA_TRANSPORT_IWARP is an enum and not a
preprocessor #define, so the #ifdef'ed code is never compiled.

In my test of a kernel build with -j8 on an NFS/RDMA mount, this
problem eventually leads to trouble starting with:

    svcrdma: Error posting send = -22
    svcrdma : RDMA_READ error = -22

and things go downhill from there.

The trivial fix is to delete the #ifdef guard.  The check seems to be
a remnant of when the NFS/RDMA code was not merged and needed to
compile against multiple kernel versions, although I don't think it
ever worked as intended.  In any case now that the code is upstream
there's no need to test whether the RDMA_TRANSPORT_IWARP constant is
defined or not.

Without this patch, my kernel build on an NFS/RDMA mount using NetEffect
adapters quickly and 100% reproducibly failed with an error like:

    ld: final link failed: Software caused connection abort

With the patch applied I was able to complete a kernel build on the
same setup.

(Tom Tucker says this is "actually an _ancient_ remnant when it had to
compile against iWARP vs. non-iWARP enabled OFA trees.")

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86-32: Pass the full resource data to ioremap()
Linus Torvalds [Mon, 24 Mar 2008 18:22:39 +0000 (11:22 -0700)]
x86-32: Pass the full resource data to ioremap()

It appears that 64-bit PCI resources cannot possibly ever have worked on
x86-32 even when the RESOURCES_64BIT config option was set, because any
driver that tried to [pci_]ioremap() the resource would have been unable
to do so because the high 32 bits would have been silently dropped on
the floor by the ioremap() routines that only used "unsigned long".

Change them to use "resource_size_t" instead, which properly encodes the
whole 64-bit resource data if RESOURCES_64BIT is enabled.

Acked-by: H. Peter Anvin <hpa@kernel.org>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDon't 'printk()' while holding xtime lock for writing
Linus Torvalds [Mon, 24 Mar 2008 18:07:15 +0000 (11:07 -0700)]
Don't 'printk()' while holding xtime lock for writing

The printk() can deadlock because it can wake up klogd(), and
task enqueueing will try to read the time in order to set a hrtimer.

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Debugged-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[POWERPC] Update some defconfigs
Kumar Gala [Mon, 24 Mar 2008 13:56:06 +0000 (08:56 -0500)]
[POWERPC] Update some defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix Oops with TQM5200 on TQM5200
Anatolij Gustschin [Sat, 22 Mar 2008 10:49:05 +0000 (21:49 +1100)]
[POWERPC] Fix Oops with TQM5200 on TQM5200

The "bestcomm-core" driver defines its of_match table as follows

static struct of_device_id mpc52xx_bcom_of_match[] = {
{ .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
{ .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
{},
};

so while registering the driver, the driver's probe function won't be
called, because the device tree node doesn't have a device_type
property.  Thus the driver's bcom_engine structure won't be allocated.
Referencing this structure later causes observed Oops.

Checking bcom_eng pointer for NULL before referencing data pointed
by it prevents oopsing, but fec driver still doesn't work (because
of the lost bestcomm match and resulted task allocation failure).
Actually the compatible property exists and should match and so
the fec driver should work.

This removes .type = "dma-controller" from the bestcomm driver's
mpc52xx_bcom_of_match table to solve the problem.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] mpc5200: Fix null dereference if bestcomm fails to initialize
Grant Likely [Sat, 22 Mar 2008 03:41:05 +0000 (14:41 +1100)]
[POWERPC] mpc5200: Fix null dereference if bestcomm fails to initialize

If the bestcomm initialization fails, calls to the task allocate
function should fail gracefully instead of oopsing with a NULL deref.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driver
Grant Likely [Sat, 22 Mar 2008 03:20:29 +0000 (14:20 +1100)]
[POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driver

If the reg property is missing from the phy node (unlikely, but possible),
then the kernel will oops with a NULL pointer dereference.  This fixes
it by checking the pointer first.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix crash in init_ipic_sysfs on efika
Olaf Hering [Mon, 17 Mar 2008 19:53:05 +0000 (06:53 +1100)]
[POWERPC] Fix crash in init_ipic_sysfs on efika

The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain NULL
if ipic_init() fails, which will happen on machines that don't have an
ipic interrupt controller.  init_ipic_sysfs() will crash in that case.

Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Don't use 64k pages for ioremap on pSeries
Paul Mackerras [Mon, 24 Mar 2008 06:41:22 +0000 (17:41 +1100)]
[POWERPC] Don't use 64k pages for ioremap on pSeries

On pSeries, the hypervisor doesn't let us map in the eHEA ethernet
adapter using 64k pages, and thus the ehea driver will fail if 64k
pages are configured.  This works around the problem by always
using 4k pages for ioremap on pSeries (but not on other platforms).
A better fix would be to check whether the partition could ever
have an eHEA adapter, and only force 4k pages if it could, but this
will do for 2.6.25.

This is based on an earlier patch by Tony Breeds.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[SPARC64]: exec PT_DTRACE
Roland McGrath [Mon, 24 Mar 2008 05:50:16 +0000 (22:50 -0700)]
[SPARC64]: exec PT_DTRACE

The PT_DTRACE flag is meaningless and obsolete.
Don't touch it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Use shorter list_splice_init() for brevity.
Robert P. J. Day [Mon, 24 Mar 2008 05:48:29 +0000 (22:48 -0700)]
[SPARC64]: Use shorter list_splice_init() for brevity.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosch_htb: fix "too many events" situation
Martin Devera [Mon, 24 Mar 2008 05:00:38 +0000 (22:00 -0700)]
sch_htb: fix "too many events" situation

HTB is event driven algorithm and part of its work is to apply
scheduled events at proper times. It tried to defend itself from
livelock by processing only limited number of events per dequeue.
Because of faster computers some users already hit this hardcoded
limit.

This patch limits processing up to 2 jiffies (why not 1 jiffie ?
because it might stop prematurely when only fraction of jiffie
remains).

Signed-off-by: Martin Devera <devik@cdi.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoconnector: convert to single-threaded workqueue
Evgeniy Polyakov [Mon, 24 Mar 2008 04:51:12 +0000 (21:51 -0700)]
connector: convert to single-threaded workqueue

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

We don't need one cqueue thread for each CPU.  cqueue is used for
receiving userspace datagrams, which are very rare and thus will
happily live with a single queue.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: When proc_create() fails, do some error handling work and return -ENOMEM.
Wang Chen [Mon, 24 Mar 2008 04:45:36 +0000 (21:45 -0700)]
[ATM]: When proc_create() fails, do some error handling work and return -ENOMEM.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agokbuild: soften modpost checks when doing cross builds
Sam Ravnborg [Sun, 23 Mar 2008 20:38:54 +0000 (21:38 +0100)]
kbuild: soften modpost checks when doing cross builds

The module alias support in the kernel have a consistency
check where it is checked that the size of a structure
in the kernel and on the build host are the same.
For cross builds this check does not make sense so detect
when we do cross builds and silently skip the check in these
situations.
This fixes a build bug for a wireless driver when cross building
for arm.

Acked-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Gordon Farquharson <gordonfarquharson@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: stable@kernel.org
16 years agoi2c: Fix docbook problem
Randy Dunlap [Sun, 23 Mar 2008 19:28:20 +0000 (20:28 +0100)]
i2c: Fix docbook problem

Sometimes kernel-doc and xmlto conspire to create output that is invalid
and causes problems.  Until I know a real/better solution, change the
source code that causes this.

If anyone has better fixes or can just explain what is happening here,
that would be great.

xmlto: input does not validate (status 1)
mmotm-2008-0314-1449/Documentation/DocBook/kernel-api.xml:71468: parser error : Opening and ending tag mismatch: programlisting line 71464 and para
   </para><para>
          ^
mmotm-2008-0314-1449/Documentation/DocBook/kernel-api.xml:71480: parser error : Opening and ending tag mismatch: para line 71473 and programlisting
</programlisting></informalexample>
                 ^
make[1]: *** [Documentation/DocBook/kernel-api.html] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoASoC/TLV320AIC3X: Stop I2C driver ID abuse
Jean Delvare [Sun, 23 Mar 2008 19:28:20 +0000 (20:28 +0100)]
ASoC/TLV320AIC3X: Stop I2C driver ID abuse

Please stop using random I2C driver IDs.

Also removed a pointless initialization to 0 of a static struct member.

Acked-by: Takashi Iwai <tiwai@suse.de>
Cc: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-omap: Fix unhandled fault
Tony Lindgren [Sun, 23 Mar 2008 19:28:20 +0000 (20:28 +0100)]
i2c-omap: Fix unhandled fault

If an I2C interrupt happens between disabling interface clock
and functional clock, the interrupt handler will produce an
external abort on non-linefetch error when trying to access
driver registers while interface clock is disabled.

This patch fixes the problem by saving and disabling i2c-omap
interrupt before turning off the clocks. Also disable functional
clock before the interface clock as suggested by Paul Walmsley.

Patch also renames enable/disable_clocks functions to unidle/idle
functions. Note that the driver is currently not taking advantage
of the idle interrupts. To use the idle interrupts, driver would
have to enable interface clock based on the idle interrupt
and dev->idle flag.

This patch has been tested in linux-omap tree with various omaps.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Disable BF54x support for now
Bryan Wu [Sun, 23 Mar 2008 19:28:20 +0000 (20:28 +0100)]
i2c-bfin-twi: Disable BF54x support for now

The i2c-bfin-twi driver doesn't support BF54x for now due to
missing header definitions causing the build to fail. Exclude
it for now, it will be enabled again later.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years ago[SUNGEM]: Fix NAPI assertion failure.
David S. Miller [Sun, 23 Mar 2008 10:35:12 +0000 (03:35 -0700)]
[SUNGEM]: Fix NAPI assertion failure.

As reported by Johannes Berg:

I started getting this warning with recent kernels:

[  773.908927] ------------[ cut here ]------------
[  773.908954] Badness at net/core/dev.c:2204
 ...

If we loop more than once in gem_poll(), we'll
use more than the real budget in our gem_rx()
calls, thus eventually trigger the caller's
assertions in net_rx_action().

Subtract "work_done" from "budget" for the second
arg to gem_rx() to fix the bug.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoBNX2X: prevent ethtool from setting port type
Eliezer Tamir [Sun, 23 Mar 2008 10:07:45 +0000 (03:07 -0700)]
BNX2X: prevent ethtool from setting port type

On 10GBaseT boards setting the type to TP will cause the driver to try
to configure 1GBaseT.
Since there are currently no boards that support setting of the port
type, disable this for now.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[9P] net/9p/trans_fd.c: remove unused variable
Julia Lawall [Sun, 23 Mar 2008 01:05:33 +0000 (18:05 -0700)]
[9P] net/9p/trans_fd.c: remove unused variable

The variable cb 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: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] net/ipv6/ndisc.c: remove unused variable
Julia Lawall [Sun, 23 Mar 2008 01:04:16 +0000 (18:04 -0700)]
[IPV6] net/ipv6/ndisc.c: remove unused variable

The variable hlen 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: David S. Miller <davem@davemloft.net>
16 years ago[IPV4] fib_trie: fix warning from rcu_assign_poinger
Stephen Hemminger [Sun, 23 Mar 2008 00:59:58 +0000 (17:59 -0700)]
[IPV4] fib_trie: fix warning from rcu_assign_poinger

This gets rid of a warning caused by the test in rcu_assign_pointer.
I tried to fix rcu_assign_pointer, but that devolved into a long set
of discussions about doing it right that came to no real solution.
Since the test in rcu_assign_pointer for constant NULL would never
succeed in fib_trie, just open code instead.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sun, 23 Mar 2008 00:07:59 +0000 (17:07 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/nes: Fix MSS calculation on RDMA path

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sun, 23 Mar 2008 00:06:57 +0000 (17:06 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  Revert "ide-tape: schedule driver for removal after 6 months"
  ide: mark "hdx=remap" and "hdx=remap63" kernel parameters as obsoleted
  ide: mark "hdx=[driver_name]" and "hdx=scsi" kernel parameters as obsoleted
  ide: Documentation/ide/ide.txt fixes
  ide: mark special "ide0=" kernel parameters as obsoleted
  ide: remove commented out entries from ide_pio_blacklist[]

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 23 Mar 2008 00:05:31 +0000 (17:05 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix mem leak on dfs referral
  [CIFS] file create with acl support enabled is slow
  [CIFS] Fix mtime on cp -p when file data cached but written out too late
  [CIFS] Fix build problem
  [CIFS] cifs: replace remaining __FUNCTION__ occurrences
  [CIFS]  DFS patch that connects inode with dfs handling ops

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Sun, 23 Mar 2008 00:04:58 +0000 (17:04 -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: revert: reserve dma32 early for gart

16 years agoChange pagemap output format to allow for future reporting of huge pages
Hans Rosenfeld [Fri, 21 Mar 2008 23:46:59 +0000 (18:46 -0500)]
Change pagemap output format to allow for future reporting of huge pages

Change pagemap output format to allow for future reporting of huge pages.

(Format comment and minor cleanups: mpm@selenic.com)

Signed-off-by: Hans Rosenfeld <hans.rosenfeld@amd.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agommc: use sysfs groups to handle conditional attributes
Pierre Ossman [Fri, 21 Mar 2008 22:54:50 +0000 (23:54 +0100)]
mmc: use sysfs groups to handle conditional attributes

Suppressing uevents turned out to be a bad idea as it screws up the
order of events, making user space very confused. Change the system to
use sysfs groups instead.

This is a regression that, for some odd reason, has gone unnoticed for
some time. It confuses hal so that the block devices (which have the
mmc device as a parent) are not registered. End result being that
desktop magic when cards are inserted won't work.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPNP: increase the number of PnP memory resources from 12 to 24
Darren Salt [Thu, 13 Mar 2008 15:35:49 +0000 (15:35 +0000)]
PNP: increase the number of PnP memory resources from 12 to 24

Increase the number of PnP memory resources from 12 to 24.

This removes an "exceeded the max num of mem resources" warning on boot. I
also noticed the reservation of two more iomem ranges on the computer on
which this was tested.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoISAPNP: fix limits of logical device register set
Bjorn Helgaas [Fri, 21 Mar 2008 18:08:37 +0000 (12:08 -0600)]
ISAPNP: fix limits of logical device register set

PNP_MAX_MEM and PNP_MAX_PORT are mainly used to size tables of PNP
device resources.  In 2.6.24, we increased their values to accomodate
ACPI devices that have many resources:

                 2.6.23    2.6.24
                 ------    ------
  PNP_MAX_MEM       4         12
  PNP_MAX_PORT      8         40

However, ISAPNP also used these constants as the size of parts of the
logical device register set.  This register set is fixed by hardware,
so increasing the constants meant that we were reading and writing
unintended parts of the register set.

This patch changes ISAPNP to use the correct register set sizes (the
same values we used prior to 2.6.24).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[CIFS] Fix mem leak on dfs referral
Steve French [Sat, 22 Mar 2008 22:57:44 +0000 (22:57 +0000)]
[CIFS] Fix mem leak on dfs referral

Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years ago[TCP]: Let skbs grow over a page on fast peers
Herbert Xu [Sat, 22 Mar 2008 22:47:05 +0000 (15:47 -0700)]
[TCP]: Let skbs grow over a page on fast peers

While testing the virtio-net driver on KVM with TSO I noticed
that TSO performance with a 1500 MTU is significantly worse
compared to the performance of non-TSO with a 16436 MTU.  The
packet dump shows that most of the packets sent are smaller
than a page.

Looking at the code this actually is quite obvious as it always
stop extending the packet if it's the first packet yet to be
sent and if it's larger than the MSS.  Since each extension is
bound by the page size, this means that (given a 1500 MTU) we're
very unlikely to construct packets greater than a page, provided
that the receiver and the path is fast enough so that packets can
always be sent immediately.

The fix is also quite obvious.  The push calls inside the loop
is just an optimisation so that we don't end up doing all the
sending at the end of the loop.  Therefore there is no specific
reason why it has to do so at MSS boundaries.  For TSO, the
most natural extension of this optimisation is to do the pushing
once the skb exceeds the TSO size goal.

This is what the patch does and testing with KVM shows that the
TSO performance with a 1500 MTU easily surpasses that of a 16436
MTU and indeed the packet sizes sent are generally larger than
16436.

I don't see any obvious downsides for slower peers or connections,
but it would be prudent to test this extensively to ensure that
those cases don't regress.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agox86: revert: reserve dma32 early for gart
Thomas Gleixner [Sat, 22 Mar 2008 13:13:06 +0000 (14:13 +0100)]
x86: revert: reserve dma32 early for gart

Revert

commit f62f1fc9ef94f74fda2b456d935ba2da69fa0a40
Author: Yinghai Lu <yhlu.kernel@gmail.com>
Date:   Fri Mar 7 15:02:50 2008 -0800

    x86: reserve dma32 early for gart

The patch has a dependency on bootmem modifications which are not .25
material that late in the -rc cycle. The problem which is addressed by
the patch is limited to machines with 256G and more memory booted with
NUMA disabled. This is not a .25 regression and the audience which is
affected by this problem is very limited, so it's safer to do the
revert than pulling in intrusive bootmem changes right now.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoRevert "ide-tape: schedule driver for removal after 6 months"
Bartlomiej Zolnierkiewicz [Sat, 22 Mar 2008 15:44:27 +0000 (16:44 +0100)]
Revert "ide-tape: schedule driver for removal after 6 months"

This reverts commit d48567dd43868b3d2e1fcc33ee76dc2d38a1ddeb.

Borislav is working on ide-tape "light" version instead.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: mark "hdx=remap" and "hdx=remap63" kernel parameters as obsoleted
Bartlomiej Zolnierkiewicz [Sat, 22 Mar 2008 15:40:22 +0000 (16:40 +0100)]
ide: mark "hdx=remap" and "hdx=remap63" kernel parameters as obsoleted

Mark "hdx=remap" and "hdx=remap63" kernel parameters as obsoleted
(they are layering violation and should be dealt with in the same
 way as done by libata - device-mapper should be used instead).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: mark "hdx=[driver_name]" and "hdx=scsi" kernel parameters as obsoleted
Bartlomiej Zolnierkiewicz [Sat, 22 Mar 2008 15:40:21 +0000 (16:40 +0100)]
ide: mark "hdx=[driver_name]" and "hdx=scsi" kernel parameters as obsoleted

Mark "hdx=[driver_name]" and "hdx=scsi" kernel parameters as obsoleted
(nowadays device-driver binding can be changed at runtime through sysfs
 and it can also be dealt with using per device driver parameters).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Documentation/ide/ide.txt fixes
Bartlomiej Zolnierkiewicz [Sat, 22 Mar 2008 15:40:21 +0000 (16:40 +0100)]
ide: Documentation/ide/ide.txt fixes

* "hdx=cyls,heads,sects,wpcom,irq" should be "hdx=cyls,heads,sects".

* "hdx=" is for "x" from 'a' to 'u', "idex=" is for "x" from '0' to '9'.

* "idex=noautotune" is long gone.

* Obsoleted "ide0=" parameters were already removed from the documentation.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: mark special "ide0=" kernel parameters as obsoleted
Bartlomiej Zolnierkiewicz [Sat, 22 Mar 2008 15:40:21 +0000 (16:40 +0100)]
ide: mark special "ide0=" kernel parameters as obsoleted

Mark "ide0=ali14xx|cmd640_vlb|dtc2278|ht6560b|qd65xx|umc8672" kernel
parameters as obsoleted (per host driver replacements have been available
for a long time).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove commented out entries from ide_pio_blacklist[]
Bartlomiej Zolnierkiewicz [Sat, 22 Mar 2008 15:40:20 +0000 (16:40 +0100)]
ide: remove commented out entries from ide_pio_blacklist[]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years ago[SPARC64]: Remove most limitations to kernel image size.
David S. Miller [Sat, 22 Mar 2008 00:01:38 +0000 (17:01 -0700)]
[SPARC64]: Remove most limitations to kernel image size.

Currently kernel images are limited to 8MB in size, and this causes
problems especially when enabling features that take up a lot of
kernel image space such as lockdep.

The code now will align the kernel image size up to 4MB and map that
many locked TLB entries.  So, the only practical limitation is the
number of available locked TLB entries which is 16 on Cheetah and 64
on pre-Cheetah sparc64 cpus.  Niagara cpus don't actually have hw
locked TLB entry support.  Rather, the hypervisor transparently
provides support for "locked" TLB entries since it runs with physical
addressing and does the initial TLB miss processing.

Fully utilizing this change requires some help from SILO, a patch for
which will be submitted to the maintainer.  Essentially, SILO will
only currently map up to 8MB for the kernel image and that needs to be
increased.

Note that neither this patch nor the SILO bits will help with network
booting.  The openfirmware code will only map up to a certain amount
of kernel image during a network boot and there isn't much we can to
about that other than to implemented a layered network booting
facility.  Solaris has this, and calls it "wanboot" and we may
implement something similar at some point.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[DLCI]: Fix tiny race between module unload and sock_ioctl.
Pavel Emelyanov [Fri, 21 Mar 2008 22:58:52 +0000 (15:58 -0700)]
[DLCI]: Fix tiny race between module unload and sock_ioctl.

This is a narrow pedantry :) but the dlci_ioctl_hook check and call
should not be parted with the mutex lock.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Fix build warnings with IPV6 disabled.
David S. Miller [Fri, 21 Mar 2008 22:40:47 +0000 (15:40 -0700)]
[SCTP]: Fix build warnings with IPV6 disabled.

Introduced by 270637abff0cdf848b910b9f96ad342e1da61c66
("[SCTP]: Fix a race between module load and protosw access")

Reported by Gabriel C:

In file included from net/sctp/sm_statetable.c:50:
include/net/sctp/sctp.h: In function 'sctp_v6_pf_init':
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void
In file included from net/sctp/sm_statefuns.c:62:
include/net/sctp/sctp.h: In function 'sctp_v6_pf_init':
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void
 ...

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Fix null dereference in ip_defrag
Phil Oester [Fri, 21 Mar 2008 22:01:50 +0000 (15:01 -0700)]
[IPV4]: Fix null dereference in ip_defrag

Been seeing occasional panics in my testing of 2.6.25-rc in ip_defrag.
Offending line in ip_defrag is here:

net = skb->dev->nd_net

where dev is NULL.  Bisected the problem down to commit
ac18e7509e7df327e30d6e073a787d922eaf211d ([NETNS][FRAGS]: Make the
inet_frag_queue lookup work in namespaces).

Below patch (idea from Patrick McHardy) fixes the problem for me.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRDMA/nes: Fix MSS calculation on RDMA path
Chien Tung [Fri, 21 Mar 2008 00:55:30 +0000 (19:55 -0500)]
RDMA/nes: Fix MSS calculation on RDMA path

Fix the calculation of the MSS for RDMA connections: we need to
allow space in frames for a VLAN tag too.

Signed-off-by: Chien Tung <ctung@neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoocfs2: MAINTAINERS update
Mark Fasheh [Fri, 21 Mar 2008 17:40:31 +0000 (10:40 -0700)]
ocfs2: MAINTAINERS update

Change my e-mail address, add Joel as new co-maintainer.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux...
Linus Torvalds [Fri, 21 Mar 2008 17:05:19 +0000 (10:05 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mingo/linux-2.6-sched-devel

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel:
  sched: add arch_update_cpu_topology hook.
  sched: add exported arch_reinit_sched_domains() to header file.
  sched: remove double unlikely from schedule()
  sched: cleanup old and rarely used 'debug' features.

16 years agox86_64: free_bootmem should take phys
Yinghai Lu [Tue, 18 Mar 2008 19:40:04 +0000 (12:40 -0700)]
x86_64: free_bootmem should take phys

so use nodedata_phys directly.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>