Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp622186rwb; Fri, 4 Aug 2023 20:07:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFPoXAUO9w7kKCmt+nkAEhD0HCRanri7YM+eibvV7EDYYQpveqVjZiUvmxaEG/1BY5VLnk X-Received: by 2002:a05:6870:fb88:b0:1bc:c06b:9a80 with SMTP id kv8-20020a056870fb8800b001bcc06b9a80mr4309356oab.3.1691204878904; Fri, 04 Aug 2023 20:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691204878; cv=none; d=google.com; s=arc-20160816; b=M3JWewFS4ONa9cVQ8eXKMDQCi5j3zXH9PbTccD1+4AfnXKXtxLuDae7GnmG7ozFKWi pTnAgrfJNv1sfUEw0dSjpt1xDyBQFrFiJ0D/tkhvLDHXqIKZwMI37QJNMwX19yRNXEwE rOsQiVSrrV00X0SNEAwE15l3TviJpqlWJf06Kc77ZVelzQbuB58YZsBslj/ezxEAAp/U pJxtwb+TlgQqbH2VywFBCoMu7OgQEnGH6KuVFSnn9iXvFqARRKApVAPWI3uBDyU8K/Yj DpAVrAwShEAi3JQkd7L0+/rvwzwuQ5m0nE5Hmxm5AgTIEYyn5JJr6iLSaKWVXKuMlET7 6ilg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020a056a000c9400b00686f034ed7fsi2643842pfv.371.2023.08.04.20.07.46; Fri, 04 Aug 2023 20:07:58 -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 S229639AbjHEBWG (ORCPT + 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 ); 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 To: x86@kernel.org Cc: Andreas Herrmann , Catalin Marinas , Chen Yu , Len Brown , Radu Rendec , Pierre Gondois , Pu Wen , "Rafael J. Wysocki" , Sudeep Holla , Srinivas Pandruvada , Will Deacon , Zhang Rui , stable@vger.kernel.org, Ricardo Neri , "Ravi V. Shankar" , linux-kernel@vger.kernel.org, Ricardo Neri , 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Catalin Marinas Cc: Chen Yu Cc: Len Brown Cc: Radu Rendec Cc: Pierre Gondois Cc: Pu Wen Cc: "Rafael J. Wysocki" Cc: Sudeep Holla Cc: Srinivas Pandruvada Cc: Will Deacon Cc: Zhang Rui Cc: linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- 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; } -- 2.25.1