Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp525920rdb; Thu, 22 Feb 2024 10:47:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX4SicxcF5OQwaTur14EOwfL9cTZdfQhjO/02kOjQ32EUtsUXqr9wFqEUxkW/oHrGL2FsDMf+//Yw2rCOgmPt+EGBIVk5cnlsZ3o9RZIQ== X-Google-Smtp-Source: AGHT+IGx5S7/f/cgesjMMD6hfdR171ba2Icb8zfVmgfnYrd5tx50aqihHBc8X+jO8sBRmQkEh+Fm X-Received: by 2002:a05:6808:d4f:b0:3c1:823c:b1bd with SMTP id w15-20020a0568080d4f00b003c1823cb1bdmr1689224oik.45.1708627663762; Thu, 22 Feb 2024 10:47:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708627663; cv=pass; d=google.com; s=arc-20160816; b=NwgdbVgo8PBBUXKWhXLUUPpb+BfigtETaTGqQLZro4/KGS+I90Um6O4lN5001Vde+j OsaNorbyNRFVR3A3nG3GxukJcKJtxK7kjZKCSlJ0Cs3Bn/gUnCnb/wgOK/h+0O88fITE XrDOwgdQ1qyIVW6QIbfV3CbsYlPY6GqSVtRqSlIGiDl7WA1sIcR1FiKVt8ntkdqSbabW JS2Vu8wNTgGYEe85QpFzwOZne1ETp+3vkBlolX0q8W46Q5tnRiGBwTcm4XmahAa/fIpg pE3EamSawXgqhi23MSqk6ZIkrheEzMQFVwEApaq8anU7PssZfzHdtcun/p3jAh3E09rV eT9w== 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=gq2YitqP+U9O7WxgmazryqiW7nyUyZFMW8Z/iXo+ju8=; fh=HUgOPOMLUPcroonsK10/uEWpbBCP57e0QFUoVmMwghQ=; b=HXCcHFVecw6Qksg/3TfXZx1GngybIJI9ywjKF7CFYfNitOnL9FKft7Ustg1iUF76JU 6M0f2jNepotdyzhH0YZHoF3teLXdZLxHiskQ8zp5yuUrSjLEo50xBxmN1QbdN9jYCnw7 pyLZFbLPlULHADVJhvOKYaUMW2BNq6lhNpvyaaZgiF/YLEZAsMKemtMOJXpESpX2ZJtO HZtEGkUvr0Zu18vf52docaSyyoObsmz/NycwYh+OVRImkvj795OS+ICkyXRBU47+ml0G 3mJ5MAL4jzxfT9+RxEA6FpaivIkv6N6iG3Ap3DxGiYkxH55kb03Jtq9Oz99rvOmknyBz 9SLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Y0zy/b1Y"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-77174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g10-20020ac85d4a000000b0042df0409734si14313391qtx.787.2024.02.22.10.47.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 10:47:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Y0zy/b1Y"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-77174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77174-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F2E81C25C84 for ; Thu, 22 Feb 2024 18:47:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95BF21493A5; Thu, 22 Feb 2024 18:39:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Y0zy/b1Y" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 767BF13BAF5 for ; Thu, 22 Feb 2024 18:39:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627194; cv=none; b=Rr8ffdtfI0MbPrOEck+X1Nn++VHE0kO3VOiWOl4VWxcfiwdzRturwtSQKuQml+CM04CCDZBUm+wAY7x/1YfaKKTT0ldEY7E0MSrFZJQw070xXz9+PlPCrTHGGO8ziyL2E1pFSjJkOROu7tY2Q8wymlgn4DjEi0c0eFByqx2AaO8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627194; c=relaxed/simple; bh=kGouo5XDP+/c1NdKS2yBopq/rLDDpdyzpRegRLzF9jA=; h=Subject:To:Cc:From:Date:References:In-Reply-To:Message-Id; b=vD3Ta8PUXHe6XCoHALF7KAJAKYAO5Tb/two4XnUrekuc4T+YV4EI2F2s1MBNHL2LXIfh9k6iKjJ1AUIOdHGh8s8UEQc4uYd8PuSePO8dkbz5/kY7bjhvUm7lpG0Ew8O9YNj+di8JQ9VP2cxRBt5JpZe0Gndl0viO17wgLjadIE0= 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=Y0zy/b1Y; arc=none smtp.client-ip=198.175.65.16 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=1708627194; x=1740163194; h=subject:to:cc:from:date:references:in-reply-to: message-id; bh=kGouo5XDP+/c1NdKS2yBopq/rLDDpdyzpRegRLzF9jA=; b=Y0zy/b1YVWFQDF7r8c/1YUotaI9XSlAUQEvIpbBObu/4/qrKGZdMvoAS UQt4YWNLAnmlsVQO8aX0RR2SgB+PfHbxv6BFcXGKr0DDWwnTy2l68Sla6 2ptN38bE38zQQQmWfC/wlpkxj/Pzp3eD35zOzDj7rbyfEYlVbiFXVGi2B bLhTr1x4vjU71STs0PeLkzsdSZ89bfW4vNcP0AP1FNMgNp8bZmj072neA zOfHUi9pxEXS8IK5c/wDGbOFn7UMwGuPm+2DbeUeSNnvd0xz1pOPL2UDn AcLIbUz9muiEoMG5M20yA7k/i8JbfOmzR6PXL97Kq7+ScV4KxfJp/Krv/ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10992"; a="3031838" X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="3031838" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2024 10:39:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="5975574" Received: from davehans-spike.ostc.intel.com (HELO localhost.localdomain) ([10.165.164.11]) by orviesa008.jf.intel.com with ESMTP; 22 Feb 2024 10:39:53 -0800 Subject: [RFC][PATCH 20/34] x86/cpu: Remove superfluous cache alignment assignments 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:39:53 -0800 References: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> In-Reply-To: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> Message-Id: <20240222183953.97E25EC4@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 the boot CPU's ->x86_cache_alignment is authoritative and is is consistently established, these other copies only serve to clobber it needlessly. Remove them. Signed-off-by: Dave Hansen --- b/arch/x86/kernel/cpu/common.c | 2 -- 1 file changed, 2 deletions(-) diff -puN arch/x86/kernel/cpu/common.c~dup-cache-alignment arch/x86/kernel/cpu/common.c --- a/arch/x86/kernel/cpu/common.c~dup-cache-alignment 2024-02-22 10:08:58.260838084 -0800 +++ b/arch/x86/kernel/cpu/common.c 2024-02-22 10:08:58.260838084 -0800 @@ -956,7 +956,6 @@ void cpu_detect(struct cpuinfo_x86 *c) if (cap0 & (1<<19)) { if (c == &boot_cpu_data) c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; - c->x86_cache_alignment = x86_clflush_size(); } } } @@ -1834,7 +1833,6 @@ static void identify_cpu(struct cpuinfo_ c->cpuid_level = -1; /* CPUID not detected */ c->x86_clflush_size = 32; #endif - c->x86_cache_alignment = x86_clflush_size(); memset(&c->x86_capability, 0, sizeof(c->x86_capability)); #ifdef CONFIG_X86_VMX_FEATURE_NAMES memset(&c->vmx_capability, 0, sizeof(c->vmx_capability)); _