]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/log
mirror_ubuntu-hirsute-kernel.git
15 years agox86: select x2apic ops in early apic probe only if x2apic mode is enabled
Suresh Siddha [Sat, 21 Feb 2009 22:23:21 +0000 (14:23 -0800)]
x86: select x2apic ops in early apic probe only if x2apic mode is enabled

If BIOS hands over the control to OS in legacy xapic mode, select
legacy xapic related ops in the early apic probe and shift to x2apic
ops later in the boot sequence, only after enabling x2apic mode.

If BIOS hands over the control in x2apic mode, select x2apic related
ops in the early apic probe.

This fixes the early boot panic, where we were selecting x2apic ops,
while the cpu is still in legacy xapic mode.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: separate 32-bit setup functionality out of apic_32.c
Ingo Molnar [Tue, 17 Feb 2009 22:12:48 +0000 (23:12 +0100)]
x86, apic: separate 32-bit setup functionality out of apic_32.c

Impact: build fix, cleanup

A couple of arch setup callbacks were mistakenly in apic_32.c, breaking
the build.

Also simplify the code a bit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: move remaining APIC drivers to arch/x86/kernel/apic/*
Ingo Molnar [Tue, 17 Feb 2009 19:35:16 +0000 (20:35 +0100)]
x86, apic: move remaining APIC drivers to arch/x86/kernel/apic/*

Move the 32-bit extended-arch APIC drivers to arch/x86/kernel/apic/
too, and rename apic_64.c to probe_64.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: move APIC drivers to arch/x86/kernel/apic/*
Ingo Molnar [Tue, 17 Feb 2009 17:09:24 +0000 (18:09 +0100)]
x86, apic: move APIC drivers to arch/x86/kernel/apic/*

arch/x86/kernel/ is getting a bit crowded, and the APIC
drivers are scattered into various different files.

Move them to arch/x86/kernel/apic/*, and also remove
the 'gen' prefix from those which had it.

Also move APIC related functionality: the IO-APIC driver,
the NMI and the IPI code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: rename 'genapic' to 'apic'
Ingo Molnar [Tue, 17 Feb 2009 15:28:46 +0000 (16:28 +0100)]
x86, apic: rename 'genapic' to 'apic'

Impact: cleanup

Now that all APIC code is consolidated there's nothing 'gen' about
apics anymore - so rename 'struct genapic' to 'struct apic'.

This shortens the code and is nicer to read as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: remove ->store_NMI_vector()
Ingo Molnar [Tue, 17 Feb 2009 15:22:09 +0000 (16:22 +0100)]
x86, apic: remove ->store_NMI_vector()

Impact: cleanup

It's not used by anything anymore.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, numaq_32: clean up, misc
Ingo Molnar [Tue, 17 Feb 2009 16:53:54 +0000 (17:53 +0100)]
x86, numaq_32: clean up, misc

Impact: cleanup

 - misc other cleanups that change the md5 signature
 - consolidate global variables
 - remove unnecessary __numaq_mps_oem_check() wrapper
 - make numaq_mps_oem_check static
 - update copyrights
 - misc other cleanups pointed out by checkpatch

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, numaq_32: clean up
Ingo Molnar [Tue, 17 Feb 2009 14:50:25 +0000 (15:50 +0100)]
x86, numaq_32: clean up

Impact: cleanup

- refactor smp_dump_qct()
- tidy up include files, remove duplicates
- misc other cleanups, pointed out by checkpatch

No code changed:

md5:
   9c0bc01a53558c77df0f2ebcda7e11a9  numaq_32.o.before.asm
   9c0bc01a53558c77df0f2ebcda7e11a9  numaq_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, es7000: misc cleanups
Ingo Molnar [Tue, 17 Feb 2009 14:29:30 +0000 (15:29 +0100)]
x86, es7000: misc cleanups

These are cleanups that change the md5 signature:

 - asm/ => linux/ include conversion
 - simplify the code flow of find_unisys_acpi_oem_table()
 - move ACPI methods into one #ifdef block
 - remove 0/NULL initialization of statics
 - simplify/standardize printouts
 - update copyrights
 - more cleanups, pointed out by checkpatch

arch/x86/kernel/es7000_32.o:

   text    data     bss     dec     hex filename
   2693     192      44    2929     b71 es7000_32.o.before
   2688     192      44    2924     b6c es7000_32.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, es7000: remove dead code, clean up
Ingo Molnar [Tue, 17 Feb 2009 14:17:55 +0000 (15:17 +0100)]
x86, es7000: remove dead code, clean up

Impact: cleanup

 - a number of structure definitions were stale
 - remove needless wrappers around apic definitions
 - fix details noticed by checkpatch

No code changed:

md5:
   029d8fde0aaf6e934ea63bd8b36430fd  es7000_32.o.before.asm
   029d8fde0aaf6e934ea63bd8b36430fd  es7000_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, es7000: remove externs
Ingo Molnar [Tue, 17 Feb 2009 14:13:05 +0000 (15:13 +0100)]
x86, es7000: remove externs

Impact: cleanup

In the subarch times there were a number of externs between
various bits of the ES7000 code. Now that there's a single
es7000-platform support file, the externs can be removed and
the functions can be changed the statics.

Beyond the cleanup factor, this also shrinks the size of the
kernel image a bit:

arch/x86/kernel/es7000_32.o:

   text    data     bss     dec     hex filename
   2813     192      44    3049     be9 es7000_32.o.before
   2693     192      44    2929     b71 es7000_32.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: remove apicid_cluster()
Ingo Molnar [Tue, 17 Feb 2009 14:09:08 +0000 (15:09 +0100)]
x86, apic: remove apicid_cluster()

There were multiple definitions of apicid_cluster() scattered around
in APIC drivers - but the definitions are equivalent to the already
existing generic APIC_CLUSTER() method.

So remove apicid_cluster() and change all users to APIC_CLUSTER().

No code changed:

md5:
   1b8244ba8d3d6a454593ce10f09dfa58  summit_32.o.before.asm
   1b8244ba8d3d6a454593ce10f09dfa58  summit_32.o.after.asm

md5:
   a593d98a882bf534622c70d9568497ac  es7000_32.o.before.asm
   a593d98a882bf534622c70d9568497ac  es7000_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, es7000: clean up
Ingo Molnar [Tue, 17 Feb 2009 13:57:16 +0000 (14:57 +0100)]
x86, es7000: clean up

No code changed:

arch/x86/kernel/es7000_32.o:

   text    data     bss     dec     hex filename
   2813     192      44    3049     be9 es7000_32.o.before
   2813     192      44    3049     be9 es7000_32.o.after

md5:
   a593d98a882bf534622c70d9568497ac  es7000_32.o.before.asm
   a593d98a882bf534622c70d9568497ac  es7000_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: clean up the cpu_2_logical_apiciddeclaration
Ingo Molnar [Tue, 17 Feb 2009 13:45:30 +0000 (14:45 +0100)]
x86, apic: clean up the cpu_2_logical_apiciddeclaration

extern declarations were scattered in 4 files - consolidate them
into apic.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: clean up arch/x86/kernel/bigsmp_32.c
Ingo Molnar [Tue, 17 Feb 2009 13:09:20 +0000 (14:09 +0100)]
x86, apic: clean up arch/x86/kernel/bigsmp_32.c

Impact: cleanup

- remove unnecessary indirections that were artifacts of the subarch code
- clean up include file section
- clean up various small details

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: remove stale references to APIC_DEFINITION
Ingo Molnar [Tue, 17 Feb 2009 13:04:24 +0000 (14:04 +0100)]
x86, apic: remove stale references to APIC_DEFINITION

Impact: cleanup

APIC_DEFINITION was a hack from the x86 subarch times, it has no
meaning anymore - remove it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: remove duplicate asm/apic.h inclusions
Ingo Molnar [Tue, 17 Feb 2009 13:02:01 +0000 (14:02 +0100)]
x86, apic: remove duplicate asm/apic.h inclusions

Impact: cleanup

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: remove genapic.h
Ingo Molnar [Tue, 17 Feb 2009 12:58:15 +0000 (13:58 +0100)]
x86, apic: remove genapic.h

Impact: cleanup

Remove genapic.h and remove all references to it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: merge genapic.h into apic.h
Ingo Molnar [Tue, 17 Feb 2009 12:52:29 +0000 (13:52 +0100)]
x86, apic: merge genapic.h into apic.h

Impact: cleanup

Reduce the number of include files to worry about.
Also, most of the users of APIC facilities had to
include genapic.h already, which embedded apic.h,
so the distinction was meaningless.

[ include apic.h from genapic.h for compatibility. ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoremove: genapic prepare
Ingo Molnar [Tue, 17 Feb 2009 13:36:42 +0000 (14:36 +0100)]
remove: genapic prepare

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, apic: fix build fallout of genapic changes
Ingo Molnar [Tue, 17 Feb 2009 11:33:20 +0000 (12:33 +0100)]
x86, apic: fix build fallout of genapic changes

- make oprofile build
- select X86_X2APIC from X86_UV - it relies on it
- export genapic for oprofile modular build

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fold apic_ops into genapic
Yinghai Lu [Tue, 17 Feb 2009 07:02:14 +0000 (23:02 -0800)]
x86: fold apic_ops into genapic

Impact: cleanup

make it simpler, don't need have one extra struct.

v2: fix the sgi_uv build

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: add x2apic config
Yinghai Lu [Tue, 17 Feb 2009 01:29:58 +0000 (17:29 -0800)]
x86: add x2apic config

Impact: cleanup

so could deselect x2apic
and INTR_REMAP will select x2apic

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'x86/headers' into x86/core
Ingo Molnar [Tue, 17 Feb 2009 11:21:12 +0000 (12:21 +0100)]
Merge branch 'x86/headers' into x86/core

15 years agox86: remove stale arch/x86/include/asm/page_64.h.rej file
Ingo Molnar [Tue, 17 Feb 2009 11:20:13 +0000 (12:20 +0100)]
x86: remove stale arch/x86/include/asm/page_64.h.rej file

Introduced by:

  51c78eb: x86: create _types.h counterparts for page*.h

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branches 'x86/acpi', 'x86/apic', 'x86/cpudetect', 'x86/headers', 'x86/paravirt...
Ingo Molnar [Tue, 17 Feb 2009 11:07:00 +0000 (12:07 +0100)]
Merge branches 'x86/acpi', 'x86/apic', 'x86/cpudetect', 'x86/headers', 'x86/paravirt', 'x86/urgent' and 'x86/xen'; commit 'v2.6.29-rc5' into x86/core

15 years agox86: make APIC_init_uniprocessor() more like smp_prepare_cpus()
Yinghai Lu [Mon, 16 Feb 2009 08:00:50 +0000 (00:00 -0800)]
x86: make APIC_init_uniprocessor() more like smp_prepare_cpus()

Impact: cleanup

1. move localise_nmi_watchdog() later
2. change setup_boot_APIC_clock() to setup_boot_clock() for 64-bit

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: pre init pirq_entries[]
Yinghai Lu [Sun, 15 Feb 2009 10:54:03 +0000 (02:54 -0800)]
x86: pre init pirq_entries[]

Impact: cleanup

set default value early - this allows the removal of a number
of dynamic initialization codepaths, and an #ifdef.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, xen: do multicall callbacks with interrupts disabled
Jeremy Fitzhardinge [Fri, 6 Feb 2009 21:38:56 +0000 (13:38 -0800)]
x86, xen: do multicall callbacks with interrupts disabled

We can't call the callbacks after enabling interrupts, as we may get a
nested multicall call, which would cause a great deal of havok.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, xen: degrade BUG to WARN when multicall fails
Jeremy Fitzhardinge [Fri, 6 Feb 2009 21:38:51 +0000 (13:38 -0800)]
x86, xen: degrade BUG to WARN when multicall fails

If one of the components of a multicall fails, WARN rather than BUG,
to help with debugging.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, xen: record and display initiator of each multicall when debugging
Ian Campbell [Fri, 6 Feb 2009 21:35:57 +0000 (13:35 -0800)]
x86, xen: record and display initiator of each multicall when debugging

Store the caller for each multicall so we can report it on failure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, xen: short-circuit tests for dom0
Jeremy Fitzhardinge [Fri, 6 Feb 2009 21:35:44 +0000 (13:35 -0800)]
x86, xen: short-circuit tests for dom0

When testing for a dom0/initial/privileged domain, make sure the
predicate evaluates to a compile-time 0 if CONFIG_XEN_DOM0 isn't
enabled.  This will make most of the dom0 code evaporate without
much more effort.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[IA64] fix __apci_unmap_table
Yinghai Lu [Sun, 15 Feb 2009 22:06:13 +0000 (14:06 -0800)]
[IA64] fix __apci_unmap_table

Impact: fix build error

to fix:

  tip/arch/ia64/kernel/acpi.c:203: error: conflicting types for '__acpi_unmap_table'
  tip/include/linux/acpi.h:82: error: previous declaration of '__acpi_unmap_table' was here
  tip/arch/ia64/kernel/acpi.c:203: error: conflicting types for '__acpi_unmap_table'
  tip/include/linux/acpi.h:82: error: previous declaration of '__acpi_unmap_table' was here

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: make 32bit to call enable_IO_APIC early like 64bit
Yinghai Lu [Sun, 15 Feb 2009 07:57:28 +0000 (23:57 -0800)]
x86: make 32bit to call enable_IO_APIC early like 64bit

Impact: cleanup

So we remove some #ifdefs.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, vm86: fix preemption bug
Thomas Gleixner [Tue, 13 Jan 2009 22:36:34 +0000 (23:36 +0100)]
x86, vm86: fix preemption bug

Commit 3d2a71a596bd9c761c8487a2178e95f8a61da083 ("x86, traps: converge
do_debug handlers") changed the preemption disable logic of do_debug()
so vm86_handle_trap() is called with preemption disabled resulting in:

 BUG: sleeping function called from invalid context at include/linux/kernel.h:155
 in_atomic(): 1, irqs_disabled(): 0, pid: 3005, name: dosemu.bin
 Pid: 3005, comm: dosemu.bin Tainted: G        W  2.6.29-rc1 #51
 Call Trace:
  [<c050d669>] copy_to_user+0x33/0x108
  [<c04181f4>] save_v86_state+0x65/0x149
  [<c0418531>] handle_vm86_trap+0x20/0x8f
  [<c064e345>] do_debug+0x15b/0x1a4
  [<c064df1f>] debug_stack_correct+0x27/0x2c
  [<c040365b>] sysenter_do_call+0x12/0x2f
 BUG: scheduling while atomic: dosemu.bin/3005/0x10000001

Restore the original calling convention and reenable preemption before
calling handle_vm86_trap().

Reported-by: Michal Suchanek <hramrach@centrum.cz>
Cc: stable@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix typo in filter_cpuid_features()
Yinghai Lu [Sun, 15 Feb 2009 07:59:18 +0000 (23:59 -0800)]
x86: fix typo in filter_cpuid_features()

Impact: fix wrong disabling of cpu features

an amd system got this strange output:

 CPU: CPU feature monitor disabled due to lack of CPUID level 0x5

but in /proc/cpuinfo I have:

 cpuid level : 5

on intel system:

 CPU: CPU feature monitor disabled due to lack of CPUID level 0x5
 CPU: CPU feature dca disabled due to lack of CPUID level 0x9

but in /proc/cpuinfo i have:

 cpuid level     : 11

Tt turns out there is a typo, and we should use level member in df.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge commit 'v2.6.29-rc5' into x86/apic
Ingo Molnar [Sun, 15 Feb 2009 08:00:18 +0000 (09:00 +0100)]
Merge commit 'v2.6.29-rc5' into x86/apic

15 years agox86, olpc: fix model detection without OFW
Chris Ball [Sat, 14 Feb 2009 01:56:18 +0000 (20:56 -0500)]
x86, olpc: fix model detection without OFW

Impact: fix "garbled display, laptop is unusable" bug

Commit e51a1ac2dfca9ad869471e88f828281db7e810c0 ("x86, olpc: fix endian
bug in openfirmware workaround") breaks model comparison on OLPC; the value
0xc2 needs to be scaled up by olpc_board().

The pre-patch version was wrong, but accidentally worked anyway
(big-endian 0xc2 is big enough to satisfy all other board revisions,
but little endian 0xc2 is not).

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoLinux 2.6.29-rc5
Linus Torvalds [Fri, 13 Feb 2009 23:31:30 +0000 (15:31 -0800)]
Linux 2.6.29-rc5

15 years agoMerge branch 'core/header-fixes' into x86/headers
Ingo Molnar [Fri, 13 Feb 2009 20:05:03 +0000 (21:05 +0100)]
Merge branch 'core/header-fixes' into x86/headers

Conflicts:
arch/x86/include/asm/setup.h

15 years agox86: fix "__udivdi3" [drivers/scsi/aha1542.ko] undefined
James Bottomley [Fri, 13 Feb 2009 18:52:44 +0000 (12:52 -0600)]
x86: fix "__udivdi3" [drivers/scsi/aha1542.ko] undefined

Commit 976e8f677e42757e5586ea04a9ac8bb8ddaa037e ("x86: asm/io.h: unify
virt_to_phys/phys_to_virt") changed the return of virt_to_phys from long
to phys_addr_t which is unsigned long long on a PAE platform.

So, I could suggest a fix below since isa addresses may never be above
32 bits.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, UV: set full apicid in uv_hub_send_ipi
Dimitri Sivanich [Fri, 13 Feb 2009 14:40:55 +0000 (08:40 -0600)]
x86, UV: set full apicid in uv_hub_send_ipi

The uv_hub_send_ipi() function needs to set the full apicid in the
UVH_IPI_INT mmr.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 13 Feb 2009 16:19:11 +0000 (08:19 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Only register AC97 bus if it's not done already
  ALSA: hda - Add snd_hda_multi_out_dig_cleanup()
  ALSA: hda - Add missing terminator in slave dig-out array
  ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model
  ALSA: hda - Register (new) devices at reconfig
  ALSA: mtpav - Fix initial value for input hwport
  ALSA: hda - add id for Intel IbexPeak integrated HDMI codec
  ALSA: hda - compute checksum in HDMI audio infoframe
  ALSA: hda - enable HDMI audio pin out at module loading time
  ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present
  ASoC: Update SDP3430 machine driver for snd_soc_card
  ALSA: hda - Add quirk for Asus z37e (1043:8284)
  sound: Remove OSSlib stuff from linux/soundcard.h
  ASoC: WM8990: Fix kcontrol's private value use in put callback
  ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback

15 years agoUser namespaces: Only put the userns when we unhash the uid
Serge E. Hallyn [Fri, 13 Feb 2009 14:04:21 +0000 (14:04 +0000)]
User namespaces: Only put the userns when we unhash the uid

uids in namespaces other than init don't get a sysfs entry.

For those in the init namespace, while we're waiting to remove
the sysfs entry for the uid the uid is still hashed, and
alloc_uid() may re-grab that uid without getting a new
reference to the user_ns, which we've already put in free_user
before scheduling remove_user_sysfs_dir().

Reported-and-tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 13 Feb 2009 14:06:04 +0000 (15:06 +0100)]
Merge branch 'fix/asoc' into for-linus

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Fri, 13 Feb 2009 14:05:59 +0000 (15:05 +0100)]
Merge branch 'fix/hda' into for-linus

15 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Fri, 13 Feb 2009 14:05:56 +0000 (15:05 +0100)]
Merge branch 'fix/misc' into for-linus

15 years agoMerge branch 'fix/oss-header-fix' into for-linus
Takashi Iwai [Fri, 13 Feb 2009 14:05:51 +0000 (15:05 +0100)]
Merge branch 'fix/oss-header-fix' into for-linus

15 years agoASoC: Only register AC97 bus if it's not done already
Mark Brown [Thu, 12 Feb 2009 19:33:19 +0000 (19:33 +0000)]
ASoC: Only register AC97 bus if it's not done already

ASoC supports both explicit codec drivers for AC97 devices and a simple
driver which uses the standard ALSA AC97 framework for codec support.
When used with the generic AC97 codec support that will provide the
ad hoc AC97 device for drivers like touchscreens to attach to so the
core shouldn't do so.

Reported-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoxen: fix xen_flush_tlb_others
Ian Campbell [Fri, 13 Feb 2009 00:25:42 +0000 (16:25 -0800)]
xen: fix xen_flush_tlb_others

The commit
    commit 4595f9620cda8a1e973588e743cf5f8436dd20c6
    Author: Rusty Russell <rusty@rustcorp.com.au>
    Date:   Sat Jan 10 21:58:09 2009 -0800

        x86: change flush_tlb_others to take a const struct cpumask

causes xen_flush_tlb_others to allocate a multicall and then issue it
without initializing it in the case where the cpumask is empty,
leading to:

        [    8.354898] 1 multicall(s) failed: cpu 1
        [    8.354921] Pid: 2213, comm: bootclean Not tainted 2.6.29-rc3-x86_32p-xenU-tip #135
        [    8.354937] Call Trace:
        [    8.354955]  [<c01036e3>] xen_mc_flush+0x133/0x1b0
        [    8.354971]  [<c0105d2a>] ? xen_force_evtchn_callback+0x1a/0x30
        [    8.354988]  [<c0105a60>] xen_flush_tlb_others+0xb0/0xd0
        [    8.355003]  [<c0126643>] flush_tlb_page+0x53/0xa0
        [    8.355018]  [<c0176a80>] do_wp_page+0x2a0/0x7c0
        [    8.355034]  [<c0238f0a>] ? notify_remote_via_irq+0x3a/0x70
        [    8.355049]  [<c0178950>] handle_mm_fault+0x7b0/0xa50
        [    8.355065]  [<c0131a3e>] ? wake_up_new_task+0x8e/0xb0
        [    8.355079]  [<c01337b5>] ? do_fork+0xe5/0x320
        [    8.355095]  [<c0121919>] do_page_fault+0xe9/0x240
        [    8.355109]  [<c0121830>] ? do_page_fault+0x0/0x240
        [    8.355125]  [<c032457a>] error_code+0x72/0x78
        [    8.355139]   call  1/1: op=2863311530 arg=[aaaaaaaa] result=-38     xen_flush_tlb_others+0x41/0xd0

Since empty cpumasks are rare and undoing an xen_mc_entry() is tricky
just issue such requests normally.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86 headers: protect page_32.h via __ASSEMBLY__
Ingo Molnar [Fri, 13 Feb 2009 12:36:47 +0000 (13:36 +0100)]
x86 headers: protect page_32.h via __ASSEMBLY__

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86 headers: include page_types.h in pgtable_types.h
Ingo Molnar [Fri, 13 Feb 2009 12:24:19 +0000 (13:24 +0100)]
x86 headers: include page_types.h in pgtable_types.h

To properly pick up details like PTE_FLAGS_MASK.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86 headers: include linux/types.h
Ingo Molnar [Fri, 13 Feb 2009 12:23:02 +0000 (13:23 +0100)]
x86 headers: include linux/types.h

To properly pick up types relied on by prototypes like 'bool'.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86 headers: remove duplicate pud_large() definition
Ingo Molnar [Fri, 13 Feb 2009 12:15:55 +0000 (13:15 +0100)]
x86 headers: remove duplicate pud_large() definition

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'x86/untangle2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy...
Ingo Molnar [Fri, 13 Feb 2009 12:09:00 +0000 (13:09 +0100)]
Merge branch 'x86/untangle2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into x86/headers

Conflicts:
arch/x86/include/asm/page.h
arch/x86/include/asm/pgtable.h
arch/x86/mach-voyager/voyager_smp.c
arch/x86/mm/fault.c

15 years agoMerge branch 'x86/core' into x86/headers
Ingo Molnar [Fri, 13 Feb 2009 12:05:57 +0000 (13:05 +0100)]
Merge branch 'x86/core' into x86/headers

15 years agoALSA: hda - Add snd_hda_multi_out_dig_cleanup()
Takashi Iwai [Fri, 13 Feb 2009 10:32:28 +0000 (11:32 +0100)]
ALSA: hda - Add snd_hda_multi_out_dig_cleanup()

Added the helper function snd_hda_multi_out_dig_cleanup() to clean up
the digital outputs with multi setup.  This call is needed in cases
the codec supports multiple digital outputs as slaves.  Otherwise the
slave widgets aren't properly cleaned up.

For a single digital output (e.g. in patch_conexant.c), this call isn't
needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add missing terminator in slave dig-out array
Takashi Iwai [Fri, 13 Feb 2009 10:37:08 +0000 (11:37 +0100)]
ALSA: hda - Add missing terminator in slave dig-out array

Added the missing terminator for ad1989b_slave_dig_outs[].

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branches 'x86/paravirt', 'x86/pat', 'x86/setup-v2', 'x86/subarch', 'x86/uaccess...
Ingo Molnar [Fri, 13 Feb 2009 08:47:32 +0000 (09:47 +0100)]
Merge branches 'x86/paravirt', 'x86/pat', 'x86/setup-v2', 'x86/subarch', 'x86/uaccess' and 'x86/urgent' into x86/core

15 years agoMerge branch 'x86/mm' into x86/core
Ingo Molnar [Fri, 13 Feb 2009 08:47:24 +0000 (09:47 +0100)]
Merge branch 'x86/mm' into x86/core

15 years agoMerge branches 'x86/acpi', 'x86/asm', 'x86/cpudetect', 'x86/crashdump', 'x86/debug...
Ingo Molnar [Fri, 13 Feb 2009 08:46:36 +0000 (09:46 +0100)]
Merge branches 'x86/acpi', 'x86/asm', 'x86/cpudetect', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/doc', 'x86/header-fixes', 'x86/headers' and 'x86/minor-fixes' into x86/core

15 years agoMerge branch 'x86/cleanups' into x86/core
Ingo Molnar [Fri, 13 Feb 2009 08:45:42 +0000 (09:45 +0100)]
Merge branch 'x86/cleanups' into x86/core

15 years agoMerge branch 'core/percpu' into x86/core
Ingo Molnar [Fri, 13 Feb 2009 08:45:09 +0000 (09:45 +0100)]
Merge branch 'core/percpu' into x86/core

15 years agoMerge branch 'linus' into x86/apic
Ingo Molnar [Fri, 13 Feb 2009 08:44:22 +0000 (09:44 +0100)]
Merge branch 'linus' into x86/apic

Conflicts:
arch/x86/kernel/acpi/boot.c
arch/x86/mm/fault.c

15 years agox86, hpet: fix for LS21 + HPET = boot hang
john stultz [Fri, 13 Feb 2009 02:48:53 +0000 (18:48 -0800)]
x86, hpet: fix for LS21 + HPET = boot hang

Between 2.6.23 and 2.6.24-rc1 a change was made that broke IBM LS21
systems that had the HPET enabled in the BIOS, resulting in boot hangs
for x86_64.

Specifically commit b8ce33590687888ebb900d09557b8807c4539022, which
merges the i386 and x86_64 HPET code.

Prior to this commit, when we setup the HPET timers in x86_64, we did
the following:

hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL |
                    HPET_TN_32BIT, HPET_T0_CFG);

However after the i386/x86_64 HPET merge, we do the following:

cfg = hpet_readl(HPET_Tn_CFG(timer));
cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
HPET_TN_SETVAL | HPET_TN_32BIT;
hpet_writel(cfg, HPET_Tn_CFG(timer));

However on LS21s with HPET enabled in the BIOS, the HPET_T0_CFG register
boots with Level triggered interrupts (HPET_TN_LEVEL) enabled. This
causes the periodic interrupt to be not so periodic, and that results in
the boot time hang I reported earlier in the delay calibration.

My fix: Always disable HPET_TN_LEVEL when setting up periodic mode.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model
Herton Ronaldo Krzesinski [Thu, 12 Feb 2009 19:27:27 +0000 (17:27 -0200)]
ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model

Change HP dv7 quirk: although reported to work with hp-m4 model
(https://bugzilla.novell.com/show_bug.cgi?id=445321), the original
report doesn't contain info about testing of internal microphone.

Recently I received a report about internal mic not working
(https://qa.mandriva.com/show_bug.cgi?id=44855#c193), this must be
related with the forced line in on pin 0x0e done with hp-m4 model. Thus
change the current quirk from STAC_HP_M4 to STAC_HP_DV5, later reported
to be fixed on a provided kernel with this change
(https://qa.mandriva.com/show_bug.cgi?id=44855#c196).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 13 Feb 2009 01:47:15 +0000 (17:47 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
  wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface
  net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
  netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform
  bnx2: Update version to 1.9.2 and copyright.
  bnx2: Fix jumbo frames error handling.
  bnx2: Update 5709 firmware.
  bnx2: Update 5706/5708 firmware.
  3c505: do not set pcb->data.raw beyond its size
  Documentation/connector/cn_test.c: don't use gfp_any()
  net: don't use in_atomic() in gfp_any()
  IRDA: cnt is off by 1
  netxen: remove pcie workaround
  sun3: print when lance_open() fails
  qlge: bugfix: Add missing rx buf clean index on early exit.
  qlge: bugfix: Fix RX scaling values.
  qlge: bugfix: Fix TSO breakage.
  qlge: bugfix: Add missing dev_kfree_skb_any() call.
  qlge: bugfix: Add missing put_page() call.
  qlge: bugfix: Fix fatal error recovery hang.
  qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().
  ...

15 years agowimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface
Inaky Perez-Gonzalez [Fri, 13 Feb 2009 01:00:20 +0000 (17:00 -0800)]
wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface

When a non-wimax interface is looked up by the stack, a bad pointer is
returned when the looked-up interface is not found in the list (of
registered WiMAX interfaces). This causes an oops in the caller when
trying to use the pointer.

Fix by properly setting the pointer to NULL if we don't exit from the
list_for_each() with a found entry.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
Clément Lecigne [Fri, 13 Feb 2009 00:59:09 +0000 (16:59 -0800)]
net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2

In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.

This dummy code should trigger the bug:

int main(void)
{
unsigned char buf[4] = { 0, 0, 0, 0 };
int len;
int sock;
sock = socket(33, 2, 2);
getsockopt(sock, 1, SO_BSDCOMPAT, &buf, &len);
printf("%x%x%x%x\n", buf[0], buf[1], buf[2], buf[3]);
close(sock);
}

Here is a patch that fix this bug by initalizing v.val just after its
declaration.

Signed-off-by: Clément Lecigne <clement.lecigne@netasq.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64...
Yang Hongyang [Fri, 13 Feb 2009 00:57:12 +0000 (16:57 -0800)]
netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform

When compile the latest kernel on IA64 platform,I got a warning:
drivers/net/netxen/netxen_nic_main.c:203: warning: label ‘set_32_bit_mask’
defined but not used

We do not need label ‘set_32_bit_mask’  on IA64 platform,So move it to #else.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Update version to 1.9.2 and copyright.
Michael Chan [Fri, 13 Feb 2009 00:54:48 +0000 (16:54 -0800)]
bnx2: Update version to 1.9.2 and copyright.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Fix jumbo frames error handling.
Michael Chan [Fri, 13 Feb 2009 00:54:13 +0000 (16:54 -0800)]
bnx2: Fix jumbo frames error handling.

If errors are reported on a frame descriptor, we need to
account for the buffer pages that may have been used for this
error packet and recycle them.  Otherwise, we may get the wrong
pages for the next packet.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Update 5709 firmware.
Michael Chan [Fri, 13 Feb 2009 00:53:48 +0000 (16:53 -0800)]
bnx2: Update 5709 firmware.

New firmware fixes a data corruption issue when receiving and
placing jumbo frames into host buffers.  In some cases, the
buffer descriptor is not updated correctly and this will lead
to the driver linking the wrong number of pages into the SKB.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Update 5706/5708 firmware.
Michael Chan [Fri, 13 Feb 2009 00:53:22 +0000 (16:53 -0800)]
bnx2: Update 5706/5708 firmware.

New firmware fixes a data corruption issue when receiving and
placing jumbo frames into host buffers.  In some cases, the
buffer descriptor is not updated correctly and this will lead
to the driver linking the wrong number of pages into the SKB.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago3c505: do not set pcb->data.raw beyond its size
Roel Kluin [Fri, 13 Feb 2009 00:52:31 +0000 (16:52 -0800)]
3c505: do not set pcb->data.raw beyond its size

Ensure that we do not set pcb->data.raw beyond its size, print an error message
and return false if we attempt to. A timout message was printed one too early.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoDocumentation/connector/cn_test.c: don't use gfp_any()
Andrew Morton [Fri, 13 Feb 2009 00:47:01 +0000 (16:47 -0800)]
Documentation/connector/cn_test.c: don't use gfp_any()

cn_test_timer_func() is a timer handler and can never use GFP_KERNEL -
there's no point in using gfp_any() here.

Also, use setup_timer().

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: don't use in_atomic() in gfp_any()
Andrew Morton [Fri, 13 Feb 2009 00:43:17 +0000 (16:43 -0800)]
net: don't use in_atomic() in gfp_any()

The problem is that in_atomic() will return false inside spinlocks if
CONFIG_PREEMPT=n.  This will lead to deadlockable GFP_KERNEL allocations
from spinlocked regions.

Secondly, if CONFIG_PREEMPT=y, this bug solves itself because networking
will instead use GFP_ATOMIC from this callsite.  Hence we won't get the
might_sleep() debugging warnings which would have informed us of the buggy
callsites.

Solve both these problems by switching to in_interrupt().  Now, if someone
runs a gfp_any() allocation from inside spinlock we will get the warning
if CONFIG_PREEMPT=y.

I reviewed all callsites and most of them were too complex for my little
brain and none of them documented their interface requirements.  I have no
idea what this patch will do.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIRDA: cnt is off by 1
Roel Kluin [Fri, 13 Feb 2009 00:42:31 +0000 (16:42 -0800)]
IRDA: cnt is off by 1

If no prior break occurs, cnt reaches 101 after the loop, so we are still able
to change speed when cnt has become 100.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: remove pcie workaround
Dhananjay Phadke [Fri, 13 Feb 2009 00:41:14 +0000 (16:41 -0800)]
netxen: remove pcie workaround

Remove workaround for pcie bug in early revisions of NX3031
(rev 41 or earlier). This is taken care of during firmware init.

The workaround required writing pcie config reg of every
pcie function on a card, not all of which are enabled.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosun3: print when lance_open() fails
Roel Kluin [Fri, 13 Feb 2009 00:40:20 +0000 (16:40 -0800)]
sun3: print when lance_open() fails

With while (--i > 0) { ... } i reaches 0; print when lance_open() fails

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Add missing rx buf clean index on early exit.
Ron Mercer [Fri, 13 Feb 2009 00:38:34 +0000 (16:38 -0800)]
qlge: bugfix: Add missing rx buf clean index on early exit.

The large receive buffer queue is not properly tracking the current
index in the case where an early exit occurs.  This can happen when a
page alloc or dma mapping fails.  If this occurs the queue will get
out of sync and invalid indexes can be written to the hardware.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Fix RX scaling values.
Ron Mercer [Fri, 13 Feb 2009 00:38:18 +0000 (16:38 -0800)]
qlge: bugfix: Fix RX scaling values.

Receive packets were only scaling across 2 of the receive queues. The
value was hardcoded to 2 instead of being based on how many rx queues
were running.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Fix TSO breakage.
Ron Mercer [Fri, 13 Feb 2009 00:38:03 +0000 (16:38 -0800)]
qlge: bugfix: Fix TSO breakage.

Moved the buffer mapping to a point after TSO logic has modified the
iph->check field. We were seeing stale data on the PCIe bus.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Add missing dev_kfree_skb_any() call.
Ron Mercer [Fri, 13 Feb 2009 00:37:48 +0000 (16:37 -0800)]
qlge: bugfix: Add missing dev_kfree_skb_any() call.

We put the skb back if we can't get mapping for it.  We don't
want unmapped buffers on our receive buffer queue.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Add missing put_page() call.
Ron Mercer [Fri, 13 Feb 2009 00:37:32 +0000 (16:37 -0800)]
qlge: bugfix: Add missing put_page() call.

We put the page back if we can't get mapping for it.  We don't
want unmapped buffers on our receive buffer queue.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Fix fatal error recovery hang.
Ron Mercer [Fri, 13 Feb 2009 00:37:13 +0000 (16:37 -0800)]
qlge: bugfix: Fix fatal error recovery hang.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().
Ron Mercer [Fri, 13 Feb 2009 00:36:50 +0000 (16:36 -0800)]
qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb().

Replace calls to vlan_hwaccel_rx() and netif_rx().
Thanks to Dave Miller for pointing out the the driver was making
the wrong upcall for passing packets into the stack.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoTG3: limit reaches -1
Roel Kluin [Fri, 13 Feb 2009 00:33:27 +0000 (16:33 -0800)]
TG3: limit reaches -1

With while (limit--) { ... } limit reaches -1, so 0 means success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agox86: CPA avoid repeated lazy mmu flush
Thomas Gleixner [Thu, 12 Feb 2009 20:16:09 +0000 (21:16 +0100)]
x86: CPA avoid repeated lazy mmu flush

Impact: Flush the lazy MMU only once

Pending mmu updates only need to be flushed once to bring the
in-memory pagetable state up to date.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agox86: warn if arch_flush_lazy_mmu_cpu is called in preemptible context
Thomas Gleixner [Thu, 12 Feb 2009 20:30:48 +0000 (21:30 +0100)]
x86: warn if arch_flush_lazy_mmu_cpu is called in preemptible context

Impact: Catch cases where lazy MMU state is active in a preemtible context

arch_flush_lazy_mmu_cpu() has been changed to disable preemption so
the checks in enter/leave will never trigger. Put the preemtible()
check into arch_flush_lazy_mmu_cpu() to catch such cases.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agox86/paravirt: make arch_flush_lazy_mmu/cpu disable preemption
Jeremy Fitzhardinge [Thu, 12 Feb 2009 18:02:56 +0000 (10:02 -0800)]
x86/paravirt: make arch_flush_lazy_mmu/cpu disable preemption

Impact: avoid access to percpu vars in preempible context

They are intended to be used whenever there's the possibility
that there's some stale state which is going to be overwritten
with a queued update, or to force a state change when we may be
in lazy mode.  Either way, we could end up calling it with
preemption enabled, so wrap the functions in their own little
preempt-disable section so they can be safely called in any
context (though preemption should never be enabled if we're actually
in a lazy state).

(Move out of line to avoid #include dependencies.)

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Thu, 12 Feb 2009 17:56:14 +0000 (09:56 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  mm: Export symbol ksize()

15 years agoFix page writeback thinko, causing Berkeley DB slowdown
Nick Piggin [Thu, 12 Feb 2009 03:34:23 +0000 (04:34 +0100)]
Fix page writeback thinko, causing Berkeley DB slowdown

A bug was introduced into write_cache_pages cyclic writeout by commit
31a12666d8f0c22235297e1c1575f82061480029 ("mm: write_cache_pages cyclic
fix").  The intention (and comments) is that we should cycle back and
look for more dirty pages at the beginning of the file if there is no
more work to be done.

But the !done condition was dropped from the test.  This means that any
time the page writeout loop breaks (eg.  due to nr_to_write == 0), we
will set index to 0, then goto again.  This will set done_index to
index, then find done is set, so will proceed to the end of the
function.  When updating mapping->writeback_index for cyclic writeout,
we now use done_index == 0, so we're always cycling back to 0.

This seemed to be causing random mmap writes (slapadd and iozone) to
start writing more pages from the LRU and writeout would slowdown, and
caused bugzilla entry

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

about Berkeley DB slowing down dramatically.

With this patch, iozone random write performance is increased nearly
5x on my system (iozone -B -r 4k -s 64k -s 512m -s 1200m on ext2).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Reported-and-tested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: Export symbol ksize()
Kirill A. Shutemov [Tue, 10 Feb 2009 13:21:44 +0000 (15:21 +0200)]
mm: Export symbol ksize()

Commit 7b2cd92adc5430b0c1adeb120971852b4ea1ab08 ("crypto: api - Fix
zeroing on free") added modular user of ksize(). Export that to fix
crypto.ko compilation.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
15 years agox86, 32-bit: refactor find_low_pfn_range()
Ingo Molnar [Thu, 12 Feb 2009 14:16:03 +0000 (15:16 +0100)]
x86, 32-bit: refactor find_low_pfn_range()

Impact: cleanup

Make the max_low_pfn logic a bit more standard between
lowmem_pfn_init() and highmem_pfn_init().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, 32-bit: clean up find_low_pfn_range()
Ingo Molnar [Thu, 12 Feb 2009 12:31:41 +0000 (13:31 +0100)]
x86, 32-bit: clean up find_low_pfn_range()

Impact: cleanup

Split find_low_pfn_range() into two functions:

 - lowmem_pfn_init()
 - highmem_pfn_init()

The former gets called if all of RAM fits into lowmem,
otherwise we call highmem_pfn_init().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix warning in find_low_pfn_range()
Ingo Molnar [Thu, 12 Feb 2009 12:28:43 +0000 (13:28 +0100)]
x86: fix warning in find_low_pfn_range()

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, defconfig: turn off CONFIG_SCSI_ISCSI_ATTRS=y
Ingo Molnar [Thu, 12 Feb 2009 11:59:05 +0000 (12:59 +0100)]
x86, defconfig: turn off CONFIG_SCSI_ISCSI_ATTRS=y

It was enabled by mistake - iscsi is not included in a typical
default PC, and no other architecture has it built-in (=y) either.

Turn it off.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, defconfig: turn off CONFIG_ENABLE_WARN_DEPRECATED
Ingo Molnar [Thu, 12 Feb 2009 11:51:29 +0000 (12:51 +0100)]
x86, defconfig: turn off CONFIG_ENABLE_WARN_DEPRECATED

deprecation warnings have become rather noisy lately:

drivers/i2c/i2c-core.c: In function ‘i2c_new_device’:
drivers/i2c/i2c-core.c:283: warning: ‘i2c_attach_client’ is deprecated (declared at include/linux/i2c.h:434)
drivers/i2c/i2c-core.c: In function ‘i2c_del_adapter’:
drivers/i2c/i2c-core.c:646: warning: ‘detach_client’ is deprecated (declared at include/linux/i2c.h:154)
drivers/i2c/i2c-core.c: In function ‘i2c_register_driver’:
drivers/i2c/i2c-core.c:713: warning: ‘detach_client’ is deprecated (declared at include/linux/i2c.h:154)
drivers/i2c/i2c-core.c: In function ‘__detach_adapter’:
drivers/i2c/i2c-core.c:780: warning: ‘detach_client’ is deprecated (declared at include/linux/i2c.h:154)
drivers/i2c/i2c-core.c: At top level:
drivers/i2c/i2c-core.c:876: warning: ‘i2c_attach_client’ is deprecated (declared at drivers/i2c/i2c-core.c:827)
drivers/i2c/i2c-core.c:876: warning: ‘i2c_attach_client’ is deprecated (declared at drivers/i2c/i2c-core.c:827)
drivers/i2c/i2c-core.c:904: warning: ‘i2c_detach_client’ is deprecated (declared at drivers/i2c/i2c-core.c:879)
drivers/i2c/i2c-core.c:904: warning: ‘i2c_detach_client’ is deprecated (declared at drivers/i2c/i2c-core.c:879)

So turn it off for now - these reminders can obscure critical warnings.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, defconfig: update the 64-bit defconfig
Ingo Molnar [Thu, 12 Feb 2009 11:48:48 +0000 (12:48 +0100)]
x86, defconfig: update the 64-bit defconfig

Signed-off-by: Ingo Molnar <mingo@elte.hu>