Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
689d57bd
Commit
689d57bd
authored
May 07, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sparc64: Fix pfn_foo macros and add descriptive commentary
above explaining the {phys,pfn}_base stuff.
parent
531007b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
include/asm-sparc64/page.h
include/asm-sparc64/page.h
+7
-1
include/asm-sparc64/pgtable.h
include/asm-sparc64/pgtable.h
+10
-4
No files found.
include/asm-sparc64/page.h
View file @
689d57bd
...
@@ -114,11 +114,17 @@ typedef unsigned long iopgprot_t;
...
@@ -114,11 +114,17 @@ typedef unsigned long iopgprot_t;
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
/* PFNs are real physical page numbers. However, mem_map only begins to record
* per-page information starting at pfn_base. This is to handle systems where
* the first physical page in the machine is at some huge physical address, such
* as 4GB. This is common on a partitioned E10000, for example.
*/
#define pfn_to_page(pfn) (mem_map + ((pfn)-(pfn_base)))
#define pfn_to_page(pfn) (mem_map + ((pfn)-(pfn_base)))
#define page_to_pfn(page) ((unsigned long)(((page) - mem_map) + pfn_base))
#define page_to_pfn(page) ((unsigned long)(((page) - mem_map) + pfn_base))
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr)>>PAGE_SHIFT)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr)>>PAGE_SHIFT)
#define pfn_valid(pfn) ((
pfn
) < max_mapnr)
#define pfn_valid(pfn) ((
(pfn)-(pfn_base)
) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#define virt_to_phys __pa
#define virt_to_phys __pa
...
...
include/asm-sparc64/pgtable.h
View file @
689d57bd
...
@@ -195,10 +195,19 @@ extern unsigned long pfn_base;
...
@@ -195,10 +195,19 @@ extern unsigned long pfn_base;
extern
struct
page
*
mem_map_zero
;
extern
struct
page
*
mem_map_zero
;
#define ZERO_PAGE(vaddr) (mem_map_zero)
#define ZERO_PAGE(vaddr) (mem_map_zero)
/* PFNs are real physical page numbers. However, mem_map only begins to record
* per-page information starting at pfn_base. This is to handle systems where
* the first physical page in the machine is at some huge physical address, such
* as 4GB. This is common on a partitioned E10000, for example.
*/
#define pfn_pte(pfn, prot) \
#define pfn_pte(pfn, prot) \
__pte(((
(pfn)+(pfn_base)
) << PAGE_SHIFT) | pgprot_val(prot) | _PAGE_SZBITS)
__pte(((
pfn
) << PAGE_SHIFT) | pgprot_val(prot) | _PAGE_SZBITS)
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
#define pte_pfn(x) ((pte_val(x) & _PAGE_PADDR)>>PAGE_SHIFT)
#define pte_page(x) pfn_to_page(pte_pfn(x))
#define page_pte_prot(page, prot) mk_pte(page, prot)
#define page_pte_prot(page, prot) mk_pte(page, prot)
#define page_pte(page) page_pte_prot(page, __pgprot(0))
#define page_pte(page) page_pte_prot(page, __pgprot(0))
...
@@ -246,9 +255,6 @@ extern inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot)
...
@@ -246,9 +255,6 @@ extern inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot)
/* Permanent address of a page. */
/* Permanent address of a page. */
#define __page_address(page) page_address(page)
#define __page_address(page) page_address(page)
#define pte_pfn(x) (pte_val(x) & _PAGE_PADDR)
#define pte_page(x) pfn_to_page(pte_pfn(x))
/* Be very careful when you change these three, they are delicate. */
/* Be very careful when you change these three, they are delicate. */
#define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_ACCESSED | _PAGE_R))
#define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_ACCESSED | _PAGE_R))
#define pte_mkwrite(pte) (__pte(pte_val(pte) | _PAGE_WRITE))
#define pte_mkwrite(pte) (__pte(pte_val(pte) | _PAGE_WRITE))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment