Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100129
b: refs/heads/master
c: 3b33553
h: refs/heads/master
i:
  100127: 90828dc
v: v3
  • Loading branch information
Ingo Molnar committed Jul 10, 2008
1 parent 73601f8 commit d137864
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 520b9617ab4aea764ddfc5d58cae21c16b3318e1
refs/heads/master: 3b33553badcde952adcf3b3ba5faae38d7d85071
11 changes: 11 additions & 0 deletions trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,11 @@ void __init e820_reserve_resources(void)
}
}

/*
* Non-standard memory setup can be specified via this quirk:
*/
char * (*arch_memory_setup_quirk)(void);

char *__init default_machine_specific_memory_setup(void)
{
char *who = "BIOS-e820";
Expand Down Expand Up @@ -1337,6 +1342,12 @@ char *__init default_machine_specific_memory_setup(void)

char *__init __attribute__((weak)) machine_specific_memory_setup(void)
{
if (arch_memory_setup_quirk) {
char *who = arch_memory_setup_quirk();

if (who)
return who;
}
return default_machine_specific_memory_setup();
}

Expand Down
20 changes: 18 additions & 2 deletions trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,23 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)

static struct intel_mp_floating *mpf_found;

/*
* Machine specific quirk for finding the SMP config before other setup
* activities destroy the table:
*/
int (*mach_get_smp_config_quirk)(unsigned int early);

/*
* Scan the memory blocks for an SMP configuration block.
*/
static void __init __get_smp_config(unsigned early)
static void __init __get_smp_config(unsigned int early)
{
struct intel_mp_floating *mpf = mpf_found;

if (mach_get_smp_config_quirk) {
if (mach_get_smp_config_quirk(early))
return;
}
if (acpi_lapic && early)
return;
/*
Expand Down Expand Up @@ -889,10 +899,16 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
return 0;
}

static void __init __find_smp_config(unsigned reserve)
int (*mach_find_smp_config_quirk)(unsigned int reserve);

static void __init __find_smp_config(unsigned int reserve)
{
unsigned int address;

if (mach_find_smp_config_quirk) {
if (mach_find_smp_config_quirk(reserve))
return;
}
/*
* FIXME: Linux assumes you have 640K of base ram..
* this continues the error...
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ void __init setup_arch(char **cmdline_p)
{
#ifdef CONFIG_X86_32
memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
visws_early_detect();
pre_setup_arch_hook();
early_cpu_init();
#else
Expand Down
17 changes: 17 additions & 0 deletions trunk/include/asm-x86/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@
/* Interrupt control for vSMPowered x86_64 systems */
void vsmp_init(void);

#ifdef CONFIG_X86_VISWS
extern void visws_early_detect(void);
#else
static inline void visws_early_detect(void) { }
#endif

/*
* Any setup quirks to be performed?
*/
extern int (*arch_time_init_quirk)(void);
extern int (*arch_pre_intr_init_quirk)(void);
extern int (*arch_intr_init_quirk)(void);
extern int (*arch_trap_init_quirk)(void);
extern char * (*arch_memory_setup_quirk)(void);
extern int (*mach_get_smp_config_quirk)(unsigned int early);
extern int (*mach_find_smp_config_quirk)(unsigned int reserve);

#ifndef CONFIG_PARAVIRT
#define paravirt_post_allocator_init() do {} while (0)
#endif
Expand Down

0 comments on commit d137864

Please sign in to comment.