Bugzilla – Attachment 49926 Details for
Bug 117025
SLES 9 SP2 does not boot 16P (8 x dual core)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
patch to allow 16P booting
ext_apic_id.patch (text/x-patch), 3.53 KB, created by
rau@pantasys.com
on 2005-09-14 17:00:46 UTC
(
hide
)
Description:
patch to allow 16P booting
Filename:
MIME Type:
Creator:
rau@pantasys.com
Created:
2005-09-14 17:00:46 UTC
Size:
3.53 KB
patch
obsolete
>diff -rup kotd-sles9/arch/x86_64/kernel/genapic.c kotd-sles9-patched/arch/x86_64/kernel/genapic.c >--- kotd-sles9/arch/x86_64/kernel/genapic.c 2005-09-12 05:32:45.000000000 -0700 >+++ kotd-sles9-patched/arch/x86_64/kernel/genapic.c 2005-09-12 17:07:14.000000000 -0700 >@@ -33,6 +33,7 @@ u8 x86_cpu_to_log_apicid[NR_CPUS] = { [0 > > extern struct genapic apic_cluster; > extern struct genapic apic_flat; >+extern struct genapic apic_physflat; > > struct genapic *genapic = &apic_flat; > >@@ -46,12 +47,7 @@ void __init clustered_apic_check(void) > u8 clusters, max_cluster; > u8 id; > u8 cluster_cnt[NUM_APIC_CLUSTERS]; >- >- if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) { >- /* AMD always uses flat mode right now */ >- genapic = &apic_flat; >- goto print; >- } >+ int num_cpus = 0; > > #if defined(CONFIG_ACPI_BUS) > /* >@@ -75,10 +71,21 @@ void __init clustered_apic_check(void) > #endif > memset(cluster_cnt, 0, sizeof(cluster_cnt)); > >+ /* Count how many CPUs the BIOS told us about, but not >+ more than what the user specified */ >+ > for (i = 0; i < NR_CPUS; i++) { > id = bios_cpu_apicid[i]; >- if (id != BAD_APICID) >- cluster_cnt[APIC_CLUSTERID(id)]++; >+ if (id == BAD_APICID) >+ continue; >+ cluster_cnt[APIC_CLUSTERID(id)]++; >+ num_cpus++; >+ } >+ >+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) { >+ genapic = num_cpus > 8 ? &apic_physflat : &apic_flat; >+ goto print; >+ > } > > clusters = 0; >diff -rup kotd-sles9/arch/x86_64/kernel/genapic_flat.c kotd-sles9-patched/arch/x86_64/kernel/genapic_flat.c >--- kotd-sles9/arch/x86_64/kernel/genapic_flat.c 2005-09-12 05:32:35.000000000 -0700 >+++ kotd-sles9-patched/arch/x86_64/kernel/genapic_flat.c 2005-09-12 17:07:35.000000000 -0700 >@@ -2,7 +2,7 @@ > * Copyright 2004 James Cleverdon, IBM. > * Subject to the GNU Public License, v.2 > * >- * Flat APIC subarch code. Maximum 8 CPUs, logical delivery. >+ * Flat APIC subarch code. Logical delivery. > * > * Hacked for x86-64 by James Cleverdon from i386 architecture code by > * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and >@@ -117,3 +117,50 @@ struct genapic apic_flat = { > .send_IPI_mask = flat_send_IPI_mask, > .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, > }; >+ >+/* >+ * Physflat mode is used when there are more than 8 CPUs on a AMD system. >+ * We cannot use logical delivery in this case because the mask >+ * overflows, so use physical mode. >+ */ >+ >+static cpumask_t physflat_target_cpus(void) >+{ >+ return cpumask_of_cpu(0); >+} >+ >+static void physflat_send_IPI_mask(cpumask_t cpumask, int vector) >+{ >+ send_IPI_mask_sequence(cpumask, vector); >+} >+ >+static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask) >+{ >+ int cpu; >+ >+ /* >+ * We're using fixed IRQ delivery, can only return one phys APIC ID. >+ * May as well be the first. >+ */ >+ cpu = first_cpu(cpumask); >+ if ((unsigned)cpu < NR_CPUS) >+ return x86_cpu_to_apicid[cpu]; >+ else >+ return BAD_APICID; >+} >+ >+struct genapic apic_physflat = { >+ .name = "physical flat", >+ .int_delivery_mode = dest_LowestPrio, >+ .int_dest_mode = (APIC_DEST_PHYSICAL != 0), >+ .int_delivery_dest = APIC_DEST_PHYSICAL | APIC_DM_LOWEST, >+ .target_cpus = physflat_target_cpus, >+ .apic_id_registered = flat_apic_id_registered, >+ .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/ >+ .send_IPI_all = flat_send_IPI_all, >+ .send_IPI_allbutself = flat_send_IPI_allbutself, >+ .send_IPI_mask = physflat_send_IPI_mask, >+ .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid, >+}; >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 117025
: 49926