diff options
author | 2013-05-04 13:18:29 +0000 | |
---|---|---|
committer | 2013-05-04 13:18:29 +0000 | |
commit | 02629bf20326cb18fcccd36d8543c3d1fb257fa4 (patch) | |
tree | cd3305079828fed3b323d0c81cb7728a143315d5 | |
parent | - remove unused DPRINTFN, simple DPRINTF is enough (diff) | |
download | wireguard-openbsd-02629bf20326cb18fcccd36d8543c3d1fb257fa4.tar.xz wireguard-openbsd-02629bf20326cb18fcccd36d8543c3d1fb257fa4.zip |
In i915_alloc_ifp() and i965_alloc_ifp() use extent_alloc_subregion() to make
sure we allocate outside the Legacy Address Range. Gets rid of the "no ifp"
warning on the x41.
-rw-r--r-- | sys/dev/pci/drm/i915/i915_drv.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index 2b522e651d5..7e15044d087 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.23 2013/04/30 19:56:46 kettenis Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.24 2013/05/04 13:18:29 kettenis Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -1226,9 +1226,11 @@ i915_alloc_ifp(struct inteldrm_softc *dev_priv, struct pci_attach_args *bpa) &dev_priv->ifp.i9xx.bsh) != 0) goto nope; return; - } else if (bpa->pa_memex == NULL || extent_alloc(bpa->pa_memex, - PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) || bus_space_map(bpa->pa_memt, - addr, PAGE_SIZE, 0, &dev_priv->ifp.i9xx.bsh)) + } else if (bpa->pa_memex == NULL || + extent_alloc_subregion(bpa->pa_memex, 0x100000, 0xffffffff, + PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) || + bus_space_map(bpa->pa_memt, addr, PAGE_SIZE, 0, + &dev_priv->ifp.i9xx.bsh)) goto nope; pci_conf_write(bpa->pa_pc, bpa->pa_tag, I915_IFPADDR, addr | 0x1); @@ -1258,9 +1260,11 @@ i965_alloc_ifp(struct inteldrm_softc *dev_priv, struct pci_attach_args *bpa) &dev_priv->ifp.i9xx.bsh) != 0) goto nope; return; - } else if (bpa->pa_memex == NULL || extent_alloc(bpa->pa_memex, - PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) || bus_space_map(bpa->pa_memt, - addr, PAGE_SIZE, 0, &dev_priv->ifp.i9xx.bsh)) + } else if (bpa->pa_memex == NULL || + extent_alloc_subregion(bpa->pa_memex, 0x100000, 0xffffffff, + PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) || + bus_space_map(bpa->pa_memt, addr, PAGE_SIZE, 0, + &dev_priv->ifp.i9xx.bsh)) goto nope; pci_conf_write(bpa->pa_pc, bpa->pa_tag, I965_IFPADDR + 4, |