[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48604cd2-90bb-b2e2-ac2e-f35b8eac1ab0@linux.intel.com>
Date: Mon, 21 May 2018 14:36:31 -0700
From: Jae Hyun Yoo <jae.hyun.yoo@...ux.intel.com>
To: Guenter Roeck <linux@...ck-us.net>, Andrew Lunn <andrew@...n.ch>
Cc: 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 5/21/2018 2:06 PM, Guenter Roeck wrote:
> 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
>
Looks like only this module includes the header file like this way. So
I'm going to keep this code for now after adding a comment like Guenter
suggested. We could consider moving the header file location later if
other module also needs the header in the same way. Thanks Andrew and
Guenter!
-Jae
Powered by blists - more mailing lists