Ingo Molnar [Wed, 11 Feb 2009 09:49:40 +0000 (10:49 +0100)]
Merge branch 'x86/apic' of git://git./linux/kernel/git/jeremy/xen into x86/apic
Alok Kataria [Wed, 11 Feb 2009 00:45:37 +0000 (16:45 -0800)]
x86, apic: fix initialization of wakeup_cpu
With refactoring of wake_cpu macros the 32bit code in tip doesn't
execute generic_apic_probe if CONFIG_X86_32_NON_STANDARD is not set.
Even on a x86 STANDARD cpu we need to execute the generic_apic_probe
function, as we rely on this function to execute the update_genapic
quirk which initilizes apic->wakeup_cpu.
Failing to do so results in we making a call to a null function in do_boot_cpu.
The stack trace without the patch goes like this.
Booting processor 1 APIC 0x1 ip 0x6000
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<(null)>] (null)
*pdpt =
0000000000839001 *pde =
0000000000c97067 *pte =
0000000000000163
Oops: 0000 [#1] SMP
last sysfs file:
Modules linked in:
Pid: 1, comm: swapper Not tainted (2.6.29-rc4-tip #18) VMware Virtual Platform
EIP: 0062:[<
00000000>] EFLAGS:
00010293 CPU: 0
EIP is at 0x0
EAX:
00000001 EBX:
00006000 ECX:
c077ed00 EDX:
00006000
ESI:
00000001 EDI:
00000001 EBP:
ef04cf40 ESP:
ef04cf1c
DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 006a
Process swapper (pid: 1, ti=
ef04c000 task=
ef050000 task.ti=
ef04c000)
Stack:
c0644e52 00000000 ef04cf24 ef04cf24 c064468d c0886dc0 00000000 c0702aea
ef055480 00000001 00000101 dead4ead ffffffff ffffffff c08af530 00000000
c0709715 ef04cf60 ef04cf60 00000001 00000000 00000000 dead4ead ffffffff
Call Trace:
[<
c0644e52>] ? native_cpu_up+0x2de/0x45b
[<
c064468d>] ? do_fork_idle+0x0/0x19
[<
c0645c5e>] ? _cpu_up+0x88/0xe8
[<
c0645d20>] ? cpu_up+0x42/0x4e
[<
c07e7462>] ? kernel_init+0x99/0x14b
[<
c07e73c9>] ? kernel_init+0x0/0x14b
[<
c040375f>] ? kernel_thread_helper+0x7/0x10
Code: Bad EIP value.
EIP: [<
00000000>] 0x0 SS:ESP 006a:
ef04cf1c
I think we should call generic_apic_probe unconditionally for 32 bit now.
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ian Campbell [Mon, 9 Feb 2009 20:05:48 +0000 (12:05 -0800)]
xen: expose enable_IO_APIC for 32-bit
enable_IO_APIC() is defined for both 32- and 64-bit x86, so it should
be declared for both.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: unstatic ioapic entry funcs
Unstatic ioapic_write_entry and setup_ioapic_entry functions so that
the Xen code can do its own ioapic routing setup.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: add mp_find_ioapic_pin
Add mp_find_ioapic_pin() to find an IO APIC's specific pin from a GSI,
and use this function within acpi/boot. Make it non-static so other
code can use it too.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: unstatic mp_find_ioapic so it can be used elsewhere
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:47 +0000 (12:05 -0800)]
x86: make apic_* operations inline functions
Mainly to get proper type-checking and consistency.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Ian Campbell [Sat, 7 Feb 2009 00:55:58 +0000 (16:55 -0800)]
xen: explicitly initialise the cpu field of irq_info
I was seeing a very odd crash on 64 bit in bind_evtchn_to_cpu because
cpu_from_irq(irq) was coming out as -1. I found this was coming direct
from the mk_ipi_info call.
It's not clear to me that this isn't a compiler bug (implicit
initialisation to zero of unsigned shorts in a struct not handled
correctly?).
On the other hand is it true that all event channels start of bound to
CPU 0? If not then -1 might be correct and the various other functions
should cope with this.
Signed-off-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:46 +0000 (14:09 -0800)]
xen: make sure that softirqs get handled at the end of event processing
Make sure that irq_enter()/irq_exit() wrap the entire event processing
loop, rather than each individual event invokation. This makes sure
that softirq processing is deferred until the end of event processing,
rather than in the middle with interrupts disabled.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:45 +0000 (14:09 -0800)]
xen: remove irq bindcount
There should be no need for us to maintain our own bind count for
irqs, since the surrounding irq system should keep track of shared
irqs for us.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:44 +0000 (14:09 -0800)]
xen: pack all irq-related info together
Put all irq info into one struct. Also, use a union to keep
event channel type-specific information, rather than overloading the
index field.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:43 +0000 (14:09 -0800)]
xen: use our own eventchannel->irq path
Rather than overloading vectors for event channels, take full
responsibility for mapping an event channel to irq directly. With
this patch Xen has its own irq allocator.
When the kernel gets an event channel upcall, it maps the event
channel number to an irq and injects it into the normal interrupt
path.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Mon, 9 Feb 2009 11:16:59 +0000 (12:16 +0100)]
Merge branch 'x86/paravirt' into x86/apic
Conflicts:
arch/x86/mach-voyager/voyager_smp.c
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:42 +0000 (14:09 -0800)]
xen: set irq_chip disable
By default, the irq_chip.disable operation is a no-op. Explicitly set
it to disable the Xen event channel.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:41 +0000 (14:09 -0800)]
x86: unify do_IRQ()
With the differences in interrupt handling hoisted into handle_irq(),
do_IRQ is more or less identical between 32 and 64 bit, so unify it.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Fri, 6 Feb 2009 22:09:40 +0000 (14:09 -0800)]
x86: add handle_irq() to allow interrupt injection
Xen uses a different interrupt path, so introduce handle_irq() to
allow interrupts to be inserted into the normal interrupt path. This
is handled slightly differently on 32 and 64-bit.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: find nr_irqs_gsi with mp_ioapic_routing
Impact: find right nr_irqs_gsi on some systems.
One test-system has gap between gsi's:
[ 0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 4, version 0, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: IOAPIC (id[0x05] address[0xfeafd000] gsi_base[48])
[ 0.000000] IOAPIC[1]: apic_id 5, version 0, address 0xfeafd000, GSI 48-54
[ 0.000000] ACPI: IOAPIC (id[0x06] address[0xfeafc000] gsi_base[56])
[ 0.000000] IOAPIC[2]: apic_id 6, version 0, address 0xfeafc000, GSI 56-62
...
[ 0.000000] nr_irqs_gsi: 38
So nr_irqs_gsi is not right. some irq for MSI will overwrite with io_apic.
need to get that with acpi_probe_gsi when acpi io_apic is used
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: check_timer cleanup
Impact: make check-timer more robust potentially solve boot fragility
For edge trigger io-apic routing, we already unmasked the pin via
setup_IO_APIC_irq(), so don't unmask it again.
Also call local_irq_disable() between timer_irq_works(), because it
calls local_irq_enable() inside.
Also remove not needed apic version reading for 64-bit
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86: use NR_IRQS_LEGACY to replace 16
Impact: cleanup
also could kill platform_legacy_irq
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Mon, 9 Feb 2009 00:18:03 +0000 (16:18 -0800)]
x86/irq: optimize nr_irqs
Impact: make nr_irqs depend more on cards used in a system
depend on nr_irq_gsi more, and have a ratio for MSI.
v2: make nr_irqs less than NR_VECTORS * nr_cpu_ids
aka if only one cpu, we only can support nr_irqs = NR_VECTORS
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 5 Feb 2009 15:21:53 +0000 (16:21 +0100)]
x86: clean up arch/x86/Kconfig*
- Consistent alignment of help text
- Use the ---help--- keyword everywhere consistently as a visual separator
- fix whitespace mismatches
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Sun, 1 Feb 2009 10:25:57 +0000 (11:25 +0100)]
x86, numaq: cleanups
Also move xquad_portio over to where it's allocated.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Sat, 31 Jan 2009 16:32:31 +0000 (17:32 +0100)]
Merge branch 'x86/urgent' into x86/apic
Conflicts:
arch/x86/mach-default/setup.c
Semantic merge:
arch/x86/kernel/irqinit_32.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Sat, 31 Jan 2009 13:09:06 +0000 (14:09 +0100)]
smp, generic: introduce arch_disable_smp_support(), build fix
This function should be provided on UP too.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Sat, 31 Jan 2009 01:29:27 +0000 (17:29 -0800)]
x86: move default_ipi_xx back to ipi.c
Impact: cleanup
only leave _default_ipi_xx etc in .h
Beyond the cleanup factor, this saves a bit of code size as well:
text data bss dec hex filename
7281931 1630144 1463304 10375379 9e50d3 vmlinux.before
7281753 1630144 1463304 10375201 9e5021 vmlinux.after
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Sat, 31 Jan 2009 02:57:12 +0000 (03:57 +0100)]
x86, apic: explain the purpose of max_physical_apicid
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Sat, 31 Jan 2009 02:36:17 +0000 (03:36 +0100)]
smp, generic: introduce arch_disable_smp_support() instead of disable_ioapic_setup()
Impact: cleanup
disable_ioapic_setup() in init/main.c is ugly as the function is
x86-specific. The #ifdef inline prototype there is ugly too.
Replace it with a generic arch_disable_smp_support() function - which
has a weak alias for non-x86 architectures and for non-ioapic x86 builds.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Kyle McMartin [Wed, 4 Feb 2009 22:29:19 +0000 (14:29 -0800)]
x86: disable intel_iommu support by default
Due to recurring issues with DMAR support on certain platforms.
There's a number of filesystem corruption incidents reported:
https://bugzilla.redhat.com/show_bug.cgi?id=479996
http://bugzilla.kernel.org/show_bug.cgi?id=12578
Provide a Kconfig option to change whether it is enabled by
default.
If disabled, it can still be reenabled by passing intel_iommu=on to the
kernel. Keep the .config option off by default.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Thu, 5 Feb 2009 02:33:38 +0000 (18:33 -0800)]
x86: don't apply __supported_pte_mask to non-present ptes
On an x86 system which doesn't support global mappings,
__supported_pte_mask has _PAGE_GLOBAL clear, to make sure it never
appears in the PTE. pfn_pte() and so on will enforce it with:
static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
{
return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) |
pgprot_val(pgprot)) & __supported_pte_mask);
}
However, we overload _PAGE_GLOBAL with _PAGE_PROTNONE on non-present
ptes to distinguish them from swap entries. However, applying
__supported_pte_mask indiscriminately will clear the bit and corrupt the
pte.
I guess the best fix is to only apply __supported_pte_mask to present
ptes. This seems like the right solution to me, as it means we can
completely ignore the issue of overlaps between the present pte bits and
the non-present pte-as-swap entry use of the bits.
__supported_pte_mask contains the set of flags we support on the
current hardware. We also use bits in the pte for things like
logically present ptes with no permissions, and swap entries for
swapped out pages. We should only apply __supported_pte_mask to
present ptes, because otherwise we may destroy other information being
stored in the ptes.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:55:54 +0000 (13:55 -0800)]
xen: use direct ops on 64-bit
Enable the use of the direct vcpu-access operations on 64-bit.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:55:42 +0000 (13:55 -0800)]
xen: make direct versions of irq_enable/disable/save/restore to common code
Now that x86-64 has directly accessible percpu variables, it can also
implement the direct versions of these operations, which operate on a
vcpu_info structure directly embedded in the percpu area.
In fact, the 64-bit versions are more or less identical, and so can be
shared. The only two differences are:
1. xen_restore_fl_direct takes its argument in eax on 32-bit, and rdi on 64-bit.
Unfortunately it isn't possible to directly refer to the 2nd lsb of rdi directly
(as you can with %ah), so the code isn't quite as dense.
2. check_events needs to variants to save different registers.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:55:31 +0000 (13:55 -0800)]
xen: setup percpu data pointers
We need to access percpu data fairly early, so set up the percpu
registers as soon as possible. We only need to load the appropriate
segment register. We already have a GDT, but its hard to change it
early because we need to manipulate the pagetable to do so, and that
hasn't been set up yet.
Also, set the kernel stack when bringing up secondary CPUs. If we
don't they all end up sharing the same stack...
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
H. Peter Anvin [Thu, 5 Feb 2009 00:58:26 +0000 (16:58 -0800)]
Merge branch 'core/percpu' into x86/paravirt
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:58:06 +0000 (13:58 -0800)]
xen: fix 32-bit build resulting from mmu move
Moving the mmu code from enlighten.c to mmu.c inadvertently broke the
32-bit build. Fix it.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Alex Chiang [Wed, 4 Feb 2009 23:44:01 +0000 (16:44 -0700)]
x86: fix grammar in user-visible BIOS warning
Fix user-visible grammo.
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Borislav Petkov [Wed, 4 Feb 2009 20:44:04 +0000 (21:44 +0100)]
x86/Kconfig.cpu: make Kconfig help readable in the console
Impact: cleanup
Some lines exceed the 80 char width making them unreadable.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Kyle McMartin [Wed, 4 Feb 2009 20:54:45 +0000 (15:54 -0500)]
x86, 64-bit: print DMI info in the oops trace
This patch echoes what we already do on 32-bit since
90f7d25c6b672137344f447a30a9159945ffea72, and prints the DMI
product name in show_regs, so that system specific problems can be
easily identified.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Wed, 4 Feb 2009 13:54:56 +0000 (14:54 +0100)]
Merge branch 'core/xen' into x86/urgent
Borislav Petkov [Tue, 3 Feb 2009 15:24:22 +0000 (16:24 +0100)]
x86: APIC: enable workaround on AMD Fam10h CPUs
Impact: fix to enable APIC for AMD Fam10h on chipsets with a missing/b0rked
ACPI MP table (MADT)
Booting a 32bit kernel on an AMD Fam10h CPU running on chipsets with
missing/b0rked MP table leads to a hang pretty early in the boot process
due to the APIC not being initialized. Fix that by falling back to the
default APIC base address in 32bit code, as it is done in the 64bit
codepath.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Jeremy Fitzhardinge [Wed, 4 Feb 2009 00:01:46 +0000 (16:01 -0800)]
xen: disable interrupts before saving in percpu
Impact: Fix race condition
xen_mc_batch has a small preempt race where it takes the address of a
percpu variable immediately before disabling interrupts, thereby
leaving a small window in which we may migrate to another cpu and save
the flags in the wrong percpu variable. Disable interrupts before
saving the old flags in a percpu.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Jeremy Fitzhardinge [Wed, 4 Feb 2009 00:00:38 +0000 (16:00 -0800)]
x86/paravirt: return full 64-bit result
Impact: Bug fix
A hunk went missing in the original patch, and callee-save callsites were
not marked as returning the upper 32-bit of result, causing Badness.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 3 Feb 2009 05:42:40 +0000 (21:42 -0800)]
x86: add x86@kernel.org to MAINTAINERS
Impact: Documentation only
There is an email alias as well to reach the x86 maintainers: x86@kernel.org.
Document it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Martin Hicks [Fri, 30 Jan 2009 16:50:54 +0000 (10:50 -0600)]
x86: push old stack address on irqstack for unwinder
Impact: Fixes dumpstack and KDB on 64 bits
This re-adds the old stack pointer to the top of the irqstack to help
with unwinding. It was removed in commit
d99015b1abbad743aa049b439c1e1dede6d0fa49
as part of the save_args out-of-line work.
Both dumpstack and KDB require this information.
Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Yinghai Lu [Tue, 3 Feb 2009 02:16:19 +0000 (18:16 -0800)]
x86, percpu: fix kexec with vmlinux
Impact: fix regression with kexec with vmlinux
Split data.init into data.init, percpu, data.init2 sections
instead of let data.init wrap percpu secion.
Thus kexec loading will be happy, because sections will not
overlap.
Before the patch we have:
Elf file type is EXEC (Executable file)
Entry point 0x200000
There are 6 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000200000 0xffffffff80200000 0x0000000000200000
0x0000000000ca6000 0x0000000000ca6000 R E 200000
LOAD 0x0000000000ea6000 0xffffffff80ea6000 0x0000000000ea6000
0x000000000014dfe0 0x000000000014dfe0 RWE 200000
LOAD 0x0000000001000000 0xffffffffff600000 0x0000000000ff4000
0x0000000000000888 0x0000000000000888 RWE 200000
LOAD 0x00000000011f6000 0xffffffff80ff6000 0x0000000000ff6000
0x0000000000073086 0x0000000000a2d938 RWE 200000
LOAD 0x0000000001400000 0x0000000000000000 0x000000000106a000
0x00000000001d2ce0 0x00000000001d2ce0 RWE 200000
NOTE 0x00000000009e2c1c 0xffffffff809e2c1c 0x00000000009e2c1c
0x0000000000000024 0x0000000000000024 4
Section to Segment mapping:
Segment Sections...
00 .text .notes __ex_table .rodata __bug_table .pci_fixup .builtin_fw __ksymtab __ksymtab_gpl __ksymtab_strings __init_rodata __param
01 .data .init.rodata .data.cacheline_aligned .data.read_mostly
02 .vsyscall_0 .vsyscall_fn .vsyscall_gtod_data .vsyscall_1 .vsyscall_2 .vgetcpu_mode .jiffies
03 .data.init_task .smp_locks .init.text .init.data .init.setup .initcall.init .con_initcall.init .x86_cpu_dev.init .altinstructions .altinstr_replacement .exit.text .init.ramfs .bss
04 .data.percpu
05 .notes
After patch we've got:
Elf file type is EXEC (Executable file)
Entry point 0x200000
There are 7 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000200000 0xffffffff80200000 0x0000000000200000
0x0000000000ca6000 0x0000000000ca6000 R E 200000
LOAD 0x0000000000ea6000 0xffffffff80ea6000 0x0000000000ea6000
0x000000000014dfe0 0x000000000014dfe0 RWE 200000
LOAD 0x0000000001000000 0xffffffffff600000 0x0000000000ff4000
0x0000000000000888 0x0000000000000888 RWE 200000
LOAD 0x00000000011f6000 0xffffffff80ff6000 0x0000000000ff6000
0x0000000000073086 0x0000000000073086 RWE 200000
LOAD 0x0000000001400000 0x0000000000000000 0x000000000106a000
0x00000000001d2ce0 0x00000000001d2ce0 RWE 200000
LOAD 0x000000000163d000 0xffffffff8123d000 0x000000000123d000
0x0000000000000000 0x00000000007e6938 RWE 200000
NOTE 0x00000000009e2c1c 0xffffffff809e2c1c 0x00000000009e2c1c
0x0000000000000024 0x0000000000000024 4
Section to Segment mapping:
Segment Sections...
00 .text .notes __ex_table .rodata __bug_table .pci_fixup .builtin_fw __ksymtab __ksymtab_gpl __ksymtab_strings __init_rodata __param
01 .data .init.rodata .data.cacheline_aligned .data.read_mostly
02 .vsyscall_0 .vsyscall_fn .vsyscall_gtod_data .vsyscall_1 .vsyscall_2 .vgetcpu_mode .jiffies
03 .data.init_task .smp_locks .init.text .init.data .init.setup .initcall.init .con_initcall.init .x86_cpu_dev.init .altinstructions .altinstr_replacement .exit.text .init.ramfs
04 .data.percpu
05 .bss
06 .notes
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Tue, 3 Feb 2009 03:28:58 +0000 (19:28 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI hotplug: Change link order of pciehp & acpiphp
PCI hotplug: fakephp: Allocate PCI resources before adding the device
PCI MSI: Fix undefined shift by 32
PCI PM: Do not wait for buses in B2 or B3 during resume
PCI PM: Power up devices before restoring their state
PCI PM: Fix hibernation breakage on EeePC 701
PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs
PCI PM: Fix suspend error paths and testing facility breakage
Linus Torvalds [Tue, 3 Feb 2009 03:27:00 +0000 (19:27 -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:
slub: fix per cpu kmem_cache_cpu array memory leak
kmalloc: return NULL instead of link failure
Linus Torvalds [Tue, 3 Feb 2009 03:26:44 +0000 (19:26 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
powerpc: Fix oops on some machines due to incorrect pr_debug()
powerpc/ps3: Printing fixups for l64 to ll64 convserion drivers/net
powerpc/5200: update device tree binding documentation
powerpc/5200: Bugfix for PCI mapping of memory and IMMR
powerpc/5200: update defconfigs
Linus Torvalds [Tue, 3 Feb 2009 03:26:29 +0000 (19:26 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched_rt: don't use first_cpu on cpumask created with cpumask_and
sched: fix buddie group latency
sched: clear buddies more aggressively
sched: symmetric sync vs avg_overlap
sched: fix sync wakeups
cpuset: fix possible deadlock in async_rebuild_sched_domains
Linus Torvalds [Tue, 3 Feb 2009 03:26:06 +0000 (19:26 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (45 commits)
V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning
V4L/DVB (10403): saa7134-alsa: saa7130 doesn't support digital audio
V4L/DVB (10229): ivtv: fix memory leak
V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming.
V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled
V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo
V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback.
V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
V4L/DVB (10287): af9015: fix second FE
V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock
V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at
ffffffff
V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown
V4L/DVB (10257): em28xx: Fix for KWorld 330U Board
V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97
V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition
V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use
V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings.
V4L/DVB (10243): em28xx: fix compile warning
V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic
V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081)
...
Linus Torvalds [Tue, 3 Feb 2009 03:24:14 +0000 (19:24 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
pxamci: enable DMA for write ops after CMD/RESP
pxamci: replace #ifdef CONFIG_PXA27x with if (cpu_is_pxa27x())
ricoh_mmc: Use suspend_late/resume_early
mmci: Add support for ST Micro derivate
mmc: Add a MX2/MX3 specific SDHC driver
Linus Torvalds [Tue, 3 Feb 2009 03:23:49 +0000 (19:23 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
icside: fix PCB version 6 support (v2)
tx4939ide: typo fix and minor cleanup
ide: add CS5536 host driver (v3)
ide: Force VIA IDE legacy interrupts for AmigaOne boards
IDE: Unregister and disable devices if initialization fails.
ide: fix ide_register_port() failure handling
ide: struct device - replace bus_id with dev_name(), dev_set_name()
ide-cd: fix DMA for non bio-backed requests
Linus Torvalds [Tue, 3 Feb 2009 03:20:17 +0000 (19:20 -0800)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
uwb: lock rc->rsvs_lock with spin_lock_bh()
wusb: timeout when waiting for ASL/PZL updates in whci-hcd
uwb: remove unused #include <version.h>'s
wusb: return -ENOTCONN when resetting a port with no connected device
uwb: safely remove all reservations
Linus Torvalds [Tue, 3 Feb 2009 03:19:50 +0000 (19:19 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: add text file detailing queue/ sysfs files
bio.h: If they MUST be inlined, then use __always_inline
Fix misleading comment in bio.h
block: fix inconsistent parenthesisation of QUEUE_FLAG_DEFAULT
block: fix oops in blk_queue_io_stat()
Mark McLoughlin [Tue, 3 Feb 2009 03:03:53 +0000 (13:33 +1030)]
virtio-pci: do not oops on config change if driver not loaded
The host really shouldn't be notifying us of config changes
before the device status is VIRTIO_CONFIG_S_DRIVER or
VIRTIO_CONFIG_S_DRIVER_OK.
However, if we do happen to be interrupted while we're not
attached to a driver, we really shouldn't oops. Prevent
this simply by checking that device->driver is non-NULL
before trying to notify the driver of config changes.
Problem observed by doing a "set_link virtio.0 down" with
QEMU before the net driver had been loaded.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Dumazet [Tue, 3 Feb 2009 03:01:36 +0000 (13:31 +1030)]
modules: Use a better scheme for refcounting
Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is
using a lot of memory.
Each 'struct module' contains an [NR_CPUS] array of full cache lines.
This patch uses existing infrastructure (percpu_modalloc() &
percpu_modfree()) to allocate percpu space for the refcount storage.
Instead of wasting NR_CPUS*128 bytes (on i386), we now use
nr_cpu_ids*sizeof(local_t) bytes.
On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce
size of module files by about 2 Mbytes. (1Kb per module)
Instead of having all refcounters in the same memory node - with TLB misses
because of vmalloc() - this new implementation permits to have better
NUMA properties, since each CPU will use storage on its preferred node,
thanks to percpu storage.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cliff Brake [Thu, 22 Jan 2009 22:07:03 +0000 (17:07 -0500)]
pxamci: enable DMA for write ops after CMD/RESP
With the PXA270 MMC hardware, there seems to be an issue of
data corruption on writes where a 4KB data block is offset
by one byte.
If we delay enabling the DMA for writes until after the CMD/RESP
has finished, the problem seems to be fixed.
related to PXA270 Erratum #91
Tested-by: Vernon Sauder <VernonInHand@gmail.com>
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Cliff Brake [Thu, 22 Jan 2009 21:58:58 +0000 (16:58 -0500)]
pxamci: replace #ifdef CONFIG_PXA27x with if (cpu_is_pxa27x())
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
philipl@overt.org [Sun, 18 Jan 2009 19:11:20 +0000 (14:11 -0500)]
ricoh_mmc: Use suspend_late/resume_early
If ricoh_mmc suspends before sdhci_pci, it will pull the card
out from under the controller, which could leave the system in
a very confused state.
Using suspend_late/resume_early ensures that sdhci_pci suspends first
and resumes second.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Linus Walleij [Sun, 4 Jan 2009 14:18:54 +0000 (15:18 +0100)]
mmci: Add support for ST Micro derivate
This patch adds support for the ST Microelectronics version of
the PL180 PrimeCell. They use designer ID 0x80 and have a few
alterations/bugfixes related to open drain and HW flow control.
They also add some SDIO registers, I am unsure if these are
in ST HW only or if this is things also added in later ARM
revisions, but they are included in the mmci.h file for
completeness.
Signed-off-by: Linus Walleij <linus.walleij@ericsson.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Sascha Hauer [Tue, 6 Jan 2009 16:04:14 +0000 (17:04 +0100)]
mmc: Add a MX2/MX3 specific SDHC driver
This patch adds a MX2/MX3 specific SDHC driver. The hardware is basically
the same as in the MX1, but unlike the MX1 controller the MX2
controller just works as expected. Since the MX1 driver has more
workarounds for bugs than anything else I had no success with supporting
MX1 and MX2 in a sane way in one driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Bartlomiej Zolnierkiewicz [Mon, 2 Feb 2009 19:12:23 +0000 (20:12 +0100)]
icside: fix PCB version 6 support (v2)
We need to pass struct ide_port_info also to ide_host_register().
v2:
Fix v5/v6 mismatch noticed by Russell.
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Atsushi Nemoto [Mon, 2 Feb 2009 19:12:23 +0000 (20:12 +0100)]
tx4939ide: typo fix and minor cleanup
The bcount is greater than 0 and less than or equal to 0x10000.
Thus '(bcount & 0xffff) == 0x0000' can be simplified as 'bcount == 0x10000'.
Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 2 Feb 2009 19:12:23 +0000 (20:12 +0100)]
ide: add CS5536 host driver (v3)
This is a port of libata's pata_cs5536.c (written by Martin K. Petersen)
to IDE subsystem.
Changes done while at it:
* Reprogram PIO/MWDMA timings if needed before and after DMA transfer
(chipset uses shared PIO/MWDMA timings).
* Fix cable detection to report 80-wires cable if BIOS set it for any
device on a port (IDE core will do drive-side cable detection later).
* Don't disable UDMA while programming PIO timings.
* Simplify PCI/MSR support.
Pros of having IDE host driver in addition to libata's one:
* IDE is much lighter than SCSI+libata, the host driver itself is also
a bit smaller:
text data bss dec hex filename
1261 496 4 1761 6e1 drivers/ata/pata_cs5536.o
1242 128 4 1374 55e drivers/ide/cs5536.o
* This allows use of IDE features which are unavailable under libata.
v2:
* Fixes per review from Sergei:
- simplify dependency check in Kconfig
- use IDE_DRV_MASK also for ->drive_data
- disable UDMA when programming MWDMA
- program new DTC timings only when necessary
- fix printk() level in cs5536_init_one()
* Fix patch description according to comments from Alan and Sergei.
v3:
* Smarter masking of UDMA bits per Sergei's suggestion.
Cc: Martin K. Petersen <mkp@mkp.net>
Cc: Karl Auerbach <karl@iwl.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Gerhard Pircher [Mon, 2 Feb 2009 19:12:22 +0000 (20:12 +0100)]
ide: Force VIA IDE legacy interrupts for AmigaOne boards
The AmigaOne uses the onboard VIA IDE controller in legacy mode (like the
Pegasos).
Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
Cc: "Grant Likely" <grant.likely@secretlab.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Ian Campbell [Mon, 2 Feb 2009 19:12:22 +0000 (20:12 +0100)]
IDE: Unregister and disable devices if initialization fails.
On reboot the loop in device_shutdown gets confused by these partially
initialized devices and goes into an infinite loop. Therefore unregister
and disable these devices.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[bart: remove leftover hwif->present clearing + update patch description]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 2 Feb 2009 19:12:21 +0000 (20:12 +0100)]
ide: fix ide_register_port() failure handling
* Factor out port freeing from ide_host_free() to ide_free_port().
* Add ide_disable_port() and use it on ide_register_port() failure.
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Kay Sievers [Mon, 2 Feb 2009 19:12:21 +0000 (20:12 +0100)]
ide: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: linux-ide@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Borislav Petkov [Mon, 2 Feb 2009 19:12:21 +0000 (20:12 +0100)]
ide-cd: fix DMA for non bio-backed requests
This one fixes http://bugzilla.kernel.org/show_bug.cgi?id=12320.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
David Vrabel [Mon, 2 Feb 2009 17:52:39 +0000 (17:52 +0000)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6 into for-upstream
Jeremy Fitzhardinge [Sat, 31 Jan 2009 07:18:41 +0000 (23:18 -0800)]
x86/vmi: fix interrupt enable/disable/save/restore calling convention.
Zach says:
> Enable/Disable have no clobbers at all.
> Save clobbers only return value, %eax
> Restore also clobbers nothing.
This is precisely compatible with the calling convention, so we can
just call them directly without wrapping.
(Compile tested only.)
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Jeremy Fitzhardinge [Sat, 31 Jan 2009 07:17:23 +0000 (23:17 -0800)]
x86/paravirt: don't restore second return reg
Impact: bugfix
In the 32-bit calling convention, %eax:%edx is used to return 64-bit
values. Don't save and restore %edx around wrapped functions, or they
can't return a full 64-bit result.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Jens Axboe [Mon, 2 Feb 2009 12:02:31 +0000 (13:02 +0100)]
block: add text file detailing queue/ sysfs files
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Alberto Bertogli [Mon, 2 Feb 2009 11:41:07 +0000 (12:41 +0100)]
bio.h: If they MUST be inlined, then use __always_inline
bvec_kmap_irq() and bvec_kunmap_irq() comments say they MUST be inlined,
so mark them as __always_inline.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Alberto Bertogli [Mon, 2 Feb 2009 11:41:07 +0000 (12:41 +0100)]
Fix misleading comment in bio.h
The comment says "remember to add offset!", but the function already adds
it.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Pekka Enberg [Mon, 2 Feb 2009 09:18:49 +0000 (11:18 +0200)]
Merge branches 'topic/slab/fixes' and 'topic/slub/fixes' into for-linus
Jens Axboe [Mon, 2 Feb 2009 07:43:48 +0000 (08:43 +0100)]
block: fix inconsistent parenthesisation of QUEUE_FLAG_DEFAULT
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Jens Axboe [Mon, 2 Feb 2009 07:42:32 +0000 (08:42 +0100)]
block: fix oops in blk_queue_io_stat()
Some initial probe requests don't have disk->queue mapped yet, so we
can't rely on a non-NULL queue in blk_queue_io_stat(). Wrap it in
blk_do_io_stat().
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Risto Suominen [Tue, 13 Jan 2009 20:09:30 +0000 (20:09 +0000)]
fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
Since the complete re-write in 2.6.10, some PowerMacs (At least PowerMac 5500
and PowerMac G3 Beige rev A) with ATI Mach64 chip have suffered from unstable
columns in their framebuffer image. This seems to depend on a value (4) read
from PLL_EXT_CNTL register, which leads to incorrect DSP config parameters to
be written to the chip. This patch uses a value calculated by aty_init_pll_ct
instead, as a starting point.
There are questions as to whether this should be extended to other platforms
or maybe made dependent on specific chip types, but in the meantime, this has
been tested on various powermacs and works for them so let's commit it.
Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Tested-by: Michael Pettersson <mike@it.uu.se>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Sun, 1 Feb 2009 17:03:59 +0000 (17:03 +0000)]
powerpc: Fix oops on some machines due to incorrect pr_debug()
Recently, a patch left DEBUG enabled in the powerpc common PCI code,
resulting in an old bug in a pr_debug() statement to show up and cause
a NULL dereference on some machines.
This fixes the pr_debug() statement and reverts to DEBUG not being
force-enabled in that file.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:09:30 +0000 (20:09 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 convserion drivers/net
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Linus Torvalds [Sun, 1 Feb 2009 19:00:16 +0000 (11:00 -0800)]
Manually revert "mlock: downgrade mmap sem while populating mlocked regions"
This essentially reverts commit
8edb08caf68184fb170f4f69c7445929e199eaea.
It downgraded our mmap semaphore to a read-lock while mlocking pages, in
order to allow other threads (and external accesses like "ps" et al) to
walk the vma lists and take page faults etc. Which is a nice idea, but
the implementation does not work.
Because we cannot upgrade the lock back to a write lock without
releasing the mmap semaphore, the code had to release the lock entirely
and then re-take it as a writelock. However, that meant that the caller
possibly lost the vma chain that it was following, since now another
thread could come in and mmap/munmap the range.
The code tried to work around that by just looking up the vma again and
erroring out if that happened, but quite frankly, that was just a buggy
hack that doesn't actually protect against anything (the other thread
could just have replaced the vma with another one instead of totally
unmapping it).
The only way to downgrade to a read map _reliably_ is to do it at the
end, which is likely the right thing to do: do all the 'vma' operations
with the write-lock held, then downgrade to a read after completing them
all, and then do the "populate the newly mlocked regions" while holding
just the read lock. And then just drop the read-lock and return to user
space.
The (perhaps somewhat simpler) alternative is to just make all the
callers of mlock_vma_pages_range() know that the mmap lock got dropped,
and just re-grab the mmap semaphore if it needs to mlock more than one
vma region.
So we can do this "downgrade mmap sem while populating mlocked regions"
thing right, but the way it was done here was absolutely not correct.
Thus the revert, in the expectation that we will do it all correctly
some day.
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Devin Heitmueller [Mon, 26 Jan 2009 06:07:59 +0000 (03:07 -0300)]
V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning
Just like with the s5h1411, the s5h1409 needs a soft-reset in order for it
to know that the tuner has been told to change frequencies. This change
changes the behavior from "random tuning times between 500ms to complete
tuning lock failures" to "tuning lock consistently within 700ms".
Thanks to Robert Krakora <rob.krakora@messagenetsystems.com> for doing
initial testing of the patch on the KWorld 330U.
Thanks to Andy Walls <awalls@radix.net> for doing testing of the patch on
the HVR-1600.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for doing additional testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 31 Jan 2009 11:09:33 +0000 (08:09 -0300)]
V4L/DVB (10403): saa7134-alsa: saa7130 doesn't support digital audio
According with saa7130 public datasheet, saa7130 doesn't support
digital audio. This is also confirmed by experimental tests. So, it
doesn't make sense to let saa7134-alsa register for those chipsets.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Yinghai Lu [Sat, 31 Jan 2009 22:50:07 +0000 (14:50 -0800)]
irq, x86: fix lock status with numa_migrate_irq_desc
Eric Paris reported:
> I have an hp dl785g5 which is unable to successfully run
> 2.6.29-0.66.rc3.fc11.x86_64 or 2.6.29-rc2-next-
20090126. During bootup
> (early in userspace daemons starting) I get the below BUG, which quickly
> renders the machine dead. I assume it is because sparse_irq_lock never
> gets released when the BUG kills that task.
Adjust lock sequence when migrating a descriptor with
CONFIG_NUMA_MIGRATE_IRQ_DESC enabled.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Dave Jones [Sun, 1 Feb 2009 01:12:14 +0000 (20:12 -0500)]
x86: add cache descriptors for Intel Core i7
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Rusty Russell [Sat, 31 Jan 2009 12:51:24 +0000 (23:21 +1030)]
sched_rt: don't use first_cpu on cpumask created with cpumask_and
cpumask_and() only initializes nr_cpu_ids bits, so the (deprecated)
first_cpu() might find one of those uninitialized bits if nr_cpu_ids
is less than NR_CPUS (as it can be for CONFIG_CPUMASK_OFFSTACK).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra [Wed, 28 Jan 2009 13:51:40 +0000 (14:51 +0100)]
sched: fix buddie group latency
Similar to the previous patch, by not clearing buddies we can select entities
past their run quota, which can increase latency. This means we have to clear
group buddies as well.
Do not use the group clear for pick_next_task(), otherwise that'll get O(n^2).
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Mike Galbraith [Wed, 28 Jan 2009 13:51:39 +0000 (14:51 +0100)]
sched: clear buddies more aggressively
It was noticed that a task could get re-elected past its run quota due to buddy
affinities. This could increase latency a little. Cure it by more aggresively
clearing buddy state.
We do so in two situations:
- when we force preempt
- when we select a buddy to run
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra [Wed, 28 Jan 2009 13:51:38 +0000 (14:51 +0100)]
sched: symmetric sync vs avg_overlap
Reinstate the weakening of the sync hint if set. This yields a more
symmetric usage of avg_overlap.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra [Mon, 26 Jan 2009 16:56:17 +0000 (17:56 +0100)]
sched: fix sync wakeups
Pawel Dziekonski reported that the openssl benchmark and his
quantum chemistry application both show slowdowns due to the
scheduler under-parallelizing execution.
The reason are pipe wakeups still doing 'sync' wakeups which
overrides the normal buddy wakeup logic - even if waker and
wakee are loosely coupled.
Fix an inversion of logic in the buddy wakeup code.
Reported-by: Pawel Dziekonski <dzieko@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Sat, 31 Jan 2009 23:56:23 +0000 (15:56 -0800)]
Merge branch 'header-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (90 commits)
headers_check fix: x86, swab.h
headers_check fix: x86, sigcontext32.h
headers_check fix: x86, sigcontext.h
headers_check fix: x86, ptrace-abi.h
headers_check fix: x86, mtrr.h
headers_check fix: x86, mce.h
headers_check fix: x86, kvm.h
headers_check fix: x86, e820.h
headers_check fix: linux/rtnetlink.h
headers_check fix: linux/nubus.h
headers_check fix: video/uvesafb.h
headers_check fix: video/sisfb.h
headers_check fix: sound/hdsp.h
headers_check fix: mtd/inftl-user.h
headers_check fix: linux/virtio_net.h
headers_check fix: linux/virtio_console.h
headers_check fix: linux/virtio_blk.h
headers_check fix: linux/videodev.h
headers_check fix: linux/video_encoder.h
headers_check fix: linux/video_decoder.h
...
Linus Torvalds [Sat, 31 Jan 2009 23:55:05 +0000 (15:55 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
generic-ipi: use per cpu data for single cpu ipi calls
cpumask: convert lib/smp_processor_id to new cpumask ops
signals, debug: fix BUG: using smp_processor_id() in preemptible code in print_fatal_signal()
Linus Torvalds [Sat, 31 Jan 2009 23:54:30 +0000 (15:54 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
irq: export __set_irq_handler() and handle_level_irq()
Linus Torvalds [Sat, 31 Jan 2009 23:54:06 +0000 (15:54 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
hrtimer: prevent negative expiry value after clock_was_set()
hrtimers: allow the hot-unplugging of all cpus
hrtimers: increase clock min delta threshold while interrupt hanging
Linus Torvalds [Sat, 31 Jan 2009 23:53:30 +0000 (15:53 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, ds, bts: cleanup/fix DS configuration
ring-buffer: reset timestamps when ring buffer is reset
trace: set max latency variable to zero on default
trace: stop all recording to ring buffer on ftrace_dump
trace: print ftrace_dump at KERN_EMERG log level
ring_buffer: reset write when reserve buffer fail
tracing/function-graph-tracer: fix a regression while suspend to disk
ring-buffer: fix alignment problem
Linus Torvalds [Sat, 31 Jan 2009 23:52:46 +0000 (15:52 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86 setup: fix asm constraints in vesa_store_edid
xen: make sysfs files behave as their names suggest
x86: tone down mtrr_trim_uncached_memory() warning
x86: correct the CPUID pattern for MSR_IA32_MISC_ENABLE availability
Linus Torvalds [Sat, 31 Jan 2009 23:52:25 +0000 (15:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
leds: Fix bounds checking of wm8350->pmic.led
regulator: move bq24022 init back to module_init instead of subsys_initcall
Linus Torvalds [Sat, 31 Jan 2009 23:52:02 +0000 (15:52 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (27 commits)
MIPS: Alchemy: time.c build fix
MIPS: RB532: Export rb532_gpio_set_func()
MIPS: RB532: Update headers
MIPS: RB532: Simplify dev3 init
MIPS: RB532: Remove {get,set}_434_reg()
MIPS: RB532: Move dev3 init code to devices.c
MIPS: RB532: Fix set_latch_u5()
MIPS: RB532: Fix init of rb532_dev3_ctl_res
MIPS: RB532: Use driver_data instead of platform_data
MIPS: RB532: Detect uart type, add platform device
MIPS: RB532: remove useless CF GPIO initialisation
MIPS: RB532: Auto disable GPIO alternate function
MIPS: RB532: Add set_type() function to IRQ struct.
MIPS: RC32434: Define io_map_base for PCI controller
MIPS: RB532: Fix bit swapping in rb532_set_bit()
MIPS: Use hardware watchpoints on all R1 and R2 CPUs.
MIPS: Read watch registers with interrupts disabled.
MIPS: Fix a typo in watchpoint register structure.
MIPS: TXx9: Add support for TX4939 internal RTC
MIPS: R2: Fix broken installation of cache error handler.
...
Mikulas Patocka [Fri, 30 Jan 2009 20:27:14 +0000 (15:27 -0500)]
Fix memory corruption in console selection
Fix an off-by-two memory error in console selection.
The loop below goes from sel_start to sel_end (inclusive), so it writes
one more character. This one more character was added to the allocated
size (+1), but it was not multiplied by an UTF-8 multiplier.
This patch fixes a memory corruption when UTF-8 console is used and the
user selects a few characters, all of them 3-byte in UTF-8 (for example
a frame line).
When memory redzones are enabled, a redzone corruption is reported.
When they are not enabled, trashing of random memory occurs.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 31 Jan 2009 23:50:43 +0000 (15:50 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
igb: fix link reporting when using sgmii
igb: prevent skb_over panic w/ mtu smaller than 1K
igb: Fix DCA errors and do not use context index for 82576
ipv6: compile fix for ip6mr.c
packet: Avoid lock_sock in mmap handler
sfc: Replace stats_enabled flag with a disable count
sfc: SFX7101/SFT9001: Fix AN advertisements
sfc: SFT9001: Always enable XNP exchange on SFT9001 rev B
sfc: Update board info for hardware monitor on SFN4111T-R5 and later
sfc: Test for PHYXS faults whenever we cannot test link state bits
sfc: Reinitialise the PHY completely in case of a PHY or NIC reset
sfc: Fix post-reset MAC selection
sfc: SFN4111T: Fix GPIO sharing between I2C and FLASH_CFG_1
sfc: SFT9001: Fix speed reporting in 1G PHY loopback
sfc: SFX7101: Remove workaround for bad link training
sfc: SFT9001: Enable robust link training
sky2: fix hard hang with netconsoling and iface going up