[PATCH V2] Add C-SKY architecture support

Dmitry V. Levin ldv at altlinux.org
Sun Mar 24 13:30:31 UTC 2019


On Sat, Mar 23, 2019 at 08:56:14AM +0800, guoren at kernel.org wrote:
[...]
> diff --git a/linux/csky/arch_regs.c b/linux/csky/arch_regs.c
> new file mode 100644
> index 0000000..8cd0f67
> --- /dev/null
> +++ b/linux/csky/arch_regs.c
> @@ -0,0 +1,10 @@
> +/*
> + * SPDX-License-Identifier: LGPL-2.1-or-later
> + */
> +
> +static struct pt_regs csky_regs;
> +
> +unsigned long *const csky_sp_ptr = &csky_regs.usp;
> +
> +#define ARCH_REGS_FOR_GETREGSET	csky_regs
> +#define ARCH_PC_REG		csky_regs.pc

I must have missed this during the fist review:
csky_sp_ptr is not used anywhere so there is no need to define it.

Consider defining
#define ARCH_SP_REG		csky_regs.usp
instead.

This is used by get_stack_pointer() to fetch the stack pointer
used by get_rt_sigframe_addr() used by SYS_FUNC(rt_sigreturn).

I suppose rt_sigreturn test fails without this.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190324/e5cf7fd2/attachment.bin>


More information about the Strace-devel mailing list