? diffile ? lnx_video2.c ? mtrrdiff Index: lnx_video.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c,v retrieving revision 1.9 diff -u -r1.9 lnx_video.c --- lnx_video.c 26 Aug 2005 06:48:24 -0000 1.9 +++ lnx_video.c 12 Oct 2005 20:43:21 -0000 @@ -196,15 +196,17 @@ struct mtrr_gentry gent; struct mtrr_wc_region *wcreturn = NULL, *wcr; - int count, ret=0; + int count, ret=0, pcount; /* Linux 2.0 users should not get a warning without -verbose */ if (!mtrr_open(2)) return NULL; - for (gent.regnum = 0; + for (gent.regnum = 0, pcount = 0; ioctl(mtrr_fd, MTRRIOC_GET_ENTRY, &gent) >= 0; - gent.regnum++) { + gent.regnum++, pcount++) { + + if (pcount > 5) break; if (gent.type != MTRR_TYPE_WRCOMB || gent.base + gent.size <= base || base + size <= gent.base) @@ -250,13 +252,17 @@ { struct mtrr_gentry gent; struct mtrr_wc_region *wcreturn = NULL, **wcr; + int pcount; if (!mtrr_open(2)) return NULL; wcr = &wcreturn; - for (gent.regnum = 0; - ioctl(mtrr_fd, MTRRIOC_GET_ENTRY, &gent) >= 0; gent.regnum++ ) { + for (gent.regnum = 0, pcount = 0; + ioctl(mtrr_fd, MTRRIOC_GET_ENTRY, &gent) >= 0; gent.regnum++, pcount++ ) { + xf86DrvMsgVerb(screenNum, X_WARNING, 0,"Checking MTRR entry %d, pcount %d\n", + gent.regnum, pcount); + if (pcount > 10) break; if (gent.type == MTRR_TYPE_WRCOMB && ((gent.base >= base && gent.base + gent.size < base + size) || (gent.base > base && gent.base + gent.size <= base + size))) {