Message ID | 20230805012421.7002-4-ricardo.neri-calderon@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp209713vqr; Fri, 4 Aug 2023 18:45:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhE9ToWWZhRkYzUIQ1JExhFJ+ZsvZpm2aYUaif+l+3xgnTPwsaN2xU7bg840O/kSvQLl0z X-Received: by 2002:aca:1a09:0:b0:3a7:17b6:34e7 with SMTP id a9-20020aca1a09000000b003a717b634e7mr3521967oia.26.1691199924262; Fri, 04 Aug 2023 18:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691199924; cv=none; d=google.com; s=arc-20160816; b=dBYwOdxNQJv7jFGe/oPltlpzZ3OlKlUN6iEKH2O27UcyYVZToJ8KfFffMitWW36JGS G9lQE+XGCpn+JbIRqt10Wy/4Y3eJYcPNFyEeL5+BmwCSL/Eq3JAk5TKW1C8MomtdOp8g qjKOIMyUwO9qYPvHPk0H81vrPEZYErh46rt7K6sx9hJij15CfI61/fg7wj0O1qezED/S xp/YeoIH2ZqY67mz2kVuMqVhGcAGN/fDDeBZ3IWqnSLP4gpZVt5Py83D/5s6k4KZOCwU +a4CURnumKma5/RQ+XtsHRnzTRPNWlITPQmQTxud/d36raZjf9YP40fnX5yOZaxQSa4B EVlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=FGoeqeiJk8l8t0NIRqcw5XDiK0DVAniG/C1OetKMoB4=; fh=cQap1RldIoVhiIvapIbiszTBk2ZvNJHCQo7zRTpsmjs=; b=YNKieNO8jnuVyIoxInaNLMnoYlwFplTSBr90LO0Gc4wFZNmx4VjYVjc5dMiJesT1sm PRXID7ezwozedVFBdqeXX2UheOrbyP6uO0HukjrPIF3qW2pB3IT6LsGMLWI0axwYW1jD UbObCRrHuiGmPD1nWU1uAAbZuSKFysDZkLjoFw4A3UBBx0WBVFsQFRJx2mM7W4cf2dKo gQlWBNp23oxCFHpW0ih8p87ZIwLCdVX/IB1JVdgzkRrHI6/XRgB9t8mszZPJKLGqrBM1 r9nq4cehliguaWWwkul64+hPRdgnBlC9JnZKdvzvrBAenGgglPnGa+gjoBovfBzzftKY FjOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P5kD0UpW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a056a00150e00b0068661fafe90si2563984pfu.253.2023.08.04.18.45.05; Fri, 04 Aug 2023 18:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P5kD0UpW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbjHEBWG (ORCPT <rfc822;liqunnana@gmail.com> + 99 others); Fri, 4 Aug 2023 21:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbjHEBWC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Aug 2023 21:22:02 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73E654EE3; Fri, 4 Aug 2023 18:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691198521; x=1722734521; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=hXXoQiCRP5Pi7Qkz31vWsBY7sICJlFPkW3CrbL1Worw=; b=P5kD0UpWAfn6XY2ozg8h20XA+z2Y43PSSfNU42gXP/xZD+oiz9FKDsFt feGdmdXqeWZFjxekJ4lmekGjWEubKFA8eVZ8lkh2K0mewUm5gZKB9HN7A AxvqHgA+0yD8vYRtgOiIhMdnqkEvaSsWF3QKBBKX7BDNdNm47A6RDt487 BCrlMo45acXo5w4IDq92MTivULtbDq17huaK6BvSUAuBjkjZKPjgwMuuR /WSvNwXxTMsJaT4A8GSeV9cV0YkE+bsOLrM/QZ5cHdurM7bm3OkseRbsP fJ6UHH7BVraboqgZEzfZ65bA3gGU3YFOYpRNbI5XeYwXVfngSK1X/w965 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="367735776" X-IronPort-AV: E=Sophos;i="6.01,256,1684825200"; d="scan'208";a="367735776" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2023 18:21:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="844317627" X-IronPort-AV: E=Sophos;i="6.01,256,1684825200"; d="scan'208";a="844317627" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga002.fm.intel.com with ESMTP; 04 Aug 2023 18:21:58 -0700 From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> To: x86@kernel.org Cc: Andreas Herrmann <aherrmann@suse.com>, Catalin Marinas <catalin.marinas@arm.com>, Chen Yu <yu.c.chen@intel.com>, Len Brown <len.brown@intel.com>, Radu Rendec <rrendec@redhat.com>, Pierre Gondois <Pierre.Gondois@arm.com>, Pu Wen <puwen@hygon.cn>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Sudeep Holla <sudeep.holla@arm.com>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, Will Deacon <will@kernel.org>, Zhang Rui <rui.zhang@intel.com>, stable@vger.kernel.org, Ricardo Neri <ricardo.neri@intel.com>, "Ravi V. Shankar" <ravi.v.shankar@intel.com>, linux-kernel@vger.kernel.org, Ricardo Neri <ricardo.neri-calderon@linux.intel.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/3] x86/cacheinfo: Clean out init_cache_level() Date: Fri, 4 Aug 2023 18:24:21 -0700 Message-Id: <20230805012421.7002-4-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230805012421.7002-1-ricardo.neri-calderon@linux.intel.com> References: <20230805012421.7002-1-ricardo.neri-calderon@linux.intel.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773351651919306535 X-GMAIL-MSGID: 1773351651919306535 |
Series |
x86/cacheinfo: Set the number of leaves per CPU
|
|
Commit Message
Ricardo Neri
Aug. 5, 2023, 1:24 a.m. UTC
init_cache_level() no longer has a purpose on x86. It no longer needs to set num_leaves, and it never had to set num_levels, which was unnecessary on x86. Replace it with "return 0" simply to override the weak function, which would return an error. Cc: Andreas Herrmann <aherrmann@suse.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Yu <yu.c.chen@intel.com> Cc: Len Brown <len.brown@intel.com> Cc: Radu Rendec <rrendec@redhat.com> Cc: Pierre Gondois <Pierre.Gondois@arm.com> Cc: Pu Wen <puwen@hygon.cn> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Will Deacon <will@kernel.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> --- Changes since v2: * None Changes since v1: * Introduced this patch. --- arch/x86/kernel/cpu/cacheinfo.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c index b4334c529231..46a4a14fc96a 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -1008,11 +1008,6 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, int init_cache_level(unsigned int cpu) { - struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); - - if (!this_cpu_ci) - return -EINVAL; - this_cpu_ci->num_levels = 3; return 0; }