Commit 3b99bbbf authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] misc fixes

- Missing parentheses around macro arg in __pte_offest()

- struct page_state needs to be cacheline aligned (the first seven
  fields should be in the same cacheline)
parent 6e2db78b
...@@ -256,7 +256,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) ...@@ -256,7 +256,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
/* Find an entry in the third-level page table.. */ /* Find an entry in the third-level page table.. */
#define __pte_offset(address) \ #define __pte_offset(address) \
((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define pte_offset_kernel(dir, address) \ #define pte_offset_kernel(dir, address) \
((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address)) ((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address))
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define PAGE_FLAGS_H #define PAGE_FLAGS_H
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/cache.h>
/* /*
* Various page->flags bits: * Various page->flags bits:
...@@ -106,7 +107,7 @@ struct page_state { ...@@ -106,7 +107,7 @@ struct page_state {
unsigned long kswapd_steal; unsigned long kswapd_steal;
unsigned long pageoutrun; unsigned long pageoutrun;
unsigned long allocstall; unsigned long allocstall;
}; } ____cacheline_aligned;
DECLARE_PER_CPU(struct page_state, page_states); DECLARE_PER_CPU(struct page_state, page_states);
......
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