Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2973738imm; Sun, 19 Aug 2018 09:13:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxXgS8cF9ADwDYjnnkFhS9pvLCbHfalyqcAceU0M7pyoEfnhMQDCogPBU3e/jgR8lWglH46 X-Received: by 2002:a17:902:8494:: with SMTP id c20-v6mr41927669plo.336.1534695187107; Sun, 19 Aug 2018 09:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534695187; cv=none; d=google.com; s=arc-20160816; b=pZE817WRxJbCpv+HXf/1NqoS6XA2nMLKPmmwW4/aumLgrwfTNrrGqdDgLHHYx1vDLi VHwj2OnuWVrOglcO+b8vfAW81Z19FgRMaRmNHnBXSo/pHpJO98zDwcB3+gkhsvNY7GSl wNuMDdElgJEo2gydbtvfJl7Q0xkoWGjICT0etRjtwhiJcTU9vd7M8uquMuVHUU+g0D/Z Z7yAVmLoGCCHSSzxfSIhxF2kotT4f6nEyVD7xR3AviqMWgwgWuyZ6eEJsBMdTAt+OzqT sFMYJGUeHnOEo70ksl6aZ8md6HFYjBFnrx1WmOvMAOYrUJfAuGnn+e01RZLOWyKi/WdD Lo3w== 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:message-id:date :subject:cc:to:from:arc-authentication-results; bh=fAvsKRZsvpFz5XnG+k8gMmFyjULeq1DPJ5tSg3ZmwjY=; b=lCYDXxrVclyOTSklwjCw9HZDRQQebr9o3DvLrtJ6dYUv4e5rN+DFU39yiCbKPf1wUj jIvldh76c9peekCllj88BC7byd+MqZbZ65ka+xTmpCZUNxo39oN3cZwFrANDfrQNCYNZ j1hl4ASoXtFyeZKBcEEEl1H7/TofbMSKkmdhG/5tfOB5Ysh/lCNAqhuPO6nRT6kSNdmV dU+5L0hBe99gLbPR/9vAOU0g9vub+ln+0/V4pQwlPhIEOfoY/U/V9etJzNMR04uTrdkA z0/RC8TCWPCdi+ER4vKYRLDfNvvFEsNlofXD1EH8wLz6kTSMJIEoNCahPeCec3GYbAXO npCw== 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 t79-v6si7819595pfa.170.2018.08.19.09.12.33; Sun, 19 Aug 2018 09:13:07 -0700 (PDT) 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 S1726755AbeHSTWI (ORCPT + 99 others); Sun, 19 Aug 2018 15:22:08 -0400 Received: from smtp20.cstnet.cn ([159.226.251.20]:46871 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726565AbeHSTWH (ORCPT ); Sun, 19 Aug 2018 15:22:07 -0400 Received: from localhost.localdomain (unknown [110.184.154.248]) by APP-10 (Coremail) with SMTP id tACowACXn8dSlnlbU4awAg--.10S2; Mon, 20 Aug 2018 00:09:59 +0800 (CST) From: Pu Wen To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com, bp@alien8.de, pbonzini@redhat.com Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Pu Wen Subject: [PATCH v4 04/16] x86/smpboot: smp init nodelay and no flush caches before sleep Date: Mon, 20 Aug 2018 00:09:47 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-CM-TRANSID: tACowACXn8dSlnlbU4awAg--.10S2 X-Coremail-Ant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w03qof0z/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dhyana use no delay in smp_quirk_init_udelay(), and return in mwait_play_dead() as AMD does. Signed-off-by: Pu Wen --- arch/x86/kernel/smpboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index f02ecaf..5369d7f 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -676,6 +676,7 @@ static void __init smp_quirk_init_udelay(void) /* if modern processor, use no delay */ if (((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 == 6)) || + ((boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) && (boot_cpu_data.x86 >= 0x18)) || ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && (boot_cpu_data.x86 >= 0xF))) { init_udelay = 0; return; @@ -1592,7 +1593,8 @@ static inline void mwait_play_dead(void) void *mwait_ptr; int i; - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD || + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) return; if (!this_cpu_has(X86_FEATURE_MWAIT)) return; -- 2.7.4