diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-05-30 18:41:28 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-05-30 20:43:19 -0400 |
commit | 152968b15afb74a6adba6d512c5eebf0280c8f00 (patch) | |
tree | f9827c770c61cfdfa59723f0b129c73dd2011877 | |
parent | a7205820bae197a89fc746f9f3c07e389d7068ba (diff) |
Make __ARCH_HAS_FEATHER_TRACE a proper CONFIG_ variable.
The idea of the Feather-Trace default implementation is that LITMUS^RT should
work without a specialized Feather-Trace implementation present. This was
actually broken.
Changes litmus/feather_trace.h to only include asm/feather_trace.h if actually
promised by the architecture.
-rw-r--r-- | arch/x86/Kconfig | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/feather_trace_32.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/feather_trace_64.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/ft_event.c | 4 | ||||
-rw-r--r-- | include/litmus/feather_trace.h | 10 | ||||
-rw-r--r-- | litmus/ft_event.c | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 12fbd5b65f1f..955ad4089a7a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -2126,4 +2126,7 @@ source "arch/x86/kvm/Kconfig" | |||
2126 | 2126 | ||
2127 | source "lib/Kconfig" | 2127 | source "lib/Kconfig" |
2128 | 2128 | ||
2129 | config ARCH_HAS_FEATHER_TRACE | ||
2130 | def_bool y | ||
2131 | |||
2129 | source "litmus/Kconfig" | 2132 | source "litmus/Kconfig" |
diff --git a/arch/x86/include/asm/feather_trace_32.h b/arch/x86/include/asm/feather_trace_32.h index 192cd09b7850..70202f90f169 100644 --- a/arch/x86/include/asm/feather_trace_32.h +++ b/arch/x86/include/asm/feather_trace_32.h | |||
@@ -77,4 +77,3 @@ | |||
77 | "2: \n\t" \ | 77 | "2: \n\t" \ |
78 | : : "r" (p), "r" (p2), "r" (p3) : CLOBBER_LIST) | 78 | : : "r" (p), "r" (p2), "r" (p3) : CLOBBER_LIST) |
79 | 79 | ||
80 | #define __ARCH_HAS_FEATHER_TRACE | ||
diff --git a/arch/x86/include/asm/feather_trace_64.h b/arch/x86/include/asm/feather_trace_64.h index 1cffa4eec5f4..54ac2aeb3a28 100644 --- a/arch/x86/include/asm/feather_trace_64.h +++ b/arch/x86/include/asm/feather_trace_64.h | |||
@@ -65,5 +65,3 @@ | |||
65 | _EVENT_TABLE(id,1b,2f) \ | 65 | _EVENT_TABLE(id,1b,2f) \ |
66 | "2: \n\t" \ | 66 | "2: \n\t" \ |
67 | : : "r" (p), "r" (p2), "r" (p3) : CLOBBER_LIST) | 67 | : : "r" (p), "r" (p2), "r" (p3) : CLOBBER_LIST) |
68 | |||
69 | #define __ARCH_HAS_FEATHER_TRACE | ||
diff --git a/arch/x86/kernel/ft_event.c b/arch/x86/kernel/ft_event.c index e07ee30dfff9..da9b3ccb7259 100644 --- a/arch/x86/kernel/ft_event.c +++ b/arch/x86/kernel/ft_event.c | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | #include <litmus/feather_trace.h> | 3 | #include <litmus/feather_trace.h> |
4 | 4 | ||
5 | #ifdef __ARCH_HAS_FEATHER_TRACE | ||
6 | /* the feather trace management functions assume | 5 | /* the feather trace management functions assume |
7 | * exclusive access to the event table | 6 | * exclusive access to the event table |
8 | */ | 7 | */ |
@@ -107,6 +106,3 @@ int ft_is_event_enabled(unsigned long id) | |||
107 | } | 106 | } |
108 | return 0; | 107 | return 0; |
109 | } | 108 | } |
110 | |||
111 | #endif | ||
112 | |||
diff --git a/include/litmus/feather_trace.h b/include/litmus/feather_trace.h index 7d27e763406f..f3bbfa0935ef 100644 --- a/include/litmus/feather_trace.h +++ b/include/litmus/feather_trace.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _FEATHER_TRACE_H_ | 2 | #define _FEATHER_TRACE_H_ |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
5 | #include <asm/feather_trace.h> | ||
6 | 5 | ||
7 | int ft_enable_event(unsigned long id); | 6 | int ft_enable_event(unsigned long id); |
8 | int ft_disable_event(unsigned long id); | 7 | int ft_disable_event(unsigned long id); |
@@ -20,7 +19,12 @@ static inline int fetch_and_dec(int *val) | |||
20 | return atomic_sub_return(1, (atomic_t*) val) + 1; | 19 | return atomic_sub_return(1, (atomic_t*) val) + 1; |
21 | } | 20 | } |
22 | 21 | ||
23 | #ifndef __ARCH_HAS_FEATHER_TRACE | 22 | #ifdef CONFIG_ARCH_HAS_FEATHER_TRACE |
23 | |||
24 | #include <asm/feather_trace.h> | ||
25 | |||
26 | #else /* !__ARCH_HAS_FEATHER_TRACE */ | ||
27 | |||
24 | /* provide default implementation */ | 28 | /* provide default implementation */ |
25 | 29 | ||
26 | #define feather_callback | 30 | #define feather_callback |
@@ -44,6 +48,6 @@ extern int ft_events[MAX_EVENTS]; | |||
44 | #define ft_event3(id, callback, p, p2, p3) \ | 48 | #define ft_event3(id, callback, p, p2, p3) \ |
45 | if (ft_events[id]) callback(id, p, p2, p3); | 49 | if (ft_events[id]) callback(id, p, p2, p3); |
46 | 50 | ||
47 | #endif | 51 | #endif /* __ARCH_HAS_FEATHER_TRACE */ |
48 | 52 | ||
49 | #endif | 53 | #endif |
diff --git a/litmus/ft_event.c b/litmus/ft_event.c index 6084b6d6b364..58124fe0ad90 100644 --- a/litmus/ft_event.c +++ b/litmus/ft_event.c | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | #include <litmus/feather_trace.h> | 3 | #include <litmus/feather_trace.h> |
4 | 4 | ||
5 | #ifndef __ARCH_HAS_FEATHER_TRACE | 5 | #ifndef CONFIG_ARCH_HAS_FEATHER_TRACE |
6 | /* provide dummy implementation */ | 6 | /* provide dummy implementation */ |
7 | 7 | ||
8 | int ft_events[MAX_EVENTS]; | 8 | int ft_events[MAX_EVENTS]; |