diff options
author | Greentime Hu <greentime@andestech.com> | 2017-10-25 03:03:49 -0400 |
---|---|---|
committer | Greentime Hu <greentime@andestech.com> | 2018-02-21 21:44:35 -0500 |
commit | e71ea3badae55a69a44b8fcb46ae7b547529b376 (patch) | |
tree | 21947a2e1b0852e6d26c2f2435c464aa3238a2cd | |
parent | a06d4298d4d82f6a7ea6c67aa46dbdb873530320 (diff) |
nds32: Build infrastructure
This patch adds Makefile, Kconfig and vmlinux.lds.S files required for building
an nds32 kernel.
Signed-off-by: Vincent Chen <vincentc@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/nds32/Kconfig | 103 | ||||
-rw-r--r-- | arch/nds32/Kconfig.cpu | 174 | ||||
-rw-r--r-- | arch/nds32/Makefile | 66 | ||||
-rw-r--r-- | arch/nds32/boot/Makefile | 15 | ||||
-rw-r--r-- | arch/nds32/include/asm/Kbuild | 55 | ||||
-rw-r--r-- | arch/nds32/include/uapi/asm/Kbuild | 29 | ||||
-rw-r--r-- | arch/nds32/kernel/Makefile | 23 | ||||
-rw-r--r-- | arch/nds32/kernel/vmlinux.lds.S | 57 | ||||
-rw-r--r-- | arch/nds32/mm/Makefile | 7 |
9 files changed, 529 insertions, 0 deletions
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig new file mode 100644 index 000000000000..249f38d3388f --- /dev/null +++ b/arch/nds32/Kconfig | |||
@@ -0,0 +1,103 @@ | |||
1 | # | ||
2 | # For a description of the syntax of this configuration file, | ||
3 | # see Documentation/kbuild/kconfig-language.txt. | ||
4 | # | ||
5 | |||
6 | config NDS32 | ||
7 | def_bool y | ||
8 | select ARCH_WANT_FRAME_POINTERS if FTRACE | ||
9 | select CLKSRC_MMIO | ||
10 | select CLONE_BACKWARDS | ||
11 | select COMMON_CLK | ||
12 | select GENERIC_ATOMIC64 | ||
13 | select GENERIC_CPU_DEVICES | ||
14 | select GENERIC_CLOCKEVENTS | ||
15 | select GENERIC_IRQ_CHIP | ||
16 | select GENERIC_IRQ_SHOW | ||
17 | select GENERIC_STRNCPY_FROM_USER | ||
18 | select GENERIC_STRNLEN_USER | ||
19 | select GENERIC_TIME_VSYSCALL | ||
20 | select HANDLE_DOMAIN_IRQ | ||
21 | select HAVE_ARCH_TRACEHOOK | ||
22 | select HAVE_DEBUG_KMEMLEAK | ||
23 | select HAVE_MEMBLOCK | ||
24 | select HAVE_REGS_AND_STACK_ACCESS_API | ||
25 | select IRQ_DOMAIN | ||
26 | select LOCKDEP_SUPPORT | ||
27 | select MODULES_USE_ELF_RELA | ||
28 | select OF | ||
29 | select OF_EARLY_FLATTREE | ||
30 | select NO_BOOTMEM | ||
31 | select NO_IOPORT_MAP | ||
32 | select RTC_LIB | ||
33 | select THREAD_INFO_IN_TASK | ||
34 | help | ||
35 | Andes(nds32) Linux support. | ||
36 | |||
37 | config GENERIC_CALIBRATE_DELAY | ||
38 | def_bool y | ||
39 | |||
40 | config GENERIC_CSUM | ||
41 | def_bool y | ||
42 | |||
43 | config GENERIC_HWEIGHT | ||
44 | def_bool y | ||
45 | |||
46 | config GENERIC_LOCKBREAK | ||
47 | def_bool y | ||
48 | depends on PREEMPT | ||
49 | |||
50 | config RWSEM_GENERIC_SPINLOCK | ||
51 | def_bool y | ||
52 | |||
53 | config TRACE_IRQFLAGS_SUPPORT | ||
54 | def_bool y | ||
55 | |||
56 | config STACKTRACE_SUPPORT | ||
57 | def_bool y | ||
58 | |||
59 | config FIX_EARLYCON_MEM | ||
60 | def_bool y | ||
61 | |||
62 | config PGTABLE_LEVELS | ||
63 | default 2 | ||
64 | |||
65 | source "init/Kconfig" | ||
66 | |||
67 | menu "System Type" | ||
68 | source "arch/nds32/Kconfig.cpu" | ||
69 | config NR_CPUS | ||
70 | int | ||
71 | default 1 | ||
72 | |||
73 | config MMU | ||
74 | def_bool y | ||
75 | |||
76 | config NDS32_BUILTIN_DTB | ||
77 | string "Builtin DTB" | ||
78 | default "" | ||
79 | help | ||
80 | User can use it to specify the dts of the SoC | ||
81 | endmenu | ||
82 | |||
83 | menu "Kernel Features" | ||
84 | source "kernel/Kconfig.preempt" | ||
85 | source "mm/Kconfig" | ||
86 | source "kernel/Kconfig.hz" | ||
87 | endmenu | ||
88 | |||
89 | menu "Executable file formats" | ||
90 | source "fs/Kconfig.binfmt" | ||
91 | endmenu | ||
92 | |||
93 | source "net/Kconfig" | ||
94 | source "drivers/Kconfig" | ||
95 | source "fs/Kconfig" | ||
96 | |||
97 | menu "Kernel hacking" | ||
98 | source "lib/Kconfig.debug" | ||
99 | endmenu | ||
100 | |||
101 | source "security/Kconfig" | ||
102 | source "crypto/Kconfig" | ||
103 | source "lib/Kconfig" | ||
diff --git a/arch/nds32/Kconfig.cpu b/arch/nds32/Kconfig.cpu new file mode 100644 index 000000000000..ba44cc539da9 --- /dev/null +++ b/arch/nds32/Kconfig.cpu | |||
@@ -0,0 +1,174 @@ | |||
1 | comment "Processor Features" | ||
2 | |||
3 | config CPU_BIG_ENDIAN | ||
4 | bool "Big endian" | ||
5 | |||
6 | config CPU_LITTLE_ENDIAN | ||
7 | def_bool !CPU_BIG_ENDIAN | ||
8 | |||
9 | config HWZOL | ||
10 | bool "hardware zero overhead loop support" | ||
11 | depends on CPU_D10 || CPU_D15 | ||
12 | default n | ||
13 | help | ||
14 | A set of Zero-Overhead Loop mechanism is provided to reduce the | ||
15 | instruction fetch and execution overhead of loop-control instructions. | ||
16 | It will save 3 registers($LB, $LC, $LE) for context saving if say Y. | ||
17 | You don't need to save these registers if you can make sure your user | ||
18 | program doesn't use these registers. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | config CPU_CACHE_ALIASING | ||
23 | bool "Aliasing cache" | ||
24 | depends on CPU_N10 || CPU_D10 || CPU_N13 || CPU_V3 | ||
25 | default y | ||
26 | help | ||
27 | If this CPU is using VIPT data cache and its cache way size is larger | ||
28 | than page size, say Y. If it is using PIPT data cache, say N. | ||
29 | |||
30 | If unsure, say Y. | ||
31 | |||
32 | choice | ||
33 | prompt "minimum CPU type" | ||
34 | default CPU_V3 | ||
35 | help | ||
36 | The data cache of N15/D15 is implemented as PIPT and it will not cause | ||
37 | the cache aliasing issue. The rest cpus(N13, N10 and D10) are | ||
38 | implemented as VIPT data cache. It may cause the cache aliasing issue | ||
39 | if its cache way size is larger than page size. You can specify the | ||
40 | CPU type direcly or choose CPU_V3 if unsure. | ||
41 | |||
42 | A kernel built for N10 is able to run on N15, D15, N13, N10 or D10. | ||
43 | A kernel built for N15 is able to run on N15 or D15. | ||
44 | A kernel built for D10 is able to run on D10 or D15. | ||
45 | A kernel built for D15 is able to run on D15. | ||
46 | A kernel built for N13 is able to run on N15, N13 or D15. | ||
47 | |||
48 | config CPU_N15 | ||
49 | bool "AndesCore N15" | ||
50 | config CPU_N13 | ||
51 | bool "AndesCore N13" | ||
52 | select CPU_CACHE_ALIASING if ANDES_PAGE_SIZE_4KB | ||
53 | config CPU_N10 | ||
54 | bool "AndesCore N10" | ||
55 | select CPU_CACHE_ALIASING | ||
56 | config CPU_D15 | ||
57 | bool "AndesCore D15" | ||
58 | config CPU_D10 | ||
59 | bool "AndesCore D10" | ||
60 | select CPU_CACHE_ALIASING | ||
61 | config CPU_V3 | ||
62 | bool "AndesCore v3 compatible" | ||
63 | select CPU_CACHE_ALIASING | ||
64 | endchoice | ||
65 | choice | ||
66 | prompt "Paging -- page size " | ||
67 | default ANDES_PAGE_SIZE_4KB | ||
68 | config ANDES_PAGE_SIZE_4KB | ||
69 | bool "use 4KB page size" | ||
70 | config ANDES_PAGE_SIZE_8KB | ||
71 | bool "use 8KB page size" | ||
72 | endchoice | ||
73 | |||
74 | config CPU_ICACHE_DISABLE | ||
75 | bool "Disable I-Cache" | ||
76 | help | ||
77 | Say Y here to disable the processor instruction cache. Unless | ||
78 | you have a reason not to or are unsure, say N. | ||
79 | |||
80 | config CPU_DCACHE_DISABLE | ||
81 | bool "Disable D-Cache" | ||
82 | help | ||
83 | Say Y here to disable the processor data cache. Unless | ||
84 | you have a reason not to or are unsure, say N. | ||
85 | |||
86 | config CPU_DCACHE_WRITETHROUGH | ||
87 | bool "Force write through D-cache" | ||
88 | depends on !CPU_DCACHE_DISABLE | ||
89 | help | ||
90 | Say Y here to use the data cache in writethrough mode. Unless you | ||
91 | specifically require this or are unsure, say N. | ||
92 | |||
93 | config WBNA | ||
94 | bool "WBNA" | ||
95 | default n | ||
96 | help | ||
97 | Say Y here to enable write-back memory with no-write-allocation policy. | ||
98 | |||
99 | config ALIGNMENT_TRAP | ||
100 | bool "Kernel support unaligned access handling by sw" | ||
101 | depends on PROC_FS | ||
102 | default n | ||
103 | help | ||
104 | Andes processors cannot load/store information which is not | ||
105 | naturally aligned on the bus, i.e., a 4 byte load must start at an | ||
106 | address divisible by 4. On 32-bit Andes processors, these non-aligned | ||
107 | load/store instructions will be emulated in software if you say Y | ||
108 | here, which has a severe performance impact. With an IP-only | ||
109 | configuration it is safe to say N, otherwise say Y. | ||
110 | |||
111 | config HW_SUPPORT_UNALIGNMENT_ACCESS | ||
112 | bool "Kernel support unaligned access handling by hw" | ||
113 | depends on !ALIGNMENT_TRAP | ||
114 | default n | ||
115 | help | ||
116 | Andes processors load/store world/half-word instructions can access | ||
117 | unaligned memory locations without generating the Data Alignment | ||
118 | Check exceptions. With an IP-only configuration it is safe to say N, | ||
119 | otherwise say Y. | ||
120 | |||
121 | config HIGHMEM | ||
122 | bool "High Memory Support" | ||
123 | depends on MMU && !CPU_CACHE_ALIASING | ||
124 | help | ||
125 | The address space of Andes processors is only 4 Gigabytes large | ||
126 | and it has to accommodate user address space, kernel address | ||
127 | space as well as some memory mapped IO. That means that, if you | ||
128 | have a large amount of physical memory and/or IO, not all of the | ||
129 | memory can be "permanently mapped" by the kernel. The physical | ||
130 | memory that is not permanently mapped is called "high memory". | ||
131 | |||
132 | Depending on the selected kernel/user memory split, minimum | ||
133 | vmalloc space and actual amount of RAM, you may not need this | ||
134 | option which should result in a slightly faster kernel. | ||
135 | |||
136 | If unsure, say N. | ||
137 | |||
138 | config CACHE_L2 | ||
139 | bool "Support L2 cache" | ||
140 | default y | ||
141 | help | ||
142 | Say Y here to enable L2 cache if your SoC are integrated with L2CC. | ||
143 | If unsure, say N. | ||
144 | |||
145 | menu "Memory configuration" | ||
146 | |||
147 | choice | ||
148 | prompt "Memory split" | ||
149 | depends on MMU | ||
150 | default VMSPLIT_3G_OPT | ||
151 | help | ||
152 | Select the desired split between kernel and user memory. | ||
153 | |||
154 | If you are not absolutely sure what you are doing, leave this | ||
155 | option alone! | ||
156 | |||
157 | config VMSPLIT_3G | ||
158 | bool "3G/1G user/kernel split" | ||
159 | config VMSPLIT_3G_OPT | ||
160 | bool "3G/1G user/kernel split (for full 1G low memory)" | ||
161 | config VMSPLIT_2G | ||
162 | bool "2G/2G user/kernel split" | ||
163 | config VMSPLIT_1G | ||
164 | bool "1G/3G user/kernel split" | ||
165 | endchoice | ||
166 | |||
167 | config PAGE_OFFSET | ||
168 | hex | ||
169 | default 0x40000000 if VMSPLIT_1G | ||
170 | default 0x80000000 if VMSPLIT_2G | ||
171 | default 0xB0000000 if VMSPLIT_3G_OPT | ||
172 | default 0xC0000000 | ||
173 | |||
174 | endmenu | ||
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile new file mode 100644 index 000000000000..54b4de9d48b6 --- /dev/null +++ b/arch/nds32/Makefile | |||
@@ -0,0 +1,66 @@ | |||
1 | LDFLAGS_vmlinux := --no-undefined -X | ||
2 | OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S | ||
3 | |||
4 | KBUILD_DEFCONFIG := defconfig | ||
5 | |||
6 | comma = , | ||
7 | |||
8 | KBUILD_CFLAGS +=-mno-sched-prolog-epilog -mcmodel=large | ||
9 | |||
10 | KBUILD_CFLAGS +=$(arch-y) $(tune-y) | ||
11 | KBUILD_AFLAGS +=$(arch-y) $(tune-y) | ||
12 | |||
13 | #Default value | ||
14 | head-y := arch/nds32/kernel/head.o | ||
15 | textaddr-y := $(CONFIG_PAGE_OFFSET)+0xc000 | ||
16 | |||
17 | TEXTADDR := $(textaddr-y) | ||
18 | |||
19 | export TEXTADDR | ||
20 | |||
21 | |||
22 | # If we have a machine-specific directory, then include it in the build. | ||
23 | core-y += arch/nds32/kernel/ arch/nds32/mm/ | ||
24 | libs-y += arch/nds32/lib/ | ||
25 | LIBGCC_PATH := \ | ||
26 | $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name) | ||
27 | libs-y += $(LIBGCC_PATH) | ||
28 | |||
29 | ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""' | ||
30 | BUILTIN_DTB := y | ||
31 | else | ||
32 | BUILTIN_DTB := n | ||
33 | endif | ||
34 | |||
35 | ifdef CONFIG_CPU_LITTLE_ENDIAN | ||
36 | KBUILD_CFLAGS += -EL | ||
37 | else | ||
38 | KBUILD_CFLAGS += -EB | ||
39 | endif | ||
40 | |||
41 | boot := arch/nds32/boot | ||
42 | core-$(BUILTIN_DTB) += $(boot)/dts/ | ||
43 | |||
44 | .PHONY: FORCE | ||
45 | |||
46 | Image: vmlinux | ||
47 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | ||
48 | |||
49 | |||
50 | PHONY += vdso_install | ||
51 | vdso_install: | ||
52 | $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@ | ||
53 | |||
54 | prepare: vdso_prepare | ||
55 | vdso_prepare: prepare0 | ||
56 | $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h | ||
57 | |||
58 | CLEAN_FILES += include/asm-nds32/constants.h* | ||
59 | |||
60 | # We use MRPROPER_FILES and CLEAN_FILES now | ||
61 | archclean: | ||
62 | $(Q)$(MAKE) $(clean)=$(boot) | ||
63 | |||
64 | define archhelp | ||
65 | echo ' Image - kernel image (arch/$(ARCH)/boot/Image)' | ||
66 | endef | ||
diff --git a/arch/nds32/boot/Makefile b/arch/nds32/boot/Makefile new file mode 100644 index 000000000000..3f9b86f68d8f --- /dev/null +++ b/arch/nds32/boot/Makefile | |||
@@ -0,0 +1,15 @@ | |||
1 | targets := Image Image.gz | ||
2 | |||
3 | $(obj)/Image: vmlinux FORCE | ||
4 | $(call if_changed,objcopy) | ||
5 | |||
6 | $(obj)/Image.gz: $(obj)/Image FORCE | ||
7 | $(call if_changed,gzip) | ||
8 | |||
9 | install: $(obj)/Image | ||
10 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | ||
11 | $(obj)/Image System.map "$(INSTALL_PATH)" | ||
12 | |||
13 | zinstall: $(obj)/Image.gz | ||
14 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | ||
15 | $(obj)/Image.gz System.map "$(INSTALL_PATH)" | ||
diff --git a/arch/nds32/include/asm/Kbuild b/arch/nds32/include/asm/Kbuild new file mode 100644 index 000000000000..06bdf8167f5a --- /dev/null +++ b/arch/nds32/include/asm/Kbuild | |||
@@ -0,0 +1,55 @@ | |||
1 | generic-y += asm-offsets.h | ||
2 | generic-y += atomic.h | ||
3 | generic-y += bitops.h | ||
4 | generic-y += bitsperlong.h | ||
5 | generic-y += bpf_perf_event.h | ||
6 | generic-y += bug.h | ||
7 | generic-y += bugs.h | ||
8 | generic-y += checksum.h | ||
9 | generic-y += clkdev.h | ||
10 | generic-y += cmpxchg.h | ||
11 | generic-y += cmpxchg-local.h | ||
12 | generic-y += cputime.h | ||
13 | generic-y += device.h | ||
14 | generic-y += div64.h | ||
15 | generic-y += dma.h | ||
16 | generic-y += emergency-restart.h | ||
17 | generic-y += errno.h | ||
18 | generic-y += exec.h | ||
19 | generic-y += fb.h | ||
20 | generic-y += fcntl.h | ||
21 | generic-y += ftrace.h | ||
22 | generic-y += gpio.h | ||
23 | generic-y += hardirq.h | ||
24 | generic-y += hw_irq.h | ||
25 | generic-y += ioctl.h | ||
26 | generic-y += ioctls.h | ||
27 | generic-y += irq.h | ||
28 | generic-y += irq_regs.h | ||
29 | generic-y += irq_work.h | ||
30 | generic-y += kdebug.h | ||
31 | generic-y += kmap_types.h | ||
32 | generic-y += kprobes.h | ||
33 | generic-y += kvm_para.h | ||
34 | generic-y += limits.h | ||
35 | generic-y += local.h | ||
36 | generic-y += mm-arch-hooks.h | ||
37 | generic-y += mman.h | ||
38 | generic-y += parport.h | ||
39 | generic-y += pci.h | ||
40 | generic-y += percpu.h | ||
41 | generic-y += preempt.h | ||
42 | generic-y += sections.h | ||
43 | generic-y += segment.h | ||
44 | generic-y += serial.h | ||
45 | generic-y += shmbuf.h | ||
46 | generic-y += sizes.h | ||
47 | generic-y += stat.h | ||
48 | generic-y += switch_to.h | ||
49 | generic-y += timex.h | ||
50 | generic-y += topology.h | ||
51 | generic-y += trace_clock.h | ||
52 | generic-y += unaligned.h | ||
53 | generic-y += user.h | ||
54 | generic-y += vga.h | ||
55 | generic-y += word-at-a-time.h | ||
diff --git a/arch/nds32/include/uapi/asm/Kbuild b/arch/nds32/include/uapi/asm/Kbuild new file mode 100644 index 000000000000..40be972faf9e --- /dev/null +++ b/arch/nds32/include/uapi/asm/Kbuild | |||
@@ -0,0 +1,29 @@ | |||
1 | # UAPI Header export list | ||
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | |||
4 | generic-y += bpf_perf_event.h | ||
5 | generic-y += errno.h | ||
6 | generic-y += ioctl.h | ||
7 | generic-y += ioctls.h | ||
8 | generic-y += ipcbuf.h | ||
9 | generic-y += shmbuf.h | ||
10 | generic-y += bitsperlong.h | ||
11 | generic-y += fcntl.h | ||
12 | generic-y += stat.h | ||
13 | generic-y += mman.h | ||
14 | generic-y += msgbuf.h | ||
15 | generic-y += poll.h | ||
16 | generic-y += posix_types.h | ||
17 | generic-y += resource.h | ||
18 | generic-y += sembuf.h | ||
19 | generic-y += setup.h | ||
20 | generic-y += siginfo.h | ||
21 | generic-y += signal.h | ||
22 | generic-y += socket.h | ||
23 | generic-y += sockios.h | ||
24 | generic-y += swab.h | ||
25 | generic-y += statfs.h | ||
26 | generic-y += termbits.h | ||
27 | generic-y += termios.h | ||
28 | generic-y += types.h | ||
29 | generic-y += ucontext.h | ||
diff --git a/arch/nds32/kernel/Makefile b/arch/nds32/kernel/Makefile new file mode 100644 index 000000000000..42792743e8b9 --- /dev/null +++ b/arch/nds32/kernel/Makefile | |||
@@ -0,0 +1,23 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | CPPFLAGS_vmlinux.lds := -DTEXTADDR=$(TEXTADDR) | ||
6 | AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) | ||
7 | |||
8 | # Object file lists. | ||
9 | |||
10 | obj-y := ex-entry.o ex-exit.o ex-scall.o irq.o \ | ||
11 | process.o ptrace.o setup.o signal.o \ | ||
12 | sys_nds32.o time.o traps.o cacheinfo.o \ | ||
13 | dma.o syscall_table.o vdso.o | ||
14 | |||
15 | obj-$(CONFIG_MODULES) += nds32_ksyms.o module.o | ||
16 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
17 | obj-$(CONFIG_OF) += devtree.o | ||
18 | obj-$(CONFIG_CACHE_L2) += atl2c.o | ||
19 | |||
20 | extra-y := head.o vmlinux.lds | ||
21 | |||
22 | |||
23 | obj-y += vdso/ | ||
diff --git a/arch/nds32/kernel/vmlinux.lds.S b/arch/nds32/kernel/vmlinux.lds.S new file mode 100644 index 000000000000..288313b886ef --- /dev/null +++ b/arch/nds32/kernel/vmlinux.lds.S | |||
@@ -0,0 +1,57 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | // Copyright (C) 2005-2017 Andes Technology Corporation | ||
3 | |||
4 | #include <asm/page.h> | ||
5 | #include <asm/thread_info.h> | ||
6 | #include <asm/cache.h> | ||
7 | #include <asm/memory.h> | ||
8 | |||
9 | #define LOAD_OFFSET (PAGE_OFFSET - PHYS_OFFSET) | ||
10 | #include <asm-generic/vmlinux.lds.h> | ||
11 | |||
12 | OUTPUT_ARCH(nds32) | ||
13 | ENTRY(_stext_lma) | ||
14 | jiffies = jiffies_64; | ||
15 | |||
16 | SECTIONS | ||
17 | { | ||
18 | _stext_lma = TEXTADDR - LOAD_OFFSET; | ||
19 | . = TEXTADDR; | ||
20 | __init_begin = .; | ||
21 | HEAD_TEXT_SECTION | ||
22 | INIT_TEXT_SECTION(PAGE_SIZE) | ||
23 | INIT_DATA_SECTION(16) | ||
24 | PERCPU_SECTION(L1_CACHE_BYTES) | ||
25 | __init_end = .; | ||
26 | |||
27 | . = ALIGN(PAGE_SIZE); | ||
28 | _stext = .; | ||
29 | /* Real text segment */ | ||
30 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | ||
31 | _text = .; /* Text and read-only data */ | ||
32 | TEXT_TEXT | ||
33 | SCHED_TEXT | ||
34 | CPUIDLE_TEXT | ||
35 | LOCK_TEXT | ||
36 | KPROBES_TEXT | ||
37 | IRQENTRY_TEXT | ||
38 | *(.fixup) | ||
39 | } | ||
40 | |||
41 | _etext = .; /* End of text and rodata section */ | ||
42 | |||
43 | _sdata = .; | ||
44 | RO_DATA_SECTION(PAGE_SIZE) | ||
45 | RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) | ||
46 | _edata = .; | ||
47 | |||
48 | EXCEPTION_TABLE(16) | ||
49 | NOTES | ||
50 | BSS_SECTION(4, 4, 4) | ||
51 | _end = .; | ||
52 | |||
53 | STABS_DEBUG | ||
54 | DWARF_DEBUG | ||
55 | |||
56 | DISCARDS | ||
57 | } | ||
diff --git a/arch/nds32/mm/Makefile b/arch/nds32/mm/Makefile new file mode 100644 index 000000000000..6b6855852223 --- /dev/null +++ b/arch/nds32/mm/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | obj-y := extable.o tlb.o \ | ||
2 | fault.o init.o ioremap.o mmap.o \ | ||
3 | mm-nds32.o cacheflush.o proc.o | ||
4 | |||
5 | obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o | ||
6 | obj-$(CONFIG_HIGHMEM) += highmem.o | ||
7 | CFLAGS_proc-n13.o += -fomit-frame-pointer | ||