[U-Boot] [PATCH 1/2] x86: move arch-specific asmlinkage to <asm/linkage.h>

Simon Glass sjg at chromium.org
Mon Dec 15 19:26:59 CET 2014


On 9 December 2014 at 22:12, Simon Glass <sjg at chromium.org> wrote:
> Hi Tom,
>
> On 7 December 2014 at 19:01, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
>> Hi Simon,
>>
>> On Sun, 7 Dec 2014 14:44:21 -0700
>> Simon Glass <sjg at chromium.org> wrote:
>>
>>> >  #endif
>>> > diff --git a/arch/x86/include/asm/linkage.h b/arch/x86/include/asm/linkage.h
>>> > new file mode 100644
>>> > index 0000000..bdca72e
>>> > --- /dev/null
>>> > +++ b/arch/x86/include/asm/linkage.h
>>> > @@ -0,0 +1,6 @@
>>> > +#ifndef _ASM_X86_LINKAGE_H
>>> > +#define _ASM_X86_LINKAGE_H
>>> > +
>>> > +#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
>>>
>>> Why CPP_ASMLINKAGE here?
>>
>>
>> The intention of the generic asmlinkage (defined in <linux/linkage.h>)
>> is to add 'extern "C"' if __cplusplus is defined.
>> The x86-specific asmlinkage should be supposed to add "__attribute__((regparm(0)))"
>> onto that rather than replacing it.
>>
>>
>>>
>>> Tested on chromebook_link:
>>>
>>> Tested-by: Simon Glass <sjg at chromium.org>
>>>
>>> With the above question answered, I'd like to apply this as it is a
>>> clean-up. Is it OK to so this independently of the ARM patch?
>>
>>
>> It must be accompanied with the ARM patch, otherwise the latter
>> will get a conflict.
>>
>> Will you apply both to u-boot-x86?
>> I think it is OK because 2/2 is trivial enough.
>
> Do you agree with this?

OK, I'm going ahead.

Applied to u-boot-x86, thanks!


More information about the U-Boot mailing list