Re: [PATCH v2 1/2] MIPS: ftrace: Tweak safe_load()/safe_store() macros

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

 



On Tue, Mar 18, 2014 at 8:04 AM, Viller Hsiao <villerhsiao@xxxxxxxxx> wrote:
> On Mon, Mar 17, 2014 at 10:56 PM, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
>> On Sat, Feb 22, 2014 at 03:46:48PM +0800, Viller Hsiao wrote:
>>
>>> Due to name collision in ftrace safe_load and safe_store macros,
>>> these macros cannot take expressions as operands.
>>>
>>> For example, compiler will complain for a macro call like the following:
>>>   safe_store_code(new_code2, ip + 4, faulted);
>>>
>>>   arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store'
>>>      : [dst] "r" (dst), [src] "r" (src)\
>>>         ^
>>>   arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code'
>>>     safe_store_code(new_code2, ip + 4, faulted);
>>>     ^
>>>   arch/mips/kernel/ftrace.c:118:32: error: undefined named operand 'ip + 4'
>>>     safe_store_code(new_code2, ip + 4, faulted);
>>>                                   ^
>>>   arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store'
>>>      : [dst] "r" (dst), [src] "r" (src)\
>>>         ^
>>>   arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code'
>>>     safe_store_code(new_code2, ip + 4, faulted);
>>>     ^
>>>
>>> This patch tweaks variable naming in those macros to allow flexible
>>> operands.
>>
>> Interesting catch - and while I think your patch indeed is an improvment
>> nobody seems to have observed this in a kernel tree, so I'm going to treat
>> this as a non-urgent improvment and queue it for 3.15.
>>
>> If this can be triggered in any -stable or v3.14-rc7 tree, please let me
>> know.
>>
>> Thanks,
>>
>>   Ralf
>
> Hi Ralf,
>
> If you get plan to merge it later, please help to handle another patch
> in the patchset at the same time,
>    [PATCH v2 2/2] MIPS: ftrace: Fix icache flush range error
>
> Or the 2nd one might have compilation error shown in this commit
> message. Sorry for the inconvenience.
>
> Viller

Hi Ralf,

The operand name and variable name are a little ambiguous in PATCH v2.
Therefore I tweaked and submitted PATCH v3. Please help to use them if
possible.

Thanks,
Viller


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux