Skip to content

Commit

Permalink
Merge branch 'x86/prototypes' into x86-v28-for-linus-phase1
Browse files Browse the repository at this point in the history
Conflicts:
	arch/x86/kernel/process_32.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Oct 6, 2008
2 parents 19268ed + 8d7ccaa commit 0962f40
Show file tree
Hide file tree
Showing 38 changed files with 177 additions and 13 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ struct var_mtrr_range_state {
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 __init
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/thread_info.h>
#include <linux/syscalls.h>
#include <asm/syscalls.h>

/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
static void set_bitmap(unsigned long *bitmap, unsigned int base,
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kernel/ipi.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#ifdef CONFIG_X86_32
#include <mach_apic.h>
#include <mach_ipi.h>

/*
* the following functions deal with sending IPIs between CPUs.
*
Expand Down Expand Up @@ -147,7 +149,6 @@ void send_IPI_mask_sequence(cpumask_t mask, int vector)
}

/* must come after the send_IPI functions above for inlining */
#include <mach_ipi.h>
static int convert_apicid_to_cpu(int apic_id)
{
int i;
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/ldt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <asm/ldt.h>
#include <asm/desc.h>
#include <asm/mmu_context.h>
#include <asm/syscalls.h>

#ifdef CONFIG_SMP
static void flush_ldt(void *current_mm)
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#include <asm/cpu.h>
#include <asm/kdebug.h>
#include <asm/idle.h>
#include <asm/syscalls.h>
#include <asm/smp.h>

asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");

Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <asm/proto.h>
#include <asm/ia32.h>
#include <asm/idle.h>
#include <asm/syscalls.h>

asmlinkage extern void ret_from_fork(void);

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static inline bool invalid_selector(u16 value)

#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);
regno >>= 2;
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <asm/uaccess.h>
#include <asm/i387.h>
#include <asm/vdso.h>
#include <asm/syscalls.h>

#include "sigframe.h"

Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <asm/proto.h>
#include <asm/ia32_unistd.h>
#include <asm/mce.h>
#include <asm/syscalls.h>
#include "sigframe.h"

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 set_idle_for_cpu(x, p) (per_cpu(idle_thread_array, x) = (p))
#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 set_idle_for_cpu(x, p) (idle_thread_array[(x)] = (p))
#endif
Expand Down Expand Up @@ -129,7 +129,7 @@ static int boot_cpu_logical_apicid;
static cpumask_t cpu_sibling_setup_map;

/* 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)

Expand Down
2 changes: 2 additions & 0 deletions arch/x86/kernel/sys_i386_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <linux/uaccess.h>
#include <linux/unistd.h>

#include <asm/syscalls.h>

asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/sys_x86_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <asm/uaccess.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,
unsigned long fd, unsigned long off)
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
#include <asm/time.h>
#include <asm/timer.h>

#include "do_timer.h"

Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <asm/ldt.h>
#include <asm/processor.h>
#include <asm/proto.h>
#include <asm/syscalls.h>

#include "tls.h"

Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/vm86_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <asm/io.h>
#include <asm/tlbflush.h>
#include <asm/irq.h>
#include <asm/syscalls.h>

/*
* Known problems:
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/mach-default/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
#include <asm/e820.h>
#include <asm/setup.h>

#include <mach_ipi.h>

#ifdef CONFIG_HOTPLUG_CPU
#define DEFAULT_SEND_IPI (1)
#else
#define DEFAULT_SEND_IPI (0)
#endif

int no_broadcast=DEFAULT_SEND_IPI;
int no_broadcast = DEFAULT_SEND_IPI;

/**
* pre_intr_init_hook - initialisation prior to setting up interrupt vectors
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <asm/tlbflush.h>
#include <asm/proto.h>
#include <asm-generic/sections.h>
#include <asm/traps.h>

/*
* Page fault error code bits
Expand Down Expand Up @@ -357,8 +358,6 @@ static int is_errata100(struct pt_regs *regs, unsigned long address)
return 0;
}

void do_invalid_op(struct pt_regs *, unsigned long);

static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
{
#ifdef CONFIG_X86_F00F_BUG
Expand Down
1 change: 1 addition & 0 deletions arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <asm/paravirt.h>
#include <asm/setup.h>
#include <asm/cacheflush.h>
#include <asm/smp.h>

unsigned int __VMALLOC_RESERVE = 128 << 20;

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void unxlate_dev_mem_ptr(unsigned long phys, void *addr)
return;
}

int __initdata early_ioremap_debug;
static int __initdata early_ioremap_debug;

static int __init early_ioremap_debug_setup(char *str)
{
Expand Down Expand Up @@ -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)
{
Expand Down
5 changes: 5 additions & 0 deletions include/asm-x86/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ extern int disable_apic;
#endif

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_write(unsigned long reg, u32 v)
{
Expand Down
1 change: 1 addition & 0 deletions include/asm-x86/e820.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct e820map {
extern struct e820map e820;
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_all_mapped(u64 start, u64 end, unsigned type);
extern void e820_add_region(u64 start, u64 size, int type);
Expand Down
20 changes: 20 additions & 0 deletions include/asm-x86/hw_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,26 @@ extern asmlinkage void qic_reschedule_interrupt(void);
extern asmlinkage void qic_enable_irq_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
extern void (*const interrupt[NR_IRQS])(void);
#else
Expand Down
1 change: 1 addition & 0 deletions include/asm-x86/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern void mxcsr_feature_mask_init(void);
extern int init_fpu(struct task_struct *child);
extern asmlinkage void math_state_restore(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_get_fn fpregs_get, xfpregs_get, fpregs_soft_get;
Expand Down
2 changes: 2 additions & 0 deletions include/asm-x86/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
#define writeq writeq
#endif

extern int iommu_bio_merge;

#ifdef CONFIG_X86_32
# include "io_32.h"
#else
Expand Down
1 change: 0 additions & 1 deletion include/asm-x86/io_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);

#define flush_write_buffers()

extern int iommu_bio_merge;
#define BIO_VMERGE_BOUNDARY iommu_bio_merge

/*
Expand Down
1 change: 1 addition & 0 deletions include/asm-x86/page_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ extern void find_low_pfn_range(void);
extern unsigned long init_memory_mapping(unsigned long start,
unsigned long end);
extern void initmem_init(unsigned long, unsigned long);
extern void free_initmem(void);
extern void setup_bootmem_allocator(void);


Expand Down
1 change: 1 addition & 0 deletions include/asm-x86/page_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ extern unsigned long init_memory_mapping(unsigned long start,
unsigned long end);

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_wb(unsigned long phys, unsigned long size);
Expand Down
2 changes: 2 additions & 0 deletions include/asm-x86/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {}
static inline void native_pagetable_setup_done(pgd_t *base) {}
#endif

extern int arch_report_meminfo(char *page);

#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#else /* !CONFIG_PARAVIRT */
Expand Down
1 change: 1 addition & 0 deletions include/asm-x86/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static inline void pgtable_cache_init(void) { }
static inline void check_pgt_cache(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
Expand Down
4 changes: 4 additions & 0 deletions include/asm-x86/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
#define current_cpu_data boot_cpu_data
#endif

extern const struct seq_operations cpuinfo_op;

static inline int hlt_works(int cpu)
{
#ifdef CONFIG_X86_32
Expand All @@ -154,6 +156,8 @@ static inline int hlt_works(int cpu)

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 identify_boot_cpu(void);
extern void identify_secondary_cpu(struct cpuinfo_x86 *);
Expand Down
3 changes: 3 additions & 0 deletions include/asm-x86/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,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);
#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)
{
return regs->ax;
Expand Down
1 change: 1 addition & 0 deletions include/asm-x86/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct x86_quirks {
};

extern struct x86_quirks *x86_quirks;
extern unsigned long saved_video_mode;

#ifndef CONFIG_PARAVIRT
#define paravirt_post_allocator_init() do {} while (0)
Expand Down
3 changes: 3 additions & 0 deletions include/asm-x86/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ struct sigaction {
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
4 changes: 3 additions & 1 deletion include/asm-x86/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ extern cpumask_t cpu_initialized;
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
DECLARE_PER_CPU(cpumask_t, cpu_core_map);
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_bios_cpu_apicid);
Expand Down Expand Up @@ -142,7 +145,6 @@ extern unsigned disabled_cpus __cpuinitdata;
* from the initial startup. We map APIC_BASE very early in page_setup(),
* so this is correct in the x86 case.
*/
DECLARE_PER_CPU(int, cpu_number);
#define raw_smp_processor_id() (x86_read_percpu(cpu_number))
extern int safe_smp_processor_id(void);

Expand Down
Loading

0 comments on commit 0962f40

Please sign in to comment.