From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6190639FD9 for ; Mon, 29 Jun 2026 11:33:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782732832; cv=none; b=Y4Cp017XQteK4TGpCdA2BIOmXF4TIcpny7RzvyrZk9+TBeCsUN+n2FrgBhIZ2QYM7a+CRAamb9DUBD/S29AWHC7x/FHKDl0XlL9MxuieWaBHUOn+1hKbuuKPKckaecq6tPhA+Cx+dF7y6X5WV4H1/WuMS6tj8t/AR56DwDR8yxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782732832; c=relaxed/simple; bh=/KUDHBScfAp5Utgj0TmRyCkRAv0rQWd4H/x0sV32lZc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MqfiPhAOVdCQ60eQcoawMwt/7ZW9+DTCGI08059/xxzEzucn2g0k6tjc7C8MbS24jjJDgDo+pN7p0deSIB1+zYp57tWtAG/DcgpKC67kd8pl8tks1VAz9UW+dKO88bS6RsXODky9flgHQA5zjDoSJekvgGXdAsTlqqlArXCG1Gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Emwhq5yb; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Emwhq5yb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00CA91F000E9; Mon, 29 Jun 2026 11:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782732831; bh=6EUWcwstDkZFpNhKZZ8UJtLVobkuzA+tRNc5a65f/hY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Emwhq5ybi0V0vV/Bww+a9PKyNhASuG5xYwiNwspgFe30YbbvT7i/AtX3Z5d/axgat Lkp5zpN/RQlb8XMf0CBvE0wSioesPS/UE7i5JuhHf01kHlV3ZeUcwrnEA+yqMvq3SV ooklTw4Wqew5gc0ON+EDuBbDYlywzzKJ9FfV02USAzLSrO4Tpilp/irzqIiW9sdybr qWCQz3MHVnCarwmRm8b2Q1aQeVYP5Vu5oebpdYniGabPaa6t0p7Ognll8Z4l1jEWgA O+vd0PzhpwPwpWR2hrSZgE1uelFGP2y8FTvmTuEdFhpg75Rumj9Pts6rJWzl/HurAO Fw16Sr6hXTkig== Date: Mon, 29 Jun 2026 13:33:46 +0200 From: Ingo Molnar To: Juergen Gross Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH 05/32] x86/mtrr: Stop using 32-bit MSR interfaces Message-ID: References: <20260629060526.3638272-1-jgross@suse.com> <20260629060526.3638272-6-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260629060526.3638272-6-jgross@suse.com> * Juergen Gross wrote: > amd_get_mtrr(unsigned int reg, unsigned long *base, > unsigned long *size, mtrr_type *type) > { > - unsigned long low, high; > + unsigned long val; > + struct msr msr; So, 'struct msr' is defined in , but: > static void > amd_set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type) > { > - u32 regs[2]; > + union { > + u32 regs[2]; > + u64 val; > + } msr; Why do we use a local anonymous union here with overlapping nomenclature and a confusingly different but (AFAICS) functionally equivalent definition to 'struct msr'? Thanks, Ingo