summaryrefslogtreecommitdiff
path: root/arch/csky/include/asm/segment.h
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2020-09-07 09:20:18 +0300
committerGuo Ren <guoren@linux.alibaba.com>2021-01-12 04:52:40 +0300
commit0c8a32eed1625a65798286fb73fea8710a908545 (patch)
tree69992b6e217f5e985ebbf1f739b2af336d89138c /arch/csky/include/asm/segment.h
parent7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff)
downloadlinux-0c8a32eed1625a65798286fb73fea8710a908545.tar.xz
csky: Add memory layout 2.5G(user):1.5G(kernel)
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>
Diffstat (limited to 'arch/csky/include/asm/segment.h')
-rw-r--r--arch/csky/include/asm/segment.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/csky/include/asm/segment.h b/arch/csky/include/asm/segment.h
index 79ede9b1a646..66d5e0f4f0e0 100644
--- a/arch/csky/include/asm/segment.h
+++ b/arch/csky/include/asm/segment.h
@@ -10,7 +10,7 @@ typedef struct {
#define KERNEL_DS ((mm_segment_t) { 0xFFFFFFFF })
-#define USER_DS ((mm_segment_t) { 0x80000000UL })
+#define USER_DS ((mm_segment_t) { PAGE_OFFSET })
#define get_fs() (current_thread_info()->addr_limit)
#define set_fs(x) (current_thread_info()->addr_limit = (x))
#define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg)