17
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
*/
19
19
20
+ #define pr_fmt (fmt ) "NUMA: " fmt
21
+
20
22
#include <linux/acpi.h>
21
23
#include <linux/bootmem.h>
22
24
#include <linux/memblock.h>
@@ -38,10 +40,9 @@ static __init int numa_parse_early_param(char *opt)
38
40
{
39
41
if (!opt )
40
42
return - EINVAL ;
41
- if (!strncmp (opt , "off" , 3 )) {
42
- pr_info ("%s\n" , "NUMA turned off" );
43
+ if (!strncmp (opt , "off" , 3 ))
43
44
numa_off = true;
44
- }
45
+
45
46
return 0 ;
46
47
}
47
48
early_param ("numa" , numa_parse_early_param );
@@ -110,7 +111,7 @@ static void __init setup_node_to_cpumask_map(void)
110
111
set_cpu_numa_node (cpu , NUMA_NO_NODE );
111
112
112
113
/* cpumask_of_node() will now work */
113
- pr_debug ("NUMA: Node to cpumask map for %d nodes\n" , nr_node_ids );
114
+ pr_debug ("Node to cpumask map for %d nodes\n" , nr_node_ids );
114
115
}
115
116
116
117
/*
@@ -145,13 +146,13 @@ int __init numa_add_memblk(int nid, u64 start, u64 end)
145
146
146
147
ret = memblock_set_node (start , (end - start ), & memblock .memory , nid );
147
148
if (ret < 0 ) {
148
- pr_err ("NUMA: memblock [0x%llx - 0x%llx] failed to add on node %d\n" ,
149
+ pr_err ("memblock [0x%llx - 0x%llx] failed to add on node %d\n" ,
149
150
start , (end - 1 ), nid );
150
151
return ret ;
151
152
}
152
153
153
154
node_set (nid , numa_nodes_parsed );
154
- pr_info ("NUMA: Adding memblock [0x%llx - 0x%llx] on node %d\n" ,
155
+ pr_info ("Adding memblock [0x%llx - 0x%llx] on node %d\n" ,
155
156
start , (end - 1 ), nid );
156
157
return ret ;
157
158
}
@@ -166,19 +167,18 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
166
167
void * nd ;
167
168
int tnid ;
168
169
169
- pr_info ("NUMA: Initmem setup node %d [mem %#010Lx-%#010Lx]\n" ,
170
- nid , start_pfn << PAGE_SHIFT ,
171
- (end_pfn << PAGE_SHIFT ) - 1 );
170
+ pr_info ("Initmem setup node %d [mem %#010Lx-%#010Lx]\n" ,
171
+ nid , start_pfn << PAGE_SHIFT , (end_pfn << PAGE_SHIFT ) - 1 );
172
172
173
173
nd_pa = memblock_alloc_try_nid (nd_size , SMP_CACHE_BYTES , nid );
174
174
nd = __va (nd_pa );
175
175
176
176
/* report and initialize */
177
- pr_info ("NUMA: NODE_DATA [mem %#010Lx-%#010Lx]\n" ,
177
+ pr_info ("NODE_DATA [mem %#010Lx-%#010Lx]\n" ,
178
178
nd_pa , nd_pa + nd_size - 1 );
179
179
tnid = early_pfn_to_nid (nd_pa >> PAGE_SHIFT );
180
180
if (tnid != nid )
181
- pr_info ("NUMA: NODE_DATA(%d) on node %d\n" , nid , tnid );
181
+ pr_info ("NODE_DATA(%d) on node %d\n" , nid , tnid );
182
182
183
183
node_data [nid ] = nd ;
184
184
memset (NODE_DATA (nid ), 0 , sizeof (pg_data_t ));
@@ -235,8 +235,7 @@ static int __init numa_alloc_distance(void)
235
235
numa_distance [i * numa_distance_cnt + j ] = i == j ?
236
236
LOCAL_DISTANCE : REMOTE_DISTANCE ;
237
237
238
- pr_debug ("NUMA: Initialized distance table, cnt=%d\n" ,
239
- numa_distance_cnt );
238
+ pr_debug ("Initialized distance table, cnt=%d\n" , numa_distance_cnt );
240
239
241
240
return 0 ;
242
241
}
@@ -257,20 +256,20 @@ static int __init numa_alloc_distance(void)
257
256
void __init numa_set_distance (int from , int to , int distance )
258
257
{
259
258
if (!numa_distance ) {
260
- pr_warn_once ("NUMA: Warning: distance table not allocated yet\n" );
259
+ pr_warn_once ("Warning: distance table not allocated yet\n" );
261
260
return ;
262
261
}
263
262
264
263
if (from >= numa_distance_cnt || to >= numa_distance_cnt ||
265
264
from < 0 || to < 0 ) {
266
- pr_warn_once ("NUMA: Warning: node ids are out of bound, from=%d to=%d distance=%d\n" ,
265
+ pr_warn_once ("Warning: node ids are out of bound, from=%d to=%d distance=%d\n" ,
267
266
from , to , distance );
268
267
return ;
269
268
}
270
269
271
270
if ((u8 )distance != distance ||
272
271
(from == to && distance != LOCAL_DISTANCE )) {
273
- pr_warn_once ("NUMA: Warning: invalid distance parameter, from=%d to=%d distance=%d\n" ,
272
+ pr_warn_once ("Warning: invalid distance parameter, from=%d to=%d distance=%d\n" ,
274
273
from , to , distance );
275
274
return ;
276
275
}
@@ -297,7 +296,7 @@ static int __init numa_register_nodes(void)
297
296
/* Check that valid nid is set to memblks */
298
297
for_each_memblock (memory , mblk )
299
298
if (mblk -> nid == NUMA_NO_NODE || mblk -> nid >= MAX_NUMNODES ) {
300
- pr_warn ("NUMA: Warning: invalid memblk node %d [mem %#010Lx-%#010Lx]\n" ,
299
+ pr_warn ("Warning: invalid memblk node %d [mem %#010Lx-%#010Lx]\n" ,
301
300
mblk -> nid , mblk -> base ,
302
301
mblk -> base + mblk -> size - 1 );
303
302
return - EINVAL ;
@@ -369,8 +368,8 @@ static int __init dummy_numa_init(void)
369
368
370
369
if (numa_off )
371
370
pr_info ("NUMA disabled\n" ); /* Forced off on command line. */
372
- pr_info ("NUMA: Faking a node at [mem %#018Lx-%#018Lx]\n" ,
373
- 0LLU , PFN_PHYS (max_pfn ) - 1 );
371
+ pr_info ("Faking a node at [mem %#018Lx-%#018Lx]\n" ,
372
+ 0LLU , PFN_PHYS (max_pfn ) - 1 );
374
373
375
374
for_each_memblock (memory , mblk ) {
376
375
ret = numa_add_memblk (0 , mblk -> base , mblk -> base + mblk -> size );
0 commit comments