lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250416134452.GA918127@yaz-khff2.amd.com>
Date: Wed, 16 Apr 2025 09:44:52 -0400
From: Yazen Ghannam <yazen.ghannam@....com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Mario Limonciello <superm1@...nel.org>, Borislav Petkov <bp@...en8.de>,
	Jean Delvare <jdelvare@...e.com>,
	Andi Shyti <andi.shyti@...nel.org>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Jonathan Corbet <corbet@....net>,
	Mario Limonciello <mario.limonciello@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
	"H . Peter Anvin" <hpa@...or.com>,
	Shyam Sundar S K <Shyam-sundar.S-k@....com>,
	Hans de Goede <hdegoede@...hat.com>,
	"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:I2C/SMBUS CONTROLLER DRIVERS FOR PC" <linux-i2c@...r.kernel.org>,
	"open list:AMD PMC DRIVER" <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH v4 4/5] platform/x86/amd: pmc: use FCH_PM_BASE definition

On Wed, Apr 16, 2025 at 09:58:20AM +0200, Ingo Molnar wrote:
> 
> * Yazen Ghannam <yazen.ghannam@....com> wrote:
> 
> > On Mon, Apr 14, 2025 at 07:26:57PM -0500, Mario Limonciello wrote:
> > > From: Mario Limonciello <mario.limonciello@....com>
> > > 
> > > The s2idle mmio quirk uses a scratch register in the FCH.
> > > Adjust the code to clarify that.
> > > 
> > > Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> > > ---
> > > v4:
> > >  * Use fch.h instead
> > > ---
> > >  arch/x86/include/asm/amd/fch.h            | 1 +
> > >  drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 ++-
> > >  2 files changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/x86/include/asm/amd/fch.h b/arch/x86/include/asm/amd/fch.h
> > > index a5fd91ff92df3..9b32e8a03193e 100644
> > > --- a/arch/x86/include/asm/amd/fch.h
> > > +++ b/arch/x86/include/asm/amd/fch.h
> > > @@ -8,5 +8,6 @@
> > >  /* register offsets from PM base */
> > >  #define FCH_PM_DECODEEN			0x00
> > >  #define FCH_PM_DECODEEN_SMBUS0SEL	GENMASK(20, 19)
> > > +#define FCH_PM_SCRATCH			0x80
> > >  
> > >  #endif
> > > diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
> > > index b4f49720c87f6..3c680d2029f62 100644
> > > --- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
> > > +++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
> > > @@ -8,6 +8,7 @@
> > >   * Author: Mario Limonciello <mario.limonciello@....com>
> > >   */
> > >  
> > > +#include <asm/amd/fch.h>
> > 
> > Arch headers should go after linux headers, I think.
> 
> That's true, but it's a mostly stylistic requirement these days.
> 
> > So that arch stuff can override generic stuff.
> 
> Arch headers that override generic stuff are very much supposed to be 
> able to build stand-alone and in pretty much any order with other 
> headers, with very few exceptions. Ordering dependencies are very much 
> frowned upon, because if they don't trigger build failures they can 
> result in subtle breakages.
> 

Ah okay, thanks for clarifying!

-Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ