Re: [PATCH] 1-2-3 GB

Pavel Machek (pavel@suse.cz)
Fri, 18 Jan 2002 22:18:53 +0100


Hi!

> The patch below seems to be enough to convince egcs-2.91.66 and
> gcc-2.95.3 to use a "jb" comparison there. I'm working on PIII,
> prefetchw() just a stub, if that makes any difference.

If this is really gcc bug, would simply making j volatile fix it?

Pavel
> --- 2.4.18pre2aa2/mm/memory.c Sat Jan 12 18:01:36 2002
> +++ linux/mm/memory.c Sat Jan 12 18:09:27 2002
> @@ -106,8 +106,7 @@
>
> static inline void free_one_pgd(pgd_t * dir)
> {
> - int j;
> - pmd_t * pmd;
> + pmd_t * pmd, * md, * emd;
>
> if (pgd_none(*dir))
> return;
> @@ -118,9 +117,9 @@
> }
> pmd = pmd_offset(dir, 0);
> pgd_clear(dir);
> - for (j = 0; j < PTRS_PER_PMD ; j++) {
> - prefetchw(pmd+j+(PREFETCH_STRIDE/16));
> - free_one_pmd(pmd+j);
> + for (md = pmd, emd = pmd + PTRS_PER_PMD; md < emd; md++) {
> + prefetchw(md+(PREFETCH_STRIDE/16));
> + free_one_pmd(md);
> }
> pmd_free(pmd);
> }

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
-
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/