From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Shaikh, Azhar" <azhar.shaikh@intel.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>
Subject: Re: [PATCH RFC v2 2/2] tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy
Date: Wed, 15 Nov 2017 12:39:57 -0700 [thread overview]
Message-ID: <20171115193957.GT25894@ziepe.ca> (raw)
In-Reply-To: <5FFFAD06ADE1CA4381B3F0F7C6AF582896DAEB@ORSMSX109.amr.corp.intel.com>
On Wed, Nov 15, 2017 at 07:36:47PM +0000, Shaikh, Azhar wrote:
> If I implement is_bsw() as below and move it(is_bsw()) outside the #ifdef CONFIG_X86, I will still get compilation errors for non-x86 platforms, since INTEL_FAM6_ATOM_AIRMONT will be undefined.
>
> bool is_bsw(void)
> {
> if (!IS_ENABLED(CONFIG_X86))
> return false;
> return ((boot_cpu_data.x86_model == INTEL_FAM6_ATOM_AIRMONT) ? 1 : 0);
> }
>
> I think I will have to keep is_bsw() implementation unchanged?
No, still move the #ifdef to is_bsw, just like this instead:
bool is_bsw(void)
{
#ifdef CONFIG_X86
return ((boot_cpu_data.x86_model == INTEL_FAM6_ATOM_AIRMONT) ? 1
: 0);
#else
return false;
#endif
}
Jason
next prev parent reply other threads:[~2017-11-15 19:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1510090328-153106-1-git-send-email-azhar.shaikh@intel.com>
2017-11-14 21:38 ` [PATCH RFC v2 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Jarkko Sakkinen
2017-11-14 21:59 ` Shaikh, Azhar
2017-11-15 8:13 ` Jarkko Sakkinen
[not found] ` <1510090328-153106-3-git-send-email-azhar.shaikh@intel.com>
2017-11-14 23:28 ` [PATCH RFC v2 2/2] tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy Jason Gunthorpe
2017-11-15 8:14 ` Jarkko Sakkinen
2017-11-15 17:58 ` Shaikh, Azhar
2017-11-15 19:36 ` Shaikh, Azhar
2017-11-15 19:39 ` Jason Gunthorpe [this message]
2017-11-15 19:57 ` Shaikh, Azhar
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=20171115193957.GT25894@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=azhar.shaikh@intel.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-integrity@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).