Commit 07808b74 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds
Browse files

[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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1dff7f3d
...@@ -206,12 +206,6 @@ struct vm_operations_struct { ...@@ -206,12 +206,6 @@ struct vm_operations_struct {
struct mmu_gather; struct mmu_gather;
struct inode; struct inode;
#ifdef ARCH_HAS_ATOMIC_UNSIGNED
typedef unsigned page_flags_t;
#else
typedef unsigned long page_flags_t;
#endif
/* /*
* Each physical page in the system has a struct page associated with * Each physical page in the system has a struct page associated with
* it to keep track of whatever it is we are using the page for at the * 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,7 +213,7 @@ typedef unsigned long page_flags_t;
* a page. * a page.
*/ */
struct page { struct page {
page_flags_t flags; /* Atomic flags, some possibly unsigned long flags; /* Atomic flags, some possibly
* updated asynchronously */ * updated asynchronously */
atomic_t _count; /* Usage count, see below. */ atomic_t _count; /* Usage count, see below. */
atomic_t _mapcount; /* Count of ptes mapped in mms, atomic_t _mapcount; /* Count of ptes mapped in mms,
...@@ -435,7 +429,7 @@ static inline void put_page(struct page *page) ...@@ -435,7 +429,7 @@ static inline void put_page(struct page *page)
#endif #endif
/* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */ /* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */
#define SECTIONS_PGOFF ((sizeof(page_flags_t)*8) - SECTIONS_WIDTH) #define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH)
#define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH)
#define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
......
...@@ -455,7 +455,7 @@ extern struct pglist_data contig_page_data; ...@@ -455,7 +455,7 @@ extern struct pglist_data contig_page_data;
#include <asm/sparsemem.h> #include <asm/sparsemem.h>
#endif #endif
#if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED) #if BITS_PER_LONG == 32
/* /*
* with 32 bit page->flags field, we reserve 9 bits for node/zone info. * with 32 bit page->flags field, we reserve 9 bits for node/zone info.
* there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes. * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes.
......
...@@ -134,7 +134,7 @@ static int sync_page(void *word) ...@@ -134,7 +134,7 @@ static int sync_page(void *word)
struct address_space *mapping; struct address_space *mapping;
struct page *page; struct page *page;
page = container_of((page_flags_t *)word, struct page, flags); page = container_of((unsigned long *)word, struct page, flags);
/* /*
* page_mapping() is being called without PG_locked held. * page_mapping() is being called without PG_locked held.
......
...@@ -128,7 +128,7 @@ static void bad_page(const char *function, struct page *page) ...@@ -128,7 +128,7 @@ static void bad_page(const char *function, struct page *page)
printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n", printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
function, current->comm, page); function, current->comm, page);
printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n", printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
(int)(2*sizeof(page_flags_t)), (unsigned long)page->flags, (int)(2*sizeof(unsigned long)), (unsigned long)page->flags,
page->mapping, page_mapcount(page), page_count(page)); page->mapping, page_mapcount(page), page_count(page));
printk(KERN_EMERG "Backtrace:\n"); printk(KERN_EMERG "Backtrace:\n");
dump_stack(); dump_stack();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment