[patch] gma500: restore the wb attribute for the scratch page

From: Suresh Siddha
Date: Wed Aug 03 2011 - 14:42:57 EST


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@xxxxxxxxx>
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@xxxxxxxxx>
---
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;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/