x86: cleanup remaining cpumask_t ops in smpboot code
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Mike,
Quoted 6 lines · Mike Travis
---
linux-2.6-for-ingo.orig/arch/x86/include/asm/smp.h+++linux-2.6-for-ingo/arch/x86/include/asm/smp.h(quoted diff) +0
-0@@ -18,9 +18,26 @@ #include <asm/pda.h> #include <asm/thread_info.h>
Review line 30
Quoted 10 lines
(quoted diff) +10
-0+#ifdef CONFIG_X86_64 + +extern cpumask_var_t cpu_callin_mask; +extern cpumask_var_t cpu_callout_mask; +extern cpumask_var_t cpu_initialized_mask; +extern cpumask_var_t cpu_sibling_setup_mask; + +#else /* CONFIG_X86_32 */ + +extern cpumask_t cpu_callin_map;
I am not able to understand, why you choose asm/smp.h
You know that asm/smp.h should only be included for CONFIG_SMP
----- linux/smp.h -----
#ifdef CONFIG_SMP
#include <asm/smp.h>
#endif /* !SMP */
-----------------------
If someday this will happen:
----- asm/smp.h -----
#ifndef _ASM_X86_SMP_H
#define _ASM_X86_SMP_H
#ifndef __ASSEMBLY__
#ifdef CONFIG_SMP
...
#else /* CONFIG_SMP */
#error "Including wrong file, why you need smp.h for uniprocesor" #endif /* CONFIG_SMP */
#endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_SMP_H */
-----------------------
Then ;-)
Are you planning to make some new file for this or you think some other file will be suitable for this.
If you have some future plans, please let me know.
Thanks
--
JSR
Quoted 23 lines · Jaswinder Singh Rajput
Hello Mike,
Quoted 6 lines · Mike Travis
---
linux-2.6-for-ingo.orig/arch/x86/include/asm/smp.h+++linux-2.6-for-ingo/arch/x86/include/asm/smp.h(quoted diff) +0
-0@@ -18,9 +18,26 @@ #include <asm/pda.h> #include <asm/thread_info.h>Review line 30
Quoted 10 lines
(quoted diff) +10
-0+#ifdef CONFIG_X86_64 + +extern cpumask_var_t cpu_callin_mask; +extern cpumask_var_t cpu_callout_mask; +extern cpumask_var_t cpu_initialized_mask; +extern cpumask_var_t cpu_sibling_setup_mask; + +#else /* CONFIG_X86_32 */ + +extern cpumask_t cpu_callin_map;I am not able to understand, why you choose
asm/smp.h
Quoted 1 line
You know that
asm/smp.hshould only be included forCONFIG_SMP
Hi Jaswinder,
I'll look closer but I had assumed that these masks would not be used for UP configurations (it did not get any compile errors with the allnoconfig). In fact, any access to these masks for UP would be unnecessary since there are no callouts, the boot cpu is assumed initialized, and it has no siblings. So the masks are specific to SMP.
But as I said, I'll verify this.
Thanks,
Mike
Quoted 35 lines
-----
linux/smp.h-----
#ifdefCONFIG_SMP#include <
asm/smp.h>#endif /* !SMP */
-----------------------
If someday this will happen:
-----
asm/smp.h-----
#ifndef_ASM_X86_SMP_H
#define_ASM_X86_SMP_H
#ifndef__ASSEMBLY__
#ifdefCONFIG_SMP
...
#else /*CONFIG_SMP*/
#error "Including wrong file, why you needsmp.hfor uniprocesor" #endif /*CONFIG_SMP*/
#endif /*__ASSEMBLY__*/
#endif /*_ASM_X86_SMP_H*/-----------------------
Then ;-)
Are you planning to make some new file for this or you think some other file will be suitable for this.
If you have some future plans, please let me know.
Thanks
--
JSR
Hi Mike,
Quoted 8 lines · Mike Travis
I'll look closer but I had assumed that these masks would not be used for UP configurations (it did not get any compile errors with the allnoconfig). In fact, any access to these masks for UP would be unnecessary since there are no callouts, the boot cpu is assumed initialized, and it has no siblings. So the masks are specific to SMP.
If it is specific to SMP then:CONFIG_X86_64 should be CONFIG_X86_64_SMPCONFIG_X86_32 should be CONFIG_X86_32_SMP
I am in the process of cleaning smp.h and moving out non-smp from smp.h as per Ingo's suggestion.
I am planning to move cpumask related things to asm/cpumask.h
Is this OK to you.
--
JSR
Quoted 18 lines · Jaswinder Singh Rajput
Hi Mike,
Quoted 7 lines · Mike Travis
I'll look closer but I had assumed that these masks would not be used for UP configurations (it did not get any compile errors with the allnoconfig). In fact, any access to these masks for UP would be unnecessary since there are no callouts, the boot cpu is assumed initialized, and it has no siblings. So the masks are specific to SMP.
If it is specific to SMP then:
CONFIG_X86_64should beCONFIG_X86_64_SMPCONFIG_X86_32should beCONFIG_X86_32_SMPI am in the process of cleaning
smp.hand moving out non-smp fromsmp.has per Ingo's suggestion.
Quoted 6 lines
I am planning to move cpumask related things to
asm/cpumask.hIs this OK to you.
--
JSR
It's fine with me, anything to untangle the web we've weaved... ;-)
Thanks,
Mike