Re: [Bug #12608] 2.6.29-rc powerpc G5 Xorg legacy_mem regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 6 Feb 2009, Jesse Barnes wrote:
> 
> Hugh, did you get a chance to try my X patch (w/o Ben's patch applied)?  If it 
> also works, we should apply it to X too, if only to make porting to future 
> platforms a little easier.

I have tried it now: I'm sorry to say it does not work, fails with
(WW) xf86MapDomainMem():  mmap() failure: No such device or address

Fatal server error:
AddScreen/ScreenInit failed for driver 0

The "mmap() failure" line is of course the one you're intentionally
showing, but the AddScreen/ScreenInit one is not what you want.
Presumably it demands something other than a NULL addr returned,
but I haven't followed that up at all.

I have tried the obvious patch below, which reverts to the original
code if the mmap fails: this works, but presumably negates much of
what you intended to achieve with legacy_mem.

Easy for me to try something else, fire away.

Hugh

--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -501,8 +501,10 @@ xf86MapDomainMemory(int ScreenNum, int F
     if (fd >= 0)
 	close(fd);
     if (addr == NULL || addr == MAP_FAILED) {
-	perror("mmap failure");
-	FatalError("xf86MapDomainMem():  mmap() failure\n");
+	xf86Msg(X_WARNING, "xf86MapDomainMem():  mmap() failure: %s\n",
+		strerror(errno));
+	return linuxMapPci(ScreenNum, Flags, dev, Base, Size,
+			   PCIIOC_MMAP_IS_MEM);
     }
     return addr;
 }
--
To unsubscribe from this list: send the line "unsubscribe kernel-testers" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux