Guo Ren
8f4f1639a1
csky: optimize kernel panic print.
...
Use STACKTRACE to optimize panic print more pretty and align registers
printing.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
2018-12-31 23:15:38 +08:00
Guo Ren
0ea2dc7cd6
csky: stacktrace supported.
...
The gcc option "-mbacktrace" will push fp(r8),lr into stack and we could
unwind the stack with:
fp = *fp
lr = (unsigned int *)fp[1]
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
2018-12-31 23:12:22 +08:00
Guo Ren
859e5f45cb
csky: CPU-hotplug supported for SMP
...
This is a simple implement of CPU-hotplug for power saving. CPU use
wait instruction to enter power saving mode and waiting for IPI wakeup
signal.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
2018-12-31 23:03:53 +08:00
Guo Ren
789154c2ad
csky: fixup save hi,lo,dspcr regs in switch_stack.
...
HI, LO, DSPCR registers are 807/810 related regs and no need for 610/860.
All of the regs must be saved in pt_regs and switch_stack. This patch
fixup saving dspcr reg in switch_stack and pt_regs.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
2018-12-31 22:57:27 +08:00
Guo Ren
31295a72b5
csky: remove syscall_exit_work
...
Remove syscall_exit_work and union all to ret_from_exception.
Signed-off-by: Guo Ren <ren_guo@c-sky.com >
2018-12-31 22:57:27 +08:00
Yangtao Li
398539dd69
csky: Don't leak device tree node reference
...
of_find_node_by_type() acquires a reference to the node returned by it
and that reference needs to be dropped by its caller. setup_smp()
doesn't do that, so fix it by converting to for_each_of_cpu_node().
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com >
Signed-off-by: Guo Ren <guoren@kernel.org >
2018-12-30 20:25:39 +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
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
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
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
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