diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-09 11:28:30 +0000 |
---|---|---|
committer | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-09 11:28:30 +0000 |
commit | 821c383710943623e59b9f9779f2e4914f433c71 (patch) | |
tree | 0b36f23e57e193888b6a097c1ef5f8d690e622c0 | |
parent | 99c3680c3e3fbbf45f2442053adefbc1b9578e1a (diff) |
Verbose PageAnon reporting.
-rw-r--r-- | linux-core/drm_vm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 9b6d156c..3a8cbe57 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -230,6 +230,11 @@ static __inline__ struct page *drm_do_vm_ttm_nopage(struct vm_area_struct *vma, aper_loc = ttm->aperture_base + (page_flags & DRM_TTM_MASK_PFN); page = pfn_to_page(aper_loc >> PAGE_SHIFT); + if (PageAnon(page)) { + DRM_ERROR("Anonymous page trying to map aperture " + "at 0x%08lx\n", (unsigned long) aper_loc); + return NOPAGE_SIGBUS; + } } #endif @@ -239,6 +244,13 @@ static __inline__ struct page *drm_do_vm_ttm_nopage(struct vm_area_struct *vma, } if (!page) return NOPAGE_OOM; + + if (PageAnon(page)) { + DRM_ERROR("Anonymous page trying to map memory page " + "at pfn 0x%08lx\n", page_to_pfn(page) ); + return NOPAGE_SIGBUS; + } + SetPageLocked(page); get_page(page); |