mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
a05e54c103
In 32-bit ARM systems, the fixmap mapping region can support no more than 14 CPUs(total: 896k; one CPU: 64K). And we can configure NR_CPUS up to 32. So there is a mismatch. This patch moves fixmapping region downwards to region 0xffc00000- 0xffe00000. Then the fixmap mapping region can support up to 32 CPUs. Reviewed-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Liu Hua <sdu.liu@huawei.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
29 lines
724 B
C
29 lines
724 B
C
#ifndef _ASM_FIXMAP_H
|
|
#define _ASM_FIXMAP_H
|
|
|
|
#define FIXADDR_START 0xffc00000UL
|
|
#define FIXADDR_TOP 0xffe00000UL
|
|
#define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START)
|
|
|
|
#define FIX_KMAP_NR_PTES (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_NR_PTES)
|
|
__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
|