aboutsummaryrefslogtreecommitdiff
path: root/arch/csky
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13dma-mapping: always build the direct mapping codeChristoph Hellwig1-1/+0
All architectures except for sparc64 use the dma-direct code in some form, and even for sparc64 we had the discussion of a direct mapping mode a while ago. In preparation for directly calling the direct mapping code don't bother having it optionally but always build the code in. This is a minor hardship for some powerpc and arm configs that don't pull it in yet (although they should in a relase ot two), and sparc64 which currently doesn't need it at all, but it will reduce the ifdef mess we'd otherwise need significantly. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Tested-by: Jesper Dangaard Brouer <[email protected]> Tested-by: Tony Luck <[email protected]>
2018-12-03csky: bugfix tlb_get_pgd error.Guo Ren1-2/+2
It's wrong to mask/unmask highest bit in addr to translate the vaddr to paddr. We should use PAGE_OFFSET and PHYS_OFFSET. Wrong implement: return ((get_pgd()|(1<<31)) - PHYS_OFFSET) & ~1; When PHYS_OFFSET=0xc0000000 and get_pgd() return 0xe0000000, it'll return 0x60000000. It's wrong and should be 0xa0000000. Now correct it to: return ((get_pgd() - PHYS_OFFSET) & ~1) + PAGE_OFFSET; Signed-off-by: Guo Ren <[email protected]>
2018-12-01csky: use the generic remapping dma alloc implementationChristoph Hellwig2-141/+3
The csky code was largely copied from arm/arm64, so switch to the generic arm64-based implementation instead. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Guo Ren <[email protected]>
2018-12-01csky: don't use GFP_DMA in atomic_pool_initChristoph Hellwig1-1/+1
csky does not implement ZONE_DMA, which means passing GFP_DMA is a no-op. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Guo Ren <[email protected]>
2018-12-01csky: don't select DMA_NONCOHERENT_OPSChristoph Hellwig1-1/+0
This option is gone past Linux 4.19. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Guo Ren <[email protected]>
2018-12-01dma-mapping: move the remap helpers to a separate fileChristoph Hellwig1-0/+1
The dma remap code only makes sense for not cache coherent architectures (or possibly the corner case of highmem CMA allocations) and currently is only used by arm, arm64, csky and xtensa. Split it out into a separate file with a separate Kconfig symbol, which gets the right copyright notice given that this code was written by Laura Abbott working for Code Aurora at that point. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Laura Abbott <[email protected]> Reviewed-by: Robin Murphy <[email protected]>
2018-11-01Merge tag 'csky-for-linus-4.20-fixup-dtb' of https://github.com/c-sky/csky-linuxLinus Torvalds3-31/+2
Pull csky dtb fixups from Guo Ren: "These fix the csky dtb Kbuild to follow the new Devicetree dtb build rules" * tag 'csky-for-linus-4.20-fixup-dtb' of https://github.com/c-sky/csky-linux: csky: use common dtb build rules csky: remove builtin-dtb Kbuild
2018-11-01csky: use common dtb build rulesGuo Ren2-13/+1
Remove the Kbuild rules in arch/csky and use common dtb build rules. This modification is based on: commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules") Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2018-11-01csky: remove builtin-dtb KbuildGuo Ren3-18/+1
Remove the builtin-dtb implementation in arch/csky. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-31mm: remove CONFIG_HAVE_MEMBLOCKMike Rapoport4-6/+3
All architecures use memblock for early memory management. There is no need for the CONFIG_HAVE_MEMBLOCK configuration option. [[email protected]: of/fdt: fixup #ifdefs] Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx [[email protected]: csky: fixups after bootmem removal] Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx [[email protected]: remove stale #else and the code it protects] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Acked-by: Michal Hocko <[email protected]> Tested-by: Jonathan Cameron <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chris Zankel <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Jonas Bonn <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Mark Salter <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Burton <[email protected]> Cc: Richard Kuo <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Rich Felker <[email protected]> Cc: Russell King <[email protected]> Cc: Serge Semin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2018-10-31mm: remove CONFIG_NO_BOOTMEMMike Rapoport1-1/+0
All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any kernel configuration and therefore it can be removed. [[email protected]: remove now defunct NO_BOOTMEM from depends list for deferred init] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chris Zankel <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Jonas Bonn <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Mark Salter <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Burton <[email protected]> Cc: Richard Kuo <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Rich Felker <[email protected]> Cc: Russell King <[email protected]> Cc: Serge Semin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2018-10-31treewide: remove current_text_addrNick Desaulniers1-6/+0
Prefer _THIS_IP_ defined in linux/kernel.h. Most definitions of current_text_addr were the same as _THIS_IP_, but a few archs had inline assembly instead. This patch removes the final call site of current_text_addr, making all of the definitions dead code. [[email protected]: fix arch/csky/include/asm/processor.h] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Nick Desaulniers <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2018-10-26csky: Misc headersGuo Ren9-0/+351
This patch adds csky registers' definition, bitops, byteorder, asm-offsets codes. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: SMP supportGuo Ren2-0/+263
This patch adds boot, ipi, hotplug codes for SMP. Signed-off-by: Guo Ren <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: Debug and Ptrace GDBGuo Ren4-0/+510
This patch adds arch ptrace implementation, stack dump and bug.h. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: User accessGuo Ren2-0/+678
The patch adds "user access from kernel" codes. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: Library functionsGuo Ren19-0/+1420
This patch adds string optimize codes and some auxiliary codes. Signed-off-by: Chen Linfei <[email protected]> Signed-off-by: Mao Han <[email protected]> Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: ELF and module probeGuo Ren4-0/+246
This patch adds ELF definition and module relocate codes. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: Atomic operationsGuo Ren5-0/+665
This patch adds atomic, cmpxchg, spinlock files. Signed-off-by: Guo Ren <[email protected]> Cc: Andrea Parri <[email protected]> Cc: Arnd Bergmann <[email protected]> Reviewed-by: Peter Zijlstra <[email protected]>
2018-10-26csky: IRQ handlingGuo Ren2-0/+71
This patch adds IRQ handling files. Signed-off-by: Guo Ren <[email protected]> Cc: Thomas Gleixner <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: VDSO and rt_sigreturnGuo Ren4-0/+138
This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-26csky: Process management and SignalGuo Ren10-0/+1231
This patch adds files related to task_switch, sigcontext, signal, fpu context switch. Signed-off-by: Guo Ren <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Eric W. Biederman <[email protected]>
2018-10-25csky: MMU and page table managementGuo Ren20-0/+1620
This patch adds files related to memory management and here is our memory-layout: Fixmap : 0xffc02000 – 0xfffff000 (4 MB - 12KB) Pkmap : 0xff800000 – 0xffc00000 (4 MB) Vmalloc : 0xf0200000 – 0xff000000 (238 MB) Lowmem : 0x80000000 – 0xc0000000 (1GB) abiv1 CPU (CK610) is VIPT cache and it doesn't support highmem. abiv2 CPUs are all PIPT cache and they could support highmem. Lowmem is directly mapped by msa0 & msa1 reg, and we needn't setup memory page table for it. Link:https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Guo Ren <[email protected]> Cc: Christoph Hellwig <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-25csky: Cache and TLB routinesGuo Ren15-0/+838
This patch adds cache and tlb sync codes for abiv1 & abiv2. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-25csky: System CallGuo Ren5-0/+153
This patch adds files related to syscall. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-25csky: Exception handling and mm-faultGuo Ren9-0/+1546
This patch adds exception handling code, cpuinfo and mm-fault code. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-25csky: Kernel bootingGuo Ren3-0/+305
This patch add boot code. Thx boot params is all in dtb and it's the only way to let kernel get bootloader param information. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-25csky: defconfigGuo Ren1-0/+61
This patch adds csky defconfig. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
2018-10-25csky: Build infrastructureGuo Ren13-0/+466
This patch adds Makefile, Kconfig for build infrastructure. Signed-off-by: Guo Ren <[email protected]> Acked-by: Arnd Bergmann <[email protected]>