Christoph Hellwig
f04b951f6c
csky: use the generic remapping dma alloc implementation
...
The csky code was largely copied from arm/arm64, so switch to the
generic arm64-based implementation instead.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Acked-by: Guo Ren <ren_guo@c-sky.com >
2018-12-01 18:07:16 +01:00
Christoph Hellwig
576d0d552b
csky: don't use GFP_DMA in atomic_pool_init
...
csky does not implement ZONE_DMA, which means passing GFP_DMA is a no-op.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Acked-by: Guo Ren <ren_guo@c-sky.com >
2018-12-01 18:07:16 +01:00
Christoph Hellwig
de90d7c428
csky: don't select DMA_NONCOHERENT_OPS
...
This option is gone past Linux 4.19.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Acked-by: Guo Ren <ren_guo@c-sky.com >
2018-12-01 18:07:15 +01:00
Christoph Hellwig
f0edfea8ef
dma-mapping: move the remap helpers to a separate file
...
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 <hch@lst.de >
Acked-by: Laura Abbott <labbott@redhat.com >
Reviewed-by: Robin Murphy <robin.murphy@arm.com >
2018-12-01 17:58:34 +01:00
Linus Torvalds
5c99a8d1ed
Merge tag 'csky-for-linus-4.20-fixup-dtb' of https://github.com/c-sky/csky-linux
...
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-01 09:04:30 -07:00
Guo Ren
e8d0c9a726
csky: use common dtb build rules
...
Remove the Kbuild rules in arch/csky and use common dtb build rules.
This modification is based on:
commit 37c8a5fafa
("kbuild: consolidate Devicetree dtb build rules")
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Acked-by: Arnd Bergmann <arnd@arndb.de >
2018-11-01 10:52:27 +08:00
Guo Ren
c4c14c3bd1
csky: remove builtin-dtb Kbuild
...
Remove the builtin-dtb implementation in arch/csky.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-11-01 10:52:26 +08:00
Mike Rapoport
aca52c3983
mm: remove CONFIG_HAVE_MEMBLOCK
...
All architecures use memblock for early memory management. There is no need
for the CONFIG_HAVE_MEMBLOCK configuration option.
[rppt@linux.vnet.ibm.com: of/fdt: fixup #ifdefs]
Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx
[rppt@linux.vnet.ibm.com: csky: fixups after bootmem removal]
Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx
[rppt@linux.vnet.ibm.com: remove stale #else and the code it protects]
Link: http://lkml.kernel.org/r/1538067825-24835-1-git-send-email-rppt@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1536927045-23536-4-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com >
Acked-by: Michal Hocko <mhocko@suse.com >
Tested-by: Jonathan Cameron <jonathan.cameron@huawei.com >
Cc: Catalin Marinas <catalin.marinas@arm.com >
Cc: Chris Zankel <chris@zankel.net >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Greentime Hu <green.hu@gmail.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Guan Xuetao <gxt@pku.edu.cn >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Mark Salter <msalter@redhat.com >
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com >
Cc: Matt Turner <mattst88@gmail.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Palmer Dabbelt <palmer@sifive.com >
Cc: Paul Burton <paul.burton@mips.com >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Richard Weinberger <richard@nod.at >
Cc: Rich Felker <dalias@libc.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Serge Semin <fancer.lancer@gmail.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2018-10-31 08:54:15 -07:00
Mike Rapoport
b4a991ec58
mm: remove CONFIG_NO_BOOTMEM
...
All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any
kernel configuration and therefore it can be removed.
[alexander.h.duyck@linux.intel.com: remove now defunct NO_BOOTMEM from depends list for deferred init]
Link: http://lkml.kernel.org/r/20180925201814.3576.15105.stgit@localhost.localdomain
Link: http://lkml.kernel.org/r/1536927045-23536-3-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com >
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com >
Acked-by: Michal Hocko <mhocko@suse.com >
Cc: Catalin Marinas <catalin.marinas@arm.com >
Cc: Chris Zankel <chris@zankel.net >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Greentime Hu <green.hu@gmail.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Guan Xuetao <gxt@pku.edu.cn >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Mark Salter <msalter@redhat.com >
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com >
Cc: Matt Turner <mattst88@gmail.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Palmer Dabbelt <palmer@sifive.com >
Cc: Paul Burton <paul.burton@mips.com >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Richard Weinberger <richard@nod.at >
Cc: Rich Felker <dalias@libc.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Serge Semin <fancer.lancer@gmail.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2018-10-31 08:54:14 -07:00
Nick Desaulniers
de0d22e50c
treewide: remove current_text_addr
...
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.
[akpm@linux-foundation.org: fix arch/csky/include/asm/processor.h]
Link: http://lkml.kernel.org/r/20180911182413.180715-1-ndesaulniers@google.com
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2018-10-31 08:54:12 -07:00
Guo Ren
735ee005c3
csky: Misc headers
...
This patch adds csky registers' definition, bitops, byteorder,
asm-offsets codes.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:26 +08:00
Guo Ren
9910698657
csky: SMP support
...
This patch adds boot, ipi, hotplug codes for SMP.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Cc: Marc Zyngier <marc.zyngier@arm.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:26 +08:00
Guo Ren
2ce36bfa6a
csky: Debug and Ptrace GDB
...
This patch adds arch ptrace implementation, stack dump and bug.h.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:25 +08:00
Guo Ren
da55128194
csky: User access
...
The patch adds "user access from kernel" codes.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:25 +08:00
Guo Ren
c5af58b769
csky: Library functions
...
This patch adds string optimize codes and some auxiliary codes.
Signed-off-by: Chen Linfei <linfei_chen@c-sky.com >
Signed-off-by: Mao Han <han_mao@c-sky.com >
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:24 +08:00
Guo Ren
9d056df092
csky: ELF and module probe
...
This patch adds ELF definition and module relocate codes.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:23 +08:00
Guo Ren
a0ae62806f
csky: Atomic operations
...
This patch adds atomic, cmpxchg, spinlock files.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Cc: Andrea Parri <andrea.parri@amarulasolutions.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Peter Zijlstra <peterz@infradead.org >
2018-10-26 00:54:23 +08:00
Guo Ren
e38a5272ba
csky: IRQ handling
...
This patch adds IRQ handling files.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:22 +08:00
Guo Ren
dd3ef10ea2
csky: VDSO and rt_sigreturn
...
This patch adds files related to VDSO and our VDSO only support
rt_sigreturn.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-26 00:54:22 +08:00
Guo Ren
e9564df753
csky: Process management and Signal
...
This patch adds files related to task_switch, sigcontext, signal,
fpu context switch.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Eric W. Biederman <ebiederm@xmission.com >
2018-10-26 00:54:13 +08:00
Guo Ren
013de2d667
csky: MMU and page table management
...
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/20180518215548.GH17671@n2100.armlinux.org.uk/
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Cc: Christoph Hellwig <hch@infradead.org >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00
Guo Ren
00a9730e10
csky: Cache and TLB routines
...
This patch adds cache and tlb sync codes for abiv1 & abiv2.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00
Guo Ren
4859bfca11
csky: System Call
...
This patch adds files related to syscall.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00
Guo Ren
081860b970
csky: Exception handling and mm-fault
...
This patch adds exception handling code, cpuinfo and mm-fault code.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00
Guo Ren
9143a9359d
csky: Kernel booting
...
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 <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00
Guo Ren
7c768f8451
csky: defconfig
...
This patch adds csky defconfig.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Reviewed-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00
Guo Ren
c32e64e852
csky: Build infrastructure
...
This patch adds Makefile, Kconfig for build infrastructure.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
Acked-by: Arnd Bergmann <arnd@arndb.de >
2018-10-25 23:36:19 +08:00