From patchwork Mon Mar 4 10:32:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1907493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TpFQN6764z23fC for ; Mon, 4 Mar 2024 21:33:00 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rh5cq-0002MT-O2; Mon, 04 Mar 2024 10:32:52 +0000 Received: from mail-pg1-f176.google.com ([209.85.215.176]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rh5cZ-00028O-4b for kernel-team@lists.ubuntu.com; Mon, 04 Mar 2024 10:32:35 +0000 Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-5cf2d73a183so3838401a12.1 for ; Mon, 04 Mar 2024 02:32:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709548353; x=1710153153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3kgmdCSeN5ZmQtvfL485XrTGeIATO05I5DoJL+xITdA=; b=aFdd8ng9oxeYu4sOPfOyH6t8sXtShBmYO4ss615gIrefs7l79VeJz9N27u7IGrTjMC tovk22eTfXU3PbrIzCXy6F0tHqFjQLCj9A10faicOyWRlFnEfVnMnuKi7asl8nIGma1S UIupteiEICaZTFZvVSZ7Myb8xd78eGJMofsh2jsWcxkFaVu522iKtvDp60C9wqb2QDno Z0et8JEAHfqfLSYFcoBjRy/rM6Do4M0beJHZUzQfJpsY+FhYfa23FyewYhpogU5J9pFc 8b9WOtQQ/BXQSyc+CYBcenBTVteKsW98F44CgdhMtkpNLMH5yNjpxnxFFClPOfF0vYf1 rMMQ== X-Gm-Message-State: AOJu0Ywk56jwMVEGLOE8EUlR5oXKat2+koxdFhjfDUnFrzlWWyqQgjtd +HhIV2inCxf8D7L6E4LfCOV2Y7Ug6tMz7pgG17CcAq2QD+3ylnIQo/kzX/Kd X-Google-Smtp-Source: AGHT+IFyPDRi9ktMpdYr3ih90SxLdmQTo/kV7KFyNFTg3R7mYSC4PY3rFq0qkKiT9LPoqgbg7m3L0g== X-Received: by 2002:a17:90b:4d91:b0:296:f2d5:6567 with SMTP id oj17-20020a17090b4d9100b00296f2d56567mr11595268pjb.4.1709548353066; Mon, 04 Mar 2024 02:32:33 -0800 (PST) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id u13-20020a17090abb0d00b0029b2eccd158sm4396804pjr.48.2024.03.04.02.32.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:32:32 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/4][Noble] UBUNTU: SAUCE: x86/cacheinfo: Clean out init_cache_level() Date: Mon, 4 Mar 2024 18:32:06 +0800 Message-ID: <20240304103206.686842-5-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304103206.686842-1-vicamo.yang@canonical.com> References: <20240304103206.686842-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.176; envelope-from=vicamo@gmail.com; helo=mail-pg1-f176.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Ricardo Neri BugLink: https://bugs.launchpad.net/bugs/2049793 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 (cherry-picked from https://lore.kernel.org/all/20231212222519.12834-5-ricardo.neri-calderon@linux.intel.com/raw) Signed-off-by: You-Sheng Yang --- 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 4125e53a5ef79..1cfe0921ac677 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; }