Received: by 10.223.164.202 with SMTP id h10csp1192417wrb; Tue, 7 Nov 2017 23:50:10 -0800 (PST) X-Google-Smtp-Source: ABhQp+QY1zg4LFyiq3LOg6nIlMbwMEg2sxuGNixfiS/gv/stRLGRnMkgjmpFvo8qrWJUhZqCzfDZ X-Received: by 10.99.2.23 with SMTP id 23mr1428982pgc.99.1510127410115; Tue, 07 Nov 2017 23:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510127410; cv=none; d=google.com; s=arc-20160816; b=rkpM91kxmhxxBGjtI0hvUrKkCJXhiUe2i32PhYpMogxeZnhyUATUQnJZDwszuh0ZSk RxDKpZrWSkvpy6FUAtl3e+GWIcHg+Itpl11COXGW81ul4tlRB+Hu1GLUCvpFxhIYFSsX WBz6Ni9GAelreQCOlsFq5BNVV/5sEPDDerNWpHFVFVCVgAsNjF3rklJeZ42H+DC8/w3H 3EU7RzXWUeBcy9PeXoZytMHWQex6qxhJww4WzOQTC50K/P5zOYDvQKVenlKZKLH7e7H/ SF6/evkfZ/ybD6yZEuojusaoVchzux3NjIB4aCzRl0PzJ0DFVPTzDJXEUgIV5ci7eA5j 2ZtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vIL3fhNk3EIK6AH7oZ5fscML6lINXo1cSkUCas6d3Oc=; b=J0D8AaL3ULDMxaywxzwDbkKGiBgyh0hZ2QUct6JQ6ReChBm6PtKCCJKGbjBqQ6wF8+ B7sSK0RGQs93rRDYc2ryWcDfH4VkX6oU5TR7uV4xN+o8QRzu2ywoILnU4XdgjkQ2o/0d /PA8++ms/U2sZ/G0Y6lrotKijmiYatEn2H0VjHqG1WZsEW2a1E8eASnVwlv6eFdcneru 2M6YAQ5fEeYzdy60f7mBFZvM2nSthkyQTc28D6rtfYdqRLwRkTEHsrCxXUGzWr4x8Lzf uPmKpdEIaIGEcYsGupoFj7DNZ3t0n30tMpGbEhbPz3dXpDmlklMXroMpGFkxcDmv2JWw DdbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ENYIwHXh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si3069130plv.620.2017.11.07.23.49.57; Tue, 07 Nov 2017 23:50:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ENYIwHXh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754511AbdKHGVL (ORCPT + 91 others); Wed, 8 Nov 2017 01:21:11 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:47224 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754401AbdKHGVD (ORCPT ); Wed, 8 Nov 2017 01:21:03 -0500 Received: by mail-pl0-f68.google.com with SMTP id 14so668058plf.4; Tue, 07 Nov 2017 22:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=vIL3fhNk3EIK6AH7oZ5fscML6lINXo1cSkUCas6d3Oc=; b=ENYIwHXheZ5HqNm7FDUMEpjbdS6OoSqF9pQIc1P+Piay2ZGLQf629AEFfygY6OPwb0 JXVIEZE+nkwjsqga43QEXerrQalJSSMRrTmgNky6QPM2sWHENk31OiIG36WLnQZNSOfq vfTBF7OfHQ83O5qJoYuP5npbf8uP7ESFEZKJ/koLuDq1zC1+PJatEBOQ742QNbLvsB1U +j06vKUJvuTgpLsNO4TQkV9kB9CdHcRJz/+PQR6rA3xEDUbvjleh8dt6tnz4UKfXQy3R 9V+JfRLtR075jcl2CCvZhD2I8jiTCXk6jbMfrwG+uLEHhbkEy7tTxaq9ndVO4RvdEiH0 ucVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=vIL3fhNk3EIK6AH7oZ5fscML6lINXo1cSkUCas6d3Oc=; b=acT4MX61HjmL/rKROYyANNfScDDCR+NthIdkrVB4pSGw1gcUMbHF/rlHtV8wlub30F GbhKzDsxg7pCHeZnxsYsuyPLf7fB6kJfe48IUr2JnjppQ3FHOEvoFtgdq0c+no2BRuWf VgOHiuxHbYzDbVxZ1sV8kcri31UGDZ88LqjjO298cGVGgHVBZb27dlgNYc9kCfPMQWVh U9WDB4rqPS1MrC6egAEKvNg9ypD/p7wnjwzmFULR0qY9+Zx4M2G+314TkW+J/MpkTv3O e0FzXmfHaJQiXKbrQIBrIhsAAJCBfr7rNfnKTm/uhUR8+ApnBK+BHM5w+gwAyiTG/R5W BYuw== X-Gm-Message-State: AJaThX7H9kDQUegx5/HqSJtndFodud3gLQNYqrR12etB/vy2uCgQtHYJ ZsBGNi96Sp/MM2Yq6uWEVOw= X-Received: by 10.159.234.10 with SMTP id be10mr1260904plb.386.1510122062505; Tue, 07 Nov 2017 22:21:02 -0800 (PST) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id a4sm6581339pfj.72.2017.11.07.22.20.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 22:21:01 -0800 (PST) From: Greentime Hu To: greentime@andestech.com, linux-kernel@vger.kernel.org, arnd@arndb.de, linux-arch@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, netdev@vger.kernel.org Cc: green.hu@gmail.com, Vincent Chen Subject: [PATCH 26/31] nds32: Build infrastructure Date: Wed, 8 Nov 2017 13:55:14 +0800 Message-Id: <7278eca76456b412e02d9baa5dc164e83199cbab.1510118606.git.green.hu@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greentime Hu Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/Kconfig | 107 ++++++++++++++++++++++++++++++++++++ arch/nds32/Kconfig.cpu | 100 +++++++++++++++++++++++++++++++++ arch/nds32/Kconfig.debug | 14 +++++ arch/nds32/Makefile | 60 ++++++++++++++++++++ arch/nds32/boot/Makefile | 15 +++++ arch/nds32/include/asm/Kbuild | 54 ++++++++++++++++++ arch/nds32/include/uapi/asm/Kbuild | 26 +++++++++ arch/nds32/kernel/Makefile | 24 ++++++++ arch/nds32/kernel/vmlinux.lds.S | 70 +++++++++++++++++++++++ arch/nds32/mm/Makefile | 7 +++ 10 files changed, 477 insertions(+) create mode 100644 arch/nds32/Kconfig create mode 100644 arch/nds32/Kconfig.cpu create mode 100644 arch/nds32/Kconfig.debug create mode 100644 arch/nds32/Makefile create mode 100644 arch/nds32/boot/Makefile create mode 100644 arch/nds32/include/asm/Kbuild create mode 100644 arch/nds32/include/uapi/asm/Kbuild create mode 100644 arch/nds32/kernel/Makefile create mode 100644 arch/nds32/kernel/vmlinux.lds.S create mode 100644 arch/nds32/mm/Makefile diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig new file mode 100644 index 0000000..112f470 --- /dev/null +++ b/arch/nds32/Kconfig @@ -0,0 +1,107 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt. +# + +config NDS32 + def_bool y + select ARCH_HAS_RAW_COPY_USER + select ARCH_WANT_FRAME_POINTERS if FTRACE + select ARCH_WANT_IPC_PARSE_VERSION + select CLKSRC_MMIO + select CLONE_BACKWARDS + select TIMER_OF + select FRAME_POINTER + select GENERIC_ATOMIC64 + select GENERIC_CPU_DEVICES + select GENERIC_CLOCKEVENTS + select GENERIC_IOMAP + select GENERIC_IRQ_CHIP + select GENERIC_IRQ_PROBE + select GENERIC_IRQ_SHOW + select GENERIC_STRNCPY_FROM_USER + select GENERIC_STRNLEN_USER + select GENERIC_TIME_VSYSCALL + select HAVE_ARCH_TRACEHOOK + select HAVE_GENERIC_IOMAP + select HAVE_DEBUG_KMEMLEAK + select HAVE_IDE + select HAVE_MEMBLOCK + select HAVE_MEMBLOCK_NODE_MAP + select HAVE_UID16 + select HAVE_REGS_AND_STACK_ACCESS_API + select IRQ_DOMAIN + select LOCKDEP_SUPPORT + select MODULES_USE_ELF_REL + select MODULES_USE_ELF_RELA + select OF + select OF_EARLY_FLATTREE + select OLD_SIGACTION + select OLD_SIGSUSPEND3 + select NO_IOPORT_MAP + select RTC_LIB + select THREAD_INFO_IN_TASK + select SYS_SUPPORTS_APM_EMULATION + help + Andes(nds32) Linux support. + +config GENERIC_CALIBRATE_DELAY + def_bool y + +config GENERIC_CSUM + def_bool y + +config GENERIC_HWEIGHT + def_bool y + +config GENERIC_LOCKBREAK + def_bool y + depends on PREEMPT + +config RWSEM_GENERIC_SPINLOCK + def_bool y + +config TRACE_IRQFLAGS_SUPPORT + def_bool y + +config STACKTRACE_SUPPORT + def_bool y + +config PGTABLE_LEVELS + default 2 + +source "init/Kconfig" + +menu "System Type" +source "arch/nds32/Kconfig.cpu" +config NR_CPUS + int + default 1 + +config MMU + def_bool y + +config NDS32_BUILTIN_DTB + string "Builtin DTB" + default "" + help + User can use it to specify the dts of the SoC +endmenu + +menu "Kernel Features" +source "kernel/Kconfig.preempt" +source "mm/Kconfig" +source "kernel/Kconfig.hz" +endmenu + +menu "Executable file formats" +source "fs/Kconfig.binfmt" +endmenu + +source "net/Kconfig" +source "drivers/Kconfig" +source "fs/Kconfig" +source "arch/nds32/Kconfig.debug" +source "security/Kconfig" +source "crypto/Kconfig" +source "lib/Kconfig" diff --git a/arch/nds32/Kconfig.cpu b/arch/nds32/Kconfig.cpu new file mode 100644 index 0000000..40eaa97 --- /dev/null +++ b/arch/nds32/Kconfig.cpu @@ -0,0 +1,100 @@ +comment "Processor Features" +config HWZOL + bool "hardware zero overhead loop support" + default y + help + A set of Zero-Overhead Loop mechanism is provided to reduce the + instruction fetch and execution overhead of loop-control instructions. + It will save 3 registers($LB, $LC, $LE) for context saving if say Y. + You don't need to save these registers if you can make sure your user + program doesn't use these registers. + + If unsure, say N. + +config CPU_CACHE_NONALIASING + bool "Non-aliasing cache" + help + If this CPU is using VIPT data cache and its cache way size is larger + than page size, say N. If it is using PIPT data cache, say Y. + + If unsure, say Y. + +choice + prompt "Paging -- page size " + default ANDES_PAGE_SIZE_4KB +config ANDES_PAGE_SIZE_4KB + bool "use 4KB page size" +config ANDES_PAGE_SIZE_8KB + bool "use 8KB page size" +endchoice + +config CPU_ICACHE_DISABLE + bool "Disable I-Cache" + help + Say Y here to disable the processor instruction cache. Unless + you have a reason not to or are unsure, say N. + +config CPU_DCACHE_DISABLE + bool "Disable D-Cache" + help + Say Y here to disable the processor data cache. Unless + you have a reason not to or are unsure, say N. + +config CPU_DCACHE_WRITETHROUGH + bool "Force write through D-cache" + depends on !CPU_DCACHE_DISABLE + help + Say Y here to use the data cache in writethrough mode. Unless you + specifically require this or are unsure, say N. + +config WBNA + bool "WBNA" + default n + help + Say Y here to enable write-back memory with no-write-allocation policy. + +config ALIGNMENT_TRAP + tristate "Kernel support unaligned access handling" + default y + help + Andes processors cannot fetch/store information which is not + naturally aligned on the bus, i.e., a 4 byte fetch must start at an + address divisible by 4. On 32-bit Andes processors, these non-aligned + fetch/store instructions will be emulated in software if you say + here, which has a severe performance impact. This is necessary for + correct operation of some network protocols. With an IP-only + configuration it is safe to say N, otherwise say Y. + +config HIGHMEM + bool "High Memory Support" + depends on MMU && CPU_CACHE_NONALIASING + help + The address space of Andes processors is only 4 Gigabytes large + and it has to accommodate user address space, kernel address + space as well as some memory mapped IO. That means that, if you + have a large amount of physical memory and/or IO, not all of the + memory can be "permanently mapped" by the kernel. The physical + memory that is not permanently mapped is called "high memory". + + Depending on the selected kernel/user memory split, minimum + vmalloc space and actual amount of RAM, you may not need this + option which should result in a slightly faster kernel. + + If unsure, say N. + +config CACHE_L2 + bool "Support L2 cache" + default y + help + Say Y here to enable L2 cache if your SoC are integrated with L2CC. + If unsure, say N. + +menu "Memory configuration" + +config MEMORY_START + hex "Physical memory start address" + default "0x00000000" + help + Physical memory start address, you may modify it if it is porting to + a new SoC with different start address. +endmenu diff --git a/arch/nds32/Kconfig.debug b/arch/nds32/Kconfig.debug new file mode 100644 index 0000000..665da0a --- /dev/null +++ b/arch/nds32/Kconfig.debug @@ -0,0 +1,14 @@ +menu "Kernel hacking" + +source "lib/Kconfig.debug" + +config EARLY_PRINTK + bool "Early printk support" + default y + help + Say Y here if you want to have an early console using the + earlyprintk=[,][,] kernel parameter. It + is assumed that the early console device has been initialised + by the boot loader prior to starting the Linux kernel. + +endmenu diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile new file mode 100644 index 0000000..1bef714 --- /dev/null +++ b/arch/nds32/Makefile @@ -0,0 +1,60 @@ +LDFLAGS_vmlinux := --no-undefined -X +OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S + +KBUILD_DEFCONFIG := ae3xx_defconfig + +comma = , + +KBUILD_CFLAGS +=-mno-sched-prolog-epilog -mcmodel=large + +KBUILD_CFLAGS +=$(arch-y) $(tune-y) +KBUILD_AFLAGS +=$(arch-y) $(tune-y) + +#Default value +head-y := arch/nds32/kernel/head.o +textaddr-y := 0xc000c000 + +TEXTADDR := $(textaddr-y) + +export TEXTADDR + + +# If we have a machine-specific directory, then include it in the build. +core-y += arch/nds32/kernel/ arch/nds32/mm/ +libs-y += arch/nds32/lib/ +LIBGCC_PATH := \ + $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name) +libs-y += $(LIBGCC_PATH) + +ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""' +BUILTIN_DTB := y +else +BUILTIN_DTB := n +endif + +boot := arch/nds32/boot +core-$(BUILTIN_DTB) += $(boot)/dts/ + +.PHONY: FORCE + +Image: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + + +PHONY += vdso_install +vdso_install: + $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@ + +prepare: vdso_prepare +vdso_prepare: prepare0 + $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h + +CLEAN_FILES += include/asm-nds32/constants.h* + +# We use MRPROPER_FILES and CLEAN_FILES now +archclean: + $(Q)$(MAKE) $(clean)=$(boot) + +define archhelp + echo ' Image - kernel image (arch/$(ARCH)/boot/Image)' +endef diff --git a/arch/nds32/boot/Makefile b/arch/nds32/boot/Makefile new file mode 100644 index 0000000..3f9b86f --- /dev/null +++ b/arch/nds32/boot/Makefile @@ -0,0 +1,15 @@ +targets := Image Image.gz + +$(obj)/Image: vmlinux FORCE + $(call if_changed,objcopy) + +$(obj)/Image.gz: $(obj)/Image FORCE + $(call if_changed,gzip) + +install: $(obj)/Image + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ + $(obj)/Image System.map "$(INSTALL_PATH)" + +zinstall: $(obj)/Image.gz + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ + $(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 0000000..414ca9d --- /dev/null +++ b/arch/nds32/include/asm/Kbuild @@ -0,0 +1,54 @@ +generic-y += asm-offsets.h +generic-y += atomic.h +generic-y += barrier.h +generic-y += bitops.h +generic-y += bitsperlong.h +generic-y += bug.h +generic-y += bugs.h +generic-y += checksum.h +generic-y += clkdev.h +generic-y += cmpxchg.h +generic-y += cmpxchg-local.h +generic-y += cputime.h +generic-y += device.h +generic-y += div64.h +generic-y += dma.h +generic-y += emergency-restart.h +generic-y += errno.h +generic-y += exec.h +generic-y += fb.h +generic-y += fcntl.h +generic-y += ftrace.h +generic-y += gpio.h +generic-y += hardirq.h +generic-y += hw_irq.h +generic-y += ioctl.h +generic-y += ioctls.h +generic-y += irq.h +generic-y += irq_regs.h +generic-y += irq_work.h +generic-y += kdebug.h +generic-y += kmap_types.h +generic-y += kprobes.h +generic-y += kvm_para.h +generic-y += limits.h +generic-y += local.h +generic-y += mm-arch-hooks.h +generic-y += mman.h +generic-y += parport.h +generic-y += pci.h +generic-y += percpu.h +generic-y += preempt.h +generic-y += sections.h +generic-y += segment.h +generic-y += serial.h +generic-y += shmbuf.h +generic-y += sizes.h +generic-y += stat.h +generic-y += switch_to.h +generic-y += timex.h +generic-y += topology.h +generic-y += trace_clock.h +generic-y += unaligned.h +generic-y += user.h +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 0000000..c3911f5 --- /dev/null +++ b/arch/nds32/include/uapi/asm/Kbuild @@ -0,0 +1,26 @@ +# UAPI Header export list +include include/uapi/asm-generic/Kbuild.asm + +generic-y += errno.h +generic-y += ioctl.h +generic-y += ioctls.h +generic-y += ipcbuf.h +generic-y += shmbuf.h +generic-y += bitsperlong.h +generic-y += fcntl.h +generic-y += stat.h +generic-y += mman.h +generic-y += msgbuf.h +generic-y += poll.h +generic-y += resource.h +generic-y += sembuf.h +generic-y += setup.h +generic-y += siginfo.h +generic-y += socket.h +generic-y += sockios.h +generic-y += swab.h +generic-y += statfs.h +generic-y += termbits.h +generic-y += termios.h +generic-y += types.h +generic-y += ucontext.h diff --git a/arch/nds32/kernel/Makefile b/arch/nds32/kernel/Makefile new file mode 100644 index 0000000..5abcb0d --- /dev/null +++ b/arch/nds32/kernel/Makefile @@ -0,0 +1,24 @@ +# +# Makefile for the linux kernel. +# + +CPPFLAGS_vmlinux.lds := -DTEXTADDR=$(TEXTADDR) +AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) + +# Object file lists. + +obj-y := ex-entry.o ex-exit.o ex-scall.o irq.o \ + process.o ptrace.o setup.o signal.o \ + sys_nds32.o time.o traps.o cacheinfo.o \ + dma.o syscall_table.o vdso.o + +obj-$(CONFIG_MODULES) += nds32_ksyms.o module.o +obj-$(CONFIG_STACKTRACE) += stacktrace.o +obj-$(CONFIG_OF) += devtree.o +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o +obj-$(CONFIG_CACHE_L2) += atl2c.o + +extra-y := head.o vmlinux.lds + + +obj-y += vdso/ diff --git a/arch/nds32/kernel/vmlinux.lds.S b/arch/nds32/kernel/vmlinux.lds.S new file mode 100644 index 0000000..2b1e55d --- /dev/null +++ b/arch/nds32/kernel/vmlinux.lds.S @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2005-2017 Andes Technology Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#define LOAD_OFFSET (PAGE_OFFSET - PHYS_OFFSET) +#include + +OUTPUT_ARCH(nds32) +ENTRY(_stext_lma) +jiffies = jiffies_64; + +SECTIONS +{ + _stext_lma = TEXTADDR - LOAD_OFFSET; + . = TEXTADDR; + __init_begin = .; + HEAD_TEXT_SECTION + INIT_TEXT_SECTION(PAGE_SIZE) + INIT_DATA_SECTION(16) + PERCPU_SECTION(L1_CACHE_BYTES) + __init_end = .; + + . = ALIGN(PAGE_SIZE); + _stext = .; + /* Real text segment */ + .text : AT(ADDR(.text) - LOAD_OFFSET) { + _text = .; /* Text and read-only data */ + TEXT_TEXT + SCHED_TEXT + CPUIDLE_TEXT + LOCK_TEXT + KPROBES_TEXT + IRQENTRY_TEXT + *(.fixup) + } + + _etext = .; /* End of text and rodata section */ + + _sdata = .; + RO_DATA_SECTION(PAGE_SIZE) + RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) + _edata = .; + + EXCEPTION_TABLE(16) + NOTES + BSS_SECTION(4, 4, 4) + _end = .; + + STABS_DEBUG + DWARF_DEBUG + + DISCARDS +} diff --git a/arch/nds32/mm/Makefile b/arch/nds32/mm/Makefile new file mode 100644 index 0000000..278d28f --- /dev/null +++ b/arch/nds32/mm/Makefile @@ -0,0 +1,7 @@ +obj-y := extable.o tlb.o \ + fault.o init.o ioremap.o mmap.o \ + mm-nds32.o cacheflush.o proc-n13.o + +obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o +obj-$(CONFIG_HIGHMEM) += highmem.o +CFLAGS_proc-n13.o += -fomit-frame-pointer -- 1.7.9.5 From 1584356250922539051@xxx Fri Nov 17 23:04:24 +0000 2017 X-GM-THRID: 1584073596111110291 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread