mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
sh: Add fixed ioremap support
Some devices need to be ioremap'd and accessed very early in the boot process. It is not possible to use the standard ioremap() function in this case because that requires kmalloc()'ing some virtual address space and kmalloc() may not be available so early in boot. This patch provides fixmap mappings that allow physical address ranges to be remapped into the kernel address space during the early boot stages. Signed-off-by: Matt Fleming <matt@console-pimps.org>
This commit is contained in:
parent
07cad4dc1b
commit
4d35b93a66
6 changed files with 167 additions and 3 deletions
|
@ -60,6 +60,14 @@ enum fixed_addresses {
|
|||
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
|
||||
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
|
||||
#endif
|
||||
/*
|
||||
* FIX_IOREMAP entries are useful for mapping physical address
|
||||
* space before ioremap() is useable, e.g. really early in boot
|
||||
* before kmalloc() is working.
|
||||
*/
|
||||
#define FIX_N_IOREMAPS 32
|
||||
FIX_IOREMAP_BEGIN,
|
||||
FIX_IOREMAP_END = FIX_IOREMAP_BEGIN + FIX_N_IOREMAPS,
|
||||
__end_of_fixed_addresses
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue