* Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-06-29 10:01 [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box() Oren Twaig
@ 2014-07-06 6:32 ` Oren Twaig
2014-07-06 6:33 ` Oren Twaig
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Oren Twaig @ 2014-07-06 6:32 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, David Rientjes,
Yoshihiro YUNOMAE, Paul Gortmaker, Jan Kiszka, Andi Kleen,
HATAYAMA Daisuke, Richard Weinberger
Cc: x86, linux-kernel
Hi,
Quick question: As I'm new at this (submitting patches), what is a reasonable time to wait before ping-ing a patch ?
Oren.
On 06/29/2014 01:01 PM, Oren Twaig wrote:
> When a vSMP Foundation box is detected, the function apic_cluster_num() counts
> the number of APIC clusters found. If more than one found, a multi board
> configuration is assumed, and TSC marked as unstable. This behavior is
> incorrect as vSMP Foundation may use processors from single node only, attached
> to memory of other nodes - and such node may have more than one APIC cluster
> (typically any recent intel box has more than single APIC_CLUSTERID(x)).
>
> To fix this, we simply remove the code which detects a vSMP Foundation box and
> affects apic_is_clusted_box() return value. This can be done because later the
> kernel checks by itself if the TSC is stable using the
> check_tsc_sync_[source|target]() functions and marks TSC as unstable if needed.
>
> Acked-by: Shai Fultheim <shai@scalemp.com>
> Signed-off-by: Oren Twaig <oren@scalemp.com>
> ---
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 19b0eba..c100694 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -85,14 +85,6 @@ static inline bool apic_from_smp_config(void)
> #include <asm/paravirt.h>
> #endif
>
> -#ifdef CONFIG_X86_64
> -extern int is_vsmp_box(void);
> -#else
> -static inline int is_vsmp_box(void)
> -{
> - return 0;
> -}
> -#endif
> extern int setup_profiling_timer(unsigned int);
>
> static inline void native_apic_mem_write(u32 reg, u32 v)
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index ad28db7..2b85bb9 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -2451,51 +2451,6 @@ static void apic_pm_activate(void) { }
>
> #ifdef CONFIG_X86_64
>
> -static int apic_cluster_num(void)
> -{
> - int i, clusters, zeros;
> - unsigned id;
> - u16 *bios_cpu_apicid;
> - DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
> -
> - bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
> - bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
> -
> - for (i = 0; i < nr_cpu_ids; i++) {
> - /* are we being called early in kernel startup? */
> - if (bios_cpu_apicid) {
> - id = bios_cpu_apicid[i];
> - } else if (i < nr_cpu_ids) {
> - if (cpu_present(i))
> - id = per_cpu(x86_bios_cpu_apicid, i);
> - else
> - continue;
> - } else
> - break;
> -
> - if (id != BAD_APICID)
> - __set_bit(APIC_CLUSTERID(id), clustermap);
> - }
> -
> - /* Problem: Partially populated chassis may not have CPUs in some of
> - * the APIC clusters they have been allocated. Only present CPUs have
> - * x86_bios_cpu_apicid entries, thus causing zeroes in the bitmap.
> - * Since clusters are allocated sequentially, count zeros only if
> - * they are bounded by ones.
> - */
> - clusters = 0;
> - zeros = 0;
> - for (i = 0; i < NUM_APIC_CLUSTERS; i++) {
> - if (test_bit(i, clustermap)) {
> - clusters += 1 + zeros;
> - zeros = 0;
> - } else
> - ++zeros;
> - }
> -
> - return clusters;
> -}
> -
> static int multi_checked;
> static int multi;
>
> @@ -2540,20 +2495,7 @@ static void dmi_check_multi(void)
> int apic_is_clustered_box(void)
> {
> dmi_check_multi();
> - if (multi)
> - return 1;
> -
> - if (!is_vsmp_box())
> - return 0;
> -
> - /*
> - * ScaleMP vSMPowered boxes have one cluster per board and TSCs are
> - * not guaranteed to be synced between boards
> - */
> - if (apic_cluster_num() > 1)
> - return 1;
> -
> - return 0;
> + return multi;
> }
> #endif
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-06-29 10:01 [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box() Oren Twaig
2014-07-06 6:32 ` Oren Twaig
@ 2014-07-06 6:33 ` Oren Twaig
2014-07-13 6:51 ` Ping: " Oren Twaig
2014-07-14 1:55 ` [tip:x86/apic] " tip-bot for Oren Twaig
2014-08-01 22:12 ` [tip:x86/apic] x86/apic/vsmp: Make is_vsmp_box() static tip-bot for H. Peter Anvin
3 siblings, 1 reply; 10+ messages in thread
From: Oren Twaig @ 2014-07-06 6:33 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, David Rientjes,
Yoshihiro YUNOMAE, Paul Gortmaker, Jan Kiszka, Andi Kleen,
HATAYAMA Daisuke, Richard Weinberger
Cc: x86, linux-kernel
Hi,
Quick question: As I'm new at this (submitting patches), what is a reasonable
time to wait before ping-ing a patch ?
Oren.
On 06/29/2014 01:01 PM, Oren Twaig wrote:
> When a vSMP Foundation box is detected, the function apic_cluster_num() counts
> the number of APIC clusters found. If more than one found, a multi board
> configuration is assumed, and TSC marked as unstable. This behavior is
> incorrect as vSMP Foundation may use processors from single node only, attached
> to memory of other nodes - and such node may have more than one APIC cluster
> (typically any recent intel box has more than single APIC_CLUSTERID(x)).
>
> To fix this, we simply remove the code which detects a vSMP Foundation box and
> affects apic_is_clusted_box() return value. This can be done because later the
> kernel checks by itself if the TSC is stable using the
> check_tsc_sync_[source|target]() functions and marks TSC as unstable if needed.
>
> Acked-by: Shai Fultheim <shai@scalemp.com>
> Signed-off-by: Oren Twaig <oren@scalemp.com>
> ---
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 19b0eba..c100694 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -85,14 +85,6 @@ static inline bool apic_from_smp_config(void)
> #include <asm/paravirt.h>
> #endif
>
> -#ifdef CONFIG_X86_64
> -extern int is_vsmp_box(void);
> -#else
> -static inline int is_vsmp_box(void)
> -{
> - return 0;
> -}
> -#endif
> extern int setup_profiling_timer(unsigned int);
>
> static inline void native_apic_mem_write(u32 reg, u32 v)
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index ad28db7..2b85bb9 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -2451,51 +2451,6 @@ static void apic_pm_activate(void) { }
>
> #ifdef CONFIG_X86_64
>
> -static int apic_cluster_num(void)
> -{
> - int i, clusters, zeros;
> - unsigned id;
> - u16 *bios_cpu_apicid;
> - DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
> -
> - bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
> - bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
> -
> - for (i = 0; i < nr_cpu_ids; i++) {
> - /* are we being called early in kernel startup? */
> - if (bios_cpu_apicid) {
> - id = bios_cpu_apicid[i];
> - } else if (i < nr_cpu_ids) {
> - if (cpu_present(i))
> - id = per_cpu(x86_bios_cpu_apicid, i);
> - else
> - continue;
> - } else
> - break;
> -
> - if (id != BAD_APICID)
> - __set_bit(APIC_CLUSTERID(id), clustermap);
> - }
> -
> - /* Problem: Partially populated chassis may not have CPUs in some of
> - * the APIC clusters they have been allocated. Only present CPUs have
> - * x86_bios_cpu_apicid entries, thus causing zeroes in the bitmap.
> - * Since clusters are allocated sequentially, count zeros only if
> - * they are bounded by ones.
> - */
> - clusters = 0;
> - zeros = 0;
> - for (i = 0; i < NUM_APIC_CLUSTERS; i++) {
> - if (test_bit(i, clustermap)) {
> - clusters += 1 + zeros;
> - zeros = 0;
> - } else
> - ++zeros;
> - }
> -
> - return clusters;
> -}
> -
> static int multi_checked;
> static int multi;
>
> @@ -2540,20 +2495,7 @@ static void dmi_check_multi(void)
> int apic_is_clustered_box(void)
> {
> dmi_check_multi();
> - if (multi)
> - return 1;
> -
> - if (!is_vsmp_box())
> - return 0;
> -
> - /*
> - * ScaleMP vSMPowered boxes have one cluster per board and TSCs are
> - * not guaranteed to be synced between boards
> - */
> - if (apic_cluster_num() > 1)
> - return 1;
> -
> - return 0;
> + return multi;
> }
> #endif
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Ping: Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-07-06 6:33 ` Oren Twaig
@ 2014-07-13 6:51 ` Oren Twaig
2014-07-13 9:10 ` Richard Weinberger
0 siblings, 1 reply; 10+ messages in thread
From: Oren Twaig @ 2014-07-13 6:51 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, David Rientjes,
Yoshihiro YUNOMAE, Paul Gortmaker, Jan Kiszka, Andi Kleen,
HATAYAMA Daisuke, Richard Weinberger
Cc: x86, linux-kernel
ping
On 07/06/2014 09:33 AM, Oren Twaig wrote:
> Hi,
>
> Quick question: As I'm new at this (submitting patches), what is a reasonable
> time to wait before ping-ing a patch ?
>
> Oren.
>
> On 06/29/2014 01:01 PM, Oren Twaig wrote:
>> When a vSMP Foundation box is detected, the function apic_cluster_num() counts
>> the number of APIC clusters found. If more than one found, a multi board
>> configuration is assumed, and TSC marked as unstable. This behavior is
>> incorrect as vSMP Foundation may use processors from single node only, attached
>> to memory of other nodes - and such node may have more than one APIC cluster
>> (typically any recent intel box has more than single APIC_CLUSTERID(x)).
>>
>> To fix this, we simply remove the code which detects a vSMP Foundation box and
>> affects apic_is_clusted_box() return value. This can be done because later the
>> kernel checks by itself if the TSC is stable using the
>> check_tsc_sync_[source|target]() functions and marks TSC as unstable if needed.
>>
>> Acked-by: Shai Fultheim <shai@scalemp.com>
>> Signed-off-by: Oren Twaig <oren@scalemp.com>
>> ---
>> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
>> index 19b0eba..c100694 100644
>> --- a/arch/x86/include/asm/apic.h
>> +++ b/arch/x86/include/asm/apic.h
>> @@ -85,14 +85,6 @@ static inline bool apic_from_smp_config(void)
>> #include <asm/paravirt.h>
>> #endif
>>
>> -#ifdef CONFIG_X86_64
>> -extern int is_vsmp_box(void);
>> -#else
>> -static inline int is_vsmp_box(void)
>> -{
>> - return 0;
>> -}
>> -#endif
>> extern int setup_profiling_timer(unsigned int);
>>
>> static inline void native_apic_mem_write(u32 reg, u32 v)
>> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
>> index ad28db7..2b85bb9 100644
>> --- a/arch/x86/kernel/apic/apic.c
>> +++ b/arch/x86/kernel/apic/apic.c
>> @@ -2451,51 +2451,6 @@ static void apic_pm_activate(void) { }
>>
>> #ifdef CONFIG_X86_64
>>
>> -static int apic_cluster_num(void)
>> -{
>> - int i, clusters, zeros;
>> - unsigned id;
>> - u16 *bios_cpu_apicid;
>> - DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
>> -
>> - bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
>> - bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
>> -
>> - for (i = 0; i < nr_cpu_ids; i++) {
>> - /* are we being called early in kernel startup? */
>> - if (bios_cpu_apicid) {
>> - id = bios_cpu_apicid[i];
>> - } else if (i < nr_cpu_ids) {
>> - if (cpu_present(i))
>> - id = per_cpu(x86_bios_cpu_apicid, i);
>> - else
>> - continue;
>> - } else
>> - break;
>> -
>> - if (id != BAD_APICID)
>> - __set_bit(APIC_CLUSTERID(id), clustermap);
>> - }
>> -
>> - /* Problem: Partially populated chassis may not have CPUs in some of
>> - * the APIC clusters they have been allocated. Only present CPUs have
>> - * x86_bios_cpu_apicid entries, thus causing zeroes in the bitmap.
>> - * Since clusters are allocated sequentially, count zeros only if
>> - * they are bounded by ones.
>> - */
>> - clusters = 0;
>> - zeros = 0;
>> - for (i = 0; i < NUM_APIC_CLUSTERS; i++) {
>> - if (test_bit(i, clustermap)) {
>> - clusters += 1 + zeros;
>> - zeros = 0;
>> - } else
>> - ++zeros;
>> - }
>> -
>> - return clusters;
>> -}
>> -
>> static int multi_checked;
>> static int multi;
>>
>> @@ -2540,20 +2495,7 @@ static void dmi_check_multi(void)
>> int apic_is_clustered_box(void)
>> {
>> dmi_check_multi();
>> - if (multi)
>> - return 1;
>> -
>> - if (!is_vsmp_box())
>> - return 0;
>> -
>> - /*
>> - * ScaleMP vSMPowered boxes have one cluster per board and TSCs are
>> - * not guaranteed to be synced between boards
>> - */
>> - if (apic_cluster_num() > 1)
>> - return 1;
>> -
>> - return 0;
>> + return multi;
>> }
>> #endif
>>
>>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ping: Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-07-13 6:51 ` Ping: " Oren Twaig
@ 2014-07-13 9:10 ` Richard Weinberger
2014-07-13 9:27 ` Oren Twaig
2014-07-13 16:40 ` H. Peter Anvin
0 siblings, 2 replies; 10+ messages in thread
From: Richard Weinberger @ 2014-07-13 9:10 UTC (permalink / raw)
To: Oren Twaig, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
David Rientjes, Yoshihiro YUNOMAE, Paul Gortmaker, Jan Kiszka,
Andi Kleen, HATAYAMA Daisuke
Cc: x86, linux-kernel
Am 13.07.2014 08:51, schrieb Oren Twaig:
> ping
> On 07/06/2014 09:33 AM, Oren Twaig wrote:
>> Hi,
>>
>> Quick question: As I'm new at this (submitting patches), what is a reasonable
>> time to wait before ping-ing a patch ?
>>
>> Oren.
AFACT Peter is still crawling through his mail backlog to catch up.
Thanks,
//richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ping: Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-07-13 9:10 ` Richard Weinberger
@ 2014-07-13 9:27 ` Oren Twaig
2014-07-13 16:40 ` H. Peter Anvin
1 sibling, 0 replies; 10+ messages in thread
From: Oren Twaig @ 2014-07-13 9:27 UTC (permalink / raw)
To: Richard Weinberger, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
David Rientjes, Yoshihiro YUNOMAE, Paul Gortmaker, Jan Kiszka,
Andi Kleen, HATAYAMA Daisuke
Cc: x86, linux-kernel
I see - Thanks for the quick respond.
Oren.
On 07/13/2014 12:10 PM, Richard Weinberger wrote:
> Am 13.07.2014 08:51, schrieb Oren Twaig:
>> ping
>> On 07/06/2014 09:33 AM, Oren Twaig wrote:
>>> Hi,
>>>
>>> Quick question: As I'm new at this (submitting patches), what is a reasonable
>>> time to wait before ping-ing a patch ?
>>>
>>> Oren.
> AFACT Peter is still crawling through his mail backlog to catch up.
>
> Thanks,
> //richard
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ping: Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-07-13 9:10 ` Richard Weinberger
2014-07-13 9:27 ` Oren Twaig
@ 2014-07-13 16:40 ` H. Peter Anvin
2014-07-13 18:36 ` Oren Twaig
1 sibling, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2014-07-13 16:40 UTC (permalink / raw)
To: Richard Weinberger
Cc: Oren Twaig, Thomas Gleixner, Ingo Molnar, David Rientjes,
Yoshihiro YUNOMAE, Paul Gortmaker, Jan Kiszka, Andi Kleen,
HATAYAMA Daisuke, x86@kernel.org, linux-kernel@vger.kernel.org
Yes, although sometimes pings we useful to keep things from getting lost. Typically 1-2 weeks without response is a good reason to ping. *Don't repost*, just put a ping as a reply to the original 0/ patch, which in most threaded mail readers brings the thread back to the front.
Sent from my tablet, pardon any formatting problems.
> On Jul 13, 2014, at 2:10, Richard Weinberger <richard@nod.at> wrote:
>
> Am 13.07.2014 08:51, schrieb Oren Twaig:
>> ping
>> On 07/06/2014 09:33 AM, Oren Twaig wrote:
>>> Hi,
>>>
>>> Quick question: As I'm new at this (submitting patches), what is a reasonable
>>> time to wait before ping-ing a patch ?
>>>
>>> Oren.
>
> AFACT Peter is still crawling through his mail backlog to catch up.
>
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ping: Re: [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-07-13 16:40 ` H. Peter Anvin
@ 2014-07-13 18:36 ` Oren Twaig
0 siblings, 0 replies; 10+ messages in thread
From: Oren Twaig @ 2014-07-13 18:36 UTC (permalink / raw)
To: H. Peter Anvin, Richard Weinberger
Cc: Thomas Gleixner, Ingo Molnar, David Rientjes, Yoshihiro YUNOMAE,
Paul Gortmaker, Jan Kiszka, Andi Kleen, HATAYAMA Daisuke,
x86@kernel.org, linux-kernel@vger.kernel.org
I see - thanks.
BTW, the v2 was sent because I had a mailer send-as-text issues which caused
the patch not to be sent properly and you had some conflicts with it when
merging.
All should be good now with the v2.
Thanks,
Oren.
On 7/13/2014 7:40 PM, H. Peter Anvin wrote:
> Yes, although sometimes pings we useful to keep things from getting lost. Typically 1-2 weeks without response is a good reason to ping. *Don't repost*, just put a ping as a reply to the original 0/ patch, which in most threaded mail readers brings the thread back to the front.
>
> Sent from my tablet, pardon any formatting problems.
>
>> On Jul 13, 2014, at 2:10, Richard Weinberger <richard@nod.at> wrote:
>>
>> Am 13.07.2014 08:51, schrieb Oren Twaig:
>>> ping
>>> On 07/06/2014 09:33 AM, Oren Twaig wrote:
>>>> Hi,
>>>>
>>>> Quick question: As I'm new at this (submitting patches), what is a reasonable
>>>> time to wait before ping-ing a patch ?
>>>>
>>>> Oren.
>> AFACT Peter is still crawling through his mail backlog to catch up.
>>
>> Thanks,
>> //richard
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [tip:x86/apic] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
2014-06-29 10:01 [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box() Oren Twaig
2014-07-06 6:32 ` Oren Twaig
2014-07-06 6:33 ` Oren Twaig
@ 2014-07-14 1:55 ` tip-bot for Oren Twaig
2014-08-01 22:12 ` [tip:x86/apic] x86/apic/vsmp: Make is_vsmp_box() static tip-bot for H. Peter Anvin
3 siblings, 0 replies; 10+ messages in thread
From: tip-bot for Oren Twaig @ 2014-07-14 1:55 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, shai, oren, tglx
Commit-ID: 411cf9ee2946492c0ac7eca48422fcf94a723ce5
Gitweb: http://git.kernel.org/tip/411cf9ee2946492c0ac7eca48422fcf94a723ce5
Author: Oren Twaig <oren@scalemp.com>
AuthorDate: Sun, 29 Jun 2014 13:01:08 +0300
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Sun, 13 Jul 2014 17:48:03 -0700
x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
When a vSMP Foundation box is detected, the function apic_cluster_num() counts
the number of APIC clusters found. If more than one found, a multi board
configuration is assumed, and TSC marked as unstable. This behavior is
incorrect as vSMP Foundation may use processors from single node only, attached
to memory of other nodes - and such node may have more than one APIC cluster
(typically any recent intel box has more than single APIC_CLUSTERID(x)).
To fix this, we simply remove the code which detects a vSMP Foundation box and
affects apic_is_clusted_box() return value. This can be done because later the
kernel checks by itself if the TSC is stable using the
check_tsc_sync_[source|target]() functions and marks TSC as unstable if needed.
Acked-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Oren Twaig <oren@scalemp.com>
Link: http://lkml.kernel.org/r/1404036068-11674-1-git-send-email-oren@scalemp.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/include/asm/apic.h | 8 ------
arch/x86/kernel/apic/apic.c | 60 +--------------------------------------------
2 files changed, 1 insertion(+), 67 deletions(-)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 69ed79a..b40ea7e 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -85,14 +85,6 @@ static inline bool apic_from_smp_config(void)
#include <asm/paravirt.h>
#endif
-#ifdef CONFIG_X86_64
-extern int is_vsmp_box(void);
-#else
-static inline int is_vsmp_box(void)
-{
- return 0;
-}
-#endif
extern int setup_profiling_timer(unsigned int);
static inline void native_apic_mem_write(u32 reg, u32 v)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index ca1bd75..6b35d30 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2451,51 +2451,6 @@ static void apic_pm_activate(void) { }
#ifdef CONFIG_X86_64
-static int apic_cluster_num(void)
-{
- int i, clusters, zeros;
- unsigned id;
- u16 *bios_cpu_apicid;
- DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
-
- bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
- bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
-
- for (i = 0; i < nr_cpu_ids; i++) {
- /* are we being called early in kernel startup? */
- if (bios_cpu_apicid) {
- id = bios_cpu_apicid[i];
- } else if (i < nr_cpu_ids) {
- if (cpu_present(i))
- id = per_cpu(x86_bios_cpu_apicid, i);
- else
- continue;
- } else
- break;
-
- if (id != BAD_APICID)
- __set_bit(APIC_CLUSTERID(id), clustermap);
- }
-
- /* Problem: Partially populated chassis may not have CPUs in some of
- * the APIC clusters they have been allocated. Only present CPUs have
- * x86_bios_cpu_apicid entries, thus causing zeroes in the bitmap.
- * Since clusters are allocated sequentially, count zeros only if
- * they are bounded by ones.
- */
- clusters = 0;
- zeros = 0;
- for (i = 0; i < NUM_APIC_CLUSTERS; i++) {
- if (test_bit(i, clustermap)) {
- clusters += 1 + zeros;
- zeros = 0;
- } else
- ++zeros;
- }
-
- return clusters;
-}
-
static int multi_checked;
static int multi;
@@ -2540,20 +2495,7 @@ static void dmi_check_multi(void)
int apic_is_clustered_box(void)
{
dmi_check_multi();
- if (multi)
- return 1;
-
- if (!is_vsmp_box())
- return 0;
-
- /*
- * ScaleMP vSMPowered boxes have one cluster per board and TSCs are
- * not guaranteed to be synced between boards
- */
- if (apic_cluster_num() > 1)
- return 1;
-
- return 0;
+ return multi;
}
#endif
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [tip:x86/apic] x86/apic/vsmp: Make is_vsmp_box() static
2014-06-29 10:01 [PATCH v2] x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box() Oren Twaig
` (2 preceding siblings ...)
2014-07-14 1:55 ` [tip:x86/apic] " tip-bot for Oren Twaig
@ 2014-08-01 22:12 ` tip-bot for H. Peter Anvin
3 siblings, 0 replies; 10+ messages in thread
From: tip-bot for H. Peter Anvin @ 2014-08-01 22:12 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, oren, shai, tglx, hpa, fengguang.wu
Commit-ID: 5e3bf215f4f2efc0af89e6dbc5da789744aeb5d7
Gitweb: http://git.kernel.org/tip/5e3bf215f4f2efc0af89e6dbc5da789744aeb5d7
Author: H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Fri, 1 Aug 2014 14:47:56 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 1 Aug 2014 15:09:45 -0700
x86/apic/vsmp: Make is_vsmp_box() static
Since checkin
411cf9ee2946 x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
... is_vsmp_box() is only used in vsmp_64.c and does not have any
header file declaring it, so make it explicitly static.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Shai Fultheim <shai@scalemp.com>
Cc: Oren Twaig <oren@scalemp.com>
Link: http://lkml.kernel.org/r/1404036068-11674-1-git-send-email-oren@scalemp.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/kernel/vsmp_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index b99b9ad..ee22c1d 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -152,7 +152,7 @@ static void __init detect_vsmp_box(void)
is_vsmp = 1;
}
-int is_vsmp_box(void)
+static int is_vsmp_box(void)
{
if (is_vsmp != -1)
return is_vsmp;
@@ -166,7 +166,7 @@ int is_vsmp_box(void)
static void __init detect_vsmp_box(void)
{
}
-int is_vsmp_box(void)
+static int is_vsmp_box(void)
{
return 0;
}
^ permalink raw reply related [flat|nested] 10+ messages in thread