Commit c83d1280 authored by Ingo Molnar's avatar Ingo Molnar

Merge branches 'x86/prototypes', 'x86/x2apic' and 'x86/debug' into x86/core

...@@ -729,7 +729,7 @@ struct var_mtrr_range_state { ...@@ -729,7 +729,7 @@ struct var_mtrr_range_state {
mtrr_type type; mtrr_type type;
}; };
struct var_mtrr_range_state __initdata range_state[RANGE_NUM]; static struct var_mtrr_range_state __initdata range_state[RANGE_NUM];
static int __initdata debug_print; static int __initdata debug_print;
static int __init static int __init
......
...@@ -275,9 +275,9 @@ ENTRY(native_usergs_sysret64) ...@@ -275,9 +275,9 @@ ENTRY(native_usergs_sysret64)
ENTRY(ret_from_fork) ENTRY(ret_from_fork)
CFI_DEFAULT_STACK CFI_DEFAULT_STACK
push kernel_eflags(%rip) push kernel_eflags(%rip)
CFI_ADJUST_CFA_OFFSET 4 CFI_ADJUST_CFA_OFFSET 8
popf # reset kernel eflags popf # reset kernel eflags
CFI_ADJUST_CFA_OFFSET -4 CFI_ADJUST_CFA_OFFSET -8
call schedule_tail call schedule_tail
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx) testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
......
...@@ -54,6 +54,7 @@ int is_uv_system(void) ...@@ -54,6 +54,7 @@ int is_uv_system(void)
{ {
return uv_system_type != UV_NONE; return uv_system_type != UV_NONE;
} }
EXPORT_SYMBOL_GPL(is_uv_system);
DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
......
...@@ -1483,6 +1483,7 @@ static void print_APIC_bitfield(int base) ...@@ -1483,6 +1483,7 @@ static void print_APIC_bitfield(int base)
void /*__init*/ print_local_APIC(void *dummy) void /*__init*/ print_local_APIC(void *dummy)
{ {
unsigned int v, ver, maxlvt; unsigned int v, ver, maxlvt;
u64 icr;
if (apic_verbosity == APIC_QUIET) if (apic_verbosity == APIC_QUIET)
return; return;
...@@ -1533,10 +1534,9 @@ void /*__init*/ print_local_APIC(void *dummy) ...@@ -1533,10 +1534,9 @@ void /*__init*/ print_local_APIC(void *dummy)
printk(KERN_DEBUG "... APIC ESR: %08x\n", v); printk(KERN_DEBUG "... APIC ESR: %08x\n", v);
} }
v = apic_read(APIC_ICR); icr = apic_icr_read();
printk(KERN_DEBUG "... APIC ICR: %08x\n", v); printk(KERN_DEBUG "... APIC ICR: %08x\n", icr);
v = apic_read(APIC_ICR2); printk(KERN_DEBUG "... APIC ICR2: %08x\n", icr >> 32);
printk(KERN_DEBUG "... APIC ICR2: %08x\n", v);
v = apic_read(APIC_LVTT); v = apic_read(APIC_LVTT);
printk(KERN_DEBUG "... APIC LVTT: %08x\n", v); printk(KERN_DEBUG "... APIC LVTT: %08x\n", v);
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <asm/syscalls.h>
/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
static void set_bitmap(unsigned long *bitmap, unsigned int base, static void set_bitmap(unsigned long *bitmap, unsigned int base,
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
#include <mach_apic.h> #include <mach_apic.h>
#include <mach_ipi.h>
/* /*
* the following functions deal with sending IPIs between CPUs. * the following functions deal with sending IPIs between CPUs.
* *
...@@ -147,7 +149,6 @@ void send_IPI_mask_sequence(cpumask_t mask, int vector) ...@@ -147,7 +149,6 @@ void send_IPI_mask_sequence(cpumask_t mask, int vector)
} }
/* must come after the send_IPI functions above for inlining */ /* must come after the send_IPI functions above for inlining */
#include <mach_ipi.h>
static int convert_apicid_to_cpu(int apic_id) static int convert_apicid_to_cpu(int apic_id)
{ {
int i; int i;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/ldt.h> #include <asm/ldt.h>
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/syscalls.h>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static void flush_ldt(void *current_mm) static void flush_ldt(void *current_mm)
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/kdebug.h> #include <asm/kdebug.h>
#include <asm/syscalls.h>
#include <asm/smp.h>
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/ia32.h> #include <asm/ia32.h>
#include <asm/idle.h> #include <asm/idle.h>
#include <asm/syscalls.h>
asmlinkage extern void ret_from_fork(void); asmlinkage extern void ret_from_fork(void);
......
...@@ -69,7 +69,7 @@ static inline bool invalid_selector(u16 value) ...@@ -69,7 +69,7 @@ static inline bool invalid_selector(u16 value)
#define FLAG_MASK FLAG_MASK_32 #define FLAG_MASK FLAG_MASK_32
static long *pt_regs_access(struct pt_regs *regs, unsigned long regno) static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno)
{ {
BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0); BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0);
regno >>= 2; regno >>= 2;
......
...@@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void) ...@@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void)
printk(KERN_INFO printk(KERN_INFO
"cpu %d has no node %d or node-local memory\n", "cpu %d has no node %d or node-local memory\n",
cpu, node); cpu, node);
if (ptr)
printk(KERN_DEBUG "per cpu data for cpu%d at %016lx\n",
cpu, __pa(ptr));
} }
else else {
ptr = alloc_bootmem_pages_node(NODE_DATA(node), size); ptr = alloc_bootmem_pages_node(NODE_DATA(node), size);
if (ptr)
printk(KERN_DEBUG "per cpu data for cpu%d on node%d at %016lx\n",
cpu, node, __pa(ptr));
}
#endif #endif
per_cpu_offset(cpu) = ptr - __per_cpu_start; per_cpu_offset(cpu) = ptr - __per_cpu_start;
memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/i387.h> #include <asm/i387.h>
#include <asm/vdso.h> #include <asm/vdso.h>
#include <asm/syscalls.h>
#include "sigframe.h" #include "sigframe.h"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/ia32_unistd.h> #include <asm/ia32_unistd.h>
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/syscalls.h>
#include "sigframe.h" #include "sigframe.h"
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
......
...@@ -88,7 +88,7 @@ static DEFINE_PER_CPU(struct task_struct *, idle_thread_array); ...@@ -88,7 +88,7 @@ static DEFINE_PER_CPU(struct task_struct *, idle_thread_array);
#define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x)) #define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x))
#define set_idle_for_cpu(x, p) (per_cpu(idle_thread_array, x) = (p)) #define set_idle_for_cpu(x, p) (per_cpu(idle_thread_array, x) = (p))
#else #else
struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ; static struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ;
#define get_idle_for_cpu(x) (idle_thread_array[(x)]) #define get_idle_for_cpu(x) (idle_thread_array[(x)])
#define set_idle_for_cpu(x, p) (idle_thread_array[(x)] = (p)) #define set_idle_for_cpu(x, p) (idle_thread_array[(x)] = (p))
#endif #endif
...@@ -128,7 +128,7 @@ static atomic_t init_deasserted; ...@@ -128,7 +128,7 @@ static atomic_t init_deasserted;
static cpumask_t cpu_sibling_setup_map; static cpumask_t cpu_sibling_setup_map;
/* Set if we find a B stepping CPU */ /* Set if we find a B stepping CPU */
int __cpuinitdata smp_b_stepping; static int __cpuinitdata smp_b_stepping;
#if defined(CONFIG_NUMA) && defined(CONFIG_X86_32) #if defined(CONFIG_NUMA) && defined(CONFIG_X86_32)
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/unistd.h> #include <linux/unistd.h>
#include <asm/syscalls.h>
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags, unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff) unsigned long fd, unsigned long pgoff)
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/ia32.h> #include <asm/ia32.h>
#include <asm/syscalls.h>
asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long off) unsigned long fd, unsigned long off)
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <asm/arch_hooks.h> #include <asm/arch_hooks.h>
#include <asm/hpet.h> #include <asm/hpet.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/timer.h>
#include "do_timer.h" #include "do_timer.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <asm/ldt.h> #include <asm/ldt.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/syscalls.h>
#include "tls.h" #include "tls.h"
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/syscalls.h>
/* /*
* Known problems: * Known problems:
......
...@@ -10,13 +10,15 @@ ...@@ -10,13 +10,15 @@
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <mach_ipi.h>
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
#define DEFAULT_SEND_IPI (1) #define DEFAULT_SEND_IPI (1)
#else #else
#define DEFAULT_SEND_IPI (0) #define DEFAULT_SEND_IPI (0)
#endif #endif
int no_broadcast=DEFAULT_SEND_IPI; int no_broadcast = DEFAULT_SEND_IPI;
/** /**
* pre_intr_init_hook - initialisation prior to setting up interrupt vectors * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/proto.h> #include <asm/proto.h>
#include <asm-generic/sections.h> #include <asm-generic/sections.h>
#include <asm/traps.h>
/* /*
* Page fault error code bits * Page fault error code bits
...@@ -357,8 +358,6 @@ static int is_errata100(struct pt_regs *regs, unsigned long address) ...@@ -357,8 +358,6 @@ static int is_errata100(struct pt_regs *regs, unsigned long address)
return 0; return 0;
} }
void do_invalid_op(struct pt_regs *, unsigned long);
static int is_f00f_bug(struct pt_regs *regs, unsigned long address) static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
{ {
#ifdef CONFIG_X86_F00F_BUG #ifdef CONFIG_X86_F00F_BUG
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <asm/paravirt.h> #include <asm/paravirt.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp.h>
unsigned int __VMALLOC_RESERVE = 128 << 20; unsigned int __VMALLOC_RESERVE = 128 << 20;
......
...@@ -421,7 +421,7 @@ void unxlate_dev_mem_ptr(unsigned long phys, void *addr) ...@@ -421,7 +421,7 @@ void unxlate_dev_mem_ptr(unsigned long phys, void *addr)
return; return;
} }
int __initdata early_ioremap_debug; static int __initdata early_ioremap_debug;
static int __init early_ioremap_debug_setup(char *str) static int __init early_ioremap_debug_setup(char *str)
{ {
...@@ -547,7 +547,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx) ...@@ -547,7 +547,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)
} }
int __initdata early_ioremap_nested; static int __initdata early_ioremap_nested;
static int __init check_early_ioremap_leak(void) static int __init check_early_ioremap_leak(void)
{ {
......
...@@ -54,6 +54,11 @@ extern int disable_apic; ...@@ -54,6 +54,11 @@ extern int disable_apic;
#endif #endif
extern int is_vsmp_box(void); extern int is_vsmp_box(void);
extern void xapic_wait_icr_idle(void);
extern u32 safe_xapic_wait_icr_idle(void);
extern u64 xapic_icr_read(void);
extern void xapic_icr_write(u32, u32);
extern int setup_profiling_timer(unsigned int);
static inline void native_apic_mem_write(u32 reg, u32 v) static inline void native_apic_mem_write(u32 reg, u32 v)
{ {
......
...@@ -64,6 +64,7 @@ struct e820map { ...@@ -64,6 +64,7 @@ struct e820map {
extern struct e820map e820; extern struct e820map e820;
extern struct e820map e820_saved; extern struct e820map e820_saved;
extern unsigned long pci_mem_start;
extern int e820_any_mapped(u64 start, u64 end, unsigned type); extern int e820_any_mapped(u64 start, u64 end, unsigned type);
extern int e820_all_mapped(u64 start, u64 end, unsigned type); extern int e820_all_mapped(u64 start, u64 end, unsigned type);
extern void e820_add_region(u64 start, u64 size, int type); extern void e820_add_region(u64 start, u64 size, int type);
......
...@@ -95,6 +95,26 @@ extern asmlinkage void qic_reschedule_interrupt(void); ...@@ -95,6 +95,26 @@ extern asmlinkage void qic_reschedule_interrupt(void);
extern asmlinkage void qic_enable_irq_interrupt(void); extern asmlinkage void qic_enable_irq_interrupt(void);
extern asmlinkage void qic_call_function_interrupt(void); extern asmlinkage void qic_call_function_interrupt(void);
/* SMP */
extern void smp_apic_timer_interrupt(struct pt_regs *);
#ifdef CONFIG_X86_32
extern void smp_spurious_interrupt(struct pt_regs *);
extern void smp_error_interrupt(struct pt_regs *);
#else
extern asmlinkage void smp_spurious_interrupt(void);
extern asmlinkage void smp_error_interrupt(void);
#endif
#ifdef CONFIG_X86_SMP
extern void smp_reschedule_interrupt(struct pt_regs *);
extern void smp_call_function_interrupt(struct pt_regs *);
extern void smp_call_function_single_interrupt(struct pt_regs *);
#ifdef CONFIG_X86_32
extern void smp_invalidate_interrupt(struct pt_regs *);
#else
extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);
#endif
#endif
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
extern void (*const interrupt[NR_IRQS])(void); extern void (*const interrupt[NR_IRQS])(void);
#else #else
......
...@@ -25,6 +25,7 @@ extern void mxcsr_feature_mask_init(void); ...@@ -25,6 +25,7 @@ extern void mxcsr_feature_mask_init(void);
extern int init_fpu(struct task_struct *child); extern int init_fpu(struct task_struct *child);
extern asmlinkage void math_state_restore(void); extern asmlinkage void math_state_restore(void);
extern void init_thread_xstate(void); extern void init_thread_xstate(void);
extern int dump_fpu(struct pt_regs *, struct user_i387_struct *);
extern user_regset_active_fn fpregs_active, xfpregs_active; extern user_regset_active_fn fpregs_active, xfpregs_active;
extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get; extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get;
......
...@@ -73,6 +73,8 @@ build_mmio_write(__writeq, "q", unsigned long, "r", ) ...@@ -73,6 +73,8 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
#define writeq writeq #define writeq writeq
#endif #endif
extern int iommu_bio_merge;
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
# include "io_32.h" # include "io_32.h"
#else #else
......
...@@ -235,7 +235,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c); ...@@ -235,7 +235,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);
#define flush_write_buffers() #define flush_write_buffers()
extern int iommu_bio_merge;
#define BIO_VMERGE_BOUNDARY iommu_bio_merge #define BIO_VMERGE_BOUNDARY iommu_bio_merge
/* /*
......
...@@ -96,6 +96,7 @@ extern void find_low_pfn_range(void); ...@@ -96,6 +96,7 @@ extern void find_low_pfn_range(void);
extern unsigned long init_memory_mapping(unsigned long start, extern unsigned long init_memory_mapping(unsigned long start,
unsigned long end); unsigned long end);
extern void initmem_init(unsigned long, unsigned long); extern void initmem_init(unsigned long, unsigned long);
extern void free_initmem(void);
extern void setup_bootmem_allocator(void); extern void setup_bootmem_allocator(void);
......
...@@ -91,6 +91,7 @@ extern unsigned long init_memory_mapping(unsigned long start, ...@@ -91,6 +91,7 @@ extern unsigned long init_memory_mapping(unsigned long start,
unsigned long end); unsigned long end);
extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn); extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
extern void free_initmem(void);
extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
......
...@@ -313,6 +313,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {} ...@@ -313,6 +313,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {}
static inline void native_pagetable_setup_done(pgd_t *base) {} static inline void native_pagetable_setup_done(pgd_t *base) {}
#endif #endif
extern int arch_report_meminfo(char *page);
#ifdef CONFIG_PARAVIRT #ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h> #include <asm/paravirt.h>
#else /* !CONFIG_PARAVIRT */ #else /* !CONFIG_PARAVIRT */
......
...@@ -31,6 +31,7 @@ static inline void pgtable_cache_init(void) { } ...@@ -31,6 +31,7 @@ static inline void pgtable_cache_init(void) { }
static inline void check_pgt_cache(void) { } static inline void check_pgt_cache(void) { }
void paging_init(void); void paging_init(void);
extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
/* /*
* The Linux x86 paging architecture is 'compile-time dual-mode', it * The Linux x86 paging architecture is 'compile-time dual-mode', it
......
...@@ -140,6 +140,8 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); ...@@ -140,6 +140,8 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
#define current_cpu_data boot_cpu_data #define current_cpu_data boot_cpu_data
#endif #endif
extern const struct seq_operations cpuinfo_op;
static inline int hlt_works(int cpu) static inline int hlt_works(int cpu)
{ {
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
...@@ -153,6 +155,8 @@ static inline int hlt_works(int cpu) ...@@ -153,6 +155,8 @@ static inline int hlt_works(int cpu)
extern void cpu_detect(struct cpuinfo_x86 *c); extern void cpu_detect(struct cpuinfo_x86 *c);
extern struct pt_regs *idle_regs(struct pt_regs *);
extern void early_cpu_init(void); extern void early_cpu_init(void);
extern void identify_boot_cpu(void); extern void identify_boot_cpu(void);
extern void identify_secondary_cpu(struct cpuinfo_x86 *); extern void identify_secondary_cpu(struct cpuinfo_x86 *);
......
...@@ -148,6 +148,9 @@ extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, ...@@ -148,6 +148,9 @@ extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
void signal_fault(struct pt_regs *regs, void __user *frame, char *where); void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
#endif #endif
extern long syscall_trace_enter(struct pt_regs *);
extern void syscall_trace_leave(struct pt_regs *);
static inline unsigned long regs_return_value(struct pt_regs *regs) static inline unsigned long regs_return_value(struct pt_regs *regs)
{ {
return regs->ax; return regs->ax;
......
...@@ -42,6 +42,7 @@ struct x86_quirks { ...@@ -42,6 +42,7 @@ struct x86_quirks {
}; };
extern struct x86_quirks *x86_quirks; extern struct x86_quirks *x86_quirks;
extern unsigned long saved_video_mode;
#ifndef CONFIG_PARAVIRT #ifndef CONFIG_PARAVIRT
#define paravirt_post_allocator_init() do {} while (0) #define paravirt_post_allocator_init() do {} while (0)
......
...@@ -140,6 +140,9 @@ struct sigaction { ...@@ -140,6 +140,9 @@ struct sigaction {
struct k_sigaction { struct k_sigaction {
struct sigaction sa; struct sigaction sa;
}; };
extern void do_notify_resume(struct pt_regs *, void *, __u32);
# else /* __KERNEL__ */ # else /* __KERNEL__ */
/* Here we must cater to libcs that poke about in kernel headers. */ /* Here we must cater to libcs that poke about in kernel headers. */
......
...@@ -34,6 +34,9 @@ extern cpumask_t cpu_initialized; ...@@ -34,6 +34,9 @@ extern cpumask_t cpu_initialized;
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
DECLARE_PER_CPU(cpumask_t, cpu_core_map); DECLARE_PER_CPU(cpumask_t, cpu_core_map);
DECLARE_PER_CPU(u16, cpu_llc_id); DECLARE_PER_CPU(u16, cpu_llc_id);
#ifdef CONFIG_X86_32
DECLARE_PER_CPU(int, cpu_number);
#endif
DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
...@@ -142,7 +145,6 @@ extern unsigned disabled_cpus __cpuinitdata; ...@@ -142,7 +145,6 @@ extern unsigned disabled_cpus __cpuinitdata;
* from the initial startup. We map APIC_BASE very early in page_setup(), * from the initial startup. We map APIC_BASE very early in page_setup(),
* so this is correct in the x86 case. * so this is correct in the x86 case.
*/ */
DECLARE_PER_CPU(int, cpu_number);
#define raw_smp_processor_id() (x86_read_percpu(cpu_number)) #define raw_smp_processor_id() (x86_read_percpu(cpu_number))
extern int safe_smp_processor_id(void); extern int safe_smp_processor_id(void);
......
/*
* syscalls.h - Linux syscall interfaces (arch-specific)
*
* Copyright (c) 2008 Jaswinder Singh
*
* This file is released under the GPLv2.
* See the file COPYING for more details.
*/
#ifndef _ASM_X86_SYSCALLS_H
#define _ASM_X86_SYSCALLS_H
#include <linux/compiler.h>
#include <linux/linkage.h>
#include <linux/types.h>
#include <linux/signal.h>
/* Common in X86_32 and X86_64 */
/* kernel/ioport.c */
asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
/* X86_32 only */
#ifdef CONFIG_X86_32
/* kernel/process_32.c */
asmlinkage int sys_fork(struct pt_regs);
asmlinkage int sys_clone(struct pt_regs);
asmlinkage int sys_vfork(struct pt_regs);
asmlinkage int sys_execve(struct pt_regs);
/* kernel/signal_32.c */
asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
struct old_sigaction __user *);
asmlinkage int sys_sigaltstack(unsigned long);
asmlinkage unsigned long sys_sigreturn(unsigned long);
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);
struct mmap_arg_struct;
asmlinkage int old_mmap(struct mmap_arg_struct __user *);
struct sel_arg_struct;
asmlinkage int old_select(struct sel_arg_struct __user *);
asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
struct old_utsname;
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);
#else /* CONFIG_X86_32 */
/* X86_64 only */
/* kernel/process_64.c */
asmlinkage long sys_fork(struct pt_regs *);
asmlinkage long sys_clone(unsigned long, unsigned long,
void __user *, void __user *,
struct pt_regs *);
asmlinkage long sys_vfork(struct pt_regs *);
asmlinkage long sys_execve(char __user *, char __user * __user *,
char __user * __user *,
struct pt_regs *);
/* kernel/ioport.c */
asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
/* kernel/signal_64.c */
asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
struct pt_regs *);
asmlinkage long sys_rt_sigreturn(struct pt_regs *);
/* kernel/sys_x86_64.c */
asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
unsigned long, unsigned long, unsigned long);
struct new_utsname;
asmlinkage long sys_uname(struct new_utsname __user *);
#endif /* CONFIG_X86_32 */
#endif /* _ASM_X86_SYSCALLS_H */
...@@ -46,6 +46,8 @@ static inline int native_set_wallclock(unsigned long nowtime) ...@@ -46,6 +46,8 @@ static inline int native_set_wallclock(unsigned long nowtime)
#endif #endif
extern void time_init(void);
#ifdef CONFIG_PARAVIRT #ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h> #include <asm/paravirt.h>
#else /* !CONFIG_PARAVIRT */ #else /* !CONFIG_PARAVIRT */
......
...@@ -9,9 +9,12 @@ ...@@ -9,9 +9,12 @@
unsigned long long native_sched_clock(void); unsigned long long native_sched_clock(void);
unsigned long native_calibrate_tsc(void); unsigned long native_calibrate_tsc(void);
#ifdef CONFIG_X86_32
extern int timer_ack; extern int timer_ack;
extern int no_timer_check;
extern int recalibrate_cpu_khz(void); extern int recalibrate_cpu_khz(void);
#endif /* CONFIG_X86_32 */
extern int no_timer_check;
#ifndef CONFIG_PARAVIRT #ifndef CONFIG_PARAVIRT
#define calibrate_tsc() native_calibrate_tsc() #define calibrate_tsc() native_calibrate_tsc()
......
...@@ -51,6 +51,8 @@ void do_spurious_interrupt_bug(struct pt_regs *, long); ...@@ -51,6 +51,8 @@ void do_spurious_interrupt_bug(struct pt_regs *, long);
unsigned long patch_espfix_desc(unsigned long, unsigned long); unsigned long patch_espfix_desc(unsigned long, unsigned long);
asmlinkage void math_emulate(long); asmlinkage void math_emulate(long);
void do_page_fault(struct pt_regs *regs, unsigned long error_code);
#else /* CONFIG_X86_32 */ #else /* CONFIG_X86_32 */
asmlinkage void double_fault(void); asmlinkage void double_fault(void);
...@@ -62,5 +64,7 @@ asmlinkage void do_coprocessor_error(struct pt_regs *); ...@@ -62,5 +64,7 @@ asmlinkage void do_coprocessor_error(struct pt_regs *);
asmlinkage void do_simd_coprocessor_error(struct pt_regs *); asmlinkage void do_simd_coprocessor_error(struct pt_regs *);
asmlinkage void do_spurious_interrupt_bug(struct pt_regs *); asmlinkage void do_spurious_interrupt_bug(struct pt_regs *);
asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);
#endif /* CONFIG_X86_32 */ #endif /* CONFIG_X86_32 */
#endif /* ASM_X86__TRAPS_H */ #endif /* ASM_X86__TRAPS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment