aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-07-27 07:54:08 -0400
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-07-27 07:54:08 -0400
commiteda3d8f5604860aae1bb9996bb5efc4213778369 (patch)
tree9d3887d2665bcc5f5abf200758794545c7b2c69b /arch/avr32/kernel
parent87a9f704658a40940e740b1d73d861667e9164d3 (diff)
parent8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r--arch/avr32/kernel/cpu.c38
-rw-r--r--arch/avr32/kernel/process.c2
-rw-r--r--arch/avr32/kernel/stacktrace.c1
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 */
29static ssize_t show_pc0event(struct sys_device *dev, char *buf) 29static 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}
36static ssize_t store_pc0event(struct sys_device *dev, const char *buf, 37static 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}
49static ssize_t show_pc0count(struct sys_device *dev, char *buf) 51static 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}
56static ssize_t store_pc0count(struct sys_device *dev, const char *buf, 59static 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
70static ssize_t show_pc1event(struct sys_device *dev, char *buf) 74static 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}
77static ssize_t store_pc1event(struct sys_device *dev, const char *buf, 82static 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}
90static ssize_t show_pc1count(struct sys_device *dev, char *buf) 96static 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}
97static ssize_t store_pc1count(struct sys_device *dev, const char *buf, 104static 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
111static ssize_t show_pccycles(struct sys_device *dev, char *buf) 119static 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}
118static ssize_t store_pccycles(struct sys_device *dev, const char *buf, 127static 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
132static ssize_t show_pcenable(struct sys_device *dev, char *buf) 142static 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}
139static ssize_t store_pcenable(struct sys_device *dev, const char *buf, 150static 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
14register unsigned long current_frame_pointer asm("r7"); 15register unsigned long current_frame_pointer asm("r7");
15 16