Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6207451ybl; Wed, 15 Jan 2020 00:16:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyGynkUAGx/+ht5GO9Pqzab0qt1nIQBClV0XWqKp3hGkkS6nv9Dw3aM68EnFqjROqaBtJ9E X-Received: by 2002:a05:6830:1f13:: with SMTP id u19mr1847267otg.237.1579076210243; Wed, 15 Jan 2020 00:16:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579076210; cv=none; d=google.com; s=arc-20160816; b=ziCnrmbQ7JW5cLVLW96KLY+TU9ewpQytLLNHLKYooeUNduLJb1cV7JujzdTViKma3/ c1CNqLDyslVAUPf3BKRxC1l4gknXLCFwTFuVdVyGFDNTP1uDVdd+dijafuYTmqBeUec9 q2lsubrrhHSIxP9u/5QkT79PM35QiiPoXd+AbfzPd434g71Vu65TGeWwuT5g8N07bbw/ iAWJeqdwu2YB28nHUZzIpqBdSRyWP/zOSEHkyw04PFcO9IAxx4C6Rr9pkIoUc0Aj8X7D iZAlrn3tRgSfSB8gCCVzI73zV8715kdHPTRUM2u46Wg2NOqyy1zFk0qjKxGUl/mERKHi jS3g== 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; bh=Ayb3nZwy5G/hyCylyN9mNUuHnAJ7Nl462qxFceSVkP4=; b=YzUbozq7kWN+LcRb5H3Qq2G8C5/TpJNGtpyg5Fd2o6VVmVazjwf63qY0vykZQ6DwNP rLIB9BQAu+nrXY7sv92I1G2N7V3MeuL7eOgmBx/o9ZLN+2+xI44ZcZ8J4lKnf23S9YU1 EqRETxSMNuRCiE5q3i2U36IWUi/UoKanTAV+3fGv8Ss1ZS/grpuwTx+R07qsfwU9Tqds PYTbwHDmC1dPyBHOORP0FATNWzizwYMLkCNYAOCi0ET8np5MI7uxY5CDbG1ALnQWjzHm BruRUu3M5FuEuVxaGp4126h+rhTpf86Ii3NGmbyYF7nDEaRpiYOmgo7aN+mVB1wqad0c Twug== 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 c26si11149214otf.288.2020.01.15.00.16.37; Wed, 15 Jan 2020 00:16:50 -0800 (PST) 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 S1728905AbgAOIPk (ORCPT + 99 others); Wed, 15 Jan 2020 03:15:40 -0500 Received: from ZXSHCAS1.zhaoxin.com ([203.148.12.81]:30187 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726310AbgAOIPk (ORCPT ); Wed, 15 Jan 2020 03:15:40 -0500 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) 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; Wed, 15 Jan 2020 16:00:30 +0800 Received: from tony-HX002EA.zhaoxin.com (10.32.64.11) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Wed, 15 Jan 2020 16:00:28 +0800 From: Tony W Wang-oc To: , , , , , CC: , , , Subject: [PATCH] x86/cpu: remove redundant cpu_detect_cache_sizes Date: Wed, 15 Jan 2020 16:00:57 +0800 Message-ID: <1579075257-6985-1-git-send-email-TonyWWang-oc@zhaoxin.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.32.64.11] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To zxbjmbx1.zhaoxin.com (10.29.252.163) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Before call cpu_detect_cache_sizes get l2size from CPUID.80000006, these CPUs have called init_intel_cacheinfo get l2size/l3size from CPUID.4. So remove the redundant function to simplify the code. Signed-off-by: Tony W Wang-oc --- arch/x86/kernel/cpu/centaur.c | 2 -- arch/x86/kernel/cpu/zhaoxin.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 14433ff..b98529e 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c @@ -71,8 +71,6 @@ 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); } - - cpu_detect_cache_sizes(c); } enum { diff --git a/arch/x86/kernel/cpu/zhaoxin.c b/arch/x86/kernel/cpu/zhaoxin.c index 8e6f2f4..452fd0a 100644 --- a/arch/x86/kernel/cpu/zhaoxin.c +++ b/arch/x86/kernel/cpu/zhaoxin.c @@ -58,8 +58,6 @@ static void init_zhaoxin_cap(struct cpuinfo_x86 *c) if (c->x86 >= 0x6) set_cpu_cap(c, X86_FEATURE_REP_GOOD); - - cpu_detect_cache_sizes(c); } static void early_init_zhaoxin(struct cpuinfo_x86 *c) -- 2.7.4