* [PATCH] bug in bigsmp CPU bringup
@ 2004-05-06 1:43 Pallipadi, Venkatesh
2004-05-06 2:03 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Pallipadi, Venkatesh @ 2004-05-06 1:43 UTC (permalink / raw)
To: akpm, Linus Torvalds; +Cc: linux-kernel, Nakajima, Jun
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
There is an bug in bigsmp sub-architecture, due to which it will not
enable all the CPUs when the BIOS-APICIDs are not 0 to n-1 (where n is
total number of CPUs). Particularly, only 2 CPU comes up on a system
that has 4 CPUs with BIOS APICID as (0, 1, 6, 7).
The bug is root caused to check_apicid_present(bit) call in smpboot.c,
when bigsmp is expecting apicid in place of bit.
check_apicid_present(bit) in bigsmp subarchitecture checks the bit with
phys_id_present_map (which is actually map representing all apicids and
not bit).
One solution is to change check_apicid_present(bit) to
check_apicid_present(apicid), in smp_boot_cpus(). But, it can affect all
the other subarchitectures in various subtle ways. So, here is a simple
alternate fix (Thanks to Martin Bligh), which solves the above problem.
Please consider for inclusion in 2.6 base.
Thanks,
Venki
[-- Attachment #2: apicid2.patch --]
[-- Type: application/octet-stream, Size: 542 bytes --]
--- linux-2.6.6-rc3-mm1-mod/include/asm-i386/mach-bigsmp/mach_apic.h.org 2004-05-05 19:15:19.000000000 -0700
+++ linux-2.6.6-rc3-mm1-mod/include/asm-i386/mach-bigsmp/mach_apic.h 2004-05-05 19:16:26.000000000 -0700
@@ -45,9 +45,10 @@ static inline unsigned long check_apicid
return 0;
}
+/* we don't use the phys_cpu_present_map to indicate apicid presence */
static inline unsigned long check_apicid_present(int bit)
{
- return physid_isset(bit, phys_cpu_present_map);
+ return 1;
}
#define apicid_cluster(apicid) (apicid & 0xF0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bug in bigsmp CPU bringup
2004-05-06 1:43 [PATCH] bug in bigsmp CPU bringup Pallipadi, Venkatesh
@ 2004-05-06 2:03 ` Andrew Morton
2004-05-06 5:27 ` Martin J. Bligh
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2004-05-06 2:03 UTC (permalink / raw)
To: Pallipadi, Venkatesh
Cc: torvalds, linux-kernel, jun.nakajima, Martin J. Bligh, Brown, Len
Len, Martin: please review?
From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
There is an bug in bigsmp sub-architecture, due to which it will not enable
all the CPUs when the BIOS-APICIDs are not 0 to n-1 (where n is total
number of CPUs). Particularly, only 2 CPU comes up on a system that has 4
CPUs with BIOS APICID as (0, 1, 6, 7).
The bug is root caused to check_apicid_present(bit) call in smpboot.c, when
bigsmp is expecting apicid in place of bit. check_apicid_present(bit) in
bigsmp subarchitecture checks the bit with phys_id_present_map (which is
actually map representing all apicids and not bit).
One solution is to change check_apicid_present(bit) to
check_apicid_present(apicid), in smp_boot_cpus(). But, it can affect all
the other subarchitectures in various subtle ways. So, here is a simple
alternate fix (Thanks to Martin Bligh), which solves the above problem.
---
25-akpm/include/asm-i386/mach-bigsmp/mach_apic.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
diff -puN include/asm-i386/mach-bigsmp/mach_apic.h~bigsmp-cpu-bringup-fix include/asm-i386/mach-bigsmp/mach_apic.h
--- 25/include/asm-i386/mach-bigsmp/mach_apic.h~bigsmp-cpu-bringup-fix 2004-05-05 19:02:18.299905696 -0700
+++ 25-akpm/include/asm-i386/mach-bigsmp/mach_apic.h 2004-05-05 19:02:18.302905240 -0700
@@ -37,9 +37,10 @@ static inline unsigned long check_apicid
return 0;
}
+/* we don't use the phys_cpu_present_map to indicate apicid presence */
static inline unsigned long check_apicid_present(int bit)
{
- return physid_isset(bit, phys_cpu_present_map);
+ return 1;
}
#define apicid_cluster(apicid) (apicid & 0xF0)
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bug in bigsmp CPU bringup
2004-05-06 2:03 ` Andrew Morton
@ 2004-05-06 5:27 ` Martin J. Bligh
0 siblings, 0 replies; 3+ messages in thread
From: Martin J. Bligh @ 2004-05-06 5:27 UTC (permalink / raw)
To: Andrew Morton, Pallipadi, Venkatesh
Cc: torvalds, linux-kernel, jun.nakajima, Brown, Len
> Len, Martin: please review?
Looked already (in fact I suggested he do that). Looks fine, it's
exactly the same fix we use for Summit. Since we're using the other
method instead of the bitmap, this check isn't needed, so we can just
bypass it. This way also has the great advantage of being isolated
to the bigsmp subarch, so it only needs testing there ;-)
Thanks,
M.
> From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
>
> There is an bug in bigsmp sub-architecture, due to which it will not enable
> all the CPUs when the BIOS-APICIDs are not 0 to n-1 (where n is total
> number of CPUs). Particularly, only 2 CPU comes up on a system that has 4
> CPUs with BIOS APICID as (0, 1, 6, 7).
>
> The bug is root caused to check_apicid_present(bit) call in smpboot.c, when
> bigsmp is expecting apicid in place of bit. check_apicid_present(bit) in
> bigsmp subarchitecture checks the bit with phys_id_present_map (which is
> actually map representing all apicids and not bit).
>
> One solution is to change check_apicid_present(bit) to
> check_apicid_present(apicid), in smp_boot_cpus(). But, it can affect all
> the other subarchitectures in various subtle ways. So, here is a simple
> alternate fix (Thanks to Martin Bligh), which solves the above problem.
>
>
> ---
>
> 25-akpm/include/asm-i386/mach-bigsmp/mach_apic.h | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletion(-)
>
> diff -puN include/asm-i386/mach-bigsmp/mach_apic.h~bigsmp-cpu-bringup-fix include/asm-i386/mach-bigsmp/mach_apic.h
> --- 25/include/asm-i386/mach-bigsmp/mach_apic.h~bigsmp-cpu-bringup-fix 2004-05-05 19:02:18.299905696 -0700
> +++ 25-akpm/include/asm-i386/mach-bigsmp/mach_apic.h 2004-05-05 19:02:18.302905240 -0700
> @@ -37,9 +37,10 @@ static inline unsigned long check_apicid
> return 0;
> }
>
> +/* we don't use the phys_cpu_present_map to indicate apicid presence */
> static inline unsigned long check_apicid_present(int bit)
> {
> - return physid_isset(bit, phys_cpu_present_map);
> + return 1;
> }
>
> #define apicid_cluster(apicid) (apicid & 0xF0)
>
> _
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-06 5:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-06 1:43 [PATCH] bug in bigsmp CPU bringup Pallipadi, Venkatesh
2004-05-06 2:03 ` Andrew Morton
2004-05-06 5:27 ` Martin J. Bligh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.