Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1369218imm; Sun, 23 Sep 2018 02:35:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV63+DomboCzz9LV03WgLPRsFr4c91si0pNuupD68/EKacxSMBmGWfWLTEacU0aojG9usfJcE X-Received: by 2002:a63:306:: with SMTP id 6-v6mr5062005pgd.393.1537695339064; Sun, 23 Sep 2018 02:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537695339; cv=none; d=google.com; s=arc-20160816; b=N6UUiLVas1WTc8rs1YbBFPzyd/0HAz6mWat9KPnt9yXeD4YZJ62V51BsoNReWGjvFI Qg6vogkFOZ4afQslkvOmQV7gki4g65H7m5Z/WySdwOTWL2pO1P3qKl2pn6vDaGdCWxgw tQYerSSV0FG6jy1nFr3EmwiSFqcfU0bFFbeYSYdWOFpE/a6SR3vJbzXIW6vqeRTX6U4f LA7rHY+fg72scpNuMZESHQtjda78MwsEXPKJiLwqk043L6bUCQYXIcO9kBzVyvhSyvOi DpPLpPEpdLhOywbzBYv8l6O60hiXXQdKJ/4J+aTRihYpwsgCKuelUkif8E9jiRMIpBDD O1NA== 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; bh=eQ96IGRoav1fYVsq79D+3HLwvJInvQFNkUuoMANoAdM=; b=H57Q2gWt11r+oYcd0AA+l1elnW0MuibYGSmq/yodV6i+wpa+peYavvWg/N/jPqt0PD 3sWMl7ps8Nrt2VRmE9pKowuj4y4yMCptZ8chH96oEnJLvTdal+dbW2ddCVzG3HWyBaxl oWddr81c/ofbBilRbNwUTTme62dAWbTICa9KZm588qO+s0qERTRsZvbHeaemGzo+/Av1 JBCTUA31y3GAY0QdYl9cR2n8PV0BpJ7svh4z4iHZ1f3KnBrvZs8k5M98iefvECcrrG4L ivGPWJy8yQtF4wUHPTniwsrRUGkwJn4IgcK2NHIsT7g/lkMMVBLM7LpC/lhKZIlGyAe9 gj6w== 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 u26-v6si28674567pge.590.2018.09.23.02.35.23; Sun, 23 Sep 2018 02:35:39 -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 S1726422AbeIWPbi (ORCPT + 99 others); Sun, 23 Sep 2018 11:31:38 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:47487 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726135AbeIWPbi (ORCPT ); Sun, 23 Sep 2018 11:31:38 -0400 Received: from pw-vbox.higon.com (unknown [182.150.46.145]) by APP-01 (Coremail) with SMTP id qwCowADXt+QrXqdbGzuzDA--.77S2; Sun, 23 Sep 2018 17:34:39 +0800 (CST) From: Pu Wen To: bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Pu Wen Subject: [PATCH v8 04/16] x86/smpboot: SMP init no delay and not flush caches before sleep Date: Sun, 23 Sep 2018 17:34:32 +0800 Message-Id: <87000fa82e273f5967c908448414228faf61e077.1537533369.git.puwen@hygon.cn> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-CM-TRANSID: qwCowADXt+QrXqdbGzuzDA--.77S2 X-Coremail-Ant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Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Hygon Dhyana CPU uses no delay in smp_quirk_init_udelay(), and returns in mwait_play_dead() as AMD does. Signed-off-by: Pu Wen Reviewed-by: Borislav Petkov --- 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