Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4952527rdb; Tue, 12 Dec 2023 14:24:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBBmuf3e+OWmVnNr+SdFDW0/pCNk2O5JB89nDgHV5EMYFSDoQy2LYi+wrStYEv108u5mKQ X-Received: by 2002:a05:6a21:9810:b0:18f:ef9d:d41 with SMTP id ue16-20020a056a21981000b0018fef9d0d41mr6786001pzb.45.1702419845702; Tue, 12 Dec 2023 14:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702419845; cv=none; d=google.com; s=arc-20160816; b=gCYCLjq5po/P4beRxslpwjbvqf1vKoqDoB1lcbNt4kPItlXOCViXGvV8B56DOIUPVD o7MqhWJOmd7vUs0wswAQkhoaZ7z2IJHBRElkrWm0DDd74jXoMRqgyXsPG3cOmcHugyUy mpI6bvLShEK4NLXJRzClpTytfSdA2zHTqrtQ4Edkk217+Wzi7u1gviuCEfqiJmeB476G RaYgSrjQH36qaOvXks7gPJqQGfIb6J+H3YWj/kVDxxKnKP/64AaoP9+QRPtBGMGrVE+0 o64Is9ap78atUORPQcV0vj+9eL7QMjwiIvQXlfqbYu29FqvbC7ypLNDUcgQiB8W4o57y MxEA== 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=VeVsRwJMo2FPpEIJP/WgQ70FRpN9dNKjZT1XcuaXlms=; fh=rkulcCFbXO0OeGjjJVMs3wyZ/P+7wUBJzZjha+dq7w4=; b=Mkd9VOM2umQAFmHxTYPPR/1AswgStVCziM2Hq9VM7hfHm8kHiIoU9qBuXeACo/69S/ SkSa2tnQfYeghODg2V+W713C2XtpA76OnevVSOrD0xnRjQpKDso5aPXqZbCIQdmIw/lu uVsx7oPbjKLol5N5rxdIf/s1Ii5gpkFlZ8LuuT1CRbu8m9etEcZSlrMowO41Z21Q/D2l oXxs+vYd6ZYSHNrmZJzoOXsZkMvUf31NbS+xzyKSMmt+R65YNtTHBf6sXv0+FXTH64w4 JPD5j9j0Dy+QM2eiP0FATHdz7b8V3jP8dWdAo6ySpF+NBcL6E9zgRgvJkIKCnst4+t04 lFsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Sj8CPCw/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id i1-20020a635401000000b005b8ef498e2bsi8261728pgb.461.2023.12.12.14.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 14:24:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Sj8CPCw/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3B84E80ADEEE; Tue, 12 Dec 2023 14:24:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377834AbjLLWXg (ORCPT + 99 others); Tue, 12 Dec 2023 17:23:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377809AbjLLWXb (ORCPT ); Tue, 12 Dec 2023 17:23:31 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C60E92; Tue, 12 Dec 2023 14:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702419818; x=1733955818; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=JjzpfRR25ptOiQcPUOjeLG2ZsPBSBKfEfUSAHzk+JdM=; b=Sj8CPCw/jtQ1aoS9mlpsEwWa85zo+88No/DMRjWqlpwrd85cvOhWlBDZ FkC4osGpS1y362a8kxmdpbm0nsMEMALzLjDWroBeURuc+FRqXDfDi27Ww 4f++vhnZkj+FwVE4Td8SahppdxMHVrkSAB99UhYlriI7LEWdbFJAPjVdG fXTzexq2Rea9FTY4NSHyHKs0BkZbYB/F9A5bUW6i7U3JIB6ZzaLHBHAY8 l8eJTTawhNyCXG/myzOKEXjgzjkFp4+HNnYRwvkXdSU8GKa9cU1+56EXe joY6XVruR3oswDAX/C7qkJ6cOqTZ87Cqk+dqq9xUe1we5PJETP5TkKi+c A==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="2049331" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="2049331" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 14:23:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="802631196" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="802631196" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga008.jf.intel.com with ESMTP; 12 Dec 2023 14:23:37 -0800 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 , Huang Ying , "Ravi V. Shankar" , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri , linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 4/4] x86/cacheinfo: Clean out init_cache_level() Date: Tue, 12 Dec 2023 14:25:19 -0800 Message-Id: <20231212222519.12834-5-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231212222519.12834-1-ricardo.neri-calderon@linux.intel.com> References: <20231212222519.12834-1-ricardo.neri-calderon@linux.intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Dec 2023 14:24:01 -0800 (PST) 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: Huang Ying 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 v3: * Rebased on v6.7-rc5. 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 4125e53a5ef7..1cfe0921ac67 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -1002,11 +1002,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