Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58640
b: refs/heads/master
c: b1c65b3
h: refs/heads/master
v: v3
  • Loading branch information
Franck Bui-Huu authored and Ralf Baechle committed Jul 10, 2007
1 parent ecd9a9d commit 8a874e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41b0483ee54d89f9ad068ceae3c91cdc7594d050
refs/heads/master: b1c65b3988c6e29ac371ab1cbbf6c4f8fb7092f8
12 changes: 8 additions & 4 deletions trunk/include/asm-mips/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef __ASSEMBLY__

#include <linux/pfn.h>
#include <linux/io.h>
#include <asm/io.h>

/*
* It's normally defined only for FLATMEM config but it's
Expand Down Expand Up @@ -143,11 +143,15 @@ typedef struct { unsigned long pgprot; } pgprot_t;
* __pa()/__va() should be used only during mem init.
*/
#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
#define __pa_page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
#define __pa(x) \
({ \
unsigned long __x = (unsigned long)(x); \
__x < CKSEG0 ? XPHYSADDR(__x) : CPHYSADDR(__x); \
})
#else
#define __pa_page_offset(x) PAGE_OFFSET
#define __pa(x) \
((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
#endif
#define __pa(x) ((unsigned long)(x) - __pa_page_offset(x) + PHYS_OFFSET)
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0))

Expand Down

0 comments on commit 8a874e6

Please sign in to comment.