Skip to content

Commit 78f28b7

Browse files
committed
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
2 parents 3240a77 + 7bd867d commit 78f28b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+756
-907
lines changed

Documentation/x86/boot.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ Protocol: 2.07+
599599
0x00000000 The default x86/PC environment
600600
0x00000001 lguest
601601
0x00000002 Xen
602+
0x00000003 Moorestown MID
602603

603604
Field name: hardware_subarch_data
604605
Type: write (subarch-dependent)

arch/x86/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ config X86_EXTENDED_PLATFORM
325325
SGI 320/540 (Visual Workstation)
326326
Summit/EXA (IBM x440)
327327
Unisys ES7000 IA32 series
328+
Moorestown MID devices
328329

329330
If you have one of these systems, or if you want to build a
330331
generic distribution kernel, say Y here - otherwise say N.
@@ -384,6 +385,18 @@ config X86_ELAN
384385

385386
If unsure, choose "PC-compatible" instead.
386387

388+
config X86_MRST
389+
bool "Moorestown MID platform"
390+
depends on X86_32
391+
depends on X86_EXTENDED_PLATFORM
392+
---help---
393+
Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
394+
Internet Device(MID) platform. Moorestown consists of two chips:
395+
Lincroft (CPU core, graphics, and memory controller) and Langwell IOH.
396+
Unlike standard x86 PCs, Moorestown does not have many legacy devices
397+
nor standard legacy replacement devices/features. e.g. Moorestown does
398+
not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
399+
387400
config X86_RDC321X
388401
bool "RDC R-321x SoC"
389402
depends on X86_32

arch/x86/include/asm/apic.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ static inline void default_inquire_remote_apic(int apicid)
7070
*/
7171
#ifdef CONFIG_PARAVIRT
7272
#include <asm/paravirt.h>
73-
#else
74-
#define setup_boot_clock setup_boot_APIC_clock
75-
#define setup_secondary_clock setup_secondary_APIC_clock
7673
#endif
7774

7875
#ifdef CONFIG_X86_64
@@ -252,6 +249,8 @@ static inline void lapic_shutdown(void) { }
252249
static inline void init_apic_mappings(void) { }
253250
static inline void disable_local_APIC(void) { }
254251
static inline void apic_disable(void) { }
252+
# define setup_boot_APIC_clock x86_init_noop
253+
# define setup_secondary_APIC_clock x86_init_noop
255254
#endif /* !CONFIG_X86_LOCAL_APIC */
256255

257256
#ifdef CONFIG_X86_64
@@ -300,7 +299,7 @@ struct apic {
300299
int (*cpu_present_to_apicid)(int mps_cpu);
301300
physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
302301
void (*setup_portio_remap)(void);
303-
int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
302+
int (*check_phys_apicid_present)(int phys_apicid);
304303
void (*enable_apic_mode)(void);
305304
int (*phys_pkg_id)(int cpuid_apic, int index_msb);
306305

@@ -434,7 +433,7 @@ extern struct apic apic_x2apic_uv_x;
434433
DECLARE_PER_CPU(int, x2apic_extra_bits);
435434

436435
extern int default_cpu_present_to_apicid(int mps_cpu);
437-
extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid);
436+
extern int default_check_phys_apicid_present(int phys_apicid);
438437
#endif
439438

440439
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)
550549
}
551550

552551
static inline int
553-
__default_check_phys_apicid_present(int boot_cpu_physical_apicid)
552+
__default_check_phys_apicid_present(int phys_apicid)
554553
{
555-
return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
554+
return physid_isset(phys_apicid, phys_cpu_present_map);
556555
}
557556

558557
#ifdef CONFIG_X86_32
@@ -562,13 +561,13 @@ static inline int default_cpu_present_to_apicid(int mps_cpu)
562561
}
563562

564563
static inline int
565-
default_check_phys_apicid_present(int boot_cpu_physical_apicid)
564+
default_check_phys_apicid_present(int phys_apicid)
566565
{
567-
return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
566+
return __default_check_phys_apicid_present(phys_apicid);
568567
}
569568
#else
570569
extern int default_cpu_present_to_apicid(int mps_cpu);
571-
extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid);
570+
extern int default_check_phys_apicid_present(int phys_apicid);
572571
#endif
573572

574573
static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)

arch/x86/include/asm/bootparam.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,14 @@ struct boot_params {
110110
__u8 _pad9[276]; /* 0xeec */
111111
} __attribute__((packed));
112112

113+
enum {
114+
X86_SUBARCH_PC = 0,
115+
X86_SUBARCH_LGUEST,
116+
X86_SUBARCH_XEN,
117+
X86_SUBARCH_MRST,
118+
X86_NR_SUBARCHS,
119+
};
120+
121+
122+
113123
#endif /* _ASM_X86_BOOTPARAM_H */

arch/x86/include/asm/do_timer.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

arch/x86/include/asm/e820.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ extern void e820_reserve_resources(void);
126126
extern void e820_reserve_resources_late(void);
127127
extern void setup_memory_map(void);
128128
extern char *default_machine_specific_memory_setup(void);
129-
extern char *machine_specific_memory_setup(void);
130-
extern char *memory_setup(void);
131129
#endif /* __KERNEL__ */
132130
#endif /* __ASSEMBLY__ */
133131

arch/x86/include/asm/hypervisor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#ifndef ASM_X86__HYPERVISOR_H
2121
#define ASM_X86__HYPERVISOR_H
2222

23-
extern unsigned long get_hypervisor_tsc_freq(void);
2423
extern void init_hypervisor(struct cpuinfo_x86 *c);
24+
extern void init_hypervisor_platform(void);
2525

2626
#endif

arch/x86/include/asm/io_apic.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ extern int noioapicreroute;
143143
/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
144144
extern int timer_through_8259;
145145

146+
extern void io_apic_disable_legacy(void);
147+
146148
/*
147149
* If we use the IO-APIC for IRQ routing, disable automatic
148150
* assignment of PCI IRQ's.
@@ -176,6 +178,7 @@ extern int setup_ioapic_entry(int apic, int irq,
176178
int polarity, int vector, int pin);
177179
extern void ioapic_write_entry(int apic, int pin,
178180
struct IO_APIC_route_entry e);
181+
extern void setup_ioapic_ids_from_mpc(void);
179182

180183
struct mp_ioapic_gsi{
181184
int gsi_base;
@@ -187,12 +190,14 @@ int mp_find_ioapic_pin(int ioapic, int gsi);
187190
void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
188191

189192
#else /* !CONFIG_X86_IO_APIC */
193+
190194
#define io_apic_assign_pci_irqs 0
195+
#define setup_ioapic_ids_from_mpc x86_init_noop
191196
static const int timer_through_8259 = 0;
192197
static inline void ioapic_init_mappings(void) { }
193198
static inline void ioapic_insert_resources(void) { }
194-
195199
static inline void probe_nr_irqs_gsi(void) { }
200+
196201
#endif
197202

198203
#endif /* _ASM_X86_IO_APIC_H */

arch/x86/include/asm/irq.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ extern void fixup_irqs(void);
3737
#endif
3838

3939
extern void (*generic_interrupt_extension)(void);
40-
extern void init_IRQ(void);
4140
extern void native_init_IRQ(void);
4241
extern bool handle_irq(unsigned irq, struct pt_regs *regs);
4342

@@ -47,4 +46,6 @@ extern unsigned int do_IRQ(struct pt_regs *regs);
4746
extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
4847
extern int vector_used_by_percpu_irq(unsigned int vector);
4948

49+
extern void init_ISA_irqs(void);
50+
5051
#endif /* _ASM_X86_IRQ_H */

arch/x86/include/asm/mpspec.h

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/init.h>
55

66
#include <asm/mpspec_def.h>
7+
#include <asm/x86_init.h>
78

89
extern int apic_version[MAX_APICS];
910
extern int pic_mode;
@@ -41,9 +42,6 @@ extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
4142

4243
#endif /* CONFIG_X86_64 */
4344

44-
extern void early_find_smp_config(void);
45-
extern void early_get_smp_config(void);
46-
4745
#if defined(CONFIG_MCA) || defined(CONFIG_EISA)
4846
extern int mp_bus_id_to_type[MAX_MP_BUSSES];
4947
#endif
@@ -52,20 +50,55 @@ extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
5250

5351
extern unsigned int boot_cpu_physical_apicid;
5452
extern unsigned int max_physical_apicid;
55-
extern int smp_found_config;
5653
extern int mpc_default_type;
5754
extern unsigned long mp_lapic_addr;
5855

59-
extern void get_smp_config(void);
56+
#ifdef CONFIG_X86_LOCAL_APIC
57+
extern int smp_found_config;
58+
#else
59+
# define smp_found_config 0
60+
#endif
61+
62+
static inline void get_smp_config(void)
63+
{
64+
x86_init.mpparse.get_smp_config(0);
65+
}
66+
67+
static inline void early_get_smp_config(void)
68+
{
69+
x86_init.mpparse.get_smp_config(1);
70+
}
71+
72+
static inline void find_smp_config(void)
73+
{
74+
x86_init.mpparse.find_smp_config(1);
75+
}
76+
77+
static inline void early_find_smp_config(void)
78+
{
79+
x86_init.mpparse.find_smp_config(0);
80+
}
6081

6182
#ifdef CONFIG_X86_MPPARSE
62-
extern void find_smp_config(void);
6383
extern void early_reserve_e820_mpc_new(void);
6484
extern int enable_update_mptable;
85+
extern int default_mpc_apic_id(struct mpc_cpu *m);
86+
extern void default_smp_read_mpc_oem(struct mpc_table *mpc);
87+
# ifdef CONFIG_X86_IO_APIC
88+
extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str);
89+
# else
90+
# define default_mpc_oem_bus_info NULL
91+
# endif
92+
extern void default_find_smp_config(unsigned int reserve);
93+
extern void default_get_smp_config(unsigned int early);
6594
#else
66-
static inline void find_smp_config(void) { }
6795
static inline void early_reserve_e820_mpc_new(void) { }
6896
#define enable_update_mptable 0
97+
#define default_mpc_apic_id NULL
98+
#define default_smp_read_mpc_oem NULL
99+
#define default_mpc_oem_bus_info NULL
100+
#define default_find_smp_config x86_init_uint_noop
101+
#define default_get_smp_config x86_init_uint_noop
69102
#endif
70103

71104
void __cpuinit generic_processor_info(int apicid, int version);

arch/x86/include/asm/paravirt.h

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,6 @@ static inline void load_sp0(struct tss_struct *tss,
2424
PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
2525
}
2626

27-
#define ARCH_SETUP pv_init_ops.arch_setup();
28-
static inline unsigned long get_wallclock(void)
29-
{
30-
return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
31-
}
32-
33-
static inline int set_wallclock(unsigned long nowtime)
34-
{
35-
return PVOP_CALL1(int, pv_time_ops.set_wallclock, nowtime);
36-
}
37-
38-
static inline void (*choose_time_init(void))(void)
39-
{
40-
return pv_time_ops.time_init;
41-
}
42-
4327
/* The paravirtualized CPUID instruction. */
4428
static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
4529
unsigned int *ecx, unsigned int *edx)
@@ -245,7 +229,6 @@ static inline unsigned long long paravirt_sched_clock(void)
245229
{
246230
return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock);
247231
}
248-
#define calibrate_tsc() (pv_time_ops.get_tsc_khz())
249232

250233
static inline unsigned long long paravirt_read_pmc(int counter)
251234
{
@@ -363,34 +346,6 @@ static inline void slow_down_io(void)
363346
#endif
364347
}
365348

366-
#ifdef CONFIG_X86_LOCAL_APIC
367-
static inline void setup_boot_clock(void)
368-
{
369-
PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
370-
}
371-
372-
static inline void setup_secondary_clock(void)
373-
{
374-
PVOP_VCALL0(pv_apic_ops.setup_secondary_clock);
375-
}
376-
#endif
377-
378-
static inline void paravirt_post_allocator_init(void)
379-
{
380-
if (pv_init_ops.post_allocator_init)
381-
(*pv_init_ops.post_allocator_init)();
382-
}
383-
384-
static inline void paravirt_pagetable_setup_start(pgd_t *base)
385-
{
386-
(*pv_mmu_ops.pagetable_setup_start)(base);
387-
}
388-
389-
static inline void paravirt_pagetable_setup_done(pgd_t *base)
390-
{
391-
(*pv_mmu_ops.pagetable_setup_done)(base);
392-
}
393-
394349
#ifdef CONFIG_SMP
395350
static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
396351
unsigned long start_esp)
@@ -948,6 +903,8 @@ static inline unsigned long __raw_local_irq_save(void)
948903
#undef PVOP_VCALL4
949904
#undef PVOP_CALL4
950905

906+
extern void default_banner(void);
907+
951908
#else /* __ASSEMBLY__ */
952909

953910
#define _PVSITE(ptype, clobbers, ops, word, algn) \
@@ -1088,5 +1045,7 @@ static inline unsigned long __raw_local_irq_save(void)
10881045
#endif /* CONFIG_X86_32 */
10891046

10901047
#endif /* __ASSEMBLY__ */
1091-
#endif /* CONFIG_PARAVIRT */
1048+
#else /* CONFIG_PARAVIRT */
1049+
# define default_banner x86_init_noop
1050+
#endif /* !CONFIG_PARAVIRT */
10921051
#endif /* _ASM_X86_PARAVIRT_H */

0 commit comments

Comments
 (0)