File tree Expand file tree Collapse file tree 8 files changed +38
-28
lines changed Expand file tree Collapse file tree 8 files changed +38
-28
lines changed Original file line number Diff line number Diff line change @@ -191,12 +191,10 @@ void __init smp_init_cpus(void)
191
191
ncores = scu_base ? scu_get_core_count (scu_base ) : 1 ;
192
192
193
193
/* sanity check */
194
- if (ncores > NR_CPUS ) {
195
- printk (KERN_WARNING
196
- "EXYNOS4: no. of cores (%d) greater than configured "
197
- "maximum of %d - clipping\n" ,
198
- ncores , NR_CPUS );
199
- ncores = NR_CPUS ;
194
+ if (ncores > nr_cpu_ids ) {
195
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
196
+ ncores , nr_cpu_ids );
197
+ ncores = nr_cpu_ids ;
200
198
}
201
199
202
200
for (i = 0 ; i < ncores ; i ++ )
Original file line number Diff line number Diff line change @@ -156,6 +156,12 @@ void __init smp_init_cpus(void)
156
156
{
157
157
unsigned int i , ncores = get_core_count ();
158
158
159
+ if (ncores > nr_cpu_ids ) {
160
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
161
+ ncores , nr_cpu_ids );
162
+ ncores = nr_cpu_ids ;
163
+ }
164
+
159
165
for (i = 0 ; i < ncores ; i ++ )
160
166
set_cpu_possible (i , true);
161
167
Original file line number Diff line number Diff line change @@ -109,12 +109,10 @@ void __init smp_init_cpus(void)
109
109
ncores = scu_get_core_count (scu_base );
110
110
111
111
/* sanity check */
112
- if (ncores > NR_CPUS ) {
113
- printk (KERN_WARNING
114
- "OMAP4: no. of cores (%d) greater than configured "
115
- "maximum of %d - clipping\n" ,
116
- ncores , NR_CPUS );
117
- ncores = NR_CPUS ;
112
+ if (ncores > nr_cpu_ids ) {
113
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
114
+ ncores , nr_cpu_ids );
115
+ ncores = nr_cpu_ids ;
118
116
}
119
117
120
118
for (i = 0 ; i < ncores ; i ++ )
Original file line number Diff line number Diff line change @@ -52,12 +52,10 @@ void __init smp_init_cpus(void)
52
52
ncores = scu_base ? scu_get_core_count (scu_base ) : 1 ;
53
53
54
54
/* sanity check */
55
- if (ncores > NR_CPUS ) {
56
- printk (KERN_WARNING
57
- "Realview: no. of cores (%d) greater than configured "
58
- "maximum of %d - clipping\n" ,
59
- ncores , NR_CPUS );
60
- ncores = NR_CPUS ;
55
+ if (ncores > nr_cpu_ids ) {
56
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
57
+ ncores , nr_cpu_ids );
58
+ ncores = nr_cpu_ids ;
61
59
}
62
60
63
61
for (i = 0 ; i < ncores ; i ++ )
Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ void __init smp_init_cpus(void)
56
56
unsigned int ncores = shmobile_smp_get_core_count ();
57
57
unsigned int i ;
58
58
59
+ if (ncores > nr_cpu_ids ) {
60
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
61
+ ncores , nr_cpu_ids );
62
+ ncores = nr_cpu_ids ;
63
+ }
64
+
59
65
for (i = 0 ; i < ncores ; i ++ )
60
66
set_cpu_possible (i , true);
61
67
Original file line number Diff line number Diff line change @@ -114,10 +114,10 @@ void __init smp_init_cpus(void)
114
114
{
115
115
unsigned int i , ncores = scu_get_core_count (scu_base );
116
116
117
- if (ncores > NR_CPUS ) {
118
- printk ( KERN_ERR "Tegra: no. of cores (%u) greater than configured (%u), clipping\n" ,
119
- ncores , NR_CPUS );
120
- ncores = NR_CPUS ;
117
+ if (ncores > nr_cpu_ids ) {
118
+ pr_warn ( "SMP: %u cores greater than maximum (%u), clipping\n" ,
119
+ ncores , nr_cpu_ids );
120
+ ncores = nr_cpu_ids ;
121
121
}
122
122
123
123
for (i = 0 ; i < ncores ; i ++ )
Original file line number Diff line number Diff line change @@ -156,12 +156,10 @@ void __init smp_init_cpus(void)
156
156
ncores = scu_base ? scu_get_core_count (scu_base ) : 1 ;
157
157
158
158
/* sanity check */
159
- if (ncores > NR_CPUS ) {
160
- printk (KERN_WARNING
161
- "U8500: no. of cores (%d) greater than configured "
162
- "maximum of %d - clipping\n" ,
163
- ncores , NR_CPUS );
164
- ncores = NR_CPUS ;
159
+ if (ncores > nr_cpu_ids ) {
160
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
161
+ ncores , nr_cpu_ids );
162
+ ncores = nr_cpu_ids ;
165
163
}
166
164
167
165
for (i = 0 ; i < ncores ; i ++ )
Original file line number Diff line number Diff line change @@ -221,6 +221,12 @@ static void ct_ca9x4_init_cpu_map(void)
221
221
{
222
222
int i , ncores = scu_get_core_count (MMIO_P2V (A9_MPCORE_SCU ));
223
223
224
+ if (ncores > nr_cpu_ids ) {
225
+ pr_warn ("SMP: %u cores greater than maximum (%u), clipping\n" ,
226
+ ncores , nr_cpu_ids );
227
+ ncores = nr_cpu_ids ;
228
+ }
229
+
224
230
for (i = 0 ; i < ncores ; ++ i )
225
231
set_cpu_possible (i , true);
226
232
You can’t perform that action at this time.
0 commit comments