diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2001-02-23 18:26:08 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2001-02-23 18:26:08 +0000 |
commit | 2060e51b70b74b427b64be96552aa869eb265058 (patch) | |
tree | 33092e080510c91fbaf27b7b98da1b25b620da0b /arch/mips64 | |
parent | f4ec799cbca6f6efb8fce24ebac99cc623744bed (diff) |
Put in a way to tweak the maximum number of cpus activated during SMP
bootup. Unfortunately, this can not be done be kernel command line
option, since the options are parsed *after* the bootup.
Diffstat (limited to 'arch/mips64')
-rw-r--r-- | arch/mips64/sgi-ip27/ip27-init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-init.c b/arch/mips64/sgi-ip27/ip27-init.c index c103969f3..0aae67a69 100644 --- a/arch/mips64/sgi-ip27/ip27-init.c +++ b/arch/mips64/sgi-ip27/ip27-init.c @@ -89,9 +89,13 @@ nasid_t get_actual_nasid(lboard_t *brd) return brd->brd_nasid; } +/* Tweak this for maximum number of CPUs to activate */ +static int max_cpus = NR_CPUS; + int do_cpumask(cnodeid_t cnode, nasid_t nasid, cpumask_t *boot_cpumask, int *highest) { + static int tot_cpus_found = 0; lboard_t *brd; klcpu_t *acpu; int cpus_found = 0; @@ -109,9 +113,11 @@ int do_cpumask(cnodeid_t cnode, nasid_t nasid, cpumask_t *boot_cpumask, if (cpuid > *highest) *highest = cpuid; /* Only let it join in if it's marked enabled */ - if (acpu->cpu_info.flags & KLINFO_ENABLE) { + if ((acpu->cpu_info.flags & KLINFO_ENABLE) && + (tot_cpus_found != max_cpus)) { CPUMASK_SETB(*boot_cpumask, cpuid); cpus_found++; + tot_cpus_found++; } acpu = (klcpu_t *)find_component(brd, (klinfo_t *)acpu, KLSTRUCT_CPU); |