]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
18 years ago[PATCH] x86-64: Export smp_call_function_single
Andi Kleen [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] x86-64: Export smp_call_function_single

smp_call_function() is exported, makes sense to export this one too.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Clean up smp_tune_scheduling()
Adrian Bunk [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] i386: Clean up smp_tune_scheduling()

- remove the write-only local variable "bandwidth"
- don't set "max_cache_size" in the (cachesize < 0) case:
  that's already handled in kernel/sched.c:measure_migration_cost()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] unwinder: move .eh_frame to RODATA
Jan Beulich [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] unwinder: move .eh_frame to RODATA

The .eh_frame section contents is never written to, so it can as well
benefit from CONFIG_DEBUG_RODATA.

Diff-ed against firstfloor tree.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] unwinder: fully support linker generated .eh_frame_hdr section
Jan Beulich [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] unwinder: fully support linker generated .eh_frame_hdr section

Now that binutils' ld is able to properly populate .eh_frame_hdr in the
Linux kernel case, here's a patch to add some functionality to the Dwarf2
unwinder to actually be able to make use of this (applies on firstfloor
tree with the previously sent patch to add debug output, but not on plain
2.6.19).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: don't use set_irq_regs()
Oleg Nesterov [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] x86-64: don't use set_irq_regs()

We don't need to setup _irq_regs in smp_xxx_interrupt (except apic timer).
These handlers run with irqs disabled and do not call functions which need
"struct pt_regs".

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Acked-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
Yinghai Lu [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq

setup_IO_APIC_irqs could fail to get vector for some device when you have too
many devices, because at that time only boot cpu is online.  So check vector
for irq in setup_ioapic_dest and call setup_IO_APIC_irq to make sure IO-APIC
irq-routing table is initialized.

Also seperate setup_IO_APIC_irq from setup_IO_APIC_irqs.

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
Randy Dunlap [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM

Generally better for allmodconfig coverage.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: replace kmalloc+memset with kzalloc
Burman Yan [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] i386: replace kmalloc+memset with kzalloc

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: remove remaining pc98 code
Adrian Bunk [Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)]
[PATCH] x86-64: remove remaining pc98 code

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: remove unused variable
David Rientjes [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: remove unused variable

Remove unused variable in msr_write().

Reported by D Binderman <dcb314@hotmail.com>.

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Fix constraints in atomic_add_return()
Andi Kleen [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: Fix constraints in atomic_add_return()

Following i386 from Duncan Sands
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: fix asm constraints in i386 atomic_add_return
Duncan Sands [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: fix asm constraints in i386 atomic_add_return

Since v->counter is both read and written, it should be an output as well
as an input for the asm.  The current code only gets away with this because
counter is volatile.  Also, according to Documents/atomic_ops.txt,
atomic_add_return should provide a memory barrier, in particular a compiler
barrier, so the asm should be marked as clobbering memory.

Test case:

#include <stdio.h>

typedef struct { int counter; } atomic_t; /* NB: no "volatile" */

#define ATOMIC_INIT(i) { (i) }

#define atomic_read(v) ((v)->counter)

static __inline__ int atomic_add_return(int i, atomic_t *v)
{
int __i = i;

__asm__ __volatile__(
"lock; xaddl %0, %1;"
:"=r"(i)
:"m"(v->counter), "0"(i));
/* __asm__ __volatile__(
"lock; xaddl %0, %1"
:"+r" (i), "+m" (v->counter)
: : "memory"); */
return i + __i;
}

int main (void) {
atomic_t a = ATOMIC_INIT(0);
int x;

x = atomic_add_return (1, &a);
if ((x!=1) || (atomic_read(&a)!=1))
printf("fail: %i, %i\n", x, atomic_read(&a));
}

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86-64: Correct documentation for bzImage protocol v2.05
Vivek Goyal [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: Correct documentation for bzImage protocol v2.05

Correct the documentation for bzImage protocol extension due to relocatable
bzImage.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
Burman Yan [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code

Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Fix numaq build error
Randy Dunlap [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: Fix numaq build error

  CC      arch/i386/boot/compressed/misc.o
arch/i386/boot/compressed/misc.c:120: error: static declaration of 'xquad_portio' follows non-static declaration
include/asm/io.h:275: error: previous declaration of 'xquad_portio' was here
make[2]: *** [arch/i386/boot/compressed/misc.o] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
Adrian Bunk [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header

Nothing in include/asm-x86_64/cpufeature.h is part of the
userspace<->kernel interface.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
Jan Beulich [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] unwinder: Add debugging output to the Dwarf2 unwinder

Add debugging printks to the unwinder to allow easier debugging
when something goes wrong with it.

This can be controlled with the new unwinder_debug=N option
Most output is given by N=1

AK: Added documentation of unwinder_debug=

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Clarify error message in GART code
Andi Kleen [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: Clarify error message in GART code

- Remove "Disabling IOMMU" message because it confuses people
- Clarify that the GART IOMMU is refered to in other message

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
Venkatesh Pallipadi [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: Fix interrupt race in idle callback (3rd try)

Idle callbacks has some races when enter_idle() sets isidle and subsequent
interrupts that can happen on that CPU, before CPU goes to idle. Due to this,
an IDLE_END can get called before IDLE_START. To avoid these races, disable
interrupts before enter_idle and make sure that all idle routines do not
enable interrupts before entering idle.

Note that poll_idle() still has a this race as it has to enable interrupts
before going to idle. But, all other idle routines have the race fixed.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Remove unwind stack pointer alignment forcing again
Andi Kleen [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] x86-64: Remove unwind stack pointer alignment forcing again

This was added as a workaround for the fallback unwinder not supporting
unaligned stack pointers properly. But now it was fixed to do that,
so it's not needed anymore

Cc: mingo@elte.hu
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] unwinder: more sanity checks in Dwarf2 unwinder
Jan Beulich [Thu, 7 Dec 2006 01:14:13 +0000 (02:14 +0100)]
[PATCH] unwinder: more sanity checks in Dwarf2 unwinder

Tighten the requirements on both input to and output from the Dwarf2
unwinder.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] unwinder: Remove lockdep disabling of nested locks for unwinder
Andi Kleen [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] unwinder: Remove lockdep disabling of nested locks for unwinder

Shouldn't be needed anymore since __kernel_text_address
is used unconditionally on x86-64

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] unwinder: always use unlocked module list access in unwinder fallback
Andi Kleen [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] unwinder: always use unlocked module list access in unwinder fallback

We're already well protected against module unloads because module
unload uses stop_machine(). The only exception is NMIs, but other
users already risk lockless accesses here.

This avoids some hackery in lockdep and also a potential deadlock

This matches what i386 does.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] unwinder: Use probe_kernel_address instead of __get_user in kernel/unwind.c
Andi Kleen [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] unwinder: Use probe_kernel_address instead of __get_user in kernel/unwind.c

This avoids trouble with the page fault handler if the fault
happens inside an interrupt context.

Suggested by Linus

Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Mark rdtsc as sync only for netburst, not for core2
Arjan van de Ven [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86-64: Mark rdtsc as sync only for netburst, not for core2

On the Core2 cpus, the rdtsc instruction is not serializing (as defined
in the architecture reference since rdtsc exists) and due to the deep
speculation of these cores, it's possible that you can observe time go
backwards between cores due to this speculation. Since the kernel
already deals with this with the SYNC_RDTSC flag, the solution is
simple, only assume that the instruction is serializing on family 15...

The price one pays for this is a slightly slower gettimeofday (by a
dozen or two cycles), but that increase is quite small to pay for a
really-going-forward tsc counter.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Calgary: remove unused variables
Muli Ben-Yehuda [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] Calgary: remove unused variables

Spotted by d binderman <dcb314@hotmail.com>.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Synchronize RDTSC on single core AMD
Andi Kleen [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86-64: Synchronize RDTSC on single core AMD

There is no guarantee that two RDTSCs in a row are monotonic,
so don't assume it on single core AMD systems.
This will make gettimeofday slower again
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: always enable regparm
Adrian Bunk [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] i386: always enable regparm

-mregparm=3 has been enabled by default for some time on i386, and AFAIK
there aren't any problems with it left.

This patch removes the REGPARM config option and sets -mregparm=3
unconditionally.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: remove unused acpi_found_madt in mparse.
Yinghai Lu [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86-64: remove unused acpi_found_madt in mparse.

remove unused acpi_found_madt in mparse.c

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: touch softlockup during backtracing
Dave Jones [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] i386: touch softlockup during backtracing

Sometimes the soft watchdog fires after we're done oopsing.
See http://projects.info-pull.com/mokb/MOKB-25-11-2006.html for an example.

AK: changed to touch_nmi_watchdog()

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Fix kobject_init() WARN_ON on resume from disk
Rafael J. Wysocki [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86-64: Fix kobject_init() WARN_ON on resume from disk

Make mce_remove_device() clean up the kobject in per_cpu(device_mce, cpu)
after it has been unregistered.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: remove duplicate ARCH_DISCONTIGMEM_ENABLE option
Adrian Bunk [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86-64: remove duplicate ARCH_DISCONTIGMEM_ENABLE option

One ARCH_DISCONTIGMEM_ENABLE option is enough.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86_64: interrupt array size should be aligned to NR_VECTORS
Yinghai Lu [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86_64: interrupt array size should be aligned to NR_VECTORS

interrupt array is referred for idt vectors instead of NR_IRQS, so change size
to NR_VECTORS - FIRST_EXTERNAL_VECTOR. Also change to static.

Signed-off-by: Yinghai Lu <yinghai@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86_64: clear_bss before set_intr_gate with early_idt_handler
Yinghai Lu [Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)]
[PATCH] x86_64: clear_bss before set_intr_gate with early_idt_handler

idt_table is in the .bss section, so clear_bss need to called at first

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: add sysctl for kstack_depth_to_print
Chuck Ebbert [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] x86: add sysctl for kstack_depth_to_print

Add sysctl for kstack_depth_to_print. This lets users change
the amount of raw stack data printed in dump_stack() without
having to reboot.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Fix comments for MSR_FS_BASE and MSR_GS_BASE.
Wink Saville [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] x86-64: Fix comments for MSR_FS_BASE and MSR_GS_BASE.

The comments for MSR_FS_BASE & MSR_GS_BASE were transposed.

Signed-off-by: Wink Saville <wink@saville.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Remove unused GET_APIC_VERSION call from clear_local_APIC
David Rientjes [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] x86-64: Remove unused GET_APIC_VERSION call from clear_local_APIC

Remove unused GET_APIC_VERSION call from clear_local_APIC() and
__setup_APIC_LVTT().

Reported by D Binderman <dcb314@hotmail.com>.

Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: remove duplicate printk
Dave Jones [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: remove duplicate printk

We do the exact same printk about a dozen lines above
with no intermediate printk's.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Preserve EFI run time regions with memmap parameter
Artiom Myaskouvskey [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: Preserve EFI run time regions with memmap parameter

When using memmap kernel parameter in EFI boot we should also add to memory map
memory regions of runtime services to enable their mapping later.

AK: merged and cleaned up the patch

Signed-off-by: Artiom Myaskouvskey <artiom.myaskouvskey@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: Regard MSRs in lapic_suspend()/lapic_resume()
Karsten Wiese [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] x86: Regard MSRs in lapic_suspend()/lapic_resume()

Read/Write APIC_LVTPC and APIC_LVTTHMR only,
if get_maxlvt() returns certain values.
This is done like everywhere else in i386/kernel/apic.c,
so I guess its correct.
Suspends/Resumes to disk fine and eleminates an smp_error_interrupt()
here on a K8.

AK: ported to x86-64 too

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Avoid boot warning with apic=debug
Andi Kleen [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: Avoid boot warning with apic=debug

There are two consumers of apic=: the apic debug level and the low
level generic architecture code. early_param would warn when the
low level code rejected "debug". Avoid this.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: i386 add Intel BTS cpufeature bit and detection (take 2)
Stephane Eranian [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: i386 add Intel BTS cpufeature bit and detection (take 2)

Here is a small patch for i386 which adds a cpufeature flag and
detection code for Intel's Branch Trace Store (BTS) feature. This
feature can be found on Intel P4 and Core 2 processors among others.
It can also be used by perfmon.

changelog:
- add CPU_FEATURE_BTS
- add Branch Trace Store detection

signed-off-by: stephane eranian <eranian@hpl.hp.com>

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: x86-64 add Intel BTS cpufeature bit and detection (take 2)
Stephane Eranian [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] x86-64: x86-64 add Intel BTS cpufeature bit and detection (take 2)

Here is a small patch for x86-64 which adds a cpufeature flag and
detection code for Intel's Branch Trace Store (BTS) feature. This
feature can be found on Intel P4 and Core 2 processors among others.
It can also be used by perfmon.

changelog:
- add CPU_FEATURE_BTS
- add Branch Trace Store detection

signed-off-by: stephane eranian <eranian@hpl.hp.com>

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Make irq_vector static
Adrian Bunk [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: Make irq_vector static

irq_vector[] can now become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: handle a negative return value
Adrian Bunk [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: handle a negative return value

The Coverity checker noted that bad things might happen if
find_isa_irq_apic() returned -1.

[akpm@osdl.org: add debugging checks]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: call efi_get_time during suspend
Artiom Myaskouvskey [Thu, 7 Dec 2006 01:14:11 +0000 (02:14 +0100)]
[PATCH] i386: call efi_get_time during suspend

Function efi_get_time called not only during init kernel phase but also
during suspend (from get_cmos_time).

When it is called from get_cmos_time the corresponding runtime service
should be called in virtual and not in physical mode.

Signed-off-by: Artiom Myaskouvskey <artiom.myaskouvskey@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: "Narayanan, Chandramouli" <chandramouli.narayanan@intel.com>
Cc: "Jiossy, Rami" <rami.jiossy@intel.com>
Cc: "Satt, Shai" <shai.satt@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86: fix the irqbalance quirk for E7320/E7520/E7525
Siddha, Suresh B [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] x86: fix the irqbalance quirk for E7320/E7520/E7525

Move the irqbalance quirks for E7320/E7520/E7525(Errata 23 in
http://download.intel.com/design/chipsets/specupdt/30304203.pdf) to early
quirks.

And add a PCI quirk for these platforms to check(which happens very late
during the boot) if the APIC routing is indeed set to default flat mode.

This fixes the breakage(in x86_64) of this quirk due to cpu hotplug which
selects physical mode instead of the logical flat(as needed for this errata
workaround).

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: "Li, Shaohua" <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86-64: add genapic_force
Siddha, Suresh B [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] x86-64: add genapic_force

Add genapic_force. Used by the next Intel quirks patch.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: "Li, Shaohua" <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: change the 'no_control' field to 'hotpluggable' in the struct cpu
Siddha, Suresh B [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] i386: change the 'no_control' field to 'hotpluggable' in the struct cpu

Change the 'no_control' field in the cpu struct to a more positive
and better term 'hotpluggable'. And change(/cleanup) the logic accordingly.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: "Li, Shaohua" <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: introduce the mechanism of disabling cpu hotplug control
Siddha, Suresh B [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] i386: introduce the mechanism of disabling cpu hotplug control

Add 'enable_cpu_hotplug' flag and when cleared, the hotplug control file
("online") will not be added under /sys/devices/system/cpu/cpuX/

Next patch doing PCI quirks will use this.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: "Li, Shaohua" <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86: add write_pci_config_byte() to direct PCI access routines
Siddha, Suresh B [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] x86: add write_pci_config_byte() to direct PCI access routines

Mechanism of selecting physical mode in genapic when cpu hotplug is enabled on
x86_64, broke the quirk(quirk_intel_irqbalance()) introduced for working
around the transposing interrupt message errata in E7520/E7320/E7525 (revision
ID 0x9 and below.  errata #23 in
http://download.intel.com/design/chipsets/specupdt/30304203.pdf).

This errata requires the mode to be in logical flat, so that interrupts can be
directed to more than one cpu(and thus use hardware IRQ balancing enabled by
BIOS on these platforms).

Following four patches fixes this by moving the quirk to early quirk and
forcing the x86_64 genapic selection to logical flat on these platforms.

Thanks to Shaohua for pointing out the breakage.

This patch:

Add write_pci_config_byte() to direct PCI access  routines

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: "Li, Shaohua" <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: Convert more absolute symbols to section relative
Vivek Goyal [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] i386: Convert more absolute symbols to section relative

o Convert more absolute symbols to section relative to keep the theme in
  vmlinux.lds.S file and to avoid problem if kernel is relocated.

o Also put a message so that in future people can be aware of it and
  avoid introducing absolute symbols.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] relocatable kernel: Fix kallsyms on avr32 after relocatable kernel changes
Vivek Goyal [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] relocatable kernel: Fix kallsyms on avr32 after relocatable kernel changes

o On some platforms like avr32, section init comes before .text and
  not necessarily a symbol's relative position w.r.t _text is positive.
  In such cases assembler detects the overflow and emits warning. This
  patch fixes it.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: alloc_gdt() static
Adrian Bunk [Thu, 7 Dec 2006 01:14:10 +0000 (02:14 +0100)]
[PATCH] i386: alloc_gdt() static

Make the needlessly global alloc_gdt() static.

(against) pda-percpu-init

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: fix MTRR code
Jan Beulich [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] i386: fix MTRR code

Until not so long ago, there were system log messages pointing to
inconsistent MTRR setup of the video frame buffer caused by the way vesafb
and X worked. While vesafb was fixed meanwhile, I believe fixing it there
only hides a shortcoming in the MTRR code itself, in that that code is not
symmetric with respect to the ordering of attempts to set up two (or more)
regions where one contains the other. In the current shape, it permits
only setting up sub-regions of pre-exisiting ones. The patch below makes
this symmetric.

While working on that I noticed a few more inconsistencies in that code,
namely
- use of 'unsigned int' for sizes in many, but not all places (the patch
  is converting this to use 'unsigned long' everywhere, which specifically
  might be necessary for x86-64 once a processor supporting more than 44
  physical address bits would become available)
- the code to correct inconsistent settings during secondary processor
  startup tried (if necessary) to correct, among other things, the value
  in IA32_MTRR_DEF_TYPE, however the newly computed value would never get
  used (i.e. stored in the respective MSR)
- the generic range validation code checked that the end of the
  to-be-added range would be above 1MB; the value checked should have been
  the start of the range
- when contained regions are detected, previously this was allowed only
  when the old region was uncacheable; this can be symmetric (i.e. the new
  region can also be uncacheable) and even further as per Intel's
  documentation write-trough and write-back for either region is also
  compatible with the respective opposite in the other

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: adjust pmd_bad()
Jan Beulich [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] x86-64: adjust pmd_bad()

Make pmd_bad() symmetrical to pgd_bad() and pud_bad(). At once,
simplify them all.

TBD: tighten down the checks again as suggested by Hugh D.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: conditionalize inclusion of some MTRR flavors
Jan Beulich [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] i386: conditionalize inclusion of some MTRR flavors

Avoid inclusion of code that's dead for x86-64.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: remove prototype of free_bootmem_generic()
Jan Beulich [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] x86-64: remove prototype of free_bootmem_generic()

The function doesn't exist (anymore).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Don't touch per cpu memory of offline CPUs in touch_nmi_watchdog
Jan Beulich [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] i386: Don't touch per cpu memory of offline CPUs in touch_nmi_watchdog

Just like on x86-64, don't touch foreign CPUs' memory if the watchdog
isn't enabled at all.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: clear_fixmap() should not use set_pte()
Jan Beulich [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] i386: clear_fixmap() should not use set_pte()

While not strictly required with the current code (as the upper half of
page table entries generated by __set_fixmap() cannot be non-zero due
to the second parameter of this function being 'unsigned long'), the
use of set_pte() in __set_fixmap() in the context of clear_fixmap() is
still improper with CONFIG_X86_PAE (see the respective comment in
include/asm-i386/pgtable-3level.h) and would turn into a bug if that
second parameter ever gets changed to a 64-bit type.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Rate limit no irq handler messages
Andi Kleen [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] x86-64: Rate limit no irq handler messages

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: fix perms/range of vsyscall vma in /proc/*/maps
Ernie Petrides [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] x86-64: fix perms/range of vsyscall vma in /proc/*/maps

The final line of /proc/<pid>/maps on x86_64 for native 64-bit
tasks shows an incorrect ending address and incorrect permissions.  There
is only a single page mapped in this vsyscall region, and it is accessible
for both read and execute.

The patch below fixes this.  (Since 32-bit-compat tasks have a real vma
with correct perms/range, no change is necessary for that scenario.)

Before the patch, a "cat /proc/self/maps | tail -1" shows this:

        ffffffffff600000-ffffffffffe00000 ---p 00000000 [...]

After the patch, this is the output:

        ffffffffff600000-ffffffffff601000 r-xp 00000000 [...]

Signed-off-by: Ernie Petrides <petrides@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Add support for compilation for Core2
Andi Kleen [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] i386: Add support for compilation for Core2

gcc doesn't support -mtune=core2 yet, but will be soon. Use -mtune=generic or -mtune=i686
as fallback

TBD need benchmarking for INTEL_USERCOPY etc. So far I used the same defaults as MPENTIUMM

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Add option to compile for Core2
Andi Kleen [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] x86-64: Add option to compile for Core2

Add an option to compile for Intel's Core 2

The Kconfig help is a mouthful due to the inventiveness of Intel's
product naming department.

Mainly for the 64bit cache line sizes because gcc doesn't support
optimizing for core2 yet. However it will and then the kernel
should be ready by passing the right option

Also fix the old MPSC help text to confirm better to reality.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] paravirt: Add option to allow skipping the timer check
Zachary Amsden [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] paravirt: Add option to allow skipping the timer check

Add a way to disable the timer IRQ routing check via a boot option.  The
VMI timer code uses this to avoid triggering the pester Mingo code, which
probes for some very unusual and broken motherboard routings.  It fires
100% of the time when using a paravirtual delay mechanism instead of using
a realtime delay, since there is no elapsed real time, and the 4 timer IRQs
have not yet been delivered.

In addition, it is entirely possible, though improbable, that this bug
could surface on real hardware which picks a particularly bad time to enter
SMM mode, causing a long latency during one of the timer IRQs.

While here, make check_timer be __init.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
[chrisw: use no_timer_check to bring inline with x86_64 as per Andi's request]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: fix missing pte update
Zachary Amsden [Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)]
[PATCH] paravirt: fix missing pte update

The function ptep_get_and_clear uses an atomic instruction sequence to get and
clear an active pte.  Rather than add such an atomic operator to all virtual
machine implementations in paravirt-ops, it is easier to support the raw
atomic sequence and use either a trapping writable pagetable approach, or a
post-update notification.  For the post update notification, we require the
pte_update function to be called after the access.  Combine the 2-level and
3-level paging operators into one common function which does the post-update
notification, and rename the actual atomic sequences to raw_ptep_xxx
operators.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: fix parameter names in mmu operations
Zachary Amsden [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: fix parameter names in mmu operations

Make parameter names match function argument names for the yet to be defined
pte_update_defer accessor.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Preparatory mmu header movement
Zachary Amsden [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Preparatory mmu header movement

Move header includes for the nopud / nopmd types to the location of the actual
pte / pgd type definitions.  This allows generic 4-level page type code to be
written before the split 2/3 level page table headers are included.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Be careful about touching BIOS address space
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Be careful about touching BIOS address space

BIOS ROM areas may not be mapped into the guest address space, so be careful
when touching those addresses to make sure they appear to be mapped.

[akpm@osdl.org: fix unused var warning]
AK: Changed __get_user to probe_kernel_address

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Add MMU virtualization to paravirt_ops
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Add MMU virtualization to paravirt_ops

Add the three bare TLB accessor functions to paravirt-ops.  Most amusingly,
flush_tlb is redefined on SMP, so I can't call the paravirt op flush_tlb.
Instead, I chose to indicate the actual flush type, kernel (global) vs. user
(non-global).  Global in this sense means using the global bit in the page
table entry, which makes TLB entries persistent across CR3 reloads, not
global as in the SMP sense of invoking remote shootdowns, so the term is
confusingly overloaded.

AK: folded in fix from Zach for PAE compilation

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Add APIC accessors to paravirt-ops.
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Add APIC accessors to paravirt-ops.

Add APIC accessors to paravirt-ops.  Unfortunately, we need two write
functions, as some older broken hardware requires workarounds for
Pentium APIC errata - this is the purpose of apic_write_atomic.

AK: replaced __inline with inline

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Allow disable power management under hypervisor
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Allow disable power management under hypervisor

Two legacy power management modes are much easier to just explicitly disable
when running in paravirtualized mode - neither APM nor PnP is still relevant.
The status of ACPI is still debatable, and noacpi is still a common enough
boot parameter that it is not necessary to explicitly disable ACPI.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Disable vdso by default when CONFIG_PARAVIRT is enabled
Andi Kleen [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Disable vdso by default when CONFIG_PARAVIRT is enabled

They don't work together and this way even glibc still works.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] paravirt: Allow selected bug checks to be
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Allow selected bug checks to be

Allow selected bug checks to be skipped by paravirt kernels.  The two most
important are the F00F workaround (which is either done by the hypervisor,
or not required), and the 'hlt' instruction check, which can break under
some hypervisors.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Add startup infrastructure for paravirtualization
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Add startup infrastructure for paravirtualization

1) Each hypervisor writes a probe function to detect whether we are
   running under that hypervisor.  paravirt_probe() registers this
   function.

2) If vmlinux is booted with ring != 0, we call all the probe
   functions (with registers except %esp intact) in link order: the
   winner will not return.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: cpu_detect extraction
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] i386: cpu_detect extraction

Both lhype and Xen want to call the core of the x86 cpu detect code before
calling start_kernel.

(extracted from larger patch)

AK: folded in start_kernel header patch

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: Patch inline replacements for paravirt intercepts
Rusty Russell [Thu, 7 Dec 2006 01:14:08 +0000 (02:14 +0100)]
[PATCH] paravirt: Patch inline replacements for paravirt intercepts

It turns out that the most called ops, by several orders of magnitude,
are the interrupt manipulation ops.  These are obvious candidates for
patching, so mark them up and create infrastructure for it.

The method used is that the ops structure has a patch function, which
is called for each place which needs to be patched: this returns a
number of instructions (the rest are NOP-padded).

Usually we can spare a register (%eax) for the binary patched code to
use, but in a couple of critical places in entry.S we can't: we make
the clobbers explicit at the call site, and manually clobber the
allowed registers in debug mode as an extra check.

And:

Don't abuse CONFIG_DEBUG_KERNEL, add CONFIG_DEBUG_PARAVIRT.

And:

AK:  Fix warnings in x86-64 alternative.c build

And:

AK: Fix compilation with defconfig

And:

^From: Andrew Morton <akpm@osdl.org>

Some binutlises still like to emit references to __stop_parainstructions and
__start_parainstructions.

And:

AK: Fix warnings about unused variables when PARAVIRT is disabled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] paravirt: header and stubs for paravirtualisation
Rusty Russell [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] paravirt: header and stubs for paravirtualisation

Create a paravirt.h header for all the critical operations which need to be
replaced with hypervisor calls, and include that instead of defining native
operations, when CONFIG_PARAVIRT.

This patch does the dumbest possible replacement of paravirtualized
instructions: calls through a "paravirt_ops" structure.  Currently these are
function implementations of native hardware: hypervisors will override the ops
structure with their own variants.

All the pv-ops functions are declared "fastcall" so that a specific
register-based ABI is used, to make inlining assember easier.

And:

+From: Andy Whitcroft <apw@shadowen.org>

The paravirt ops introduce a 'weak' attribute onto memory_setup().
Code ordering leads to the following warnings on x86:

    arch/i386/kernel/setup.c:651: warning: weak declaration of
                `memory_setup' after first use results in unspecified behavior

Move memory_setup() to avoid this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
18 years ago[PATCH] i386: Fix double #includes in arch/i386
Nicolas Kaiser [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] i386: Fix double #includes in arch/i386

Fix double #includes in arch/i386

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: substitute __va lookup with pfn_to_kaddr
David Rientjes [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] i386: substitute __va lookup with pfn_to_kaddr

Substitutes allocate_pgdat virtual address lookup with pfn_to_kaddr macro.

Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] x86-64: Don't force inlining of do_csum
Andi Kleen [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] x86-64: Don't force inlining of do_csum

It's two big and used by two callers. Calls should be cheap enough anyways.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: remove IOPL check on task switch
Chuck Ebbert [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] i386: remove IOPL check on task switch

IOPL is implicitly saved and restored on task switch,
so explicit check is no longer needed.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Fix race in IO-APIC routing entry setup.
Andi Kleen [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] x86-64: Fix race in IO-APIC routing entry setup.

Interrupt could happen between setting the IO-APIC entry
and setting its interrupt data.

Pointed out by Linus.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Fix race in IO-APIC routing entry setup.
Andi Kleen [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] i386: Fix race in IO-APIC routing entry setup.

Interrupt could happen between setting the IO-APIC entry
and setting its interrupt data.

Pointed out by Linus.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: comment magic constants in delay.h
Paolo 'Blaisorblade' Giarrusso [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] x86: comment magic constants in delay.h

For both i386 and x86_64, copy from arch/$ARCH/lib/delay.c comments about the
used magic constants, plus a few other niceties.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andi Kleen <ak@suse.de>
 include/asm-i386/delay.h   |    5 ++++-
 include/asm-x86_64/delay.h |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

18 years ago[PATCH] x86-64: Make x86_64 udelay() round up instead of down.
Paolo 'Blaisorblade' Giarrusso [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] x86-64: Make x86_64 udelay() round up instead of down.

Port two patches from i386 to x86_64 delay.c to make sure all rounding is done
upward instead of downward.

There is no sign in commit messages that the mismatch was done on purpose, and
"delay() guarantees sleeping at least for the specified time" is still a valid
rule IMHO.

The original x86 patches are both from pre-GIT era, i.e.:

"[PATCH] round up  in __udelay()" in commit
54c7e1f5cc6771ff644d7bc21a2b829308bd126f

"[PATCH] add 1 in __const_udelay()" in commit
42c77a9801b8877d8b90f65f75db758822a0bccc

(both commits are from converted BK repository to x86_64).

AK: fixed gcc warning

linux/arch/x86_64/lib/delay.c:43: warning: suggest parentheses around + or - inside shift
(did this actually work?)

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Calgary: allow compiling Calgary in but not using it by default
Muli Ben-Yehuda [Thu, 7 Dec 2006 01:14:07 +0000 (02:14 +0100)]
[PATCH] Calgary: allow compiling Calgary in but not using it by default

This patch makes it possible to compile Calgary in but not use it by
default. In this mode, use 'iommu=calgary' to activate it.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Calgary: check BBAR ioremap success when ioremapping
Muli Ben-Yehuda [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] Calgary: check BBAR ioremap success when ioremapping

This patch cleans up the previous "Use BIOS supplied BBAR information"
patch. Mostly stylistic clenaups, but also check for ioremap failure
when we ioremap the BBAR rather than when trying to use it.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Laurent Vivier <Laurent.Vivier@bull.net>
18 years ago[PATCH] Calgary: use BIOS supplied BBARs and topology information
Laurent Vivier [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] Calgary: use BIOS supplied BBARs and topology information

Find the BBAR register address of each Calgary using the "Extended
BIOS Data Area" rather than calculating it ourselves. Also get the bus
topology (what PHB each bus is on) from Calgary rather than
calculating it ourselves.

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=7407.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] calgary: phb_shift can be int
Muli Ben-Yehuda [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] calgary: phb_shift can be int

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Move memory map printing and other code to e820.c
bibo,mao [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] i386: Move memory map printing and other code to e820.c

This patch moves e820 memory map print and memmap boot param
parsing function from setup.c to e820.c, also adds limit_regions
and print_memory_map declaration in header file.

Signed-off-by: bibo,mao <bibo.mao@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
 arch/i386/kernel/e820.c  |  152 +++++++++++++++++++++++++++
 arch/i386/kernel/setup.c |  158 ---------------------------------
 include/asm-i386/e820.h  |    2
 arch/i386/kernel/e820.c  |  152 ++++++++++++++++++++++++++++++++++++++++++++++
 arch/i386/kernel/setup.c |  153 -----------------------------------------------
 include/asm-i386/e820.h  |    2
 3 files changed, 155 insertions(+), 152 deletions(-)

18 years ago[PATCH] i386: Move e820/efi memmap walking code to e820.c
bibo,mao [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] i386: Move e820/efi memmap walking code to e820.c

This patch moves e820/efi memmap table walking function from
setup.c to e820.c, also this patch adds extern declaration in
header file.

Signed-off-by: bibo,mao <bibo.mao@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
 arch/i386/kernel/e820.c  |  115 +++++++++++++++++++++++++++++++++
 arch/i386/kernel/setup.c |  118 -----------------------------------
 include/asm-i386/e820.h  |    2
 arch/i386/kernel/e820.c  |  115 +++++++++++++++++++++++++++++++++++++++++++++
 arch/i386/kernel/setup.c |  118 -----------------------------------------------
 include/asm-i386/e820.h  |    2
 3 files changed, 117 insertions(+), 118 deletions(-)

18 years ago[PATCH] i386: Move find_max_pfn function to e820.c
bibo,mao [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] i386: Move find_max_pfn function to e820.c

Move more code from setup.c into e820.c

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: create e820.c for e820 map sanitize and copy function
bibo,mao [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] i386: create e820.c for e820 map sanitize and copy function

This patch moves bios e820 map sanitize and copy function from
setup.c to e820.c

Signed-off-by: bibo,mao <bibo.mao@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
 arch/i386/kernel/e820.c  |  252 +++++++++++++++++++++++++++++++++++++++++++++++
 arch/i386/kernel/setup.c |  240 --------------------------------------------
 2 files changed, 252 insertions(+), 240 deletions(-)

18 years ago[PATCH] i386: i386 create e820.c to handle standard io/mem resources
bibo,mao [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] i386: i386 create e820.c to handle standard io/mem resources

This patch creates new file named e820.c to hanle standard io/mem
resources, moving request_standard_resources function from setup.c
to e820.c. Also this patch modifies Makfile to compile file e820.c.

Signed-off-by: bibo,mao <bibo.mao@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
 Makefile |    2
 arch/i386/kernel/Makefile |    2
 arch/i386/kernel/e820.c   |  289 ++++++++++++++++++++++++++++++++++++++++++++++
 arch/i386/kernel/setup.c  |  276 -------------------------------------------
 3 files changed, 293 insertions(+), 274 deletions(-)

18 years ago[PATCH] x86-64: Support -mregparm arguments for signals with SA_SIGINFO in compat...
Albert Cahalan [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] x86-64: Support -mregparm arguments for signals with SA_SIGINFO in compat mode

The recent change to make x86_64 support i386 binaries compiled
with -mregparm=3 only covered signal handlers without SA_SIGINFO.
(the 3-arg "real-time" ones)

To be compatible with i386, both types should be supported.

Signed-off-by: Albert Cahalan <acahalan@gmail.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Try multiple timer variants in check_timer
Andi Kleen [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] x86-64: Try multiple timer variants in check_timer

Instead of adding all kinds of more quirks try various timer
routing variants in check_timer.

In particular this tries to handle quirks from:
- Nvidia NF2-4 reference BIOS: wrong timer override
- Asus: Wrong timer override but no HPET table
- ATI: require timer disabled in 8259
- Some boards: require timer enabled in 8259

We just try many of the the known variants in the hopefully right order
in check_timer.

Trying pin 0/2 on Nvidia suggested by Tim Hockin.

TBD Experimental. Needs a lot of testing

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Use probe_kernel_address instead of __get_user in fault paths
Andi Kleen [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] i386: Use probe_kernel_address instead of __get_user in fault paths

Makes the intention of the code cleaner to read and avoids
a potential deadlock on mmap_sem. Also change the types of
the arguments to not include __user because they're really
not user addresses.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86-64: Use probe_kernel_address in arch/x86_64/*
Andi Kleen [Thu, 7 Dec 2006 01:14:06 +0000 (02:14 +0100)]
[PATCH] x86-64: Use probe_kernel_address in arch/x86_64/*

Instead of open coded __get_user

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Generic: Move __user cast into probe_kernel_address
Andi Kleen [Thu, 7 Dec 2006 01:14:05 +0000 (02:14 +0100)]
[PATCH] Generic: Move __user cast into probe_kernel_address

Caller of probe_kernel_address shouldn't need to know that
pka is internally implemented with __get_user. So move the
__user cast into pka.

Signed-off-by: Andi Kleen <ak@suse.de>