|
@@ -689,7 +689,7 @@ static void __init setup_memory(void)
|
|
/*
|
|
/*
|
|
* Setup hardware capabilities.
|
|
* Setup hardware capabilities.
|
|
*/
|
|
*/
|
|
-static void __init setup_hwcaps(void)
|
|
|
|
|
|
+static int __init setup_hwcaps(void)
|
|
{
|
|
{
|
|
static const int stfl_bits[6] = { 0, 2, 7, 17, 19, 21 };
|
|
static const int stfl_bits[6] = { 0, 2, 7, 17, 19, 21 };
|
|
struct cpuid cpu_id;
|
|
struct cpuid cpu_id;
|
|
@@ -755,9 +755,11 @@ static void __init setup_hwcaps(void)
|
|
elf_hwcap |= HWCAP_S390_TE;
|
|
elf_hwcap |= HWCAP_S390_TE;
|
|
|
|
|
|
/*
|
|
/*
|
|
- * Vector extension HWCAP_S390_VXRS is bit 11.
|
|
|
|
|
|
+ * Vector extension HWCAP_S390_VXRS is bit 11. The Vector extension
|
|
|
|
+ * can be disabled with the "novx" parameter. Use MACHINE_HAS_VX
|
|
|
|
+ * instead of facility bit 129.
|
|
*/
|
|
*/
|
|
- if (test_facility(129))
|
|
|
|
|
|
+ if (MACHINE_HAS_VX)
|
|
elf_hwcap |= HWCAP_S390_VXRS;
|
|
elf_hwcap |= HWCAP_S390_VXRS;
|
|
get_cpu_id(&cpu_id);
|
|
get_cpu_id(&cpu_id);
|
|
add_device_randomness(&cpu_id, sizeof(cpu_id));
|
|
add_device_randomness(&cpu_id, sizeof(cpu_id));
|
|
@@ -794,7 +796,9 @@ static void __init setup_hwcaps(void)
|
|
strcpy(elf_platform, "z13");
|
|
strcpy(elf_platform, "z13");
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
+arch_initcall(setup_hwcaps);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Add system information as device randomness
|
|
* Add system information as device randomness
|
|
@@ -882,11 +886,6 @@ void __init setup_arch(char **cmdline_p)
|
|
cpu_init();
|
|
cpu_init();
|
|
numa_setup();
|
|
numa_setup();
|
|
|
|
|
|
- /*
|
|
|
|
- * Setup capabilities (ELF_HWCAP & ELF_PLATFORM).
|
|
|
|
- */
|
|
|
|
- setup_hwcaps();
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Create kernel page tables and switch to virtual addressing.
|
|
* Create kernel page tables and switch to virtual addressing.
|
|
*/
|
|
*/
|