A bunch of SGI UV improvements, fixes and cleanups.
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmCGnFoACgkQEsHwGGHe VUqWUQ/+PgvdARGz+AYHV/FBzdkMqyqs2wEwB4vuZrjJMroon4IFn2CHbXqjmnET PMxoxQksrSaMS7Scc8mBTv6Zt9UN+m9/Kl1aBJ2EGDxhCQyDWgyi7pkV/badVp9H wHzAeRo7qlcC5bNBDnCRvzSYrshEwo3jV6L0B7h9J+xjBm1tYmDINKg/mspfeoAa toAlvVFK0AhOM8LeN5EJKpXKyAXWbz98y+v6Rj1AeapHn3CnSmYvvlcaEhzD5P4X +/BcmDZsKLLVj1iRvlqXOO+zgReJboRfQ/jxk6Nw/id6zlf2caqoy8xxmN/IM8uC vDhWf7uPuUAhpBZhBw4Y5TryDzJUjBXOgVnaZr6z0wgW1ZXN8N9ZRpIs1/R/mSrr yUcB0xv2b10tQaSwYLNNbmS4EQbvI/2Bq+aHqbGorGhODVqZ52XnllK5M1Iz3N8m 2ffwaaczlHqgnB6QOxb3yTGHPChGP7JRlAthWfI6M7DyuIa3g9I5msKOS1SuR51D qQowpvHsZ3ZytJFNJLA8Si4pgF6mZ7FsbFcPD7xXJHLwzGQ6SlD4csT4+9r9ONU/ Dzq3LufqUQL/egK8U6qdBpZGwf7nxd3bMAIfxETX1fcEla7JZ0OSSZKhbqDd2Jk8 o7TmcO1vi5wDc6tS2FbT74YzL3c1+/vwK1nZmrh/3UxBTbkauno= =nDvE -----END PGP SIGNATURE----- Merge tag 'x86_platform_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Borislav Petkov: "A bunch of SGI UV improvements, fixes and cleanups" * tag 'x86_platform_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Remove dead !CONFIG_KEXEC_CORE code x86/platform/uv: Fix !KEXEC build failure x86/platform/uv: Add more to secondary CPU kdump info x86/platform/uv: Use x2apic enabled bit as set by BIOS to indicate APIC mode x86/platform/uv: Set section block size for hubless architectures x86/platform/uv: Fix indentation warning in Documentation/ABI/testing/sysfs-firmware-sgi_uv
This commit is contained in:
commit
64a925c927
@ -39,8 +39,8 @@ Description:
|
||||
|
||||
The uv_type entry contains the hub revision number.
|
||||
This value can be used to identify the UV system version::
|
||||
"0.*" = Hubless UV ('*' is subtype)
|
||||
|
||||
"0.*" = Hubless UV ('*' is subtype)
|
||||
"3.0" = UV2
|
||||
"5.0" = UV3
|
||||
"7.0" = UV4
|
||||
|
@ -571,6 +571,7 @@ config X86_UV
|
||||
depends on X86_EXTENDED_PLATFORM
|
||||
depends on NUMA
|
||||
depends on EFI
|
||||
depends on KEXEC_CORE
|
||||
depends on X86_X2APIC
|
||||
depends on PCI
|
||||
help
|
||||
|
@ -369,6 +369,15 @@ static int __init early_get_arch_type(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* UV system found, check which APIC MODE BIOS already selected */
|
||||
static void __init early_set_apic_mode(void)
|
||||
{
|
||||
if (x2apic_enabled())
|
||||
uv_system_type = UV_X2APIC;
|
||||
else
|
||||
uv_system_type = UV_LEGACY_APIC;
|
||||
}
|
||||
|
||||
static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
|
||||
{
|
||||
/* Save OEM_ID passed from ACPI MADT */
|
||||
@ -404,11 +413,12 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
|
||||
else
|
||||
uv_hubless_system |= 0x8;
|
||||
|
||||
/* Copy APIC type */
|
||||
/* Copy OEM Table ID */
|
||||
uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);
|
||||
|
||||
pr_info("UV: OEM IDs %s/%s, SystemType %d, HUBLESS ID %x\n",
|
||||
oem_id, oem_table_id, uv_system_type, uv_hubless_system);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -453,6 +463,7 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
|
||||
early_set_hub_type();
|
||||
|
||||
/* Other UV setup functions */
|
||||
early_set_apic_mode();
|
||||
early_get_pnodeid();
|
||||
early_get_apic_socketid_shift();
|
||||
x86_platform.is_untracked_pat_range = uv_is_untracked_pat_range;
|
||||
@ -472,29 +483,14 @@ static int __init uv_acpi_madt_oem_check(char *_oem_id, char *_oem_table_id)
|
||||
if (uv_set_system_type(_oem_id, _oem_table_id) == 0)
|
||||
return 0;
|
||||
|
||||
/* Save and Decode OEM Table ID */
|
||||
/* Save for display of the OEM Table ID */
|
||||
uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);
|
||||
|
||||
/* This is the most common hardware variant, x2apic mode */
|
||||
if (!strcmp(oem_table_id, "UVX"))
|
||||
uv_system_type = UV_X2APIC;
|
||||
|
||||
/* Only used for very small systems, usually 1 chassis, legacy mode */
|
||||
else if (!strcmp(oem_table_id, "UVL"))
|
||||
uv_system_type = UV_LEGACY_APIC;
|
||||
|
||||
else
|
||||
goto badbios;
|
||||
|
||||
pr_info("UV: OEM IDs %s/%s, System/UVType %d/0x%x, HUB RevID %d\n",
|
||||
oem_id, oem_table_id, uv_system_type, is_uv(UV_ANY),
|
||||
uv_min_hub_revision_id);
|
||||
|
||||
return 0;
|
||||
|
||||
badbios:
|
||||
pr_err("UV: UVarchtype:%s not supported\n", uv_archtype);
|
||||
BUG();
|
||||
}
|
||||
|
||||
enum uv_system_type get_uv_system_type(void)
|
||||
@ -1671,6 +1667,9 @@ static __init int uv_system_init_hubless(void)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
/* Set section block size for current node memory */
|
||||
set_block_size();
|
||||
|
||||
/* Create user access node */
|
||||
if (rc >= 0)
|
||||
uv_setup_proc_files(1);
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <asm/kdebug.h>
|
||||
#include <asm/local64.h>
|
||||
#include <asm/nmi.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/uv/uv.h>
|
||||
#include <asm/uv/uv_hub.h>
|
||||
@ -91,6 +92,8 @@ static atomic_t uv_nmi_cpus_in_nmi = ATOMIC_INIT(-1);
|
||||
static atomic_t uv_nmi_slave_continue;
|
||||
static cpumask_var_t uv_nmi_cpu_mask;
|
||||
|
||||
static atomic_t uv_nmi_kexec_failed;
|
||||
|
||||
/* Values for uv_nmi_slave_continue */
|
||||
#define SLAVE_CLEAR 0
|
||||
#define SLAVE_CONTINUE 1
|
||||
@ -834,39 +837,36 @@ static void uv_nmi_touch_watchdogs(void)
|
||||
touch_nmi_watchdog();
|
||||
}
|
||||
|
||||
static atomic_t uv_nmi_kexec_failed;
|
||||
|
||||
#if defined(CONFIG_KEXEC_CORE)
|
||||
static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
|
||||
static void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
|
||||
{
|
||||
/* Check if kdump kernel loaded for both main and secondary CPUs */
|
||||
if (!kexec_crash_image) {
|
||||
if (main)
|
||||
pr_err("UV: NMI error: kdump kernel not loaded\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Call crash to dump system state */
|
||||
if (master) {
|
||||
if (main) {
|
||||
pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu);
|
||||
crash_kexec(regs);
|
||||
|
||||
pr_emerg("UV: crash_kexec unexpectedly returned, ");
|
||||
pr_emerg("UV: crash_kexec unexpectedly returned\n");
|
||||
atomic_set(&uv_nmi_kexec_failed, 1);
|
||||
if (!kexec_crash_image) {
|
||||
pr_cont("crash kernel not loaded\n");
|
||||
return;
|
||||
|
||||
} else { /* secondary */
|
||||
|
||||
/* If kdump kernel fails, secondaries will exit this loop */
|
||||
while (atomic_read(&uv_nmi_kexec_failed) == 0) {
|
||||
|
||||
/* Once shootdown cpus starts, they do not return */
|
||||
run_crash_ipi_callback(regs);
|
||||
|
||||
mdelay(10);
|
||||
}
|
||||
pr_cont("kexec busy, stalling cpus while waiting\n");
|
||||
}
|
||||
|
||||
/* If crash exec fails the slaves should return, otherwise stall */
|
||||
while (atomic_read(&uv_nmi_kexec_failed) == 0)
|
||||
mdelay(10);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_KEXEC_CORE */
|
||||
static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
|
||||
{
|
||||
if (master)
|
||||
pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n");
|
||||
atomic_set(&uv_nmi_kexec_failed, 1);
|
||||
}
|
||||
#endif /* !CONFIG_KEXEC_CORE */
|
||||
|
||||
#ifdef CONFIG_KGDB
|
||||
#ifdef CONFIG_KGDB_KDB
|
||||
static inline int uv_nmi_kdb_reason(void)
|
||||
|
Loading…
Reference in New Issue
Block a user