RE: [PATCH RFC v2 2/2] tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>-----Original Message-----
>From: Jason Gunthorpe [mailto:jgg@xxxxxxxx]
>Sent: Wednesday, November 15, 2017 11:40 AM
>To: Shaikh, Azhar <azhar.shaikh@xxxxxxxxx>
>Cc: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>; linux-
>integrity@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH RFC v2 2/2] tpm_tis: Move ilb_base_addr to
>tpm_tis_tcg_phy
>
>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
>}
>


Ok, sure.
Should have thought myself about this... :(

>Jason



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux