Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp627594rdb; Thu, 22 Feb 2024 14:26:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWNJmm0ao6Qi2TO2sw9iwVrXbT25TwxzSclVKrQqpvBILVEByBtNpRC13ebVFagpgwBtALDjyypVm5AA4nI646AsT4wQjcdBhcIovKgQg== X-Google-Smtp-Source: AGHT+IGN0YHKD2D+DL4yOvi1Kmipmmn7TEyRAnXzowfeIFLOlQGjbZulpQYNHYuBq09pypRAeFOA X-Received: by 2002:a17:90b:1992:b0:298:c620:74eb with SMTP id mv18-20020a17090b199200b00298c62074ebmr153803pjb.2.1708640794905; Thu, 22 Feb 2024 14:26:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708640794; cv=pass; d=google.com; s=arc-20160816; b=DNC/XlnGk5eQ0GmmudCikkTdXjbt0ItIBvzF+gmBFpW34sH8GQ/guuKjSWkFf8U7SR AJEncRyO/CnFETtaQe42E4mZTXi5RoHSNLF+Sb7oFO4UE0mIj6BTPJhgxpajbRVIZtL9 qhr1f6S7MoZTfmaY3aIbFacY5vblbXRStvpPbnAaxgwVWJ6/1nV00ZzTeYJVGdeBBgN4 u05B6Rj8IovvLwiqDMSCP5yebqoxQizV2yaD+cnNK7C5CAYMa0WVD6xKLIQHIxG9PmTf SQ37q8m5VrGrHdwiGovC3K2I+/cOcGzCRym8rYBNjJWsmK6L+WinFEoCXu08Xjal6lBI dmdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id :in-reply-to:references:date:from:cc:to:subject:dkim-signature; bh=Rq9q6dwn2/VV36tj2I68jekJsPoOwuAeDxs6zIp+KGQ=; fh=HUgOPOMLUPcroonsK10/uEWpbBCP57e0QFUoVmMwghQ=; b=GTNmB9tszHvQ+PMW8mcZ2m+OtTQ+8xfTcWPXwPnfipJd44DetoXIYsbK531Qxb9lT/ a7PMsZ6KXqyYiYzlt68pgO15Kafz26dTXrCh7P9J2Yr5WweVsNhiaKr0bXexIiDvw0TA xsh5R9CfDQsMfWlL7mH8L026YkrBEAVpde2UWOeoHMN+A/ebZv3BCw9rotSjvX24cwk5 Wnj2hKfHc8f26fwq6yBNHvq5xRPxxV+qb+H39ypsHoNLR2i8jo76qwQCyQ3RlVnjs3WS c4Rk1HdslUmg6Ihl2GyCCbtXNs5xN6iDZTInd7qaZmMIWmEzFVsrsQ8OTKXi5tn9XfK7 gQuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XMmQWUkS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-77187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q2-20020a17090a178200b00298e0ec7379si4312914pja.162.2024.02.22.14.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 14:26:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XMmQWUkS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-77187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B4B16B299D9 for ; Thu, 22 Feb 2024 18:50:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23A5E140387; Thu, 22 Feb 2024 18:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XMmQWUkS" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00B1014F982 for ; Thu, 22 Feb 2024 18:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627215; cv=none; b=VZ8ltX3SM7EEXqfTktvOLfhoeymi+6lUmMK2Hku8mrtAyXRo7wqaqLtPTdjBLIUAGTtUGrL4xBJGs3Y5ccDIvMATCQkaGa7Um+8wjh9vrPEm5ZHXhyZpvmYpuMppP861gSdpb8qc3khMeZEy5E4OM/LBE8LrczbvVqIVtF2SwfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627215; c=relaxed/simple; bh=Obutb+ESHGeqmvetKboeJ++LnGPxlJatRe9M06PslHw=; h=Subject:To:Cc:From:Date:References:In-Reply-To:Message-Id; b=gIHQ94+l4riQqWIhf2058H41ZUxIkj8iblHnhOYUW0TVtuS582a2MNbcNlHZVQOMiXw2keKuh97ywG4Ivmmn7ib0Ag4xP8rnhKTs0PezTuIooqSuTtzZOAlQ/MGzpkl64CwWo/jjI4sHQat6dTiyIwr2RmGG7tqZaNZL7CuYxhE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XMmQWUkS; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708627212; x=1740163212; h=subject:to:cc:from:date:references:in-reply-to: message-id; bh=Obutb+ESHGeqmvetKboeJ++LnGPxlJatRe9M06PslHw=; b=XMmQWUkSPSoZY/ijTDEWeuGmpzCV/TRXR3n8mcCJMRTlsLEO8TRD6/Vu 5dFBurbEcjD36x7UdTggNcymPUyOzzaJ6FyctAxQnBhJutwZBjlVBsGgg C+j6+WF08SxcytSPc79XAyIMHvTtW/ub6ij0ekuWmDxXtORfYcXcPzAW4 BJ497F5Eguey5fw4Yo2uOsr5l1WHnkTynukjPB7SX08elVLTBKew+4DOR SeACujQ59sr8jWJbFJOdulX2xo60BIvhxWCt6qhTWNaAOf4sBfojJWfK8 Bd8Z0YFAi9AGyTtyiehltfXS0vzzbsPOmgXmLoDuu3CQvxIvPeNg3Mawd A==; X-IronPort-AV: E=McAfee;i="6600,9927,10992"; a="13584605" X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="13584605" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2024 10:40:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="10265302" Received: from davehans-spike.ostc.intel.com (HELO localhost.localdomain) ([10.165.164.11]) by orviesa004.jf.intel.com with ESMTP; 22 Feb 2024 10:40:10 -0800 Subject: [RFC][PATCH 33/34] x86/cpu: Make get_cpu_address_sizes() static and __init To: linux-kernel@vger.kernel.org Cc: kirill.shutemov@linux.intel.com,pbonzini@redhat.com,tglx@linutronix.de,x86@kernel.org,bp@alien8.de,Dave Hansen From: Dave Hansen Date: Thu, 22 Feb 2024 10:40:09 -0800 References: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> In-Reply-To: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> Message-Id: <20240222184009.B40837D5@davehans-spike.ostc.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Dave Hansen Now that all the other users are gone and the final user is in the same file and __init, get_cpu_address_sizes() can be static and __init. Signed-off-by: Dave Hansen --- b/arch/x86/kernel/cpu/common.c | 2 +- b/arch/x86/kernel/cpu/cpu.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff -puN arch/x86/kernel/cpu/common.c~get_cpu_address_sizes-__init arch/x86/kernel/cpu/common.c --- a/arch/x86/kernel/cpu/common.c~get_cpu_address_sizes-__init 2024-02-22 10:09:04.677089966 -0800 +++ b/arch/x86/kernel/cpu/common.c 2024-02-22 10:09:04.681090123 -0800 @@ -1109,7 +1109,7 @@ void get_cpu_cap(struct cpuinfo_x86 *c) apply_forced_caps(c); } -void get_cpu_address_sizes(struct cpuinfo_x86 *c) +static void __init get_cpu_address_sizes(struct cpuinfo_x86 *c) { u32 eax, ebx, ecx, edx; bool vp_bits_from_cpuid = true; diff -puN arch/x86/kernel/cpu/cpu.h~get_cpu_address_sizes-__init arch/x86/kernel/cpu/cpu.h --- a/arch/x86/kernel/cpu/cpu.h~get_cpu_address_sizes-__init 2024-02-22 10:09:04.677089966 -0800 +++ b/arch/x86/kernel/cpu/cpu.h 2024-02-22 10:09:04.681090123 -0800 @@ -64,7 +64,6 @@ static inline void tsx_ap_init(void) { } extern void init_spectral_chicken(struct cpuinfo_x86 *c); extern void get_cpu_cap(struct cpuinfo_x86 *c); -extern void get_cpu_address_sizes(struct cpuinfo_x86 *c); extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c); extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); extern void init_intel_cacheinfo(struct cpuinfo_x86 *c); _