Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2774408imm; Mon, 10 Sep 2018 06:21:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYCwflAsxeiQdui86XSIMJz1ETIB3dYiZlW9V8AMO+1zm0/pe2TFjgeZnRAxKHbVae68Wwr X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr21429175pld.43.1536585718981; Mon, 10 Sep 2018 06:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536585718; cv=none; d=google.com; s=arc-20160816; b=fmTY2iGnq+laQE3PfuZya7/v8uxVPjWQXbqy3o1VRUyFyvm8Jw59RPdgIXAg1rxF+e Vgod+VPI/gX/iuUPhZ6IPixTbMmdi6dkXODt+B/6z+j6tLyfbQk+3RqwqgnD0jziS33k gbsaIndI9sZyYaKS1GdG3vTMC/jPEtOJsIr8j38MiR4NZeUGSbXFO7pVB7n4pgYooiHA ciqJdyLs6JkKT6JUScYJXgzbPveAWqlzqwfD2yoFhEAgO+jrciBcj3NwmU7k8hRAKCSz L9padZkt7HdmsyRGrBVx2u7tafxFGQzx2RV4z/Lm/c064Nz2sH6UBpn2L1VcOHnPquM2 0lpQ== 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=WlxVhPqWnm25/IHi3UQYjUN00P9/YVyyDvzUqFYemzA=; b=pY7b5FjB/GL8r7MSHdvvEWqQkNsQuEz6ZBxmda0Jg1Vn1go0rrqMy+kMZdw+6Q+Wxf kf2KTehXSSO1ZJxWgGB1IqwaCmngAJujWlsD+wwjlgVjQ1CD1X8x1YLrz3IjgWaZHe7g rFesyx2NwekQ4Ao9ZvpvTtsZNLzoir6bLEEZMj8l0R5tcniT1qNdxEsnoiH23YJJllZ5 jtKiQsQd5rBeeFejlA4s8zQAFu6aMsCCgQ3IKCg53VIoMuLDMnJaOwJLg7gwIp9qL3CO wTd9UZOlrEESAKi2KAxWgQa2xtdMWfKcIgwiZwpvwpfNGnkJoJMn2w0QAsbDSXWOD9gF xhzQ== 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 v12-v6si16122875pfm.341.2018.09.10.06.21.13; Mon, 10 Sep 2018 06:21:58 -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 S1728740AbeIJSKj (ORCPT + 99 others); Mon, 10 Sep 2018 14:10:39 -0400 Received: from smtp20.cstnet.cn ([159.226.251.20]:51626 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728257AbeIJSKi (ORCPT ); Mon, 10 Sep 2018 14:10:38 -0400 Received: from pw-vbox.higon.com (unknown [182.150.46.145]) by APP-10 (Coremail) with SMTP id tACowABXXWGnbpZbSPeZCQ--.1623S2; Mon, 10 Sep 2018 21:16:26 +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 v6 04/16] x86/smpboot: SMP init nodelay and not flush caches before sleep Date: Mon, 10 Sep 2018 21:16:22 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-CM-TRANSID: tACowABXXWGnbpZbSPeZCQ--.1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.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 The Hygon Dhyana CPU use no delay in smp_quirk_init_udelay(), and return in mwait_play_dead() as AMD does. Reviewed-by: Borislav Petkov 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