From: <tak...@op...> - 2007-02-19 14:38:50
|
Currently, shmin can't compiled because of flush_dcache_all() in io_generic.c. SH3 doesn't have flush_"d"cache_all(). Could you please tell me why the flush operations has come here? Adding dummy flush_dcache_all() in cache_flush.h is easy, though. /yoshii cg-diff -pr 9c57548f17806ffd8e4dc4f7973ce78bbfbc2079 arch/sh/kernel/io_generic.c ... > @@ -96,6 +96,7 @@ void generic_insw(unsigned long port, vo > while (count--) > *buf++ = *port_addr; > > + flush_dcache_all(); > dummy_read(); > } > > @@ -170,6 +171,7 @@ void generic_outsw(unsigned long port, c > while (count--) > *port_addr = *buf++; > > + flush_dcache_all(); > dummy_read(); > } |
From: Paul M. <le...@li...> - 2007-02-19 15:10:29
|
On Mon, Feb 19, 2007 at 11:38:15PM +0900, tak...@op... wrote: > Currently, shmin can't compiled because of flush_dcache_all() in io_generic.c. > SH3 doesn't have flush_"d"cache_all(). Ah, that's right, I forgot to stub it for SH-3. > Could you please tell me why the flush operations has come here? > Adding dummy flush_dcache_all() in cache_flush.h is easy, though. We needed these for some of the IDE cases, it was something that was hit in the PG_dcache_dirty conversion. We used to do this in the CONFIG_IDE case by overloading the PIO I/O ops with an explicit flush, but that sort of infrastructure no longer exists with libata. As the IDE code is really the only user of the insw/outsw routines, this was the easy place to add it. You may want to add a sensible definition for SH-3 as well, but I'm not sure how heavily you're hitting the libata drivers. |
From: <tak...@op...> - 2007-02-19 22:35:51
|
Thank you, Paul. > We needed these for some of the IDE cases, it was something that was hit > in the PG_dcache_dirty conversion. <snip> Oh, that's exactly what I guess. Happy. > You may want to add a sensible definition for SH-3 as well, but I'm not > sure how heavily you're hitting the libata drivers. mmm, Because I don't have SH3 board with libata enabled, I'd like to leave it blank now. How about following patch? I put them into io_generic.c near insw/outsw, but cache_flush.h, since these seems a kind of workaround. # SH3/4 compatible cache flush API may be wanted in somewhere else, someday, though. Regards, /yoshii # sorry for trivial patches always... Signed-off-by: Takashi YOSHII <tak...@op...> diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c index 66626c0..7893718 100644 --- a/arch/sh/kernel/io_generic.c +++ b/arch/sh/kernel/io_generic.c @@ -25,6 +25,13 @@ #else #define dummy_read() #endif +#if defined(CONFIG_CPU_SH4) +/* We need these for some of the IDE cases. */ +#define flush_cache() flush_dcache_all() +#else +#define flush_cache() /* XXX: flushing might be needed */ +#endif + unsigned long generic_io_base; static inline void delay(void) @@ -96,7 +103,7 @@ void generic_insw(unsigned long port, vo while (count--) *buf++ = *port_addr; - flush_dcache_all(); + flush_cache(); dummy_read(); } @@ -171,7 +178,7 @@ void generic_outsw(unsigned long port, c while (count--) *port_addr = *buf++; - flush_dcache_all(); + flush_cache(); dummy_read(); } |
From: Paul M. <le...@li...> - 2007-02-20 00:53:22
|
On Tue, Feb 20, 2007 at 07:35:46AM +0900, tak...@op... wrote: > > You may want to add a sensible definition for SH-3 as well, but I'm not > > sure how heavily you're hitting the libata drivers. > mmm, Because I don't have SH3 board with libata enabled, I'd like to leave it blank now. You aren't booting off of CF or PCMCIA with pata_platform? > How about following patch? I put them into io_generic.c near > insw/outsw, but cache_flush.h, since these seems a kind of workaround. > # SH3/4 compatible cache flush API may be wanted in somewhere else, > someday, though. > Yes, we can do that. It would be interesting to know if the SH-3 caches will need this too, at the very least, SH7705 will. Iwamatsu-san, are you able to add shmin in to your build scripts? It would be good to get at least one SH-3 (and an SH-2) in to the nightly builds. |
From: Nobuhiro I. <he...@t-...> - 2007-02-24 12:36:32
|
Hi , Paul . On Tue, 20 Feb 2007 09:50:58 +0900 Paul Mundt <le...@li...> wrote: > > Iwamatsu-san, are you able to add shmin in to your build scripts? It > would be good to get at least one SH-3 (and an SH-2) in to the nightly > builds. OK , I will add shmin(SH3-machine) to nightly build . I think that after the matter of SH2 prepares the compiler of SH2. regards, Nobuhiro -- Nobuhiro Iwamatsu E-Mail : he...@t-... GPG ID : 3170EBE9 |