linux-2.6-block.git
16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 26 Aug 2008 17:07:27 +0000 (10:07 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc: Update defconfigs for most non-embedded platforms
  powerpc: Export CMO_PageSize
  powerpc/ps3: Fix ioremap of spu shadow regs
  powerpc/ps3: Rework htab code to remove ioremap
  powerpc/ps3: Update ps3_defconfig
  powerpc/cell/oprofile: Avoid double vfree of profile buffer
  powerpc: Update defconfigs for FSL PPC boards
  powerpc: Add cuImage.mpc866ads to the bootwrapper as a cuboot-8xx target
  cpm2: Fix race condition in CPM2 GPIO library.
  powerpc: fix memory leaks in QE library
  powerpc/85xx: TQM8548: DTS file fixes and cleanup
  powerpc: Fix whitespace merge in mpc8641 hpcn device tree

16 years agoMerge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Steve French [Tue, 26 Aug 2008 16:56:05 +0000 (16:56 +0000)]
Merge branch 'master' of /linux/kernel/git/torvalds/linux-2.6

16 years agoALSA: ASoC: Fix error paths in N810 machine driver init and release clocks at exit
Jarkko Nikula [Tue, 26 Aug 2008 10:32:57 +0000 (13:32 +0300)]
ALSA: ASoC: Fix error paths in N810 machine driver init and release clocks at exit

Thanks to Felipe Balbi <felipe.balbi@nokia.com> by noticing that if clk_get
to sys_clkout2_src fails, then n810_snd_device is never released.

Add also sys_clkout2_src release into error path, error code return and
release the clocks at exit.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: oxygen: prevent muting of nonexistent AC97 controls
Clemens Ladisch [Tue, 26 Aug 2008 09:06:26 +0000 (11:06 +0200)]
ALSA: oxygen: prevent muting of nonexistent AC97 controls

The Xonar DX does not have CD Capture controls, so we have to check that
a control actually exists before muting it.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[MIPS] Ignore vmlinux.lds generated files
Florian Fainelli [Tue, 19 Aug 2008 19:28:21 +0000 (21:28 +0200)]
[MIPS] Ignore vmlinux.lds generated files

This patch adds the proper .gitignore file to ignore vmlinux.lds generated
in arch/mips/kernel/.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] kgdb: Do not call fixup_exception
Atsushi Nemoto [Mon, 11 Aug 2008 14:05:35 +0000 (23:05 +0900)]
[MIPS] kgdb: Do not call fixup_exception

kgdb_mips_notify is called on IBE/DBE/FPE/BP/TRAP/RI exception.  None
of them need fixup.  And doing fixup for a breakpoint exception will
confuse gdb.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] RB532: Do not define registers that are already defined
Florian Fainelli [Tue, 5 Aug 2008 20:24:18 +0000 (22:24 +0200)]
[MIPS] RB532: Do not define registers that are already defined

Use the register definitions of the MPMC controller from
mach-rc32434/rb.h instead of redefining them.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP27: Export symbol pcibus_to_node to modules.
Ralf Baechle [Tue, 5 Aug 2008 22:44:49 +0000 (23:44 +0100)]
[MIPS] IP27: Export symbol pcibus_to_node to modules.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] kgdb: s/(void *)0)/NULL/
Ralf Baechle [Tue, 5 Aug 2008 22:43:35 +0000 (23:43 +0100)]
[MIPS] kgdb: s/(void *)0)/NULL/

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] kgdb: smp_call_function's 3rd argument is a pointer.
Ralf Baechle [Tue, 5 Aug 2008 22:42:16 +0000 (23:42 +0100)]
[MIPS] kgdb: smp_call_function's 3rd argument is a pointer.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] TXx9: Fix mips_hpt_frequency initialization
Atsushi Nemoto [Thu, 31 Jul 2008 13:29:53 +0000 (22:29 +0900)]
[MIPS] TXx9: Fix mips_hpt_frequency initialization

The mips_hpt_frequency initialization code was lost in commit
94a4c32939dede9328c6e4face335eb8441fc18d (linux-mips.org) /
94a4c32939dede9328c6e4face335eb8441fc18d (kernel.org) "TXx9: Add 64-bit
support".

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] emma2rh: Fix build error by header file inclusion weeding.
Ralf Baechle [Thu, 31 Jul 2008 12:38:44 +0000 (13:38 +0100)]
[MIPS] emma2rh: Fix build error by header file inclusion weeding.

  CC      arch/mips/emma2rh/markeins/setup.o
In file included from arch/mips/emma2rh/markeins/setup.c:30:
include/linux/ide.h:645: error: ‘CONFIG_IDE_MAX_HWIFS’ undeclared here (not in a function)
make[1]: *** [arch/mips/emma2rh/markeins/setup.o] Error 1

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Jazz: Fix build error by header file inclusion weeding.
Ralf Baechle [Thu, 31 Jul 2008 12:08:14 +0000 (13:08 +0100)]
[MIPS] Jazz: Fix build error by header file inclusion weeding.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Wire up new syscalls.
Ralf Baechle [Thu, 31 Jul 2008 10:16:43 +0000 (11:16 +0100)]
[MIPS] Wire up new syscalls.

signalfd4, eventfd2, epoll_create1, dup3, pipe2 and inotify_init1.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Convert printk statements during kernel setup to use severity levels
Mike Crowe [Mon, 28 Jul 2008 12:12:52 +0000 (13:12 +0100)]
[MIPS] Convert printk statements during kernel setup to use severity levels

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agopowerpc: Update defconfigs for most non-embedded platforms
Paul Mackerras [Tue, 26 Aug 2008 03:31:55 +0000 (13:31 +1000)]
powerpc: Update defconfigs for most non-embedded platforms

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 26 Aug 2008 00:48:07 +0000 (17:48 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2x: Version update
  bnx2x: Multi Queue
  bnx2x: NAPI and interrupts enable/disable
  bnx2x: NIC load failure cleanup
  bnx2x: Initialization structure
  bnx2x: HW lock timeout
  bnx2x: Minimize lock time
  bnx2x: Fan failure mechanism on additional design
  bnx2x: Rx work check
  ipv6: sysctl fixes
  ipv4: sysctl fixes
  sctp: add verification checks to SCTP_AUTH_KEY option

16 years agoALSA: fix for CA0106 on MSI K8N Diamond PLUS Motherboard
Stephen Rothwell [Tue, 26 Aug 2008 00:33:32 +0000 (10:33 +1000)]
ALSA: fix for CA0106 on MSI K8N Diamond PLUS Motherboard

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[CIFS] check version in spnego upcall response
Steve French [Tue, 26 Aug 2008 00:37:14 +0000 (00:37 +0000)]
[CIFS] check version in spnego upcall response

Currently, we don't check the version in the SPNEGO upcall response
even though one is provided. Jeff and Q have made the corresponding
change to the Samba client (cifs.upcall).

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agopowerpc: Export CMO_PageSize
Andrew Morton [Thu, 21 Aug 2008 01:16:26 +0000 (11:16 +1000)]
powerpc: Export CMO_PageSize

This fixes an error building powerpc allmodconfig:

ERROR: "CMO_PageSize" [arch/powerpc/platforms/pseries/cmm.ko] undefined!

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agopowerpc/ps3: Fix ioremap of spu shadow regs
Masakazu Mokuno [Wed, 20 Aug 2008 20:18:56 +0000 (06:18 +1000)]
powerpc/ps3: Fix ioremap of spu shadow regs

Fix the ioremap of the spu shadow regs on the PS3.

The current PS3 hypervisor requires the spu shadow regs to be
mapped with the PTE page protection bits set as read-only (PP=3).
This implementation uses the low level __ioremap() to bypass the
page protection settings inforced by ioremap_flags() to get the
needed PTE bits set for the shadow regs.

This fixes a runtime failure on the PS3 introduced by the powerpc
ioremap_prot rework of commit a1f242ff460e4b50a045fa237c3c56cce9eabf83
("powerpc ioremap_prot").

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agopowerpc/ps3: Rework htab code to remove ioremap
Masakazu Mokuno [Wed, 20 Aug 2008 20:18:51 +0000 (06:18 +1000)]
powerpc/ps3: Rework htab code to remove ioremap

Rework the PS3 MMU hash table code to remove the need to ioremap the
hash table by using the HV calls lv1_insert_htab_entry() and
lv1_read_htab_entries().

This fixes a runtime failure on the PS3 introduced by the powerpc
ioremap_prot rework of commit a1f242ff460e4b50a045fa237c3c56cce9eabf83
("powerpc ioremap_prot").

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agopowerpc/ps3: Update ps3_defconfig
Geoff Levand [Wed, 20 Aug 2008 20:18:43 +0000 (06:18 +1000)]
powerpc/ps3: Update ps3_defconfig

Update ps3_defconfig.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agopowerpc/cell/oprofile: Avoid double vfree of profile buffer
Carl Love [Mon, 11 Aug 2008 07:25:43 +0000 (17:25 +1000)]
powerpc/cell/oprofile: Avoid double vfree of profile buffer

If an error occurs on opcontrol start, the event and per cpu buffers
are released.  If later opcontrol shutdown is called then the free
function will be called again to free buffers that no longer
exist.  This results in a kernel oops.  The following changes
prevent the call to delete buffers that don't exist.

Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agobnx2x: Version update
Eilon Greenstein [Mon, 25 Aug 2008 22:30:39 +0000 (15:30 -0700)]
bnx2x: Version update

Version update

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Multi Queue
Yitchak Gertner [Mon, 25 Aug 2008 22:27:06 +0000 (15:27 -0700)]
bnx2x: Multi Queue

The multi queue support is still disabled by default for the bnx2x
(needs some more testing and validation), but there are 2 obvious bug in
it which are fixed in this patch

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: NAPI and interrupts enable/disable
Yitchak Gertner [Mon, 25 Aug 2008 22:26:24 +0000 (15:26 -0700)]
bnx2x: NAPI and interrupts enable/disable

Fixing the order of enabling and disabling NAPI and the interrupts

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: NIC load failure cleanup
Yitchak Gertner [Mon, 25 Aug 2008 22:25:45 +0000 (15:25 -0700)]
bnx2x: NIC load failure cleanup

Load failures were not handled correctly

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Initialization structure
Yitchak Gertner [Mon, 25 Aug 2008 22:24:21 +0000 (15:24 -0700)]
bnx2x: Initialization structure

The TPA initialization is part of the FW internal memory initialization
and so it is moved to the appropriate function

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: HW lock timeout
Eilon Greenstein [Mon, 25 Aug 2008 22:23:30 +0000 (15:23 -0700)]
bnx2x: HW lock timeout

Increasing the lock timeout to 5 seconds instead of 1 second to minimize
the chance of failures due to timeout

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Minimize lock time
Eilon Greenstein [Mon, 25 Aug 2008 22:22:46 +0000 (15:22 -0700)]
bnx2x: Minimize lock time

After iSCSI boot, the HW lock should only protect the flag so only the
first function will reset the chip and not then entire chip reset
process

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Fan failure mechanism on additional design
Eilon Greenstein [Mon, 25 Aug 2008 22:20:48 +0000 (15:20 -0700)]
bnx2x: Fan failure mechanism on additional design

The A1021G board is also using the fan failure mechanism in the same way
the A1022G board does

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobnx2x: Rx work check
Eilon Greenstein [Mon, 25 Aug 2008 22:19:17 +0000 (15:19 -0700)]
bnx2x: Rx work check

The has Rx work check was wrong: when the FW was at the end of the page,
the driver was already at the beginning of the next page. Since the
check only validated that both driver and FW are pointing to the same
place, it concluded that there is still work to be done. This caused
some serious issues including long latency results on ping-pong test and
lockups while unloading the driver in that condition.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv6: sysctl fixes
Al Viro [Mon, 25 Aug 2008 22:18:15 +0000 (15:18 -0700)]
ipv6: sysctl fixes

Braino: net.ipv6 in ipv6 skeleton has no business in rotable
class

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv4: sysctl fixes
Al Viro [Mon, 25 Aug 2008 22:17:44 +0000 (15:17 -0700)]
ipv4: sysctl fixes

net.ipv4.neigh should be a part of skeleton to avoid ordering problems

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosctp: add verification checks to SCTP_AUTH_KEY option
Vlad Yasevich [Mon, 25 Aug 2008 22:16:19 +0000 (15:16 -0700)]
sctp: add verification checks to SCTP_AUTH_KEY option

The structure used for SCTP_AUTH_KEY option contains a
length that needs to be verfied to prevent buffer overflow
conditions.  Spoted by Eugene Teo <eteo@redhat.com>.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[x86] Clean up MAXSMP Kconfig, and limit NR_CPUS to 512
Linus Torvalds [Mon, 25 Aug 2008 21:15:38 +0000 (14:15 -0700)]
[x86] Clean up MAXSMP Kconfig, and limit NR_CPUS to 512

This fixes a regression that was indirectly caused by commit
1184dc2ffe2c8fb9afb766d870850f2c3165ef25 ("x86: modify Kconfig to allow
up to 4096 cpus").

Allowing 4k CPU's is not practical at this time, because we still have a
number of places that have several 'cpumask_t's on the stack, and a
4k-bit cpumask is 512 bytes of stack-space for each such variable.  This
literally caused functions like 'smp_call_function_mask' to have a 2.5kB
stack frame, and several functions to have 2kB stackframes.

With an 8kB stack total, smashing the stack was simply much too likely.
At least bugzilla entry

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

was due to this.

The earlier commit to not inline load_module() into sys_init_module()
fixed the particular symptoms of this that Alan Brunelle saw in that
bugzilla entry, but the huge stack waste by cpumask_t's was the more
direct cause.

Some day we'll have allocation helpers that allocate large CPU masks
dynamically, but in the meantime we simply cannot allow cpumasks this
large.

Cc: Alan D. Brunelle <Alan.Brunelle@hp.com>
Cc: Mike Travis <travis@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 25 Aug 2008 18:26:56 +0000 (11:26 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rtc: fix deadlock

16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 25 Aug 2008 18:26:33 +0000 (11:26 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: add X86_FEATURE_XMM4_2 definitions
  x86: fix cpufreq + sched_clock() regression
  x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3
  x86: do not enable TSC notifier if we don't need it
  x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs
  x86: fix: make PCI ECS for AMD CPUs hotplug capable
  x86: fix: do not run code in amd_bus.c on non-AMD CPUs

16 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 25 Aug 2008 18:26:02 +0000 (11:26 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched_clock: fix cpu_clock()

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Mon, 25 Aug 2008 18:25:10 +0000 (11:25 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: fix reference leak in pci_get_dev_by_id()
  PCI: shpchp: Rename duplicate slot name N as N-1, N-2, N-M...
  PCI: pciehp: Rename duplicate slot name N as N-1, N-2, N-M...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 25 Aug 2008 18:24:51 +0000 (11:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ASoC: Fix double free and memory leak in many codec drivers
  ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard

16 years ago[IA64] Fix __{in,out}s{w,l} to handle unaligned data
James Bottomley [Fri, 22 Aug 2008 21:15:22 +0000 (16:15 -0500)]
[IA64] Fix __{in,out}s{w,l} to handle unaligned data

Some ia64 systems produce several repeats of kernel messages like this:

 kernel unaligned access to 0xe000000644220466, ip=0xa000000100516fa1

This was tracked to ide code using the __cmd[] field in "struct request"
via the __outsw() function.  __cmd[] is a char array, so is not guaranteed
to be properly aligned when accessed as words.

Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoMerge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 25 Aug 2008 18:19:53 +0000 (11:19 -0700)]
Merge branch 'kvm-updates-2.6.27' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: fix userspace ABI breakage
  KVM: MMU: Fix torn shadow pte
  KVM: Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Mon, 25 Aug 2008 18:18:49 +0000 (11:18 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest: update commentry
  stop_machine: Remove deprecated stop_machine_run
  stop_machine: wean Xen off stop_machine_run
  virtio_balloon: fix towards_target when deflating balloon

16 years ago[module] Don't let gcc inline load_module()
Linus Torvalds [Mon, 25 Aug 2008 18:10:26 +0000 (11:10 -0700)]
[module] Don't let gcc inline load_module()

'load_module()' is a complex function that contains all the ELF section
logic, and inlining it is utterly insane.  But gcc will do it, simply
because there is only one call-site.  As a result, all the stack space
that is allocated for all the work to load the module will still be
active when we actually call the module init sequence, and the deep call
chain makes stack overflows happen.

And stack overflows are really hard to debug, because they not only
corrupt random pages below the stack, but also corrupt the thread_info
structure that is allocated under the stack.

In this case, Alan Brunelle reported some crazy oopses at bootup, after
loading the processor module that ends up doing complex ACPI stuff and
has quite a deep callchain.  This should fix it, and is the sane thing
to do regardless.

Cc: Alan D. Brunelle <Alan.Brunelle@hp.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[IA64] Fix ia64 build failure when CONFIG_SFC=m
Robin Holt [Tue, 29 Jul 2008 01:36:50 +0000 (20:36 -0500)]
[IA64] Fix ia64 build failure when CONFIG_SFC=m

CONFIG_SFC=m uses topology_core_siblings() which, for ia64, expects
cpu_core_map to be exported.  It is not.  This patch exports the needed
symbol.

Maintainers note: This really looks like the wrong thing to do ... it
would be much better for the kernel to export an API to provide
drivers like this with data they need (which in the case of this
driver seems to be an estimate of the effective parallelism available
on the platform).  But x86 has exported this forever ... so go with
the flow until such an API is defined.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[S390] dcss: fix build bug.
Heiko Carstens [Mon, 25 Aug 2008 16:13:27 +0000 (18:13 +0200)]
[S390] dcss: fix build bug.

Fix this compile bug:

  CC      drivers/s390/block/dcssblk.o
drivers/s390/block/dcssblk.c: In function 'dcssblk_add_store':
drivers/s390/block/dcssblk.c:387: error: implicit declaration of function 'dcssblk_get_segment_by_name'
drivers/s390/block/dcssblk.c:389: error: label 'release_gd' used but not defined
make[1]: *** [drivers/s390/block/dcssblk.o] Error 1
make: *** [drivers/s390/block/] Error 2

Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] Fix linker script.
Heiko Carstens [Mon, 25 Aug 2008 16:13:26 +0000 (18:13 +0200)]
[S390] Fix linker script.

6360b1fbb4a939efd34fc770c2ebd927c55506e0 ("move BUG_TABLE into RODATA")
causes this build bug (binutils 2.18.50.0.8.20080709, gcc 4.3.1):

  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
s390x-4.3.1-nm: .tmp_vmlinux2: File truncated
No valid symbol.
make: *** [.tmp_kallsyms2.S] Error 1

So fix this.

Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years agosched_clock: fix cpu_clock()
Peter Zijlstra [Mon, 25 Aug 2008 15:15:34 +0000 (17:15 +0200)]
sched_clock: fix cpu_clock()

This patch fixes 3 issues:

a) it removes the dependency on jiffies, because jiffies are incremented
   by a single CPU, and the tick is not synchronized between CPUs. Therefore
   relying on it to calculate a window to clip whacky TSC values doesn't work
   as it can drift around.

   So instead use [GTOD, GTOD+TICK_NSEC) as the window.

b) __update_sched_clock() did (roughly speaking):

   delta = sched_clock() - scd->tick_raw;
   clock += delta;

   Which gives exponential growth, instead of linear.

c) allows the sched_clock_cpu() value to warp the u64 without breaking.

the results are more reliable sched_clock() deltas:

           before       after   sched_clock

cpu_clock: 15750        51312   51488
cpu_clock: 59719        51052   50947
cpu_clock: 15879        51249   51061
cpu_clock: 1            50933   51198
cpu_clock: 1            50931   51039
cpu_clock: 1            51093   50981
cpu_clock: 1            51043   51040
cpu_clock: 1            50959   50938
cpu_clock: 1            50981   51011
cpu_clock: 1            51364   51212
cpu_clock: 1            51219   51273
cpu_clock: 1            51389   51048
cpu_clock: 1            51285   51611
cpu_clock: 1            50964   51137
cpu_clock: 1            50973   50968
cpu_clock: 1            50967   50972
cpu_clock: 1            58910   58485
cpu_clock: 1            51082   51025
cpu_clock: 1            50957   50958
cpu_clock: 1            50958   50957
cpu_clock: 1006128      51128   50971
cpu_clock: 1            51107   51155
cpu_clock: 1            51371   51081
cpu_clock: 1            51104   51365
cpu_clock: 1            51363   51309
cpu_clock: 1            51107   51160
cpu_clock: 1            51139   51100
cpu_clock: 1            51216   51136
cpu_clock: 1            51207   51215
cpu_clock: 1            51087   51263
cpu_clock: 1            51249   51177
cpu_clock: 1            51519   51412
cpu_clock: 1            51416   51255
cpu_clock: 1            51591   51594
cpu_clock: 1            50966   51374
cpu_clock: 1            50966   50966
cpu_clock: 1            51291   50948
cpu_clock: 1            50973   50867
cpu_clock: 1            50970   50970
cpu_clock: 998306       50970   50971
cpu_clock: 1            50971   50970
cpu_clock: 1            50970   50970
cpu_clock: 1            50971   50971
cpu_clock: 1            50970   50970
cpu_clock: 1            51351   50970
cpu_clock: 1            50970   51352
cpu_clock: 1            50971   50970
cpu_clock: 1            50970   50970
cpu_clock: 1            51321   50971
cpu_clock: 1            50974   51324

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: add X86_FEATURE_XMM4_2 definitions
Austin Zhang [Mon, 25 Aug 2008 15:14:51 +0000 (11:14 -0400)]
x86: add X86_FEATURE_XMM4_2 definitions

Added Intel processor SSE4.2 feature flag.

No in-tree user at the moment, but makes the tree-merging life easier
for the crypto tree.

Signed-off-by: Austin Zhang <austin.zhang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoocfs2: Increment the reference count of an already-active stack.
Joel Becker [Fri, 22 Aug 2008 21:30:10 +0000 (14:30 -0700)]
ocfs2: Increment the reference count of an already-active stack.

The ocfs2_stack_driver_request() function failed to increment the
refcount of an already-active stack.  It only did the increment on the
first reference.  Whoops.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Tested-by: Marcos Matsunaga <marcos.matsunaga@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years agoKVM: fix userspace ABI breakage
Adrian Bunk [Tue, 5 Aug 2008 22:36:09 +0000 (01:36 +0300)]
KVM: fix userspace ABI breakage

The following part of commit 9ef621d3be56e1188300476a8102ff54f7b6793f
(KVM: Support mixed endian machines) changed on the size of a struct
that is exported to userspace:

include/linux/kvm.h:

@@ -318,14 +318,14 @@ struct kvm_trace_rec {
  __u32 vcpu_id;
  union {
  struct {
- __u32 cycle_lo, cycle_hi;
+ __u64 cycle_u64;
  __u32 extra_u32[KVM_TRC_EXTRA_MAX];
  } cycle;
  struct {
  __u32 extra_u32[KVM_TRC_EXTRA_MAX];
  } nocycle;
  } u;
-};
+} __attribute__((packed));

Packing a struct was the correct idea, but it packed the wrong struct.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Fix torn shadow pte
Avi Kivity [Fri, 22 Aug 2008 16:19:38 +0000 (19:19 +0300)]
KVM: MMU: Fix torn shadow pte

The shadow code assigns a pte directly in one place, which is nonatomic on
i386 can can cause random memory references.  Fix by using an atomic setter.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot
Eduardo Habkost [Tue, 19 Aug 2008 23:00:08 +0000 (20:00 -0300)]
KVM: Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot

vmlinux.lds expects the fixup code to be on a section named .fixup. The
.text.fixup section is not mentioned on vmlinux.lds, and is included on
the resulting vmlinux (just after .text) only because of ld heuristics on
placing orphan sections.

However, placing .text.fixup outside .text breaks the definition of
_etext, making it exclude the .text.fixup contents. That makes .text.fixup
be ignored by the kernel initialization code that needs to know about
section locations, such as the code setting page protection bits.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agolguest: update commentry
Rusty Russell [Tue, 26 Aug 2008 05:19:27 +0000 (00:19 -0500)]
lguest: update commentry

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agostop_machine: Remove deprecated stop_machine_run
Rusty Russell [Tue, 26 Aug 2008 05:19:27 +0000 (00:19 -0500)]
stop_machine: Remove deprecated stop_machine_run

Everyone should be using stop_machine() now.  The staged API
transition helped life in linux-next.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agostop_machine: wean Xen off stop_machine_run
Rusty Russell [Tue, 26 Aug 2008 05:19:26 +0000 (00:19 -0500)]
stop_machine: wean Xen off stop_machine_run

This is the last use of (the deprecated) stop_machine_run in the tree.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
16 years agovirtio_balloon: fix towards_target when deflating balloon
Anthony Liguori [Mon, 18 Aug 2008 22:15:31 +0000 (17:15 -0500)]
virtio_balloon: fix towards_target when deflating balloon

Both v and vb->num_pages are u32 and unsigned int respectively.  If v is less
than vb->num_pages (and it is, when deflating the balloon), the result is a
very large 32-bit number.  Since we're returning a s64, instead of getting the
same negative number we desire, we get a very large positive number.

This handles the case where v < vb->num_pages and ensures we get a small,
negative, s64 as the result.

Rusty: please push this for 2.6.27-rc4.  It's probably appropriate for the
stable tree too as it will cause an unexpected OOM when ballooning.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (simplified)
16 years agox86: fix cpufreq + sched_clock() regression
Peter Zijlstra [Mon, 25 Aug 2008 11:35:06 +0000 (13:35 +0200)]
x86: fix cpufreq + sched_clock() regression

I noticed that my sched_clock() was slow on a number of machine, so I
started looking at cpufreq.

The below seems to fix the problem for me.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'linus' into x86/urgent
Ingo Molnar [Mon, 25 Aug 2008 12:39:12 +0000 (14:39 +0200)]
Merge branch 'linus' into x86/urgent

16 years agoALSA: ASoC: Fix double free and memory leak in many codec drivers
Jean Delvare [Mon, 25 Aug 2008 10:49:20 +0000 (11:49 +0100)]
ALSA: ASoC: Fix double free and memory leak in many codec drivers

Many SoC audio codec drivers have improper freeing of memory in error
paths.

* codec is allocated in the platform device probe function, but is not
  freed there in case of error. Instead it is freed in the i2c device
  probe function's error path. However the success or failure of both
  functions is not linked, so this could result in a double free (if
  the platform device is successfully probed, the i2c device probing
  fails and then the platform driver is unregistered.)

* codec->private_data is allocated in many platform device probe
  functions but not freed in their error paths.

This patch hopefully solves all these problems.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agox86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3
Yinghai Lu [Mon, 25 Aug 2008 07:56:08 +0000 (00:56 -0700)]
x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3

David Witbrodt tracked down (and bisected) a hpet bootup hang on his
system to the following problem: a BIOS bug made the hpet device
visible as a generic PCI device. If e820 reserved entries happen to
be registered first in the resource tree [which v2.6.26 started doing],
then the PCI code will reallocate that device's BAR to some other
address - breaking timer IRQs and hanging the system.

( Normally hpet devices are hidden by the BIOS from the OS's PCI
  discovery via chipset magic. Sometimes the hpet is not a PCI device
  at all. )

Solve this fundamental fragility by making non-PCI platform drivers
insert resources into the resource tree even if it overlaps the e820
reserved entry, to keep the resource manager from updating the BAR.

Also do these checks for the ioapic and mmconfig addresses, and emit
a warning if this happens.

Bisected-by: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoALSA: CA0106 on MSI K8N Diamond PLUS Motherboard
Travis Place [Mon, 25 Aug 2008 06:11:50 +0000 (08:11 +0200)]
ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard

Correct a previous patch for the ca0106 onboard the MSI K8N Diamond PLUS
motherboard. Confirmed to have Line/Mic/Aux working for input, and sound
output working as expected.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[PATCH] deal with the first call of ->show() generating no output
Al Viro [Sun, 24 Aug 2008 11:45:33 +0000 (07:45 -0400)]
[PATCH] deal with the first call of ->show() generating no output

seq_read() has a subtle bug - we want the first loop there to go
until at least one *non-empty* record had fit entirely into buffer.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix ->llseek() for a bunch of directories
Al Viro [Sun, 24 Aug 2008 11:24:41 +0000 (07:24 -0400)]
[PATCH] fix ->llseek() for a bunch of directories

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix regular readdir() and friends
Al Viro [Tue, 12 Aug 2008 04:28:24 +0000 (00:28 -0400)]
[PATCH] fix regular readdir() and friends

Handling of -EOVERFLOW.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix hpux_getdents()
Al Viro [Tue, 12 Aug 2008 04:04:22 +0000 (00:04 -0400)]
[PATCH] fix hpux_getdents()

Missing checks for -EFAULT, broken handling of overflow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix osf_getdirents()
Al Viro [Tue, 12 Aug 2008 03:51:22 +0000 (23:51 -0400)]
[PATCH] fix osf_getdirents()

Return value of filldir callback is just "should we stop here"; it's
not a usable channel for passing error values (i.e. ->readdir() will
forget anything except "is it non-zero").

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] ntfs: use d_add_ci
Christoph Hellwig [Thu, 7 Aug 2008 21:50:21 +0000 (23:50 +0200)]
[PATCH] ntfs: use d_add_ci

d_add_ci was lifted 1:1 from ntfs.  Change ntfs to use the common
version.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] change d_add_ci argument ordering
Christoph Hellwig [Thu, 7 Aug 2008 21:49:07 +0000 (23:49 +0200)]
[PATCH] change d_add_ci argument ordering

As pointed out during review d_add_ci argument order should match d_add,
so switch the dentry and inode arguments.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix efs_lookup()
Al Viro [Mon, 11 Aug 2008 15:33:57 +0000 (11:33 -0400)]
[PATCH] fix efs_lookup()

it needs to use d_splice_alias(), not d_add()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] proc: inode number fixlet
Alexey Dobriyan [Sat, 2 Aug 2008 03:30:48 +0000 (07:30 +0400)]
[PATCH] proc: inode number fixlet

Ouch, if number taken from IDA is too big, the intent was to signal an
error, not check for overflow and still do overflowing addition.

One still needs 2^28 proc entries to notice this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agosparc: Add target for a stripped kernel
Martin Habets [Tue, 19 Aug 2008 05:37:18 +0000 (22:37 -0700)]
sparc: Add target for a stripped kernel

Add a target for a stripped kernel. This is used for the various
packaging targets (*-pkg).

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc64: Make NUMA depend upon SMP.
David S. Miller [Tue, 19 Aug 2008 03:35:16 +0000 (20:35 -0700)]
sparc64: Make NUMA depend upon SMP.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agox86: do not enable TSC notifier if we don't need it
Linus Torvalds [Sun, 24 Aug 2008 18:52:06 +0000 (11:52 -0700)]
x86: do not enable TSC notifier if we don't need it

Impact: crash on non-TSC-equipped CPUs

Don't enable the TSC notifier if we *either*:

1. don't have a CPU, or
2. have a CPU with constant TSC.

In either of those cases, the notifier is either damaging (1) or useless(2).

From: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agodrm: don't set the signal blocker on the master process.
Dave Airlie [Sun, 24 Aug 2008 07:02:26 +0000 (17:02 +1000)]
drm: don't set the signal blocker on the master process.

There is a problem with debugging the X server and gdb crashes in
the xkb startup code.

This avoids the problem by allowing the master process to get signals.
It should be safe as the signal blocker is mainly so that you can
Ctrl-Z a 3D application without locking up the whole box. Ctrl-Z the
X server isn't something many people do.

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agodrm: don't call the vblank tasklet with irqs disabled.
Thomas Hellstrom [Sun, 24 Aug 2008 07:00:00 +0000 (17:00 +1000)]
drm: don't call the vblank tasklet with irqs disabled.

If a specific tasklet shares data with irq context,
it needs to take a private irq-blocking spinlock within
the tasklet itself.

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agor300: Fix cliprect emit
Nicolai Haehnle [Tue, 12 Aug 2008 23:50:12 +0000 (09:50 +1000)]
r300: Fix cliprect emit

This makes our handling of cliprects sane. drm_clip_rect always has exclusiv
bottom-right corners, but the hardware expects inclusive bottom-right corner
so we adjust this here.

This complements Michel Daenzer's commit 57aea290e1e0a26d1e74df6cff777eb9f03
to Mesa. See also http://bugs.freedesktop.org/show_bug.cgi?id=16123

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agodrm/radeon: r300_cmdbuf: Always emit INDX_BUFFER immediately after DRAW_INDEX
Nicolai Haehnle [Tue, 12 Aug 2008 23:49:15 +0000 (09:49 +1000)]
drm/radeon: r300_cmdbuf: Always emit INDX_BUFFER immediately after DRAW_INDEX

DRAW_INDEX writes a vertex count to VAP_VF_CNTL. Docs say that behaviour
is undefined (i.e. lockups happen) when this write is not followed by the
right number of vertex indices.

Thus we used to do the wrong thing when drawing across many cliprects was
necessary, because we emitted a sequence
DRAW_INDEX, DRAW_INDEX, INDX_BUFFER, INDX_BUFFER
instead of
DRAW_INDEX, INDX_BUFFER, DRAW_INDEX, INDX_BUFFER
The latter is what we're doing now and which ought to be correct.

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agoradeon: fix some hard lockups on r3/4/500s
Jerome Glisse [Tue, 12 Aug 2008 23:46:31 +0000 (09:46 +1000)]
radeon: fix some hard lockups on r3/4/500s

This patch should fix hard lockup and convert them in
softlockup (ie you can ssh the box but the gpu is busted
and we are waiting in loop for it to come back to reason).

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agomv643xx_eth: bump version to 1.3
Lennert Buytenhek [Sun, 24 Aug 2008 05:33:05 +0000 (07:33 +0200)]
mv643xx_eth: bump version to 1.3

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
16 years agoFix oops in acer_wmi driver (acer_wmi_init)
Arjan van de Ven [Sun, 24 Aug 2008 04:45:21 +0000 (21:45 -0700)]
Fix oops in acer_wmi driver (acer_wmi_init)

The acer_wmi driver does a DMI scan for quirks, and then sets flags into the
"interface" datastructure for some cases. However, the quirks happen real early
before "interface" is per se initialized from NULL.

The patch below 1) adds a NULL pointer check and 2) (re)runs the quirks at the
end, when "interface" has it's final value.

Reported-by: kerneloops.org
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@vger.kernel.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomv643xx_eth: enforce multiple-of-8-bytes receive buffer size restriction
Lennert Buytenhek [Sun, 24 Aug 2008 01:00:20 +0000 (03:00 +0200)]
mv643xx_eth: enforce multiple-of-8-bytes receive buffer size restriction

The mv643xx_eth hardware ignores the lower three bits of the buffer
size field in receive descriptors, causing the reception of full-sized
packets to fail at some MTUs.  Fix this by rounding the size of
allocated receive buffers up to a multiple of eight bytes.

While we are at it, add a bit of extra space to each receive buffer so
that we can handle multiple vlan tags on ingress.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
16 years agomv643xx_eth: fix NULL pointer dereference in rxq_process()
Lennert Buytenhek [Sun, 24 Aug 2008 00:33:47 +0000 (02:33 +0200)]
mv643xx_eth: fix NULL pointer dereference in rxq_process()

When we are low on memory, the assumption that every descriptor in the
receive ring will have an skbuff associated with it does not hold.

rxq_process() was assuming that if the receive descriptor it is working
on is not owned by the hardware, it can safely be processed and handed
to the networking stack.  But a descriptor in the receive ring not being
owned by the hardware can also happen when we are low on memory and did
not manage to refill the receive ring fully.

This patch changes rxq_process()'s bailout condition from "the first
receive descriptor to be processed is owned by the hardware" to "the
first receive descriptor to be processed is owned by the hardware OR
the number of valid receive descriptors in the ring is zero".

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
16 years agomv643xx_eth: fix inconsistent lock semantics
Lennert Buytenhek [Sun, 24 Aug 2008 00:30:42 +0000 (02:30 +0200)]
mv643xx_eth: fix inconsistent lock semantics

Nicolas Pitre noted that mv643xx_eth_poll was incorrectly using
non-IRQ-safe locks while checking whether to wake up the netdevice's
transmit queue.  Convert the locking to *_irq() variants, since we
are running from softirq context where interrupts are enabled.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
16 years agomv643xx_eth: fix double add_timer() on the receive oom timer
Lennert Buytenhek [Sat, 23 Aug 2008 23:59:05 +0000 (01:59 +0200)]
mv643xx_eth: fix double add_timer() on the receive oom timer

Commit 12e4ab79cd828563dc090d2117dc8626b344bc8f ("mv643xx_eth: be
more agressive about RX refill") changed the condition for the receive
out-of-memory timer to be scheduled from "the receive ring is empty"
to "the receive ring is not full".

This can lead to a situation where the receive out-of-memory timer is
pending because a previous rxq_refill() didn't manage to refill the
receive ring entirely as a result of being out of memory, and
rxq_refill() is then called again as a side effect of a packet receive
interrupt, and that rxq_refill() call then again does not succeed to
refill the entire receive ring with fresh empty skbuffs because we are
still out of memory, and then tries to call add_timer() on the already
scheduled out-of-memory timer.

This patch fixes this issue by changing the add_timer() call in
rxq_refill() to a mod_timer() call.  If the OOM timer was not already
scheduled, this will behave as before, whereas if it was already
scheduled, this patch will push back its firing time a bit, which is
safe because we've (unsuccessfully) attempted to refill the receive
ring just before we do this.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
16 years agomv643xx_eth: fix NAPI 'rotting packet' issue
Lennert Buytenhek [Sun, 24 Aug 2008 00:45:32 +0000 (02:45 +0200)]
mv643xx_eth: fix NAPI 'rotting packet' issue

When a receive interrupt occurs, mv643xx_eth would first process the
receive descriptors and then ACK the receive interrupt, instead of the
other way round.

This would leave a small race window between processing the last
receive descriptor and clearing the receive interrupt status in which
a new packet could come in, which would then 'rot' in the receive
ring until the next receive interrupt would come in.

Fix this by ACKing (clearing) the receive interrupt condition before
processing the receive descriptors.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 23 Aug 2008 19:14:42 +0000 (12:14 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ipv6: protocol for address routes
  icmp: icmp_sk() should not use smp_processor_id() in preemptible code
  pkt_sched: Fix qdisc list locking
  pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race
  sctp: fix potential panics in the SCTP-AUTH API.

16 years agoremoved unused #include <linux/version.h>'s
Adrian Bunk [Sun, 17 Aug 2008 14:36:59 +0000 (17:36 +0300)]
removed unused #include <linux/version.h>'s

This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: fix deadlock
Ingo Molnar [Sat, 23 Aug 2008 15:59:07 +0000 (17:59 +0200)]
rtc: fix deadlock

if get_rtc_time() is _ever_ called with IRQs off, we deadlock badly
in it, waiting for jiffies to increment.

So make the code more robust by doing an explicit mdelay(20).

This solves a very hard to reproduce/debug hard lockup reported
by Mikael Pettersson.

Reported-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs
Rafael J. Wysocki [Fri, 22 Aug 2008 20:23:09 +0000 (22:23 +0200)]
x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs

During CPU hot-remove the sysfs directory created by
threshold_create_bank(), defined in
arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before
its parent directory, created by mce_create_device(), defined in
arch/x86/kernel/cpu/mcheck/mce_64.c .  Moreover, when the CPU in
question is hotplugged again, obviously the latter has to be created
before the former.  At present, the right ordering is not enforced,
because all of these operations are carried out by CPU hotplug
notifiers which are not appropriately ordered with respect to each
other.  This leads to serious problems on systems with two or more
multicore AMD CPUs, among other things during suspend and hibernation.

Fix the problem by placing threshold bank CPU hotplug callbacks in
mce_cpu_callback(), so that they are invoked at the right places,
if defined.  Additionally, use kobject_del() to remove the sysfs
directory associated with the kobject created by
kobject_create_and_add() in threshold_create_bank(), to prevent the
kernel from crashing during CPU hotplug operations on systems with
two or more multicore AMD CPUs.

This patch fixes bug #11337.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Andi Kleen <andi@firstfloor.org>
Tested-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix: make PCI ECS for AMD CPUs hotplug capable
Robert Richter [Fri, 22 Aug 2008 18:23:38 +0000 (20:23 +0200)]
x86: fix: make PCI ECS for AMD CPUs hotplug capable

Until now, PCI ECS setup was performed at boot time only and for cpus
that are enabled then. This patch fixes this and adds cpu hotplug.

Tests sequence (check if ECS bit is set when bringing cpu online again):

 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00404010
 # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr
 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00400010
 # echo 0 > /sys/devices/system/cpu/cpu1/online
 # echo 1 > /sys/devices/system/cpu/cpu1/online
 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00404010

Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix: do not run code in amd_bus.c on non-AMD CPUs
Robert Richter [Fri, 22 Aug 2008 18:23:37 +0000 (20:23 +0200)]
x86: fix: do not run code in amd_bus.c on non-AMD CPUs

Jan Beulich wrote:

> Even worse - this would even try to access the MSR on non-AMD CPUs
> (currently probably prevented just by the fact that only AMD ones use
> family values of 0x10 or higher).

This patch adds cpu vendor check to the postcore_initcalls.

Reported-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoipv6: protocol for address routes
Stephen Hemminger [Sat, 23 Aug 2008 12:16:46 +0000 (05:16 -0700)]
ipv6: protocol for address routes

This fixes a problem spotted with zebra, but not sure if it is
necessary a kernel problem.  With IPV6 when an address is added to an
interface, Zebra creates a duplicate RIB entry, one as a connected
route, and other as a kernel route.

When an address is added to an interface the RTN_NEWADDR message
causes Zebra to create a connected route. In IPV4 when an address is
added to an interface a RTN_NEWROUTE message is set to user space with
the protocol RTPROT_KERNEL. Zebra ignores these messages, because it
already has the connected route.

The problem is that route created in IPV6 has route protocol ==
RTPROT_BOOT.  Was this a design decision or a bug? This fixes it. Same
patch applies to both net-2.6 and stable.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoicmp: icmp_sk() should not use smp_processor_id() in preemptible code
Denis V. Lunev [Sat, 23 Aug 2008 11:43:33 +0000 (04:43 -0700)]
icmp: icmp_sk() should not use smp_processor_id() in preemptible code

Pass namespace into icmp_xmit_lock, obtain socket inside and return
it as a result for caller.

Thanks Alexey Dobryan for this report:

Steps to reproduce:

CONFIG_PREEMPT=y
CONFIG_DEBUG_PREEMPT=y
tracepath <something>

BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
caller is icmp_sk+0x15/0x30
Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1

Call Trace:
 [<ffffffff8031af14>] debug_smp_processor_id+0xe4/0xf0
 [<ffffffff80409405>] icmp_sk+0x15/0x30
 [<ffffffff8040a17b>] icmp_send+0x4b/0x3f0
 [<ffffffff8025a415>] ? trace_hardirqs_on_caller+0xd5/0x160
 [<ffffffff8025a4ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8023a475>] ? local_bh_enable_ip+0x95/0x110
 [<ffffffff804285b9>] ? _spin_unlock_bh+0x39/0x40
 [<ffffffff8025a26c>] ? mark_held_locks+0x4c/0x90
 [<ffffffff8025a4ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8025a415>] ? trace_hardirqs_on_caller+0xd5/0x160
 [<ffffffff803e91b4>] ip_fragment+0x8d4/0x900
 [<ffffffff803e7030>] ? ip_finish_output2+0x0/0x290
 [<ffffffff803e91e0>] ? ip_finish_output+0x0/0x60
 [<ffffffff803e6650>] ? dst_output+0x0/0x10
 [<ffffffff803e922c>] ip_finish_output+0x4c/0x60
 [<ffffffff803e92e3>] ip_output+0xa3/0xf0
 [<ffffffff803e68d0>] ip_local_out+0x20/0x30
 [<ffffffff803e753f>] ip_push_pending_frames+0x27f/0x400
 [<ffffffff80406313>] udp_push_pending_frames+0x233/0x3d0
 [<ffffffff804067d1>] udp_sendmsg+0x321/0x6f0
 [<ffffffff8040d155>] inet_sendmsg+0x45/0x80
 [<ffffffff803b967f>] sock_sendmsg+0xdf/0x110
 [<ffffffff8024a100>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff80257ce5>] ? validate_chain+0x415/0x1010
 [<ffffffff8027dc10>] ? __do_fault+0x140/0x450
 [<ffffffff802597d0>] ? __lock_acquire+0x260/0x590
 [<ffffffff803b9e55>] ? sockfd_lookup_light+0x45/0x80
 [<ffffffff803ba50a>] sys_sendto+0xea/0x120
 [<ffffffff80428e42>] ? _spin_unlock_irqrestore+0x42/0x80
 [<ffffffff803134bc>] ? __up_read+0x4c/0xb0
 [<ffffffff8024e0c6>] ? up_read+0x26/0x30
 [<ffffffff8020b8bb>] system_call_fastpath+0x16/0x1b

icmp6_sk() is similar.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PATCH] configfs: Consolidate locking around configfs_detach_prep() in configfs_rmdir()
Louis Rilling [Fri, 15 Aug 2008 19:37:23 +0000 (12:37 -0700)]
[PATCH] configfs: Consolidate locking around configfs_detach_prep() in configfs_rmdir()

It appears that configfs_rmdir() can protect configfs_detach_prep() retries with
less calls to {spin,mutex}_{lock,unlock}, and a cleaner code.

This patch does not change any behavior, except that it removes two useless
lock/unlock pairs having nothing inside to protect and providing a useless
barrier.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <Joel.Becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years agoocfs2: correctly set i_blocks after inline dir gets expanded
Mark Fasheh [Tue, 5 Aug 2008 18:32:46 +0000 (11:32 -0700)]
ocfs2: correctly set i_blocks after inline dir gets expanded

We were setting i_blocks based on allocation before the extent insert, which
is wrong as the value is a calculation based on ip_clusters which gets
updated as a result of the insert. This patch moves the line in question
to just after the call to ocfs2_insert_extent().

Without this fix, inline directories were temporarily having an i_blocks
value of zero immediately after expansion to extents.

Reported-and-tested-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years agoocfs2: Jump to correct label in ocfs2_expand_inline_dir()
Tao Ma [Thu, 21 Aug 2008 06:14:27 +0000 (14:14 +0800)]
ocfs2: Jump to correct label in ocfs2_expand_inline_dir()

When we fail to insert extent in ocfs2_expand_inline_dir(), we should go to
out_commit, not out.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years agoocfs2: Fix sleep-with-spinlock recovery regression
Mark Fasheh [Wed, 20 Aug 2008 00:20:28 +0000 (17:20 -0700)]
ocfs2: Fix sleep-with-spinlock recovery regression

This fixes a bug introduced with 539d8264093560b917ee3afe4c7f74e5da09d6a5:
    [PATCH 2/2] ocfs2: Fix race between mount and recovery

ocfs2_mark_dead_nodes() was reading journal inodes while holding the
spinlock protecting our in-memory recovery state. The fix is very simple -
the disk state is protected by a cluster lock that's already held, so we
just move the spinlock down past the read.

Reviewed-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>