summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2010-01-31 15:30:29 +0000
committermiod <miod@openbsd.org>2010-01-31 15:30:29 +0000
commitd23483f3572bb70d6493a86652e2d28c3a807f89 (patch)
tree66aeb40a0298721f6640074a0d9ee75996932efc
parentIf there is only 256MB of physical memory or less, access it from physical (diff)
downloadwireguard-openbsd-d23483f3572bb70d6493a86652e2d28c3a807f89.tar.xz
wireguard-openbsd-d23483f3572bb70d6493a86652e2d28c3a807f89.zip
Return a correct address in smfb_mmap(), allows X to work with wsfb.
-rw-r--r--sys/arch/loongson/dev/smfb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/smfb.c b/sys/arch/loongson/dev/smfb.c
index cff6ad83598..5d0d2910981 100644
--- a/sys/arch/loongson/dev/smfb.c
+++ b/sys/arch/loongson/dev/smfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smfb.c,v 1.1.1.1 2009/12/25 21:19:32 miod Exp $ */
+/* $OpenBSD: smfb.c,v 1.2 2010/01/31 15:30:29 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -247,7 +247,7 @@ smfb_mmap(void *v, off_t offset, int prot)
if (offset < 0 || offset >= ri->ri_stride * ri->ri_height)
return -1;
- pa = XKPHYS_TO_PHYS((paddr_t)ri->ri_hw) + offset;
+ pa = XKPHYS_TO_PHYS((paddr_t)ri->ri_bits) + offset;
return atop(pa);
}