diff options
author | Nitin Gupta <ngupta@vflare.org> | 2009-12-12 01:14:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 14:27:49 -0500 |
commit | 30fb8a7141e906116bb536dd54be99480b8fd238 (patch) | |
tree | cf526972c3825e9701073f793b096e9a21bcc802 | |
parent | 3d8affc001a37664b2f5cb29aa12cf8f6c582d52 (diff) |
Staging: ramzswap: remove ARM specific d-cache hack
Remove d-cache hack in ramzswap driver that was needed
to workaround a bug in ARM version of update_mmu_cache()
which caused stale data in d-cache to be transferred to
userspace. This bug was fixed by git commit:
787b2faadc4356b6c2c71feb42fb944fece9a12f
This also brings down one entry in TODO file.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/ramzswap/TODO | 1 | ||||
-rw-r--r-- | drivers/staging/ramzswap/ramzswap_drv.c | 28 |
2 files changed, 3 insertions, 26 deletions
diff --git a/drivers/staging/ramzswap/TODO b/drivers/staging/ramzswap/TODO index bac40d6cb9f1..8d64e28fac0e 100644 --- a/drivers/staging/ramzswap/TODO +++ b/drivers/staging/ramzswap/TODO | |||
@@ -1,6 +1,5 @@ | |||
1 | TODO: | 1 | TODO: |
2 | - Add support for swap notifiers | 2 | - Add support for swap notifiers |
3 | - Remove CONFIG_ARM hack | ||
4 | 3 | ||
5 | Please send patches to Greg Kroah-Hartman <greg@kroah.com> and | 4 | Please send patches to Greg Kroah-Hartman <greg@kroah.com> and |
6 | Nitin Gupta <ngupta@vflare.org> | 5 | Nitin Gupta <ngupta@vflare.org> |
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index b839f05efbce..989fac5b01b3 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c | |||
@@ -222,28 +222,6 @@ out: | |||
222 | return ret; | 222 | return ret; |
223 | } | 223 | } |
224 | 224 | ||
225 | static void ramzswap_flush_dcache_page(struct page *page) | ||
226 | { | ||
227 | #ifdef CONFIG_ARM | ||
228 | int flag = 0; | ||
229 | /* | ||
230 | * Ugly hack to get flush_dcache_page() work on ARM. | ||
231 | * page_mapping(page) == NULL after clearing this swap cache flag. | ||
232 | * Without clearing this flag, flush_dcache_page() will simply set | ||
233 | * "PG_dcache_dirty" bit and return. | ||
234 | */ | ||
235 | if (PageSwapCache(page)) { | ||
236 | flag = 1; | ||
237 | ClearPageSwapCache(page); | ||
238 | } | ||
239 | #endif | ||
240 | flush_dcache_page(page); | ||
241 | #ifdef CONFIG_ARM | ||
242 | if (flag) | ||
243 | SetPageSwapCache(page); | ||
244 | #endif | ||
245 | } | ||
246 | |||
247 | void ramzswap_ioctl_get_stats(struct ramzswap *rzs, | 225 | void ramzswap_ioctl_get_stats(struct ramzswap *rzs, |
248 | struct ramzswap_ioctl_stats *s) | 226 | struct ramzswap_ioctl_stats *s) |
249 | { | 227 | { |
@@ -655,7 +633,7 @@ static int handle_zero_page(struct bio *bio) | |||
655 | memset(user_mem, 0, PAGE_SIZE); | 633 | memset(user_mem, 0, PAGE_SIZE); |
656 | kunmap_atomic(user_mem, KM_USER0); | 634 | kunmap_atomic(user_mem, KM_USER0); |
657 | 635 | ||
658 | ramzswap_flush_dcache_page(page); | 636 | flush_dcache_page(page); |
659 | 637 | ||
660 | set_bit(BIO_UPTODATE, &bio->bi_flags); | 638 | set_bit(BIO_UPTODATE, &bio->bi_flags); |
661 | bio_endio(bio, 0); | 639 | bio_endio(bio, 0); |
@@ -679,7 +657,7 @@ static int handle_uncompressed_page(struct ramzswap *rzs, struct bio *bio) | |||
679 | kunmap_atomic(user_mem, KM_USER0); | 657 | kunmap_atomic(user_mem, KM_USER0); |
680 | kunmap_atomic(cmem, KM_USER1); | 658 | kunmap_atomic(cmem, KM_USER1); |
681 | 659 | ||
682 | ramzswap_flush_dcache_page(page); | 660 | flush_dcache_page(page); |
683 | 661 | ||
684 | set_bit(BIO_UPTODATE, &bio->bi_flags); | 662 | set_bit(BIO_UPTODATE, &bio->bi_flags); |
685 | bio_endio(bio, 0); | 663 | bio_endio(bio, 0); |
@@ -779,7 +757,7 @@ static int ramzswap_read(struct ramzswap *rzs, struct bio *bio) | |||
779 | goto out; | 757 | goto out; |
780 | } | 758 | } |
781 | 759 | ||
782 | ramzswap_flush_dcache_page(page); | 760 | flush_dcache_page(page); |
783 | 761 | ||
784 | set_bit(BIO_UPTODATE, &bio->bi_flags); | 762 | set_bit(BIO_UPTODATE, &bio->bi_flags); |
785 | bio_endio(bio, 0); | 763 | bio_endio(bio, 0); |