Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190407
b: refs/heads/master
c: dbc9632
h: refs/heads/master
i:
  190405: 28488a7
  190403: 41fd935
  190399: 4a28363
v: v3
  • Loading branch information
Kumar Gala committed Apr 26, 2010
1 parent 4387315 commit 1b1d21a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: b4d0a038e0f856313ca26fd3872bc209a2e616ad
refs/heads/master: dbc9632a8c25c6efcc1ca3f3a2177c855b6e053e
15 changes: 14 additions & 1 deletion trunk/arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,21 @@ extern phys_addr_t kernstart_addr;
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)

#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - MEMORY_START))
/*
* On Book-E parts we need __va to parse the device tree and we can't
* determine MEMORY_START until then. However we can determine PHYSICAL_START
* from information at hand (program counter, TLB lookup).
*
* On non-Book-E PPC64 PAGE_OFFSET and MEMORY_START are constants so use
* the other definitions for __va & __pa.
*/
#ifdef CONFIG_BOOKE
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) - PHYSICAL_START + KERNELBASE))
#define __pa(x) ((unsigned long)(x) + PHYSICAL_START - KERNELBASE)
#else
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
#endif

/*
* Unfortunately the PLT is in the BSS in the PPC32 ELF ABI,
Expand Down

0 comments on commit 1b1d21a

Please sign in to comment.