mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
s390/boot: Use boot_printk() instead of sclp_early_printk()
Consistently use boot_printk() everywhere instead of sclp_early_printk() at some places. For some places it was required (e.g. als.c), in order to stay in code compiled for the same architecture level, for other places it is not obvious why sclp_early_printk() was used instead of decompressor_printk(). Given that the whole decompressor code is compiled for the same architecture level, there is no requirement left to use different printk functions. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
bfda610814
commit
dc71555507
@ -11,32 +11,6 @@
|
||||
|
||||
static unsigned long als[] = { FACILITIES_ALS };
|
||||
|
||||
static void u16_to_hex(char *str, u16 val)
|
||||
{
|
||||
int i, num;
|
||||
|
||||
for (i = 1; i <= 4; i++) {
|
||||
num = (val >> (16 - 4 * i)) & 0xf;
|
||||
if (num >= 10)
|
||||
num += 7;
|
||||
*str++ = '0' + num;
|
||||
}
|
||||
*str = '\0';
|
||||
}
|
||||
|
||||
static void print_machine_type(void)
|
||||
{
|
||||
static char mach_str[80] = "Detected machine-type number: ";
|
||||
char type_str[5];
|
||||
struct cpuid id;
|
||||
|
||||
get_cpu_id(&id);
|
||||
u16_to_hex(type_str, id.machine);
|
||||
strcat(mach_str, type_str);
|
||||
strcat(mach_str, "\n");
|
||||
sclp_early_printk(mach_str);
|
||||
}
|
||||
|
||||
static void u16_to_decimal(char *str, u16 val)
|
||||
{
|
||||
int div = 1;
|
||||
@ -72,8 +46,7 @@ void print_missing_facilities(void)
|
||||
* z/VM adds a four character prefix.
|
||||
*/
|
||||
if (strlen(als_str) > 70) {
|
||||
strcat(als_str, "\n");
|
||||
sclp_early_printk(als_str);
|
||||
boot_printk("%s\n", als_str);
|
||||
*als_str = '\0';
|
||||
}
|
||||
u16_to_decimal(val_str, i * BITS_PER_LONG + j);
|
||||
@ -81,16 +54,18 @@ void print_missing_facilities(void)
|
||||
first = 0;
|
||||
}
|
||||
}
|
||||
strcat(als_str, "\n");
|
||||
sclp_early_printk(als_str);
|
||||
boot_printk("%s\n", als_str);
|
||||
}
|
||||
|
||||
static void facility_mismatch(void)
|
||||
{
|
||||
sclp_early_printk("The Linux kernel requires more recent processor hardware\n");
|
||||
print_machine_type();
|
||||
struct cpuid id;
|
||||
|
||||
get_cpu_id(&id);
|
||||
boot_printk("The Linux kernel requires more recent processor hardware\n");
|
||||
boot_printk("Detected machine-type number: %4x\n", id.machine);
|
||||
print_missing_facilities();
|
||||
sclp_early_printk("See Principles of Operations for facility bits\n");
|
||||
boot_printk("See Principles of Operations for facility bits\n");
|
||||
disabled_wait();
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ static void check_cleared_facilities(void)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(als); i++) {
|
||||
if ((stfle_fac_list[i] & als[i]) != als[i]) {
|
||||
sclp_early_printk("Warning: The Linux kernel requires facilities cleared via command line option\n");
|
||||
boot_printk("Warning: The Linux kernel requires facilities cleared via command line option\n");
|
||||
print_missing_facilities();
|
||||
break;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ struct prng_parm {
|
||||
static int check_prng(void)
|
||||
{
|
||||
if (!cpacf_query_func(CPACF_KMC, CPACF_KMC_PRNG)) {
|
||||
sclp_early_printk("KASLR disabled: CPU has no PRNG\n");
|
||||
boot_printk("KASLR disabled: CPU has no PRNG\n");
|
||||
return 0;
|
||||
}
|
||||
if (cpacf_query_func(CPACF_PRNO, CPACF_PRNO_TRNG))
|
||||
|
@ -210,7 +210,7 @@ static void die_oom(unsigned long size, unsigned long align, unsigned long min,
|
||||
total_mem, total_reserved_mem,
|
||||
total_mem > total_reserved_mem ? total_mem - total_reserved_mem : 0);
|
||||
print_stacktrace(current_frame_address());
|
||||
sclp_early_printk("\n\n -- System halted\n");
|
||||
boot_printk("\n\n -- System halted\n");
|
||||
disabled_wait();
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,7 @@ struct machine_info machine;
|
||||
|
||||
void error(char *x)
|
||||
{
|
||||
sclp_early_printk("\n\n");
|
||||
sclp_early_printk(x);
|
||||
sclp_early_printk("\n\n -- System halted");
|
||||
|
||||
boot_printk("\n\n%s\n\n -- System halted", x);
|
||||
disabled_wait();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user