Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125394
b: refs/heads/master
c: c656d9c
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Dec 26, 2008
1 parent fbacc70 commit 2e5960a
Show file tree
Hide file tree
Showing 26 changed files with 201 additions and 331 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a73ad3331fdbf4191cf99b83ea9ac7082b6757ba
refs/heads/master: c656d9ca48d3ef1a11449e892ce488ee0bb5a335
12 changes: 2 additions & 10 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,13 @@ config X86_FIND_SMP_CONFIG
def_bool y
depends on X86_MPPARSE || X86_VOYAGER

if ACPI
config X86_MPPARSE
def_bool y
bool "Enable MPS table"
bool "Enable MPS table" if ACPI
default y
depends on X86_LOCAL_APIC
help
For old smp systems that do not have proper acpi support. Newer systems
(esp with 64bit cpus) with acpi support, MADT and DSDT will override it
endif

if !ACPI
config X86_MPPARSE
def_bool y
depends on X86_LOCAL_APIC
endif

choice
prompt "Subarchitecture Type"
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86/ia32/ia32_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,6 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
regs->dx = (unsigned long) &frame->info;
regs->cx = (unsigned long) &frame->uc;

/* Make -mregparm=3 work */
regs->ax = sig;
regs->dx = (unsigned long) &frame->info;
regs->cx = (unsigned long) &frame->uc;

loadsegment(ds, __USER32_DS);
loadsegment(es, __USER32_DS);

Expand Down
10 changes: 9 additions & 1 deletion trunk/arch/x86/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,15 @@ static inline void __change_bit(int nr, volatile unsigned long *addr)
*/
static inline void change_bit(int nr, volatile unsigned long *addr)
{
asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr));
if (IS_IMMEDIATE(nr)) {
asm volatile(LOCK_PREFIX "xorb %1,%0"
: CONST_MASK_ADDR(nr, addr)
: "iq" ((u8)CONST_MASK(nr)));
} else {
asm volatile(LOCK_PREFIX "btc %1,%0"
: BITOP_ADDR(addr)
: "Ir" (nr));
}
}

/**
Expand Down
74 changes: 29 additions & 45 deletions trunk/arch/x86/include/asm/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,33 @@
#include <asm/types.h>
#include <linux/compiler.h>

#ifdef __GNUC__
#define __LITTLE_ENDIAN

#ifdef __i386__

static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
#ifdef CONFIG_X86_BSWAP
asm("bswap %0" : "=r" (x) : "0" (x));
#else
#ifdef __i386__
# ifdef CONFIG_X86_BSWAP
asm("bswap %0" : "=r" (val) : "0" (val));
# else
asm("xchgb %b0,%h0\n\t" /* swap lower bytes */
"rorl $16,%0\n\t" /* swap words */
"xchgb %b0,%h0" /* swap higher bytes */
: "=q" (x)
: "0" (x));
: "=q" (val)
: "0" (val));
# endif

#else /* __i386__ */
asm("bswapl %0"
: "=r" (val)
: "0" (val));
#endif
return x;
return val;
}
#define __arch_swab32 __arch_swab32

static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
{
#ifdef __i386__
union {
struct {
__u32 a;
Expand All @@ -32,50 +39,27 @@ static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
__u64 u;
} v;
v.u = val;
#ifdef CONFIG_X86_BSWAP
# ifdef CONFIG_X86_BSWAP
asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
: "=r" (v.s.a), "=r" (v.s.b)
: "0" (v.s.a), "1" (v.s.b));
#else
v.s.a = ___arch__swab32(v.s.a);
v.s.b = ___arch__swab32(v.s.b);
# else
v.s.a = __arch_swab32(v.s.a);
v.s.b = __arch_swab32(v.s.b);
asm("xchgl %0,%1"
: "=r" (v.s.a), "=r" (v.s.b)
: "0" (v.s.a), "1" (v.s.b));
#endif
# endif
return v.u;
}

#else /* __i386__ */

static inline __attribute_const__ __u64 ___arch__swab64(__u64 x)
{
asm("bswapq %0"
: "=r" (x)
: "0" (x));
return x;
}

static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
asm("bswapl %0"
: "=r" (x)
: "0" (x));
return x;
}

: "=r" (val)
: "0" (val));
return val;
#endif
}
#define __arch_swab64 __arch_swab64

/* Do not define swab16. Gcc is smart enough to recognize "C" version and
convert it into rotation or exhange. */

#define __arch__swab64(x) ___arch__swab64(x)
#define __arch__swab32(x) ___arch__swab32(x)

#define __BYTEORDER_HAS_U64__

#endif /* __GNUC__ */

#include <linux/byteorder/little_endian.h>
#include <linux/byteorder.h>

#endif /* _ASM_X86_BYTEORDER_H */
4 changes: 0 additions & 4 deletions trunk/arch/x86/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ static inline int irq_canonicalize(int irq)
# endif
#endif

#ifdef CONFIG_IRQBALANCE
extern int irqbalance_disable(char *str);
#endif

#ifdef CONFIG_HOTPLUG_CPU
#include <linux/cpumask.h>
extern void fixup_irqs(cpumask_t map);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/irq_regs_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include <asm/percpu.h>

#define ARCH_HAS_OWN_IRQ_REGS

DECLARE_PER_CPU(struct pt_regs *, irq_regs);

static inline struct pt_regs *get_irq_regs(void)
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/prctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
#define ARCH_GET_FS 0x1003
#define ARCH_GET_GS 0x1004

#ifdef CONFIG_X86_64
extern long sys_arch_prctl(int, unsigned long);
#endif /* CONFIG_X86_64 */

#endif /* _ASM_X86_PRCTL_H */
6 changes: 4 additions & 2 deletions trunk/arch/x86/include/asm/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ typedef unsigned long sigset_t;

#ifndef __ASSEMBLY__

# ifdef __KERNEL__
extern void do_notify_resume(struct pt_regs *, void *, __u32);
# endif /* __KERNEL__ */

#ifdef __i386__
# ifdef __KERNEL__
struct old_sigaction {
Expand All @@ -141,8 +145,6 @@ struct k_sigaction {
struct sigaction sa;
};

extern void do_notify_resume(struct pt_regs *, void *, __u32);

# else /* __KERNEL__ */
/* Here we must cater to libcs that poke about in kernel headers. */

Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/x86/include/asm/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
/* kernel/ioport.c */
asmlinkage long sys_ioperm(unsigned long, unsigned long, int);

/* kernel/ldt.c */
asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);

/* kernel/tls.c */
asmlinkage int sys_set_thread_area(struct user_desc __user *);
asmlinkage int sys_get_thread_area(struct user_desc __user *);

/* X86_32 only */
#ifdef CONFIG_X86_32
/* kernel/process_32.c */
Expand All @@ -38,9 +45,6 @@ asmlinkage int sys_rt_sigreturn(unsigned long);
/* kernel/ioport.c */
asmlinkage long sys_iopl(unsigned long);

/* kernel/ldt.c */
asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);

/* kernel/sys_i386_32.c */
asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
unsigned long, unsigned long, unsigned long);
Expand All @@ -54,10 +58,6 @@ asmlinkage int sys_uname(struct old_utsname __user *);
struct oldold_utsname;
asmlinkage int sys_olduname(struct oldold_utsname __user *);

/* kernel/tls.c */
asmlinkage int sys_set_thread_area(struct user_desc __user *);
asmlinkage int sys_get_thread_area(struct user_desc __user *);

/* kernel/vm86_32.c */
asmlinkage int sys_vm86old(struct pt_regs);
asmlinkage int sys_vm86(struct pt_regs);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# define AT_VECTOR_SIZE_ARCH 1
#endif

#ifdef CONFIG_X86_32

struct task_struct; /* one of the stranger aspects of C forward declarations */
struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *next);

#ifdef CONFIG_X86_32

/*
* Saving eflags is important. It switches not only IOPL between tasks,
* it also protects other tasks from NT leaking through sysenter etc.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct exec_domain;
struct thread_info {
struct task_struct *task; /* main task structure */
struct exec_domain *exec_domain; /* execution domain */
unsigned long flags; /* low level flags */
__u32 flags; /* low level flags */
__u32 status; /* thread synchronous flags */
__u32 cpu; /* current CPU */
int preempt_count; /* 0 => preemptable,
Expand Down
11 changes: 9 additions & 2 deletions trunk/arch/x86/include/asm/traps.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long);
dotraplinkage void do_invalid_TSS(struct pt_regs *, long);
dotraplinkage void do_segment_not_present(struct pt_regs *, long);
dotraplinkage void do_stack_segment(struct pt_regs *, long);
#ifdef CONFIG_X86_64
dotraplinkage void do_double_fault(struct pt_regs *, long);
asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *);
#endif
dotraplinkage void do_general_protection(struct pt_regs *, long);
dotraplinkage void do_page_fault(struct pt_regs *, unsigned long);
dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long);
Expand All @@ -72,10 +76,13 @@ static inline int get_si_code(unsigned long condition)
extern int panic_on_unrecovered_nmi;
extern int kstack_depth_to_print;

#ifdef CONFIG_X86_32
void math_error(void __user *);
unsigned long patch_espfix_desc(unsigned long, unsigned long);
asmlinkage void math_emulate(long);
#ifdef CONFIG_X86_32
unsigned long patch_espfix_desc(unsigned long, unsigned long);
#else
asmlinkage void smp_thermal_interrupt(void);
asmlinkage void mce_threshold_interrupt(void);
#endif

#endif /* _ASM_X86_TRAPS_H */
8 changes: 1 addition & 7 deletions trunk/arch/x86/include/asm/tsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ static inline cycles_t get_cycles(void)

static __always_inline cycles_t vget_cycles(void)
{
cycles_t cycles;

/*
* We only do VDSOs on TSC capable CPUs, so this shouldnt
* access boot_cpu_data (which is not VDSO-safe):
Expand All @@ -44,11 +42,7 @@ static __always_inline cycles_t vget_cycles(void)
if (!cpu_has_tsc)
return 0;
#endif
rdtsc_barrier();
cycles = (cycles_t)__native_read_tsc();
rdtsc_barrier();

return cycles;
return (cycles_t)__native_read_tsc();
}

extern void tsc_init(void);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ EXPORT_SYMBOL(_cpu_pda);

struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };

char boot_cpu_stack[IRQSTACKSIZE] __page_aligned_bss;
static char boot_cpu_stack[IRQSTACKSIZE] __page_aligned_bss;

void __cpuinit pda_init(int cpu)
{
Expand Down Expand Up @@ -903,8 +903,8 @@ void __cpuinit pda_init(int cpu)
}
}

char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ +
DEBUG_STKSZ] __page_aligned_bss;
static char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ +
DEBUG_STKSZ] __page_aligned_bss;

extern asmlinkage void ignore_sysret(void);

Expand Down
17 changes: 7 additions & 10 deletions trunk/arch/x86/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,20 +644,17 @@ static inline ssize_t show_shared_cpu_list(struct _cpuid4_info *leaf, char *buf)
return show_shared_cpu_map_func(leaf, 1, buf);
}

static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf) {
switch(this_leaf->eax.split.type) {
case CACHE_TYPE_DATA:
static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf)
{
switch (this_leaf->eax.split.type) {
case CACHE_TYPE_DATA:
return sprintf(buf, "Data\n");
break;
case CACHE_TYPE_INST:
case CACHE_TYPE_INST:
return sprintf(buf, "Instruction\n");
break;
case CACHE_TYPE_UNIFIED:
case CACHE_TYPE_UNIFIED:
return sprintf(buf, "Unified\n");
break;
default:
default:
return sprintf(buf, "Unknown\n");
break;
}
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,16 +823,14 @@ static int enable_mtrr_cleanup __initdata =

static int __init disable_mtrr_cleanup_setup(char *str)
{
if (enable_mtrr_cleanup != -1)
enable_mtrr_cleanup = 0;
enable_mtrr_cleanup = 0;
return 0;
}
early_param("disable_mtrr_cleanup", disable_mtrr_cleanup_setup);

static int __init enable_mtrr_cleanup_setup(char *str)
{
if (enable_mtrr_cleanup != -1)
enable_mtrr_cleanup = 1;
enable_mtrr_cleanup = 1;
return 0;
}
early_param("enable_mtrr_cleanup", enable_mtrr_cleanup_setup);
Expand Down
Loading

0 comments on commit 2e5960a

Please sign in to comment.