Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4950977rwr; Sun, 23 Apr 2023 17:35:45 -0700 (PDT) X-Google-Smtp-Source: AKy350aAW92JFcbPUqcp2dPY3cdJ8f47xxC1UkoCUwvdO1stj/hS53lFrF1R9vn0u3kfepmKlq/v X-Received: by 2002:a05:6a00:2d11:b0:63d:2d99:2e92 with SMTP id fa17-20020a056a002d1100b0063d2d992e92mr15966524pfb.17.1682296545463; Sun, 23 Apr 2023 17:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682296545; cv=none; d=google.com; s=arc-20160816; b=BtoVMYF6x0+7d8XlOELecfMVgyk2wV4f+a35tk75AA0tKo34JkyRC4dEeNxMshxTnC zhBOR2lohrWSf83XmOTkATtq3WFg93vjl7nF2Ke1ZeM14PZXfnGjIeNICXJVM51NVFL7 3LkM88JQLTckXPyIldhPU8dCBXKtMHTsnzIEKHTm7jYLu9QuLrQ9+qJig41v+t2BfwXw WMvxPnFlZ3UACswAq320RoZrtWj76r8dU8iCqroiKssVjhj4EIVNvOWiJWKJFOyyJ9ow hsCL4jgilKJJDoZ7NS+K/dzAMCAnxpNjGOomxSuu3/bYb2zISuTnKfFtGLZkvjxr31i4 lDug== 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=th0I1kT//yHLiVnocvukHx/ieBiLIZmi1N2y88MUsOU=; b=e1zu96AVM9IR7Yi0u7kVFd/7P6KljGgtlNoJ0eiItyLgUemL2pmiJfsLi8qwR2VegH 3SZdaBnM0ExaMLO5Wxqu/bq23mUiA6ymfBg05JTYZs4vaSQiTciv71iz2k1hPxQc7l20 4bxidJiuPNYApmA8NkUgScO2v8elmjP8OA5QyIZRdzcjRzPNNjNKbsX3rR/jMkESI3v7 Mm8VaJxV2P4tSdQTuHXXTVzlncUZTJDYBwDLkQ2ZmDQP4UJRvIXmdo6f03fsLWp+ilfU pBFQdKwEJKQPUD5abR1xz6dQBWIQ9L6NZAOeAAibwE/YmdKOqSPGst9oeSBRcVZUiCDU ewrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=anVtz89I; 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 k28-20020aa7973c000000b0063d39484021si10096850pfg.81.2023.04.23.17.35.34; Sun, 23 Apr 2023 17:35:45 -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=anVtz89I; 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 S230205AbjDXARR (ORCPT + 99 others); Sun, 23 Apr 2023 20:17:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230121AbjDXARN (ORCPT ); Sun, 23 Apr 2023 20:17:13 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D771BAA for ; Sun, 23 Apr 2023 17:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682295431; x=1713831431; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=zQzAyc+oLBHOEgweof17wjj2fy/1ScIcJB+YP8+nzTQ=; b=anVtz89ImrfgENVeGigQhcMz6rSIzR4jpNADDbxqZLejj3O+/vnU0o8U KY+G0jcPEWddi75widwYTcCLrPF4RfPS8WniW6blUzFeEqb/U2Yy7sk4M c56w9TE9RAmk/LP7tYoEhTVG4LgCYOsdTVzhKcFwh/7LjWrMZp2k84INW gXWvLG4aErsCbjPaeTfCdotKz3kGxpuBXgHz7V0Ge/ckfNuYr6anL+miD onldWkRQ89sGxKxXNui5PutWIkNsFJMV9yZpleEFgQ8ZaEwjSkcDxdIoS 6vNrmDzAmsFzp1Ry5/0qdLIo4qflfAFVWxnpxcx+TpJIOXwlpggRtXJR2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10689"; a="411605283" X-IronPort-AV: E=Sophos;i="5.99,221,1677571200"; d="scan'208";a="411605283" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2023 17:17:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10689"; a="1022502126" X-IronPort-AV: E=Sophos;i="5.99,221,1677571200"; d="scan'208";a="1022502126" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga005.fm.intel.com with ESMTP; 23 Apr 2023 17:17:10 -0700 From: Ricardo Neri To: x86@kernel.org Cc: Andreas Herrmann , Chen Yu , Len Brown , Pu Wen , "Rafael J. Wysocki" , Srinivas Pandruvada , Zhang Rui , Ricardo Neri , linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH v2 2/2] x86/cacheinfo: Clean out init_cache_level() Date: Sun, 23 Apr 2023 17:19:56 -0700 Message-Id: <20230424001956.21434-3-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230424001956.21434-1-ricardo.neri-calderon@linux.intel.com> References: <20230424001956.21434-1-ricardo.neri-calderon@linux.intel.com> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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: Chen Yu Cc: Len Brown Cc: Pu Wen Cc: "Rafael J. Wysocki" Cc: Srinivas Pandruvada Cc: Zhang Rui Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- 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 45c4e9daf3f1..454247e459b1 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -1006,11 +1006,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