mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 16:47:42 +00:00

There are two ways for translating va to pa for csky: - Use TLB(Translate Lookup Buffer) and PTW (Page Table Walk) - Use SSEG0/1 (Simple Segment Mapping) We use tlb mapping 0-2G and 3G-4G virtual address area and SSEG0/1 are for 2G-2.5G and 2.5G-3G translation. We could disable SSEG0 to use 2G-2.5G as TLB user mapping. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
26 lines
657 B
C
26 lines
657 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __ASM_CSKY_MEMORY_H
|
|
#define __ASM_CSKY_MEMORY_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <linux/const.h>
|
|
#include <linux/types.h>
|
|
#include <linux/sizes.h>
|
|
|
|
#define FIXADDR_TOP _AC(0xffffc000, UL)
|
|
#define PKMAP_BASE _AC(0xff800000, UL)
|
|
#define VMALLOC_START (PAGE_OFFSET + LOWMEM_LIMIT + (PAGE_SIZE * 8))
|
|
#define VMALLOC_END (PKMAP_BASE - (PAGE_SIZE * 2))
|
|
|
|
#ifdef CONFIG_HAVE_TCM
|
|
#ifdef CONFIG_HAVE_DTCM
|
|
#define TCM_NR_PAGES (CONFIG_ITCM_NR_PAGES + CONFIG_DTCM_NR_PAGES)
|
|
#else
|
|
#define TCM_NR_PAGES (CONFIG_ITCM_NR_PAGES)
|
|
#endif
|
|
#define FIXADDR_TCM _AC(FIXADDR_TOP - (TCM_NR_PAGES * PAGE_SIZE), UL)
|
|
#endif
|
|
|
|
#endif
|