From nobody Mon Apr 29 16:12:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1585243100; cv=none; d=zohomail.com; s=zohoarc; b=YMaAZ+2sjyU4n1AvVloXJyACEMCx3XoOHcAuH8Gebw78J6XiFuSxXitO0lrYTFcpeDUbkKmYpoBn8qXsGj4KWD/UZ8KfV3PqMeOyBOhFBJFUZWOKvFQXfVk3wspAsUo/QAV/+d9mZbdZVj73a5ivnoMjU4mE4TvBXeMLSF7Vv6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585243100; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=RRGSUpce1GX5rQ/0PkKkU/oKGaQn4K18GfE8sX5XWDM=; b=ay5GKMBnvee6aHQqQKfSbVAXLvmVuhfi9ECSZW0XYNwymFqtEUB9arUIQrw+m6H3y6UBYp5+IPlgASrcLDmlZuWT5NeT0I9jp0+S4IPzOGMDOH21HNUQAsCXENNjsnCw0U5QCrOOrbdqxq3Q1wjcnrJXycw3Mo53o6RlMnrasqU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1585243100169474.33701971881305; Thu, 26 Mar 2020 10:18:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jHW8P-0000g1-Nm; Thu, 26 Mar 2020 17:17:37 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jHW8O-0000fv-4I for xen-devel@lists.xenproject.org; Thu, 26 Mar 2020 17:17:36 +0000 Received: from mail-wm1-f68.google.com (unknown [209.85.128.68]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id af46f9d4-6f85-11ea-92cf-bc764e2007e4; Thu, 26 Mar 2020 17:17:35 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id g62so7984173wme.1 for ; Thu, 26 Mar 2020 10:17:35 -0700 (PDT) Received: from [192.168.0.35] (87.78.186.89.cust.ip.kpnqwest.it. [89.186.78.87]) by smtp.gmail.com with ESMTPSA id p3sm4490933wrj.91.2020.03.26.10.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 10:17:33 -0700 (PDT) X-Inumbo-ID: af46f9d4-6f85-11ea-92cf-bc764e2007e4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=RRGSUpce1GX5rQ/0PkKkU/oKGaQn4K18GfE8sX5XWDM=; b=GFqaUnDFtRJLIgL+600XtKdVc+b5tMA8VGyeuZA3DzNz3i34UrD2gn8fAJ4TVgg3Qu XJop0GCZ9h7ji8VT7PeuME008NGOKdcW1hbfbQ59+IXrMrtxG2jaAlpsaEUTaCGWI0MB XRTqyBPX89yLZxasnRTQIiF8tEBaaAoUbJz5VDGzFFbqc4ZbZS2rFUOiRoNKmvmMKSbf GrvLIN7XfEff7VLqZbGyM4EJH/lG9JbBUIw1L4+eu8dmoKidQluD0pfWMuc1u+Orj9+U pXTMyr1gxDCMF8Vsu6gKsG5XqwRuxysXR92oY6727mcgJB5NqQJ0hJsAdWpK5kzp0n3W 28UQ== X-Gm-Message-State: ANhLgQ1dP1D4g05BGwhYyJ9r1b3E/j5pbnBk28cd02b99mkkMqZ9t08z 2hUJtP0pno1bXzVWeNL8uB8IZOIL X-Google-Smtp-Source: ADFU+vvPMIBAzSwZt7w4K+pD6TSMXjCa6G7hLqxVUHUwTxNivtM2UY4/sZgxNvRKkyPtPTljYHqoKQ== X-Received: by 2002:a1c:4d0c:: with SMTP id o12mr915847wmh.119.1585243054326; Thu, 26 Mar 2020 10:17:34 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 26 Mar 2020 18:17:32 +0100 Message-ID: <158524305235.31663.14043511848631384508.stgit@Palanthas> User-Agent: StGit/0.21 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Xen-devel] [PATCH] xen: x86: make init_intel_cacheinfo() void. X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau =?utf-8?b?TW9ubsOp?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" It seems that we took this code from Linux, back when the function was 'unsigned int' and the return value was used. But we are currently not doing anything with such value, so let's get rid of it and make the function void. As an anecdote, that's pretty much the same that happened in Linux as, since commit 807e9bc8e2fe6 ("x86/CPU: Move cpu_detect_cache_sizes() into init_intel_cacheinfo()") the function is void there too. Signed-off-by: Dario Faggioli Reviewed-by: Andrew Cooper --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: "Roger Pau Monn=C3=A9" --- xen/arch/x86/cpu/intel.c | 4 +--- xen/arch/x86/cpu/intel_cacheinfo.c | 4 +--- xen/include/asm-x86/processor.h | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index 4d7324e4d0..7966f4aa8a 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -346,12 +346,10 @@ static int num_cpu_cores(struct cpuinfo_x86 *c) =20 static void init_intel(struct cpuinfo_x86 *c) { - unsigned int l2 =3D 0; - /* Detect the extended topology information if available */ detect_extended_topology(c); =20 - l2 =3D init_intel_cacheinfo(c); + init_intel_cacheinfo(c); if (c->cpuid_level > 9) { unsigned eax =3D cpuid_eax(10); /* Check for version and the number of counters */ diff --git a/xen/arch/x86/cpu/intel_cacheinfo.c b/xen/arch/x86/cpu/intel_ca= cheinfo.c index 88b61fddfe..5624e8056d 100644 --- a/xen/arch/x86/cpu/intel_cacheinfo.c +++ b/xen/arch/x86/cpu/intel_cacheinfo.c @@ -116,7 +116,7 @@ static int find_num_cache_leaves(void) return i; } =20 -unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c) +void init_intel_cacheinfo(struct cpuinfo_x86 *c) { unsigned int trace =3D 0, l1i =3D 0, l1d =3D 0, l2 =3D 0, l3 =3D 0; /* Ca= che sizes */ unsigned int new_l1d =3D 0, new_l1i =3D 0; /* Cache sizes from cpuid(4) */ @@ -262,6 +262,4 @@ unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c) } =20 c->x86_cache_size =3D l3 ? l3 : (l2 ? l2 : (l1i+l1d)); - - return l2; } diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processo= r.h index fe231c5072..ea6e5497f4 100644 --- a/xen/include/asm-x86/processor.h +++ b/xen/include/asm-x86/processor.h @@ -166,7 +166,7 @@ extern void identify_cpu(struct cpuinfo_x86 *); extern void setup_clear_cpu_cap(unsigned int); extern void setup_force_cpu_cap(unsigned int); extern void print_cpu_info(unsigned int cpu); -extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); +extern void init_intel_cacheinfo(struct cpuinfo_x86 *c); =20 #define cpu_to_core(_cpu) (cpu_data[_cpu].cpu_core_id) #define cpu_to_socket(_cpu) (cpu_data[_cpu].phys_proc_id)