[PATCH v2] ARM: Define wfi() macro for v6 processors

Dave Martin dave.martin at linaro.org
Tue Feb 8 10:09:18 EST 2011


On Tue, Feb 8, 2011 at 2:54 PM, Santosh Shilimkar
<santosh.shilimkar at ti.com> wrote:
> Dave,
>
>> -----Original Message-----
>> From: Dave Martin [mailto:dave.martin at linaro.org]

[...]

>> I don't like the practice of pre-assembling bits of code with .long,
>> in order to allow a file to be built with wrong -march= flags, and I
>> would favour migrating away from this where possible ... but I
>> accept
>> it's a pragmatic solution to a problem for which gcc/binutils
>> provide
>> no good alternative.
>>
> How about C files where 'wfi' used using inline assembly.
> Can we also specify the " -march=" for the C files as well ?

Kbuild looks like it can do it, e.g. in mach-omap2/Makefile:

CFLAGS_pm_bus.o                         += -DDEBUG

... so we could:

CFLAGS_cpu_specific_object.o        += -march=armv7-a

Whether it's _safe_ to do it depends on whether code from that file
could ever get run on other processors.  I'm not so sure of the answer
to that..., but perhaps someone else has a better idea.

Cheers
---Dave



More information about the linux-arm-kernel mailing list