* [PATCH] x86: do_boot_cpu - add check if we have ESR register
@ 2008-09-22 9:36 Cyrill Gorcunov
2008-09-22 9:51 ` Cyrill Gorcunov
0 siblings, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2008-09-22 9:36 UTC (permalink / raw)
To: Ingo Molnar, Yinghai Lu; +Cc: Maciej W. Rozycki, LKML
We should touch ESR register if only we have one.
Check its presence first.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
CC: Yinghai Lu <yhlu.kernel@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/smpboot.c 2008-09-18 19:17:16.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/smpboot.c 2008-09-22 13:30:36.000000000 +0400
@@ -893,8 +893,10 @@ do_rest:
/*
* Be paranoid about clearing APIC errors.
*/
- apic_write(APIC_ESR, 0);
- apic_read(APIC_ESR);
+ if (APIC_INTEGRATED(apic_version[phys_apicid])) {
+ apic_write(APIC_ESR, 0);
+ apic_read(APIC_ESR);
+ }
}
/*
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 9:36 [PATCH] x86: do_boot_cpu - add check if we have ESR register Cyrill Gorcunov
@ 2008-09-22 9:51 ` Cyrill Gorcunov
2008-09-22 9:57 ` Yinghai Lu
0 siblings, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2008-09-22 9:51 UTC (permalink / raw)
To: Ingo Molnar, Yinghai Lu, Maciej W. Rozycki, LKML
[Cyrill Gorcunov - Mon, Sep 22, 2008 at 01:36:03PM +0400]
| We should touch ESR register if only we have one.
| Check its presence first.
|
| Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| CC: Yinghai Lu <yhlu.kernel@gmail.com>
| ---
|
| Index: linux-2.6.git/arch/x86/kernel/smpboot.c
| ===================================================================
| --- linux-2.6.git.orig/arch/x86/kernel/smpboot.c 2008-09-18 19:17:16.000000000 +0400
| +++ linux-2.6.git/arch/x86/kernel/smpboot.c 2008-09-22 13:30:36.000000000 +0400
| @@ -893,8 +893,10 @@ do_rest:
| /*
| * Be paranoid about clearing APIC errors.
| */
| - apic_write(APIC_ESR, 0);
| - apic_read(APIC_ESR);
| + if (APIC_INTEGRATED(apic_version[phys_apicid])) {
| + apic_write(APIC_ESR, 0);
| + apic_read(APIC_ESR);
| + }
| }
|
| /*
Actually it's resend of the patch. On previous attempt
Yinghai was proposed to choose:
> one apic_version or boot_cpu_apic_version could be enough
but I think it should be different patch which does cleaning
up variables usage. So for now I think _this_ patch is enough
since idea is to prevent of touching nonexistant register rather
code cleaning (whci could be done later).
Yinghai?
- Cyrill -
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 9:51 ` Cyrill Gorcunov
@ 2008-09-22 9:57 ` Yinghai Lu
2008-09-22 10:00 ` Ingo Molnar
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Yinghai Lu @ 2008-09-22 9:57 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: Ingo Molnar, Maciej W. Rozycki, LKML
>
> Actually it's resend of the patch. On previous attempt
> Yinghai was proposed to choose:
>
>> one apic_version or boot_cpu_apic_version could be enough
>
> but I think it should be different patch which does cleaning
> up variables usage. So for now I think _this_ patch is enough
> since idea is to prevent of touching nonexistant register rather
> code cleaning (whci could be done later).
do we have systems that have mixed cpu supported with different apic version?
YH
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 9:57 ` Yinghai Lu
@ 2008-09-22 10:00 ` Ingo Molnar
2008-09-22 10:04 ` Cyrill Gorcunov
2008-09-22 10:15 ` Cyrill Gorcunov
2 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2008-09-22 10:00 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Cyrill Gorcunov, Maciej W. Rozycki, LKML
* Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> > Actually it's resend of the patch. On previous attempt Yinghai was
> > proposed to choose:
> >
> >> one apic_version or boot_cpu_apic_version could be enough
> >
> > but I think it should be different patch which does cleaning up
> > variables usage. So for now I think _this_ patch is enough since
> > idea is to prevent of touching nonexistant register rather code
> > cleaning (whci could be done later).
>
> do we have systems that have mixed cpu supported with different apic
> version?
i dont think that ever happened in the past. Vendors have trouble
keeping same-cpu type systems going ;-)
OTOH, if it's simple to have multi-version support then lets do that
throughout. (although we certainly cannot test it. Perhaps we can
provoke it artificially via a hack that artificially degrades one cpu's
apic version or so.)
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 9:57 ` Yinghai Lu
2008-09-22 10:00 ` Ingo Molnar
@ 2008-09-22 10:04 ` Cyrill Gorcunov
2008-09-22 10:15 ` Cyrill Gorcunov
2 siblings, 0 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2008-09-22 10:04 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Ingo Molnar, Maciej W. Rozycki, LKML
[Yinghai Lu - Mon, Sep 22, 2008 at 02:57:17AM -0700]
| >
| > Actually it's resend of the patch. On previous attempt
| > Yinghai was proposed to choose:
| >
| >> one apic_version or boot_cpu_apic_version could be enough
| >
| > but I think it should be different patch which does cleaning
| > up variables usage. So for now I think _this_ patch is enough
| > since idea is to prevent of touching nonexistant register rather
| > code cleaning (whci could be done later).
|
| do we have systems that have mixed cpu supported with different apic version?
|
| YH
|
I don't think it's possible on a single motherboard. For integrated
apics it will require different families of cpu.
- Cyrill -
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 9:57 ` Yinghai Lu
2008-09-22 10:00 ` Ingo Molnar
2008-09-22 10:04 ` Cyrill Gorcunov
@ 2008-09-22 10:15 ` Cyrill Gorcunov
2008-09-22 18:37 ` Yinghai Lu
2 siblings, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2008-09-22 10:15 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Ingo Molnar, Maciej W. Rozycki, LKML
[Yinghai Lu - Mon, Sep 22, 2008 at 02:57:17AM -0700]
| >
| > Actually it's resend of the patch. On previous attempt
| > Yinghai was proposed to choose:
| >
| >> one apic_version or boot_cpu_apic_version could be enough
| >
| > but I think it should be different patch which does cleaning
| > up variables usage. So for now I think _this_ patch is enough
| > since idea is to prevent of touching nonexistant register rather
| > code cleaning (whci could be done later).
|
| do we have systems that have mixed cpu supported with different apic version?
|
| YH
|
Yinghai what was the reason of this question? I've a suspicious
you're planning to test apic version early and only _once_ so
eliminating APIC_INTERGRATED call? Am I right?
- Cyrill -
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 10:15 ` Cyrill Gorcunov
@ 2008-09-22 18:37 ` Yinghai Lu
2008-09-22 19:21 ` Cyrill Gorcunov
0 siblings, 1 reply; 8+ messages in thread
From: Yinghai Lu @ 2008-09-22 18:37 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: Ingo Molnar, Maciej W. Rozycki, LKML
On Mon, Sep 22, 2008 at 3:15 AM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> [Yinghai Lu - Mon, Sep 22, 2008 at 02:57:17AM -0700]
> | >
> | > Actually it's resend of the patch. On previous attempt
> | > Yinghai was proposed to choose:
> | >
> | >> one apic_version or boot_cpu_apic_version could be enough
> | >
> | > but I think it should be different patch which does cleaning
> | > up variables usage. So for now I think _this_ patch is enough
> | > since idea is to prevent of touching nonexistant register rather
> | > code cleaning (whci could be done later).
> |
> | do we have systems that have mixed cpu supported with different apic version?
> |
> | YH
> |
>
> Yinghai what was the reason of this question? I've a suspicious
> you're planning to test apic version early and only _once_ so
> eliminating APIC_INTERGRATED call? Am I right?
want to put more thing in genapic...
YH
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86: do_boot_cpu - add check if we have ESR register
2008-09-22 18:37 ` Yinghai Lu
@ 2008-09-22 19:21 ` Cyrill Gorcunov
0 siblings, 0 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2008-09-22 19:21 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Ingo Molnar, Maciej W. Rozycki, LKML
[Yinghai Lu - Mon, Sep 22, 2008 at 11:37:21AM -0700]
| On Mon, Sep 22, 2008 at 3:15 AM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
| > [Yinghai Lu - Mon, Sep 22, 2008 at 02:57:17AM -0700]
| > | >
| > | > Actually it's resend of the patch. On previous attempt
| > | > Yinghai was proposed to choose:
| > | >
| > | >> one apic_version or boot_cpu_apic_version could be enough
| > | >
| > | > but I think it should be different patch which does cleaning
| > | > up variables usage. So for now I think _this_ patch is enough
| > | > since idea is to prevent of touching nonexistant register rather
| > | > code cleaning (whci could be done later).
| > |
| > | do we have systems that have mixed cpu supported with different apic version?
| > |
| > | YH
| > |
| >
| > Yinghai what was the reason of this question? I've a suspicious
| > you're planning to test apic version early and only _once_ so
| > eliminating APIC_INTERGRATED call? Am I right?
|
| want to put more thing in genapic...
|
| YH
|
I think Ingo could drop this patch then at all.
- Cyrill -
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-09-22 19:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 9:36 [PATCH] x86: do_boot_cpu - add check if we have ESR register Cyrill Gorcunov
2008-09-22 9:51 ` Cyrill Gorcunov
2008-09-22 9:57 ` Yinghai Lu
2008-09-22 10:00 ` Ingo Molnar
2008-09-22 10:04 ` Cyrill Gorcunov
2008-09-22 10:15 ` Cyrill Gorcunov
2008-09-22 18:37 ` Yinghai Lu
2008-09-22 19:21 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox