diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-27 07:54:08 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-27 07:54:08 -0400 |
commit | eda3d8f5604860aae1bb9996bb5efc4213778369 (patch) | |
tree | 9d3887d2665bcc5f5abf200758794545c7b2c69b /arch/avr32/kernel | |
parent | 87a9f704658a40940e740b1d73d861667e9164d3 (diff) | |
parent | 8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff) |
Merge commit 'upstream/master'
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r-- | arch/avr32/kernel/cpu.c | 38 | ||||
-rw-r--r-- | arch/avr32/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/avr32/kernel/stacktrace.c | 1 |
3 files changed, 27 insertions, 14 deletions
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index b8409caeb23d..e84faffbbeca 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c | |||
@@ -26,14 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be | 26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be |
27 | * made, we must make sure that the code executes on the correct CPU. | 27 | * made, we must make sure that the code executes on the correct CPU. |
28 | */ | 28 | */ |
29 | static ssize_t show_pc0event(struct sys_device *dev, char *buf) | 29 | static ssize_t show_pc0event(struct sys_device *dev, |
30 | struct sysdev_attribute *attr, char *buf) | ||
30 | { | 31 | { |
31 | unsigned long pccr; | 32 | unsigned long pccr; |
32 | 33 | ||
33 | pccr = sysreg_read(PCCR); | 34 | pccr = sysreg_read(PCCR); |
34 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); | 35 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); |
35 | } | 36 | } |
36 | static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | 37 | static ssize_t store_pc0event(struct sys_device *dev, |
38 | struct sysdev_attribute *attr, const char *buf, | ||
37 | size_t count) | 39 | size_t count) |
38 | { | 40 | { |
39 | unsigned long val; | 41 | unsigned long val; |
@@ -46,15 +48,17 @@ static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | |||
46 | sysreg_write(PCCR, val); | 48 | sysreg_write(PCCR, val); |
47 | return count; | 49 | return count; |
48 | } | 50 | } |
49 | static ssize_t show_pc0count(struct sys_device *dev, char *buf) | 51 | static ssize_t show_pc0count(struct sys_device *dev, |
52 | struct sysdev_attribute *attr, char *buf) | ||
50 | { | 53 | { |
51 | unsigned long pcnt0; | 54 | unsigned long pcnt0; |
52 | 55 | ||
53 | pcnt0 = sysreg_read(PCNT0); | 56 | pcnt0 = sysreg_read(PCNT0); |
54 | return sprintf(buf, "%lu\n", pcnt0); | 57 | return sprintf(buf, "%lu\n", pcnt0); |
55 | } | 58 | } |
56 | static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | 59 | static ssize_t store_pc0count(struct sys_device *dev, |
57 | size_t count) | 60 | struct sysdev_attribute *attr, |
61 | const char *buf, size_t count) | ||
58 | { | 62 | { |
59 | unsigned long val; | 63 | unsigned long val; |
60 | char *endp; | 64 | char *endp; |
@@ -67,14 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | |||
67 | return count; | 71 | return count; |
68 | } | 72 | } |
69 | 73 | ||
70 | static ssize_t show_pc1event(struct sys_device *dev, char *buf) | 74 | static ssize_t show_pc1event(struct sys_device *dev, |
75 | struct sysdev_attribute *attr, char *buf) | ||
71 | { | 76 | { |
72 | unsigned long pccr; | 77 | unsigned long pccr; |
73 | 78 | ||
74 | pccr = sysreg_read(PCCR); | 79 | pccr = sysreg_read(PCCR); |
75 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); | 80 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); |
76 | } | 81 | } |
77 | static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | 82 | static ssize_t store_pc1event(struct sys_device *dev, |
83 | struct sysdev_attribute *attr, const char *buf, | ||
78 | size_t count) | 84 | size_t count) |
79 | { | 85 | { |
80 | unsigned long val; | 86 | unsigned long val; |
@@ -87,14 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | |||
87 | sysreg_write(PCCR, val); | 93 | sysreg_write(PCCR, val); |
88 | return count; | 94 | return count; |
89 | } | 95 | } |
90 | static ssize_t show_pc1count(struct sys_device *dev, char *buf) | 96 | static ssize_t show_pc1count(struct sys_device *dev, |
97 | struct sysdev_attribute *attr, char *buf) | ||
91 | { | 98 | { |
92 | unsigned long pcnt1; | 99 | unsigned long pcnt1; |
93 | 100 | ||
94 | pcnt1 = sysreg_read(PCNT1); | 101 | pcnt1 = sysreg_read(PCNT1); |
95 | return sprintf(buf, "%lu\n", pcnt1); | 102 | return sprintf(buf, "%lu\n", pcnt1); |
96 | } | 103 | } |
97 | static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | 104 | static ssize_t store_pc1count(struct sys_device *dev, |
105 | struct sysdev_attribute *attr, const char *buf, | ||
98 | size_t count) | 106 | size_t count) |
99 | { | 107 | { |
100 | unsigned long val; | 108 | unsigned long val; |
@@ -108,14 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | |||
108 | return count; | 116 | return count; |
109 | } | 117 | } |
110 | 118 | ||
111 | static ssize_t show_pccycles(struct sys_device *dev, char *buf) | 119 | static ssize_t show_pccycles(struct sys_device *dev, |
120 | struct sysdev_attribute *attr, char *buf) | ||
112 | { | 121 | { |
113 | unsigned long pccnt; | 122 | unsigned long pccnt; |
114 | 123 | ||
115 | pccnt = sysreg_read(PCCNT); | 124 | pccnt = sysreg_read(PCCNT); |
116 | return sprintf(buf, "%lu\n", pccnt); | 125 | return sprintf(buf, "%lu\n", pccnt); |
117 | } | 126 | } |
118 | static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | 127 | static ssize_t store_pccycles(struct sys_device *dev, |
128 | struct sysdev_attribute *attr, const char *buf, | ||
119 | size_t count) | 129 | size_t count) |
120 | { | 130 | { |
121 | unsigned long val; | 131 | unsigned long val; |
@@ -129,14 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | |||
129 | return count; | 139 | return count; |
130 | } | 140 | } |
131 | 141 | ||
132 | static ssize_t show_pcenable(struct sys_device *dev, char *buf) | 142 | static ssize_t show_pcenable(struct sys_device *dev, |
143 | struct sysdev_attribute *attr, char *buf) | ||
133 | { | 144 | { |
134 | unsigned long pccr; | 145 | unsigned long pccr; |
135 | 146 | ||
136 | pccr = sysreg_read(PCCR); | 147 | pccr = sysreg_read(PCCR); |
137 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); | 148 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); |
138 | } | 149 | } |
139 | static ssize_t store_pcenable(struct sys_device *dev, const char *buf, | 150 | static ssize_t store_pcenable(struct sys_device *dev, |
151 | struct sysdev_attribute *attr, const char *buf, | ||
140 | size_t count) | 152 | size_t count) |
141 | { | 153 | { |
142 | unsigned long pccr, val; | 154 | unsigned long pccr, val; |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 6cf9df176274..ff820a9e743a 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -31,7 +31,7 @@ void cpu_idle(void) | |||
31 | { | 31 | { |
32 | /* endless idle loop with no priority at all */ | 32 | /* endless idle loop with no priority at all */ |
33 | while (1) { | 33 | while (1) { |
34 | tick_nohz_stop_sched_tick(); | 34 | tick_nohz_stop_sched_tick(1); |
35 | while (!need_resched()) | 35 | while (!need_resched()) |
36 | cpu_idle_sleep(); | 36 | cpu_idle_sleep(); |
37 | tick_nohz_restart_sched_tick(); | 37 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/avr32/kernel/stacktrace.c b/arch/avr32/kernel/stacktrace.c index f4bdb448049c..c09f0d8dd679 100644 --- a/arch/avr32/kernel/stacktrace.c +++ b/arch/avr32/kernel/stacktrace.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/stacktrace.h> | 11 | #include <linux/stacktrace.h> |
12 | #include <linux/thread_info.h> | 12 | #include <linux/thread_info.h> |
13 | #include <linux/module.h> | ||
13 | 14 | ||
14 | register unsigned long current_frame_pointer asm("r7"); | 15 | register unsigned long current_frame_pointer asm("r7"); |
15 | 16 | ||