Messages in this thread Patch in this message | | | Subject | [patch] gma500: restore the wb attribute for the scratch page | From | Suresh Siddha <> | Date | Wed, 03 Aug 2011 11:42:26 -0700 |
| |
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; }
| |