-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
557 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef _ASM_FIXMAP_H | ||
#define _ASM_FIXMAP_H | ||
|
||
/* | ||
* Nothing too fancy for now. | ||
* | ||
* On ARM we already have well known fixed virtual addresses imposed by | ||
* the architecture such as the vector page which is located at 0xffff0000, | ||
* therefore a second level page table is already allocated covering | ||
* 0xfff00000 upwards. | ||
* | ||
* The cache flushing code in proc-xscale.S uses the virtual area between | ||
* 0xfffe0000 and 0xfffeffff. | ||
*/ | ||
|
||
#define FIXADDR_START 0xfff00000UL | ||
#define FIXADDR_TOP 0xfffe0000UL | ||
#define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START) | ||
|
||
#define FIX_KMAP_BEGIN 0 | ||
#define FIX_KMAP_END (FIXADDR_SIZE >> PAGE_SHIFT) | ||
|
||
#define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT)) | ||
#define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT) | ||
|
||
extern void __this_fixmap_does_not_exist(void); | ||
|
||
static inline unsigned long fix_to_virt(const unsigned int idx) | ||
{ | ||
if (idx >= FIX_KMAP_END) | ||
__this_fixmap_does_not_exist(); | ||
return __fix_to_virt(idx); | ||
} | ||
|
||
static inline unsigned int virt_to_fix(const unsigned long vaddr) | ||
{ | ||
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | ||
return __virt_to_fix(vaddr); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef _ASM_HIGHMEM_H | ||
#define _ASM_HIGHMEM_H | ||
|
||
#include <asm/kmap_types.h> | ||
|
||
#define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE) | ||
#define LAST_PKMAP PTRS_PER_PTE | ||
#define LAST_PKMAP_MASK (LAST_PKMAP - 1) | ||
#define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT) | ||
#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | ||
|
||
#define kmap_prot PAGE_KERNEL | ||
|
||
#define flush_cache_kmaps() flush_cache_all() | ||
|
||
extern pte_t *pkmap_page_table; | ||
|
||
#define ARCH_NEEDS_KMAP_HIGH_GET | ||
|
||
extern void *kmap_high(struct page *page); | ||
extern void *kmap_high_get(struct page *page); | ||
extern void kunmap_high(struct page *page); | ||
|
||
extern void *kmap(struct page *page); | ||
extern void kunmap(struct page *page); | ||
extern void *kmap_atomic(struct page *page, enum km_type type); | ||
extern void kunmap_atomic(void *kvaddr, enum km_type type); | ||
extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); | ||
extern struct page *kmap_atomic_to_page(const void *ptr); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ enum km_type { | |
KM_IRQ1, | ||
KM_SOFTIRQ0, | ||
KM_SOFTIRQ1, | ||
KM_L2_CACHE, | ||
KM_TYPE_NR | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.