Commit 78f28b7c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-platform-for-linus' of...

Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (38 commits)
  x86: Move get/set_wallclock to x86_platform_ops
  x86: platform: Fix section annotations
  x86: apic namespace cleanup
  x86: Distangle ioapic and i8259
  x86: Add Moorestown early detection
  x86: Add hardware_subarch ID for Moorestown
  x86: Add early platform detection
  x86: Move tsc_init to late_time_init
  x86: Move tsc_calibration to x86_init_ops
  x86: Replace the now identical time_32/64.c by time.c
  x86: time_32/64.c unify profile_pc
  x86: Move calibrate_cpu to tsc.c
  x86: Make timer setup and global variables the same in time_32/64.c
  x86: Remove mca bus ifdef from timer interrupt
  x86: Simplify timer_ack magic in time_32.c
  x86: Prepare unification of time_32/64.c
  x86: Remove do_timer hook
  x86: Add timer_init to x86_init_ops
  x86: Move percpu clockevents setup to x86_init_ops
  x86: Move xen_post_allocator_init into xen_pagetable_setup_done
  ...

Fix up conflicts in arch/x86/include/asm/io_apic.h
parents 3240a77b 7bd867df
...@@ -599,6 +599,7 @@ Protocol: 2.07+ ...@@ -599,6 +599,7 @@ Protocol: 2.07+
0x00000000 The default x86/PC environment 0x00000000 The default x86/PC environment
0x00000001 lguest 0x00000001 lguest
0x00000002 Xen 0x00000002 Xen
0x00000003 Moorestown MID
Field name: hardware_subarch_data Field name: hardware_subarch_data
Type: write (subarch-dependent) Type: write (subarch-dependent)
......
...@@ -325,6 +325,7 @@ config X86_EXTENDED_PLATFORM ...@@ -325,6 +325,7 @@ config X86_EXTENDED_PLATFORM
SGI 320/540 (Visual Workstation) SGI 320/540 (Visual Workstation)
Summit/EXA (IBM x440) Summit/EXA (IBM x440)
Unisys ES7000 IA32 series Unisys ES7000 IA32 series
Moorestown MID devices
If you have one of these systems, or if you want to build a If you have one of these systems, or if you want to build a
generic distribution kernel, say Y here - otherwise say N. generic distribution kernel, say Y here - otherwise say N.
...@@ -384,6 +385,18 @@ config X86_ELAN ...@@ -384,6 +385,18 @@ config X86_ELAN
If unsure, choose "PC-compatible" instead. If unsure, choose "PC-compatible" instead.
config X86_MRST
bool "Moorestown MID platform"
depends on X86_32
depends on X86_EXTENDED_PLATFORM
---help---
Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
Internet Device(MID) platform. Moorestown consists of two chips:
Lincroft (CPU core, graphics, and memory controller) and Langwell IOH.
Unlike standard x86 PCs, Moorestown does not have many legacy devices
nor standard legacy replacement devices/features. e.g. Moorestown does
not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
config X86_RDC321X config X86_RDC321X
bool "RDC R-321x SoC" bool "RDC R-321x SoC"
depends on X86_32 depends on X86_32
......
...@@ -70,9 +70,6 @@ static inline void default_inquire_remote_apic(int apicid) ...@@ -70,9 +70,6 @@ static inline void default_inquire_remote_apic(int apicid)
*/ */
#ifdef CONFIG_PARAVIRT #ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h> #include <asm/paravirt.h>
#else
#define setup_boot_clock setup_boot_APIC_clock
#define setup_secondary_clock setup_secondary_APIC_clock
#endif #endif
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
...@@ -252,6 +249,8 @@ static inline void lapic_shutdown(void) { } ...@@ -252,6 +249,8 @@ static inline void lapic_shutdown(void) { }
static inline void init_apic_mappings(void) { } static inline void init_apic_mappings(void) { }
static inline void disable_local_APIC(void) { } static inline void disable_local_APIC(void) { }
static inline void apic_disable(void) { } static inline void apic_disable(void) { }
# define setup_boot_APIC_clock x86_init_noop
# define setup_secondary_APIC_clock x86_init_noop
#endif /* !CONFIG_X86_LOCAL_APIC */ #endif /* !CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
...@@ -300,7 +299,7 @@ struct apic { ...@@ -300,7 +299,7 @@ struct apic {
int (*cpu_present_to_apicid)(int mps_cpu); int (*cpu_present_to_apicid)(int mps_cpu);
physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
void (*setup_portio_remap)(void); void (*setup_portio_remap)(void);
int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); int (*check_phys_apicid_present)(int phys_apicid);
void (*enable_apic_mode)(void); void (*enable_apic_mode)(void);
int (*phys_pkg_id)(int cpuid_apic, int index_msb); int (*phys_pkg_id)(int cpuid_apic, int index_msb);
...@@ -434,7 +433,7 @@ extern struct apic apic_x2apic_uv_x; ...@@ -434,7 +433,7 @@ extern struct apic apic_x2apic_uv_x;
DECLARE_PER_CPU(int, x2apic_extra_bits); DECLARE_PER_CPU(int, x2apic_extra_bits);
extern int default_cpu_present_to_apicid(int mps_cpu); extern int default_cpu_present_to_apicid(int mps_cpu);
extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); extern int default_check_phys_apicid_present(int phys_apicid);
#endif #endif
static inline void default_wait_for_init_deassert(atomic_t *deassert) static inline void default_wait_for_init_deassert(atomic_t *deassert)
...@@ -550,9 +549,9 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu) ...@@ -550,9 +549,9 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu)
} }
static inline int static inline int
__default_check_phys_apicid_present(int boot_cpu_physical_apicid) __default_check_phys_apicid_present(int phys_apicid)
{ {
return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); return physid_isset(phys_apicid, phys_cpu_present_map);
} }
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
...@@ -562,13 +561,13 @@ static inline int default_cpu_present_to_apicid(int mps_cpu) ...@@ -562,13 +561,13 @@ static inline int default_cpu_present_to_apicid(int mps_cpu)
} }
static inline int static inline int
default_check_phys_apicid_present(int boot_cpu_physical_apicid) default_check_phys_apicid_present(int phys_apicid)
{ {
return __default_check_phys_apicid_present(boot_cpu_physical_apicid); return __default_check_phys_apicid_present(phys_apicid);
} }
#else #else
extern int default_cpu_present_to_apicid(int mps_cpu); extern int default_cpu_present_to_apicid(int mps_cpu);
extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); extern int default_check_phys_apicid_present(int phys_apicid);
#endif #endif
static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
......
...@@ -110,4 +110,14 @@ struct boot_params { ...@@ -110,4 +110,14 @@ struct boot_params {
__u8 _pad9[276]; /* 0xeec */ __u8 _pad9[276]; /* 0xeec */
} __attribute__((packed)); } __attribute__((packed));
enum {
X86_SUBARCH_PC = 0,
X86_SUBARCH_LGUEST,
X86_SUBARCH_XEN,
X86_SUBARCH_MRST,
X86_NR_SUBARCHS,
};
#endif /* _ASM_X86_BOOTPARAM_H */ #endif /* _ASM_X86_BOOTPARAM_H */
/* defines for inline arch setup functions */
#include <linux/clockchips.h>
#include <asm/i8259.h>
#include <asm/i8253.h>
/**
* do_timer_interrupt_hook - hook into timer tick
*
* Call the pit clock event handler. see asm/i8253.h
**/
static inline void do_timer_interrupt_hook(void)
{
global_clock_event->event_handler(global_clock_event);
}
...@@ -126,8 +126,6 @@ extern void e820_reserve_resources(void); ...@@ -126,8 +126,6 @@ extern void e820_reserve_resources(void);
extern void e820_reserve_resources_late(void); extern void e820_reserve_resources_late(void);
extern void setup_memory_map(void); extern void setup_memory_map(void);
extern char *default_machine_specific_memory_setup(void); extern char *default_machine_specific_memory_setup(void);
extern char *machine_specific_memory_setup(void);
extern char *memory_setup(void);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef ASM_X86__HYPERVISOR_H #ifndef ASM_X86__HYPERVISOR_H
#define ASM_X86__HYPERVISOR_H #define ASM_X86__HYPERVISOR_H
extern unsigned long get_hypervisor_tsc_freq(void);
extern void init_hypervisor(struct cpuinfo_x86 *c); extern void init_hypervisor(struct cpuinfo_x86 *c);
extern void init_hypervisor_platform(void);
#endif #endif
...@@ -143,6 +143,8 @@ extern int noioapicreroute; ...@@ -143,6 +143,8 @@ extern int noioapicreroute;
/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
extern int timer_through_8259; extern int timer_through_8259;
extern void io_apic_disable_legacy(void);
/* /*
* If we use the IO-APIC for IRQ routing, disable automatic * If we use the IO-APIC for IRQ routing, disable automatic
* assignment of PCI IRQ's. * assignment of PCI IRQ's.
...@@ -176,6 +178,7 @@ extern int setup_ioapic_entry(int apic, int irq, ...@@ -176,6 +178,7 @@ extern int setup_ioapic_entry(int apic, int irq,
int polarity, int vector, int pin); int polarity, int vector, int pin);
extern void ioapic_write_entry(int apic, int pin, extern void ioapic_write_entry(int apic, int pin,
struct IO_APIC_route_entry e); struct IO_APIC_route_entry e);
extern void setup_ioapic_ids_from_mpc(void);
struct mp_ioapic_gsi{ struct mp_ioapic_gsi{
int gsi_base; int gsi_base;
...@@ -187,12 +190,14 @@ int mp_find_ioapic_pin(int ioapic, int gsi); ...@@ -187,12 +190,14 @@ int mp_find_ioapic_pin(int ioapic, int gsi);
void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
#else /* !CONFIG_X86_IO_APIC */ #else /* !CONFIG_X86_IO_APIC */
#define io_apic_assign_pci_irqs 0 #define io_apic_assign_pci_irqs 0
#define setup_ioapic_ids_from_mpc x86_init_noop
static const int timer_through_8259 = 0; static const int timer_through_8259 = 0;
static inline void ioapic_init_mappings(void) { } static inline void ioapic_init_mappings(void) { }
static inline void ioapic_insert_resources(void) { } static inline void ioapic_insert_resources(void) { }
static inline void probe_nr_irqs_gsi(void) { } static inline void probe_nr_irqs_gsi(void) { }
#endif #endif
#endif /* _ASM_X86_IO_APIC_H */ #endif /* _ASM_X86_IO_APIC_H */
...@@ -37,7 +37,6 @@ extern void fixup_irqs(void); ...@@ -37,7 +37,6 @@ extern void fixup_irqs(void);
#endif #endif
extern void (*generic_interrupt_extension)(void); extern void (*generic_interrupt_extension)(void);
extern void init_IRQ(void);
extern void native_init_IRQ(void); extern void native_init_IRQ(void);
extern bool handle_irq(unsigned irq, struct pt_regs *regs); extern bool handle_irq(unsigned irq, struct pt_regs *regs);
...@@ -47,4 +46,6 @@ extern unsigned int do_IRQ(struct pt_regs *regs); ...@@ -47,4 +46,6 @@ extern unsigned int do_IRQ(struct pt_regs *regs);
extern DECLARE_BITMAP(used_vectors, NR_VECTORS); extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
extern int vector_used_by_percpu_irq(unsigned int vector); extern int vector_used_by_percpu_irq(unsigned int vector);
extern void init_ISA_irqs(void);
#endif /* _ASM_X86_IRQ_H */ #endif /* _ASM_X86_IRQ_H */
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <asm/mpspec_def.h> #include <asm/mpspec_def.h>
#include <asm/x86_init.h>
extern int apic_version[MAX_APICS]; extern int apic_version[MAX_APICS];
extern int pic_mode; extern int pic_mode;
...@@ -41,9 +42,6 @@ extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; ...@@ -41,9 +42,6 @@ extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
#endif /* CONFIG_X86_64 */ #endif /* CONFIG_X86_64 */
extern void early_find_smp_config(void);
extern void early_get_smp_config(void);
#if defined(CONFIG_MCA) || defined(CONFIG_EISA) #if defined(CONFIG_MCA) || defined(CONFIG_EISA)
extern int mp_bus_id_to_type[MAX_MP_BUSSES]; extern int mp_bus_id_to_type[MAX_MP_BUSSES];
#endif #endif
...@@ -52,20 +50,55 @@ extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); ...@@ -52,20 +50,55 @@ extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
extern unsigned int boot_cpu_physical_apicid; extern unsigned int boot_cpu_physical_apicid;
extern unsigned int max_physical_apicid; extern unsigned int max_physical_apicid;
extern int smp_found_config;
extern int mpc_default_type; extern int mpc_default_type;
extern unsigned long mp_lapic_addr; extern unsigned long mp_lapic_addr;
extern void get_smp_config(void); #ifdef CONFIG_X86_LOCAL_APIC
extern int smp_found_config;
#else
# define smp_found_config 0
#endif
static inline void get_smp_config(void)
{
x86_init.mpparse.get_smp_config(0);
}
static inline void early_get_smp_config(void)
{
x86_init.mpparse.get_smp_config(1);
}
static inline void find_smp_config(void)
{
x86_init.mpparse.find_smp_config(1);
}
static inline void early_find_smp_config(void)
{
x86_init.mpparse.find_smp_config(0);
}
#ifdef CONFIG_X86_MPPARSE #ifdef CONFIG_X86_MPPARSE
extern void find_smp_config(void);
extern void early_reserve_e820_mpc_new(void); extern void early_reserve_e820_mpc_new(void);
extern int enable_update_mptable; extern int enable_update_mptable;
extern int default_mpc_apic_id(struct mpc_cpu *m);
extern void default_smp_read_mpc_oem(struct mpc_table *mpc);
# ifdef CONFIG_X86_IO_APIC
extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str);
# else
# define default_mpc_oem_bus_info NULL
# endif
extern void default_find_smp_config(unsigned int reserve);
extern void default_get_smp_config(unsigned int early);
#else #else
static inline void find_smp_config(void) { }
static inline void early_reserve_e820_mpc_new(void) { } static inline void early_reserve_e820_mpc_new(void) { }
#define enable_update_mptable 0 #define enable_update_mptable 0
#define default_mpc_apic_id NULL
#define default_smp_read_mpc_oem NULL
#define default_mpc_oem_bus_info NULL
#define default_find_smp_config x86_init_uint_noop
#define default_get_smp_config x86_init_uint_noop
#endif #endif
void __cpuinit generic_processor_info(int apicid, int version); void __cpuinit generic_processor_info(int apicid, int version);
......
...@@ -24,22 +24,6 @@ static inline void load_sp0(struct tss_struct *tss, ...@@ -24,22 +24,6 @@ static inline void load_sp0(struct tss_struct *tss,
PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread); PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
} }
#define ARCH_SETUP pv_init_ops.arch_setup();
static inline unsigned long get_wallclock(void)
{
return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
}
static inline int set_wallclock(unsigned long nowtime)
{
return PVOP_CALL1(int, pv_time_ops.set_wallclock, nowtime);
}
static inline void (*choose_time_init(void))(void)
{
return pv_time_ops.time_init;
}
/* The paravirtualized CPUID instruction. */ /* The paravirtualized CPUID instruction. */
static inline void __cpuid(unsigned int *eax, unsigned int *ebx, static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx) unsigned int *ecx, unsigned int *edx)
...@@ -245,7 +229,6 @@ static inline unsigned long long paravirt_sched_clock(void) ...@@ -245,7 +229,6 @@ static inline unsigned long long paravirt_sched_clock(void)
{ {
return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock); return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock);
} }
#define calibrate_tsc() (pv_time_ops.get_tsc_khz())
static inline unsigned long long paravirt_read_pmc(int counter) static inline unsigned long long paravirt_read_pmc(int counter)
{ {
...@@ -363,34 +346,6 @@ static inline void slow_down_io(void) ...@@ -363,34 +346,6 @@ static inline void slow_down_io(void)
#endif #endif
} }
#ifdef CONFIG_X86_LOCAL_APIC
static inline void setup_boot_clock(void)
{
PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
}
static inline void setup_secondary_clock(void)
{
PVOP_VCALL0(pv_apic_ops.setup_secondary_clock);
}
#endif
static inline void paravirt_post_allocator_init(void)
{
if (pv_init_ops.post_allocator_init)
(*pv_init_ops.post_allocator_init)();
}
static inline void paravirt_pagetable_setup_start(pgd_t *base)
{
(*pv_mmu_ops.pagetable_setup_start)(base);
}
static inline void paravirt_pagetable_setup_done(pgd_t *base)
{
(*pv_mmu_ops.pagetable_setup_done)(base);
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
unsigned long start_esp) unsigned long start_esp)
...@@ -948,6 +903,8 @@ static inline unsigned long __raw_local_irq_save(void) ...@@ -948,6 +903,8 @@ static inline unsigned long __raw_local_irq_save(void)
#undef PVOP_VCALL4 #undef PVOP_VCALL4
#undef PVOP_CALL4 #undef PVOP_CALL4
extern void default_banner(void);
#else /* __ASSEMBLY__ */ #else /* __ASSEMBLY__ */
#define _PVSITE(ptype, clobbers, ops, word, algn) \ #define _PVSITE(ptype, clobbers, ops, word, algn) \
...@@ -1088,5 +1045,7 @@ static inline unsigned long __raw_local_irq_save(void) ...@@ -1088,5 +1045,7 @@ static inline unsigned long __raw_local_irq_save(void)
#endif /* CONFIG_X86_32 */ #endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* CONFIG_PARAVIRT */ #else /* CONFIG_PARAVIRT */
# define default_banner x86_init_noop
#endif /* !CONFIG_PARAVIRT */
#endif /* _ASM_X86_PARAVIRT_H */ #endif /* _ASM_X86_PARAVIRT_H */
...@@ -78,14 +78,6 @@ struct pv_init_ops { ...@@ -78,14 +78,6 @@ struct pv_init_ops {
*/ */
unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, unsigned (*patch)(u8 type, u16 clobber, void *insnbuf,
unsigned long addr, unsigned len); unsigned long addr, unsigned len);
/* Basic arch-specific setup */
void (*arch_setup)(void);
char *(*memory_setup)(void);
void (*post_allocator_init)(void);
/* Print a banner to identify the environment */
void (*banner)(void);
}; };
...@@ -96,12 +88,6 @@ struct pv_lazy_ops { ...@@ -96,12 +88,6 @@ struct pv_lazy_ops {
}; };
struct pv_time_ops { struct pv_time_ops {
void (*time_init)(void);
/* Set and set time of day */
unsigned long (*get_wallclock)(void);
int (*set_wallclock)(unsigned long);
unsigned long long (*sched_clock)(void); unsigned long long (*sched_clock)(void);
unsigned long (*get_tsc_khz)(void); unsigned long (*get_tsc_khz)(void);
}; };
...@@ -203,8 +189,6 @@ struct pv_cpu_ops { ...@@ -203,8 +189,6 @@ struct pv_cpu_ops {
}; };
struct pv_irq_ops { struct pv_irq_ops {
void (*init_IRQ)(void);
/* /*
* Get/set interrupt state. save_fl and restore_fl are only * Get/set interrupt state. save_fl and restore_fl are only
* expected to use X86_EFLAGS_IF; all other bits * expected to use X86_EFLAGS_IF; all other bits
...@@ -229,9 +213,6 @@ struct pv_irq_ops { ...@@ -229,9 +213,6 @@ struct pv_irq_ops {
struct pv_apic_ops { struct pv_apic_ops {
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
void (*setup_boot_clock)(void);
void (*setup_secondary_clock)(void);
void (*startup_ipi_hook)(int phys_apicid, void (*startup_ipi_hook)(int phys_apicid,
unsigned long start_eip, unsigned long start_eip,
unsigned long start_esp); unsigned long start_esp);
...@@ -239,15 +220,6 @@ struct pv_apic_ops { ...@@ -239,15 +220,6 @@ struct pv_apic_ops {
}; };
struct pv_mmu_ops { struct pv_mmu_ops {
/*
* Called before/after init_mm pagetable setup. setup_start
* may reset %cr3, and may pre-install parts of the pagetable;
* pagetable setup is expected to preserve any existing
* mapping.
*/
void (*pagetable_setup_start)(pgd_t *pgd_base);
void (*pagetable_setup_done)(pgd_t *pgd_base);
unsigned long (*read_cr2)(void); unsigned long (*read_cr2)(void);
void (*write_cr2)(unsigned long); void (*write_cr2)(unsigned long);
......
...@@ -56,16 +56,6 @@ extern struct list_head pgd_list; ...@@ -56,16 +56,6 @@ extern struct list_head pgd_list;
#define pte_update(mm, addr, ptep) do { } while (0) #define pte_update(mm, addr, ptep) do { } while (0)
#define pte_update_defer(mm, addr, ptep) do { } while (0) #define pte_update_defer(mm, addr, ptep) do { } while (0)
static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
{
native_pagetable_setup_start(base);
}
static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
{
native_pagetable_setup_done(base);
}
#define pgd_val(x) native_pgd_val(x) #define pgd_val(x) native_pgd_val(x)
#define __pgd(x) native_make_pgd(x) #define __pgd(x) native_make_pgd(x)
......
...@@ -299,8 +299,8 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte); ...@@ -299,8 +299,8 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte);
extern void native_pagetable_setup_start(pgd_t *base); extern void native_pagetable_setup_start(pgd_t *base);
extern void native_pagetable_setup_done(pgd_t *base); extern void native_pagetable_setup_done(pgd_t *base);
#else #else
static inline void native_pagetable_setup_start(pgd_t *base) {} #define native_pagetable_setup_start x86_init_pgd_noop
static inline void native_pagetable_setup_done(pgd_t *base) {} #define native_pagetable_setup_done x86_init_pgd_noop
#endif #endif
struct seq_file; struct seq_file;
......
...@@ -5,43 +5,6 @@ ...@@ -5,43 +5,6 @@
#define COMMAND_LINE_SIZE 2048 #define COMMAND_LINE_SIZE 2048
#ifndef __ASSEMBLY__
/*
* Any setup quirks to be performed?
*/
struct mpc_cpu;
struct mpc_bus;
struct mpc_oemtable;
struct x86_quirks {
int (*arch_pre_time_init)(void);
int (*arch_time_init)(void);
int (*arch_pre_intr_init)(void);
int (*arch_intr_init)(void);
int (*arch_trap_init)(void);
char * (*arch_memory_setup)(void);
int (*mach_get_smp_config)(unsigned int early);
int (*mach_find_smp_config)(unsigned int reserve);
int *mpc_record;
int (*mpc_apic_id)(struct mpc_cpu *m);
void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
void (*mpc_oem_pci_bus)(struct mpc_bus *m);
void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,
unsigned short oemsize);
int (*setup_ioapic_ids)(void);
};
extern void x86_quirk_intr_init(void);
extern void x86_quirk_trap_init(void);
extern void x86_quirk_pre_time_init(void);
extern void x86_quirk_time_init(void);
#endif /* __ASSEMBLY__ */
#ifdef __i386__ #ifdef __i386__
#include <linux/pfn.h> #include <linux/pfn.h>
...@@ -61,6 +24,7 @@ extern void x86_quirk_time_init(void); ...@@ -61,6 +24,7 @@ extern void x86_quirk_time_init(void);
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <asm/bootparam.h> #include <asm/bootparam.h>
#include <asm/x86_init.h>
/* Interrupt control for vSMPowered x86_64 systems */ /* Interrupt control for vSMPowered x86_64 systems */
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
...@@ -79,11 +43,16 @@ static inline void visws_early_detect(void) { } ...@@ -79,11 +43,16 @@ static inline void visws_early_detect(void) { }
static inline int is_visws_box(void) { return 0; } static inline int is_visws_box(void) { return 0; }
#endif #endif
extern struct x86_quirks *x86_quirks;
extern unsigned long saved_video_mode; extern unsigned long saved_video_mode;
#ifndef CONFIG_PARAVIRT extern void reserve_standard_io_resources(void);
#define paravirt_post_allocator_init() do {} while (0) extern void i386_reserve_resources(void);
extern void setup_default_timer_irq(void);
#ifdef CONFIG_X86_MRST
extern void x86_mrst_early_setup(void);
#else
static inline void x86_mrst_early_setup(void) { }
#endif #endif
#ifndef _SETUP #ifndef _SETUP
......
...@@ -4,60 +4,7 @@ ...@@ -4,60 +4,7 @@
extern void hpet_time_init(void); extern void hpet_time_init(void);
#include <asm/mc146818rtc.h> #include <asm/mc146818rtc.h>
#ifdef CONFIG_X86_32
#include <linux/efi.h>
static inline unsigned long native_get_wallclock(void)
{
unsigned long retval;
if (efi_enabled)
retval = efi_get_time();
else
retval = mach_get_cmos_time();
return retval;
}
static inline int native_set_wallclock(unsigned long nowtime)
{
int retval;
if (efi_enabled)
retval = efi_set_rtc_mmss(nowtime);
else
retval = mach_set_rtc_mmss(nowtime);