Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp513648imm; Wed, 29 Aug 2018 05:45:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1//Vp2/JQCKGdwkxVm8OiI/YfRHEyVLdiu/7cHxK5uZE69bbPDQTqnQg6LEVbjquIZA3i X-Received: by 2002:a17:902:ac1:: with SMTP id 59-v6mr5848423plp.18.1535546754629; Wed, 29 Aug 2018 05:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535546754; cv=none; d=google.com; s=arc-20160816; b=z/Jw5kx4asCht6AcTEzWFskyc5aJy6nGW3UnL/cBrjMjoiMSXaqNhAxqdWPvmTKA+0 Khlj1TNIlEcuJjjzsTKwzgh0sQm0Vo9XKeU+G24yUKNv1BPwIaoo2cheb5xkQjRnR5i/ PNeKL5GSqz5VqPUH7dVb766o/V3fuoW6NxIugxKbfR8gpqNZriXHq7HPjAN0QQPHeUuW UPmO3M0/PZVHnEBAVO5vkShQtRdBvOtsZFjDdS7Dn7rBbuEVAuCjDIaQGEIV6ChXahqs e8oEXjdGHrPH98hixFMLK42KDePnTmF0XpCgoacXEobWZExDjEYcr615DwmYPseuUqeu fDqg== 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=kw5pC3Y0HOGiwLRxrIHhbAR61ZfOtDEUnrgFIoogksOjhOKDtDBrb1Mn6Spzch7oUw TPhZu1rP75Yd8Ek/9iZLSN9I878iIbyqAbU/ToS09EZOSOW9sTStWmI87lcbAlw/ywp3 a0Oy3IcDALz2e4YjZfEdl9S/a1fV1rOhT6Apl1o3vWPwO2zzwYLTrGmqdMGCRmXFytZr MCui4SfiI3DWEOr4fAuQKY1BP/2gI4XcSQ6jpZEbDuQc1O/nlLRKrHooEIiDJoLtMTXz DBLP+WK5dVigWrxwZM+mzfA48XrWc/bvIUaMu+7owlWLmTj9/YTujXTE+fjtfve0S8WR L0gQ== 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 a9-v6si3624836pgf.380.2018.08.29.05.45.39; Wed, 29 Aug 2018 05:45:54 -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 S1728558AbeH2Qkr (ORCPT + 99 others); Wed, 29 Aug 2018 12:40:47 -0400 Received: from smtp17.cstnet.cn ([159.226.251.17]:47917 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727590AbeH2Qkr (ORCPT ); Wed, 29 Aug 2018 12:40:47 -0400 Received: from pw-vbox.higon.com (unknown [182.150.46.145]) by APP-09 (Coremail) with SMTP id swCowACXnJD+lIZbJ4j_BA--.83S2; Wed, 29 Aug 2018 20:43:46 +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 v5 04/16] x86/smpboot: smp init nodelay and no flush caches before sleep Date: Wed, 29 Aug 2018 20:43:41 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-CM-TRANSID: swCowACXnJD+lIZbJ4j_BA--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UUU= X-Originating-IP: [182.150.46.145] X-CM-SenderInfo: psxzv046klw03qof0z/ 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