summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-29 08:25:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-29 08:25:00 -0700
commitac435075892e3e651c667b4a9f2267cf3ef1d5a2 (patch)
treeff45694dd545392cc6553af1219b2bd840974307 /arch
parent9f51ae62c84a23ade0ba86457d30a30c9db0c50f (diff)
parent2347e7e1aea410865e3c3f92014b07ff7d4c5b02 (diff)
Merge tag 'csky-for-linus-4.20' of https://github.com/c-sky/csky-linux
Pull C-SKY architecture port from Guo Ren: "This contains the Linux port for C-SKY(csky) based on linux-4.19 Release, which has been through 10 rounds of review on mailing list. More information: http://en.c-sky.com The development repo: https://github.com/c-sky/csky-linux ABI Documentation: https://github.com/c-sky/csky-doc Here is the pre-built cross compiler for fast test from our CI: https://gitlab.com/c-sky/buildroot/-/jobs/101608095/artifacts/file/output/images/csky_toolchain_qemu_csky_ck807f_4.18_glibc_defconfig_482b221e52908be1c9b2ccb444255e1562bb7025.tar.xz We use buildroot as our CI-test enviornment. "LTP, Lmbench ..." will be tested for every commit. See here for more details: https://gitlab.com/c-sky/buildroot/pipelines We'll continouslly improve csky subsystem in future" Arnd acks, and adds the following notes: "I did a thorough review of the ABI, which as usual mainly consists of spotting any files that don't use the asm-generic ABI itself, and having it changed to it matches exactly what we do on other new architectures. I also looked at every other patch and commented on maybe half of them where I saw something that did not quite seem right. Others have reviewed specific patches in greater depth. I'm sure that one could fine more of the minor details, but as long as they are not ABI relevant, they can be fixed later. The only patch that is part of the ABI and that nobody reviewed is the signal handling. This is one of the areas I never worked on in much detail. I did not see anything wrong with it, but I also don't know what the problems with the other architectures are here, and we seem to be hitting issues occasionally, and we never managed to generalize this enough for new architectures to have a trivial implementation. I was originally hoping that we could have the 64-bit time_t interfaces ready in time to completely drop the 32-bit ones, but that did not happen. We might still remove them in the next merge window depending on whether the libc upstream people prefer to keep them or not. One more general comment: I think this may well be the last new CPU architecture we ever add to the kernel. Both nds32 and c-sky are made by companies that also work on risc-v, and generally speaking risc-v seems to be killing off any of the minor licensable instruction set projects, just like ARM has mostly killed off the custom vendor-specific instruction sets already. If we add another architecture in the future, it may instead be something like the LLVM bitcode or WebAssembly, who knows?" To which Geert Uytterhoeven pipes in about another architecture still in the pipeline: Kalray MPPA. * tag 'csky-for-linus-4.20' of https://github.com/c-sky/csky-linux: (24 commits) dt-bindings: interrupt-controller: C-SKY APB intc irqchip: add C-SKY APB bus interrupt controller dt-bindings: interrupt-controller: C-SKY SMP intc irqchip: add C-SKY SMP interrupt controller MAINTAINERS: Add csky dt-bindings: Add vendor prefix for csky dt-bindings: csky CPU Bindings csky: Misc headers csky: SMP support csky: Debug and Ptrace GDB csky: User access csky: Library functions csky: ELF and module probe csky: Atomic operations csky: IRQ handling csky: VDSO and rt_sigreturn csky: Process management and Signal csky: MMU and page table management csky: Cache and TLB routines csky: System Call ...
Diffstat (limited to 'arch')
-rw-r--r--arch/csky/Kconfig205
-rw-r--r--arch/csky/Kconfig.debug9
-rw-r--r--arch/csky/Makefile93
-rw-r--r--arch/csky/abiv1/Makefile8
-rw-r--r--arch/csky/abiv1/alignment.c326
-rw-r--r--arch/csky/abiv1/bswapdi.c12
-rw-r--r--arch/csky/abiv1/bswapsi.c12
-rw-r--r--arch/csky/abiv1/cacheflush.c52
-rw-r--r--arch/csky/abiv1/inc/abi/cacheflush.h49
-rw-r--r--arch/csky/abiv1/inc/abi/ckmmu.h75
-rw-r--r--arch/csky/abiv1/inc/abi/elf.h26
-rw-r--r--arch/csky/abiv1/inc/abi/entry.h160
-rw-r--r--arch/csky/abiv1/inc/abi/page.h27
-rw-r--r--arch/csky/abiv1/inc/abi/pgtable-bits.h37
-rw-r--r--arch/csky/abiv1/inc/abi/reg_ops.h27
-rw-r--r--arch/csky/abiv1/inc/abi/regdef.h26
-rw-r--r--arch/csky/abiv1/inc/abi/string.h13
-rw-r--r--arch/csky/abiv1/inc/abi/vdso.h17
-rw-r--r--arch/csky/abiv1/memcpy.S347
-rw-r--r--arch/csky/abiv1/memset.c37
-rw-r--r--arch/csky/abiv1/mmap.c66
-rw-r--r--arch/csky/abiv1/strksyms.c7
-rw-r--r--arch/csky/abiv2/Makefile10
-rw-r--r--arch/csky/abiv2/cacheflush.c60
-rw-r--r--arch/csky/abiv2/fpu.c275
-rw-r--r--arch/csky/abiv2/inc/abi/cacheflush.h46
-rw-r--r--arch/csky/abiv2/inc/abi/ckmmu.h87
-rw-r--r--arch/csky/abiv2/inc/abi/elf.h43
-rw-r--r--arch/csky/abiv2/inc/abi/entry.h156
-rw-r--r--arch/csky/abiv2/inc/abi/fpu.h66
-rw-r--r--arch/csky/abiv2/inc/abi/page.h14
-rw-r--r--arch/csky/abiv2/inc/abi/pgtable-bits.h37
-rw-r--r--arch/csky/abiv2/inc/abi/reg_ops.h17
-rw-r--r--arch/csky/abiv2/inc/abi/regdef.h26
-rw-r--r--arch/csky/abiv2/inc/abi/string.h27
-rw-r--r--arch/csky/abiv2/inc/abi/vdso.h23
-rw-r--r--arch/csky/abiv2/memcmp.S152
-rw-r--r--arch/csky/abiv2/memcpy.S110
-rw-r--r--arch/csky/abiv2/memmove.S108
-rw-r--r--arch/csky/abiv2/memset.S83
-rw-r--r--arch/csky/abiv2/strcmp.S168
-rw-r--r--arch/csky/abiv2/strcpy.S123
-rw-r--r--arch/csky/abiv2/strksyms.c12
-rw-r--r--arch/csky/abiv2/strlen.S97
-rw-r--r--arch/csky/abiv2/sysdep.h30
-rw-r--r--arch/csky/boot/Makefile24
-rw-r--r--arch/csky/boot/dts/Makefile13
l---------arch/csky/boot/dts/include/dt-bindings1
-rw-r--r--arch/csky/configs/defconfig61
-rw-r--r--arch/csky/include/asm/Kbuild49
-rw-r--r--arch/csky/include/asm/addrspace.h10
-rw-r--r--arch/csky/include/asm/atomic.h212
-rw-r--r--arch/csky/include/asm/barrier.h49
-rw-r--r--arch/csky/include/asm/bitops.h82
-rw-r--r--arch/csky/include/asm/bug.h26
-rw-r--r--arch/csky/include/asm/cache.h30
-rw-r--r--arch/csky/include/asm/cacheflush.h9
-rw-r--r--arch/csky/include/asm/checksum.h50
-rw-r--r--arch/csky/include/asm/cmpxchg.h73
-rw-r--r--arch/csky/include/asm/elf.h85
-rw-r--r--arch/csky/include/asm/fixmap.h27
-rw-r--r--arch/csky/include/asm/highmem.h51
-rw-r--r--arch/csky/include/asm/io.h24
-rw-r--r--arch/csky/include/asm/irqflags.h49
-rw-r--r--arch/csky/include/asm/mmu.h12
-rw-r--r--arch/csky/include/asm/mmu_context.h150
-rw-r--r--arch/csky/include/asm/page.h104
-rw-r--r--arch/csky/include/asm/pgalloc.h115
-rw-r--r--arch/csky/include/asm/pgtable.h306
-rw-r--r--arch/csky/include/asm/processor.h121
-rw-r--r--arch/csky/include/asm/reg_ops.h26
-rw-r--r--arch/csky/include/asm/segment.h19
-rw-r--r--arch/csky/include/asm/shmparam.h11
-rw-r--r--arch/csky/include/asm/smp.h26
-rw-r--r--arch/csky/include/asm/spinlock.h256
-rw-r--r--arch/csky/include/asm/spinlock_types.h37
-rw-r--r--arch/csky/include/asm/string.h13
-rw-r--r--arch/csky/include/asm/switch_to.h36
-rw-r--r--arch/csky/include/asm/syscall.h71
-rw-r--r--arch/csky/include/asm/syscalls.h15
-rw-r--r--arch/csky/include/asm/thread_info.h75
-rw-r--r--arch/csky/include/asm/tlb.h25
-rw-r--r--arch/csky/include/asm/tlbflush.h25
-rw-r--r--arch/csky/include/asm/traps.h44
-rw-r--r--arch/csky/include/asm/uaccess.h416
-rw-r--r--arch/csky/include/asm/unistd.h4
-rw-r--r--arch/csky/include/asm/vdso.h12
-rw-r--r--arch/csky/include/uapi/asm/Kbuild32
-rw-r--r--arch/csky/include/uapi/asm/byteorder.h9
-rw-r--r--arch/csky/include/uapi/asm/cachectl.h13
-rw-r--r--arch/csky/include/uapi/asm/ptrace.h104
-rw-r--r--arch/csky/include/uapi/asm/sigcontext.h14
-rw-r--r--arch/csky/include/uapi/asm/unistd.h10
-rw-r--r--arch/csky/kernel/Makefile8
-rw-r--r--arch/csky/kernel/asm-offsets.c88
-rw-r--r--arch/csky/kernel/atomic.S87
-rw-r--r--arch/csky/kernel/cpu-probe.c79
-rw-r--r--arch/csky/kernel/dumpstack.c66
-rw-r--r--arch/csky/kernel/entry.S396
-rw-r--r--arch/csky/kernel/head.S77
-rw-r--r--arch/csky/kernel/irq.c22
-rw-r--r--arch/csky/kernel/module.c92
-rw-r--r--arch/csky/kernel/power.c30
-rw-r--r--arch/csky/kernel/process.c136
-rw-r--r--arch/csky/kernel/ptrace.c314
-rw-r--r--arch/csky/kernel/setup.c162
-rw-r--r--arch/csky/kernel/signal.c347
-rw-r--r--arch/csky/kernel/smp.c237
-rw-r--r--arch/csky/kernel/syscall.c43
-rw-r--r--arch/csky/kernel/syscall_table.c14
-rw-r--r--arch/csky/kernel/time.c11
-rw-r--r--arch/csky/kernel/traps.c169
-rw-r--r--arch/csky/kernel/vdso.c86
-rw-r--r--arch/csky/kernel/vmlinux.lds.S66
-rw-r--r--arch/csky/lib/Makefile1
-rw-r--r--arch/csky/lib/delay.c39
-rw-r--r--arch/csky/lib/usercopy.c262
-rw-r--r--arch/csky/mm/Makefile13
-rw-r--r--arch/csky/mm/cachev1.c126
-rw-r--r--arch/csky/mm/cachev2.c79
-rw-r--r--arch/csky/mm/dma-mapping.c254
-rw-r--r--arch/csky/mm/fault.c212
-rw-r--r--arch/csky/mm/highmem.c198
-rw-r--r--arch/csky/mm/init.c122
-rw-r--r--arch/csky/mm/ioremap.c48
-rw-r--r--arch/csky/mm/syscache.c32
-rw-r--r--arch/csky/mm/tlb.c219
127 files changed, 10562 insertions, 0 deletions
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
new file mode 100644
index 000000000000..0a0558567eaa
--- /dev/null
+++ b/arch/csky/Kconfig
@@ -0,0 +1,205 @@
+config CSKY
+ def_bool y
+ select ARCH_HAS_SYNC_DMA_FOR_CPU
+ select ARCH_HAS_SYNC_DMA_FOR_DEVICE
+ select ARCH_USE_BUILTIN_BSWAP
+ select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
+ select COMMON_CLK
+ select CLKSRC_MMIO
+ select CLKSRC_OF
+ select DMA_DIRECT_OPS
+ select DMA_NONCOHERENT_OPS
+ select IRQ_DOMAIN
+ select HANDLE_DOMAIN_IRQ
+ select DW_APB_TIMER_OF
+ select GENERIC_LIB_ASHLDI3
+ select GENERIC_LIB_ASHRDI3
+ select GENERIC_LIB_LSHRDI3
+ select GENERIC_LIB_MULDI3
+ select GENERIC_LIB_CMPDI2
+ select GENERIC_LIB_UCMPDI2
+ select GENERIC_ALLOCATOR
+ select GENERIC_ATOMIC64
+ select GENERIC_CLOCKEVENTS
+ select GENERIC_CPU_DEVICES
+ select GENERIC_IRQ_CHIP
+ select GENERIC_IRQ_PROBE
+ select GENERIC_IRQ_SHOW
+ select GENERIC_IRQ_MULTI_HANDLER
+ select GENERIC_SCHED_CLOCK
+ select GENERIC_SMP_IDLE_THREAD
+ select HAVE_ARCH_TRACEHOOK
+ select HAVE_GENERIC_DMA_COHERENT
+ select HAVE_KERNEL_GZIP
+ select HAVE_KERNEL_LZO
+ select HAVE_KERNEL_LZMA
+ select HAVE_C_RECORDMCOUNT
+ select HAVE_DMA_API_DEBUG
+ select HAVE_DMA_CONTIGUOUS
+ select HAVE_MEMBLOCK
+ select MAY_HAVE_SPARSE_IRQ
+ select MODULES_USE_ELF_RELA if MODULES
+ select NO_BOOTMEM
+ select OF
+ select OF_EARLY_FLATTREE
+ select OF_RESERVED_MEM
+ select PERF_USE_VMALLOC
+ select RTC_LIB
+ select TIMER_OF
+ select USB_ARCH_HAS_EHCI
+ select USB_ARCH_HAS_OHCI
+
+config CPU_HAS_CACHEV2
+ bool
+
+config CPU_HAS_FPUV2
+ bool
+
+config CPU_HAS_HILO
+ bool
+
+config CPU_HAS_TLBI
+ bool
+
+conf