Skip to contentSkip to conversation

: Better handling of PG_dcache_dirty

PATCH New Juan Quintela 1 participant 1 message Mar 27, 2003 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Better handling of PG_dcache_dirty

Hi

Use coherent names:
s/Page_dcache_dirty/PageDcacheDirty/
And remove WO pg_flags variable (too much copy & paste from sparc64).

Later, Juan.

 build/arch/mips/mm/c-mips32.c      |    3 +--
 build/arch/mips/mm/c-r4k.c         |    3 +--
 build/arch/mips/mm/c-r5432.c       |    3 +--
 build/arch/mips/mm/c-tx39.c        |    3 +--
 build/arch/mips/mm/c-tx49.c        |    3 +--
 build/arch/mips64/mm/c-mips64.c    |    3 +--
 build/arch/mips64/mm/c-r4k.c       |    3 +--
 build/include/asm-mips/pgtable.h   |    2 +-
 build/include/asm-mips64/pgtable.h |    2 +-
 9 files changed, 9 insertions(+), 16 deletions(-)
build/include/asm-mips/pgtable.h renamed from build/include/asm-mips/pgtable.h~PG_dcache_dirty +1 -1
diff -puN build/include/asm-mips/pgtable.h~PG_dcache_dirty build/include/asm-mips/pgtable.h
@@ -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)
build/include/asm-mips64/pgtable.h renamed from build/include/asm-mips64/pgtable.h~PG_dcache_dirty +1 -1
diff -puN build/include/asm-mips64/pgtable.h~PG_dcache_dirty build/include/asm-mips64/pgtable.h
@@ -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)
build/arch/mips64/mm/c-r4k.c renamed from build/arch/mips64/mm/c-r4k.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips64/mm/c-r4k.c~PG_dcache_dirty build/arch/mips64/mm/c-r4k.c
@@ -1085,10 +1085,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		r4k_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);
build/arch/mips64/mm/c-mips64.c renamed from build/arch/mips64/mm/c-mips64.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips64/mm/c-mips64.c~PG_dcache_dirty build/arch/mips64/mm/c-mips64.c
@@ -425,10 +425,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		mips64_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);
build/arch/mips/mm/c-mips32.c renamed from build/arch/mips/mm/c-mips32.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips/mm/c-mips32.c~PG_dcache_dirty build/arch/mips/mm/c-mips32.c
@@ -409,10 +409,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		mips32_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);
build/arch/mips/mm/c-r4k.c renamed from build/arch/mips/mm/c-r4k.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips/mm/c-r4k.c~PG_dcache_dirty build/arch/mips/mm/c-r4k.c
@@ -568,10 +568,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		r4k_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);
build/arch/mips/mm/c-r5432.c renamed from build/arch/mips/mm/c-r5432.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips/mm/c-r5432.c~PG_dcache_dirty build/arch/mips/mm/c-r5432.c
@@ -437,10 +437,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		r5432_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);
build/arch/mips/mm/c-tx39.c renamed from build/arch/mips/mm/c-tx39.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips/mm/c-tx39.c~PG_dcache_dirty build/arch/mips/mm/c-tx39.c
@@ -323,10 +323,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		tx39_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);
build/arch/mips/mm/c-tx49.c renamed from build/arch/mips/mm/c-tx49.c~PG_dcache_dirty +1 -2
diff -puN build/arch/mips/mm/c-tx49.c~PG_dcache_dirty build/arch/mips/mm/c-tx49.c
@@ -284,10 +284,9 @@ 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))) {
+	    PageDcacheDirty(page)) {
 		tx49_flush_dcache_page_impl(page);
 
 		ClearPageDcacheDirty(page);

_

Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy