]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
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>
16 years agobonding: Fix sysfs attribute handling
Libor Pechacek [Sat, 22 Mar 2008 05:29:35 +0000 (22:29 -0700)]
bonding: Fix sysfs attribute handling

For bonding interfaces any attempt to read the sysfs directory contents after
module removal results in an oops.  The fix is to release sysfs attributes
for the interfaces upon module unload.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agobonding: fix two compiler warnings
Jay Vosburgh [Sat, 22 Mar 2008 05:29:34 +0000 (22:29 -0700)]
bonding: fix two compiler warnings

Fix two compiler warnings that are new with recent versions of gcc
(apparently 4.2 and up).  One is fixed by refactoring; this change was
supplied by Stephen Hemminger.  The other was fixed by labelling the
variable as uninitialized_var() after confirming via inspection that it
cannot actually be used uninitialized.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agobonding: Fix locking in 802.3ad mode
Jay Vosburgh [Sat, 22 Mar 2008 05:29:33 +0000 (22:29 -0700)]
bonding: Fix locking in 802.3ad mode

The 802.3ad state machine lock can be acquired in both softirq and
not softirq context, but was not held at _bh to prevent a deadlock (which
could occur if a LACPDU arrived and was processed while the lock was
held).

Corrected this, now hold the state machine lock at _bh to prevent
deadlock.

Bug reported by Todd Fleisher <todd@fleish.org>.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosmctr.c: fix logical-bitwise-or confusion
Jay Schulist [Tue, 18 Mar 2008 21:53:09 +0000 (17:53 -0400)]
smctr.c: fix logical-bitwise-or confusion

This patch to drivers/net/tokenring/smctr.c fixes a "bitwise vs
logical" or error.

Signed-off-by: Jay Schulist <jjschlst@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoACPI: fix a regression of ACPI device driver autoloading
Zhang Rui [Thu, 20 Mar 2008 08:40:32 +0000 (16:40 +0800)]
ACPI: fix a regression of ACPI device driver autoloading

commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 sets the cid of
ACPI video/dock/bay device and leaves the hid empty.
As a result, "modalias" should export the cid for
devices which don't have a hid.

ACPI Video driver is not autoloaded with
commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 applied.
"cat /sys/.../device:03(acpi video bus)/modalias" shows nothing.

ACPI Video driver is autoloaded after revert that commit.
"cat /sys/.../LNXVIDEO:0x/modalias" shows "acpi:LNXVIDEO:"

ACPI Video driver is autoloaded with commit
3620f2f2f39e7870cf1a4fb2e34063a142f28716 and this patch applied.
"cat /sys/.../device:03(acpi video bus)/modalias"
shows "acpi:LNXVIDEO:"

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.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 agoclocksource: revert: use init_timer_deferrable for clocksource_watchdog
Thomas Gleixner [Tue, 25 Mar 2008 08:01:51 +0000 (09:01 +0100)]
clocksource: revert: use init_timer_deferrable for clocksource_watchdog

Revert

commit 1077f5a917b7c630231037826b344b2f7f5b903f
Author: Parag Warudkar <parag.warudkar@gmail.com>
Date:   Wed Jan 30 13:30:01 2008 +0100

    clocksource.c: use init_timer_deferrable for clocksource_watchdog

    clocksource_watchdog can use a deferrable timer - reduces wakeups from
    idle per second.

The watchdog timer needs to run with the specified interval. Otherwise
it will miss the possible wrap of the watchdog clocksource.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.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.kernel.org/pub/scm/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.kernel.org/pub/scm/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 ago[POWERPC] update pasemi_defconfig
Olof Johansson [Tue, 25 Mar 2008 15:28:26 +0000 (10:28 -0500)]
[POWERPC] update pasemi_defconfig

Disable GEN_RTC since it conflicts with the i2c rtc drivers registering,
besides that keep most of the new defaults.

Signed-off-by: Olof Johansson <olof@lixom.net>
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.kernel.org/pub/scm/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.kernel.org/pub/scm/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.kernel.org/pub/scm/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 ago[SPARC64]: Make save_stack_trace() more efficient.
David S. Miller [Tue, 25 Mar 2008 03:06:24 +0000 (20:06 -0700)]
[SPARC64]: Make save_stack_trace() more efficient.

Doing a 'flushw' every stack trace capture creates so much overhead
that it makes lockdep next to unusable.

We only care about the frame pointer chain and the function caller
program counters, so flush those by hand to the stack frame.

This is significantly more efficient than a 'flushw' because:

1) We only save 16 bytes per active register window to the stack.

2) This doesn't push the entire register window context of the current
   call chain out of the cpu, forcing register window fill traps as we
   return back down.

Note that we can't use 'restore' and 'save' instructions to move
around the register windows because that wouldn't work on Niagara
processors.  They optimize 'save' into a new register window by
simply clearing out the registers instead of pulling them in from
the on-chip register window backing store.

Based upon a report by Tom Callaway.

Signed-off-by: David S. Miller <davem@davemloft.net>
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.kernel.org/pub/scm/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.kernel.org/pub/scm/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 agob43: Remove irqs_disabled() sanity checks
Michael Buesch [Sun, 23 Mar 2008 00:08:22 +0000 (01:08 +0100)]
b43: Remove irqs_disabled() sanity checks

Remove all irqs_disabled() sanity checks, as they are not safe on
a RT-enabled kernel and will trigger bogus warnings.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix DMA mapping leakage
Michael Buesch [Sat, 22 Mar 2008 21:04:45 +0000 (22:04 +0100)]
b43: Fix DMA mapping leakage

This fixes a DMA mapping leakage in the case where we reject a DMA
buffer because of its address.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix __devexit_p points to __devexit functions
Reinette Chatre [Fri, 21 Mar 2008 20:53:41 +0000 (13:53 -0700)]
iwlwifi: fix __devexit_p points to __devexit functions

The iwlxxxx_pci_remove functions are not needed when drivers are not
compiled as modules - they can thus be discarded at kernel link time.
This is already captured by having them as __devexit_p in the pci_driver
struct - these are supposed to be pointers to __devexit functions, but was not.
This is now fixed.

This problem was reported by Toralf Forster when testing the compilation of
2.6.25-rc6.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Toralf Forster <toralf.foerster@gmx.de>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoMAINTAINERS: update iwlwifi git url
Reinette Chatre [Fri, 21 Mar 2008 20:53:40 +0000 (13:53 -0700)]
MAINTAINERS: update iwlwifi git url

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoarlan: fix warning when PROC_FS=n
John W. Linville [Thu, 20 Mar 2008 20:19:04 +0000 (16:19 -0400)]
arlan: fix warning when PROC_FS=n

drivers/net/wireless/arlan-proc.c:1216: warning: 'arlan_root_table' defined but not used

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: mac start synchronization issue
Rick Farrington [Tue, 18 Mar 2008 21:57:49 +0000 (14:57 -0700)]
iwlwifi: mac start synchronization issue

This patch fixes a synchronization problem on the 4965 and 3945 with the
mac start callback routine.  The problem is that this function exits BEFORE the
'xxx_alive_start' has completed.  This can lead to a problem if a
subsequent MAC callback attempts to issue a firmware command.

Signed-off-by: Rick Farrington <rickdic@hotmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowavelan_cs arm fix
Al Viro [Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)]
wavelan_cs arm fix

Even when all fields are unsigned char, struct still might have
alignment > 1.  Does so on arm, unless you explicitly say that
it's packed...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Add id for Corega CG-WLUSB2GPX
Masakazu Mokuno [Sat, 15 Mar 2008 20:38:29 +0000 (21:38 +0100)]
rt2x00: Add id for Corega CG-WLUSB2GPX

This adds the id for Corega CG-WLUSB2GPX.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix a typo in Kconfig message
Pascal Terjan [Thu, 13 Mar 2008 18:13:24 +0000 (19:13 +0100)]
iwlwifi: fix a typo in Kconfig message

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[IPSEC]: Fix inter address family IPsec tunnel handling.
Kazunori MIYAZAWA [Mon, 24 Mar 2008 21:51:51 +0000 (14:51 -0700)]
[IPSEC]: Fix inter address family IPsec tunnel handling.

Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NEIGH]: Fix race between pneigh deletion and ipv6's ndisc_recv_ns (v3).
Pavel Emelyanov [Mon, 24 Mar 2008 21:48:59 +0000 (14:48 -0700)]
[NEIGH]: Fix race between pneigh deletion and ipv6's ndisc_recv_ns (v3).

Proxy neighbors do not have any reference counting, so any caller
of pneigh_lookup (unless it's a netlink triggered add/del routine)
should _not_ perform any actions on the found proxy entry.

There's one exception from this rule - the ipv6's ndisc_recv_ns()
uses found entry to check the flags for NTF_ROUTER.

This creates a race between the ndisc and pneigh_delete - after
the pneigh is returned to the caller, the nd_tbl.lock is dropped
and the deleting procedure may proceed.

One of the fixes would be to add a reference counting, but this
problem exists for ndisc only. Besides such a patch would be too
big for -rc4.

So I propose to introduce a __pneigh_lookup() which is supposed
to be called with the lock held and use it in ndisc code to check
the flags on alive pneigh entry.

Changes from v2:
As David noticed, Exported the __pneigh_lookup() to ipv6 module.
The checkpatch generates a warning on it, since the EXPORT_SYMBOL
does not follow the symbol itself, but in this file all the
exports come at the end, so I decided no to break this harmony.

Changes from v1:
Fixed comments from YOSHIFUJI - indentation of prototype in header
and the pndisc_check_router() name - and a compilation fix, pointed
by Daniel - the is_routed was (falsely) considered as uninitialized
by gcc.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
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.kernel.org/pub/scm/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.kernel.org/pub/scm/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.