Re: [PATCH] fix compile breakage caused by linux/smp.h header definition problem

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

 



On Wed, Mar 23, 2011 at 1:50 PM, Andrew Morton wrote:
> On Wed, 23 Mar 2011 10:11:58 -0500 James Bottomley wrote:
>> The problem is this:
>>
>>   CC      arch/parisc/kernel/asm-offsets.s
>> In file included from include/linux/sched.h:71,
>>                  from arch/parisc/kernel/asm-offsets.c:31:
>> include/linux/smp.h:117: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setup_nr_cpu_ids'
>> include/linux/smp.h:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'smp_init'
>>   HOSTLD  scripts/mod/modpost
>> make[1]: *** [arch/parisc/kernel/asm-offsets.s] Error 1
>>
>> It's caused by two __init attributes on function prototypes,
>
> Heiko sent a patch for this which adds the #include.

thanks, this broke Blackfin SMP too

>> which
>> shouldn't be there (__init should only mark functions not prototypes).
>
> Nope.  We've had build failures in the past (on arm) where the
> assembler generated a short-addressed branch to a function in the
> "same" section but the linker discovered that it was too far away,
> because the target landed in a different section.

another advantage is that for funcs which are defined in arch code,
putting the attributes on the prototype allow all the arches to get
the right markings without worrying about someone copying & pasting
wrongly.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux