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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180521210606.GC26644@roeck-us.net>
Date:   Mon, 21 May 2018 14:06:06 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Jae Hyun Yoo <jae.hyun.yoo@...ux.intel.com>,
        Jean Delvare <jdelvare@...e.com>,
        Jason M Biils <jason.m.bills@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
        Alan Cox <alan@...ux.intel.com>,
        Andrew Jeffery <andrew@...id.au>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Arnd Bergmann <arnd@...db.de>, Joel Stanley <joel@....id.au>,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Stef van Os <stef.van.os@...drive-technologies.com>
Subject: Re: [v4 09/11] drivers/hwmon: Add PECI cputemp driver

On Mon, May 21, 2018 at 11:01:58PM +0200, Andrew Lunn wrote:
> > >>+#if IS_ENABLED(CONFIG_X86)
> > >>+#include <asm/intel-family.h>
> > >>+#else
> > >>+#define INTEL_FAM6_HASWELL_X   0x3F
> > >>+#define INTEL_FAM6_BROADWELL_X 0x4F
> > >>+#define INTEL_FAM6_SKYLAKE_X   0x55
> > >>+#endif
> > >
> > >The entire code is very Intel specific. Why this #if instead of
> > >making the driver dependent on X86 ?
> > >
> > 
> > This code will be running on ARM kernel at this moment with a purpose
> > of monitoring remote x86 CPUs through PECI connection
> 
> How about moving what you need from asm/intel-family.h into a header
> file in include/linux/. Or move the entire header?
> 
That might be another option. The one non-option is the #if IS_ENABLED()
in the driver.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ