diff mbox series

Fix: do not use CONFIG_HOTPLUG_CPU for the new hotplug API

Message ID 20180311140243.4539-1-larper@axis.com
State Accepted
Headers show
Series Fix: do not use CONFIG_HOTPLUG_CPU for the new hotplug API | expand

Commit Message

Lars Persson March 11, 2018, 2:02 p.m. UTC
Kernel configurations without CONFIG_HOTPLUG_CPU throw an unknown
symbol error when attempting to insert the lttng-trace module:
 lttng_tracer: Unknown symbol lttng_hp_prepare (err 0)
 lttng_tracer: Unknown symbol lttng_hp_online (err 0)

This was caused by lttng-events and lttng-context-perf-counter not
agreeing on which preprocessor condition that should guard the use of
the hotplug API. In fact the API is available also on kernels built
without CONFIG_HOTPLUG_API.

Signed-off-by: Lars Persson <larper at axis.com>
---
 lttng-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mathieu Desnoyers March 12, 2018, 3:21 p.m. UTC | #1
----- On Mar 11, 2018, at 10:02 AM, Lars Persson lars.persson at axis.com wrote:

> Kernel configurations without CONFIG_HOTPLUG_CPU throw an unknown
> symbol error when attempting to insert the lttng-trace module:
> lttng_tracer: Unknown symbol lttng_hp_prepare (err 0)
> lttng_tracer: Unknown symbol lttng_hp_online (err 0)
> 
> This was caused by lttng-events and lttng-context-perf-counter not
> agreeing on which preprocessor condition that should guard the use of
> the hotplug API. In fact the API is available also on kernels built
> without CONFIG_HOTPLUG_API.

Do you mean CONFIG_HOTPLUG_CPU above ?

Thanks,

Mathieu

> 
> Signed-off-by: Lars Persson <larper at axis.com>
> ---
> lttng-events.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lttng-events.c b/lttng-events.c
> index 6f122dd..2cd650f 100644
> --- a/lttng-events.c
> +++ b/lttng-events.c
> @@ -2644,7 +2644,7 @@ void lttng_transport_unregister(struct lttng_transport
> *transport)
> }
> EXPORT_SYMBOL_GPL(lttng_transport_unregister);
> 
> -#if (defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE >=
> KERNEL_VERSION(4,10,0)))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
> 
> enum cpuhp_state lttng_hp_prepare;
> enum cpuhp_state lttng_hp_online;
> --
> 2.11.0
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Lars Persson March 13, 2018, 10:20 a.m. UTC | #2
On 03/12/2018 04:21 PM, Mathieu Desnoyers wrote:
> ----- On Mar 11, 2018, at 10:02 AM, Lars Persson lars.persson at axis.com wrote:
> 
>> Kernel configurations without CONFIG_HOTPLUG_CPU throw an unknown
>> symbol error when attempting to insert the lttng-trace module:
>> lttng_tracer: Unknown symbol lttng_hp_prepare (err 0)
>> lttng_tracer: Unknown symbol lttng_hp_online (err 0)
>>
>> This was caused by lttng-events and lttng-context-perf-counter not
>> agreeing on which preprocessor condition that should guard the use of
>> the hotplug API. In fact the API is available also on kernels built
>> without CONFIG_HOTPLUG_API.
> 
> Do you mean CONFIG_HOTPLUG_CPU above ?

Yes, thanks for spotting the mistake. Feel free to edit my commit message.

- Lars

> 
> Thanks,
> 
> Mathieu
> 
>>
>> Signed-off-by: Lars Persson <larper at axis.com>
>> ---
>> lttng-events.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lttng-events.c b/lttng-events.c
>> index 6f122dd..2cd650f 100644
>> --- a/lttng-events.c
>> +++ b/lttng-events.c
>> @@ -2644,7 +2644,7 @@ void lttng_transport_unregister(struct lttng_transport
>> *transport)
>> }
>> EXPORT_SYMBOL_GPL(lttng_transport_unregister);
>>
>> -#if (defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE >=
>> KERNEL_VERSION(4,10,0)))
>> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
>>
>> enum cpuhp_state lttng_hp_prepare;
>> enum cpuhp_state lttng_hp_online;
>> --
>> 2.11.0
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
Mathieu Desnoyers March 13, 2018, 4:09 p.m. UTC | #3
----- On Mar 13, 2018, at 6:20 AM, Lars Persson lars.persson at axis.com wrote:

> On 03/12/2018 04:21 PM, Mathieu Desnoyers wrote:
>> ----- On Mar 11, 2018, at 10:02 AM, Lars Persson lars.persson at axis.com wrote:
>> 
>>> Kernel configurations without CONFIG_HOTPLUG_CPU throw an unknown
>>> symbol error when attempting to insert the lttng-trace module:
>>> lttng_tracer: Unknown symbol lttng_hp_prepare (err 0)
>>> lttng_tracer: Unknown symbol lttng_hp_online (err 0)
>>>
>>> This was caused by lttng-events and lttng-context-perf-counter not
>>> agreeing on which preprocessor condition that should guard the use of
>>> the hotplug API. In fact the API is available also on kernels built
>>> without CONFIG_HOTPLUG_API.
>> 
>> Do you mean CONFIG_HOTPLUG_CPU above ?
> 
> Yes, thanks for spotting the mistake. Feel free to edit my commit message.

Merged with this modification into master, 2.9, 2.10, thanks!

Mathieu

> 
> - Lars
> 
>> 
>> Thanks,
>> 
>> Mathieu
>> 
>>>
>>> Signed-off-by: Lars Persson <larper at axis.com>
>>> ---
>>> lttng-events.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/lttng-events.c b/lttng-events.c
>>> index 6f122dd..2cd650f 100644
>>> --- a/lttng-events.c
>>> +++ b/lttng-events.c
>>> @@ -2644,7 +2644,7 @@ void lttng_transport_unregister(struct lttng_transport
>>> *transport)
>>> }
>>> EXPORT_SYMBOL_GPL(lttng_transport_unregister);
>>>
>>> -#if (defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE >=
>>> KERNEL_VERSION(4,10,0)))
>>> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
>>>
>>> enum cpuhp_state lttng_hp_prepare;
>>> enum cpuhp_state lttng_hp_online;
>>> --
>>> 2.11.0
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev at lists.lttng.org
>>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
diff mbox series

Patch

diff --git a/lttng-events.c b/lttng-events.c
index 6f122dd..2cd650f 100644
--- a/lttng-events.c
+++ b/lttng-events.c
@@ -2644,7 +2644,7 @@  void lttng_transport_unregister(struct lttng_transport *transport)
 }
 EXPORT_SYMBOL_GPL(lttng_transport_unregister);
 
-#if (defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
 
 enum cpuhp_state lttng_hp_prepare;
 enum cpuhp_state lttng_hp_online;