Subject: Re: patch to get latest XFree 4.0 snapshot (xf3918) to work on pp cwith r128

From: Kevin Hendricks <[email-masked]>
Date: Wed, 8 Mar 2000 22:11:31 -0500

Hi Kostas,

I took one more look at the cache flush code for what the loader loads and
would like to make one small change.  The reason is as follows:  if the object
is loaded at an address whose last 5 bits are not 0 (say they are 30 decimal for
the sake of argument and the size is 8 bytes really two cache lines should be
flushed and not just one.  The way it was previously (after your change to
ppc_flush_icache) only 1 cache line was being flushed in this case.

    if(read(fd,ptr,size)!=size)
	FatalError("\n_LoaderFileToMem() read() failed: %s\n",strerror(errno));

#if defined(linux) && defined(__powerpc__)
 {
 int i;
 for (i = 0; i < size; i += 32)
    ppc_flush_icache(ptr+i);

 /* add this line to make sure any partial ending cache line gets flushed too */
 ppc_flush_icache(ptr+size-1)
 }
#endif

#ifdef DEBUGMEM
    ErrorF("=%lx\n",ptr);
#endif

Thanks,

Kevin

--
Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London, Ontario  N6A-3K7  CANADA
[email-masked], (519) 661-3874, fax: 519-661-3959

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/