lkml.org 
[lkml]   [2017]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] powerpc: make irq_chip const, __initdata and __initconst
Date
Julia Lawall <julia.lawall@lip6.fr> writes:

> On Wed, 20 Sep 2017, Michael Ellerman wrote:
>
>> Bhumika Goyal <bhumirks@gmail.com> writes:
>>
>> > Make ehv_pic_irq_chip, mpic_ipi_chip and mpic_tm_chip const as they are
>> > used only as a copy operation. This usage is during init, so make them
>> > __initconst too.
>> > Make mpic_ipi_chip __initdata as it is only modified during the init
>> > phase and there is no reference of it anywhere after init.
>>
>> The change log doesn't seem to match the code.
>>
>> It's mpic_tm_chip which you marked __initdata, and that looks wrong, as
>> we keep a pointer to it here:
>>
>> mpic->hc_tm = mpic_tm_chip;
>
> This looks like a memory copy.

Yes you're right.

That's pretty horrible given the size of struct irq_chip, but it's not a
bug in this patch.

There are 5 struct irq_chip's embedded in struct mpic, it must be
enormous!

cheers

\
 
 \ /
  Last update: 2017-09-20 13:11    [W:0.274 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site