* [PATCH] Fix build_store_reg()
@ 2006-12-17 15:38 Atsushi Nemoto
2006-12-21 16:03 ` Atsushi Nemoto
2007-01-08 16:27 ` Ralf Baechle
0 siblings, 2 replies; 5+ messages in thread
From: Atsushi Nemoto @ 2006-12-17 15:38 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
The commit a923660d786a53e78834b19062f7af2535f7f8ad accidently
prevents TX49 from using CDEX. Use build_dst_pref() only if prefetch
for store was really available.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c
index d41fc58..dc795be 100644
--- a/arch/mips/mm/pg-r4k.c
+++ b/arch/mips/mm/pg-r4k.c
@@ -243,11 +243,10 @@ static void __init __build_store_reg(int
static inline void build_store_reg(int reg)
{
- if (cpu_has_prefetch)
- if (reg)
- build_dst_pref(pref_offset_copy);
- else
- build_dst_pref(pref_offset_clear);
+ int pref_off = cpu_has_prefetch ?
+ (reg ? pref_offset_copy : pref_offset_clear) : 0;
+ if (pref_off)
+ build_dst_pref(pref_off);
else if (cpu_has_cache_cdex_s)
build_cdex_s();
else if (cpu_has_cache_cdex_p)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix build_store_reg()
2006-12-17 15:38 [PATCH] Fix build_store_reg() Atsushi Nemoto
@ 2006-12-21 16:03 ` Atsushi Nemoto
2006-12-21 16:30 ` Atsushi Nemoto
2007-01-08 16:27 ` Ralf Baechle
1 sibling, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2006-12-21 16:03 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
On Mon, 18 Dec 2006 00:38:21 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> The commit a923660d786a53e78834b19062f7af2535f7f8ad accidently
> prevents TX49 from using CDEX. Use build_dst_pref() only if prefetch
> for store was really available.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
> diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c
> index d41fc58..dc795be 100644
> --- a/arch/mips/mm/pg-r4k.c
> +++ b/arch/mips/mm/pg-r4k.c
> @@ -243,11 +243,10 @@ static void __init __build_store_reg(int
>
> static inline void build_store_reg(int reg)
> {
> - if (cpu_has_prefetch)
> - if (reg)
> - build_dst_pref(pref_offset_copy);
> - else
> - build_dst_pref(pref_offset_clear);
> + int pref_off = cpu_has_prefetch ?
> + (reg ? pref_offset_copy : pref_offset_clear) : 0;
> + if (pref_off)
> + build_dst_pref(pref_off);
> else if (cpu_has_cache_cdex_s)
> build_cdex_s();
> else if (cpu_has_cache_cdex_p)
BTW, why prefetch is preferred than cache_cdex? I feel cdex is better
while it avoids unnecessary load...
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix build_store_reg()
2006-12-21 16:03 ` Atsushi Nemoto
@ 2006-12-21 16:30 ` Atsushi Nemoto
2006-12-21 16:42 ` Thiemo Seufer
0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2006-12-21 16:30 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
On Fri, 22 Dec 2006 01:03:16 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> BTW, why prefetch is preferred than cache_cdex? I feel cdex is better
> while it avoids unnecessary load...
Oh, I missed that Pref_StoreStreamed or Pref_PrepareForStore is used
for destination. Perhaps they would be better than cdex (though not
sure...).
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix build_store_reg()
2006-12-21 16:30 ` Atsushi Nemoto
@ 2006-12-21 16:42 ` Thiemo Seufer
0 siblings, 0 replies; 5+ messages in thread
From: Thiemo Seufer @ 2006-12-21 16:42 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips, ralf
Atsushi Nemoto wrote:
> On Fri, 22 Dec 2006 01:03:16 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> > BTW, why prefetch is preferred than cache_cdex? I feel cdex is better
> > while it avoids unnecessary load...
>
> Oh, I missed that Pref_StoreStreamed or Pref_PrepareForStore is used
> for destination. Perhaps they would be better than cdex (though not
> sure...).
StoreStreamed doesn't avoid the reload, but PrepareForStore does.
Thiemo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix build_store_reg()
2006-12-17 15:38 [PATCH] Fix build_store_reg() Atsushi Nemoto
2006-12-21 16:03 ` Atsushi Nemoto
@ 2007-01-08 16:27 ` Ralf Baechle
1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2007-01-08 16:27 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Mon, Dec 18, 2006 at 12:38:21AM +0900, Atsushi Nemoto wrote:
> The commit a923660d786a53e78834b19062f7af2535f7f8ad accidently
> prevents TX49 from using CDEX. Use build_dst_pref() only if prefetch
> for store was really available.
Applied. Thanks,
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-08 16:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-17 15:38 [PATCH] Fix build_store_reg() Atsushi Nemoto
2006-12-21 16:03 ` Atsushi Nemoto
2006-12-21 16:30 ` Atsushi Nemoto
2006-12-21 16:42 ` Thiemo Seufer
2007-01-08 16:27 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.