![]() | |||||||||||||
Messages in this thread Patch in this message |
I fixed m32r_sio.c to use cpu_relax(). Thanks. From: Andrew Morton <akpm@osdl.org> Subject: Re: [PATCH 2.6.12-rc5] m32r: Support M3A-2170(Mappi-III) platform Date: Tue, 31 May 2005 14:01:51 -0700 > Hirokazu Takata <takata@linux-m32r.org> wrote: > >> > This patchset is for supporting a new m32r platform, > > M3A-2170(Mappi-III) evaluation board.> > An M32R chip multiprocessor is equipped on the board. > > http://http://www.linux-m32r.org/eng/platform/platform.html > > > > ...> > static void putc(char c) > > { > > - > > while ((*BOOT_SIO0STS & 0x3) != 0x3) ; > > cpu_relax()? > > > static void putc(char c) > > { > > - > > while ((*SIO0STS & 0x1) == 0) ; > > cpu_relax()? > Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> --- arch/m32r/boot/compressed/m32r_sio.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff -ruNp a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c --- a/arch/m32r/boot/compressed/m32r_sio.c 2005-06-02 12:09:19.000000000 +0900 +++ b/arch/m32r/boot/compressed/m32r_sio.c 2005-06-02 18:16:54.000000000 +0900 @@ -6,6 +6,7 @@ */ #include <linux/config.h> +#include <asm/processor.h> static void putc(char c); @@ -38,10 +39,12 @@ static int puts(const char *s) static void putc(char c) { - while ((*BOOT_SIO0STS & 0x3) != 0x3) ; + while ((*BOOT_SIO0STS & 0x3) != 0x3) + cpu_relax(); if (c == '\n') { *BOOT_SIO0TXB = '\r'; - while ((*BOOT_SIO0STS & 0x3) != 0x3) ; + while ((*BOOT_SIO0STS & 0x3) != 0x3) + cpu_relax(); } *BOOT_SIO0TXB = c; } @@ -56,10 +59,12 @@ static void putc(char c) static void putc(char c) { - while ((*SIO0STS & 0x1) == 0) ; + while ((*SIO0STS & 0x1) == 0) + cpu_relax(); if (c == '\n') { *SIO0TXB = '\r'; - while ((*SIO0STS & 0x1) == 0) ; + while ((*SIO0STS & 0x1) == 0) + cpu_relax(); } *SIO0TXB = c; } -- Hirokazu Takata <takata@linux-m32r.org> Linux/M32R Project: http://www.linux-m32r.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-06-03 07:49 [from the cache] ©2003-2008 | |||||||||||||