···11+config SYMBOL_PREFIX22+ string33+ default "_"44+55+config METAG66+ def_bool y77+ select EMBEDDED88+ select GENERIC_ATOMIC6499+ select GENERIC_CLOCKEVENTS1010+ select GENERIC_IRQ_SHOW1111+ select GENERIC_SIGALTSTACK1212+ select GENERIC_SMP_IDLE_THREAD1313+ select HAVE_64BIT_ALIGNED_ACCESS1414+ select HAVE_ARCH_TRACEHOOK1515+ select HAVE_DEBUG_KMEMLEAK1616+ select HAVE_GENERIC_HARDIRQS1717+ select HAVE_IRQ_WORK1818+ select HAVE_KERNEL_BZIP21919+ select HAVE_KERNEL_GZIP2020+ select HAVE_KERNEL_LZO2121+ select HAVE_KERNEL_XZ2222+ select HAVE_MEMBLOCK2323+ select HAVE_MEMBLOCK_NODE_MAP2424+ select HAVE_MOD_ARCH_SPECIFIC2525+ select HAVE_SYSCALL_TRACEPOINTS2626+ select IRQ_DOMAIN2727+ select MODULES_USE_ELF_RELA2828+ select OF2929+ select OF_EARLY_FLATTREE3030+ select SPARSE_IRQ3131+3232+config ARCH_NO_VIRT_TO_BUS3333+ def_bool y3434+3535+config STACKTRACE_SUPPORT3636+ def_bool y3737+3838+config LOCKDEP_SUPPORT3939+ def_bool y4040+4141+config HAVE_LATENCYTOP_SUPPORT4242+ def_bool y4343+4444+config RWSEM_GENERIC_SPINLOCK4545+ def_bool y4646+4747+config RWSEM_XCHGADD_ALGORITHM4848+ bool4949+5050+config GENERIC_HWEIGHT5151+ def_bool y5252+5353+config GENERIC_CALIBRATE_DELAY5454+ def_bool y5555+5656+config GENERIC_GPIO5757+ def_bool n5858+5959+config NO_IOPORT6060+ def_bool y6161+6262+source "init/Kconfig"6363+6464+source "kernel/Kconfig.freezer"6565+6666+menu "Processor type and features"6767+6868+config MMU6969+ def_bool y7070+7171+config STACK_GROWSUP7272+ def_bool y7373+7474+config HOTPLUG_CPU7575+ bool "Enable CPU hotplug support"7676+ depends on SMP7777+ help7878+ Say Y here to allow turning CPUs off and on. CPUs can be7979+ controlled through /sys/devices/system/cpu.8080+8181+ Say N if you want to disable CPU hotplug.8282+8383+config HIGHMEM8484+ bool "High Memory Support"8585+ help8686+ The address space of Meta processors is only 4 Gigabytes large8787+ and it has to accommodate user address space, kernel address8888+ space as well as some memory mapped IO. That means that, if you8989+ have a large amount of physical memory and/or IO, not all of the9090+ memory can be "permanently mapped" by the kernel. The physical9191+ memory that is not permanently mapped is called "high memory".9292+9393+ Depending on the selected kernel/user memory split, minimum9494+ vmalloc space and actual amount of RAM, you may not need this9595+ option which should result in a slightly faster kernel.9696+9797+ If unsure, say n.9898+9999+source "arch/metag/mm/Kconfig"100100+101101+source "arch/metag/Kconfig.soc"102102+103103+config METAG_META12104104+ bool105105+ help106106+ Select this from the SoC config symbol to indicate that it contains a107107+ Meta 1.2 core.108108+109109+config METAG_META21110110+ bool111111+ help112112+ Select this from the SoC config symbol to indicate that it contains a113113+ Meta 2.1 core.114114+115115+config SMP116116+ bool "Symmetric multi-processing support"117117+ depends on METAG_META21 && METAG_META21_MMU118118+ select USE_GENERIC_SMP_HELPERS119119+ help120120+ This enables support for systems with more than one thread running121121+ Linux. If you have a system with only one thread running Linux,122122+ say N. Otherwise, say Y.123123+124124+config NR_CPUS125125+ int "Maximum number of CPUs (2-4)" if SMP126126+ range 2 4 if SMP127127+ default "1" if !SMP128128+ default "4" if SMP129129+130130+config METAG_SMP_WRITE_REORDERING131131+ bool132132+ help133133+ This attempts to prevent cache-memory incoherence due to external134134+ reordering of writes from different hardware threads when SMP is135135+ enabled. It adds fences (system event 0) to smp_mb and smp_rmb in an136136+ attempt to catch some of the cases, and also before writes to shared137137+ memory in LOCK1 protected atomics and spinlocks.138138+ This will not completely prevent cache incoherency on affected cores.139139+140140+config METAG_LNKGET_AROUND_CACHE141141+ bool142142+ depends on METAG_META21143143+ help144144+ This indicates that the LNKGET/LNKSET instructions go around the145145+ cache, which requires some extra cache flushes when the memory needs146146+ to be accessed by normal GET/SET instructions too.147147+148148+choice149149+ prompt "Atomicity primitive"150150+ default METAG_ATOMICITY_LNKGET151151+ help152152+ This option selects the mechanism for performing atomic operations.153153+154154+config METAG_ATOMICITY_IRQSOFF155155+ depends on !SMP156156+ bool "irqsoff"157157+ help158158+ This option disables interrupts to achieve atomicity. This mechanism159159+ is not SMP-safe.160160+161161+config METAG_ATOMICITY_LNKGET162162+ depends on METAG_META21163163+ bool "lnkget/lnkset"164164+ help165165+ This option uses the LNKGET and LNKSET instructions to achieve166166+ atomicity. LNKGET/LNKSET are load-link/store-conditional instructions.167167+ Choose this option if your system requires low latency.168168+169169+config METAG_ATOMICITY_LOCK1170170+ depends on SMP171171+ bool "lock1"172172+ help173173+ This option uses the LOCK1 instruction for atomicity. This is mainly174174+ provided as a debugging aid if the lnkget/lnkset atomicity primitive175175+ isn't working properly.176176+177177+endchoice178178+179179+config METAG_FPU180180+ bool "FPU Support"181181+ depends on METAG_META21182182+ default y183183+ help184184+ This option allows processes to use FPU hardware available with this185185+ CPU. If this option is not enabled FPU registers will not be saved186186+ and restored on context-switch.187187+188188+ If you plan on running programs which are compiled to use hard floats189189+ say Y here.190190+191191+config METAG_DSP192192+ bool "DSP Support"193193+ help194194+ This option allows processes to use DSP hardware available195195+ with this CPU. If this option is not enabled DSP registers196196+ will not be saved and restored on context-switch.197197+198198+ If you plan on running DSP programs say Y here.199199+200200+config METAG_PERFCOUNTER_IRQS201201+ bool "PerfCounters interrupt support"202202+ depends on METAG_META21203203+ help204204+ This option enables using interrupts to collect information from205205+ Performance Counters. This option is supported in new META21206206+ (starting from HTP265).207207+208208+ When disabled, Performance Counters information will be collected209209+ based on Timer Interrupt.210210+211211+menu "Boot options"212212+213213+config METAG_BUILTIN_DTB214214+ bool "Embed DTB in kernel image"215215+ default y216216+ help217217+ Embeds a device tree binary in the kernel image.218218+219219+config METAG_BUILTIN_DTB_NAME220220+ string "Built in DTB"221221+ depends on METAG_BUILTIN_DTB222222+ help223223+ Set the name of the DTB to embed (leave blank to pick one224224+ automatically based on kernel configuration).225225+226226+config CMDLINE_BOOL227227+ bool "Default bootloader kernel arguments"228228+229229+config CMDLINE230230+ string "Kernel command line"231231+ depends on CMDLINE_BOOL232232+ help233233+ On some architectures there is currently no way for the boot loader234234+ to pass arguments to the kernel. For these architectures, you should235235+ supply some command-line options at build time by entering them236236+ here.237237+238238+config CMDLINE_FORCE239239+ bool "Force default kernel command string"240240+ depends on CMDLINE_BOOL241241+ help242242+ Set this to have arguments from the default kernel command string243243+ override those passed by the boot loader.244244+245245+endmenu246246+247247+source "kernel/Kconfig.preempt"248248+249249+source kernel/Kconfig.hz250250+251251+endmenu252252+253253+menu "Power management options"254254+255255+source kernel/power/Kconfig256256+257257+endmenu258258+259259+menu "Executable file formats"260260+261261+source "fs/Kconfig.binfmt"262262+263263+endmenu264264+265265+source "net/Kconfig"266266+267267+source "drivers/Kconfig"268268+269269+source "fs/Kconfig"270270+271271+source "arch/metag/Kconfig.debug"272272+273273+source "security/Kconfig"274274+275275+source "crypto/Kconfig"276276+277277+source "lib/Kconfig"
+40
arch/metag/Kconfig.debug
···11+menu "Kernel hacking"22+33+config TRACE_IRQFLAGS_SUPPORT44+ bool55+ default y66+77+source "lib/Kconfig.debug"88+99+config DEBUG_STACKOVERFLOW1010+ bool "Check for stack overflows"1111+ depends on DEBUG_KERNEL1212+ help1313+ This option will cause messages to be printed if free stack space1414+ drops below a certain limit.1515+1616+config 4KSTACKS1717+ bool "Use 4Kb for kernel stacks instead of 8Kb"1818+ depends on DEBUG_KERNEL1919+ help2020+ If you say Y here the kernel will use a 4Kb stacksize for the2121+ kernel stack attached to each process/thread. This facilitates2222+ running more threads on a system and also reduces the pressure2323+ on the VM subsystem for higher order allocations. This option2424+ will also use IRQ stacks to compensate for the reduced stackspace.2525+2626+config METAG_FUNCTION_TRACE2727+ bool "Output Meta real-time trace data for function entry/exit"2828+ help2929+ If you say Y here the kernel will use the Meta hardware trace3030+ unit to output information about function entry and exit that3131+ can be used by a debugger for profiling and call-graphs.3232+3333+config METAG_POISON_CATCH_BUFFERS3434+ bool "Poison catch buffer contents on kernel entry"3535+ help3636+ If you say Y here the kernel will write poison data to the3737+ catch buffer registers on kernel entry. This will make any3838+ problem with catch buffer handling much more apparent.3939+4040+endmenu
+55
arch/metag/Kconfig.soc
···11+choice22+ prompt "SoC Type"33+ default META21_FPGA44+55+config META12_FPGA66+ bool "Meta 1.2 FPGA"77+ select METAG_META1288+ help99+ This is a Meta 1.2 FPGA bitstream, just a bare CPU.1010+1111+config META21_FPGA1212+ bool "Meta 2.1 FPGA"1313+ select METAG_META211414+ help1515+ This is a Meta 2.1 FPGA bitstream, just a bare CPU.1616+1717+endchoice1818+1919+menu "SoC configuration"2020+2121+if METAG_META212222+2323+# Meta 2.x specific options2424+2525+config METAG_META21_MMU2626+ bool "Meta 2.x MMU mode"2727+ default y2828+ help2929+ Use the Meta 2.x MMU in extended mode.3030+3131+config METAG_UNALIGNED3232+ bool "Meta 2.x unaligned access checking"3333+ default y3434+ help3535+ All memory accesses will be checked for alignment and an exception3636+ raised on unaligned accesses. This feature does cost performance3737+ but without it there will be no notification of this type of error.3838+3939+config METAG_USER_TCM4040+ bool "Meta on-chip memory support for userland"4141+ select GENERIC_ALLOCATOR4242+ default y4343+ help4444+ Allow the on-chip memories of Meta SoCs to be used by user4545+ applications.4646+4747+endif4848+4949+config METAG_HALT_ON_PANIC5050+ bool "Halt the core on panic"5151+ help5252+ Halt the core when a panic occurs. This is useful when running5353+ pre-production silicon or in an FPGA environment.5454+5555+endmenu
+87
arch/metag/Makefile
···11+#22+# metag/Makefile33+#44+# This file is included by the global makefile so that you can add your own55+# architecture-specific flags and dependencies. Remember to do have actions66+# for "archclean" cleaning up for this architecture.77+#88+# This file is subject to the terms and conditions of the GNU General Public99+# License. See the file "COPYING" in the main directory of this archive1010+# for more details.1111+#1212+# Copyright (C) 1994 by Linus Torvalds1313+# 2007,2008,2012 by Imagination Technologies Ltd.1414+#1515+1616+LDFLAGS :=1717+OBJCOPYFLAGS := -O binary -R .note -R .comment -S1818+1919+checkflags-$(CONFIG_METAG_META12) += -DMETAC_1_22020+checkflags-$(CONFIG_METAG_META21) += -DMETAC_2_12121+CHECKFLAGS += -D__metag__ $(checkflags-y)2222+2323+KBUILD_DEFCONFIG := meta2_defconfig2424+2525+sflags-$(CONFIG_METAG_META12) += -mmetac=1.22626+ifeq ($(CONFIG_METAG_META12),y)2727+# Only use TBI API 1.4 if DSP is enabled for META12 cores2828+sflags-$(CONFIG_METAG_DSP) += -DTBI_1_42929+endif3030+sflags-$(CONFIG_METAG_META21) += -mmetac=2.1 -DTBI_1_43131+3232+cflags-$(CONFIG_METAG_FUNCTION_TRACE) += -mhwtrace-leaf -mhwtrace-retpc3333+cflags-$(CONFIG_METAG_META21) += -mextensions=bex3434+3535+KBUILD_CFLAGS += -pipe3636+KBUILD_CFLAGS += -ffunction-sections3737+3838+KBUILD_CFLAGS += $(sflags-y) $(cflags-y)3939+KBUILD_AFLAGS += $(sflags-y)4040+4141+LDFLAGS_vmlinux := $(ldflags-y)4242+4343+head-y := arch/metag/kernel/head.o4444+4545+core-y += arch/metag/boot/dts/4646+core-y += arch/metag/kernel/4747+core-y += arch/metag/mm/4848+4949+libs-y += arch/metag/lib/5050+libs-y += arch/metag/tbx/5151+5252+boot := arch/metag/boot5353+5454+boot_targets += uImage5555+boot_targets += uImage.gz5656+boot_targets += uImage.bz25757+boot_targets += uImage.xz5858+boot_targets += uImage.lzo5959+boot_targets += uImage.bin6060+boot_targets += vmlinux.bin6161+6262+PHONY += $(boot_targets)6363+6464+all: vmlinux.bin6565+6666+$(boot_targets): vmlinux6767+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@6868+6969+%.dtb %.dtb.S %.dtb.o: scripts7070+ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@7171+7272+dtbs: scripts7373+ $(Q)$(MAKE) $(build)=$(boot)/dts dtbs7474+7575+archclean:7676+ $(Q)$(MAKE) $(clean)=$(boot)7777+7878+define archhelp7979+ echo '* vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'8080+ @echo ' uImage - Alias to bootable U-Boot image'8181+ @echo ' uImage.bin - Kernel-only image for U-Boot (bin)'8282+ @echo ' uImage.gz - Kernel-only image for U-Boot (gzip)'8383+ @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'8484+ @echo ' uImage.xz - Kernel-only image for U-Boot (xz)'8585+ @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'8686+ @echo ' dtbs - Build device tree blobs for enabled boards'8787+endef
+68
arch/metag/boot/Makefile
···11+#22+# This file is subject to the terms and conditions of the GNU General Public33+# License. See the file "COPYING" in the main directory of this archive44+# for more details.55+#66+# Copyright (C) 2007,2012 Imagination Technologies Ltd.77+#88+99+suffix-y := bin1010+suffix-$(CONFIG_KERNEL_GZIP) := gz1111+suffix-$(CONFIG_KERNEL_BZIP2) := bz21212+suffix-$(CONFIG_KERNEL_XZ) := xz1313+suffix-$(CONFIG_KERNEL_LZO) := lzo1414+1515+targets += vmlinux.bin1616+targets += uImage1717+targets += uImage.gz1818+targets += uImage.bz21919+targets += uImage.xz2020+targets += uImage.lzo2121+targets += uImage.bin2222+2323+extra-y += vmlinux.bin2424+extra-y += vmlinux.bin.gz2525+extra-y += vmlinux.bin.bz22626+extra-y += vmlinux.bin.xz2727+extra-y += vmlinux.bin.lzo2828+2929+UIMAGE_LOADADDR = $(CONFIG_PAGE_OFFSET)3030+3131+ifeq ($(CONFIG_FUNCTION_TRACER),y)3232+orig_cflags := $(KBUILD_CFLAGS)3333+KBUILD_CFLAGS = $(subst -pg, , $(orig_cflags))3434+endif3535+3636+$(obj)/vmlinux.bin: vmlinux FORCE3737+ $(call if_changed,objcopy)3838+3939+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE4040+ $(call if_changed,gzip)4141+4242+$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE4343+ $(call if_changed,bzip2)4444+4545+$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE4646+ $(call if_changed,xzkern)4747+4848+$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE4949+ $(call if_changed,lzo)5050+5151+$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE5252+ $(call if_changed,uimage,gzip)5353+5454+$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE5555+ $(call if_changed,uimage,bzip2)5656+5757+$(obj)/uImage.xz: $(obj)/vmlinux.bin.xz FORCE5858+ $(call if_changed,uimage,xz)5959+6060+$(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORCE6161+ $(call if_changed,uimage,lzo)6262+6363+$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE6464+ $(call if_changed,uimage,none)6565+6666+$(obj)/uImage: $(obj)/uImage.$(suffix-y)6767+ @ln -sf $(notdir $<) $@6868+ @echo ' Image $@ is ready'
+38
arch/metag/configs/meta1_defconfig
···11+CONFIG_EXPERIMENTAL=y22+# CONFIG_LOCALVERSION_AUTO is not set33+# CONFIG_SWAP is not set44+CONFIG_LOG_BUF_SHIFT=1355+CONFIG_SYSFS_DEPRECATED=y66+CONFIG_SYSFS_DEPRECATED_V2=y77+CONFIG_KALLSYMS_ALL=y88+# CONFIG_ELF_CORE is not set99+CONFIG_SLAB=y1010+# CONFIG_BLK_DEV_BSG is not set1111+CONFIG_PARTITION_ADVANCED=y1212+# CONFIG_MSDOS_PARTITION is not set1313+# CONFIG_IOSCHED_DEADLINE is not set1414+# CONFIG_IOSCHED_CFQ is not set1515+CONFIG_FLATMEM_MANUAL=y1616+CONFIG_META12_FPGA=y1717+CONFIG_HZ_100=y1818+CONFIG_DEVTMPFS=y1919+CONFIG_DEVTMPFS_MOUNT=y2020+# CONFIG_STANDALONE is not set2121+# CONFIG_PREVENT_FIRMWARE_BUILD is not set2222+# CONFIG_FW_LOADER is not set2323+CONFIG_BLK_DEV_RAM=y2424+CONFIG_BLK_DEV_RAM_COUNT=12525+CONFIG_BLK_DEV_RAM_SIZE=163842626+# CONFIG_INPUT is not set2727+# CONFIG_SERIO is not set2828+# CONFIG_VT is not set2929+# CONFIG_LEGACY_PTYS is not set3030+# CONFIG_DEVKMEM is not set3131+# CONFIG_HW_RANDOM is not set3232+# CONFIG_HWMON is not set3333+# CONFIG_USB_SUPPORT is not set3434+# CONFIG_DNOTIFY is not set3535+CONFIG_TMPFS=y3636+# CONFIG_MISC_FILESYSTEMS is not set3737+# CONFIG_SCHED_DEBUG is not set3838+CONFIG_DEBUG_INFO=y
+39
arch/metag/configs/meta2_defconfig
···11+CONFIG_EXPERIMENTAL=y22+# CONFIG_LOCALVERSION_AUTO is not set33+# CONFIG_SWAP is not set44+CONFIG_SYSVIPC=y55+CONFIG_LOG_BUF_SHIFT=1366+CONFIG_SYSFS_DEPRECATED=y77+CONFIG_SYSFS_DEPRECATED_V2=y88+CONFIG_KALLSYMS_ALL=y99+# CONFIG_ELF_CORE is not set1010+CONFIG_SLAB=y1111+# CONFIG_BLK_DEV_BSG is not set1212+CONFIG_PARTITION_ADVANCED=y1313+# CONFIG_MSDOS_PARTITION is not set1414+# CONFIG_IOSCHED_DEADLINE is not set1515+# CONFIG_IOSCHED_CFQ is not set1616+CONFIG_METAG_L2C=y1717+CONFIG_FLATMEM_MANUAL=y1818+CONFIG_METAG_HALT_ON_PANIC=y1919+CONFIG_HZ_100=y2020+CONFIG_DEVTMPFS=y2121+# CONFIG_STANDALONE is not set2222+# CONFIG_PREVENT_FIRMWARE_BUILD is not set2323+# CONFIG_FW_LOADER is not set2424+CONFIG_BLK_DEV_RAM=y2525+CONFIG_BLK_DEV_RAM_COUNT=12626+CONFIG_BLK_DEV_RAM_SIZE=163842727+# CONFIG_INPUT is not set2828+# CONFIG_SERIO is not set2929+# CONFIG_VT is not set3030+# CONFIG_LEGACY_PTYS is not set3131+# CONFIG_DEVKMEM is not set3232+# CONFIG_HW_RANDOM is not set3333+# CONFIG_HWMON is not set3434+# CONFIG_USB_SUPPORT is not set3535+# CONFIG_DNOTIFY is not set3636+CONFIG_TMPFS=y3737+# CONFIG_MISC_FILESYSTEMS is not set3838+# CONFIG_SCHED_DEBUG is not set3939+CONFIG_DEBUG_INFO=y
+40
arch/metag/configs/meta2_smp_defconfig
···11+CONFIG_EXPERIMENTAL=y22+# CONFIG_LOCALVERSION_AUTO is not set33+# CONFIG_SWAP is not set44+CONFIG_SYSVIPC=y55+CONFIG_LOG_BUF_SHIFT=1366+CONFIG_SYSFS_DEPRECATED=y77+CONFIG_SYSFS_DEPRECATED_V2=y88+CONFIG_KALLSYMS_ALL=y99+# CONFIG_ELF_CORE is not set1010+CONFIG_SLAB=y1111+# CONFIG_BLK_DEV_BSG is not set1212+CONFIG_PARTITION_ADVANCED=y1313+# CONFIG_MSDOS_PARTITION is not set1414+# CONFIG_IOSCHED_DEADLINE is not set1515+# CONFIG_IOSCHED_CFQ is not set1616+CONFIG_METAG_L2C=y1717+CONFIG_FLATMEM_MANUAL=y1818+CONFIG_METAG_HALT_ON_PANIC=y1919+CONFIG_SMP=y2020+CONFIG_HZ_100=y2121+CONFIG_DEVTMPFS=y2222+# CONFIG_STANDALONE is not set2323+# CONFIG_PREVENT_FIRMWARE_BUILD is not set2424+# CONFIG_FW_LOADER is not set2525+CONFIG_BLK_DEV_RAM=y2626+CONFIG_BLK_DEV_RAM_COUNT=12727+CONFIG_BLK_DEV_RAM_SIZE=163842828+# CONFIG_INPUT is not set2929+# CONFIG_SERIO is not set3030+# CONFIG_VT is not set3131+# CONFIG_LEGACY_PTYS is not set3232+# CONFIG_DEVKMEM is not set3333+# CONFIG_HW_RANDOM is not set3434+# CONFIG_HWMON is not set3535+# CONFIG_USB_SUPPORT is not set3636+# CONFIG_DNOTIFY is not set3737+CONFIG_TMPFS=y3838+# CONFIG_MISC_FILESYSTEMS is not set3939+# CONFIG_SCHED_DEBUG is not set4040+CONFIG_DEBUG_INFO=y
···11+/*22+ * This program is used to generate definitions needed by33+ * assembly language modules.44+ *55+ */66+77+#include <linux/kbuild.h>88+#include <linux/thread_info.h>99+1010+int main(void)1111+{1212+ DEFINE(THREAD_INFO_SIZE, sizeof(struct thread_info));1313+ return 0;1414+}
···11+/* ld script to make Meta Linux kernel */22+33+#include <asm/thread_info.h>44+#include <asm/page.h>55+#include <asm/cache.h>66+77+#include <asm-generic/vmlinux.lds.h>88+99+OUTPUT_FORMAT("elf32-metag", "elf32-metag", "elf32-metag")1010+OUTPUT_ARCH(metag)1111+ENTRY(__start)1212+1313+_jiffies = _jiffies_64;1414+SECTIONS1515+{1616+ . = CONFIG_PAGE_OFFSET;1717+ _text = .;1818+ __text = .;1919+ __stext = .;2020+ HEAD_TEXT_SECTION2121+ .text : {2222+ TEXT_TEXT2323+ SCHED_TEXT2424+ LOCK_TEXT2525+ KPROBES_TEXT2626+ IRQENTRY_TEXT2727+ *(.text.*)2828+ *(.gnu.warning)2929+ }3030+3131+ __etext = .; /* End of text section */3232+3333+ __sdata = .;3434+ RO_DATA_SECTION(PAGE_SIZE)3535+ RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)3636+ __edata = .; /* End of data section */3737+3838+ EXCEPTION_TABLE(16)3939+ NOTES4040+4141+ . = ALIGN(PAGE_SIZE); /* Init code and data */4242+ ___init_begin = .;4343+ INIT_TEXT_SECTION(PAGE_SIZE)4444+ INIT_DATA_SECTION(16)4545+4646+ .init.arch.info : {4747+ ___arch_info_begin = .;4848+ *(.arch.info.init)4949+ ___arch_info_end = .;5050+ }5151+5252+ PERCPU_SECTION(L1_CACHE_BYTES)5353+5454+ ___init_end = .;5555+5656+ BSS_SECTION(0, PAGE_SIZE, 0)5757+5858+ __end = .;5959+6060+ . = ALIGN(PAGE_SIZE);6161+ __heap_start = .;6262+6363+ DWARF_DEBUG6464+6565+ /* When something in the kernel is NOT compiled as a module, the6666+ * module cleanup code and data are put into these segments. Both6767+ * can then be thrown away, as cleanup code is never called unless6868+ * it's a module.6969+ */7070+ DISCARDS7171+}
···11+menu "Memory management options"22+33+config PAGE_OFFSET44+ hex "Kernel page offset address"55+ default "0x40000000"66+ help77+ This option allows you to set the virtual address at which the88+ kernel will be mapped to.99+endmenu1010+1111+config KERNEL_4M_PAGES1212+ bool "Map kernel with 4MB pages"1313+ depends on METAG_META21_MMU1414+ default y1515+ help1616+ Map the kernel with large pages to reduce TLB pressure.1717+1818+choice1919+ prompt "User page size"2020+ default PAGE_SIZE_4K2121+2222+config PAGE_SIZE_4K2323+ bool "4kB"2424+ help2525+ This is the default page size used by all Meta cores.2626+2727+config PAGE_SIZE_8K2828+ bool "8kB"2929+ depends on METAG_META21_MMU3030+ help3131+ This enables 8kB pages as supported by Meta 2.x and later MMUs.3232+3333+config PAGE_SIZE_16K3434+ bool "16kB"3535+ depends on METAG_META21_MMU3636+ help3737+ This enables 16kB pages as supported by Meta 2.x and later MMUs.3838+3939+endchoice4040+4141+config NUMA4242+ bool "Non Uniform Memory Access (NUMA) Support"4343+ help4444+ Some Meta systems have MMU-mappable on-chip memories with4545+ lower latencies than main memory. This enables support for4646+ these blocks by binding them to nodes and allowing4747+ memory policies to be used for prioritizing and controlling4848+ allocation behaviour.4949+5050+config FORCE_MAX_ZONEORDER5151+ int "Maximum zone order"5252+ range 10 325353+ default "10"5454+ help5555+ The kernel memory allocator divides physically contiguous memory5656+ blocks into "zones", where each zone is a power of two number of5757+ pages. This option selects the largest power of two that the kernel5858+ keeps in the memory allocator. If you need to allocate very large5959+ blocks of physically contiguous memory, then you may need to6060+ increase this value.6161+6262+ This config option is actually maximum order plus one. For example,6363+ a value of 11 means that the largest free memory block is 2^10 pages.6464+6565+ The page size is not necessarily 4KB. Keep this in mind6666+ when choosing a value for this option.6767+6868+config METAG_L2C6969+ bool "Level 2 Cache Support"7070+ depends on METAG_META217171+ help7272+ Press y here to enable support for the Meta Level 2 (L2) cache. This7373+ will enable the cache at start up if it hasn't already been enabled7474+ by the bootloader.7575+7676+ If the bootloader enables the L2 you must press y here to ensure the7777+ kernel takes the appropriate actions to keep the cache coherent.7878+7979+config NODES_SHIFT8080+ int8181+ default "1"8282+ depends on NEED_MULTIPLE_NODES8383+8484+config ARCH_FLATMEM_ENABLE8585+ def_bool y8686+ depends on !NUMA8787+8888+config ARCH_SPARSEMEM_ENABLE8989+ def_bool y9090+ select SPARSEMEM_STATIC9191+9292+config ARCH_SPARSEMEM_DEFAULT9393+ def_bool y9494+9595+config MAX_ACTIVE_REGIONS9696+ int9797+ default "2" if SPARSEMEM9898+ default "1"9999+100100+config ARCH_POPULATES_NODE_MAP101101+ def_bool y102102+103103+config ARCH_SELECT_MEMORY_MODEL104104+ def_bool y105105+106106+config SYS_SUPPORTS_HUGETLBFS107107+ def_bool y108108+ depends on METAG_META21_MMU109109+110110+choice111111+ prompt "HugeTLB page size"112112+ depends on METAG_META21_MMU && HUGETLB_PAGE113113+ default HUGETLB_PAGE_SIZE_1M114114+115115+config HUGETLB_PAGE_SIZE_8K116116+ bool "8kB"117117+ depends on PAGE_SIZE_4K118118+119119+config HUGETLB_PAGE_SIZE_16K120120+ bool "16kB"121121+ depends on PAGE_SIZE_4K || PAGE_SIZE_8K122122+123123+config HUGETLB_PAGE_SIZE_32K124124+ bool "32kB"125125+126126+config HUGETLB_PAGE_SIZE_64K127127+ bool "64kB"128128+129129+config HUGETLB_PAGE_SIZE_128K130130+ bool "128kB"131131+132132+config HUGETLB_PAGE_SIZE_256K133133+ bool "256kB"134134+135135+config HUGETLB_PAGE_SIZE_512K136136+ bool "512kB"137137+138138+config HUGETLB_PAGE_SIZE_1M139139+ bool "1MB"140140+141141+config HUGETLB_PAGE_SIZE_2M142142+ bool "2MB"143143+144144+config HUGETLB_PAGE_SIZE_4M145145+ bool "4MB"146146+147147+endchoice148148+149149+config METAG_COREMEM150150+ bool151151+ default y if SUSPEND152152+153153+source "mm/Kconfig"
+19
arch/metag/mm/Makefile
···11+#22+# Makefile for the linux Meta-specific parts of the memory manager.33+#44+55+obj-y += cache.o66+obj-y += extable.o77+obj-y += fault.o88+obj-y += init.o99+obj-y += ioremap.o1010+obj-y += maccess.o1111+1212+mmu-y := mmu-meta1.o1313+mmu-$(CONFIG_METAG_META21_MMU) := mmu-meta2.o1414+obj-y += $(mmu-y)1515+1616+obj-$(CONFIG_HIGHMEM) += highmem.o1717+obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o1818+obj-$(CONFIG_METAG_L2C) += l2cache.o1919+obj-$(CONFIG_NUMA) += numa.o