[Top] [All Lists]

Promblem with PREF (prefetching) in memcpy

To: Ralf Baechle <>,
Subject: Promblem with PREF (prefetching) in memcpy
From: Carsten Langgaard <>
Date: Fri, 04 Oct 2002 09:50:36 +0200
Original-recipient: rfc822;
I think we have a problem with the PREF instructions spread out in the
memcpy function.
We are prefetching outside the area we are copying. That's usually not a
problem, but if we are prefetching outside the physical memory area
(with an unmapped kseg address), anything could happen.
We could get a bus error (which we potentially could handle), but even
worse we could have mapped the PCI space immediately following the the
RAM area and then anything could happen.

So I think, we either need to make sure not to prefetch outside a page
boundary or we make sure the last page in physical memory doesn't get
use for unmapped kernel addresses.

Any comments ?


_    _ ____  ___   Carsten Langgaard
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556

<Prev in Thread] Current Thread [Next in Thread>