[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0902062205540.5710@blonde.anvils>
Date: Fri, 6 Feb 2009 22:17:41 +0000 (GMT)
From: Hugh Dickins <hugh@...itas.com>
To: Jesse Barnes <jbarnes@...tuousgeek.org>
cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kernel Testers List <kernel-testers@...r.kernel.org>
Subject: Re: [Bug #12608] 2.6.29-rc powerpc G5 Xorg legacy_mem regression
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists