lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] drivers/irqchip: update supports_deactivate static key to modern api
From
Date
On 26/03/18 14:54, Davidlohr Bueso wrote:
> On Mon, 26 Mar 2018, Marc Zyngier wrote:
>
>>> static struct gic_chip_data gic_data __read_mostly;
>>> -static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE;
>>> +DEFINE_STATIC_KEY_TRUE(supports_deactivate_key);
>>
>> When you combine this...
>>
>> [...]
>>
>>> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
>>> index ac2e62d613d1..9b7630cee56c 100644
>>> --- a/drivers/irqchip/irq-gic.c
>>> +++ b/drivers/irqchip/irq-gic.c
>>> @@ -121,7 +121,7 @@ static DEFINE_RAW_SPINLOCK(cpu_map_lock);
>>> #define NR_GIC_CPU_IF 8
>>> static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
>>>
>>> -static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE;
>>> +DEFINE_STATIC_KEY_TRUE(supports_deactivate_key);
>>
>> ...with that, bad things happen:
>>
>> drivers/irqchip/irq-gic-v3.o:(.data+0x278): multiple definition of `supports_deactivate_key'
>> drivers/irqchip/irq-gic.o:(.data+0x18): first defined here
>> Makefile:1032: recipe for target 'vmlinux' failed
>> make: *** [vmlinux] Error 1
>
> Hmm both were (cross) compile tested, I'll have a look.

Odd. I don't see how you can avoid this failure at link time...

M.
--
Jazz is not dead. It just smells funny...

\
 
 \ /
  Last update: 2018-03-26 16:24    [W:0.106 / U:20.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site