Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp142706pxk; Fri, 11 Sep 2020 02:50:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB3MnHoiKCe7clSPZpecfgubSD/bffhM4PQ5zTYnjF5tD+OwpNkzaT44MipiadwqtK5vNu X-Received: by 2002:a05:6402:503:: with SMTP id m3mr1118833edv.45.1599817801096; Fri, 11 Sep 2020 02:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599817801; cv=none; d=google.com; s=arc-20160816; b=ZjT58rwyUhySHx+1s/15yJmNNWQjPpNFC3KLh8gz4aoriUXJpwX7+eA/AzY1L7F97G p5hdZUOU4kukk0BOaXMppDE59VSfemARYeUh9PxVVncl/oSO6H5n4knUMfZqxsFeDQFG kCYEq0B/S8G4B+JAT1d9XhSGYm7SIFZspF8FBi68Ec8X9tyLlmBnVMvUP5/2eEmX9Nh0 LUVawxVxV/MZkA01y3Vi+Z44PWiZbICyY/S+IblODZHqhlLhJafZS6L6Sqi9AvfiCfiq 1gCfu4OyIuvGZBD3x2qZmiIgmYiHO+9ZlbdyBRM90mfhaIN4CsLAepaiqrejvp3MZbxo spdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=oTZalsZXjUqJZx49YZ1BHYFN6O49FTtm+F6xL4dmM9A=; b=F+nVadmOU5okBGuD/GV8myslGNi0llvkiepoQu31pnAQib6sAWCCU1/HH8HaArGzbO OWyNRYXo4I2+v0WQP2LcL0u6QWLitSwRVtAvmz9uaJoU1x+iz/opCAb7DEHleUtgwO5N sbuiEkmZxybEzLwdXnVtlY+D2vX1DpLRVLNjvc+KpE5PkarA5Ft7jeS7J4vW4tqrkauu Z88bTgkomWbGbeUB1ExBvRPZdcoKfHaElfNyvFQi4HFCH3d2klnQK0xdoBH9LVkD2L6g lw/6kaS0h5QAQYYnHTe2QfQA2yYO7tPvl+GbF+ei1VoifWNeyPKB69Q4bjeFlKblo0ge AOSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=tOXsTOXS; dkim=neutral (no key) header.i=@linutronix.de header.b=8EjZXSM4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x20si902329edv.305.2020.09.11.02.49.37; Fri, 11 Sep 2020 02:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=tOXsTOXS; dkim=neutral (no key) header.i=@linutronix.de header.b=8EjZXSM4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725823AbgIKJrj (ORCPT + 99 others); Fri, 11 Sep 2020 05:47:39 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:45924 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbgIKJrh (ORCPT ); Fri, 11 Sep 2020 05:47:37 -0400 Date: Fri, 11 Sep 2020 09:47:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1599817655; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oTZalsZXjUqJZx49YZ1BHYFN6O49FTtm+F6xL4dmM9A=; b=tOXsTOXS4oXwERYtEVbI18z+kKyidcfl6OjYPdhv6cy6+7UiodyDNbYHcSQkMg+hXQDCBX 7jOxtmvVQoxyU/N+9pQV7VxQmLEsNP1z4M9U2aS/A++maa3T/Y/R8gxwDWbXt+NlpHSEB/ MHy6DzL8EyEK1hxk2J03bCaTed40WkCbmAckkWjuzQhvPZjOuDvRe3I8xZjU98rr75Hpi2 dU4oxjF0uESQNo76UhGhp+MQoMrCxzKEIAl38pAk+pWjKJ9yLsFw/gZ5tedoIw5Jsa2cAu lfd32fnS6Qc+KM36pDVyInoj7IHaghLSmXenRFvx5mmcPvlfaEtk1ME5pWQ8QQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1599817655; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oTZalsZXjUqJZx49YZ1BHYFN6O49FTtm+F6xL4dmM9A=; b=8EjZXSM4u4zID4rkQJz4BguDisYMUdXkH2oL8Tu7IMzIQCkWmGy6jgTTPCO6BcGEZRDDqb m+DQzVcKnBbt4rBA== From: "tip-bot2 for Tony W Wang-oc" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support Cc: "Tony W Wang-oc" , Borislav Petkov , x86 , LKML In-Reply-To: <1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com> References: <1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com> MIME-Version: 1.0 Message-ID: <159981765454.4289.4295139362994948061.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 33b4711df4c1b3aec7c267c60fc24abccfadd40c Gitweb: https://git.kernel.org/tip/33b4711df4c1b3aec7c267c60fc24abccfadd40c Author: Tony W Wang-oc AuthorDate: Tue, 08 Sep 2020 18:57:46 +08:00 Committer: Borislav Petkov CommitterDate: Fri, 11 Sep 2020 10:53:19 +02:00 x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support Add Centaur family >=7 CPUs specific initialization support. Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com --- arch/x86/kernel/cpu/centaur.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 5f81158..345f7d9 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c @@ -65,6 +65,9 @@ static void init_c3(struct cpuinfo_x86 *c) c->x86_cache_alignment = c->x86_clflush_size * 2; set_cpu_cap(c, X86_FEATURE_REP_GOOD); } + + if (c->x86 >= 7) + set_cpu_cap(c, X86_FEATURE_REP_GOOD); } enum { @@ -95,7 +98,8 @@ static void early_init_centaur(struct cpuinfo_x86 *c) if (c->x86 == 5) set_cpu_cap(c, X86_FEATURE_CENTAUR_MCR); #endif - if (c->x86 == 6 && c->x86_model >= 0xf) + if ((c->x86 == 6 && c->x86_model >= 0xf) || + (c->x86 >= 7)) set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); #ifdef CONFIG_X86_64 @@ -204,7 +208,7 @@ static void init_centaur(struct cpuinfo_x86 *c) sprintf(c->x86_model_id, "WinChip %s", name); } #endif - if (c->x86 == 6) + if (c->x86 == 6 || c->x86 >= 7) init_c3(c); #ifdef CONFIG_X86_64 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);