lkml.org 
[lkml]   [2011]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] gma500: restore the wb attribute for the scratch page
From
Date
Alan, Found this while checking who is using set_pages_uc() in the
current mainline code. I am also looking to see if we should add bug
check in __free_page() to avoid this kind of attribute leak or better
yet, restore the wb attribute in __free_page() itself (perhaps using
something like arch_free_page).

---
From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: gma500: restore the wb attribute for the scratch page

psb_driver_load() is changing the scratch_page attribute to uncached.
Restore the write-back attribute before freeing the page in the unload
routine.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
drivers/staging/gma500/psb_drv.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index b2cdce7..cb45ad7 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -285,6 +285,7 @@ static int psb_driver_unload(struct drm_device *dev)
}
psb_gtt_takedown(dev);
if (dev_priv->scratch_page) {
+ set_pages_wb(dev_priv->scratch_page, 1);
__free_page(dev_priv->scratch_page);
dev_priv->scratch_page = NULL;
}



\
 
 \ /
  Last update: 2011-08-03 20:45    [W:0.298 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site