Received: by 10.192.165.156 with SMTP id m28csp363104imm; Fri, 13 Apr 2018 00:04:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mZAqomEG9RTzaivQxj47Q0fgZ1DZDg8XtD6jDAW4fk9pEjAOmHceEaQ21UPP1Zp45AUKi X-Received: by 10.101.101.15 with SMTP id x15mr3208484pgv.322.1523603092107; Fri, 13 Apr 2018 00:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523603092; cv=none; d=google.com; s=arc-20160816; b=RD5F2cSsJ5b72qBKfONKDxE0VuF3Wf/8GWKDb8o+KGbVdDBVTYCQJwydtwRn/mE7uu q2r8psjpXooi/Xf5uJgsuGDDxZv8iABwY3AUDgg6+NoTR5342RhPjWUTNCZnHz9Dstn1 CQv8fIte82cFYxgEal0UgGxUTpx3nR/OUq4lNA7EjxzFk3gM7gNy3OreoM9MBdTr44h0 iNhZMXKXcqyv5P4hPvMZ6SMYfvfVAfKCGD1aEyP2gHODvd/fI4MLATLoKHdyiegk3JAX 5cGG1aGojwX6wUbHRmzpcFRgS1MX7GUrn7jGBEebn7q3n+4KlqfYEVkiKbolkwHiSBL2 MH4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=t2XvX9ADOQ2cpr6mdTBEwSrAyuj0PlhDiv8/kjg6CfY=; b=IBFUq130xZ/DRBFposU0YRMdJzl8y/46i1pgJ/3K1F6DpM7H8Qj6B2KujiZupd57PC IxaPT1UtDsPVVu8rkf6R9QtJy2KEKAroreqMd4x0c+N9/kzV8dAZoqCpsQwCpCsWEC5s Pn40U4vjUMskXhDOZytuVeJGVAlsaDDAZ4nq8oFWY77Jlut2vozLOhV529qopYxa8i3K Qf+lE28xeFLZvzPTbiDD0oaSyZW5S6QXMyjwSmJuE9ZIQjh0E5KTJhjKtfZkyrESFe/i K5o5h7h+/7s5LcbJ0wn5eYEcDdfPPqk5wxWyQ7PqKtOlk3pxuiS8lICOFqnjeVhD7N68 HZ2w== 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 o11si3652548pgc.274.2018.04.13.00.04.38; Fri, 13 Apr 2018 00:04:52 -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 S1752920AbeDMHDL (ORCPT + 99 others); Fri, 13 Apr 2018 03:03:11 -0400 Received: from zxshcas1.zhaoxin.com ([180.169.121.91]:55117 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750973AbeDMHDK (ORCPT ); Fri, 13 Apr 2018 03:03:10 -0400 Received: from zxbjmbx3.zhaoxin.com (10.29.252.165) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Fri, 13 Apr 2018 15:03:06 +0800 Received: from timguo-System-Product-Name.zhaoxin.com (10.29.8.54) by zxbjmbx3.zhaoxin.com (10.29.252.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Fri, 13 Apr 2018 15:03:04 +0800 From: David Wang To: , , , , , CC: , , , , , , David Wang Subject: [PATCH] hwrng: via-rng - support new Centaur CPU Date: Fri, 13 Apr 2018 15:03:03 +0800 Message-ID: <1523602983-3418-1-git-send-email-davidwang@zhaoxin.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.29.8.54] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To zxbjmbx3.zhaoxin.com (10.29.252.165) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org New Centaur CPU(Family > 6) supprt Random Number Generator, but can't support MSR_VIA_RNG. Just like VIA Nano. Signed-off-by: David Wang --- drivers/char/hw_random/via-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c index d1f5bb5..d9448b1 100644 --- a/drivers/char/hw_random/via-rng.c +++ b/drivers/char/hw_random/via-rng.c @@ -135,7 +135,7 @@ static int via_rng_init(struct hwrng *rng) * is always enabled if CPUID rng_en is set. There is no * RNG configuration like it used to be the case in this * register */ - if ((c->x86 == 6) && (c->x86_model >= 0x0f)) { + if (((c->x86 == 6) && (c->x86_model >= 0x0f)) || (c->x86 > 6)){ if (!boot_cpu_has(X86_FEATURE_XSTORE_EN)) { pr_err(PFX "can't enable hardware RNG " "if XSTORE is not enabled\n"); -- 1.9.1