diff options
author | Andi Kleen <ak@suse.de> | 2005-11-05 11:25:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-14 22:55:14 -0500 |
commit | 07808b74e7dab1aa385e698795875337d72daf7d (patch) | |
tree | 3b593c31e6e58364f4001105bfeebefa94708209 | |
parent | 1dff7f3db5f045ccbfeca5bb00b0958a78501557 (diff) |
[PATCH] x86_64: Remove obsolete ARCH_HAS_ATOMIC_UNSIGNED and page_flags_t
Has been introduced for x86-64 at some point to save memory
in struct page, but has been obsolete for some time. Just
remove it.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/linux/mm.h | 10 | ||||
-rw-r--r-- | include/linux/mmzone.h | 2 | ||||
-rw-r--r-- | mm/filemap.c | 2 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 |
4 files changed, 5 insertions, 11 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5c1fb0a2e806..23fad4dae23c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -206,12 +206,6 @@ struct vm_operations_struct { | |||
206 | struct mmu_gather; | 206 | struct mmu_gather; |
207 | struct inode; | 207 | struct inode; |
208 | 208 | ||
209 | #ifdef ARCH_HAS_ATOMIC_UNSIGNED | ||
210 | typedef unsigned page_flags_t; | ||
211 | #else | ||
212 | typedef unsigned long page_flags_t; | ||
213 | #endif | ||
214 | |||
215 | /* | 209 | /* |
216 | * Each physical page in the system has a struct page associated with | 210 | * Each physical page in the system has a struct page associated with |
217 | * it to keep track of whatever it is we are using the page for at the | 211 | * it to keep track of whatever it is we are using the page for at the |
@@ -219,7 +213,7 @@ typedef unsigned long page_flags_t; | |||
219 | * a page. | 213 | * a page. |
220 | */ | 214 | */ |
221 | struct page { | 215 | struct page { |
222 | page_flags_t flags; /* Atomic flags, some possibly | 216 | unsigned long flags; /* Atomic flags, some possibly |
223 | * updated asynchronously */ | 217 | * updated asynchronously */ |
224 | atomic_t _count; /* Usage count, see below. */ | 218 | atomic_t _count; /* Usage count, see below. */ |
225 | atomic_t _mapcount; /* Count of ptes mapped in mms, | 219 | atomic_t _mapcount; /* Count of ptes mapped in mms, |
@@ -435,7 +429,7 @@ static inline void put_page(struct page *page) | |||
435 | #endif | 429 | #endif |
436 | 430 | ||
437 | /* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */ | 431 | /* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */ |
438 | #define SECTIONS_PGOFF ((sizeof(page_flags_t)*8) - SECTIONS_WIDTH) | 432 | #define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH) |
439 | #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) | 433 | #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) |
440 | #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) | 434 | #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) |
441 | 435 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index da7a829f8561..57fc99c67c31 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -455,7 +455,7 @@ extern struct pglist_data contig_page_data; | |||
455 | #include <asm/sparsemem.h> | 455 | #include <asm/sparsemem.h> |
456 | #endif | 456 | #endif |
457 | 457 | ||
458 | #if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED) | 458 | #if BITS_PER_LONG == 32 |
459 | /* | 459 | /* |
460 | * with 32 bit page->flags field, we reserve 9 bits for node/zone info. | 460 | * with 32 bit page->flags field, we reserve 9 bits for node/zone info. |
461 | * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes. | 461 | * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes. |
diff --git a/mm/filemap.c b/mm/filemap.c index 5d6e4c2000dc..33a28bfde158 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -134,7 +134,7 @@ static int sync_page(void *word) | |||
134 | struct address_space *mapping; | 134 | struct address_space *mapping; |
135 | struct page *page; | 135 | struct page *page; |
136 | 136 | ||
137 | page = container_of((page_flags_t *)word, struct page, flags); | 137 | page = container_of((unsigned long *)word, struct page, flags); |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * page_mapping() is being called without PG_locked held. | 140 | * page_mapping() is being called without PG_locked held. |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e8810a7e0264..259a71bacca4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -128,7 +128,7 @@ static void bad_page(const char *function, struct page *page) | |||
128 | printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n", | 128 | printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n", |
129 | function, current->comm, page); | 129 | function, current->comm, page); |
130 | printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n", | 130 | printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n", |
131 | (int)(2*sizeof(page_flags_t)), (unsigned long)page->flags, | 131 | (int)(2*sizeof(unsigned long)), (unsigned long)page->flags, |
132 | page->mapping, page_mapcount(page), page_count(page)); | 132 | page->mapping, page_mapcount(page), page_count(page)); |
133 | printk(KERN_EMERG "Backtrace:\n"); | 133 | printk(KERN_EMERG "Backtrace:\n"); |
134 | dump_stack(); | 134 | dump_stack(); |