linux-mips
[Top] [All Lists]

[PATCH]: PG_cache_dirty (take 2)

To: Ralf Baechle <ralf@linux-mips.org>, mipslist <linux-mips@linux-mips.org>
Subject: [PATCH]: PG_cache_dirty (take 2)
From: Juan Quintela <quintela@mandrakesoft.com>
Date: Fri, 28 Mar 2003 01:51:46 +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org


Use coherent names:
    s/Page_dcache_dirty/PageDcacheDirty/
And remove WO pg_flags variable.


 build/arch/mips/mm/c-mips32.c      |    4 +---
 build/arch/mips/mm/c-r4k.c         |    4 +---
 build/arch/mips/mm/c-r5432.c       |    4 +---
 build/arch/mips/mm/c-tx39.c        |    4 +---
 build/arch/mips/mm/c-tx49.c        |    4 +---
 build/arch/mips64/mm/c-mips64.c    |    4 +---
 build/arch/mips64/mm/c-r4k.c       |    4 +---
 build/include/asm-mips/pgtable.h   |    2 +-
 build/include/asm-mips64/pgtable.h |    2 +-
 9 files changed, 9 insertions(+), 23 deletions(-)

diff -puN build/include/asm-mips/pgtable.h~PG_dcache_dirty 
build/include/asm-mips/pgtable.h
--- 24/build/include/asm-mips/pgtable.h~PG_dcache_dirty 2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/include/asm-mips/pgtable.h        2003-03-28 
00:36:50.000000000 +0100
@@ -70,7 +70,7 @@ extern void (*_flush_icache_all)(void);
  */
 #define PG_dcache_dirty                        PG_arch_1
 
-#define Page_dcache_dirty(page)                \
+#define PageDcacheDirty(page)          \
        test_bit(PG_dcache_dirty, &(page)->flags)
 #define SetPageDcacheDirty(page)       \
        set_bit(PG_dcache_dirty, &(page)->flags)
diff -puN build/include/asm-mips64/pgtable.h~PG_dcache_dirty 
build/include/asm-mips64/pgtable.h
--- 24/build/include/asm-mips64/pgtable.h~PG_dcache_dirty       2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/include/asm-mips64/pgtable.h      2003-03-28 
00:36:50.000000000 +0100
@@ -77,7 +77,7 @@ extern void (*_flush_icache_all)(void);
  */
 #define PG_dcache_dirty                        PG_arch_1
 
-#define Page_dcache_dirty(page)                \
+#define PageDcacheDirty(page)          \
        test_bit(PG_dcache_dirty, &(page)->flags)
 #define SetPageDcacheDirty(page)       \
        set_bit(PG_dcache_dirty, &(page)->flags)
diff -puN build/arch/mips64/mm/c-r4k.c~PG_dcache_dirty 
build/arch/mips64/mm/c-r4k.c
--- 24/build/arch/mips64/mm/c-r4k.c~PG_dcache_dirty     2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips64/mm/c-r4k.c    2003-03-28 00:36:50.000000000 
+0100
@@ -1085,10 +1085,8 @@ void __update_cache(struct vm_area_struc
        pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                r4k_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);
diff -puN build/arch/mips64/mm/c-mips64.c~PG_dcache_dirty 
build/arch/mips64/mm/c-mips64.c
--- 24/build/arch/mips64/mm/c-mips64.c~PG_dcache_dirty  2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips64/mm/c-mips64.c 2003-03-28 00:36:50.000000000 
+0100
@@ -440,10 +440,8 @@ void __update_cache(struct vm_area_struc
         pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                mips64_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);
diff -puN build/arch/mips/mm/c-mips32.c~PG_dcache_dirty 
build/arch/mips/mm/c-mips32.c
--- 24/build/arch/mips/mm/c-mips32.c~PG_dcache_dirty    2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/c-mips32.c   2003-03-28 00:36:50.000000000 
+0100
@@ -423,10 +423,8 @@ void __update_cache(struct vm_area_struc
        pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                mips32_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);
diff -puN build/arch/mips/mm/c-r4k.c~PG_dcache_dirty build/arch/mips/mm/c-r4k.c
--- 24/build/arch/mips/mm/c-r4k.c~PG_dcache_dirty       2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/c-r4k.c      2003-03-28 00:36:50.000000000 
+0100
@@ -582,10 +582,8 @@ void __update_cache(struct vm_area_struc
        pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                r4k_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);
diff -puN build/arch/mips/mm/c-r5432.c~PG_dcache_dirty 
build/arch/mips/mm/c-r5432.c
--- 24/build/arch/mips/mm/c-r5432.c~PG_dcache_dirty     2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/c-r5432.c    2003-03-28 00:36:50.000000000 
+0100
@@ -437,10 +437,8 @@ void __update_cache(struct vm_area_struc
        pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                r5432_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);
diff -puN build/arch/mips/mm/c-tx39.c~PG_dcache_dirty 
build/arch/mips/mm/c-tx39.c
--- 24/build/arch/mips/mm/c-tx39.c~PG_dcache_dirty      2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/c-tx39.c     2003-03-28 00:37:05.000000000 
+0100
@@ -323,10 +323,8 @@ void __update_cache(struct vm_area_struc
        pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                tx39_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);
diff -puN build/arch/mips/mm/c-tx49.c~PG_dcache_dirty 
build/arch/mips/mm/c-tx49.c
--- 24/build/arch/mips/mm/c-tx49.c~PG_dcache_dirty      2003-03-28 
00:36:50.000000000 +0100
+++ 24-quintela/build/arch/mips/mm/c-tx49.c     2003-03-28 00:36:50.000000000 
+0100
@@ -284,10 +284,8 @@ void __update_cache(struct vm_area_struc
        pte_t pte)
 {
        struct page *page = pte_page(pte);
-       unsigned long pg_flags;
 
-       if (VALID_PAGE(page) && page->mapping &&
-           ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
+       if (VALID_PAGE(page) && page->mapping && PageDcacheDirty(page)) {
                tx49_flush_dcache_page_impl(page);
 
                ClearPageDcacheDirty(page);

_


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH]: PG_cache_dirty (take 2), Juan Quintela <=