public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
To: Guenter Roeck <linux@roeck-us.net>, Andrew Lunn <andrew@lunn.ch>
Cc: Jean Delvare <jdelvare@suse.com>,
	Jason M Biils <jason.m.bills@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
	Alan Cox <alan@linux.intel.com>, Andrew Jeffery <andrew@aj.id.au>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>, Joel Stanley <joel@jms.id.au>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Stef van Os <stef.van.os@prodrive-technologies.com>
Subject: Re: [v4 09/11] drivers/hwmon: Add PECI cputemp driver
Date: Mon, 21 May 2018 14:36:31 -0700	[thread overview]
Message-ID: <48604cd2-90bb-b2e2-ac2e-f35b8eac1ab0@linux.intel.com> (raw)
In-Reply-To: <20180521210606.GC26644@roeck-us.net>

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

  reply	other threads:[~2018-05-21 21:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 19:59 [v4 09/11] drivers/hwmon: Add PECI cputemp driver Jae Hyun Yoo
2018-05-21 20:42 ` Guenter Roeck
2018-05-21 20:50   ` Jae Hyun Yoo
2018-05-21 20:52     ` Jae Hyun Yoo
2018-05-21 21:01     ` Andrew Lunn
2018-05-21 21:06       ` Guenter Roeck
2018-05-21 21:36         ` Jae Hyun Yoo [this message]
2018-05-21 21:04     ` Guenter Roeck
2018-05-21 21:24       ` Jae Hyun Yoo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48604cd2-90bb-b2e2-ac2e-f35b8eac1ab0@linux.intel.com \
    --to=jae.hyun.yoo@linux.intel.com \
    --cc=alan@linux.intel.com \
    --cc=andrew@aj.id.au \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=jason.m.bills@linux.intel.com \
    --cc=jdelvare@suse.com \
    --cc=joel@jms.id.au \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=stef.van.os@prodrive-technologies.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox