[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: c6cba227cc5d6e2bd400c354d25b81c1dfc6088a URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=c6cba227cc5d6e2bd400c354d25b81c1dfc6088a Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 1a614e14e99636a2a1e12511fa9a2f7a6767855f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1a614e14e99636a2a1e12511fa9a2f7a6767855f Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 8e01baf52cf27af6c875846fc874a8ef91c92a8c URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8e01baf52cf27af6c875846fc874a8ef91c92a8c Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 048c9ce070d01a816155014b63fbf9ff58faa2c6 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=048c9ce070d01a816155014b63fbf9ff58faa2c6 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 960871425ba57d9c321137c4502de367bdac9229 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=960871425ba57d9c321137c4502de367bdac9229 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 12c88f5ed21b1f1776d4ff99290ba59a8bc010cc URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=12c88f5ed21b1f1776d4ff99290ba59a8bc010cc Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 784a730458be93785cbc55832d13be4392f86c71 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=784a730458be93785cbc55832d13be4392f86c71 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: dcc3228c83d48d93a20f6d2afc9022f918c53884 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=dcc3228c83d48d93a20f6d2afc9022f918c53884 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: ca3ecaf533ea237bf3507c15ef6287142c5dd58b URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ca3ecaf533ea237bf3507c15ef6287142c5dd58b Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 0cf549293f0f8e2711a9e55fce0c8c39fc64fe08 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=0cf549293f0f8e2711a9e55fce0c8c39fc64fe08 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: acd3d782200697015e0e55e7fa9db9ed1a42dd2b URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=acd3d782200697015e0e55e7fa9db9ed1a42dd2b Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 644d688dd050a96b456eb86631f69ac40e77f3b5 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=644d688dd050a96b456eb86631f69ac40e77f3b5 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: a8ebafbf1443a46c5b528e80447c1cb466147202 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a8ebafbf1443a46c5b528e80447c1cb466147202 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 7d1f72341af275ca6853150fb7489d7ae828db0d URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7d1f72341af275ca6853150fb7489d7ae828db0d Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: 9d443afcd69133cec5f7b8f387951672054cd0a7 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9d443afcd69133cec5f7b8f387951672054cd0a7 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: a79a8a83e4879e66bc1f8acc9c1f0d910f0c08e3 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a79a8a83e4879e66bc1f8acc9c1f0d910f0c08e3 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: next Commit: e634b4e4b1d67cac1b2ae5f2ce55f47ee6c79659 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e634b4e4b1d67cac1b2ae5f2ce55f47ee6c79659 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: arm64 Commit: 36e83ae15c4ac68179a315a089afa3cd5cefc73d URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=36e83ae15c4ac68179a315a089afa3cd5cefc73d Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: arm64 Commit: 95aa21a02d52d4d9957a17804129e0da0ca75077 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=95aa21a02d52d4d9957a17804129e0da0ca75077 Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Don Mahurin : cobalt/arm64: Use empty mayday implementation for arm64.
Module: xenomai-3 Branch: arm64 Commit: 1f9b4c901ef08a5c8b2cc82932759e54b0e60fba URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1f9b4c901ef08a5c8b2cc82932759e54b0e60fba Author: Don MahurinDate: Mon Sep 14 12:52:27 2015 -0700 cobalt/arm64: Use empty mayday implementation for arm64. The arm mayday implementation was not correct for arm64. Replace with empty implementation. Handle mayday in the linux domain, using xnthread_relax. This change is essentially the same as the general change proposed in the 'Mayday issues again' discussion (Jan Kiszka, Jun 21), though only applied to arch/arm64. --- kernel/cobalt/arch/arm64/mayday.c | 86 + 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/kernel/cobalt/arch/arm64/mayday.c b/kernel/cobalt/arch/arm64/mayday.c index bc51ad6..ca1151c 100644 --- a/kernel/cobalt/arch/arm64/mayday.c +++ b/kernel/cobalt/arch/arm64/mayday.c @@ -28,72 +28,6 @@ static void *mayday; static inline void setup_mayday(void *page) { - /* -* We want this code to appear at the top of the MAYDAY page: -* -* ifdef ARM_EABI -* -* e59f000c ldr r0, [pc, #12] -* e59f700c ldr r7, [pc, #12] -* ef00 svc 0x -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* 000f0042 .word 0x000f0042 -* -* elif ARM_OABI -* -* e59f0008 ldr r0, [pc, #8] -* ef9f0042 swi 0x009f0042 -* e3a0 mov r0, #0 -* e580 str r0, [r0]; -* 105e .word 0x105e ; sc_cobalt_mayday | __COBALT_SYSCALL_BIT -* -* endif -* -* 32bit instruction words will be laid out by the compiler as -* the target endianness requires. -* -* We don't mess with CPSR here, so no need to save/restore it -* in handle/fixup code. -*/ -#ifdef __ARM_EABI__ - static const struct { - u32 ldr_r0; - u32 ldr_r7; - u32 swi_0; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - u32 cst_r7; - } code = { - .ldr_r0 = 0xe59f000c, - .ldr_r7 = 0xe59f700c, - .swi_0 = 0xef00, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - .cst_r7 = 0x000f0042, - }; -#else /* OABI */ - static const struct { - u32 ldr_r0; - u32 swi_syscall; - u32 mov_r0; - u32 str_r0; - u32 cst_r0; - } code = { - .ldr_r0 = 0xe59f0008, - .swi_syscall = 0xef9f0042, - .mov_r0 = 0xe3a0, - .str_r0 = 0xe580, - .cst_r0 = __xn_syscode(sc_cobalt_mayday), - }; -#endif /* OABI */ - - memcpy(page, , sizeof(code)); - - flush_dcache_page(vmalloc_to_page(page)); } int xnarch_init_mayday(void) @@ -120,27 +54,9 @@ void *xnarch_get_mayday_page(void) void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs, unsigned long tramp) { - tcb->mayday.pc = regs->pc; - tcb->mayday.r0 = regs->regs[0]; -#ifdef __ARM_EABI__ - tcb->mayday.r7 = regs->regs[7]; -#endif -#ifdef CONFIG_ARM_THUMB - /* The code on the mayday page must be run in ARM mode */ - tcb->mayday.psr = regs->cpsr; - regs->cpsr &= ~PSR_T_BIT; -#endif - regs->pc = tramp; + xnthread_relax(0, 0); } void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) { - regs->pc = tcb->mayday.pc; - regs->regs[0] = tcb->mayday.r0; -#ifdef __ARM_EABI__ - regs->regs[7] = tcb->mayday.r7; -#endif -#ifdef CONFIG_ARM_THUMB - regs->cpsr = tcb->mayday.psr; -#endif } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git