From b39ae3793ab590efbdb8aab63a598071782d32b8 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 31 May 2010 15:12:58 -0400 Subject: ARM: allow mach/timex.h to define get_cycles() Some platforms have access to a cycle coutner (CCNT) register in the CP15 coprocessor. This trivial change will allow such platforms to provide specialized implementations. --- arch/arm/include/asm/timex.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index 3be8de3adab..8a102a383a3 100644 --- a/arch/arm/include/asm/timex.h +++ b/arch/arm/include/asm/timex.h @@ -16,9 +16,11 @@ typedef unsigned long cycles_t; +#ifndef get_cycles static inline cycles_t get_cycles (void) { return 0; } +#endif #endif -- cgit v1.2.2 From dd9d29e1f6ec74af4ff7df1bbe4d05829887475f Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 31 May 2010 15:19:02 -0400 Subject: ARM: provide get_cycles() for RealView PB11{MP,76} and Cortex-A8 Use the CCNT register to override the default get_cycles() implementation in arch/arm/asm/timex.h. This is useful for overhead measurements and debugging. --- arch/arm/mach-realview/include/mach/timex.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-realview/include/mach/timex.h b/arch/arm/mach-realview/include/mach/timex.h index 4eeb069373c..e8bcc40d1f0 100644 --- a/arch/arm/mach-realview/include/mach/timex.h +++ b/arch/arm/mach-realview/include/mach/timex.h @@ -21,3 +21,30 @@ */ #define CLOCK_TICK_RATE (50000000 / 16) + +#if defined(CONFIG_MACH_REALVIEW_PB11MP) || defined(CONFIG_MACH_REALVIEW_PB1176) + +static inline unsigned long realview_get_arm11_cp15_ccnt(void) +{ + unsigned long cycles; + /* Read CP15 CCNT register. */ + asm volatile ("mrc p15, 0, %0, c15, c12, 1" : "=r" (cycles)); + return cycles; +} + +#define get_cycles realview_get_arm11_cp15_ccnt + +#elif defined(CONFIG_MACH_REALVIEW_PBA8) + + +static inline unsigned long realview_get_a8_cp15_ccnt(void) +{ + unsigned long cycles; + /* Read CP15 CCNT register. */ + asm volatile ("mrc p15, 0, %0, c9, c13, 0" : "=r" (cycles)); + return cycles; +} + +#define get_cycles realview_get_a8_cp15_ccnt + +#endif -- cgit v1.2.2 From 9907691855fa49ec8ed317fc54a626fcd137c73b Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sun, 30 May 2010 18:52:30 -0400 Subject: ARM: Include LITMUS^RT KConfig Make the ARM built aware of the LITMUS^RT-specific options. --- arch/arm/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9c26ba7244f..babad6d7681 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1808,3 +1808,11 @@ source "security/Kconfig" source "crypto/Kconfig" source "lib/Kconfig" + +config ARCH_HAS_SEND_PULL_TIMERS + def_bool n + +config ARCH_HAS_FEATHER_TRACE + def_bool n + +source "litmus/Kconfig" -- cgit v1.2.2 From 8e10e1803e695a08f1fb59e90dac4ba0d8744f89 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 31 May 2010 13:06:50 -0400 Subject: ARM: hookup LITMUS^RT system calls Includes the LITMUS^RT-specifc unistd.h extension and modifies the actual syscall table. --- arch/arm/include/asm/unistd.h | 3 +++ arch/arm/kernel/calls.S | 14 ++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index c891eb76c0e..625b3049062 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -397,6 +397,9 @@ #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) +#define __NR_LITMUS (__NR_SYSCALL_BASE+370) +#include + /* * The following SWIs are ARM private. */ diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 5c26eccef99..584a68349a4 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -379,6 +379,20 @@ CALL(sys_fanotify_init) CALL(sys_fanotify_mark) CALL(sys_prlimit64) +/* 370 */ CALL(sys_set_rt_task_param) + CALL(sys_get_rt_task_param) + CALL(sys_complete_job) + CALL(sys_od_open) + CALL(sys_od_close) +/* 375 */ CALL(sys_fmlp_down) + CALL(sys_fmlp_up) + CALL(sys_srp_down) + CALL(sys_srp_up) + CALL(sys_query_job_no) +/* 380 */ CALL(sys_wait_for_job_release) + CALL(sys_wait_for_ts_release) + CALL(sys_release_ts) + CALL(sys_null_call) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted -- cgit v1.2.2 From f599a587e1c7446a76d7d62ed7748f3c4435acd8 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Wed, 10 Nov 2010 12:20:48 -0500 Subject: Hook up LITMUS^RT remote preemption support on ARM Call into scheduler state machine in the IPI handler. --- arch/arm/kernel/smp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 40dc74f2b27..b72fbf3d043 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -38,6 +38,8 @@ #include #include +#include + /* * as from 2.5, kernels no longer have an init_tasks structure * so we need some other way of telling a new secondary core @@ -533,6 +535,8 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs) * nothing more to do - eveything is * done on the interrupt return path */ + /* LITMUS^RT: take action based on scheduler state */ + sched_state_ipi(); break; case IPI_CALL_FUNC: -- cgit v1.2.2 From cc602187d4466374bca031039e145aa1b89aca96 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Fri, 28 Jan 2011 16:41:16 -0500 Subject: Litmus core: replace FMLP & SRP system calls with generic syscalls This renders the FMLP and SRP unfunctional until they are ported to the new locking API. --- arch/arm/kernel/calls.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 584a68349a4..b99087ac85b 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -384,14 +384,12 @@ CALL(sys_complete_job) CALL(sys_od_open) CALL(sys_od_close) -/* 375 */ CALL(sys_fmlp_down) - CALL(sys_fmlp_up) - CALL(sys_srp_down) - CALL(sys_srp_up) +/* 375 */ CALL(sys_litmus_lock) + CALL(sys_litmus_unlock) CALL(sys_query_job_no) -/* 380 */ CALL(sys_wait_for_job_release) + CALL(sys_wait_for_job_release) CALL(sys_wait_for_ts_release) - CALL(sys_release_ts) +/* 380 */ CALL(sys_release_ts) CALL(sys_null_call) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls -- cgit v1.2.2 From 56c5c609615322bfbda5adff94ce011eb3d28fef Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Sat, 27 Aug 2011 16:10:06 +0200 Subject: Fix prototype mismatching and synch syscall numbers * Update prototypes for switched_to(), prio_changed(), select_task_rq(). * Fix missing pid field in printk output. * Synchronize syscall numbers for arm and x86. --- arch/arm/include/asm/unistd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 110d113d4af..0196edf6ee5 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -403,7 +403,7 @@ #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) #define __NR_setns (__NR_SYSCALL_BASE+375) -#define __NR_LITMUS (__NR_SYSCALL_BASE+370) +#define __NR_LITMUS (__NR_SYSCALL_BASE+376) #include /* -- cgit v1.2.2 From 4005b45d832a3affc6c4e1c4575d3112d188f3ee Mon Sep 17 00:00:00 2001 From: Bryan Ward Date: Tue, 7 Aug 2012 14:29:12 -0400 Subject: Chris help! --- arch/arm/kernel/calls.S | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index ed2ae934127..3444f32562e 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -397,6 +397,9 @@ /* 385 */ CALL(sys_wait_for_ts_release) CALL(sys_release_ts) CALL(sys_null_call) + CALL(sys_dynamic_group_lock) + CALL(sys_dynamic_group_unlock) + CALL(sys_dynamic_group_add) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted -- cgit v1.2.2 From ba3f616d900d1a8caad96d0fb8c4f168c30a8afd Mon Sep 17 00:00:00 2001 From: Bryan Ward Date: Fri, 10 Aug 2012 16:27:47 -0400 Subject: Allow one litmus_lock to control multiple fdsos. Each fdso in a resource group now points to a single litmus_lock object which will arbitrate access to each of the fdsos. --- arch/arm/kernel/calls.S | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 3444f32562e..6a4f83eeb6b 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -399,7 +399,6 @@ CALL(sys_null_call) CALL(sys_dynamic_group_lock) CALL(sys_dynamic_group_unlock) - CALL(sys_dynamic_group_add) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted -- cgit v1.2.2