Received: by 10.223.164.202 with SMTP id h10csp1294794wrb; Mon, 27 Nov 2017 00:13:14 -0800 (PST) X-Google-Smtp-Source: AGs4zMaH/fHKzUnCRQnVgXkA0vFZRYbYU1NqL3zcBrjwolMFtynLikYdMsDk1jPEMVnswbKzuOZC X-Received: by 10.159.231.15 with SMTP id w15mr3507708plq.410.1511770394063; Mon, 27 Nov 2017 00:13:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511770394; cv=none; d=google.com; s=arc-20160816; b=rqoYTfVNHskq26KXsnGTptNekjpu2ojF4/tJNKgPO/BP2i8X0k18lOL63X+dpgI4Bi vWyHV85rkMzfW4E4rhxkWh1X7gwudSm/oGSQvIjceiW0Lls60bc51vgm6hamHijcTyFC Np9DgJfdlAuTUDbbH/VmBrkzhQKMworFT8bPH2CdCpNHhVn1vy3ow5Pju6dKFFikv4oN ucHeqXKPW0/Lj0cdRK1R4s8NfcAXTcnRYH4HklbN27zwGU1xM6eZDrvhMrJexTgSBCaK +mpIBGvQufg81VMlPud9f8nJ+gpIlFYO7004eLF//z4/1XWWeDamunJN633VbasCBkIR hU3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2GBBMJ2uPLtEwzvmUnduLkKv6Ni5i3OfL7IRH/imnz8=; b=tSrP939V4bGX1joSEVXmRtAwybLMVIGxpNGeQCGe0q/9SvUAMYRMs0ysqlI1ue2Vvg Ts8YwonpMqI4K2MOpYwDv2zcZM/JwpOmpYJ6b96J3+hOLGkWCUWmjXBMMAKLVfGR8vJT xncnm+48lNaDnh2bwY3j4zVXRKgHRsSPN+9SmwLdiXeNd499trjeRZrwnqSgobJ5eyJ1 NhCH4Y5dJ3sm+CzChdIryySyqRdYmECqFbv4SruBfIBLZ5jVPKfIi9UPIlRyWILa/MPS CgOKx5qpt0W1GCRZXOtqWReEHQKswWLYhLiQs0V45BR1JVCcpsMIHhN7EYhnAEYowT9t W9SA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e90si20373172pfj.4.2017.11.27.00.13.02; Mon, 27 Nov 2017 00:13:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751598AbdK0IMN (ORCPT + 78 others); Mon, 27 Nov 2017 03:12:13 -0500 Received: from thoth.sbs.de ([192.35.17.2]:36545 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbdK0IMM (ORCPT ); Mon, 27 Nov 2017 03:12:12 -0500 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id vAR8BvGd015448 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 09:11:57 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.153]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id vAR8BtEU021016; Mon, 27 Nov 2017 09:11:57 +0100 From: Jan Kiszka To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com Subject: [PATCH v2 02/12] x86: Control warm reset setup via legacy feature flag Date: Mon, 27 Nov 2017 09:11:44 +0100 Message-Id: <44376558129d70a2c1527959811371ef4b82e829.1511770314.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kiszka Allow to turn off the setup of BIOS-managed warm reset via a new flag in x86_legacy_features. Besides the UV1, we will soon add another platform that needs this switched off. Signed-off-by: Jan Kiszka --- arch/x86/include/asm/x86_init.h | 1 + arch/x86/kernel/apic/x2apic_uv_x.c | 1 + arch/x86/kernel/platform-quirks.c | 1 + arch/x86/kernel/smpboot.c | 4 ++-- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index aa4747569e23..fc2f082ac635 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -212,6 +212,7 @@ enum x86_legacy_i8042_state { struct x86_legacy_features { enum x86_legacy_i8042_state i8042; int rtc; + int warm_reset; int no_vga; int reserve_bios_regions; struct x86_legacy_devices devices; diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index e1b8e8bf6b3c..6de35fc8fb3a 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -316,6 +316,7 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) } else if (!strcmp(oem_table_id, "UVH")) { /* Only UV1 systems: */ uv_system_type = UV_NON_UNIQUE_APIC; + x86_platform.legacy.warm_reset = 0; __this_cpu_write(x2apic_extra_bits, pnodeid << uvh_apicid.s.pnode_shift); uv_set_apicid_hibit(); uv_apic = 1; diff --git a/arch/x86/kernel/platform-quirks.c b/arch/x86/kernel/platform-quirks.c index 39a59299bfa0..235fe6008ac8 100644 --- a/arch/x86/kernel/platform-quirks.c +++ b/arch/x86/kernel/platform-quirks.c @@ -9,6 +9,7 @@ void __init x86_early_init_platform_quirks(void) { x86_platform.legacy.i8042 = X86_LEGACY_I8042_EXPECTED_PRESENT; x86_platform.legacy.rtc = 1; + x86_platform.legacy.warm_reset = 1; x86_platform.legacy.reserve_bios_regions = 0; x86_platform.legacy.devices.pnpbios = 1; diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 3d01df7d7cf6..21995490fc5e 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -947,7 +947,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle, * the targeted processor. */ - if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { + if (x86_platform.legacy.warm_reset) { pr_debug("Setting warm reset code and vector.\n"); @@ -1019,7 +1019,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle, /* mark "stuck" area as not stuck */ *trampoline_status = 0; - if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { + if (x86_platform.legacy.warm_reset) { /* * Cleanup possible dangling ends... */ -- 2.12.3 From 1588614065554618165@xxx Wed Jan 03 23:00:33 +0000 2018 X-GM-THRID: 1585184727332713868 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01