Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 boot updates from Ingo Molnar: "The main x86 bootup related changes in this cycle were: - more boot time optimizations. (Len Brown) - implement hex output to allow the debugging of early bootup parameters. (Kees Cook) - remove obsolete MCA leftovers. (Paolo Pisati)" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/smpboot: Remove APIC.wait_for_init_deassert and atomic init_deasserted x86/smpboot: Remove SIPI delays from cpu_up() x86/smpboot: Remove udelay(100) when polling cpu_callin_map x86/smpboot: Remove udelay(100) when polling cpu_initialized_map x86/boot: Obsolete the MCA sys_desc_table x86/boot: Add hex output for debugging
This commit is contained in:
commit
11e612ddb4
@ -17,7 +17,8 @@ Offset Proto Name Meaning
|
|||||||
(struct ist_info)
|
(struct ist_info)
|
||||||
080/010 ALL hd0_info hd0 disk parameter, OBSOLETE!!
|
080/010 ALL hd0_info hd0 disk parameter, OBSOLETE!!
|
||||||
090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!!
|
090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!!
|
||||||
0A0/010 ALL sys_desc_table System description table (struct sys_desc_table)
|
0A0/010 ALL sys_desc_table System description table (struct sys_desc_table),
|
||||||
|
OBSOLETE!!
|
||||||
0B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends
|
0B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends
|
||||||
0C0/004 ALL ext_ramdisk_image ramdisk_image high 32bits
|
0C0/004 ALL ext_ramdisk_image ramdisk_image high 32bits
|
||||||
0C4/004 ALL ext_ramdisk_size ramdisk_size high 32bits
|
0C4/004 ALL ext_ramdisk_size ramdisk_size high 32bits
|
||||||
|
@ -23,7 +23,7 @@ targets += fdimage fdimage144 fdimage288 image.iso mtools.conf
|
|||||||
subdir- := compressed
|
subdir- := compressed
|
||||||
|
|
||||||
setup-y += a20.o bioscall.o cmdline.o copy.o cpu.o cpuflags.o cpucheck.o
|
setup-y += a20.o bioscall.o cmdline.o copy.o cpu.o cpuflags.o cpucheck.o
|
||||||
setup-y += early_serial_console.o edd.o header.o main.o mca.o memory.o
|
setup-y += early_serial_console.o edd.o header.o main.o memory.o
|
||||||
setup-y += pm.o pmjump.o printf.o regs.o string.o tty.o video.o
|
setup-y += pm.o pmjump.o printf.o regs.o string.o tty.o video.o
|
||||||
setup-y += video-mode.o version.o
|
setup-y += video-mode.o version.o
|
||||||
setup-$(CONFIG_X86_APM_BOOT) += apm.o
|
setup-$(CONFIG_X86_APM_BOOT) += apm.o
|
||||||
|
@ -307,9 +307,6 @@ void query_edd(void);
|
|||||||
/* header.S */
|
/* header.S */
|
||||||
void __attribute__((noreturn)) die(void);
|
void __attribute__((noreturn)) die(void);
|
||||||
|
|
||||||
/* mca.c */
|
|
||||||
int query_mca(void);
|
|
||||||
|
|
||||||
/* memory.c */
|
/* memory.c */
|
||||||
int detect_memory(void);
|
int detect_memory(void);
|
||||||
|
|
||||||
|
@ -1041,7 +1041,6 @@ void setup_graphics(struct boot_params *boot_params)
|
|||||||
struct boot_params *make_boot_params(struct efi_config *c)
|
struct boot_params *make_boot_params(struct efi_config *c)
|
||||||
{
|
{
|
||||||
struct boot_params *boot_params;
|
struct boot_params *boot_params;
|
||||||
struct sys_desc_table *sdt;
|
|
||||||
struct apm_bios_info *bi;
|
struct apm_bios_info *bi;
|
||||||
struct setup_header *hdr;
|
struct setup_header *hdr;
|
||||||
struct efi_info *efi;
|
struct efi_info *efi;
|
||||||
@ -1089,7 +1088,6 @@ struct boot_params *make_boot_params(struct efi_config *c)
|
|||||||
hdr = &boot_params->hdr;
|
hdr = &boot_params->hdr;
|
||||||
efi = &boot_params->efi_info;
|
efi = &boot_params->efi_info;
|
||||||
bi = &boot_params->apm_bios_info;
|
bi = &boot_params->apm_bios_info;
|
||||||
sdt = &boot_params->sys_desc_table;
|
|
||||||
|
|
||||||
/* Copy the second sector to boot_params */
|
/* Copy the second sector to boot_params */
|
||||||
memcpy(&hdr->jump, image->image_base + 512, 512);
|
memcpy(&hdr->jump, image->image_base + 512, 512);
|
||||||
@ -1118,8 +1116,6 @@ struct boot_params *make_boot_params(struct efi_config *c)
|
|||||||
/* Clear APM BIOS info */
|
/* Clear APM BIOS info */
|
||||||
memset(bi, 0, sizeof(*bi));
|
memset(bi, 0, sizeof(*bi));
|
||||||
|
|
||||||
memset(sdt, 0, sizeof(*sdt));
|
|
||||||
|
|
||||||
status = efi_parse_options(cmdline_ptr);
|
status = efi_parse_options(cmdline_ptr);
|
||||||
if (status != EFI_SUCCESS)
|
if (status != EFI_SUCCESS)
|
||||||
goto fail2;
|
goto fail2;
|
||||||
|
@ -220,6 +220,23 @@ void __putstr(const char *s)
|
|||||||
outb(0xff & (pos >> 1), vidport+1);
|
outb(0xff & (pos >> 1), vidport+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __puthex(unsigned long value)
|
||||||
|
{
|
||||||
|
char alpha[2] = "0";
|
||||||
|
int bits;
|
||||||
|
|
||||||
|
for (bits = sizeof(value) * 8 - 4; bits >= 0; bits -= 4) {
|
||||||
|
unsigned long digit = (value >> bits) & 0xf;
|
||||||
|
|
||||||
|
if (digit < 0xA)
|
||||||
|
alpha[0] = '0' + digit;
|
||||||
|
else
|
||||||
|
alpha[0] = 'a' + (digit - 0xA);
|
||||||
|
|
||||||
|
__putstr(alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void error(char *x)
|
static void error(char *x)
|
||||||
{
|
{
|
||||||
error_putstr("\n\n");
|
error_putstr("\n\n");
|
||||||
@ -399,6 +416,13 @@ asmlinkage __visible void *decompress_kernel(void *rmode, memptr heap,
|
|||||||
free_mem_ptr = heap; /* Heap */
|
free_mem_ptr = heap; /* Heap */
|
||||||
free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
|
free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
|
||||||
|
|
||||||
|
/* Report initial kernel position details. */
|
||||||
|
debug_putaddr(input_data);
|
||||||
|
debug_putaddr(input_len);
|
||||||
|
debug_putaddr(output);
|
||||||
|
debug_putaddr(output_len);
|
||||||
|
debug_putaddr(run_size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The memory hole needed for the kernel is the larger of either
|
* The memory hole needed for the kernel is the larger of either
|
||||||
* the entire decompressed kernel plus relocation table, or the
|
* the entire decompressed kernel plus relocation table, or the
|
||||||
|
@ -34,16 +34,27 @@ extern memptr free_mem_ptr;
|
|||||||
extern memptr free_mem_end_ptr;
|
extern memptr free_mem_end_ptr;
|
||||||
extern struct boot_params *real_mode; /* Pointer to real-mode data */
|
extern struct boot_params *real_mode; /* Pointer to real-mode data */
|
||||||
void __putstr(const char *s);
|
void __putstr(const char *s);
|
||||||
|
void __puthex(unsigned long value);
|
||||||
#define error_putstr(__x) __putstr(__x)
|
#define error_putstr(__x) __putstr(__x)
|
||||||
|
#define error_puthex(__x) __puthex(__x)
|
||||||
|
|
||||||
#ifdef CONFIG_X86_VERBOSE_BOOTUP
|
#ifdef CONFIG_X86_VERBOSE_BOOTUP
|
||||||
|
|
||||||
#define debug_putstr(__x) __putstr(__x)
|
#define debug_putstr(__x) __putstr(__x)
|
||||||
|
#define debug_puthex(__x) __puthex(__x)
|
||||||
|
#define debug_putaddr(__x) { \
|
||||||
|
debug_putstr(#__x ": 0x"); \
|
||||||
|
debug_puthex((unsigned long)(__x)); \
|
||||||
|
debug_putstr("\n"); \
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline void debug_putstr(const char *s)
|
static inline void debug_putstr(const char *s)
|
||||||
{ }
|
{ }
|
||||||
|
static inline void debug_puthex(const char *s)
|
||||||
|
{ }
|
||||||
|
#define debug_putaddr(x) /* */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -161,9 +161,6 @@ void main(void)
|
|||||||
/* Set keyboard repeat rate (why?) and query the lock flags */
|
/* Set keyboard repeat rate (why?) and query the lock flags */
|
||||||
keyboard_init();
|
keyboard_init();
|
||||||
|
|
||||||
/* Query MCA information */
|
|
||||||
query_mca();
|
|
||||||
|
|
||||||
/* Query Intel SpeedStep (IST) information */
|
/* Query Intel SpeedStep (IST) information */
|
||||||
query_ist();
|
query_ist();
|
||||||
|
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
/* -*- linux-c -*- ------------------------------------------------------- *
|
|
||||||
*
|
|
||||||
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
||||||
* Copyright 2007 rPath, Inc. - All Rights Reserved
|
|
||||||
* Copyright 2009 Intel Corporation; author H. Peter Anvin
|
|
||||||
*
|
|
||||||
* This file is part of the Linux kernel, and is made available under
|
|
||||||
* the terms of the GNU General Public License version 2.
|
|
||||||
*
|
|
||||||
* ----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the MCA system description table
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "boot.h"
|
|
||||||
|
|
||||||
int query_mca(void)
|
|
||||||
{
|
|
||||||
struct biosregs ireg, oreg;
|
|
||||||
u16 len;
|
|
||||||
|
|
||||||
initregs(&ireg);
|
|
||||||
ireg.ah = 0xc0;
|
|
||||||
intcall(0x15, &ireg, &oreg);
|
|
||||||
|
|
||||||
if (oreg.eflags & X86_EFLAGS_CF)
|
|
||||||
return -1; /* No MCA present */
|
|
||||||
|
|
||||||
set_fs(oreg.es);
|
|
||||||
len = rdfs16(oreg.bx);
|
|
||||||
|
|
||||||
if (len > sizeof(boot_params.sys_desc_table))
|
|
||||||
len = sizeof(boot_params.sys_desc_table);
|
|
||||||
|
|
||||||
copy_from_fs(&boot_params.sys_desc_table, oreg.bx, len);
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -313,7 +313,6 @@ struct apic {
|
|||||||
/* wakeup_secondary_cpu */
|
/* wakeup_secondary_cpu */
|
||||||
int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
|
int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
|
||||||
|
|
||||||
bool wait_for_init_deassert;
|
|
||||||
void (*inquire_remote_apic)(int apicid);
|
void (*inquire_remote_apic)(int apicid);
|
||||||
|
|
||||||
/* apic ops */
|
/* apic ops */
|
||||||
@ -378,7 +377,6 @@ extern struct apic *__apicdrivers[], *__apicdrivers_end[];
|
|||||||
* APIC functionality to boot other CPUs - only used on SMP:
|
* APIC functionality to boot other CPUs - only used on SMP:
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
extern atomic_t init_deasserted;
|
|
||||||
extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
|
extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -645,14 +645,6 @@ static inline void update_debugctlmsr(unsigned long debugctlmsr)
|
|||||||
|
|
||||||
extern void set_task_blockstep(struct task_struct *task, bool on);
|
extern void set_task_blockstep(struct task_struct *task, bool on);
|
||||||
|
|
||||||
/*
|
|
||||||
* from system description table in BIOS. Mostly for MCA use, but
|
|
||||||
* others may find it useful:
|
|
||||||
*/
|
|
||||||
extern unsigned int machine_id;
|
|
||||||
extern unsigned int machine_submodel_id;
|
|
||||||
extern unsigned int BIOS_revision;
|
|
||||||
|
|
||||||
/* Boot loader type from the setup header: */
|
/* Boot loader type from the setup header: */
|
||||||
extern int bootloader_type;
|
extern int bootloader_type;
|
||||||
extern int bootloader_version;
|
extern int bootloader_version;
|
||||||
|
@ -120,7 +120,7 @@ struct boot_params {
|
|||||||
__u8 _pad3[16]; /* 0x070 */
|
__u8 _pad3[16]; /* 0x070 */
|
||||||
__u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
|
__u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
|
||||||
__u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
|
__u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
|
||||||
struct sys_desc_table sys_desc_table; /* 0x0a0 */
|
struct sys_desc_table sys_desc_table; /* obsolete! */ /* 0x0a0 */
|
||||||
struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */
|
struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */
|
||||||
__u32 ext_ramdisk_image; /* 0x0c0 */
|
__u32 ext_ramdisk_image; /* 0x0c0 */
|
||||||
__u32 ext_ramdisk_size; /* 0x0c4 */
|
__u32 ext_ramdisk_size; /* 0x0c4 */
|
||||||
|
@ -191,7 +191,6 @@ static struct apic apic_flat = {
|
|||||||
.send_IPI_all = flat_send_IPI_all,
|
.send_IPI_all = flat_send_IPI_all,
|
||||||
.send_IPI_self = apic_send_IPI_self,
|
.send_IPI_self = apic_send_IPI_self,
|
||||||
|
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
||||||
.read = native_apic_mem_read,
|
.read = native_apic_mem_read,
|
||||||
@ -299,7 +298,6 @@ static struct apic apic_physflat = {
|
|||||||
.send_IPI_all = physflat_send_IPI_all,
|
.send_IPI_all = physflat_send_IPI_all,
|
||||||
.send_IPI_self = apic_send_IPI_self,
|
.send_IPI_self = apic_send_IPI_self,
|
||||||
|
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
||||||
.read = native_apic_mem_read,
|
.read = native_apic_mem_read,
|
||||||
|
@ -152,7 +152,6 @@ struct apic apic_noop = {
|
|||||||
|
|
||||||
.wakeup_secondary_cpu = noop_wakeup_secondary_cpu,
|
.wakeup_secondary_cpu = noop_wakeup_secondary_cpu,
|
||||||
|
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
||||||
.read = noop_apic_read,
|
.read = noop_apic_read,
|
||||||
|
@ -92,7 +92,6 @@ static int numachip_wakeup_secondary(int phys_apicid, unsigned long start_rip)
|
|||||||
|
|
||||||
write_lcsr(CSR_G3_EXT_IRQ_GEN, int_gen.v);
|
write_lcsr(CSR_G3_EXT_IRQ_GEN, int_gen.v);
|
||||||
|
|
||||||
atomic_set(&init_deasserted, 1);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +234,6 @@ static const struct apic apic_numachip __refconst = {
|
|||||||
.send_IPI_self = numachip_send_IPI_self,
|
.send_IPI_self = numachip_send_IPI_self,
|
||||||
|
|
||||||
.wakeup_secondary_cpu = numachip_wakeup_secondary,
|
.wakeup_secondary_cpu = numachip_wakeup_secondary,
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = NULL, /* REMRD not supported */
|
.inquire_remote_apic = NULL, /* REMRD not supported */
|
||||||
|
|
||||||
.read = native_apic_mem_read,
|
.read = native_apic_mem_read,
|
||||||
|
@ -186,7 +186,6 @@ static struct apic apic_bigsmp = {
|
|||||||
.send_IPI_all = bigsmp_send_IPI_all,
|
.send_IPI_all = bigsmp_send_IPI_all,
|
||||||
.send_IPI_self = default_send_IPI_self,
|
.send_IPI_self = default_send_IPI_self,
|
||||||
|
|
||||||
.wait_for_init_deassert = true,
|
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
||||||
.read = native_apic_mem_read,
|
.read = native_apic_mem_read,
|
||||||
|
@ -111,7 +111,6 @@ static struct apic apic_default = {
|
|||||||
.send_IPI_all = default_send_IPI_all,
|
.send_IPI_all = default_send_IPI_all,
|
||||||
.send_IPI_self = default_send_IPI_self,
|
.send_IPI_self = default_send_IPI_self,
|
||||||
|
|
||||||
.wait_for_init_deassert = true,
|
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
||||||
.read = native_apic_mem_read,
|
.read = native_apic_mem_read,
|
||||||
|
@ -272,7 +272,6 @@ static struct apic apic_x2apic_cluster = {
|
|||||||
.send_IPI_all = x2apic_send_IPI_all,
|
.send_IPI_all = x2apic_send_IPI_all,
|
||||||
.send_IPI_self = x2apic_send_IPI_self,
|
.send_IPI_self = x2apic_send_IPI_self,
|
||||||
|
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
||||||
.read = native_apic_msr_read,
|
.read = native_apic_msr_read,
|
||||||
|
@ -128,7 +128,6 @@ static struct apic apic_x2apic_phys = {
|
|||||||
.send_IPI_all = x2apic_send_IPI_all,
|
.send_IPI_all = x2apic_send_IPI_all,
|
||||||
.send_IPI_self = x2apic_send_IPI_self,
|
.send_IPI_self = x2apic_send_IPI_self,
|
||||||
|
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
||||||
.read = native_apic_msr_read,
|
.read = native_apic_msr_read,
|
||||||
|
@ -248,7 +248,6 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
|
|||||||
APIC_DM_STARTUP;
|
APIC_DM_STARTUP;
|
||||||
uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
|
uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
|
||||||
|
|
||||||
atomic_set(&init_deasserted, 1);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +413,6 @@ static struct apic __refdata apic_x2apic_uv_x = {
|
|||||||
.send_IPI_self = uv_send_IPI_self,
|
.send_IPI_self = uv_send_IPI_self,
|
||||||
|
|
||||||
.wakeup_secondary_cpu = uv_wakeup_secondary,
|
.wakeup_secondary_cpu = uv_wakeup_secondary,
|
||||||
.wait_for_init_deassert = false,
|
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
||||||
.read = native_apic_msr_read,
|
.read = native_apic_msr_read,
|
||||||
|
@ -223,9 +223,6 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
|
|||||||
memset(¶ms->hd0_info, 0, sizeof(params->hd0_info));
|
memset(¶ms->hd0_info, 0, sizeof(params->hd0_info));
|
||||||
memset(¶ms->hd1_info, 0, sizeof(params->hd1_info));
|
memset(¶ms->hd1_info, 0, sizeof(params->hd1_info));
|
||||||
|
|
||||||
/* Default sysdesc table */
|
|
||||||
params->sys_desc_table.length = 0;
|
|
||||||
|
|
||||||
if (image->type == KEXEC_TYPE_CRASH) {
|
if (image->type == KEXEC_TYPE_CRASH) {
|
||||||
ret = crash_setup_memmap_entries(image, params);
|
ret = crash_setup_memmap_entries(image, params);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -916,11 +916,6 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
apm_info.bios = boot_params.apm_bios_info;
|
apm_info.bios = boot_params.apm_bios_info;
|
||||||
ist_info = boot_params.ist_info;
|
ist_info = boot_params.ist_info;
|
||||||
if (boot_params.sys_desc_table.length != 0) {
|
|
||||||
machine_id = boot_params.sys_desc_table.table[0];
|
|
||||||
machine_submodel_id = boot_params.sys_desc_table.table[1];
|
|
||||||
BIOS_revision = boot_params.sys_desc_table.table[2];
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
saved_video_mode = boot_params.hdr.vid_mode;
|
saved_video_mode = boot_params.hdr.vid_mode;
|
||||||
bootloader_type = boot_params.hdr.type_of_loader;
|
bootloader_type = boot_params.hdr.type_of_loader;
|
||||||
|
@ -97,8 +97,6 @@ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
|
|||||||
DEFINE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info);
|
DEFINE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info);
|
||||||
EXPORT_PER_CPU_SYMBOL(cpu_info);
|
EXPORT_PER_CPU_SYMBOL(cpu_info);
|
||||||
|
|
||||||
atomic_t init_deasserted;
|
|
||||||
|
|
||||||
static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
@ -146,16 +144,11 @@ static void smp_callin(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If waken up by an INIT in an 82489DX configuration
|
* If waken up by an INIT in an 82489DX configuration
|
||||||
* we may get here before an INIT-deassert IPI reaches
|
* cpu_callout_mask guarantees we don't get here before
|
||||||
* our local APIC. We have to wait for the IPI or we'll
|
* an INIT_deassert IPI reaches our local APIC, so it is
|
||||||
* lock up on an APIC access.
|
* now safe to touch our local APIC.
|
||||||
*
|
|
||||||
* Since CPU0 is not wakened up by INIT, it doesn't wait for the IPI.
|
|
||||||
*/
|
*/
|
||||||
cpuid = smp_processor_id();
|
cpuid = smp_processor_id();
|
||||||
if (apic->wait_for_init_deassert && cpuid)
|
|
||||||
while (!atomic_read(&init_deasserted))
|
|
||||||
cpu_relax();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (This works even if the APIC is not enabled.)
|
* (This works even if the APIC is not enabled.)
|
||||||
@ -620,7 +613,6 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
|
|||||||
send_status = safe_apic_wait_icr_idle();
|
send_status = safe_apic_wait_icr_idle();
|
||||||
|
|
||||||
mb();
|
mb();
|
||||||
atomic_set(&init_deasserted, 1);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Should we send STARTUP IPIs ?
|
* Should we send STARTUP IPIs ?
|
||||||
@ -665,6 +657,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
|
|||||||
/*
|
/*
|
||||||
* Give the other CPU some time to accept the IPI.
|
* Give the other CPU some time to accept the IPI.
|
||||||
*/
|
*/
|
||||||
|
if (init_udelay)
|
||||||
udelay(300);
|
udelay(300);
|
||||||
|
|
||||||
pr_debug("Startup point 1\n");
|
pr_debug("Startup point 1\n");
|
||||||
@ -675,6 +668,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
|
|||||||
/*
|
/*
|
||||||
* Give the other CPU some time to accept the IPI.
|
* Give the other CPU some time to accept the IPI.
|
||||||
*/
|
*/
|
||||||
|
if (init_udelay)
|
||||||
udelay(200);
|
udelay(200);
|
||||||
|
|
||||||
if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
|
if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
|
||||||
@ -859,8 +853,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
|||||||
* the targeted processor.
|
* the targeted processor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
atomic_set(&init_deasserted, 0);
|
|
||||||
|
|
||||||
if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
|
if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
|
||||||
|
|
||||||
pr_debug("Setting warm reset code and vector.\n");
|
pr_debug("Setting warm reset code and vector.\n");
|
||||||
@ -898,7 +890,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
|||||||
|
|
||||||
if (!boot_error) {
|
if (!boot_error) {
|
||||||
/*
|
/*
|
||||||
* Wait 10s total for a response from AP
|
* Wait 10s total for first sign of life from AP
|
||||||
*/
|
*/
|
||||||
boot_error = -1;
|
boot_error = -1;
|
||||||
timeout = jiffies + 10*HZ;
|
timeout = jiffies + 10*HZ;
|
||||||
@ -911,7 +903,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
|||||||
boot_error = 0;
|
boot_error = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
udelay(100);
|
|
||||||
schedule();
|
schedule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -927,7 +918,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
|
|||||||
* for the MTRR work(triggered by the AP coming online)
|
* for the MTRR work(triggered by the AP coming online)
|
||||||
* to be completed in the stop machine context.
|
* to be completed in the stop machine context.
|
||||||
*/
|
*/
|
||||||
udelay(100);
|
|
||||||
schedule();
|
schedule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user