2009-04-04 00:14:27

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86: make 64 bit to use default_inquire_remote_apic


Impact: restore old behavior

for flat and phys_flat

Signed-off-by: Yinhai Lu <[email protected].

---
arch/x86/kernel/apic/apic_flat_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/kernel/apic/apic_flat_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/apic_flat_64.c
+++ linux-2.6/arch/x86/kernel/apic/apic_flat_64.c
@@ -212,7 +212,7 @@ struct apic apic_flat = {
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
.wait_for_init_deassert = NULL,
.smp_callin_clear_local_apic = NULL,
- .inquire_remote_apic = NULL,
+ .inquire_remote_apic = default_inquire_remote_apic,

.read = native_apic_mem_read,
.write = native_apic_mem_write,
@@ -362,7 +362,7 @@ struct apic apic_physflat = {
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
.wait_for_init_deassert = NULL,
.smp_callin_clear_local_apic = NULL,
- .inquire_remote_apic = NULL,
+ .inquire_remote_apic = default_inquire_remote_apic,

.read = native_apic_mem_read,
.write = native_apic_mem_write,


2009-04-04 00:15:30

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86: make wakeup_secondary_cpu_via_init static


Impact: cleanup

Signed-off-by: Yinghai Lu <[email protected]>

---
arch/x86/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6/arch/x86/kernel/smpboot.c
@@ -538,7 +538,7 @@ wakeup_secondary_cpu_via_nmi(int logical
return (send_status | accept_status);
}

-int __devinit
+static int __devinit
wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
{
unsigned long send_status, accept_status = 0;

2009-04-04 00:16:01

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86: consistent about warm_reset_vector for UN_NON_UNIQUE_APIC


Impact: cleanup

didn't set it for UV_NON_UNIQUE_APIC, so don't restore it

Signed-off-by: Yinghai Lu <[email protected]>

---
arch/x86/kernel/smpboot.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6/arch/x86/kernel/smpboot.c
@@ -822,10 +822,12 @@ do_rest:
/* mark "stuck" area as not stuck */
*((volatile unsigned long *)trampoline_base) = 0;

- /*
- * Cleanup possible dangling ends...
- */
- smpboot_restore_warm_reset_vector();
+ if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
+ /*
+ * Cleanup possible dangling ends...
+ */
+ smpboot_restore_warm_reset_vector();
+ }

return boot_error;
}

2009-04-08 13:01:23

by Yinghai Lu

[permalink] [raw]
Subject: [tip:x86/apic] x86: make wakeup_secondary_cpu_via_init static

Commit-ID: cdc1cb0d4445f39561a65204d26f89365f917550
Gitweb: http://git.kernel.org/tip/cdc1cb0d4445f39561a65204d26f89365f917550
Author: Yinghai Lu <[email protected]>
AuthorDate: Fri, 3 Apr 2009 17:15:14 -0700
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 8 Apr 2009 14:50:28 +0200

x86: make wakeup_secondary_cpu_via_init static

Impact: cleanup

Signed-off-by: Yinghai Lu <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>


---
arch/x86/kernel/smpboot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 58d24ef..bddf2cc 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -538,7 +538,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
return (send_status | accept_status);
}

-int __devinit
+static int __devinit
wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
{
unsigned long send_status, accept_status = 0;

2009-04-08 13:01:43

by Yinghai Lu

[permalink] [raw]
Subject: [tip:x86/apic] x86: consistent about warm_reset_vector for UN_NON_UNIQUE_APIC

Commit-ID: 02421f98ec55c3ff118f358740ff640f096c7ad6
Gitweb: http://git.kernel.org/tip/02421f98ec55c3ff118f358740ff640f096c7ad6
Author: Yinghai Lu <[email protected]>
AuthorDate: Fri, 3 Apr 2009 17:15:53 -0700
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 8 Apr 2009 14:50:28 +0200

x86: consistent about warm_reset_vector for UN_NON_UNIQUE_APIC

Impact: cleanup

didn't set it for UV_NON_UNIQUE_APIC, so don't restore it

Signed-off-by: Yinghai Lu <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>


---
arch/x86/kernel/smpboot.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index bddf2cc..bf8ad63 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -822,10 +822,12 @@ do_rest:
/* mark "stuck" area as not stuck */
*((volatile unsigned long *)trampoline_base) = 0;

- /*
- * Cleanup possible dangling ends...
- */
- smpboot_restore_warm_reset_vector();
+ if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
+ /*
+ * Cleanup possible dangling ends...
+ */
+ smpboot_restore_warm_reset_vector();
+ }

return boot_error;
}

2009-04-08 18:40:28

by Cyrill Gorcunov

[permalink] [raw]
Subject: Re: [tip:x86/apic] x86: make wakeup_secondary_cpu_via_init static

[Yinghai Lu - Wed, Apr 08, 2009 at 01:00:32PM +0000]
| Commit-ID: cdc1cb0d4445f39561a65204d26f89365f917550
| Gitweb: http://git.kernel.org/tip/cdc1cb0d4445f39561a65204d26f89365f917550
| Author: Yinghai Lu <[email protected]>
| AuthorDate: Fri, 3 Apr 2009 17:15:14 -0700
| Committer: Ingo Molnar <[email protected]>
| CommitDate: Wed, 8 Apr 2009 14:50:28 +0200
|
| x86: make wakeup_secondary_cpu_via_init static
|
| Impact: cleanup
|
| Signed-off-by: Yinghai Lu <[email protected]>
| LKML-Reference: <[email protected]>
| Signed-off-by: Ingo Molnar <[email protected]>
|
|
| ---
| arch/x86/kernel/smpboot.c | 2 +-
| 1 files changed, 1 insertions(+), 1 deletions(-)
|
| diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
| index 58d24ef..bddf2cc 100644
| --- a/arch/x86/kernel/smpboot.c
| +++ b/arch/x86/kernel/smpboot.c
| @@ -538,7 +538,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
| return (send_status | accept_status);
| }
|
| -int __devinit
| +static int __devinit
| wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
| {
| unsigned long send_status, accept_status = 0;

Hi Yinghai,

just curious why it's not __cpuinit? Did I miss something?

Cyrill

2009-04-08 19:11:27

by Yinghai Lu

[permalink] [raw]
Subject: Re: [tip:x86/apic] x86: make wakeup_secondary_cpu_via_init static

Cyrill Gorcunov wrote:
> [Yinghai Lu - Wed, Apr 08, 2009 at 01:00:32PM +0000]
> | Commit-ID: cdc1cb0d4445f39561a65204d26f89365f917550
> | Gitweb: http://git.kernel.org/tip/cdc1cb0d4445f39561a65204d26f89365f917550
> | Author: Yinghai Lu <[email protected]>
> | AuthorDate: Fri, 3 Apr 2009 17:15:14 -0700
> | Committer: Ingo Molnar <[email protected]>
> | CommitDate: Wed, 8 Apr 2009 14:50:28 +0200
> |
> | x86: make wakeup_secondary_cpu_via_init static
> |
> | Impact: cleanup
> |
> | Signed-off-by: Yinghai Lu <[email protected]>
> | LKML-Reference: <[email protected]>
> | Signed-off-by: Ingo Molnar <[email protected]>
> |
> |
> | ---
> | arch/x86/kernel/smpboot.c | 2 +-
> | 1 files changed, 1 insertions(+), 1 deletions(-)
> |
> | diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> | index 58d24ef..bddf2cc 100644
> | --- a/arch/x86/kernel/smpboot.c
> | +++ b/arch/x86/kernel/smpboot.c
> | @@ -538,7 +538,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
> | return (send_status | accept_status);
> | }
> |
> | -int __devinit
> | +static int __devinit
> | wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
> | {
> | unsigned long send_status, accept_status = 0;
>
> Hi Yinghai,
>
> just curious why it's not __cpuinit? Did I miss something?
>

you could change that to __cpuinit.

also other three wakeup_seconary_cpu.

YH