GitHub/mt8127/android_kernel_alcatel_ttab.git
15 years agox86: truncate ISA addresses to unsigned int
H. Peter Anvin [Tue, 17 Feb 2009 21:01:51 +0000 (13:01 -0800)]
x86: truncate ISA addresses to unsigned int

Impact: Cleanup; fix inappropriate macro use

ISA addresses on x86 are mapped 1:1 with the physical address space.
Since the ISA address space is only 24 bits (32 for VLB or LPC) it
will always fit in an unsigned int, and at least in the aha1542 driver
using a wider type would cause an undesirable promotion.  Hence
explicitly cast the ISA bus addresses to unsigned int.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
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./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./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./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./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>
15 years agox86, defconfig: update the 32-bit defconfig
Ingo Molnar [Thu, 12 Feb 2009 11:43:52 +0000 (12:43 +0100)]
x86, defconfig: update the 32-bit defconfig

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, pat: fix warn_on_once() while mapping 0-1MB range with /dev/mem
Suresh Siddha [Wed, 11 Feb 2009 19:20:23 +0000 (11:20 -0800)]
x86, pat: fix warn_on_once() while mapping 0-1MB range with /dev/mem

Jeff Mahoney reported:

> With Suse's hwinfo tool, on -tip:
> WARNING: at arch/x86/mm/pat.c:637 reserve_pfn_range+0x5b/0x26d()

reserve_pfn_range() is not tracking the memory range below 1MB
as non-RAM and as such is inconsistent with similar checks in
reserve_memtype() and free_memtype()

Rename the pagerange_is_ram() to pat_pagerange_is_ram() and add the
"track legacy 1MB region as non RAM" condition.

And also, fix reserve_pfn_range() to return -EINVAL, when the pfn
range is RAM. This is to be consistent with this API design.

Reported-and-tested-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86/cpa: make sure cpa is safe to call in lazy mmu mode
Jeremy Fitzhardinge [Wed, 11 Feb 2009 17:32:19 +0000 (09:32 -0800)]
x86/cpa: make sure cpa is safe to call in lazy mmu mode

Impact: fix race leading to crash under KVM and Xen

The CPA code may be called while we're in lazy mmu update mode - for
example, when using DEBUG_PAGE_ALLOC and doing a slab allocation
in an interrupt handler which interrupted a lazy mmu update.  In this
case, the in-memory pagetable state may be out of date due to pending
queued updates.  We need to flush any pending updates before inspecting
the page table.  Similarly, we must explicitly flush any modifications
CPA may have made (which comes down to flushing queued operations when
flushing the TLB).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Stable Kernel <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: UV: fix header struct usage
Randy Dunlap [Sat, 31 Jan 2009 20:32:26 +0000 (12:32 -0800)]
x86: UV: fix header struct usage

Impact: Fixes warning

Fix uv.h struct usage:

arch/x86/include/asm/uv/uv.h:16: warning: 'struct mm_struct' declared inside parameter list
arch/x86/include/asm/uv/uv.h:16: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
15 years agox86: merge sys_rt_sigreturn between 32 and 64 bits
H. Peter Anvin [Thu, 12 Feb 2009 00:31:40 +0000 (16:31 -0800)]
x86: merge sys_rt_sigreturn between 32 and 64 bits

Impact: cleanup

With the recent changes in the 32-bit code to make system calls which
use struct pt_regs take a pointer, sys_rt_sigreturn() have become
identical between 32 and 64 bits, and both are empty wrappers around
do_rt_sigreturn().  Remove both wrappers and rename both to
sys_rt_sigreturn().

Cc: Brian Gerst <brgerst@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
15 years agoMerge git://git.infradead.org/users/cbou/battery-2.6.29
Linus Torvalds [Thu, 12 Feb 2009 00:28:08 +0000 (16:28 -0800)]
Merge git://git.infradead.org/users/cbou/battery-2.6.29

* git://git.infradead.org/users/cbou/battery-2.6.29:
  pcf50633_charger: Fix typo

15 years agoALSA: hda - Register (new) devices at reconfig
Takashi Iwai [Wed, 11 Feb 2009 23:13:19 +0000 (00:13 +0100)]
ALSA: hda - Register (new) devices at reconfig

The devices that have been newly added during reconfig must be
registered.  Otherwise they won't be visible to user-space.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: mtpav - Fix initial value for input hwport
Takashi Iwai [Wed, 11 Feb 2009 23:06:42 +0000 (00:06 +0100)]
ALSA: mtpav - Fix initial value for input hwport

Fix the initial value for input hwport.  The old value (-1) may cause
Oops when an realtime MIDI byte is received before the input port is
explicitly given.
Instead, now it's set to the broadcasting as default.

Tested-by: Holger Dehnhardt <dehnhardt@ahdehnhardt.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: move pte types into pgtable*.h
Jeremy Fitzhardinge [Wed, 11 Feb 2009 18:20:05 +0000 (10:20 -0800)]
x86: move pte types into pgtable*.h

pgtable*.h is intended for definitions relating to actual pagetables
and their entries, so move all the definitions for
(pte|pmd|pud|pgd)(val)?_t to the appropriate pgtable*.h headers.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: define pud_flags and pud_large properly to allow non-PAE builds
Jeremy Fitzhardinge [Mon, 9 Feb 2009 08:09:52 +0000 (00:09 -0800)]
x86: define pud_flags and pud_large properly to allow non-PAE builds

15 years agox86: move defs around to allow paravirt.h to just include page_types.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 07:42:01 +0000 (23:42 -0800)]
x86: move defs around to allow paravirt.h to just include page_types.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agox86: move 2 and 3 level asm-generic defs into page-defs
Jeremy Fitzhardinge [Mon, 9 Feb 2009 07:24:26 +0000 (23:24 -0800)]
x86: move 2 and 3 level asm-generic defs into page-defs

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agox86: create _types.h counterparts for page*.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 06:52:14 +0000 (22:52 -0800)]
x86: create _types.h counterparts for page*.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agox86: Include pgtable_32|64_types.h in pgtable_types.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 03:02:47 +0000 (19:02 -0800)]
x86: Include pgtable_32|64_types.h in pgtable_types.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agox86: Split pgtable_64.h into pgtable_64_types.h and pgtable_64.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 02:50:52 +0000 (18:50 -0800)]
x86: Split pgtable_64.h into pgtable_64_types.h and pgtable_64.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agox86: Split pgtable_32.h into pgtable_32.h and pgtable_32_types.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 02:49:05 +0000 (18:49 -0800)]
x86: Split pgtable_32.h into pgtable_32.h and pgtable_32_types.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agoSplit pgtable.h into pgtable_types.h and pgtable.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 02:46:18 +0000 (18:46 -0800)]
Split pgtable.h into pgtable_types.h and pgtable.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agox86: rename *-defs.h to *-_types.h for consistency
Jeremy Fitzhardinge [Wed, 11 Feb 2009 20:08:01 +0000 (12:08 -0800)]
x86: rename *-defs.h to *-_types.h for consistency

The kernel tends to call definition-only headers *_types.h, so rename
the x86 page/pgtable headers accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agow1: w1 temp calculation overflow fix
Ian Dall [Wed, 11 Feb 2009 21:04:46 +0000 (13:04 -0800)]
w1: w1 temp calculation overflow fix

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

When the temperature exceeds 32767 milli-degrees the temperature overflows
to -32768 millidegrees.  These are bothe well within the -55 - +125 degree
range for the sensor.

Fix overflow in left-shift of a u8.

Signed-off-by: Ian Dall <ian@beware.dropbear.id.au>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonbd: fix I/O hang on disconnected nbds
Paul Clements [Wed, 11 Feb 2009 21:04:45 +0000 (13:04 -0800)]
nbd: fix I/O hang on disconnected nbds

Fix a problem that causes I/O to a disconnected (or partially initialized)
nbd device to hang indefinitely.  To reproduce:

# ioctl NBD_SET_SIZE_BLOCKS /dev/nbd23 514048
# dd if=/dev/nbd23 of=/dev/null bs=4096 count=1

...hangs...

This can also occur when an nbd device loses its nbd-client/server
connection.  Although we clear the queue of any outstanding I/Os after the
client/server connection fails, any additional I/Os that get queued later
will hang.

This bug may also be the problem reported in this bug report:
http://bugzilla.kernel.org/show_bug.cgi?id=12277

Testing would need to be performed to determine if the two issues are the
same.

This problem was introduced by the new request handling thread code ("NBD:
allow nbd to be used locally", 3/2008), which entered into mainline around
2.6.25.

The fix, which is fairly simple, is to restore the check for lo->sock
being NULL in do_nbd_request.  This causes I/O to an uninitialized nbd to
immediately fail with an I/O error, as it did prior to the introduction of
this bug.

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Reported-by: Jon Nelson <jnelson-kernel-bugzilla@jamponi.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: <stable@kernel.org> [2.6.26.x, 2.6.27.x, 2.6.28.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: rearrange exit_mmap() to unlock before arch_exit_mmap
Jeremy Fitzhardinge [Wed, 11 Feb 2009 21:04:41 +0000 (13:04 -0800)]
mm: rearrange exit_mmap() to unlock before arch_exit_mmap

Christophe Saout reported [in precursor to:
http://marc.info/?l=linux-kernel&m=123209902707347&w=4]:

> Note that I also some a different issue with CONFIG_UNEVICTABLE_LRU.
> Seems like Xen tears down current->mm early on process termination, so
> that __get_user_pages in exit_mmap causes nasty messages when the
> process had any mlocked pages.  (in fact, it somehow manages to get into
> the swapping code and produces a null pointer dereference trying to get
> a swap token)

Jeremy explained:

Yes.  In the normal case under Xen, an in-use pagetable is "pinned",
meaning that it is RO to the kernel, and all updates must go via hypercall
(or writes are trapped and emulated, which is much the same thing).  An
unpinned pagetable is not currently in use by any process, and can be
directly accessed as normal RW pages.

As an optimisation at process exit time, we unpin the pagetable as early
as possible (switching the process to init_mm), so that all the normal
pagetable teardown can happen with direct memory accesses.

This happens in exit_mmap() -> arch_exit_mmap().  The munlocking happens
a few lines below.  The obvious thing to do would be to move
arch_exit_mmap() to below the munlock code, but I think we'd want to
call it even if mm->mmap is NULL, just to be on the safe side.

Thus, this patch:

exit_mmap() needs to unlock any locked vmas before calling arch_exit_mmap,
as the latter may switch the current mm to init_mm, which would cause the
former to fail.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Christophe Saout <christophe@saout.de>
Cc: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Christophe Saout <christophe@saout.de>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: <stable@kernel.org> [2.6.28.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoparport: parport_serial, don't bind netmos ibm 0299
Jiri Slaby [Wed, 11 Feb 2009 21:04:40 +0000 (13:04 -0800)]
parport: parport_serial, don't bind netmos ibm 0299

Since netmos 9835 with subids 0x1014(IBM):0x0299 is now bound with
serial/8250_pci, because it has no parallel ports and subdevice id isn't
in the expected form, return -ENODEV from probe function.

This is performed in netmos preinit_hook.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agowriteback: fix break condition
Federico Cuello [Wed, 11 Feb 2009 21:04:39 +0000 (13:04 -0800)]
writeback: fix break condition

Commit dcf6a79dda5cc2a2bec183e50d829030c0972aaa ("write-back: fix
nr_to_write counter") fixed nr_to_write counter, but didn't set the break
condition properly.

If nr_to_write == 0 after being decremented it will loop one more time
before setting done = 1 and breaking the loop.

[akpm@linux-foundation.org: coding-style fixes]
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>