Re: [PATCH v3 5/6] m68k: remove duplicate memcpy() implementation

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

 




Hi Geert,

On 02/06/11 17:43, Geert Uytterhoeven wrote:
On Thu, Jun 2, 2011 at 07:18, Greg Ungerer<gerg@xxxxxxxxxxxx>  wrote:
On 26/05/11 16:38, Geert Uytterhoeven wrote:
I was more thinking along the lines of !CONFIG_M68000&&  á!CONFIG_M68010
&&  á!CONFIG_<whatever Coldfire that doesn't support it>.

Or in this case (and probably most cases) we could just switch
to using the same positive logic. So what I had as:

#if defined(__mc68020__) || defined(__mc68030__) || \
á ádefined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__)

becomes

#if defined(CONFIG_M68020) || defined(CONFIG_M68030) || \
á ádefined(CONFIG_M68040) || defined(CONFIG_M68060) || \
á ádefined(CONFIG_MCPU32)

There currently isn't a CONFIG_MCPU32, but I could easily add
that (we only have one CPU in that class currently supported,
the 68360).

The compiler setting won't matter, only what we configured.
Sam will probably like this better, he suggested using the
kernel configs initially, in
http://www.spinics.net/lists/linux-m68k/msg03609.html

Pure positive logic won't work in the (currently stil pathological) case you're
building a multi-platform kernel, and have both CONFIG_M68020 and a lesser
one that doesn't support cpu32 instructions selected.

True. Though we could re-arrange the code blocks to keep the
logic positive. So for the memcpy.c case something like:

#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000) || \
    defined(CONFIG_MCPU32)
	/* the simple code */
#else
	/* the real 68020+ code */
#endif

Now the code doesn't yet have the defines CONFIG_M68000 and
CONFIG_MCPU32. But I have a patch ready to send that introduces
them :-)

Regards
Greg

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux