pandora-kernel.git
16 years agosparc64: use compat_sys_utimes instead of home-grown local copy.
David S. Miller [Mon, 5 May 2008 19:32:39 +0000 (12:32 -0700)]
sparc64: use compat_sys_utimes instead of home-grown local copy.

Noticed by Christoph Hellwig.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Mon, 5 May 2008 17:17:30 +0000 (10:17 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdb: kconfig fix xconfig/menuconfig element
  kgdb: fix signedness mixmatches, add statics, add declaration to header
  kgdb: 1000 loops for the single step test in kgdbts
  kgdb: trivial sparse fixes in kgdb test-suite
  kgdb: minor documentation fixes

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 5 May 2008 17:16:42 +0000 (10:16 -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] soc - fix S3C2410 i2s programming error
  [ALSA] soc - fix s3c2410 PCM breakage
  [ALSA] ac97 - Add a workaround for broken quirk for VT1617A codec
  [ALSA] Revert migration to alc_set_pin_output() in alc861_auto_set_output_and_unmute()
  [ALSA] fm801 - Fix kconfig dependency mess of fm801-tea575x
  [ALSA] hda - Support IDT 92HD206 codec
  [ALSA] pcsp: Fix build with CONFIG_PM=n

16 years agox86 PCI: call dmi_check_pciprobe()
Yinghai Lu [Mon, 14 Apr 2008 22:40:37 +0000 (15:40 -0700)]
x86 PCI: call dmi_check_pciprobe()

this change:

| commit 08f1c192c3c32797068bfe97738babb3295bbf42
| Author: Muli Ben-Yehuda <muli@il.ibm.com>
| Date:   Sun Jul 22 00:23:39 2007 +0300
|
|    x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata
|
|    This patch introduces struct pci_sysdata to x86 and x86-64, and
|    converts the existing two users (NUMA, Calgary) to use it.
|
|    This lays the groundwork for having other users of sysdata, such as
|    the PCI domains work.
|
|    The Calgary bits are tested, the NUMA bits just look ok.

replaces pcibios_scan_root with pci_scan_bus_parented...

but in pcibios_scan_root we have a DMI check:

    dmi_check_system(pciprobe_dmi_table);

when when have several peer root buses this could be called multiple
times (which is bad), so move that call to pci_access_init().

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agox86/pci: add pci=skip_isa_align command lines.
Yinghai Lu [Thu, 27 Mar 2008 08:31:18 +0000 (01:31 -0700)]
x86/pci: add pci=skip_isa_align command lines.

so we don't align the io port start address for pci cards.

also move out dmi check out acpi.c, because it has nothing to do with acpi.
it could spare some calling when we have several peer root buses.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoRemoval of FUTEX_FD
Eric Sesterhenn [Fri, 25 Jan 2008 09:40:46 +0000 (10:40 +0100)]
Removal of FUTEX_FD

Since FUTEX_FD was scheduled for removal in June 2007 lets remove it.

Google Code search found no users for it and NGPT was abandoned in 2003
according to IBM.  futex.h is left untouched to make sure the id does
not get reassigned.  Since queue_me() has no users left it is commented
out to avoid a warning, i didnt remove it completely since it is part of
the internal api (matching unqueue_me())

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed rest)
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokgdb: kconfig fix xconfig/menuconfig element
Jan Engelhardt [Fri, 25 Apr 2008 16:35:29 +0000 (18:35 +0200)]
kgdb: kconfig fix xconfig/menuconfig element

Kconfig.kgdb: fix menuconfig element

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb: fix signedness mixmatches, add statics, add declaration to header
Harvey Harrison [Thu, 24 Apr 2008 21:57:23 +0000 (16:57 -0500)]
kgdb: fix signedness mixmatches, add statics, add declaration to header

Noticed by sparse:
arch/x86/kernel/kgdb.c:556:15: warning: symbol 'kgdb_arch_pc' was not declared. Should it be static?
kernel/kgdb.c:149:8: warning: symbol 'kgdb_do_roundup' was not declared. Should it be static?
kernel/kgdb.c:193:22: warning: symbol 'kgdb_arch_pc' was not declared. Should it be static?
kernel/kgdb.c:712:5: warning: symbol 'remove_all_break' was not declared. Should it be static?

Related to kgdb_hex2long:
arch/x86/kernel/kgdb.c:371:28: warning: incorrect type in argument 2 (different signedness)
arch/x86/kernel/kgdb.c:371:28:    expected long *long_val
arch/x86/kernel/kgdb.c:371:28:    got unsigned long *<noident>
kernel/kgdb.c:469:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:469:27:    expected long *long_val
kernel/kgdb.c:469:27:    got unsigned long *<noident>
kernel/kgdb.c:470:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:470:27:    expected long *long_val
kernel/kgdb.c:470:27:    got unsigned long *<noident>
kernel/kgdb.c:894:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:894:27:    expected long *long_val
kernel/kgdb.c:894:27:    got unsigned long *<noident>
kernel/kgdb.c:895:27: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:895:27:    expected long *long_val
kernel/kgdb.c:895:27:    got unsigned long *<noident>
kernel/kgdb.c:1127:28: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:1127:28:    expected long *long_val
kernel/kgdb.c:1127:28:    got unsigned long *<noident>
kernel/kgdb.c:1132:25: warning: incorrect type in argument 2 (different signedness)
kernel/kgdb.c:1132:25:    expected long *long_val
kernel/kgdb.c:1132:25:    got unsigned long *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb: 1000 loops for the single step test in kgdbts
Jason Wessel [Thu, 24 Apr 2008 21:57:23 +0000 (16:57 -0500)]
kgdb: 1000 loops for the single step test in kgdbts

The single step test is not terribly costly and it should be able to
pass at 1000 loops successfully in under 1 second.  A non-kgdb timing
regression was found using this test, but it did not occur frequently
because by default the test was only executed a single time.

This patch changes the default for the single step test to 1000
iterations and allows for individual configuration of the single step
test to further exercise the kgdb subsystem when needed.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb: trivial sparse fixes in kgdb test-suite
Harvey Harrison [Thu, 24 Apr 2008 21:57:23 +0000 (16:57 -0500)]
kgdb: trivial sparse fixes in kgdb test-suite

Shadowed variable and integer as NULL pointer fixes:
drivers/misc/kgdbts.c:877:6: warning: symbol 'sys_open_test' shadows an earlier one
drivers/misc/kgdbts.c:537:27: originally declared here
drivers/misc/kgdbts.c:378:22: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:386:22: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:468:30: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:472:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:502:30: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:506:30: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:509:30: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:523:20: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:527:20: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:530:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:541:21: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:545:21: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:548:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:559:30: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:563:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:573:16: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:574:19: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:578:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:588:16: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:589:19: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:593:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:602:16: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:604:15: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:925:3: warning: Using plain integer as NULL pointer
drivers/misc/kgdbts.c:938:3: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb: minor documentation fixes
grzegorz.chwesewicz@chilan.com [Thu, 24 Apr 2008 21:57:22 +0000 (16:57 -0500)]
kgdb: minor documentation fixes

Two minor fixes to the kgdb documentation.

Signed-off-by: Grzegorz Chwesewicz, Chilan <grzegorz.chwesewicz@chilan.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years ago[ALSA] soc - fix S3C2410 i2s programming error
Davide Rizzo [Mon, 5 May 2008 12:59:39 +0000 (14:59 +0200)]
[ALSA] soc - fix S3C2410 i2s programming error

S3C2410 i2s driver currently manages only i2s protocol (and not left
justified one) and slave mode.
With this small patch, other modes are possible.

Signed-off-by: Davide Rizzo <davide@elpa.it>
Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] soc - fix s3c2410 PCM breakage
Davide Rizzo [Mon, 5 May 2008 12:56:07 +0000 (14:56 +0200)]
[ALSA] soc - fix s3c2410 PCM breakage

S3C2410 pcm doesn't work.
s3c2410_dma_request() now returns the channel number and not 0 if OK.

Signed-off-by: Davide Rizzo <davide@elpa.it>
Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ac97 - Add a workaround for broken quirk for VT1617A codec
Takashi Iwai [Sat, 3 May 2008 16:46:56 +0000 (18:46 +0200)]
[ALSA] ac97 - Add a workaround for broken quirk for VT1617A codec

On boards with VT1617A codec, the sound disappears suddenly.
This looks like a problem with HPE-bit control that is supposed to be
set in patch_vt1617a().  However, on such problematic hardwares, the
bit is actually reset mysteriously.

The patch adds a workaround for the wrong quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] Revert migration to alc_set_pin_output() in alc861_auto_set_output_and_unmute()
Jacek Luczak [Sat, 3 May 2008 16:41:23 +0000 (18:41 +0200)]
[ALSA] Revert migration to alc_set_pin_output() in alc861_auto_set_output_and_unmute()

Change done by:
        commit f6c7e5461e9046445d50c5c7a9a4587824239623
        [ALSA] hda-codec - Fix auto-configuration of Realtek codecs
broke sound on ALC861 Analog.

Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] fm801 - Fix kconfig dependency mess of fm801-tea575x
Takashi Iwai [Fri, 2 May 2008 10:31:51 +0000 (12:31 +0200)]
[ALSA] fm801 - Fix kconfig dependency mess of fm801-tea575x

FM801-tea575x tuner has a reverse selection to V4L1 and this causes
nasty dependency problems.

The patch simplifies the dependency with a normal
"depends on VIDEO_V4L1".  This decreases the usability but fixes bugs,
yeah.  If any better feature like "requires" is introduced to kbuild
in future, we'll be able to switch it...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda - Support IDT 92HD206 codec
Takashi Iwai [Fri, 2 May 2008 10:28:02 +0000 (12:28 +0200)]
[ALSA] hda - Support IDT 92HD206 codec

Added the support for IDT 92HD206 codec chip.
It's compatible with STAC927x.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] pcsp: Fix build with CONFIG_PM=n
Johann Felix Soden [Fri, 2 May 2008 07:54:31 +0000 (09:54 +0200)]
[ALSA] pcsp: Fix build with CONFIG_PM=n

sound/drivers/pcsp/pcsp.c: In function 'pcsp_suspend':
sound/drivers/pcsp/pcsp.c:201: error: implicit declaration of function 'snd_pcm_suspend_all'

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
CC: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoirda: fix !PNP support for drivers/net/irda/smsc-ircc2.c
Ingo Molnar [Mon, 5 May 2008 08:06:54 +0000 (01:06 -0700)]
irda: fix !PNP support for drivers/net/irda/smsc-ircc2.c

x86.git testing found this build bug on v2.6.26-rc1:

  ERROR: "pnp_get_resource" [drivers/net/irda/smsc-ircc2.ko] undefined!
  make[1]: *** [__modpost] Error 1
  make: *** [modules] Error 2

the driver did not anticipate the case of !CONFIG_PNP which is rare but
still possible. Instead of restricting the driver to PNP-only in the
Kconfig space, add the (trivial) dummy struct pnp_driver - this is that
other drivers use in the !PNP case too.

The driver itself can in theory be initialized on !PNP too in certain
cases, via smsc_ircc_legacy_probe().

Patch only minimally build tested, i dont have this hardware.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoirda: fix !PNP support in drivers/net/irda/nsc-ircc.c
Ingo Molnar [Mon, 5 May 2008 08:04:06 +0000 (01:04 -0700)]
irda: fix !PNP support in drivers/net/irda/nsc-ircc.c

x86.git testing found the following build failure in latest -git:

 drivers/built-in.o: In function `nsc_ircc_pnp_probe':
 nsc-ircc.c:(.text+0xdf1b6): undefined reference to `pnp_get_resource'
 nsc-ircc.c:(.text+0xdf1d4): undefined reference to `pnp_get_resource'
 nsc-ircc.c:(.text+0xdf1ee): undefined reference to `pnp_get_resource'
 nsc-ircc.c:(.text+0xdf237): undefined reference to `pnp_get_resource'
 nsc-ircc.c:(.text+0xdf24c): undefined reference to `pnp_get_resource'
 drivers/built-in.o:nsc-ircc.c:(.text+0xdf266): more undefined references to `pnp_get_resource' follow
 make: *** [.tmp_vmlinux1] Error 1

triggered via this config:

  http://redhat.com/~mingo/misc/config-Sat_May__3_20_53_13_CEST_2008.bad

while generally most users will have PNP enabled, drivers can support
non-PNP build mode too - and most drivers implement it. That is typically
done by providing a dummy pnp_driver structure that will not probe anything.

The fallback routines in the driver will handle this dumber mode of
operation too.

This patch implements that. I have not tested whether this actually
works on real hardware so take care. It does resolve the build bug.

[ Another solution that is used by a few drivers is to exclude the driver
  in the Kconfig if PNP is disabled, via "depends on PNP", but this would
  limit the availability of the driver needlessly. ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosbus: Fix bpp driver build.
David S. Miller [Mon, 5 May 2008 07:33:58 +0000 (00:33 -0700)]
sbus: Fix bpp driver build.

Using the variable name 'dev_name' in the top-level namespace is a bad
idea.

This conflicts with linux/device.h's inline function of the same name.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet_cls_act: Make act_simple use of netlink policy.
Jamal Hadi Salim [Mon, 5 May 2008 07:22:35 +0000 (00:22 -0700)]
net_cls_act: Make act_simple use of netlink policy.

Convert to netlink helpers by using netlink policy validation.
As a side effect fixes a leak.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[POWERPC] Assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 20:34:05 +0000 (06:34 +1000)]
[POWERPC] Assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.
No need to check for data!=NULL after that.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
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 ago[POWERPC] devres: Add devm_ioremap_prot()
Emil Medve [Fri, 2 May 2008 20:34:04 +0000 (06:34 +1000)]
[POWERPC] devres: Add devm_ioremap_prot()

We provide an ioremap_flags, so this provides a corresponding
devm_ioremap_prot.  The slight name difference is at Ben
Herrenschmidt's request as he plans on changing ioremap_flags to
ioremap_prot in the future.

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Tejun Heo <htejun@gmail.com>
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 ago[POWERPC] macintosh: ADB driver: adb_handler_sem semaphore to mutex
Daniel Walker [Fri, 2 May 2008 20:34:03 +0000 (06:34 +1000)]
[POWERPC] macintosh: ADB driver: adb_handler_sem semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] macintosh: windfarm_smu_sat: semaphore to mutex
Daniel Walker [Fri, 2 May 2008 20:34:02 +0000 (06:34 +1000)]
[POWERPC] macintosh: windfarm_smu_sat: semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] macintosh: therm_pm72: driver_lock semaphore to mutex
Daniel Walker [Fri, 2 May 2008 20:34:01 +0000 (06:34 +1000)]
[POWERPC] macintosh: therm_pm72: driver_lock semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoip: Use inline function dst_metric() instead of direct access to dst->metric[]
Satoru SATOH [Mon, 5 May 2008 05:14:42 +0000 (22:14 -0700)]
ip: Use inline function dst_metric() instead of direct access to dst->metric[]

There are functions to refer to the value of dst->metric[THE_METRIC-1]
directly without use of a inline function "dst_metric" defined in
net/dst.h.

The following patch changes them to use the inline function
consistently.

Signed-off-by: Satoru SATOH <satoru.satoh@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoip: Make use of the inline function dst_metric_locked()
Satoru SATOH [Mon, 5 May 2008 05:12:43 +0000 (22:12 -0700)]
ip: Make use of the inline function dst_metric_locked()

Signed-off-by: Satoru SATOH <satoru.satoh@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoatm: Bad locking on br2684_devs modifications.
Pavel Emelyanov [Mon, 5 May 2008 01:00:36 +0000 (18:00 -0700)]
atm: Bad locking on br2684_devs modifications.

The list_del happens under read-locked devs_lock.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoatm: Do not free already unregistered net device.
Pavel Emelyanov [Mon, 5 May 2008 01:00:05 +0000 (18:00 -0700)]
atm: Do not free already unregistered net device.

Both br2684_push and br2684_exit do so, but unregister_netdev()
releases the device itself.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: Do not free net device after it is unregistered.
Pavel Emelyanov [Mon, 5 May 2008 00:59:30 +0000 (17:59 -0700)]
mac80211: Do not free net device after it is unregistered.

The error path in ieee80211_register_hw() may call the unregister_netdev()
and right after it - the free_netdev(), which is wrong, since the
unregister releases the device itself.

So the proposed fix is to NULL the local->mdev after unregister is done
and check this before calling free_netdev().

I checked - no code uses the local->mdev after unregister in this error
path (but even if some did this would be a BUG).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobridge: Consolidate error paths in br_add_bridge().
Pavel Emelyanov [Mon, 5 May 2008 00:58:07 +0000 (17:58 -0700)]
bridge: Consolidate error paths in br_add_bridge().

This actually had to be merged with the patch #1, but I decided not to
mix two changes in one patch.

There are already two calls to free_netdev() in there, so merge them
into one.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobridge: Net device leak in br_add_bridge().
Pavel Emelyanov [Mon, 5 May 2008 00:57:29 +0000 (17:57 -0700)]
bridge: Net device leak in br_add_bridge().

In case the register_netdevice() call fails the device is leaked,
since the out: label is just rtnl_unlock()+return.

Free the device.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes
Linus Torvalds [Mon, 5 May 2008 00:12:10 +0000 (17:12 -0700)]
Merge git://git./linux/kernel/git/hpa/linux-2.6-inttypes

* git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes:
  fix asm-mips/types.h syntax error
  fix asm-alpha/types.h breakage

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Mon, 5 May 2008 00:11:43 +0000 (17:11 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/x86/linux-2.6-x86-fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes:
  x86: fix setup printk format warning
  x86: olpc build fix
  x86: video/fbdev.c: add MODULE_LICENSE
  x86: fix up bootparam.h for userspace inclusion
  x86: relocs ELF handling - use SELFMAG instead of numeric constant
  x86: vdso ELF handling - use SELFMAG instead of numeric constant
  x86: remove dell reboot dmi quirk board name match
  x86: es7000 build fix
  x86: make additional_cpus static
  x86: make start_secondary() static
  kbuild, suspend, x86: fix rebuild of wakeup.bin
  uml: fix gcc problem
  x86: undo visws/numaq build changes

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Mon, 5 May 2008 00:11:24 +0000 (17:11 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kconfig-language.txt: remove bogus hint
  kconfig: fix MAC OS X warnings in menuconfig
  modpost: i2c aliases need no trailing wildcard

16 years agotask_nommu: fix compile failing bug because of spilt file.h
Bryan Wu [Sun, 4 May 2008 15:12:55 +0000 (23:12 +0800)]
task_nommu: fix compile failing bug because of spilt file.h

  CC      fs/proc/task_nommu.o
fs/proc/task_nommu.c: In function â€˜task_mem’:
fs/proc/task_nommu.c:55: error: dereferencing pointer to incomplete type
make[2]: *** [fs/proc/task_nommu.o] Error 1
make[1]: *** [fs/proc] Error 2
make: *** [fs] Error 2

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 5 May 2008 00:08:21 +0000 (17:08 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: IDE_HFLAG_SERIALIZE_DMA bugfix

16 years agoMerge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 5 May 2008 00:07:28 +0000 (17:07 -0700)]
Merge branch 'kvm-updates-2.6.26' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  x86: KVM geust: make setup_secondary_clock definition dependent on local apic
  KVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page
  KVM: avoid fx_init() schedule in atomic
  KVM: Avoid spurious execeptions after setting registers
  KVM: PIT: support mode 4
  KVM: x86 emulator: disable writeback on lmsw
  KVM: ppc: deliver INTERRUPT_FP_UNAVAIL to the guest
  KVM: ppc: Handle guest idle by emulating MSR[WE] writes
  KVM: x86: task switch: fix wrong bit setting for the busy flag
  KVM: VMX: Enable EPT feature for KVM
  KVM: VMX: Prepare an identity page table for EPT in real mode
  KVM: Export necessary function for EPT
  KVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 level EPT
  KVM: MMU: Add EPT support
  KVM: Add kvm_x86_ops get_tdp_level()
  KVM: MMU: Move some definitions to a header file
  KVM: VMX: EPT Feature Detection

16 years agosysfs: build fix
Ingo Molnar [Sun, 4 May 2008 07:29:43 +0000 (09:29 +0200)]
sysfs: build fix

x86.git testing found the following build failure on v2.6.26-rc1:

  In file included from include/linux/kobject.h:22,
                   from include/linux/module.h:17,
                   from include/linux/crypto.h:22,
                   from arch/x86/kernel/asm-offsets_32.c:8,
                   from arch/x86/kernel/asm-offsets.c:3:
  include/linux/sysfs.h:201: error: redefinition of 'sysfs_update_group'
  include/linux/sysfs.h:195: error: previous definition of 'sysfs_update_group' was here
  make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
  make: *** [prepare0] Error 2

with the following config:

    http://redhat.com/~mingo/misc/config-Sun_May__4_07_09_30_CEST_2008.bad

the reason for the build failure is the duplicate definition of the
sysfs_update_group() inline function in include/linux/sysfs.h.

The duplication was a merge error: it was added via -mm by commit
v2.6.25-7262-g2850699, "sysfs: sysfs_update_group stub for
CONFIG_SYSFS=n" a day before v2.6.26-rc1, but a day before that the same
commit was already merged upstream via the sysfs tree, with commit
v2.6.25-7211-g1cbfb7a.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMake forced module loading optional
Linus Torvalds [Mon, 5 May 2008 00:04:16 +0000 (17:04 -0700)]
Make forced module loading optional

The kernel module loader used to be much too happy to allow loading of
modules for the wrong kernel version by default.  For example, if you
had MODVERSIONS enabled, but tried to load a module with no version
info, it would happily load it and taint the kernel - whether it was
likely to actually work or not!

Generally, such forced module loading should be considered a really
really bad idea, so make it conditional on a new config option
(MODULE_FORCE_LOAD), and make it default to off.

If somebody really wants to force module loads, that's their problem,
but we should not encourage it.  Especially as it happened to me by
mistake (ie regular unversioned Fedora modules getting loaded) causing
lots of strange behavior.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix asm-mips/types.h syntax error
Adrian Bunk [Sat, 3 May 2008 19:26:17 +0000 (22:26 +0300)]
fix asm-mips/types.h syntax error

This patch fixes the following compile error caused by
commit 23cf11ddb5099f8c7f7cb3eb154bff0faf31cae9
(mips: types: use <asm-generic/int-*.h> for the mips architecture):

<--  snip  -->

...
  CC      kernel/bounds.s
In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/types.h:12,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/page-flags.h:8,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/bounds.c:9:
include2/asm/types.h:56:2: error: #endif without #if
make[2]: *** [kernel/bounds.s] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agofix asm-alpha/types.h breakage
Adrian Bunk [Sat, 3 May 2008 20:51:03 +0000 (23:51 +0300)]
fix asm-alpha/types.h breakage

This patch fixes the following compile error on alpha caused by
commit 3726c23df8e4d95b6f2b335dfa90e3f4850a8a00
(alpha: types: use <asm-generic/int-*.h> for the alpha architecture):

<--  snip  -->

...
  CC      arch/alpha/kernel/asm-offsets.s
In file included from include2/asm/topology.h:6,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/topology.h:34,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/mmzone.h:683,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/gfp.h:4,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/slab.h:12,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/percpu.h:5,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/rcupdate.h:39,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/pid.h:4,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h:74,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/alpha/kernel/asm-offsets.c:9:
include2/asm/machvec.h:44: error: expected declaration specifiers or '...' before 'dma_addr_t'
include2/asm/machvec.h:44: error: expected declaration specifiers or '...' before 'dma_addr_t'
In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/alpha/kernel/asm-offsets.c:12:
include2/asm/io.h:94: warning: type defaults to 'int' in declaration of 'dma_addr_t'
include2/asm/io.h:94: warning: variable 'dma_addr_t' declared 'inline'
include2/asm/io.h:94: error: expected ',' or ';' before 'isa_page_to_bus'
make[2]: *** [arch/alpha/kernel/asm-offsets.s] Error 1

<--  snip  -->

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agokconfig-language.txt: remove bogus hint
Adrian Bunk [Sat, 3 May 2008 23:15:35 +0000 (02:15 +0300)]
kconfig-language.txt: remove bogus hint

For the use case the hint describe a simple dependency is
enough.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
16 years agokconfig: fix MAC OS X warnings in menuconfig
Sam Ravnborg [Sun, 4 May 2008 19:03:20 +0000 (21:03 +0200)]
kconfig: fix MAC OS X warnings in menuconfig

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Timur Tabi <timur@freescale.com>
16 years agox86: fix setup printk format warning
Randy Dunlap [Fri, 2 May 2008 20:32:35 +0000 (13:32 -0700)]
x86: fix setup printk format warning

Fix x86 setup printk format warming:

next-20080430/arch/x86/kernel/setup.c:172: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'ssize_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: olpc build fix
Thomas Gleixner [Sat, 3 May 2008 21:49:59 +0000 (23:49 +0200)]
x86: olpc build fix

CONFIG_OLPC needs to depend on MGEODE_LX

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: video/fbdev.c: add MODULE_LICENSE
Adrian Bunk [Fri, 2 May 2008 20:32:32 +0000 (13:32 -0700)]
x86: video/fbdev.c: add MODULE_LICENSE

Add the missing MODULE_LICENSE("GPL").

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix up bootparam.h for userspace inclusion
Rusty Russell [Fri, 2 May 2008 11:14:20 +0000 (21:14 +1000)]
x86: fix up bootparam.h for userspace inclusion

commit 8b664aa66e824a0ddf4ec56d41fa0cf7bb374de6 (x86, boot: add linked
list of struct setup_data) put a new struct in bootparam.h, but didn't
use the userspace-safe types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Huang Ying <ying.huang@intel.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: relocs ELF handling - use SELFMAG instead of numeric constant
Cyrill Gorcunov [Sat, 3 May 2008 10:18:03 +0000 (14:18 +0400)]
x86: relocs ELF handling - use SELFMAG instead of numeric constant

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: akpm@linux-foundation.org
Cc: hpa@zytor.com
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: vdso ELF handling - use SELFMAG instead of numeric constant
Cyrill Gorcunov [Sat, 3 May 2008 10:18:01 +0000 (14:18 +0400)]
x86: vdso ELF handling - use SELFMAG instead of numeric constant

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: akpm@linux-foundation.org
Cc: hpa@zytor.com
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: remove dell reboot dmi quirk board name match
Ben [Sat, 3 May 2008 20:39:42 +0000 (22:39 +0200)]
x86: remove dell reboot dmi quirk board name match

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

Newer Dell OptiPlex 745s hang before rebooting after 'sudo reboot'.

A patch for some versions of the OptiPlex was proposed here --
http://lkml.org/lkml/2007/6/5/59 -- and is included in 2.6.23 and
later kernels, according to
http://lxr.linux.no/linux+v2.6.23/arch/i386/kernel/reboot.c . However,
the DMI_BOARD_NAME ("0WF810") is too restrictive. Newer OptiPlex
machines have a DMI_BOARD_NAME of "0RF703".  I therefore suggest
adding another clause to reboot.c, similar to the one in the original
patch, but matching a DMI_BOARD_NAME of "0RF703".

On further inspection, it seems that there are other DMI_BOARD_NAMEs
for this same machine. They seem to change from time to time, which
means that the current code is fragile. Moreover, using bios reboot
should not break non-SFF OptiPlex 745s, and so a reasonable fix is to
simply drop the match on DMI_BOARD_NAME.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: es7000 build fix
Ingo Molnar [Sat, 3 May 2008 20:01:31 +0000 (22:01 +0200)]
x86: es7000 build fix

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: make additional_cpus static
Adrian Bunk [Mon, 21 Apr 2008 21:31:37 +0000 (00:31 +0300)]
x86: make additional_cpus static

This patch makes the needlessly global additional_cpus static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: make start_secondary() static
Adrian Bunk [Mon, 21 Apr 2008 22:50:26 +0000 (01:50 +0300)]
x86: make start_secondary() static

start_secondary() needlessly became global.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agokbuild, suspend, x86: fix rebuild of wakeup.bin
Sam Ravnborg [Thu, 1 May 2008 09:31:07 +0000 (11:31 +0200)]
kbuild, suspend, x86: fix rebuild of wakeup.bin

In kernel/acpi/realmode/Makefile use the 'always'
variable to say that wakeup.bin should always
be made.

In acpi/Makefile we then do not need to specify the
requested target and we avoid the message from make:

   `arch/x86/kernel/acpi/realmode/wakeup.bin' is up to date.

Add wakeup.lds to list af targets to avoid rebuilding
wakeup.bin - from Roland McGrath.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@suse.cz>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agouml: fix gcc problem
Ingo Molnar [Thu, 1 May 2008 10:06:54 +0000 (12:06 +0200)]
uml: fix gcc problem

this is what caused gcc 4.3 to throw an internal error when
OPTIMIZE_INLINING was enabled ...

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: undo visws/numaq build changes
Thomas Gleixner [Fri, 2 May 2008 19:24:30 +0000 (21:24 +0200)]
x86: undo visws/numaq build changes

arch/x86/pci/Makefile_32 has a nasty detail. VISWS and NUMAQ build
override the generic pci-y rules. This needs a proper cleanup, but
that needs more thoughts. Undo

commit 895d30935ebe05f192e844792668bf8d19deaae7
    x86: numaq fix
    do not override the existing pci-y rule when adding visws or
    numaq rules.

There is also a stupid init function ordering problem vs. acpi.o

Add comments to the Makefile to avoid tripping over this again.

Remove the srat stub code in discontig_32.c to allow a proper NUMAQ
build.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoide: IDE_HFLAG_SERIALIZE_DMA bugfix
Bartlomiej Zolnierkiewicz [Sun, 4 May 2008 15:03:41 +0000 (17:03 +0200)]
ide: IDE_HFLAG_SERIALIZE_DMA bugfix

Patch re-ordering could be harmful:

commit 1fd1890594bd355a4217f5658a34763e77decee3
Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date:   Sat Apr 26 22:25:24 2008 +0200

    ide: add IDE_HFLAG_SERIALIZE_DMA host flag
...

is buggy because ->init_dma method / ide_hwif_setup_dma() is called
before IDE_HFLAG_SERIALIZE_DMA host flag is checked.

Fix it by checking IDE_HFLAG_SERIALIZE[_DMA] after DMA initialization.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agox86: KVM geust: make setup_secondary_clock definition dependent on local apic
Glauber Costa [Wed, 30 Apr 2008 15:39:05 +0000 (12:39 -0300)]
x86: KVM geust: make setup_secondary_clock definition dependent on local apic

Since the pv_apic_ops are only present if CONFIG_X86_LOCAL_APIC is compiled
in, kvmclock failed to build without this option.  This patch fixes this.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page
Avi Kivity [Fri, 2 May 2008 10:23:10 +0000 (13:23 +0300)]
KVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page

nonpae guests can call rmap_write_protect twice per page (for page tables)
or four times per page (for page directories), triggering a bogus warning.

Remove the warning.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: avoid fx_init() schedule in atomic
Andrea Arcangeli [Thu, 1 May 2008 16:43:33 +0000 (18:43 +0200)]
KVM: avoid fx_init() schedule in atomic

This make sure not to schedule in atomic during fx_init. I also
changed the name of fpu_init to fx_finit to avoid duplicating the name
with fpu_init that is already used in the kernel, this makes grep
simpler if nothing else.

Signed-off-by: Andrea Arcangeli <andrea@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Avoid spurious execeptions after setting registers
Jan Kiszka [Wed, 30 Apr 2008 15:59:04 +0000 (17:59 +0200)]
KVM: Avoid spurious execeptions after setting registers

Clear pending exceptions when setting new register values. This avoids
spurious exceptions after restoring a vcpu state or after
reset-on-triple-fault.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: PIT: support mode 4
Marcelo Tosatti [Wed, 30 Apr 2008 16:23:54 +0000 (13:23 -0300)]
KVM: PIT: support mode 4

The in-kernel PIT emulation ignores pending timers if operating under
mode 4, which for example DragonFlyBSD uses (and Plan9 too, apparently).

Mode 4 seems to be similar to one-shot mode, other than the fact that it
starts counting after the next CLK pulse once programmed, while mode 1
starts counting immediately, so add a FIXME to enhance precision.

Fixes sourceforge bug 1952988.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: disable writeback on lmsw
Avi Kivity [Wed, 30 Apr 2008 13:13:36 +0000 (16:13 +0300)]
KVM: x86 emulator: disable writeback on lmsw

The recent changes allowing memory operands with lmsw and smsw left
lmsw with writeback enabled.  Since lmsw has no oridinary destination
operand, the dst pointer was not initialized, resulting in an oops.

Close the hole by disabling writeback for lmsw.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: deliver INTERRUPT_FP_UNAVAIL to the guest
Christian Ehrhardt [Tue, 29 Apr 2008 16:18:23 +0000 (18:18 +0200)]
KVM: ppc: deliver INTERRUPT_FP_UNAVAIL to the guest

This patch adds the delivery of INTERRUPT_FP_UNAVAIL exceptions to the guest.
It's needed if a guest uses ppc binaries using the Floating point instructions.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Acked-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: Handle guest idle by emulating MSR[WE] writes
Hollis Blanchard [Fri, 25 Apr 2008 22:55:49 +0000 (17:55 -0500)]
KVM: ppc: Handle guest idle by emulating MSR[WE] writes

This reduces host CPU usage when the guest is idle. However, the guest must
set MSR[WE] in its idle loop, which Linux did not do until 2.6.26.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86: task switch: fix wrong bit setting for the busy flag
Izik Eidus [Mon, 28 Apr 2008 15:23:52 +0000 (18:23 +0300)]
KVM: x86: task switch: fix wrong bit setting for the busy flag

The busy bit is bit 1 of the type field, not bit 8.

Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: Enable EPT feature for KVM
Sheng Yang [Mon, 28 Apr 2008 04:24:45 +0000 (12:24 +0800)]
KVM: VMX: Enable EPT feature for KVM

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: Prepare an identity page table for EPT in real mode
Sheng Yang [Fri, 25 Apr 2008 13:44:52 +0000 (21:44 +0800)]
KVM: VMX: Prepare an identity page table for EPT in real mode

[aliguory: plug leak]

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Export necessary function for EPT
Sheng Yang [Fri, 25 Apr 2008 13:44:50 +0000 (21:44 +0800)]
KVM: Export necessary function for EPT

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 level EPT
Sheng Yang [Fri, 25 Apr 2008 13:44:42 +0000 (21:44 +0800)]
KVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 level EPT

Currently EPT level is 4 for both pae and x86_64. The patch remove the #ifdef
for alloc root_hpa and free root_hpa to support EPT.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Add EPT support
Sheng Yang [Fri, 25 Apr 2008 13:13:50 +0000 (21:13 +0800)]
KVM: MMU: Add EPT support

Enable kvm_set_spte() to generate EPT entries.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Add kvm_x86_ops get_tdp_level()
Sheng Yang [Fri, 25 Apr 2008 02:20:22 +0000 (10:20 +0800)]
KVM: Add kvm_x86_ops get_tdp_level()

The function get_tdp_level() provided the number of tdp level for EPT and
NPT rather than the NPT specific macro.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Move some definitions to a header file
Sheng Yang [Fri, 25 Apr 2008 02:17:08 +0000 (10:17 +0800)]
KVM: MMU: Move some definitions to a header file

Move some definitions to mmu.h in order to allow building common table
entries between EPT and non-EPT.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: EPT Feature Detection
Sheng Yang [Fri, 25 Apr 2008 02:13:16 +0000 (10:13 +0800)]
KVM: VMX: EPT Feature Detection

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoniu: Fix probing regression for maramba on-board chips.
David S. Miller [Sun, 4 May 2008 08:34:31 +0000 (01:34 -0700)]
niu: Fix probing regression for maramba on-board chips.

Changeset 7f7c4072ea552f97a0898331322f71986a97299c ("niu: Determine
the # of ports from the card's VPD data") caused maramba on-board
NIU ports to stop probing properly.

The old code had a fallback that would use a num_ports value of
4 if all the probing methods failed, but that was removed.

This restores the fallback of 4 ports, to get things working
again.

Bump driver version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomodpost: i2c aliases need no trailing wildcard
Jean Delvare [Fri, 2 May 2008 18:37:21 +0000 (20:37 +0200)]
modpost: i2c aliases need no trailing wildcard

Not all device types need a wildcard at the end of their module
aliases. In particular, for i2c module aliases, the trailing wildcard
is not only unneeded, it could also cause the wrong driver to be
loaded.

As I2C devices have no IDs, i2c module aliases are simple, arbitrary
device names. For example:

$ /sbin/modinfo lm90
filename:       /lib/modules/2.6.25-git18/kernel/drivers/hwmon/lm90.ko
author:         Jean Delvare <khali@linux-fr.org>
description:    LM90/ADM1032 driver
license:        GPL
vermagic:       2.6.25-git18 mod_unload
depends:        hwmon
alias:          i2c:lm90*
alias:          i2c:adm1032*
alias:          i2c:lm99*
alias:          i2c:lm86*
alias:          i2c:max6657*
alias:          i2c:adt7461*
alias:          i2c:max6680*
$

This would cause trouble if one I2C chip name matches the beginning of
another I2C chip name and both chips are supported by different
drivers. For example, an i2c device named lm9042 would cause the lm90
driver to be loaded, while it doesn't support that device. This case
has yet to be seen in practice, but still, I'd like to fix it now. The
cleanest fix is to remove the trailing wildcard from i2c module aliases.

Here's a patch doing this.

Not all device type aliases need a trailing wildcard, in particular
the i2c aliases don't. Don't add a wildcard by default in do_table(),
instead let each device type handler add it if needed.

I have tested types acpi, dmi, eisa, i2c, ide, ieee1394, input, pci,
pcmcia, platform, pnp, scsi, serio, ssb and usb. Other types (ccw, of,
vio, parisc, sdio and virtio) are untested.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agosparc video: make blank use proper constant
Robert Reif [Sun, 4 May 2008 04:12:00 +0000 (21:12 -0700)]
sparc video: make blank use proper constant

Make blank functions use proper constant for unblanking.

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agolapbeth: Release ->ethdev when unregistering device.
David S. Miller [Sun, 4 May 2008 04:10:58 +0000 (21:10 -0700)]
lapbeth: Release ->ethdev when unregistering device.

Otherwise it leaks forever.

Based upon a report by Roland <devzero@web.de>

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoxfrm: convert empty xfrm_audit_* macros to functions
Marcin Slusarz [Sun, 4 May 2008 04:03:01 +0000 (21:03 -0700)]
xfrm: convert empty xfrm_audit_* macros to functions

it removes these warnings when CONFIG_AUDITSYSCALL is unset:

net/xfrm/xfrm_user.c: In function 'xfrm_add_sa':
net/xfrm/xfrm_user.c:412: warning: unused variable 'sid'
net/xfrm/xfrm_user.c:411: warning: unused variable 'sessionid'
net/xfrm/xfrm_user.c:410: warning: unused variable 'loginuid'
net/xfrm/xfrm_user.c: In function 'xfrm_del_sa':
net/xfrm/xfrm_user.c:485: warning: unused variable 'sid'
net/xfrm/xfrm_user.c:484: warning: unused variable 'sessionid'
net/xfrm/xfrm_user.c:483: warning: unused variable 'loginuid'
net/xfrm/xfrm_user.c: In function 'xfrm_add_policy':
net/xfrm/xfrm_user.c:1132: warning: unused variable 'sid'
net/xfrm/xfrm_user.c:1131: warning: unused variable 'sessionid'
net/xfrm/xfrm_user.c:1130: warning: unused variable 'loginuid'
net/xfrm/xfrm_user.c: In function 'xfrm_get_policy':
net/xfrm/xfrm_user.c:1382: warning: unused variable 'sid'
net/xfrm/xfrm_user.c:1381: warning: unused variable 'sessionid'
net/xfrm/xfrm_user.c:1380: warning: unused variable 'loginuid'
net/xfrm/xfrm_user.c: In function 'xfrm_add_pol_expire':
net/xfrm/xfrm_user.c:1620: warning: unused variable 'sid'
net/xfrm/xfrm_user.c:1619: warning: unused variable 'sessionid'
net/xfrm/xfrm_user.c:1618: warning: unused variable 'loginuid'
net/xfrm/xfrm_user.c: In function 'xfrm_add_sa_expire':
net/xfrm/xfrm_user.c:1658: warning: unused variable 'sid'
net/xfrm/xfrm_user.c:1657: warning: unused variable 'sessionid'
net/xfrm/xfrm_user.c:1656: warning: unused variable 'loginuid'

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRevert "[SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit()."
David S. Miller [Sun, 4 May 2008 04:00:55 +0000 (21:00 -0700)]
Revert "[SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit()."

This reverts commit 2664ef44cf5053d2b7dff01cecac70bc601a5f68.

Ingo moved around where the softlockup dependency sits
so this change is no longer necessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Fix useless comment reference loop.
Johannes Berg [Sun, 4 May 2008 03:56:42 +0000 (20:56 -0700)]
net: Fix useless comment reference loop.

include/linux/skbuff.h says:
        /* These elements must be at the end, see alloc_skb() for details.  */

net/core/skbuff.c says:
* See comment in sk_buff definition, just before the 'tail' member

This patch contains my guess as to the actual reason rather than a
dead comment reference loop.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc: tcx.c remove unnecessary function
Robert Reif [Sun, 4 May 2008 03:55:27 +0000 (20:55 -0700)]
sparc: tcx.c remove unnecessary function

From: Robert Reif <reif@earthlink.net>

Replaced tcx_init_one with tcx_probe.
Fixed some checkpatch problems.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosch_htb: remove from event queue in htb_parent_to_leaf()
Jarek Poplawski [Sun, 4 May 2008 03:46:29 +0000 (20:46 -0700)]
sch_htb: remove from event queue in htb_parent_to_leaf()

There is lack of removing a class from the event queue while changing
from parent to leaf which can cause corruption of this rb tree. This
patch fixes a bug introduced by my patch: "sch_htb: turn intermediate
classes into leaves" commit: 160d5e10f87b1dc88fd9b84b31b1718e0fd76398.

Many thanks to Jan 'yanek' Bortl for finding a way to reproduce this
rare bug and narrowing the test case, which made possible proper
diagnosing.

This patch is recommended for all kernels starting from 2.6.20.

Reported-and-tested-by: Jan 'yanek' Bortl <yanek@ya.bofh.cz>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
Linus Torvalds [Sat, 3 May 2008 20:51:10 +0000 (13:51 -0700)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-hrt

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  clocksource: allow read access to available/current_clocksource
  clocksource: Fix permissions for available_clocksource
  hrtimer: remove duplicate helper function

16 years agotiny mq_open optimization
Ulrich Drepper [Sat, 3 May 2008 19:28:45 +0000 (15:28 -0400)]
tiny mq_open optimization

A very small cleanup for mq_open.

We do not have to call set_close_on_exit if we create the file
descriptor right away with the flag set.  We have a function for this
now.  The resulting code is smaller and a tiny bit faster.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agounified (weak) sys_pipe implementation
Ulrich Drepper [Sat, 3 May 2008 19:10:37 +0000 (15:10 -0400)]
unified (weak) sys_pipe implementation

This replaces the duplicated arch-specific versions of "sys_pipe()" with
one unified implementation.  This removes almost 250 lines of duplicated
code.

It's marked __weak, so that *if* an architecture wants to override the
default implementation it can do so by simply having its own replacement
version, since many architectures use alternate calling conventions for
the 'pipe()' system call for legacy reasons (ie traditional UNIX
implementations often return the two file descriptors in registers)

I still haven't changed the cris version even though Linus says the BKL
isn't needed.  The arch maintainer can easily do it if there are really
no obstacles.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoLinux 2.6.26-rc1 v2.6.26-rc1
Linus Torvalds [Sat, 3 May 2008 18:59:44 +0000 (11:59 -0700)]
Linux 2.6.26-rc1

16 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Sat, 3 May 2008 17:57:57 +0000 (10:57 -0700)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  PMU battery: filenames in sysfs with spaces
  pda_power: add init and exit function callbacks

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes
Linus Torvalds [Sat, 3 May 2008 17:54:23 +0000 (10:54 -0700)]
Merge git://git./linux/kernel/git/hpa/linux-2.6-inttypes

* git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes: (24 commits)
  Make constants in kernel/timeconst.h fixed 64 bits
  types: add C99-style constructors to <asm-generic/int-*.h>
  xtensa: types: use <asm-generic/int-*.h> for the xtensa architecture
  x86: types: use <asm-generic/int-*.h> for the x86 architecture
  v850: types: use <asm-generic/int-*.h> for the v850 architecture
  sparc64: types: use <asm-generic/int-*.h> for the sparc64 architecture
  sparc: types: use <asm-generic/int-*.h> for the sparc architecture
  sh: types: use <asm-generic/int-*.h> for the sh architecture
  s390: types: use <asm-generic/int-*.h> for the s390 architecture
  powerpc: types: use <asm-generic/int-*.h> for the powerpc architecture
  parisc: types: use <asm-generic/int-*.h> for the parisc architecture
  mn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture
  mips: types: use <asm-generic/int-*.h> for the mips architecture
  m68k: types: use <asm-generic/int-*.h> for the m68k architecture
  m32r: types: use <asm-generic/int-*.h> for the m32r architecture
  ia64: types: use <asm-generic/int-*.h> for the ia64 architecture
  h8300: types: use <asm-generic/int-*.h> for the h8300 architecture
  frv: types: use <asm-generic/int-*.h> for the frv architecture
  cris: types: use <asm-generic/int-*.h> for the cris architecture
  blackfin: types: use <asm-generic/int-*.h> for the blackfin architecture
  ...

16 years ago[MAINTAINERS] PCI list moved
Jesse Barnes [Sat, 3 May 2008 15:35:49 +0000 (08:35 -0700)]
[MAINTAINERS] PCI list moved

Many thanks to Martin for his years of hosting.  The pci list has moved to
vger, along with what seems like the rest of the major Linux mailing lists.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sat, 3 May 2008 17:18:40 +0000 (10:18 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: #ifdef simplification
  slabinfo: Support printout of the number of fallbacks
  slub: Whitespace cleanup and use of strict_strtoul

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 3 May 2008 17:18:21 +0000 (10:18 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
  rose: Wrong list_lock argument in rose_node seqops
  netns: Fix reassembly timer to use the right namespace
  netns: Fix device renaming for sysfs
  bnx2: Update version to 1.7.5.
  bnx2: Update RV2P firmware for 5709.
  bnx2: Zero out context memory for 5709.
  bnx2: Fix register test on 5709.
  bnx2: Fix remote PHY initial link state.
  bnx2: Refine remote PHY locking.
  bridge: forwarding table information for >256 devices
  tg3: Update version to 3.92
  tg3: Add link state reporting to UMP firmware
  tg3: Fix ethtool loopback test for 5761 BX devices
  tg3: Fix 5761 NVRAM sizes
  tg3: Use constant 500KHz MI clock on adapters with a CPMU
  hci_usb.h: fix hard-to-trigger race
  dccp: ccid2.c, ccid3.c use clamp(), clamp_t()
  net: remove NR_CPUS arrays in net/core/dev.c
  net: use get/put_unaligned_* helpers
  bluetooth: use get/put_unaligned_* helpers
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 3 May 2008 17:05:11 +0000 (10:05 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32: Delete prom_stdin and prom_stdout.
  sparc32: More memory probing consolidation.
  sparc32: Kill totally unused memory information tables.
  sparc64: Fix syscall restart, for real...
  serial: Fix sparc driver name strings.
  sparc64: Stop creating dummy root PCI host controller devices.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Sat, 3 May 2008 17:01:33 +0000 (10:01 -0700)]
Merge git://git./linux/kernel/git/paulus/powerpc

* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Bolt in SLB entry for kernel stack on secondary cpus
  [POWERPC] PS3: Update ps3_defconfig
  [POWERPC] PS3: Remove unsupported wakeup sources
  [POWERPC] PS3: Make ps3_virq_setup and ps3_virq_destroy static
  [POWERPC] PS3: Add time include to lpm
  [POWERPC] Fix slb.c compile warnings
  [POWERPC] Xilinx: Fix compile warnings
  [POWERPC] Squash build warning for print of resource_size_t in fsl_soc.c
  [RAPIDIO] fix current kernel-doc notation
  [POWERPC] 86xx: mpc8610_hpcd: add support for PCI Express x8 slot
  Fix a potential issue in mpc52xx uart driver
  [POWERPC] mpc5200: Allow for fixed speed MII configurations
  [POWERPC] 86xx: Fix the wrong serial1 interrupt for 8610 board

16 years agoclocksource: allow read access to available/current_clocksource
Heiko Carstens [Sat, 3 May 2008 12:23:14 +0000 (14:23 +0200)]
clocksource: allow read access to available/current_clocksource

There is no harm, when users can read the info and we ask often enough
during debugging for this kind of information.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoclocksource: Fix permissions for available_clocksource
Heiko Carstens [Fri, 2 May 2008 10:49:40 +0000 (12:49 +0200)]
clocksource: Fix permissions for available_clocksource

File permissions for
/sys/devices/system/clocksource/clocksource0/available_clocksource
are 600 which allows write access. But this is in fact a read only
file. So change permissions to 400.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agohrtimer: remove duplicate helper function
Oliver Hartkopp [Wed, 30 Apr 2008 21:04:37 +0000 (23:04 +0200)]
hrtimer: remove duplicate helper function

The helper function hrtimer_callback_running() is used in
kernel/hrtimer.c as well as in the updated net/can/bcm.c which now
supports hrtimers. Moving the helper function to hrtimer.h removes the
duplicate definition in the C-files.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>