@@ -334,6 +334,7 @@ static void __init prom_print_dec(unsigned long val)
334
334
call_prom ("write" , 3 , 1 , prom .stdout , buf + i , size );
335
335
}
336
336
337
+ __printf (1 , 2 )
337
338
static void __init prom_printf (const char * format , ...)
338
339
{
339
340
const char * p , * q , * s ;
@@ -1160,7 +1161,7 @@ static void __init prom_send_capabilities(void)
1160
1161
*/
1161
1162
1162
1163
cores = DIV_ROUND_UP (NR_CPUS , prom_count_smt_threads ());
1163
- prom_printf ("Max number of cores passed to firmware: %lu (NR_CPUS = %lu )\n" ,
1164
+ prom_printf ("Max number of cores passed to firmware: %u (NR_CPUS = %d )\n" ,
1164
1165
cores , NR_CPUS );
1165
1166
1166
1167
ibm_architecture_vec .vec5 .max_cpus = cpu_to_be32 (cores );
@@ -1242,7 +1243,7 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
1242
1243
1243
1244
if (align )
1244
1245
base = _ALIGN_UP (base , align );
1245
- prom_debug ("alloc_up(%x , %x )\n" , size , align );
1246
+ prom_debug ("%s(%lx , %lx )\n" , __func__ , size , align );
1246
1247
if (ram_top == 0 )
1247
1248
prom_panic ("alloc_up() called with mem not initialized\n" );
1248
1249
@@ -1253,7 +1254,7 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
1253
1254
1254
1255
for (; (base + size ) <= alloc_top ;
1255
1256
base = _ALIGN_UP (base + 0x100000 , align )) {
1256
- prom_debug (" trying: 0x%x \n\r" , base );
1257
+ prom_debug (" trying: 0x%lx \n\r" , base );
1257
1258
addr = (unsigned long )prom_claim (base , size , 0 );
1258
1259
if (addr != PROM_ERROR && addr != 0 )
1259
1260
break ;
@@ -1265,12 +1266,12 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
1265
1266
return 0 ;
1266
1267
alloc_bottom = addr + size ;
1267
1268
1268
- prom_debug (" -> %x \n" , addr );
1269
- prom_debug (" alloc_bottom : %x \n" , alloc_bottom );
1270
- prom_debug (" alloc_top : %x \n" , alloc_top );
1271
- prom_debug (" alloc_top_hi : %x \n" , alloc_top_high );
1272
- prom_debug (" rmo_top : %x \n" , rmo_top );
1273
- prom_debug (" ram_top : %x \n" , ram_top );
1269
+ prom_debug (" -> %lx \n" , addr );
1270
+ prom_debug (" alloc_bottom : %lx \n" , alloc_bottom );
1271
+ prom_debug (" alloc_top : %lx \n" , alloc_top );
1272
+ prom_debug (" alloc_top_hi : %lx \n" , alloc_top_high );
1273
+ prom_debug (" rmo_top : %lx \n" , rmo_top );
1274
+ prom_debug (" ram_top : %lx \n" , ram_top );
1274
1275
1275
1276
return addr ;
1276
1277
}
@@ -1285,7 +1286,7 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align,
1285
1286
{
1286
1287
unsigned long base , addr = 0 ;
1287
1288
1288
- prom_debug ("alloc_down(%x , %x , %s)\n" , size , align ,
1289
+ prom_debug ("%s(%lx , %lx , %s)\n" , __func__ , size , align ,
1289
1290
highmem ? "(high)" : "(low)" );
1290
1291
if (ram_top == 0 )
1291
1292
prom_panic ("alloc_down() called with mem not initialized\n" );
@@ -1313,7 +1314,7 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align,
1313
1314
base = _ALIGN_DOWN (alloc_top - size , align );
1314
1315
for (; base > alloc_bottom ;
1315
1316
base = _ALIGN_DOWN (base - 0x100000 , align )) {
1316
- prom_debug (" trying: 0x%x \n\r" , base );
1317
+ prom_debug (" trying: 0x%lx \n\r" , base );
1317
1318
addr = (unsigned long )prom_claim (base , size , 0 );
1318
1319
if (addr != PROM_ERROR && addr != 0 )
1319
1320
break ;
@@ -1324,12 +1325,12 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align,
1324
1325
alloc_top = addr ;
1325
1326
1326
1327
bail :
1327
- prom_debug (" -> %x \n" , addr );
1328
- prom_debug (" alloc_bottom : %x \n" , alloc_bottom );
1329
- prom_debug (" alloc_top : %x \n" , alloc_top );
1330
- prom_debug (" alloc_top_hi : %x \n" , alloc_top_high );
1331
- prom_debug (" rmo_top : %x \n" , rmo_top );
1332
- prom_debug (" ram_top : %x \n" , ram_top );
1328
+ prom_debug (" -> %lx \n" , addr );
1329
+ prom_debug (" alloc_bottom : %lx \n" , alloc_bottom );
1330
+ prom_debug (" alloc_top : %lx \n" , alloc_top );
1331
+ prom_debug (" alloc_top_hi : %lx \n" , alloc_top_high );
1332
+ prom_debug (" rmo_top : %lx \n" , rmo_top );
1333
+ prom_debug (" ram_top : %lx \n" , ram_top );
1333
1334
1334
1335
return addr ;
1335
1336
}
@@ -1455,7 +1456,7 @@ static void __init prom_init_mem(void)
1455
1456
1456
1457
if (size == 0 )
1457
1458
continue ;
1458
- prom_debug (" %x %x \n" , base , size );
1459
+ prom_debug (" %lx %lx \n" , base , size );
1459
1460
if (base == 0 && (of_platform & PLATFORM_LPAR ))
1460
1461
rmo_top = size ;
1461
1462
if ((base + size ) > ram_top )
@@ -1475,12 +1476,12 @@ static void __init prom_init_mem(void)
1475
1476
1476
1477
if (prom_memory_limit ) {
1477
1478
if (prom_memory_limit <= alloc_bottom ) {
1478
- prom_printf ("Ignoring mem=%x <= alloc_bottom.\n" ,
1479
- prom_memory_limit );
1479
+ prom_printf ("Ignoring mem=%lx <= alloc_bottom.\n" ,
1480
+ prom_memory_limit );
1480
1481
prom_memory_limit = 0 ;
1481
1482
} else if (prom_memory_limit >= ram_top ) {
1482
- prom_printf ("Ignoring mem=%x >= ram_top.\n" ,
1483
- prom_memory_limit );
1483
+ prom_printf ("Ignoring mem=%lx >= ram_top.\n" ,
1484
+ prom_memory_limit );
1484
1485
prom_memory_limit = 0 ;
1485
1486
} else {
1486
1487
ram_top = prom_memory_limit ;
@@ -1512,12 +1513,13 @@ static void __init prom_init_mem(void)
1512
1513
alloc_bottom = PAGE_ALIGN (prom_initrd_end );
1513
1514
1514
1515
prom_printf ("memory layout at init:\n" );
1515
- prom_printf (" memory_limit : %x (16 MB aligned)\n" , prom_memory_limit );
1516
- prom_printf (" alloc_bottom : %x\n" , alloc_bottom );
1517
- prom_printf (" alloc_top : %x\n" , alloc_top );
1518
- prom_printf (" alloc_top_hi : %x\n" , alloc_top_high );
1519
- prom_printf (" rmo_top : %x\n" , rmo_top );
1520
- prom_printf (" ram_top : %x\n" , ram_top );
1516
+ prom_printf (" memory_limit : %lx (16 MB aligned)\n" ,
1517
+ prom_memory_limit );
1518
+ prom_printf (" alloc_bottom : %lx\n" , alloc_bottom );
1519
+ prom_printf (" alloc_top : %lx\n" , alloc_top );
1520
+ prom_printf (" alloc_top_hi : %lx\n" , alloc_top_high );
1521
+ prom_printf (" rmo_top : %lx\n" , rmo_top );
1522
+ prom_printf (" ram_top : %lx\n" , ram_top );
1521
1523
}
1522
1524
1523
1525
static void __init prom_close_stdin (void )
@@ -1578,7 +1580,7 @@ static void __init prom_instantiate_opal(void)
1578
1580
return ;
1579
1581
}
1580
1582
1581
- prom_printf ("instantiating opal at 0x%x ..." , base );
1583
+ prom_printf ("instantiating opal at 0x%llx ..." , base );
1582
1584
1583
1585
if (call_prom_ret ("call-method" , 4 , 3 , rets ,
1584
1586
ADDR ("load-opal-runtime" ),
@@ -1594,10 +1596,10 @@ static void __init prom_instantiate_opal(void)
1594
1596
1595
1597
reserve_mem (base , size );
1596
1598
1597
- prom_debug ("opal base = 0x%x \n" , base );
1598
- prom_debug ("opal align = 0x%x \n" , align );
1599
- prom_debug ("opal entry = 0x%x \n" , entry );
1600
- prom_debug ("opal size = 0x%x \n" , ( long ) size );
1599
+ prom_debug ("opal base = 0x%llx \n" , base );
1600
+ prom_debug ("opal align = 0x%llx \n" , align );
1601
+ prom_debug ("opal entry = 0x%llx \n" , entry );
1602
+ prom_debug ("opal size = 0x%llx \n" , size );
1601
1603
1602
1604
prom_setprop (opal_node , "/ibm,opal" , "opal-base-address" ,
1603
1605
& base , sizeof (base ));
@@ -1674,7 +1676,7 @@ static void __init prom_instantiate_rtas(void)
1674
1676
1675
1677
prom_debug ("rtas base = 0x%x\n" , base );
1676
1678
prom_debug ("rtas entry = 0x%x\n" , entry );
1677
- prom_debug ("rtas size = 0x%x\n" , ( long ) size );
1679
+ prom_debug ("rtas size = 0x%x\n" , size );
1678
1680
1679
1681
prom_debug ("prom_instantiate_rtas: end...\n" );
1680
1682
}
@@ -1732,7 +1734,7 @@ static void __init prom_instantiate_sml(void)
1732
1734
if (base == 0 )
1733
1735
prom_panic ("Could not allocate memory for sml\n" );
1734
1736
1735
- prom_printf ("instantiating sml at 0x%x ..." , base );
1737
+ prom_printf ("instantiating sml at 0x%llx ..." , base );
1736
1738
1737
1739
memset ((void * )base , 0 , size );
1738
1740
@@ -1751,8 +1753,8 @@ static void __init prom_instantiate_sml(void)
1751
1753
prom_setprop (ibmvtpm_node , "/vdevice/vtpm" , "linux,sml-size" ,
1752
1754
& size , sizeof (size ));
1753
1755
1754
- prom_debug ("sml base = 0x%x \n" , base );
1755
- prom_debug ("sml size = 0x%x\n" , ( long ) size );
1756
+ prom_debug ("sml base = 0x%llx \n" , base );
1757
+ prom_debug ("sml size = 0x%x\n" , size );
1756
1758
1757
1759
prom_debug ("prom_instantiate_sml: end...\n" );
1758
1760
}
@@ -1845,7 +1847,7 @@ static void __init prom_initialize_tce_table(void)
1845
1847
1846
1848
prom_debug ("TCE table: %s\n" , path );
1847
1849
prom_debug ("\tnode = 0x%x\n" , node );
1848
- prom_debug ("\tbase = 0x%x \n" , base );
1850
+ prom_debug ("\tbase = 0x%llx \n" , base );
1849
1851
prom_debug ("\tsize = 0x%x\n" , minsize );
1850
1852
1851
1853
/* Initialize the table to have a one-to-one mapping
@@ -1932,12 +1934,12 @@ static void __init prom_hold_cpus(void)
1932
1934
}
1933
1935
1934
1936
prom_debug ("prom_hold_cpus: start...\n" );
1935
- prom_debug (" 1) spinloop = 0x%x \n" , (unsigned long )spinloop );
1936
- prom_debug (" 1) *spinloop = 0x%x \n" , * spinloop );
1937
- prom_debug (" 1) acknowledge = 0x%x \n" ,
1937
+ prom_debug (" 1) spinloop = 0x%lx \n" , (unsigned long )spinloop );
1938
+ prom_debug (" 1) *spinloop = 0x%lx \n" , * spinloop );
1939
+ prom_debug (" 1) acknowledge = 0x%lx \n" ,
1938
1940
(unsigned long )acknowledge );
1939
- prom_debug (" 1) *acknowledge = 0x%x \n" , * acknowledge );
1940
- prom_debug (" 1) secondary_hold = 0x%x \n" , secondary_hold );
1941
+ prom_debug (" 1) *acknowledge = 0x%lx \n" , * acknowledge );
1942
+ prom_debug (" 1) secondary_hold = 0x%lx \n" , secondary_hold );
1941
1943
1942
1944
/* Set the common spinloop variable, so all of the secondary cpus
1943
1945
* will block when they are awakened from their OF spinloop.
@@ -1965,7 +1967,7 @@ static void __init prom_hold_cpus(void)
1965
1967
prom_getprop (node , "reg" , & reg , sizeof (reg ));
1966
1968
cpu_no = be32_to_cpu (reg );
1967
1969
1968
- prom_debug ("cpu hw idx = %lu \n" , cpu_no );
1970
+ prom_debug ("cpu hw idx = %u \n" , cpu_no );
1969
1971
1970
1972
/* Init the acknowledge var which will be reset by
1971
1973
* the secondary cpu when it awakens from its OF
@@ -1975,7 +1977,7 @@ static void __init prom_hold_cpus(void)
1975
1977
1976
1978
if (cpu_no != prom .cpu ) {
1977
1979
/* Primary Thread of non-boot cpu or any thread */
1978
- prom_printf ("starting cpu hw idx %lu ... " , cpu_no );
1980
+ prom_printf ("starting cpu hw idx %u ... " , cpu_no );
1979
1981
call_prom ("start-cpu" , 3 , 0 , node ,
1980
1982
secondary_hold , cpu_no );
1981
1983
@@ -1986,11 +1988,11 @@ static void __init prom_hold_cpus(void)
1986
1988
if (* acknowledge == cpu_no )
1987
1989
prom_printf ("done\n" );
1988
1990
else
1989
- prom_printf ("failed: %x \n" , * acknowledge );
1991
+ prom_printf ("failed: %lx \n" , * acknowledge );
1990
1992
}
1991
1993
#ifdef CONFIG_SMP
1992
1994
else
1993
- prom_printf ("boot cpu hw idx %lu \n" , cpu_no );
1995
+ prom_printf ("boot cpu hw idx %u \n" , cpu_no );
1994
1996
#endif /* CONFIG_SMP */
1995
1997
}
1996
1998
@@ -2268,7 +2270,7 @@ static void __init *make_room(unsigned long *mem_start, unsigned long *mem_end,
2268
2270
while ((* mem_start + needed ) > * mem_end ) {
2269
2271
unsigned long room , chunk ;
2270
2272
2271
- prom_debug ("Chunk exhausted, claiming more at %x ...\n" ,
2273
+ prom_debug ("Chunk exhausted, claiming more at %lx ...\n" ,
2272
2274
alloc_bottom );
2273
2275
room = alloc_top - alloc_bottom ;
2274
2276
if (room > DEVTREE_CHUNK_SIZE )
@@ -2494,7 +2496,7 @@ static void __init flatten_device_tree(void)
2494
2496
room = alloc_top - alloc_bottom - 0x4000 ;
2495
2497
if (room > DEVTREE_CHUNK_SIZE )
2496
2498
room = DEVTREE_CHUNK_SIZE ;
2497
- prom_debug ("starting device tree allocs at %x \n" , alloc_bottom );
2499
+ prom_debug ("starting device tree allocs at %lx \n" , alloc_bottom );
2498
2500
2499
2501
/* Now try to claim that */
2500
2502
mem_start = (unsigned long )alloc_up (room , PAGE_SIZE );
@@ -2557,7 +2559,7 @@ static void __init flatten_device_tree(void)
2557
2559
int i ;
2558
2560
prom_printf ("reserved memory map:\n" );
2559
2561
for (i = 0 ; i < mem_reserve_cnt ; i ++ )
2560
- prom_printf (" %x - %x \n" ,
2562
+ prom_printf (" %llx - %llx \n" ,
2561
2563
be64_to_cpu (mem_reserve_map [i ].base ),
2562
2564
be64_to_cpu (mem_reserve_map [i ].size ));
2563
2565
}
@@ -2567,9 +2569,9 @@ static void __init flatten_device_tree(void)
2567
2569
*/
2568
2570
mem_reserve_cnt = MEM_RESERVE_MAP_SIZE ;
2569
2571
2570
- prom_printf ("Device tree strings 0x%x -> 0x%x \n" ,
2572
+ prom_printf ("Device tree strings 0x%lx -> 0x%lx \n" ,
2571
2573
dt_string_start , dt_string_end );
2572
- prom_printf ("Device tree struct 0x%x -> 0x%x \n" ,
2574
+ prom_printf ("Device tree struct 0x%lx -> 0x%lx \n" ,
2573
2575
dt_struct_start , dt_struct_end );
2574
2576
}
2575
2577
@@ -3001,7 +3003,7 @@ static void __init prom_find_boot_cpu(void)
3001
3003
prom_getprop (cpu_pkg , "reg" , & rval , sizeof (rval ));
3002
3004
prom .cpu = be32_to_cpu (rval );
3003
3005
3004
- prom_debug ("Booting CPU hw index = %lu \n" , prom .cpu );
3006
+ prom_debug ("Booting CPU hw index = %d \n" , prom .cpu );
3005
3007
}
3006
3008
3007
3009
static void __init prom_check_initrd (unsigned long r3 , unsigned long r4 )
@@ -3023,8 +3025,8 @@ static void __init prom_check_initrd(unsigned long r3, unsigned long r4)
3023
3025
reserve_mem (prom_initrd_start ,
3024
3026
prom_initrd_end - prom_initrd_start );
3025
3027
3026
- prom_debug ("initrd_start=0x%x \n" , prom_initrd_start );
3027
- prom_debug ("initrd_end=0x%x \n" , prom_initrd_end );
3028
+ prom_debug ("initrd_start=0x%lx \n" , prom_initrd_start );
3029
+ prom_debug ("initrd_end=0x%lx \n" , prom_initrd_end );
3028
3030
}
3029
3031
#endif /* CONFIG_BLK_DEV_INITRD */
3030
3032
}
@@ -3277,7 +3279,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
3277
3279
/* Don't print anything after quiesce under OPAL, it crashes OFW */
3278
3280
if (of_platform != PLATFORM_OPAL ) {
3279
3281
prom_printf ("Booting Linux via __start() @ 0x%lx ...\n" , kbase );
3280
- prom_debug ("->dt_header_start=0x%x \n" , hdr );
3282
+ prom_debug ("->dt_header_start=0x%lx \n" , hdr );
3281
3283
}
3282
3284
3283
3285
#ifdef CONFIG_PPC32
0 commit comments