On 08/19/2016 01:25 AM, Jason Gunthorpe wrote:
> On Tue, Aug 16, 2016 at 02:21:53PM +0530, Nayna wrote:
>
>> I tried the suggested approach and since ACPI specific functions won't be
>> available for arch using CONFIG_OF, so the compilation fails and vice versa
>> for CONFIG_ACPI..
>
> Right, you need to stub out the read_X function with an empty inline
> when not available.
Ok

>
>> Jason, for understanding.. can you explain the issue with existing design
>> for read_log, where arch specific read_log is compiled based on CONFIG
>> option.. And then, we can just change in Makefile.. where currently it is
>> like
>>
>> ifdef CONFIG_ACPI
>>         tpm-y += tpm_acpi.o
>> else
>> ifdef CONFIG_OF
>>         tpm-y += tpm_of.o
>> endif
>> endif
>
> The 'else' is the main issue
Ok
>
>
>> this can be changed to
>> tpm-$(CONFIG_ACPI) += tpm_acpi.o
>> tpm-$(CONFIG_OF) += tpm_of.o
>
> This is fine by me, *however* only if the .o files do not define
> overlapping symbols as they do today (eg tpm_acpi contains read_log_acpi)
>
> Use some small #ifdef logic in the header file to create the inline
> stub.

Sure, my latest posted PATCH v3 4/7 does the fix as suggested here.

Thanks & Regards,
   - Nayna

>
> Jason
>


------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to