diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-01-28 16:38:25 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-01-28 16:38:25 -0500 |
commit | 0ada0a73120c28cc432bcdbac061781465c2f48f (patch) | |
tree | d17cadd4ea47e25d9e48e7d409a39c84268fbd27 /arch/sparc/kernel | |
parent | 6016a363f6b56b46b24655bcfc0499b715851cf3 (diff) | |
parent | 92dcffb916d309aa01778bf8963a6932e4014d07 (diff) |
Merge commit 'v2.6.33-rc5' into secretlab/test-devicetree
Diffstat (limited to 'arch/sparc/kernel')
38 files changed, 1528 insertions, 337 deletions
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 5b47fab9966e..c6316142db4e 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -72,7 +72,7 @@ obj-y += dma.o | |||
72 | obj-$(CONFIG_SPARC32_PCI) += pcic.o | 72 | obj-$(CONFIG_SPARC32_PCI) += pcic.o |
73 | 73 | ||
74 | obj-$(CONFIG_SMP) += trampoline_$(BITS).o smp_$(BITS).o | 74 | obj-$(CONFIG_SMP) += trampoline_$(BITS).o smp_$(BITS).o |
75 | obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o | 75 | obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o leon_smp.o |
76 | obj-$(CONFIG_SPARC64_SMP) += hvtramp.o | 76 | obj-$(CONFIG_SPARC64_SMP) += hvtramp.o |
77 | 77 | ||
78 | obj-y += auxio_$(BITS).o | 78 | obj-y += auxio_$(BITS).o |
@@ -87,6 +87,7 @@ obj-$(CONFIG_KGDB) += kgdb_$(BITS).o | |||
87 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | 87 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
88 | CFLAGS_REMOVE_ftrace.o := -pg | 88 | CFLAGS_REMOVE_ftrace.o := -pg |
89 | 89 | ||
90 | obj-$(CONFIG_EARLYFB) += btext.o | ||
90 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 91 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
91 | # sparc64 PCI | 92 | # sparc64 PCI |
92 | obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o | 93 | obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o |
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index 9c115823c4b5..71ec90b9e316 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/miscdevice.h> | 12 | #include <linux/miscdevice.h> |
13 | #include <linux/smp_lock.h> | ||
14 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
15 | #include <linux/of.h> | 14 | #include <linux/of.h> |
16 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
@@ -76,7 +75,6 @@ static inline void apc_free(struct of_device *op) | |||
76 | 75 | ||
77 | static int apc_open(struct inode *inode, struct file *f) | 76 | static int apc_open(struct inode *inode, struct file *f) |
78 | { | 77 | { |
79 | cycle_kernel_lock(); | ||
80 | return 0; | 78 | return 0; |
81 | } | 79 | } |
82 | 80 | ||
@@ -87,61 +85,46 @@ static int apc_release(struct inode *inode, struct file *f) | |||
87 | 85 | ||
88 | static long apc_ioctl(struct file *f, unsigned int cmd, unsigned long __arg) | 86 | static long apc_ioctl(struct file *f, unsigned int cmd, unsigned long __arg) |
89 | { | 87 | { |
90 | __u8 inarg, __user *arg; | 88 | __u8 inarg, __user *arg = (__u8 __user *) __arg; |
91 | |||
92 | arg = (__u8 __user *) __arg; | ||
93 | |||
94 | lock_kernel(); | ||
95 | 89 | ||
96 | switch (cmd) { | 90 | switch (cmd) { |
97 | case APCIOCGFANCTL: | 91 | case APCIOCGFANCTL: |
98 | if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) { | 92 | if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) |
99 | unlock_kernel(); | ||
100 | return -EFAULT; | 93 | return -EFAULT; |
101 | } | ||
102 | break; | 94 | break; |
103 | 95 | ||
104 | case APCIOCGCPWR: | 96 | case APCIOCGCPWR: |
105 | if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) { | 97 | if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) |
106 | unlock_kernel(); | ||
107 | return -EFAULT; | 98 | return -EFAULT; |
108 | } | ||
109 | break; | 99 | break; |
110 | 100 | ||
111 | case APCIOCGBPORT: | 101 | case APCIOCGBPORT: |
112 | if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) { | 102 | if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) |
113 | unlock_kernel(); | ||
114 | return -EFAULT; | 103 | return -EFAULT; |
115 | } | ||
116 | break; | 104 | break; |
117 | 105 | ||
118 | case APCIOCSFANCTL: | 106 | case APCIOCSFANCTL: |
119 | if (get_user(inarg, arg)) { | 107 | if (get_user(inarg, arg)) |
120 | unlock_kernel(); | ||
121 | return -EFAULT; | 108 | return -EFAULT; |
122 | } | ||
123 | apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG); | 109 | apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG); |
124 | break; | 110 | break; |
111 | |||
125 | case APCIOCSCPWR: | 112 | case APCIOCSCPWR: |
126 | if (get_user(inarg, arg)) { | 113 | if (get_user(inarg, arg)) |
127 | unlock_kernel(); | ||
128 | return -EFAULT; | 114 | return -EFAULT; |
129 | } | ||
130 | apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG); | 115 | apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG); |
131 | break; | 116 | break; |
117 | |||
132 | case APCIOCSBPORT: | 118 | case APCIOCSBPORT: |
133 | if (get_user(inarg, arg)) { | 119 | if (get_user(inarg, arg)) |
134 | unlock_kernel(); | ||
135 | return -EFAULT; | 120 | return -EFAULT; |
136 | } | ||
137 | apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG); | 121 | apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG); |
138 | break; | 122 | break; |
123 | |||
139 | default: | 124 | default: |
140 | unlock_kernel(); | ||
141 | return -EINVAL; | 125 | return -EINVAL; |
142 | }; | 126 | }; |
143 | 127 | ||
144 | unlock_kernel(); | ||
145 | return 0; | 128 | return 0; |
146 | } | 129 | } |
147 | 130 | ||
diff --git a/arch/sparc/kernel/auxio_32.c b/arch/sparc/kernel/auxio_32.c index 45c41232fc4c..ee8d214cae1e 100644 --- a/arch/sparc/kernel/auxio_32.c +++ b/arch/sparc/kernel/auxio_32.c | |||
@@ -28,6 +28,7 @@ void __init auxio_probe(void) | |||
28 | struct resource r; | 28 | struct resource r; |
29 | 29 | ||
30 | switch (sparc_cpu_model) { | 30 | switch (sparc_cpu_model) { |
31 | case sparc_leon: | ||
31 | case sun4d: | 32 | case sun4d: |
32 | case sun4: | 33 | case sun4: |
33 | return; | 34 | return; |
diff --git a/arch/sparc/kernel/btext.c b/arch/sparc/kernel/btext.c new file mode 100644 index 000000000000..8cc2d56ffe9a --- /dev/null +++ b/arch/sparc/kernel/btext.c | |||
@@ -0,0 +1,673 @@ | |||
1 | /* | ||
2 | * Procedures for drawing on the screen early on in the boot process. | ||
3 | * | ||
4 | * Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
5 | */ | ||
6 | #include <linux/kernel.h> | ||
7 | #include <linux/string.h> | ||
8 | #include <linux/init.h> | ||
9 | #include <linux/module.h> | ||
10 | #include <linux/console.h> | ||
11 | |||
12 | #include <asm/btext.h> | ||
13 | #include <asm/oplib.h> | ||
14 | #include <asm/io.h> | ||
15 | |||
16 | #define NO_SCROLL | ||
17 | |||
18 | #ifndef NO_SCROLL | ||
19 | static void scrollscreen(void); | ||
20 | #endif | ||
21 | |||
22 | static void draw_byte(unsigned char c, long locX, long locY); | ||
23 | static void draw_byte_32(unsigned char *bits, unsigned int *base, int rb); | ||
24 | static void draw_byte_16(unsigned char *bits, unsigned int *base, int rb); | ||
25 | static void draw_byte_8(unsigned char *bits, unsigned int *base, int rb); | ||
26 | |||
27 | #define __force_data __attribute__((__section__(".data"))) | ||
28 | |||
29 | static int g_loc_X __force_data; | ||
30 | static int g_loc_Y __force_data; | ||
31 | static int g_max_loc_X __force_data; | ||
32 | static int g_max_loc_Y __force_data; | ||
33 | |||
34 | static int dispDeviceRowBytes __force_data; | ||
35 | static int dispDeviceDepth __force_data; | ||
36 | static int dispDeviceRect[4] __force_data; | ||
37 | static unsigned char *dispDeviceBase __force_data; | ||
38 | |||
39 | #define cmapsz (16*256) | ||
40 | |||
41 | static unsigned char vga_font[cmapsz]; | ||
42 | |||
43 | static int __init btext_initialize(unsigned int node) | ||
44 | { | ||
45 | unsigned int width, height, depth, pitch; | ||
46 | unsigned long address = 0; | ||
47 | u32 prop; | ||
48 | |||
49 | if (prom_getproperty(node, "width", (char *)&width, 4) < 0) | ||
50 | return -EINVAL; | ||
51 | if (prom_getproperty(node, "height", (char *)&height, 4) < 0) | ||
52 | return -EINVAL; | ||
53 | if (prom_getproperty(node, "depth", (char *)&depth, 4) < 0) | ||
54 | return -EINVAL; | ||
55 | pitch = width * ((depth + 7) / 8); | ||
56 | |||
57 | if (prom_getproperty(node, "linebytes", (char *)&prop, 4) >= 0 && | ||
58 | prop != 0xffffffffu) | ||
59 | pitch = prop; | ||
60 | |||
61 | if (pitch == 1) | ||
62 | pitch = 0x1000; | ||
63 | |||
64 | if (prom_getproperty(node, "address", (char *)&prop, 4) >= 0) | ||
65 | address = prop; | ||
66 | |||
67 | /* FIXME: Add support for PCI reg properties. Right now, only | ||
68 | * reliable on macs | ||
69 | */ | ||
70 | if (address == 0) | ||
71 | return -EINVAL; | ||
72 | |||
73 | g_loc_X = 0; | ||
74 | g_loc_Y = 0; | ||
75 | g_max_loc_X = width / 8; | ||
76 | g_max_loc_Y = height / 16; | ||
77 | dispDeviceBase = (unsigned char *)address; | ||
78 | dispDeviceRowBytes = pitch; | ||
79 | dispDeviceDepth = depth == 15 ? 16 : depth; | ||
80 | dispDeviceRect[0] = dispDeviceRect[1] = 0; | ||
81 | dispDeviceRect[2] = width; | ||
82 | dispDeviceRect[3] = height; | ||
83 | |||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | /* Calc the base address of a given point (x,y) */ | ||
88 | static unsigned char * calc_base(int x, int y) | ||
89 | { | ||
90 | unsigned char *base = dispDeviceBase; | ||
91 | |||
92 | base += (x + dispDeviceRect[0]) * (dispDeviceDepth >> 3); | ||
93 | base += (y + dispDeviceRect[1]) * dispDeviceRowBytes; | ||
94 | return base; | ||
95 | } | ||
96 | |||
97 | static void btext_clearscreen(void) | ||
98 | { | ||
99 | unsigned int *base = (unsigned int *)calc_base(0, 0); | ||
100 | unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * | ||
101 | (dispDeviceDepth >> 3)) >> 2; | ||
102 | int i,j; | ||
103 | |||
104 | for (i=0; i<(dispDeviceRect[3] - dispDeviceRect[1]); i++) | ||
105 | { | ||
106 | unsigned int *ptr = base; | ||
107 | for(j=width; j; --j) | ||
108 | *(ptr++) = 0; | ||
109 | base += (dispDeviceRowBytes >> 2); | ||
110 | } | ||
111 | } | ||
112 | |||
113 | #ifndef NO_SCROLL | ||
114 | static void scrollscreen(void) | ||
115 | { | ||
116 | unsigned int *src = (unsigned int *)calc_base(0,16); | ||
117 | unsigned int *dst = (unsigned int *)calc_base(0,0); | ||
118 | unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * | ||
119 | (dispDeviceDepth >> 3)) >> 2; | ||
120 | int i,j; | ||
121 | |||
122 | for (i=0; i<(dispDeviceRect[3] - dispDeviceRect[1] - 16); i++) | ||
123 | { | ||
124 | unsigned int *src_ptr = src; | ||
125 | unsigned int *dst_ptr = dst; | ||
126 | for(j=width; j; --j) | ||
127 | *(dst_ptr++) = *(src_ptr++); | ||
128 | src += (dispDeviceRowBytes >> 2); | ||
129 | dst += (dispDeviceRowBytes >> 2); | ||
130 | } | ||
131 | for (i=0; i<16; i++) | ||
132 | { | ||
133 | unsigned int *dst_ptr = dst; | ||
134 | for(j=width; j; --j) | ||
135 | *(dst_ptr++) = 0; | ||
136 | dst += (dispDeviceRowBytes >> 2); | ||
137 | } | ||
138 | } | ||
139 | #endif /* ndef NO_SCROLL */ | ||
140 | |||
141 | void btext_drawchar(char c) | ||
142 | { | ||
143 | int cline = 0; | ||
144 | #ifdef NO_SCROLL | ||
145 | int x; | ||
146 | #endif | ||
147 | switch (c) { | ||
148 | case '\b': | ||
149 | if (g_loc_X > 0) | ||
150 | --g_loc_X; | ||
151 | break; | ||
152 | case '\t': | ||
153 | g_loc_X = (g_loc_X & -8) + 8; | ||
154 | break; | ||
155 | case '\r': | ||
156 | g_loc_X = 0; | ||
157 | break; | ||
158 | case '\n': | ||
159 | g_loc_X = 0; | ||
160 | g_loc_Y++; | ||
161 | cline = 1; | ||
162 | break; | ||
163 | default: | ||
164 | draw_byte(c, g_loc_X++, g_loc_Y); | ||
165 | } | ||
166 | if (g_loc_X >= g_max_loc_X) { | ||
167 | g_loc_X = 0; | ||
168 | g_loc_Y++; | ||
169 | cline = 1; | ||
170 | } | ||
171 | #ifndef NO_SCROLL | ||
172 | while (g_loc_Y >= g_max_loc_Y) { | ||
173 | scrollscreen(); | ||
174 | g_loc_Y--; | ||
175 | } | ||
176 | #else | ||
177 | /* wrap around from bottom to top of screen so we don't | ||
178 | waste time scrolling each line. -- paulus. */ | ||
179 | if (g_loc_Y >= g_max_loc_Y) | ||
180 | g_loc_Y = 0; | ||
181 | if (cline) { | ||
182 | for (x = 0; x < g_max_loc_X; ++x) | ||
183 | draw_byte(' ', x, g_loc_Y); | ||
184 | } | ||
185 | #endif | ||
186 | } | ||
187 | |||
188 | static void btext_drawtext(const char *c, unsigned int len) | ||
189 | { | ||
190 | while (len--) | ||
191 | btext_drawchar(*c++); | ||
192 | } | ||
193 | |||
194 | static void draw_byte(unsigned char c, long locX, long locY) | ||
195 | { | ||
196 | unsigned char *base = calc_base(locX << 3, locY << 4); | ||
197 | unsigned char *font = &vga_font[((unsigned int)c) * 16]; | ||
198 | int rb = dispDeviceRowBytes; | ||
199 | |||
200 | switch(dispDeviceDepth) { | ||
201 | case 24: | ||
202 | case 32: | ||
203 | draw_byte_32(font, (unsigned int *)base, rb); | ||
204 | break; | ||
205 | case 15: | ||
206 | case 16: | ||
207 | draw_byte_16(font, (unsigned int *)base, rb); | ||
208 | break; | ||
209 | case 8: | ||
210 | draw_byte_8(font, (unsigned int *)base, rb); | ||
211 | break; | ||
212 | } | ||
213 | } | ||
214 | |||
215 | static unsigned int expand_bits_8[16] = { | ||
216 | 0x00000000, | ||
217 | 0x000000ff, | ||
218 | 0x0000ff00, | ||
219 | 0x0000ffff, | ||
220 | 0x00ff0000, | ||
221 | 0x00ff00ff, | ||
222 | 0x00ffff00, | ||
223 | 0x00ffffff, | ||
224 | 0xff000000, | ||
225 | 0xff0000ff, | ||
226 | 0xff00ff00, | ||
227 | 0xff00ffff, | ||
228 | 0xffff0000, | ||
229 | 0xffff00ff, | ||
230 | 0xffffff00, | ||
231 | 0xffffffff | ||
232 | }; | ||
233 | |||
234 | static unsigned int expand_bits_16[4] = { | ||
235 | 0x00000000, | ||
236 | 0x0000ffff, | ||
237 | 0xffff0000, | ||
238 | 0xffffffff | ||
239 | }; | ||
240 | |||
241 | |||
242 | static void draw_byte_32(unsigned char *font, unsigned int *base, int rb) | ||
243 | { | ||
244 | int l, bits; | ||
245 | int fg = 0xFFFFFFFFUL; | ||
246 | int bg = 0x00000000UL; | ||
247 | |||
248 | for (l = 0; l < 16; ++l) | ||
249 | { | ||
250 | bits = *font++; | ||
251 | base[0] = (-(bits >> 7) & fg) ^ bg; | ||
252 | base[1] = (-((bits >> 6) & 1) & fg) ^ bg; | ||
253 | base[2] = (-((bits >> 5) & 1) & fg) ^ bg; | ||
254 | base[3] = (-((bits >> 4) & 1) & fg) ^ bg; | ||
255 | base[4] = (-((bits >> 3) & 1) & fg) ^ bg; | ||
256 | base[5] = (-((bits >> 2) & 1) & fg) ^ bg; | ||
257 | base[6] = (-((bits >> 1) & 1) & fg) ^ bg; | ||
258 | base[7] = (-(bits & 1) & fg) ^ bg; | ||
259 | base = (unsigned int *) ((char *)base + rb); | ||
260 | } | ||
261 | } | ||
262 | |||
263 | static void draw_byte_16(unsigned char *font, unsigned int *base, int rb) | ||
264 | { | ||
265 | int l, bits; | ||
266 | int fg = 0xFFFFFFFFUL; | ||
267 | int bg = 0x00000000UL; | ||
268 | unsigned int *eb = (int *)expand_bits_16; | ||
269 | |||
270 | for (l = 0; l < 16; ++l) | ||
271 | { | ||
272 | bits = *font++; | ||
273 | base[0] = (eb[bits >> 6] & fg) ^ bg; | ||
274 | base[1] = (eb[(bits >> 4) & 3] & fg) ^ bg; | ||
275 | base[2] = (eb[(bits >> 2) & 3] & fg) ^ bg; | ||
276 | base[3] = (eb[bits & 3] & fg) ^ bg; | ||
277 | base = (unsigned int *) ((char *)base + rb); | ||
278 | } | ||
279 | } | ||
280 | |||
281 | static void draw_byte_8(unsigned char *font, unsigned int *base, int rb) | ||
282 | { | ||
283 | int l, bits; | ||
284 | int fg = 0x0F0F0F0FUL; | ||
285 | int bg = 0x00000000UL; | ||
286 | unsigned int *eb = (int *)expand_bits_8; | ||
287 | |||
288 | for (l = 0; l < 16; ++l) | ||
289 | { | ||
290 | bits = *font++; | ||
291 | base[0] = (eb[bits >> 4] & fg) ^ bg; | ||
292 | base[1] = (eb[bits & 0xf] & fg) ^ bg; | ||
293 | base = (unsigned int *) ((char *)base + rb); | ||
294 | } | ||
295 | } | ||
296 | |||
297 | static void btext_console_write(struct console *con, const char *s, | ||
298 | unsigned int n) | ||
299 | { | ||
300 | btext_drawtext(s, n); | ||
301 | } | ||
302 | |||
303 | static struct console btext_console = { | ||
304 | .name = "btext", | ||
305 | .write = btext_console_write, | ||
306 | .flags = CON_PRINTBUFFER | CON_ENABLED | CON_BOOT | CON_ANYTIME, | ||
307 | .index = 0, | ||
308 | }; | ||
309 | |||
310 | int __init btext_find_display(void) | ||
311 | { | ||
312 | unsigned int node; | ||
313 | char type[32]; | ||
314 | int ret; | ||
315 | |||
316 | node = prom_inst2pkg(prom_stdout); | ||
317 | if (prom_getproperty(node, "device_type", type, 32) < 0) | ||
318 | return -ENODEV; | ||
319 | if (strcmp(type, "display")) | ||
320 | return -ENODEV; | ||
321 | |||
322 | ret = btext_initialize(node); | ||
323 | if (!ret) { | ||
324 | btext_clearscreen(); | ||
325 | register_console(&btext_console); | ||
326 | } | ||
327 | return ret; | ||
328 | } | ||
329 | |||
330 | static unsigned char vga_font[cmapsz] = { | ||
331 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
332 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, | ||
333 | 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, | ||
334 | 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, | ||
335 | 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, | ||
336 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, | ||
337 | 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, | ||
338 | 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, | ||
339 | 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, | ||
340 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, | ||
341 | 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, | ||
342 | 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
343 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, | ||
344 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, | ||
345 | 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x1e, 0x0e, | ||
346 | 0x1a, 0x32, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, | ||
347 | 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, | ||
348 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, | ||
349 | 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x63, | ||
350 | 0x7f, 0x63, 0x63, 0x63, 0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x00, 0x00, 0x00, | ||
351 | 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18, | ||
352 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, | ||
353 | 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0e, | ||
354 | 0x1e, 0x3e, 0xfe, 0x3e, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, | ||
355 | 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, | ||
356 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, | ||
357 | 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xdb, | ||
358 | 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, | ||
359 | 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, | ||
360 | 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
361 | 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, | ||
362 | 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, | ||
363 | 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
364 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
365 | 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
366 | 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
367 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, | ||
368 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, | ||
369 | 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
370 | 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
371 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, | ||
372 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, | ||
373 | 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
374 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
375 | 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, | ||
376 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, | ||
377 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, | ||
378 | 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, | ||
379 | 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c, | ||
380 | 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, | ||
381 | 0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, | ||
382 | 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, | ||
383 | 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
384 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, | ||
385 | 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, | ||
386 | 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, | ||
387 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, | ||
388 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, | ||
389 | 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
390 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, | ||
391 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, | ||
392 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
393 | 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
394 | 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, | ||
395 | 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0xc6, 0x7c, | ||
396 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, | ||
397 | 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, | ||
398 | 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, | ||
399 | 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, | ||
400 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, | ||
401 | 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, | ||
402 | 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
403 | 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, | ||
404 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, | ||
405 | 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, | ||
406 | 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
407 | 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78, | ||
408 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, | ||
409 | 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
410 | 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, | ||
411 | 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, | ||
412 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, | ||
413 | 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, | ||
414 | 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, | ||
415 | 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, | ||
416 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xde, 0xde, | ||
417 | 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, | ||
418 | 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, | ||
419 | 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, | ||
420 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, | ||
421 | 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6c, | ||
422 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00, | ||
423 | 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, | ||
424 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, | ||
425 | 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, | ||
426 | 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00, | ||
427 | 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, | ||
428 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
429 | 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, | ||
430 | 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, | ||
431 | 0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, | ||
432 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, | ||
433 | 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xe7, | ||
434 | 0xff, 0xff, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00, | ||
435 | 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, | ||
436 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, | ||
437 | 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, | ||
438 | 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, | ||
439 | 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, | ||
440 | 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, | ||
441 | 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, | ||
442 | 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
443 | 0x00, 0x00, 0xff, 0xdb, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, | ||
444 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, | ||
445 | 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, | ||
446 | 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, | ||
447 | 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xff, 0x66, 0x66, | ||
448 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x18, | ||
449 | 0x3c, 0x66, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, | ||
450 | 0xc3, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, | ||
451 | 0x00, 0x00, 0xff, 0xc3, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc1, 0xc3, 0xff, | ||
452 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, | ||
453 | 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
454 | 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, | ||
455 | 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, | ||
456 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, | ||
457 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
458 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, | ||
459 | 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
460 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, | ||
461 | 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x60, | ||
462 | 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
463 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, | ||
464 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, | ||
465 | 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
466 | 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
467 | 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, | ||
468 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, | ||
469 | 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xe0, 0x60, | ||
470 | 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, | ||
471 | 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, | ||
472 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, | ||
473 | 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0xe0, 0x60, | ||
474 | 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, | ||
475 | 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, | ||
476 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xff, 0xdb, | ||
477 | 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
478 | 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, | ||
479 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, | ||
480 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, | ||
481 | 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
482 | 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00, | ||
483 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, | ||
484 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, | ||
485 | 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, | ||
486 | 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, | ||
487 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, | ||
488 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, | ||
489 | 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
490 | 0x00, 0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xff, 0x66, 0x00, 0x00, 0x00, 0x00, | ||
491 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3, | ||
492 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, | ||
493 | 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
494 | 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, | ||
495 | 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, | ||
496 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, | ||
497 | 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, | ||
498 | 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, | ||
499 | 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
500 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, | ||
501 | 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, | ||
502 | 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x0c, 0x06, 0x7c, 0x00, 0x00, | ||
503 | 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, | ||
504 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xfe, | ||
505 | 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, | ||
506 | 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, | ||
507 | 0x00, 0x00, 0xcc, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, | ||
508 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0c, 0x7c, | ||
509 | 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, | ||
510 | 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, | ||
511 | 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0x66, 0x3c, 0x0c, 0x06, | ||
512 | 0x3c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, | ||
513 | 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, | ||
514 | 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
515 | 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, | ||
516 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, | ||
517 | 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, | ||
518 | 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, | ||
519 | 0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, | ||
520 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, | ||
521 | 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x00, | ||
522 | 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, | ||
523 | 0x18, 0x30, 0x60, 0x00, 0xfe, 0x66, 0x60, 0x7c, 0x60, 0x60, 0x66, 0xfe, | ||
524 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x3b, 0x1b, | ||
525 | 0x7e, 0xd8, 0xdc, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x6c, | ||
526 | 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, | ||
527 | 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, | ||
528 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xc6, | ||
529 | 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, | ||
530 | 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, | ||
531 | 0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, | ||
532 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, | ||
533 | 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, | ||
534 | 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00, | ||
535 | 0x00, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, | ||
536 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, | ||
537 | 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, | ||
538 | 0xc3, 0xc0, 0xc0, 0xc0, 0xc3, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, | ||
539 | 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xe6, 0xfc, | ||
540 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0xff, 0x18, | ||
541 | 0xff, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, | ||
542 | 0x7c, 0x62, 0x66, 0x6f, 0x66, 0x66, 0x66, 0xf3, 0x00, 0x00, 0x00, 0x00, | ||
543 | 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
544 | 0xd8, 0x70, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0c, 0x7c, | ||
545 | 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, | ||
546 | 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, | ||
547 | 0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, | ||
548 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, | ||
549 | 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, | ||
550 | 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, | ||
551 | 0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, | ||
552 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, | ||
553 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, | ||
554 | 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
555 | 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, | ||
556 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, | ||
557 | 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
558 | 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
559 | 0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xce, 0x9b, 0x06, | ||
560 | 0x0c, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, | ||
561 | 0x66, 0xce, 0x96, 0x3e, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, | ||
562 | 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, | ||
563 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00, | ||
564 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, | ||
565 | 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x44, 0x11, 0x44, | ||
566 | 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, | ||
567 | 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, | ||
568 | 0x55, 0xaa, 0x55, 0xaa, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, | ||
569 | 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0x18, 0x18, 0x18, 0x18, | ||
570 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
571 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, | ||
572 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, | ||
573 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, | ||
574 | 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
575 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, | ||
576 | 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, | ||
577 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, | ||
578 | 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
579 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
580 | 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, | ||
581 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
582 | 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
583 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, | ||
584 | 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, | ||
585 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
586 | 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
587 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, | ||
588 | 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, | ||
589 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
590 | 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
591 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, | ||
592 | 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
593 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, | ||
594 | 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
595 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, | ||
596 | 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, | ||
597 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
598 | 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
599 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, | ||
600 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, | ||
601 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
602 | 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
603 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, | ||
604 | 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, | ||
605 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, | ||
606 | 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
607 | 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, | ||
608 | 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, | ||
609 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
610 | 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
611 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, | ||
612 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, | ||
613 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, | ||
614 | 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
615 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, | ||
616 | 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, | ||
617 | 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
618 | 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, | ||
619 | 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, | ||
620 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, | ||
621 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
622 | 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
623 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
624 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
625 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, | ||
626 | 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, | ||
627 | 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, | ||
628 | 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, | ||
629 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
630 | 0x00, 0x76, 0xdc, 0xd8, 0xd8, 0xd8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, | ||
631 | 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xd8, 0xcc, 0xc6, 0xc6, 0xc6, 0xcc, | ||
632 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, | ||
633 | 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
634 | 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, | ||
635 | 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xc6, 0xfe, | ||
636 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, | ||
637 | 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
638 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, | ||
639 | 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
640 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, | ||
641 | 0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, | ||
642 | 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, | ||
643 | 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, | ||
644 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x18, 0x0c, 0x3e, 0x66, | ||
645 | 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
646 | 0x00, 0x7e, 0xdb, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
647 | 0x00, 0x00, 0x00, 0x03, 0x06, 0x7e, 0xdb, 0xdb, 0xf3, 0x7e, 0x60, 0xc0, | ||
648 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, | ||
649 | 0x60, 0x60, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, | ||
650 | 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, | ||
651 | 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, | ||
652 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, | ||
653 | 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, | ||
654 | 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, | ||
655 | 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x7e, | ||
656 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x1b, 0x18, 0x18, | ||
657 | 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, | ||
658 | 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, | ||
659 | 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, | ||
660 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, | ||
661 | 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, | ||
662 | 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
663 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, | ||
664 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
665 | 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x0c, | ||
666 | 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00, | ||
667 | 0x00, 0xd8, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
668 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, | ||
669 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
670 | 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
671 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
672 | 0x00, 0x00, 0x00, 0x00, | ||
673 | }; | ||
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 1446df90ef85..e447938d39cf 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c | |||
@@ -185,6 +185,17 @@ static const struct manufacturer_info __initconst manufacturer_info[] = { | |||
185 | FPU(-1, NULL) | 185 | FPU(-1, NULL) |
186 | } | 186 | } |
187 | },{ | 187 | },{ |
188 | 0xF, /* Aeroflex Gaisler */ | ||
189 | .cpu_info = { | ||
190 | CPU(3, "LEON"), | ||
191 | CPU(-1, NULL) | ||
192 | }, | ||
193 | .fpu_info = { | ||
194 | FPU(2, "GRFPU"), | ||
195 | FPU(3, "GRFPU-Lite"), | ||
196 | FPU(-1, NULL) | ||
197 | } | ||
198 | },{ | ||
188 | 0x17, | 199 | 0x17, |
189 | .cpu_info = { | 200 | .cpu_info = { |
190 | CPU_PMU(0x10, "TI UltraSparc I (SpitFire)", "ultra12"), | 201 | CPU_PMU(0x10, "TI UltraSparc I (SpitFire)", "ultra12"), |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index f41ecc5ac0b4..1504df8ddf70 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -400,6 +400,39 @@ linux_trap_ipi15_sun4d: | |||
400 | /* FIXME */ | 400 | /* FIXME */ |
401 | 1: b,a 1b | 401 | 1: b,a 1b |
402 | 402 | ||
403 | #ifdef CONFIG_SPARC_LEON | ||
404 | |||
405 | .globl smpleon_ticker | ||
406 | /* SMP per-cpu ticker interrupts are handled specially. */ | ||
407 | smpleon_ticker: | ||
408 | SAVE_ALL | ||
409 | or %l0, PSR_PIL, %g2 | ||
410 | wr %g2, 0x0, %psr | ||
411 | WRITE_PAUSE | ||
412 | wr %g2, PSR_ET, %psr | ||
413 | WRITE_PAUSE | ||
414 | call leon_percpu_timer_interrupt | ||
415 | add %sp, STACKFRAME_SZ, %o0 | ||
416 | wr %l0, PSR_ET, %psr | ||
417 | WRITE_PAUSE | ||
418 | RESTORE_ALL | ||
419 | |||
420 | .align 4 | ||
421 | .globl linux_trap_ipi15_leon | ||
422 | linux_trap_ipi15_leon: | ||
423 | SAVE_ALL | ||
424 | or %l0, PSR_PIL, %l4 | ||
425 | wr %l4, 0x0, %psr | ||
426 | WRITE_PAUSE | ||
427 | wr %l4, PSR_ET, %psr | ||
428 | WRITE_PAUSE | ||
429 | call leon_cross_call_irq | ||
430 | nop | ||
431 | b ret_trap_lockless_ipi | ||
432 | clr %l6 | ||
433 | |||
434 | #endif /* CONFIG_SPARC_LEON */ | ||
435 | |||
403 | #endif /* CONFIG_SMP */ | 436 | #endif /* CONFIG_SMP */ |
404 | 437 | ||
405 | /* This routine handles illegal instructions and privileged | 438 | /* This routine handles illegal instructions and privileged |
@@ -1261,7 +1294,7 @@ linux_sparc_syscall: | |||
1261 | sethi %hi(PSR_SYSCALL), %l4 | 1294 | sethi %hi(PSR_SYSCALL), %l4 |
1262 | or %l0, %l4, %l0 | 1295 | or %l0, %l4, %l0 |
1263 | /* Direct access to user regs, must faster. */ | 1296 | /* Direct access to user regs, must faster. */ |
1264 | cmp %g1, NR_SYSCALLS | 1297 | cmp %g1, NR_syscalls |
1265 | bgeu linux_sparc_ni_syscall | 1298 | bgeu linux_sparc_ni_syscall |
1266 | sll %g1, 2, %l4 | 1299 | sll %g1, 2, %l4 |
1267 | ld [%l7 + %l4], %l7 | 1300 | ld [%l7 + %l4], %l7 |
diff --git a/arch/sparc/kernel/ftrace.c b/arch/sparc/kernel/ftrace.c index d3b1a3076569..29973daa9930 100644 --- a/arch/sparc/kernel/ftrace.c +++ b/arch/sparc/kernel/ftrace.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/list.h> | 6 | #include <linux/list.h> |
7 | #include <trace/syscall.h> | ||
7 | 8 | ||
8 | #include <asm/ftrace.h> | 9 | #include <asm/ftrace.h> |
9 | 10 | ||
@@ -91,3 +92,13 @@ int __init ftrace_dyn_arch_init(void *data) | |||
91 | } | 92 | } |
92 | #endif | 93 | #endif |
93 | 94 | ||
95 | #ifdef CONFIG_FTRACE_SYSCALLS | ||
96 | |||
97 | extern unsigned int sys_call_table[]; | ||
98 | |||
99 | unsigned long __init arch_syscall_addr(int nr) | ||
100 | { | ||
101 | return (unsigned long)sys_call_table[nr]; | ||
102 | } | ||
103 | |||
104 | #endif | ||
diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S index 439d82a95ac9..21bb2590d4ae 100644 --- a/arch/sparc/kernel/head_32.S +++ b/arch/sparc/kernel/head_32.S | |||
@@ -811,9 +811,31 @@ found_version: | |||
811 | got_prop: | 811 | got_prop: |
812 | #ifdef CONFIG_SPARC_LEON | 812 | #ifdef CONFIG_SPARC_LEON |
813 | /* no cpu-type check is needed, it is a SPARC-LEON */ | 813 | /* no cpu-type check is needed, it is a SPARC-LEON */ |
814 | #ifdef CONFIG_SMP | ||
815 | ba leon_smp_init | ||
816 | nop | ||
817 | |||
818 | .global leon_smp_init | ||
819 | leon_smp_init: | ||
820 | sethi %hi(boot_cpu_id), %g1 ! master always 0 | ||
821 | stb %g0, [%g1 + %lo(boot_cpu_id)] | ||
822 | sethi %hi(boot_cpu_id4), %g1 ! master always 0 | ||
823 | stb %g0, [%g1 + %lo(boot_cpu_id4)] | ||
824 | |||
825 | rd %asr17,%g1 | ||
826 | srl %g1,28,%g1 | ||
827 | |||
828 | cmp %g0,%g1 | ||
829 | beq sun4c_continue_boot !continue with master | ||
830 | nop | ||
831 | |||
832 | ba leon_smp_cpu_startup | ||
833 | nop | ||
834 | #else | ||
814 | ba sun4c_continue_boot | 835 | ba sun4c_continue_boot |
815 | nop | 836 | nop |
816 | #endif | 837 | #endif |
838 | #endif | ||
817 | set cputypval, %o2 | 839 | set cputypval, %o2 |
818 | ldub [%o2 + 0x4], %l1 | 840 | ldub [%o2 + 0x4], %l1 |
819 | 841 | ||
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 7690cc219ecc..5fad94950e76 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-mapping.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/iommu-helper.h> | 13 | #include <linux/iommu-helper.h> |
14 | #include <linux/bitmap.h> | ||
14 | 15 | ||
15 | #ifdef CONFIG_PCI | 16 | #ifdef CONFIG_PCI |
16 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
@@ -169,7 +170,7 @@ void iommu_range_free(struct iommu *iommu, dma_addr_t dma_addr, unsigned long np | |||
169 | 170 | ||
170 | entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; | 171 | entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; |
171 | 172 | ||
172 | iommu_area_free(arena->map, entry, npages); | 173 | bitmap_clear(arena->map, entry, npages); |
173 | } | 174 | } |
174 | 175 | ||
175 | int iommu_table_init(struct iommu *iommu, int tsbsize, | 176 | int iommu_table_init(struct iommu *iommu, int tsbsize, |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 9f61fd8cbb7b..3c8c44f6a41c 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -48,8 +48,13 @@ | |||
48 | #include <asm/dma.h> | 48 | #include <asm/dma.h> |
49 | #include <asm/iommu.h> | 49 | #include <asm/iommu.h> |
50 | #include <asm/io-unit.h> | 50 | #include <asm/io-unit.h> |
51 | #include <asm/leon.h> | ||
51 | 52 | ||
53 | #ifdef CONFIG_SPARC_LEON | ||
54 | #define mmu_inval_dma_area(p, l) leon_flush_dcache_all() | ||
55 | #else | ||
52 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ | 56 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ |
57 | #endif | ||
53 | 58 | ||
54 | static struct resource *_sparc_find_resource(struct resource *r, | 59 | static struct resource *_sparc_find_resource(struct resource *r, |
55 | unsigned long); | 60 | unsigned long); |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 8ab1d4728a4b..8d6882bb480a 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -176,7 +176,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | if (i < NR_IRQS) { | 178 | if (i < NR_IRQS) { |
179 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 179 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |
180 | action = irq_desc[i].action; | 180 | action = irq_desc[i].action; |
181 | if (!action) | 181 | if (!action) |
182 | goto skip; | 182 | goto skip; |
@@ -187,7 +187,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
187 | for_each_online_cpu(j) | 187 | for_each_online_cpu(j) |
188 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 188 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |
189 | #endif | 189 | #endif |
190 | seq_printf(p, " %9s", irq_desc[i].chip->typename); | 190 | seq_printf(p, " %9s", irq_desc[i].chip->name); |
191 | seq_printf(p, " %s", action->name); | 191 | seq_printf(p, " %s", action->name); |
192 | 192 | ||
193 | for (action=action->next; action; action = action->next) | 193 | for (action=action->next; action; action = action->next) |
@@ -195,7 +195,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
195 | 195 | ||
196 | seq_putc(p, '\n'); | 196 | seq_putc(p, '\n'); |
197 | skip: | 197 | skip: |
198 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 198 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
199 | } else if (i == NR_IRQS) { | 199 | } else if (i == NR_IRQS) { |
200 | seq_printf(p, "NMI: "); | 200 | seq_printf(p, "NMI: "); |
201 | for_each_online_cpu(j) | 201 | for_each_online_cpu(j) |
@@ -484,7 +484,7 @@ static void sun4v_virq_eoi(unsigned int virt_irq) | |||
484 | } | 484 | } |
485 | 485 | ||
486 | static struct irq_chip sun4u_irq = { | 486 | static struct irq_chip sun4u_irq = { |
487 | .typename = "sun4u", | 487 | .name = "sun4u", |
488 | .enable = sun4u_irq_enable, | 488 | .enable = sun4u_irq_enable, |
489 | .disable = sun4u_irq_disable, | 489 | .disable = sun4u_irq_disable, |
490 | .eoi = sun4u_irq_eoi, | 490 | .eoi = sun4u_irq_eoi, |
@@ -492,7 +492,7 @@ static struct irq_chip sun4u_irq = { | |||
492 | }; | 492 | }; |
493 | 493 | ||
494 | static struct irq_chip sun4v_irq = { | 494 | static struct irq_chip sun4v_irq = { |
495 | .typename = "sun4v", | 495 | .name = "sun4v", |
496 | .enable = sun4v_irq_enable, | 496 | .enable = sun4v_irq_enable, |
497 | .disable = sun4v_irq_disable, | 497 | .disable = sun4v_irq_disable, |
498 | .eoi = sun4v_irq_eoi, | 498 | .eoi = sun4v_irq_eoi, |
@@ -500,7 +500,7 @@ static struct irq_chip sun4v_irq = { | |||
500 | }; | 500 | }; |
501 | 501 | ||
502 | static struct irq_chip sun4v_virq = { | 502 | static struct irq_chip sun4v_virq = { |
503 | .typename = "vsun4v", | 503 | .name = "vsun4v", |
504 | .enable = sun4v_virq_enable, | 504 | .enable = sun4v_virq_enable, |
505 | .disable = sun4v_virq_disable, | 505 | .disable = sun4v_virq_disable, |
506 | .eoi = sun4v_virq_eoi, | 506 | .eoi = sun4v_virq_eoi, |
@@ -785,14 +785,14 @@ void fixup_irqs(void) | |||
785 | for (irq = 0; irq < NR_IRQS; irq++) { | 785 | for (irq = 0; irq < NR_IRQS; irq++) { |
786 | unsigned long flags; | 786 | unsigned long flags; |
787 | 787 | ||
788 | spin_lock_irqsave(&irq_desc[irq].lock, flags); | 788 | raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); |
789 | if (irq_desc[irq].action && | 789 | if (irq_desc[irq].action && |
790 | !(irq_desc[irq].status & IRQ_PER_CPU)) { | 790 | !(irq_desc[irq].status & IRQ_PER_CPU)) { |
791 | if (irq_desc[irq].chip->set_affinity) | 791 | if (irq_desc[irq].chip->set_affinity) |
792 | irq_desc[irq].chip->set_affinity(irq, | 792 | irq_desc[irq].chip->set_affinity(irq, |
793 | irq_desc[irq].affinity); | 793 | irq_desc[irq].affinity); |
794 | } | 794 | } |
795 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 795 | raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); |
796 | } | 796 | } |
797 | 797 | ||
798 | tick_ops->disable_irq(); | 798 | tick_ops->disable_irq(); |
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c index 3bc6527c95af..6716584e48ab 100644 --- a/arch/sparc/kernel/kprobes.c +++ b/arch/sparc/kernel/kprobes.c | |||
@@ -46,6 +46,9 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}}; | |||
46 | 46 | ||
47 | int __kprobes arch_prepare_kprobe(struct kprobe *p) | 47 | int __kprobes arch_prepare_kprobe(struct kprobe *p) |
48 | { | 48 | { |
49 | if ((unsigned long) p->addr & 0x3UL) | ||
50 | return -EILSEQ; | ||
51 | |||
49 | p->ainsn.insn[0] = *p->addr; | 52 | p->ainsn.insn[0] = *p->addr; |
50 | flushi(&p->ainsn.insn[0]); | 53 | flushi(&p->ainsn.insn[0]); |
51 | 54 | ||
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index cb3c72c45aab..df39a0f0d27a 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/bitmap.h> | ||
17 | 18 | ||
18 | #include <asm/hypervisor.h> | 19 | #include <asm/hypervisor.h> |
19 | #include <asm/iommu.h> | 20 | #include <asm/iommu.h> |
@@ -1242,13 +1243,13 @@ int ldc_bind(struct ldc_channel *lp, const char *name) | |||
1242 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); | 1243 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); |
1243 | 1244 | ||
1244 | err = request_irq(lp->cfg.rx_irq, ldc_rx, | 1245 | err = request_irq(lp->cfg.rx_irq, ldc_rx, |
1245 | IRQF_SAMPLE_RANDOM | IRQF_DISABLED | IRQF_SHARED, | 1246 | IRQF_SAMPLE_RANDOM | IRQF_DISABLED, |
1246 | lp->rx_irq_name, lp); | 1247 | lp->rx_irq_name, lp); |
1247 | if (err) | 1248 | if (err) |
1248 | return err; | 1249 | return err; |
1249 | 1250 | ||
1250 | err = request_irq(lp->cfg.tx_irq, ldc_tx, | 1251 | err = request_irq(lp->cfg.tx_irq, ldc_tx, |
1251 | IRQF_SAMPLE_RANDOM | IRQF_DISABLED | IRQF_SHARED, | 1252 | IRQF_SAMPLE_RANDOM | IRQF_DISABLED, |
1252 | lp->tx_irq_name, lp); | 1253 | lp->tx_irq_name, lp); |
1253 | if (err) { | 1254 | if (err) { |
1254 | free_irq(lp->cfg.rx_irq, lp); | 1255 | free_irq(lp->cfg.rx_irq, lp); |
@@ -1875,7 +1876,7 @@ EXPORT_SYMBOL(ldc_read); | |||
1875 | static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages) | 1876 | static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages) |
1876 | { | 1877 | { |
1877 | struct iommu_arena *arena = &iommu->arena; | 1878 | struct iommu_arena *arena = &iommu->arena; |
1878 | unsigned long n, i, start, end, limit; | 1879 | unsigned long n, start, end, limit; |
1879 | int pass; | 1880 | int pass; |
1880 | 1881 | ||
1881 | limit = arena->limit; | 1882 | limit = arena->limit; |
@@ -1883,7 +1884,7 @@ static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages) | |||
1883 | pass = 0; | 1884 | pass = 0; |
1884 | 1885 | ||
1885 | again: | 1886 | again: |
1886 | n = find_next_zero_bit(arena->map, limit, start); | 1887 | n = bitmap_find_next_zero_area(arena->map, limit, start, npages, 0); |
1887 | end = n + npages; | 1888 | end = n + npages; |
1888 | if (unlikely(end >= limit)) { | 1889 | if (unlikely(end >= limit)) { |
1889 | if (likely(pass < 1)) { | 1890 | if (likely(pass < 1)) { |
@@ -1896,16 +1897,7 @@ again: | |||
1896 | return -1; | 1897 | return -1; |
1897 | } | 1898 | } |
1898 | } | 1899 | } |
1899 | 1900 | bitmap_set(arena->map, n, npages); | |
1900 | for (i = n; i < end; i++) { | ||
1901 | if (test_bit(i, arena->map)) { | ||
1902 | start = i + 1; | ||
1903 | goto again; | ||
1904 | } | ||
1905 | } | ||
1906 | |||
1907 | for (i = n; i < end; i++) | ||
1908 | __set_bit(i, arena->map); | ||
1909 | 1901 | ||
1910 | arena->hint = end; | 1902 | arena->hint = end; |
1911 | 1903 | ||
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 54d8a5bd4824..87f1760c0aa2 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -12,11 +12,14 @@ | |||
12 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/of_device.h> | 14 | #include <linux/of_device.h> |
15 | |||
15 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
16 | #include <asm/timer.h> | 17 | #include <asm/timer.h> |
17 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
18 | #include <asm/leon.h> | 19 | #include <asm/leon.h> |
19 | #include <asm/leon_amba.h> | 20 | #include <asm/leon_amba.h> |
21 | #include <asm/traps.h> | ||
22 | #include <asm/cacheflush.h> | ||
20 | 23 | ||
21 | #include "prom.h" | 24 | #include "prom.h" |
22 | #include "irq.h" | 25 | #include "irq.h" |
@@ -115,6 +118,21 @@ void __init leon_init_timers(irq_handler_t counter_fn) | |||
115 | (((1000000 / 100) - 1))); | 118 | (((1000000 / 100) - 1))); |
116 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[0].ctrl, 0); | 119 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[0].ctrl, 0); |
117 | 120 | ||
121 | #ifdef CONFIG_SMP | ||
122 | leon_percpu_timer_dev[0].start = (int)leon3_gptimer_regs; | ||
123 | leon_percpu_timer_dev[0].irq = leon3_gptimer_irq+1; | ||
124 | |||
125 | if (!(LEON3_BYPASS_LOAD_PA(&leon3_gptimer_regs->config) & | ||
126 | (1<<LEON3_GPTIMER_SEPIRQ))) { | ||
127 | prom_printf("irq timer not configured with seperate irqs \n"); | ||
128 | BUG(); | ||
129 | } | ||
130 | |||
131 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[1].val, 0); | ||
132 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[1].rld, (((1000000/100) - 1))); | ||
133 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[1].ctrl, 0); | ||
134 | # endif | ||
135 | |||
118 | } else { | 136 | } else { |
119 | printk(KERN_ERR "No Timer/irqctrl found\n"); | 137 | printk(KERN_ERR "No Timer/irqctrl found\n"); |
120 | BUG(); | 138 | BUG(); |
@@ -130,11 +148,41 @@ void __init leon_init_timers(irq_handler_t counter_fn) | |||
130 | prom_halt(); | 148 | prom_halt(); |
131 | } | 149 | } |
132 | 150 | ||
151 | # ifdef CONFIG_SMP | ||
152 | { | ||
153 | unsigned long flags; | ||
154 | struct tt_entry *trap_table = &sparc_ttable[SP_TRAP_IRQ1 + (leon_percpu_timer_dev[0].irq - 1)]; | ||
155 | |||
156 | /* For SMP we use the level 14 ticker, however the bootup code | ||
157 | * has copied the firmwares level 14 vector into boot cpu's | ||
158 | * trap table, we must fix this now or we get squashed. | ||
159 | */ | ||
160 | local_irq_save(flags); | ||
161 | |||
162 | patchme_maybe_smp_msg[0] = 0x01000000; /* NOP out the branch */ | ||
163 | |||
164 | /* Adjust so that we jump directly to smpleon_ticker */ | ||
165 | trap_table->inst_three += smpleon_ticker - real_irq_entry; | ||
166 | |||
167 | local_flush_cache_all(); | ||
168 | local_irq_restore(flags); | ||
169 | } | ||
170 | # endif | ||
171 | |||
133 | if (leon3_gptimer_regs) { | 172 | if (leon3_gptimer_regs) { |
134 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[0].ctrl, | 173 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[0].ctrl, |
135 | LEON3_GPTIMER_EN | | 174 | LEON3_GPTIMER_EN | |
136 | LEON3_GPTIMER_RL | | 175 | LEON3_GPTIMER_RL | |
137 | LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN); | 176 | LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN); |
177 | |||
178 | #ifdef CONFIG_SMP | ||
179 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[1].ctrl, | ||
180 | LEON3_GPTIMER_EN | | ||
181 | LEON3_GPTIMER_RL | | ||
182 | LEON3_GPTIMER_LD | | ||
183 | LEON3_GPTIMER_IRQEN); | ||
184 | #endif | ||
185 | |||
138 | } | 186 | } |
139 | } | 187 | } |
140 | 188 | ||
@@ -175,6 +223,42 @@ void __init leon_node_init(struct device_node *dp, struct device_node ***nextp) | |||
175 | } | 223 | } |
176 | } | 224 | } |
177 | 225 | ||
226 | #ifdef CONFIG_SMP | ||
227 | |||
228 | void leon_set_cpu_int(int cpu, int level) | ||
229 | { | ||
230 | unsigned long mask; | ||
231 | mask = get_irqmask(level); | ||
232 | LEON3_BYPASS_STORE_PA(&leon3_irqctrl_regs->force[cpu], mask); | ||
233 | } | ||
234 | |||
235 | static void leon_clear_ipi(int cpu, int level) | ||
236 | { | ||
237 | unsigned long mask; | ||
238 | mask = get_irqmask(level); | ||
239 | LEON3_BYPASS_STORE_PA(&leon3_irqctrl_regs->force[cpu], mask<<16); | ||
240 | } | ||
241 | |||
242 | static void leon_set_udt(int cpu) | ||
243 | { | ||
244 | } | ||
245 | |||
246 | void leon_clear_profile_irq(int cpu) | ||
247 | { | ||
248 | } | ||
249 | |||
250 | void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu) | ||
251 | { | ||
252 | unsigned long mask, flags, *addr; | ||
253 | mask = get_irqmask(irq_nr); | ||
254 | local_irq_save(flags); | ||
255 | addr = (unsigned long *)&(leon3_irqctrl_regs->mask[cpu]); | ||
256 | LEON3_BYPASS_STORE_PA(addr, (LEON3_BYPASS_LOAD_PA(addr) | (mask))); | ||
257 | local_irq_restore(flags); | ||
258 | } | ||
259 | |||
260 | #endif | ||
261 | |||
178 | void __init leon_init_IRQ(void) | 262 | void __init leon_init_IRQ(void) |
179 | { | 263 | { |
180 | sparc_init_timers = leon_init_timers; | 264 | sparc_init_timers = leon_init_timers; |
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c new file mode 100644 index 000000000000..05c0dadd6371 --- /dev/null +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -0,0 +1,468 @@ | |||
1 | /* leon_smp.c: Sparc-Leon SMP support. | ||
2 | * | ||
3 | * based on sun4m_smp.c | ||
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
5 | * Copyright (C) 2009 Daniel Hellstrom (daniel@gaisler.com) Aeroflex Gaisler AB | ||
6 | * Copyright (C) 2009 Konrad Eisele (konrad@gaisler.com) Aeroflex Gaisler AB | ||
7 | */ | ||
8 | |||
9 | #include <asm/head.h> | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/threads.h> | ||
14 | #include <linux/smp.h> | ||
15 | #include <linux/smp_lock.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/kernel_stat.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/swap.h> | ||
22 | #include <linux/profile.h> | ||
23 | #include <linux/pm.h> | ||
24 | #include <linux/delay.h> | ||
25 | |||
26 | #include <asm/cacheflush.h> | ||
27 | #include <asm/tlbflush.h> | ||
28 | |||
29 | #include <asm/ptrace.h> | ||
30 | #include <asm/atomic.h> | ||
31 | #include <asm/irq_regs.h> | ||
32 | |||
33 | #include <asm/delay.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/page.h> | ||
36 | #include <asm/pgalloc.h> | ||
37 | #include <asm/pgtable.h> | ||
38 | #include <asm/oplib.h> | ||
39 | #include <asm/cpudata.h> | ||
40 | #include <asm/asi.h> | ||
41 | #include <asm/leon.h> | ||
42 | #include <asm/leon_amba.h> | ||
43 | |||
44 | #ifdef CONFIG_SPARC_LEON | ||
45 | |||
46 | #include "irq.h" | ||
47 | |||
48 | extern ctxd_t *srmmu_ctx_table_phys; | ||
49 | static int smp_processors_ready; | ||
50 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; | ||
51 | extern unsigned char boot_cpu_id; | ||
52 | extern cpumask_t smp_commenced_mask; | ||
53 | void __init leon_configure_cache_smp(void); | ||
54 | |||
55 | static inline unsigned long do_swap(volatile unsigned long *ptr, | ||
56 | unsigned long val) | ||
57 | { | ||
58 | __asm__ __volatile__("swapa [%1] %2, %0\n\t" : "=&r"(val) | ||
59 | : "r"(ptr), "i"(ASI_LEON_DCACHE_MISS) | ||
60 | : "memory"); | ||
61 | return val; | ||
62 | } | ||
63 | |||
64 | static void smp_setup_percpu_timer(void); | ||
65 | |||
66 | void __cpuinit leon_callin(void) | ||
67 | { | ||
68 | int cpuid = hard_smpleon_processor_id(); | ||
69 | |||
70 | local_flush_cache_all(); | ||
71 | local_flush_tlb_all(); | ||
72 | leon_configure_cache_smp(); | ||
73 | |||
74 | /* Get our local ticker going. */ | ||
75 | smp_setup_percpu_timer(); | ||
76 | |||
77 | calibrate_delay(); | ||
78 | smp_store_cpu_info(cpuid); | ||
79 | |||
80 | local_flush_cache_all(); | ||
81 | local_flush_tlb_all(); | ||
82 | |||
83 | /* | ||
84 | * Unblock the master CPU _only_ when the scheduler state | ||
85 | * of all secondary CPUs will be up-to-date, so after | ||
86 | * the SMP initialization the master will be just allowed | ||
87 | * to call the scheduler code. | ||
88 | * Allow master to continue. | ||
89 | */ | ||
90 | do_swap(&cpu_callin_map[cpuid], 1); | ||
91 | |||
92 | local_flush_cache_all(); | ||
93 | local_flush_tlb_all(); | ||
94 | |||
95 | cpu_probe(); | ||
96 | |||
97 | /* Fix idle thread fields. */ | ||
98 | __asm__ __volatile__("ld [%0], %%g6\n\t" : : "r"(¤t_set[cpuid]) | ||
99 | : "memory" /* paranoid */); | ||
100 | |||
101 | /* Attach to the address space of init_task. */ | ||
102 | atomic_inc(&init_mm.mm_count); | ||
103 | current->active_mm = &init_mm; | ||
104 | |||
105 | while (!cpu_isset(cpuid, smp_commenced_mask)) | ||
106 | mb(); | ||
107 | |||
108 | local_irq_enable(); | ||
109 | cpu_set(cpuid, cpu_online_map); | ||
110 | } | ||
111 | |||
112 | /* | ||
113 | * Cycle through the processors asking the PROM to start each one. | ||
114 | */ | ||
115 | |||
116 | extern struct linux_prom_registers smp_penguin_ctable; | ||
117 | |||
118 | void __init leon_configure_cache_smp(void) | ||
119 | { | ||
120 | unsigned long cfg = sparc_leon3_get_dcachecfg(); | ||
121 | int me = smp_processor_id(); | ||
122 | |||
123 | if (ASI_LEON3_SYSCTRL_CFG_SSIZE(cfg) > 4) { | ||
124 | printk(KERN_INFO "Note: SMP with snooping only works on 4k cache, found %dk(0x%x) on cpu %d, disabling caches\n", | ||
125 | (unsigned int)ASI_LEON3_SYSCTRL_CFG_SSIZE(cfg), | ||
126 | (unsigned int)cfg, (unsigned int)me); | ||
127 | sparc_leon3_disable_cache(); | ||
128 | } else { | ||
129 | if (cfg & ASI_LEON3_SYSCTRL_CFG_SNOOPING) { | ||
130 | sparc_leon3_enable_snooping(); | ||
131 | } else { | ||
132 | printk(KERN_INFO "Note: You have to enable snooping in the vhdl model cpu %d, disabling caches\n", | ||
133 | me); | ||
134 | sparc_leon3_disable_cache(); | ||
135 | } | ||
136 | } | ||
137 | |||
138 | local_flush_cache_all(); | ||
139 | local_flush_tlb_all(); | ||
140 | } | ||
141 | |||
142 | void leon_smp_setbroadcast(unsigned int mask) | ||
143 | { | ||
144 | int broadcast = | ||
145 | ((LEON3_BYPASS_LOAD_PA(&(leon3_irqctrl_regs->mpstatus)) >> | ||
146 | LEON3_IRQMPSTATUS_BROADCAST) & 1); | ||
147 | if (!broadcast) { | ||
148 | prom_printf("######## !!!! The irqmp-ctrl must have broadcast enabled, smp wont work !!!!! ####### nr cpus: %d\n", | ||
149 | leon_smp_nrcpus()); | ||
150 | if (leon_smp_nrcpus() > 1) { | ||
151 | BUG(); | ||
152 | } else { | ||
153 | prom_printf("continue anyway\n"); | ||
154 | return; | ||
155 | } | ||
156 | } | ||
157 | LEON_BYPASS_STORE_PA(&(leon3_irqctrl_regs->mpbroadcast), mask); | ||
158 | } | ||
159 | |||
160 | unsigned int leon_smp_getbroadcast(void) | ||
161 | { | ||
162 | unsigned int mask; | ||
163 | mask = LEON_BYPASS_LOAD_PA(&(leon3_irqctrl_regs->mpbroadcast)); | ||
164 | return mask; | ||
165 | } | ||
166 | |||
167 | int leon_smp_nrcpus(void) | ||
168 | { | ||
169 | int nrcpu = | ||
170 | ((LEON3_BYPASS_LOAD_PA(&(leon3_irqctrl_regs->mpstatus)) >> | ||
171 | LEON3_IRQMPSTATUS_CPUNR) & 0xf) + 1; | ||
172 | return nrcpu; | ||
173 | } | ||
174 | |||
175 | void __init leon_boot_cpus(void) | ||
176 | { | ||
177 | int nrcpu = leon_smp_nrcpus(); | ||
178 | int me = smp_processor_id(); | ||
179 | |||
180 | printk(KERN_INFO "%d:(%d:%d) cpus mpirq at 0x%x \n", (unsigned int)me, | ||
181 | (unsigned int)nrcpu, (unsigned int)NR_CPUS, | ||
182 | (unsigned int)&(leon3_irqctrl_regs->mpstatus)); | ||
183 | |||
184 | leon_enable_irq_cpu(LEON3_IRQ_CROSS_CALL, me); | ||
185 | leon_enable_irq_cpu(LEON3_IRQ_TICKER, me); | ||
186 | leon_enable_irq_cpu(LEON3_IRQ_RESCHEDULE, me); | ||
187 | |||
188 | leon_smp_setbroadcast(1 << LEON3_IRQ_TICKER); | ||
189 | |||
190 | leon_configure_cache_smp(); | ||
191 | smp_setup_percpu_timer(); | ||
192 | local_flush_cache_all(); | ||
193 | |||
194 | } | ||
195 | |||
196 | int __cpuinit leon_boot_one_cpu(int i) | ||
197 | { | ||
198 | |||
199 | struct task_struct *p; | ||
200 | int timeout; | ||
201 | |||
202 | /* Cook up an idler for this guy. */ | ||
203 | p = fork_idle(i); | ||
204 | |||
205 | current_set[i] = task_thread_info(p); | ||
206 | |||
207 | /* See trampoline.S:leon_smp_cpu_startup for details... | ||
208 | * Initialize the contexts table | ||
209 | * Since the call to prom_startcpu() trashes the structure, | ||
210 | * we need to re-initialize it for each cpu | ||
211 | */ | ||
212 | smp_penguin_ctable.which_io = 0; | ||
213 | smp_penguin_ctable.phys_addr = (unsigned int)srmmu_ctx_table_phys; | ||
214 | smp_penguin_ctable.reg_size = 0; | ||
215 | |||
216 | /* whirrr, whirrr, whirrrrrrrrr... */ | ||
217 | printk(KERN_INFO "Starting CPU %d : (irqmp: 0x%x)\n", (unsigned int)i, | ||
218 | (unsigned int)&leon3_irqctrl_regs->mpstatus); | ||
219 | local_flush_cache_all(); | ||
220 | |||
221 | LEON_BYPASS_STORE_PA(&(leon3_irqctrl_regs->mpstatus), 1 << i); | ||
222 | |||
223 | /* wheee... it's going... */ | ||
224 | for (timeout = 0; timeout < 10000; timeout++) { | ||
225 | if (cpu_callin_map[i]) | ||
226 | break; | ||
227 | udelay(200); | ||
228 | } | ||
229 | printk(KERN_INFO "Started CPU %d \n", (unsigned int)i); | ||
230 | |||
231 | if (!(cpu_callin_map[i])) { | ||
232 | printk(KERN_ERR "Processor %d is stuck.\n", i); | ||
233 | return -ENODEV; | ||
234 | } else { | ||
235 | leon_enable_irq_cpu(LEON3_IRQ_CROSS_CALL, i); | ||
236 | leon_enable_irq_cpu(LEON3_IRQ_TICKER, i); | ||
237 | leon_enable_irq_cpu(LEON3_IRQ_RESCHEDULE, i); | ||
238 | } | ||
239 | |||
240 | local_flush_cache_all(); | ||
241 | return 0; | ||
242 | } | ||
243 | |||
244 | void __init leon_smp_done(void) | ||
245 | { | ||
246 | |||
247 | int i, first; | ||
248 | int *prev; | ||
249 | |||
250 | /* setup cpu list for irq rotation */ | ||
251 | first = 0; | ||
252 | prev = &first; | ||
253 | for (i = 0; i < NR_CPUS; i++) { | ||
254 | if (cpu_online(i)) { | ||
255 | *prev = i; | ||
256 | prev = &cpu_data(i).next; | ||
257 | } | ||
258 | } | ||
259 | *prev = first; | ||
260 | local_flush_cache_all(); | ||
261 | |||
262 | /* Free unneeded trap tables */ | ||
263 | if (!cpu_isset(1, cpu_present_map)) { | ||
264 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | ||
265 | init_page_count(virt_to_page(trapbase_cpu1)); | ||
266 | free_page((unsigned long)trapbase_cpu1); | ||
267 | totalram_pages++; | ||
268 | num_physpages++; | ||
269 | } | ||
270 | if (!cpu_isset(2, cpu_present_map)) { | ||
271 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | ||
272 | init_page_count(virt_to_page(trapbase_cpu2)); | ||
273 | free_page((unsigned long)trapbase_cpu2); | ||
274 | totalram_pages++; | ||
275 | num_physpages++; | ||
276 | } | ||
277 | if (!cpu_isset(3, cpu_present_map)) { | ||
278 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | ||
279 | init_page_count(virt_to_page(trapbase_cpu3)); | ||
280 | free_page((unsigned long)trapbase_cpu3); | ||
281 | totalram_pages++; | ||
282 | num_physpages++; | ||
283 | } | ||
284 | /* Ok, they are spinning and ready to go. */ | ||
285 | smp_processors_ready = 1; | ||
286 | |||
287 | } | ||
288 | |||
289 | void leon_irq_rotate(int cpu) | ||
290 | { | ||
291 | } | ||
292 | |||
293 | static struct smp_funcall { | ||
294 | smpfunc_t func; | ||
295 | unsigned long arg1; | ||
296 | unsigned long arg2; | ||
297 | unsigned long arg3; | ||
298 | unsigned long arg4; | ||
299 | unsigned long arg5; | ||
300 | unsigned long processors_in[NR_CPUS]; /* Set when ipi entered. */ | ||
301 | unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */ | ||
302 | } ccall_info; | ||
303 | |||
304 | static DEFINE_SPINLOCK(cross_call_lock); | ||
305 | |||
306 | /* Cross calls must be serialized, at least currently. */ | ||
307 | static void leon_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, | ||
308 | unsigned long arg2, unsigned long arg3, | ||
309 | unsigned long arg4) | ||
310 | { | ||
311 | if (smp_processors_ready) { | ||
312 | register int high = NR_CPUS - 1; | ||
313 | unsigned long flags; | ||
314 | |||
315 | spin_lock_irqsave(&cross_call_lock, flags); | ||
316 | |||
317 | { | ||
318 | /* If you make changes here, make sure gcc generates proper code... */ | ||
319 | register smpfunc_t f asm("i0") = func; | ||
320 | register unsigned long a1 asm("i1") = arg1; | ||
321 | register unsigned long a2 asm("i2") = arg2; | ||
322 | register unsigned long a3 asm("i3") = arg3; | ||
323 | register unsigned long a4 asm("i4") = arg4; | ||
324 | register unsigned long a5 asm("i5") = 0; | ||
325 | |||
326 | __asm__ __volatile__("std %0, [%6]\n\t" | ||
327 | "std %2, [%6 + 8]\n\t" | ||
328 | "std %4, [%6 + 16]\n\t" : : | ||
329 | "r"(f), "r"(a1), "r"(a2), "r"(a3), | ||
330 | "r"(a4), "r"(a5), | ||
331 | "r"(&ccall_info.func)); | ||
332 | } | ||
333 | |||
334 | /* Init receive/complete mapping, plus fire the IPI's off. */ | ||
335 | { | ||
336 | register int i; | ||
337 | |||
338 | cpu_clear(smp_processor_id(), mask); | ||
339 | cpus_and(mask, cpu_online_map, mask); | ||
340 | for (i = 0; i <= high; i++) { | ||
341 | if (cpu_isset(i, mask)) { | ||
342 | ccall_info.processors_in[i] = 0; | ||
343 | ccall_info.processors_out[i] = 0; | ||
344 | set_cpu_int(i, LEON3_IRQ_CROSS_CALL); | ||
345 | |||
346 | } | ||
347 | } | ||
348 | } | ||
349 | |||
350 | { | ||
351 | register int i; | ||
352 | |||
353 | i = 0; | ||
354 | do { | ||
355 | if (!cpu_isset(i, mask)) | ||
356 | continue; | ||
357 | |||
358 | while (!ccall_info.processors_in[i]) | ||
359 | barrier(); | ||
360 | } while (++i <= high); | ||
361 | |||
362 | i = 0; | ||
363 | do { | ||
364 | if (!cpu_isset(i, mask)) | ||
365 | continue; | ||
366 | |||
367 | while (!ccall_info.processors_out[i]) | ||
368 | barrier(); | ||
369 | } while (++i <= high); | ||
370 | } | ||
371 | |||
372 | spin_unlock_irqrestore(&cross_call_lock, flags); | ||
373 | } | ||
374 | } | ||
375 | |||
376 | /* Running cross calls. */ | ||
377 | void leon_cross_call_irq(void) | ||
378 | { | ||
379 | int i = smp_processor_id(); | ||
380 | |||
381 | ccall_info.processors_in[i] = 1; | ||
382 | ccall_info.func(ccall_info.arg1, ccall_info.arg2, ccall_info.arg3, | ||
383 | ccall_info.arg4, ccall_info.arg5); | ||
384 | ccall_info.processors_out[i] = 1; | ||
385 | } | ||
386 | |||
387 | void leon_percpu_timer_interrupt(struct pt_regs *regs) | ||
388 | { | ||
389 | struct pt_regs *old_regs; | ||
390 | int cpu = smp_processor_id(); | ||
391 | |||
392 | old_regs = set_irq_regs(regs); | ||
393 | |||
394 | leon_clear_profile_irq(cpu); | ||
395 | |||
396 | profile_tick(CPU_PROFILING); | ||
397 | |||
398 | if (!--prof_counter(cpu)) { | ||
399 | int user = user_mode(regs); | ||
400 | |||
401 | irq_enter(); | ||
402 | update_process_times(user); | ||
403 | irq_exit(); | ||
404 | |||
405 | prof_counter(cpu) = prof_multiplier(cpu); | ||
406 | } | ||
407 | set_irq_regs(old_regs); | ||
408 | } | ||
409 | |||
410 | static void __init smp_setup_percpu_timer(void) | ||
411 | { | ||
412 | int cpu = smp_processor_id(); | ||
413 | |||
414 | prof_counter(cpu) = prof_multiplier(cpu) = 1; | ||
415 | } | ||
416 | |||
417 | void __init leon_blackbox_id(unsigned *addr) | ||
418 | { | ||
419 | int rd = *addr & 0x3e000000; | ||
420 | int rs1 = rd >> 11; | ||
421 | |||
422 | /* patch places where ___b_hard_smp_processor_id appears */ | ||
423 | addr[0] = 0x81444000 | rd; /* rd %asr17, reg */ | ||
424 | addr[1] = 0x8130201c | rd | rs1; /* srl reg, 0x1c, reg */ | ||
425 | addr[2] = 0x01000000; /* nop */ | ||
426 | } | ||
427 | |||
428 | void __init leon_blackbox_current(unsigned *addr) | ||
429 | { | ||
430 | int rd = *addr & 0x3e000000; | ||
431 | int rs1 = rd >> 11; | ||
432 | |||
433 | /* patch LOAD_CURRENT macro where ___b_load_current appears */ | ||
434 | addr[0] = 0x81444000 | rd; /* rd %asr17, reg */ | ||
435 | addr[2] = 0x8130201c | rd | rs1; /* srl reg, 0x1c, reg */ | ||
436 | addr[4] = 0x81282002 | rd | rs1; /* sll reg, 0x2, reg */ | ||
437 | |||
438 | } | ||
439 | |||
440 | /* | ||
441 | * CPU idle callback function | ||
442 | * See .../arch/sparc/kernel/process.c | ||
443 | */ | ||
444 | void pmc_leon_idle(void) | ||
445 | { | ||
446 | __asm__ volatile ("mov %g0, %asr19"); | ||
447 | } | ||
448 | |||
449 | void __init leon_init_smp(void) | ||
450 | { | ||
451 | /* Patch ipi15 trap table */ | ||
452 | t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_leon - linux_trap_ipi15_sun4m); | ||
453 | |||
454 | BTFIXUPSET_BLACKBOX(hard_smp_processor_id, leon_blackbox_id); | ||
455 | BTFIXUPSET_BLACKBOX(load_current, leon_blackbox_current); | ||
456 | BTFIXUPSET_CALL(smp_cross_call, leon_cross_call, BTFIXUPCALL_NORM); | ||
457 | BTFIXUPSET_CALL(__hard_smp_processor_id, __leon_processor_id, | ||
458 | BTFIXUPCALL_NORM); | ||
459 | |||
460 | #ifndef PMC_NO_IDLE | ||
461 | /* Assign power management IDLE handler */ | ||
462 | pm_idle = pmc_leon_idle; | ||
463 | printk(KERN_INFO "leon: power management initialized\n"); | ||
464 | #endif | ||
465 | |||
466 | } | ||
467 | |||
468 | #endif /* CONFIG_SPARC_LEON */ | ||
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 938da19dc065..cdc91d919e93 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/miscdevice.h> | 12 | #include <linux/miscdevice.h> |
13 | #include <linux/bootmem.h> | ||
13 | 14 | ||
14 | #include <asm/cpudata.h> | 15 | #include <asm/cpudata.h> |
15 | #include <asm/hypervisor.h> | 16 | #include <asm/hypervisor.h> |
@@ -108,25 +109,15 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size) | |||
108 | 109 | ||
109 | static void mdesc_lmb_free(struct mdesc_handle *hp) | 110 | static void mdesc_lmb_free(struct mdesc_handle *hp) |
110 | { | 111 | { |
111 | unsigned int alloc_size, handle_size = hp->handle_size; | 112 | unsigned int alloc_size; |
112 | unsigned long start, end; | 113 | unsigned long start; |
113 | 114 | ||
114 | BUG_ON(atomic_read(&hp->refcnt) != 0); | 115 | BUG_ON(atomic_read(&hp->refcnt) != 0); |
115 | BUG_ON(!list_empty(&hp->list)); | 116 | BUG_ON(!list_empty(&hp->list)); |
116 | 117 | ||
117 | alloc_size = PAGE_ALIGN(handle_size); | 118 | alloc_size = PAGE_ALIGN(hp->handle_size); |
118 | 119 | start = __pa(hp); | |
119 | start = (unsigned long) hp; | 120 | free_bootmem_late(start, alloc_size); |
120 | end = start + alloc_size; | ||
121 | |||
122 | while (start < end) { | ||
123 | struct page *p; | ||
124 | |||
125 | p = virt_to_page(start); | ||
126 | ClearPageReserved(p); | ||
127 | __free_page(p); | ||
128 | start += PAGE_SIZE; | ||
129 | } | ||
130 | } | 121 | } |
131 | 122 | ||
132 | static struct mdesc_mem_ops lmb_mdesc_ops = { | 123 | static struct mdesc_mem_ops lmb_mdesc_ops = { |
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index b129611590a4..d242a7340541 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c | |||
@@ -47,7 +47,7 @@ static DEFINE_PER_CPU(short, wd_enabled); | |||
47 | static int endflag __initdata; | 47 | static int endflag __initdata; |
48 | 48 | ||
49 | static DEFINE_PER_CPU(unsigned int, last_irq_sum); | 49 | static DEFINE_PER_CPU(unsigned int, last_irq_sum); |
50 | static DEFINE_PER_CPU(local_t, alert_counter); | 50 | static DEFINE_PER_CPU(long, alert_counter); |
51 | static DEFINE_PER_CPU(int, nmi_touch); | 51 | static DEFINE_PER_CPU(int, nmi_touch); |
52 | 52 | ||
53 | void touch_nmi_watchdog(void) | 53 | void touch_nmi_watchdog(void) |
@@ -96,7 +96,6 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | |||
96 | int cpu = smp_processor_id(); | 96 | int cpu = smp_processor_id(); |
97 | 97 | ||
98 | clear_softint(1 << irq); | 98 | clear_softint(1 << irq); |
99 | pcr_ops->write(PCR_PIC_PRIV); | ||
100 | 99 | ||
101 | local_cpu_data().__nmi_count++; | 100 | local_cpu_data().__nmi_count++; |
102 | 101 | ||
@@ -105,6 +104,8 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | |||
105 | if (notify_die(DIE_NMI, "nmi", regs, 0, | 104 | if (notify_die(DIE_NMI, "nmi", regs, 0, |
106 | pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) | 105 | pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) |
107 | touched = 1; | 106 | touched = 1; |
107 | else | ||
108 | pcr_ops->write(PCR_PIC_PRIV); | ||
108 | 109 | ||
109 | sum = kstat_irqs_cpu(0, cpu); | 110 | sum = kstat_irqs_cpu(0, cpu); |
110 | if (__get_cpu_var(nmi_touch)) { | 111 | if (__get_cpu_var(nmi_touch)) { |
@@ -112,13 +113,13 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | |||
112 | touched = 1; | 113 | touched = 1; |
113 | } | 114 | } |
114 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { | 115 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { |
115 | local_inc(&__get_cpu_var(alert_counter)); | 116 | __this_cpu_inc(per_cpu_var(alert_counter)); |
116 | if (local_read(&__get_cpu_var(alert_counter)) == 30 * nmi_hz) | 117 | if (__this_cpu_read(per_cpu_var(alert_counter)) == 30 * nmi_hz) |
117 | die_nmi("BUG: NMI Watchdog detected LOCKUP", | 118 | die_nmi("BUG: NMI Watchdog detected LOCKUP", |
118 | regs, panic_on_timeout); | 119 | regs, panic_on_timeout); |
119 | } else { | 120 | } else { |
120 | __get_cpu_var(last_irq_sum) = sum; | 121 | __get_cpu_var(last_irq_sum) = sum; |
121 | local_set(&__get_cpu_var(alert_counter), 0); | 122 | __this_cpu_write(per_cpu_var(alert_counter), 0); |
122 | } | 123 | } |
123 | if (__get_cpu_var(wd_enabled)) { | 124 | if (__get_cpu_var(wd_enabled)) { |
124 | write_pic(picl_value(nmi_hz)); | 125 | write_pic(picl_value(nmi_hz)); |
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 036f18ae59a6..b3d4cb5d21b3 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -104,9 +104,19 @@ static int of_bus_pci_map(u32 *addr, const u32 *range, | |||
104 | int i; | 104 | int i; |
105 | 105 | ||
106 | /* Check address type match */ | 106 | /* Check address type match */ |
107 | if ((addr[0] ^ range[0]) & 0x03000000) | 107 | if (!((addr[0] ^ range[0]) & 0x03000000)) |
108 | return -EINVAL; | 108 | goto type_match; |
109 | |||
110 | /* Special exception, we can map a 64-bit address into | ||
111 | * a 32-bit range. | ||
112 | */ | ||
113 | if ((addr[0] & 0x03000000) == 0x03000000 && | ||
114 | (range[0] & 0x03000000) == 0x02000000) | ||
115 | goto type_match; | ||
116 | |||
117 | return -EINVAL; | ||
109 | 118 | ||
119 | type_match: | ||
110 | if (of_out_of_range(addr + 1, range + 1, range + na + pna, | 120 | if (of_out_of_range(addr + 1, range + 1, range + na + pna, |
111 | na - 1, ns)) | 121 | na - 1, ns)) |
112 | return -EINVAL; | 122 | return -EINVAL; |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index c68648662802..539e83f8e087 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1064,7 +1064,6 @@ int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask) | |||
1064 | 1064 | ||
1065 | return (device_mask & dma_addr_mask) == dma_addr_mask; | 1065 | return (device_mask & dma_addr_mask) == dma_addr_mask; |
1066 | } | 1066 | } |
1067 | EXPORT_SYMBOL(pci_dma_supported); | ||
1068 | 1067 | ||
1069 | void pci_resource_to_user(const struct pci_dev *pdev, int bar, | 1068 | void pci_resource_to_user(const struct pci_dev *pdev, int bar, |
1070 | const struct resource *rp, resource_size_t *start, | 1069 | const struct resource *rp, resource_size_t *start, |
@@ -1081,3 +1080,10 @@ void pci_resource_to_user(const struct pci_dev *pdev, int bar, | |||
1081 | *start = rp->start - offset; | 1080 | *start = rp->start - offset; |
1082 | *end = rp->end - offset; | 1081 | *end = rp->end - offset; |
1083 | } | 1082 | } |
1083 | |||
1084 | static int __init pcibios_init(void) | ||
1085 | { | ||
1086 | pci_dfl_cache_line_size = 64 >> 2; | ||
1087 | return 0; | ||
1088 | } | ||
1089 | subsys_initcall(pcibios_init); | ||
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index f1be37a7b123..e1b0541feb19 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -112,7 +112,7 @@ static void free_msi(struct pci_pbm_info *pbm, int msi_num) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | static struct irq_chip msi_irq = { | 114 | static struct irq_chip msi_irq = { |
115 | .typename = "PCI-MSI", | 115 | .name = "PCI-MSI", |
116 | .mask = mask_msi_irq, | 116 | .mask = mask_msi_irq, |
117 | .unmask = unmask_msi_irq, | 117 | .unmask = unmask_msi_irq, |
118 | .enable = unmask_msi_irq, | 118 | .enable = unmask_msi_irq, |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index fa5936e1c3b9..198fb4e79ba2 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -986,6 +986,17 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self, | |||
986 | data.addr = 0; | 986 | data.addr = 0; |
987 | 987 | ||
988 | cpuc = &__get_cpu_var(cpu_hw_events); | 988 | cpuc = &__get_cpu_var(cpu_hw_events); |
989 | |||
990 | /* If the PMU has the TOE IRQ enable bits, we need to do a | ||
991 | * dummy write to the %pcr to clear the overflow bits and thus | ||
992 | * the interrupt. | ||
993 | * | ||
994 | * Do this before we peek at the counters to determine | ||
995 | * overflow so we don't lose any events. | ||
996 | */ | ||
997 | if (sparc_pmu->irq_bit) | ||
998 | pcr_ops->write(cpuc->pcr); | ||
999 | |||
989 | for (idx = 0; idx < MAX_HWEVENTS; idx++) { | 1000 | for (idx = 0; idx < MAX_HWEVENTS; idx++) { |
990 | struct perf_event *event = cpuc->events[idx]; | 1001 | struct perf_event *event = cpuc->events[idx]; |
991 | struct hw_perf_event *hwc; | 1002 | struct hw_perf_event *hwc; |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index 4ae91dc2feb9..2f6524d1a817 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/signal.h> | 23 | #include <linux/signal.h> |
24 | #include <linux/regset.h> | 24 | #include <linux/regset.h> |
25 | #include <linux/tracehook.h> | 25 | #include <linux/tracehook.h> |
26 | #include <trace/syscall.h> | ||
26 | #include <linux/compat.h> | 27 | #include <linux/compat.h> |
27 | #include <linux/elf.h> | 28 | #include <linux/elf.h> |
28 | 29 | ||
@@ -37,6 +38,9 @@ | |||
37 | #include <asm/cpudata.h> | 38 | #include <asm/cpudata.h> |
38 | #include <asm/cacheflush.h> | 39 | #include <asm/cacheflush.h> |
39 | 40 | ||
41 | #define CREATE_TRACE_POINTS | ||
42 | #include <trace/events/syscalls.h> | ||
43 | |||
40 | #include "entry.h" | 44 | #include "entry.h" |
41 | 45 | ||
42 | /* #define ALLOW_INIT_TRACING */ | 46 | /* #define ALLOW_INIT_TRACING */ |
@@ -1059,6 +1063,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) | |||
1059 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 1063 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
1060 | ret = tracehook_report_syscall_entry(regs); | 1064 | ret = tracehook_report_syscall_entry(regs); |
1061 | 1065 | ||
1066 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | ||
1067 | trace_sys_enter(regs, regs->u_regs[UREG_G1]); | ||
1068 | |||
1062 | if (unlikely(current->audit_context) && !ret) | 1069 | if (unlikely(current->audit_context) && !ret) |
1063 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? | 1070 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? |
1064 | AUDIT_ARCH_SPARC : | 1071 | AUDIT_ARCH_SPARC : |
@@ -1084,6 +1091,9 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs) | |||
1084 | audit_syscall_exit(result, regs->u_regs[UREG_I0]); | 1091 | audit_syscall_exit(result, regs->u_regs[UREG_I0]); |
1085 | } | 1092 | } |
1086 | 1093 | ||
1094 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | ||
1095 | trace_sys_exit(regs, regs->u_regs[UREG_G1]); | ||
1096 | |||
1087 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 1097 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
1088 | tracehook_report_syscall_exit(regs, 0); | 1098 | tracehook_report_syscall_exit(regs, 0); |
1089 | } | 1099 | } |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 21180339cb09..a2a79e76344f 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/setup.h> | 46 | #include <asm/setup.h> |
47 | #include <asm/mmu.h> | 47 | #include <asm/mmu.h> |
48 | #include <asm/ns87303.h> | 48 | #include <asm/ns87303.h> |
49 | #include <asm/btext.h> | ||
49 | 50 | ||
50 | #ifdef CONFIG_IP_PNP | 51 | #ifdef CONFIG_IP_PNP |
51 | #include <net/ipconfig.h> | 52 | #include <net/ipconfig.h> |
@@ -286,7 +287,10 @@ void __init setup_arch(char **cmdline_p) | |||
286 | parse_early_param(); | 287 | parse_early_param(); |
287 | 288 | ||
288 | boot_flags_init(*cmdline_p); | 289 | boot_flags_init(*cmdline_p); |
289 | register_console(&prom_early_console); | 290 | #ifdef CONFIG_EARLYFB |
291 | if (btext_find_display()) | ||
292 | #endif | ||
293 | register_console(&prom_early_console); | ||
290 | 294 | ||
291 | if (tlb_type == hypervisor) | 295 | if (tlb_type == hypervisor) |
292 | printk("ARCH: SUN4V\n"); | 296 | printk("ARCH: SUN4V\n"); |
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c index 132d81fb2616..91c10fb70858 100644 --- a/arch/sparc/kernel/smp_32.c +++ b/arch/sparc/kernel/smp_32.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/cacheflush.h> | 32 | #include <asm/cacheflush.h> |
33 | #include <asm/tlbflush.h> | 33 | #include <asm/tlbflush.h> |
34 | #include <asm/cpudata.h> | 34 | #include <asm/cpudata.h> |
35 | #include <asm/leon.h> | ||
35 | 36 | ||
36 | #include "irq.h" | 37 | #include "irq.h" |
37 | 38 | ||
@@ -96,6 +97,9 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
96 | case sun4d: | 97 | case sun4d: |
97 | smp4d_smp_done(); | 98 | smp4d_smp_done(); |
98 | break; | 99 | break; |
100 | case sparc_leon: | ||
101 | leon_smp_done(); | ||
102 | break; | ||
99 | case sun4e: | 103 | case sun4e: |
100 | printk("SUN4E\n"); | 104 | printk("SUN4E\n"); |
101 | BUG(); | 105 | BUG(); |
@@ -306,6 +310,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
306 | case sun4d: | 310 | case sun4d: |
307 | smp4d_boot_cpus(); | 311 | smp4d_boot_cpus(); |
308 | break; | 312 | break; |
313 | case sparc_leon: | ||
314 | leon_boot_cpus(); | ||
315 | break; | ||
309 | case sun4e: | 316 | case sun4e: |
310 | printk("SUN4E\n"); | 317 | printk("SUN4E\n"); |
311 | BUG(); | 318 | BUG(); |
@@ -376,6 +383,9 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
376 | case sun4d: | 383 | case sun4d: |
377 | ret = smp4d_boot_one_cpu(cpu); | 384 | ret = smp4d_boot_one_cpu(cpu); |
378 | break; | 385 | break; |
386 | case sparc_leon: | ||
387 | ret = leon_boot_one_cpu(cpu); | ||
388 | break; | ||
379 | case sun4e: | 389 | case sun4e: |
380 | printk("SUN4E\n"); | 390 | printk("SUN4E\n"); |
381 | BUG(); | 391 | BUG(); |
diff --git a/arch/sparc/kernel/sparc_ksyms_64.c b/arch/sparc/kernel/sparc_ksyms_64.c index 0f26066a08d9..372ad59c4cba 100644 --- a/arch/sparc/kernel/sparc_ksyms_64.c +++ b/arch/sparc/kernel/sparc_ksyms_64.c | |||
@@ -38,17 +38,5 @@ EXPORT_SYMBOL(sun4v_niagara_setperf); | |||
38 | EXPORT_SYMBOL(sun4v_niagara2_getperf); | 38 | EXPORT_SYMBOL(sun4v_niagara2_getperf); |
39 | EXPORT_SYMBOL(sun4v_niagara2_setperf); | 39 | EXPORT_SYMBOL(sun4v_niagara2_setperf); |
40 | 40 | ||
41 | #ifdef CONFIG_PCI | ||
42 | /* inline functions in asm/pci_64.h */ | ||
43 | EXPORT_SYMBOL(pci_alloc_consistent); | ||
44 | EXPORT_SYMBOL(pci_free_consistent); | ||
45 | EXPORT_SYMBOL(pci_map_single); | ||
46 | EXPORT_SYMBOL(pci_unmap_single); | ||
47 | EXPORT_SYMBOL(pci_map_sg); | ||
48 | EXPORT_SYMBOL(pci_unmap_sg); | ||
49 | EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); | ||
50 | EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); | ||
51 | #endif | ||
52 | |||
53 | /* Exporting a symbol from /init/main.c */ | 41 | /* Exporting a symbol from /init/main.c */ |
54 | EXPORT_SYMBOL(saved_command_line); | 42 | EXPORT_SYMBOL(saved_command_line); |
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index 04e28b2671c8..dc0ac197e7e2 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -26,11 +26,6 @@ | |||
26 | #include <linux/nfs_fs.h> | 26 | #include <linux/nfs_fs.h> |
27 | #include <linux/quota.h> | 27 | #include <linux/quota.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/sunrpc/svc.h> | ||
30 | #include <linux/nfsd/nfsd.h> | ||
31 | #include <linux/nfsd/cache.h> | ||
32 | #include <linux/nfsd/xdr.h> | ||
33 | #include <linux/nfsd/syscall.h> | ||
34 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
35 | #include <linux/personality.h> | 30 | #include <linux/personality.h> |
36 | #include <linux/stat.h> | 31 | #include <linux/stat.h> |
@@ -569,85 +564,6 @@ asmlinkage long sparc32_open(const char __user *filename, | |||
569 | return do_sys_open(AT_FDCWD, filename, flags, mode); | 564 | return do_sys_open(AT_FDCWD, filename, flags, mode); |
570 | } | 565 | } |
571 | 566 | ||
572 | extern unsigned long do_mremap(unsigned long addr, | ||
573 | unsigned long old_len, unsigned long new_len, | ||
574 | unsigned long flags, unsigned long new_addr); | ||
575 | |||
576 | asmlinkage unsigned long sys32_mremap(unsigned long addr, | ||
577 | unsigned long old_len, unsigned long new_len, | ||
578 | unsigned long flags, u32 __new_addr) | ||
579 | { | ||
580 | unsigned long ret = -EINVAL; | ||
581 | unsigned long new_addr = __new_addr; | ||
582 | |||
583 | if (unlikely(sparc_mmap_check(addr, old_len))) | ||
584 | goto out; | ||
585 | if (unlikely(sparc_mmap_check(new_addr, new_len))) | ||
586 | goto out; | ||
587 | down_write(¤t->mm->mmap_sem); | ||
588 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); | ||
589 | up_write(¤t->mm->mmap_sem); | ||
590 | out: | ||
591 | return ret; | ||
592 | } | ||
593 | |||
594 | struct __sysctl_args32 { | ||
595 | u32 name; | ||
596 | int nlen; | ||
597 | u32 oldval; | ||
598 | u32 oldlenp; | ||
599 | u32 newval; | ||
600 | u32 newlen; | ||
601 | u32 __unused[4]; | ||
602 | }; | ||
603 | |||
604 | asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | ||
605 | { | ||
606 | #ifndef CONFIG_SYSCTL_SYSCALL | ||
607 | return -ENOSYS; | ||
608 | #else | ||
609 | struct __sysctl_args32 tmp; | ||
610 | int error; | ||
611 | size_t oldlen, __user *oldlenp = NULL; | ||
612 | unsigned long addr = (((unsigned long)&args->__unused[0]) + 7UL) & ~7UL; | ||
613 | |||
614 | if (copy_from_user(&tmp, args, sizeof(tmp))) | ||
615 | return -EFAULT; | ||
616 | |||
617 | if (tmp.oldval && tmp.oldlenp) { | ||
618 | /* Duh, this is ugly and might not work if sysctl_args | ||
619 | is in read-only memory, but do_sysctl does indirectly | ||
620 | a lot of uaccess in both directions and we'd have to | ||
621 | basically copy the whole sysctl.c here, and | ||
622 | glibc's __sysctl uses rw memory for the structure | ||
623 | anyway. */ | ||
624 | if (get_user(oldlen, (u32 __user *)(unsigned long)tmp.oldlenp) || | ||
625 | put_user(oldlen, (size_t __user *)addr)) | ||
626 | return -EFAULT; | ||
627 | oldlenp = (size_t __user *)addr; | ||
628 | } | ||
629 | |||
630 | lock_kernel(); | ||
631 | error = do_sysctl((int __user *)(unsigned long) tmp.name, | ||
632 | tmp.nlen, | ||
633 | (void __user *)(unsigned long) tmp.oldval, | ||
634 | oldlenp, | ||
635 | (void __user *)(unsigned long) tmp.newval, | ||
636 | tmp.newlen); | ||
637 | unlock_kernel(); | ||
638 | if (oldlenp) { | ||
639 | if (!error) { | ||
640 | if (get_user(oldlen, (size_t __user *)addr) || | ||
641 | put_user(oldlen, (u32 __user *)(unsigned long) tmp.oldlenp)) | ||
642 | error = -EFAULT; | ||
643 | } | ||
644 | if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused))) | ||
645 | error = -EFAULT; | ||
646 | } | ||
647 | return error; | ||
648 | #endif | ||
649 | } | ||
650 | |||
651 | long sys32_lookup_dcookie(unsigned long cookie_high, | 567 | long sys32_lookup_dcookie(unsigned long cookie_high, |
652 | unsigned long cookie_low, | 568 | unsigned long cookie_low, |
653 | char __user *buf, size_t len) | 569 | char __user *buf, size_t len) |
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c index 03035c852a43..3a82e65d8db2 100644 --- a/arch/sparc/kernel/sys_sparc_32.c +++ b/arch/sparc/kernel/sys_sparc_32.c | |||
@@ -45,7 +45,8 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi | |||
45 | /* We do not accept a shared mapping if it would violate | 45 | /* We do not accept a shared mapping if it would violate |
46 | * cache aliasing constraints. | 46 | * cache aliasing constraints. |
47 | */ | 47 | */ |
48 | if ((flags & MAP_SHARED) && (addr & (SHMLBA - 1))) | 48 | if ((flags & MAP_SHARED) && |
49 | ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) | ||
49 | return -EINVAL; | 50 | return -EINVAL; |
50 | return addr; | 51 | return addr; |
51 | } | 52 | } |
@@ -79,15 +80,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi | |||
79 | } | 80 | } |
80 | } | 81 | } |
81 | 82 | ||
82 | asmlinkage unsigned long sparc_brk(unsigned long brk) | ||
83 | { | ||
84 | if(ARCH_SUN4C) { | ||
85 | if ((brk & 0xe0000000) != (current->mm->brk & 0xe0000000)) | ||
86 | return current->mm->brk; | ||
87 | } | ||
88 | return sys_brk(brk); | ||
89 | } | ||
90 | |||
91 | /* | 83 | /* |
92 | * sys_pipe() is the normal C calling standard for creating | 84 | * sys_pipe() is the normal C calling standard for creating |
93 | * a pipe. It's not the way unix traditionally does this, though. | 85 | * a pipe. It's not the way unix traditionally does this, though. |
@@ -234,31 +226,6 @@ int sparc_mmap_check(unsigned long addr, unsigned long len) | |||
234 | } | 226 | } |
235 | 227 | ||
236 | /* Linux version of mmap */ | 228 | /* Linux version of mmap */ |
237 | static unsigned long do_mmap2(unsigned long addr, unsigned long len, | ||
238 | unsigned long prot, unsigned long flags, unsigned long fd, | ||
239 | unsigned long pgoff) | ||
240 | { | ||
241 | struct file * file = NULL; | ||
242 | unsigned long retval = -EBADF; | ||
243 | |||
244 | if (!(flags & MAP_ANONYMOUS)) { | ||
245 | file = fget(fd); | ||
246 | if (!file) | ||
247 | goto out; | ||
248 | } | ||
249 | |||
250 | len = PAGE_ALIGN(len); | ||
251 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
252 | |||
253 | down_write(¤t->mm->mmap_sem); | ||
254 | retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
255 | up_write(¤t->mm->mmap_sem); | ||
256 | |||
257 | if (file) | ||
258 | fput(file); | ||
259 | out: | ||
260 | return retval; | ||
261 | } | ||
262 | 229 | ||
263 | asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, | 230 | asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, |
264 | unsigned long prot, unsigned long flags, unsigned long fd, | 231 | unsigned long prot, unsigned long flags, unsigned long fd, |
@@ -266,14 +233,16 @@ asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, | |||
266 | { | 233 | { |
267 | /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE | 234 | /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE |
268 | we have. */ | 235 | we have. */ |
269 | return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT - 12)); | 236 | return sys_mmap_pgoff(addr, len, prot, flags, fd, |
237 | pgoff >> (PAGE_SHIFT - 12)); | ||
270 | } | 238 | } |
271 | 239 | ||
272 | asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, | 240 | asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, |
273 | unsigned long prot, unsigned long flags, unsigned long fd, | 241 | unsigned long prot, unsigned long flags, unsigned long fd, |
274 | unsigned long off) | 242 | unsigned long off) |
275 | { | 243 | { |
276 | return do_mmap2(addr, len, prot, flags, fd, off >> PAGE_SHIFT); | 244 | /* no alignment check? */ |
245 | return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); | ||
277 | } | 246 | } |
278 | 247 | ||
279 | long sparc_remap_file_pages(unsigned long start, unsigned long size, | 248 | long sparc_remap_file_pages(unsigned long start, unsigned long size, |
@@ -287,27 +256,6 @@ long sparc_remap_file_pages(unsigned long start, unsigned long size, | |||
287 | (pgoff >> (PAGE_SHIFT - 12)), flags); | 256 | (pgoff >> (PAGE_SHIFT - 12)), flags); |
288 | } | 257 | } |
289 | 258 | ||
290 | extern unsigned long do_mremap(unsigned long addr, | ||
291 | unsigned long old_len, unsigned long new_len, | ||
292 | unsigned long flags, unsigned long new_addr); | ||
293 | |||
294 | asmlinkage unsigned long sparc_mremap(unsigned long addr, | ||
295 | unsigned long old_len, unsigned long new_len, | ||
296 | unsigned long flags, unsigned long new_addr) | ||
297 | { | ||
298 | unsigned long ret = -EINVAL; | ||
299 | |||
300 | if (unlikely(sparc_mmap_check(addr, old_len))) | ||
301 | goto out; | ||
302 | if (unlikely(sparc_mmap_check(new_addr, new_len))) | ||
303 | goto out; | ||
304 | down_write(¤t->mm->mmap_sem); | ||
305 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); | ||
306 | up_write(¤t->mm->mmap_sem); | ||
307 | out: | ||
308 | return ret; | ||
309 | } | ||
310 | |||
311 | /* we come to here via sys_nis_syscall so it can setup the regs argument */ | 259 | /* we come to here via sys_nis_syscall so it can setup the regs argument */ |
312 | asmlinkage unsigned long | 260 | asmlinkage unsigned long |
313 | c_sys_nis_syscall (struct pt_regs *regs) | 261 | c_sys_nis_syscall (struct pt_regs *regs) |
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index e2d102447a43..cfa0e19abe3b 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -317,10 +317,14 @@ bottomup: | |||
317 | unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) | 317 | unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) |
318 | { | 318 | { |
319 | unsigned long align_goal, addr = -ENOMEM; | 319 | unsigned long align_goal, addr = -ENOMEM; |
320 | unsigned long (*get_area)(struct file *, unsigned long, | ||
321 | unsigned long, unsigned long, unsigned long); | ||
322 | |||
323 | get_area = current->mm->get_unmapped_area; | ||
320 | 324 | ||
321 | if (flags & MAP_FIXED) { | 325 | if (flags & MAP_FIXED) { |
322 | /* Ok, don't mess with it. */ | 326 | /* Ok, don't mess with it. */ |
323 | return get_unmapped_area(NULL, orig_addr, len, pgoff, flags); | 327 | return get_area(NULL, orig_addr, len, pgoff, flags); |
324 | } | 328 | } |
325 | flags &= ~MAP_SHARED; | 329 | flags &= ~MAP_SHARED; |
326 | 330 | ||
@@ -333,7 +337,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u | |||
333 | align_goal = (64UL * 1024); | 337 | align_goal = (64UL * 1024); |
334 | 338 | ||
335 | do { | 339 | do { |
336 | addr = get_unmapped_area(NULL, orig_addr, len + (align_goal - PAGE_SIZE), pgoff, flags); | 340 | addr = get_area(NULL, orig_addr, len + (align_goal - PAGE_SIZE), pgoff, flags); |
337 | if (!(addr & ~PAGE_MASK)) { | 341 | if (!(addr & ~PAGE_MASK)) { |
338 | addr = (addr + (align_goal - 1UL)) & ~(align_goal - 1UL); | 342 | addr = (addr + (align_goal - 1UL)) & ~(align_goal - 1UL); |
339 | break; | 343 | break; |
@@ -351,7 +355,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u | |||
351 | * be obtained. | 355 | * be obtained. |
352 | */ | 356 | */ |
353 | if (addr & ~PAGE_MASK) | 357 | if (addr & ~PAGE_MASK) |
354 | addr = get_unmapped_area(NULL, orig_addr, len, pgoff, flags); | 358 | addr = get_area(NULL, orig_addr, len, pgoff, flags); |
355 | 359 | ||
356 | return addr; | 360 | return addr; |
357 | } | 361 | } |
@@ -399,18 +403,6 @@ void arch_pick_mmap_layout(struct mm_struct *mm) | |||
399 | } | 403 | } |
400 | } | 404 | } |
401 | 405 | ||
402 | SYSCALL_DEFINE1(sparc_brk, unsigned long, brk) | ||
403 | { | ||
404 | /* People could try to be nasty and use ta 0x6d in 32bit programs */ | ||
405 | if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32) | ||
406 | return current->mm->brk; | ||
407 | |||
408 | if (unlikely(straddles_64bit_va_hole(current->mm->brk, brk))) | ||
409 | return current->mm->brk; | ||
410 | |||
411 | return sys_brk(brk); | ||
412 | } | ||
413 | |||
414 | /* | 406 | /* |
415 | * sys_pipe() is the normal C calling standard for creating | 407 | * sys_pipe() is the normal C calling standard for creating |
416 | * a pipe. It's not the way unix traditionally does this, though. | 408 | * a pipe. It's not the way unix traditionally does this, though. |
@@ -568,23 +560,13 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | |||
568 | unsigned long, prot, unsigned long, flags, unsigned long, fd, | 560 | unsigned long, prot, unsigned long, flags, unsigned long, fd, |
569 | unsigned long, off) | 561 | unsigned long, off) |
570 | { | 562 | { |
571 | struct file * file = NULL; | 563 | unsigned long retval = -EINVAL; |
572 | unsigned long retval = -EBADF; | ||
573 | |||
574 | if (!(flags & MAP_ANONYMOUS)) { | ||
575 | file = fget(fd); | ||
576 | if (!file) | ||
577 | goto out; | ||
578 | } | ||
579 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
580 | len = PAGE_ALIGN(len); | ||
581 | 564 | ||
582 | down_write(¤t->mm->mmap_sem); | 565 | if ((off + PAGE_ALIGN(len)) < off) |
583 | retval = do_mmap(file, addr, len, prot, flags, off); | 566 | goto out; |
584 | up_write(¤t->mm->mmap_sem); | 567 | if (off & ~PAGE_MASK) |
585 | 568 | goto out; | |
586 | if (file) | 569 | retval = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); |
587 | fput(file); | ||
588 | out: | 570 | out: |
589 | return retval; | 571 | return retval; |
590 | } | 572 | } |
@@ -614,12 +596,6 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len, | |||
614 | 596 | ||
615 | if (test_thread_flag(TIF_32BIT)) | 597 | if (test_thread_flag(TIF_32BIT)) |
616 | goto out; | 598 | goto out; |
617 | if (unlikely(new_len >= VA_EXCLUDE_START)) | ||
618 | goto out; | ||
619 | if (unlikely(sparc_mmap_check(addr, old_len))) | ||
620 | goto out; | ||
621 | if (unlikely(sparc_mmap_check(new_addr, new_len))) | ||
622 | goto out; | ||
623 | 599 | ||
624 | down_write(¤t->mm->mmap_sem); | 600 | down_write(¤t->mm->mmap_sem); |
625 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); | 601 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); |
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S index d150c2aa98d2..dc4a458f74dc 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S | |||
@@ -62,7 +62,7 @@ sys32_rt_sigreturn: | |||
62 | #endif | 62 | #endif |
63 | .align 32 | 63 | .align 32 |
64 | 1: ldx [%g6 + TI_FLAGS], %l5 | 64 | 1: ldx [%g6 + TI_FLAGS], %l5 |
65 | andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | 65 | andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 |
66 | be,pt %icc, rtrap | 66 | be,pt %icc, rtrap |
67 | nop | 67 | nop |
68 | call syscall_trace_leave | 68 | call syscall_trace_leave |
@@ -187,7 +187,7 @@ linux_syscall_trace: | |||
187 | .globl linux_sparc_syscall32 | 187 | .globl linux_sparc_syscall32 |
188 | linux_sparc_syscall32: | 188 | linux_sparc_syscall32: |
189 | /* Direct access to user regs, much faster. */ | 189 | /* Direct access to user regs, much faster. */ |
190 | cmp %g1, NR_SYSCALLS ! IEU1 Group | 190 | cmp %g1, NR_syscalls ! IEU1 Group |
191 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | 191 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI |
192 | srl %i0, 0, %o0 ! IEU0 | 192 | srl %i0, 0, %o0 ! IEU0 |
193 | sll %g1, 2, %l4 ! IEU0 Group | 193 | sll %g1, 2, %l4 ! IEU0 Group |
@@ -198,7 +198,7 @@ linux_sparc_syscall32: | |||
198 | 198 | ||
199 | srl %i5, 0, %o5 ! IEU1 | 199 | srl %i5, 0, %o5 ! IEU1 |
200 | srl %i2, 0, %o2 ! IEU0 Group | 200 | srl %i2, 0, %o2 ! IEU0 Group |
201 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | 201 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 |
202 | bne,pn %icc, linux_syscall_trace32 ! CTI | 202 | bne,pn %icc, linux_syscall_trace32 ! CTI |
203 | mov %i0, %l5 ! IEU1 | 203 | mov %i0, %l5 ! IEU1 |
204 | call %l7 ! CTI Group brk forced | 204 | call %l7 ! CTI Group brk forced |
@@ -210,7 +210,7 @@ linux_sparc_syscall32: | |||
210 | .globl linux_sparc_syscall | 210 | .globl linux_sparc_syscall |
211 | linux_sparc_syscall: | 211 | linux_sparc_syscall: |
212 | /* Direct access to user regs, much faster. */ | 212 | /* Direct access to user regs, much faster. */ |
213 | cmp %g1, NR_SYSCALLS ! IEU1 Group | 213 | cmp %g1, NR_syscalls ! IEU1 Group |
214 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | 214 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI |
215 | mov %i0, %o0 ! IEU0 | 215 | mov %i0, %o0 ! IEU0 |
216 | sll %g1, 2, %l4 ! IEU0 Group | 216 | sll %g1, 2, %l4 ! IEU0 Group |
@@ -221,7 +221,7 @@ linux_sparc_syscall: | |||
221 | 221 | ||
222 | mov %i3, %o3 ! IEU1 | 222 | mov %i3, %o3 ! IEU1 |
223 | mov %i4, %o4 ! IEU0 Group | 223 | mov %i4, %o4 ! IEU0 Group |
224 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | 224 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 |
225 | bne,pn %icc, linux_syscall_trace ! CTI Group | 225 | bne,pn %icc, linux_syscall_trace ! CTI Group |
226 | mov %i0, %l5 ! IEU0 | 226 | mov %i0, %l5 ! IEU0 |
227 | 2: call %l7 ! CTI Group brk forced | 227 | 2: call %l7 ! CTI Group brk forced |
@@ -245,7 +245,7 @@ ret_sys_call: | |||
245 | 245 | ||
246 | cmp %o0, -ERESTART_RESTARTBLOCK | 246 | cmp %o0, -ERESTART_RESTARTBLOCK |
247 | bgeu,pn %xcc, 1f | 247 | bgeu,pn %xcc, 1f |
248 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 | 248 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6 |
249 | 80: | 249 | 80: |
250 | /* System call success, clear Carry condition code. */ | 250 | /* System call success, clear Carry condition code. */ |
251 | andn %g3, %g2, %g3 | 251 | andn %g3, %g2, %g3 |
@@ -260,7 +260,7 @@ ret_sys_call: | |||
260 | /* System call failure, set Carry condition code. | 260 | /* System call failure, set Carry condition code. |
261 | * Also, get abs(errno) to return to the process. | 261 | * Also, get abs(errno) to return to the process. |
262 | */ | 262 | */ |
263 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 | 263 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6 |
264 | sub %g0, %o0, %o0 | 264 | sub %g0, %o0, %o0 |
265 | or %g3, %g2, %g3 | 265 | or %g3, %g2, %g3 |
266 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 266 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h index a63c5d2d9849..d2f999ae2b85 100644 --- a/arch/sparc/kernel/systbls.h +++ b/arch/sparc/kernel/systbls.h | |||
@@ -9,7 +9,6 @@ | |||
9 | struct new_utsname; | 9 | struct new_utsname; |
10 | 10 | ||
11 | extern asmlinkage unsigned long sys_getpagesize(void); | 11 | extern asmlinkage unsigned long sys_getpagesize(void); |
12 | extern asmlinkage unsigned long sparc_brk(unsigned long brk); | ||
13 | extern asmlinkage long sparc_pipe(struct pt_regs *regs); | 12 | extern asmlinkage long sparc_pipe(struct pt_regs *regs); |
14 | extern asmlinkage long sys_ipc(unsigned int call, int first, | 13 | extern asmlinkage long sys_ipc(unsigned int call, int first, |
15 | unsigned long second, | 14 | unsigned long second, |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 0f1658d37490..801fc8e5a0e8 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -19,7 +19,7 @@ sys_call_table: | |||
19 | /*0*/ .long sys_restart_syscall, sys_exit, sys_fork, sys_read, sys_write | 19 | /*0*/ .long sys_restart_syscall, sys_exit, sys_fork, sys_read, sys_write |
20 | /*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link | 20 | /*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link |
21 | /*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod | 21 | /*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod |
22 | /*15*/ .long sys_chmod, sys_lchown16, sparc_brk, sys_nis_syscall, sys_lseek | 22 | /*15*/ .long sys_chmod, sys_lchown16, sys_brk, sys_nis_syscall, sys_lseek |
23 | /*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 | 23 | /*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 |
24 | /*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause | 24 | /*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause |
25 | /*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice | 25 | /*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice |
@@ -67,7 +67,7 @@ sys_call_table: | |||
67 | /*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall | 67 | /*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall |
68 | /*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler | 68 | /*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler |
69 | /*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep | 69 | /*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep |
70 | /*250*/ .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl | 70 | /*250*/ .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl |
71 | /*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep | 71 | /*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep |
72 | /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun | 72 | /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun |
73 | /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy | 73 | /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy |
@@ -82,5 +82,5 @@ sys_call_table: | |||
82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg |
86 | 86 | ||
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 009825f6e73c..e575b46bd7a9 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -21,7 +21,7 @@ sys_call_table32: | |||
21 | /*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write | 21 | /*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write |
22 | /*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link | 22 | /*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link |
23 | /*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod | 23 | /*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod |
24 | /*15*/ .word sys_chmod, sys_lchown16, sys_sparc_brk, sys32_perfctr, sys32_lseek | 24 | /*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys32_perfctr, sys32_lseek |
25 | /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 | 25 | /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 |
26 | /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause | 26 | /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause |
27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice | 27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice |
@@ -68,7 +68,7 @@ sys_call_table32: | |||
68 | .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall | 68 | .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall |
69 | /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler | 69 | /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler |
70 | .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep | 70 | .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep |
71 | /*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl | 71 | /*250*/ .word sys_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl |
72 | .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep | 72 | .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep |
73 | /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun | 73 | /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun |
74 | .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy | 74 | .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy |
@@ -83,7 +83,7 @@ sys_call_table32: | |||
83 | /*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate | 83 | /*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate |
84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv |
86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg |
87 | 87 | ||
88 | #endif /* CONFIG_COMPAT */ | 88 | #endif /* CONFIG_COMPAT */ |
89 | 89 | ||
@@ -96,7 +96,7 @@ sys_call_table: | |||
96 | /*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write | 96 | /*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write |
97 | /*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link | 97 | /*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link |
98 | /*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod | 98 | /*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod |
99 | /*15*/ .word sys_chmod, sys_lchown, sys_sparc_brk, sys_perfctr, sys_lseek | 99 | /*15*/ .word sys_chmod, sys_lchown, sys_brk, sys_perfctr, sys_lseek |
100 | /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid | 100 | /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid |
101 | /*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall | 101 | /*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall |
102 | /*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice | 102 | /*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice |
@@ -158,4 +158,4 @@ sys_call_table: | |||
158 | /*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 158 | /*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
159 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 159 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
160 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 160 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
161 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open | 161 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg |
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 614ac7b4a9dd..5b2f595fe65b 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -210,9 +210,6 @@ static void __init sbus_time_init(void) | |||
210 | btfixup(); | 210 | btfixup(); |
211 | 211 | ||
212 | sparc_init_timers(timer_interrupt); | 212 | sparc_init_timers(timer_interrupt); |
213 | |||
214 | /* Now that OBP ticker has been silenced, it is safe to enable IRQ. */ | ||
215 | local_irq_enable(); | ||
216 | } | 213 | } |
217 | 214 | ||
218 | void __init time_init(void) | 215 | void __init time_init(void) |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index da1218e8ee87..67e165102885 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -774,26 +774,9 @@ void __devinit setup_sparc64_timer(void) | |||
774 | static struct clocksource clocksource_tick = { | 774 | static struct clocksource clocksource_tick = { |
775 | .rating = 100, | 775 | .rating = 100, |
776 | .mask = CLOCKSOURCE_MASK(64), | 776 | .mask = CLOCKSOURCE_MASK(64), |
777 | .shift = 16, | ||
778 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 777 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
779 | }; | 778 | }; |
780 | 779 | ||
781 | static void __init setup_clockevent_multiplier(unsigned long hz) | ||
782 | { | ||
783 | unsigned long mult, shift = 32; | ||
784 | |||
785 | while (1) { | ||
786 | mult = div_sc(hz, NSEC_PER_SEC, shift); | ||
787 | if (mult && (mult >> 32UL) == 0UL) | ||
788 | break; | ||
789 | |||
790 | shift--; | ||
791 | } | ||
792 | |||
793 | sparc64_clockevent.shift = shift; | ||
794 | sparc64_clockevent.mult = mult; | ||
795 | } | ||
796 | |||
797 | static unsigned long tb_ticks_per_usec __read_mostly; | 780 | static unsigned long tb_ticks_per_usec __read_mostly; |
798 | 781 | ||
799 | void __delay(unsigned long loops) | 782 | void __delay(unsigned long loops) |
@@ -828,9 +811,7 @@ void __init time_init(void) | |||
828 | clocksource_hz2mult(freq, SPARC64_NSEC_PER_CYC_SHIFT); | 811 | clocksource_hz2mult(freq, SPARC64_NSEC_PER_CYC_SHIFT); |
829 | 812 | ||
830 | clocksource_tick.name = tick_ops->name; | 813 | clocksource_tick.name = tick_ops->name; |
831 | clocksource_tick.mult = | 814 | clocksource_calc_mult_shift(&clocksource_tick, freq, 4); |
832 | clocksource_hz2mult(freq, | ||
833 | clocksource_tick.shift); | ||
834 | clocksource_tick.read = clocksource_tick_read; | 815 | clocksource_tick.read = clocksource_tick_read; |
835 | 816 | ||
836 | printk("clocksource: mult[%x] shift[%d]\n", | 817 | printk("clocksource: mult[%x] shift[%d]\n", |
@@ -839,15 +820,14 @@ void __init time_init(void) | |||
839 | clocksource_register(&clocksource_tick); | 820 | clocksource_register(&clocksource_tick); |
840 | 821 | ||
841 | sparc64_clockevent.name = tick_ops->name; | 822 | sparc64_clockevent.name = tick_ops->name; |
842 | 823 | clockevents_calc_mult_shift(&sparc64_clockevent, freq, 4); | |
843 | setup_clockevent_multiplier(freq); | ||
844 | 824 | ||
845 | sparc64_clockevent.max_delta_ns = | 825 | sparc64_clockevent.max_delta_ns = |
846 | clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent); | 826 | clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent); |
847 | sparc64_clockevent.min_delta_ns = | 827 | sparc64_clockevent.min_delta_ns = |
848 | clockevent_delta2ns(0xF, &sparc64_clockevent); | 828 | clockevent_delta2ns(0xF, &sparc64_clockevent); |
849 | 829 | ||
850 | printk("clockevent: mult[%lx] shift[%d]\n", | 830 | printk("clockevent: mult[%x] shift[%d]\n", |
851 | sparc64_clockevent.mult, sparc64_clockevent.shift); | 831 | sparc64_clockevent.mult, sparc64_clockevent.shift); |
852 | 832 | ||
853 | setup_sparc64_timer(); | 833 | setup_sparc64_timer(); |
diff --git a/arch/sparc/kernel/trampoline_32.S b/arch/sparc/kernel/trampoline_32.S index 5e235c52d667..691f484e03b3 100644 --- a/arch/sparc/kernel/trampoline_32.S +++ b/arch/sparc/kernel/trampoline_32.S | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/contregs.h> | 15 | #include <asm/contregs.h> |
16 | #include <asm/thread_info.h> | 16 | #include <asm/thread_info.h> |
17 | 17 | ||
18 | .globl sun4m_cpu_startup, __smp4m_processor_id | 18 | .globl sun4m_cpu_startup, __smp4m_processor_id, __leon_processor_id |
19 | .globl sun4d_cpu_startup, __smp4d_processor_id | 19 | .globl sun4d_cpu_startup, __smp4d_processor_id |
20 | 20 | ||
21 | __CPUINIT | 21 | __CPUINIT |
@@ -106,6 +106,12 @@ __smp4d_processor_id: | |||
106 | retl | 106 | retl |
107 | mov %g1, %o7 | 107 | mov %g1, %o7 |
108 | 108 | ||
109 | __leon_processor_id: | ||
110 | rd %asr17,%g2 | ||
111 | srl %g2,28,%g2 | ||
112 | retl | ||
113 | mov %g1, %o7 | ||
114 | |||
109 | /* CPUID in bootbus can be found at PA 0xff0140000 */ | 115 | /* CPUID in bootbus can be found at PA 0xff0140000 */ |
110 | #define SUN4D_BOOTBUS_CPUID 0xf0140000 | 116 | #define SUN4D_BOOTBUS_CPUID 0xf0140000 |
111 | 117 | ||
@@ -160,3 +166,64 @@ sun4d_cpu_startup: | |||
160 | nop | 166 | nop |
161 | 167 | ||
162 | b,a smp_do_cpu_idle | 168 | b,a smp_do_cpu_idle |
169 | |||
170 | #ifdef CONFIG_SPARC_LEON | ||
171 | |||
172 | __CPUINIT | ||
173 | .align 4 | ||
174 | .global leon_smp_cpu_startup, smp_penguin_ctable | ||
175 | |||
176 | leon_smp_cpu_startup: | ||
177 | |||
178 | set smp_penguin_ctable,%g1 | ||
179 | ld [%g1+4],%g1 | ||
180 | srl %g1,4,%g1 | ||
181 | set 0x00000100,%g5 /* SRMMU_CTXTBL_PTR */ | ||
182 | sta %g1, [%g5] ASI_M_MMUREGS | ||
183 | |||
184 | /* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */ | ||
185 | set (PSR_PIL | PSR_S | PSR_PS), %g1 | ||
186 | wr %g1, 0x0, %psr ! traps off though | ||
187 | WRITE_PAUSE | ||
188 | |||
189 | /* Our %wim is one behind CWP */ | ||
190 | mov 2, %g1 | ||
191 | wr %g1, 0x0, %wim | ||
192 | WRITE_PAUSE | ||
193 | |||
194 | /* Set tbr - we use just one trap table. */ | ||
195 | set trapbase, %g1 | ||
196 | wr %g1, 0x0, %tbr | ||
197 | WRITE_PAUSE | ||
198 | |||
199 | /* Get our CPU id */ | ||
200 | rd %asr17,%g3 | ||
201 | |||
202 | /* Give ourselves a stack and curptr. */ | ||
203 | set current_set, %g5 | ||
204 | srl %g3, 28, %g4 | ||
205 | sll %g4, 2, %g4 | ||
206 | ld [%g5 + %g4], %g6 | ||
207 | |||
208 | sethi %hi(THREAD_SIZE - STACKFRAME_SZ), %sp | ||
209 | or %sp, %lo(THREAD_SIZE - STACKFRAME_SZ), %sp | ||
210 | add %g6, %sp, %sp | ||
211 | |||
212 | /* Turn on traps (PSR_ET). */ | ||
213 | rd %psr, %g1 | ||
214 | wr %g1, PSR_ET, %psr ! traps on | ||
215 | WRITE_PAUSE | ||
216 | |||
217 | /* Init our caches, etc. */ | ||
218 | set poke_srmmu, %g5 | ||
219 | ld [%g5], %g5 | ||
220 | call %g5 | ||
221 | nop | ||
222 | |||
223 | /* Start this processor. */ | ||
224 | call leon_callin | ||
225 | nop | ||
226 | |||
227 | b,a smp_do_cpu_idle | ||
228 | |||
229 | #endif | ||
diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c index 6b1e6cde6fff..f8514e291e15 100644 --- a/arch/sparc/kernel/unaligned_32.c +++ b/arch/sparc/kernel/unaligned_32.c | |||
@@ -17,8 +17,7 @@ | |||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | 20 | #include <linux/perf_event.h> | |
21 | /* #define DEBUG_MNA */ | ||
22 | 21 | ||
23 | enum direction { | 22 | enum direction { |
24 | load, /* ld, ldd, ldh, ldsh */ | 23 | load, /* ld, ldd, ldh, ldsh */ |
@@ -29,12 +28,6 @@ enum direction { | |||
29 | invalid, | 28 | invalid, |
30 | }; | 29 | }; |
31 | 30 | ||
32 | #ifdef DEBUG_MNA | ||
33 | static char *dirstrings[] = { | ||
34 | "load", "store", "both", "fpload", "fpstore", "invalid" | ||
35 | }; | ||
36 | #endif | ||
37 | |||
38 | static inline enum direction decode_direction(unsigned int insn) | 31 | static inline enum direction decode_direction(unsigned int insn) |
39 | { | 32 | { |
40 | unsigned long tmp = (insn >> 21) & 1; | 33 | unsigned long tmp = (insn >> 21) & 1; |
@@ -255,10 +248,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
255 | unsigned long addr = compute_effective_address(regs, insn); | 248 | unsigned long addr = compute_effective_address(regs, insn); |
256 | int err; | 249 | int err; |
257 | 250 | ||
258 | #ifdef DEBUG_MNA | 251 | perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, addr); |
259 | printk("KMNA: pc=%08lx [dir=%s addr=%08lx size=%d] retpc[%08lx]\n", | ||
260 | regs->pc, dirstrings[dir], addr, size, regs->u_regs[UREG_RETPC]); | ||
261 | #endif | ||
262 | switch (dir) { | 252 | switch (dir) { |
263 | case load: | 253 | case load: |
264 | err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), | 254 | err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), |
@@ -350,6 +340,7 @@ asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
350 | } | 340 | } |
351 | 341 | ||
352 | addr = compute_effective_address(regs, insn); | 342 | addr = compute_effective_address(regs, insn); |
343 | perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, addr); | ||
353 | switch(dir) { | 344 | switch(dir) { |
354 | case load: | 345 | case load: |
355 | err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), | 346 | err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), |
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c index 379209982a07..378ca82b9ccc 100644 --- a/arch/sparc/kernel/unaligned_64.c +++ b/arch/sparc/kernel/unaligned_64.c | |||
@@ -20,10 +20,9 @@ | |||
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
23 | #include <linux/perf_event.h> | ||
23 | #include <asm/fpumacro.h> | 24 | #include <asm/fpumacro.h> |
24 | 25 | ||
25 | /* #define DEBUG_MNA */ | ||
26 | |||
27 | enum direction { | 26 | enum direction { |
28 | load, /* ld, ldd, ldh, ldsh */ | 27 | load, /* ld, ldd, ldh, ldsh */ |
29 | store, /* st, std, sth, stsh */ | 28 | store, /* st, std, sth, stsh */ |
@@ -33,12 +32,6 @@ enum direction { | |||
33 | invalid, | 32 | invalid, |
34 | }; | 33 | }; |
35 | 34 | ||
36 | #ifdef DEBUG_MNA | ||
37 | static char *dirstrings[] = { | ||
38 | "load", "store", "both", "fpload", "fpstore", "invalid" | ||
39 | }; | ||
40 | #endif | ||
41 | |||
42 | static inline enum direction decode_direction(unsigned int insn) | 35 | static inline enum direction decode_direction(unsigned int insn) |
43 | { | 36 | { |
44 | unsigned long tmp = (insn >> 21) & 1; | 37 | unsigned long tmp = (insn >> 21) & 1; |
@@ -327,12 +320,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
327 | 320 | ||
328 | addr = compute_effective_address(regs, insn, | 321 | addr = compute_effective_address(regs, insn, |
329 | ((insn >> 25) & 0x1f)); | 322 | ((insn >> 25) & 0x1f)); |
330 | #ifdef DEBUG_MNA | 323 | perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, addr); |
331 | printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] " | ||
332 | "retpc[%016lx]\n", | ||
333 | regs->tpc, dirstrings[dir], addr, size, | ||
334 | regs->u_regs[UREG_RETPC]); | ||
335 | #endif | ||
336 | switch (asi) { | 324 | switch (asi) { |
337 | case ASI_NL: | 325 | case ASI_NL: |
338 | case ASI_AIUPL: | 326 | case ASI_AIUPL: |
@@ -399,6 +387,7 @@ int handle_popc(u32 insn, struct pt_regs *regs) | |||
399 | int ret, i, rd = ((insn >> 25) & 0x1f); | 387 | int ret, i, rd = ((insn >> 25) & 0x1f); |
400 | int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; | 388 | int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; |
401 | 389 | ||
390 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0); | ||
402 | if (insn & 0x2000) { | 391 | if (insn & 0x2000) { |
403 | maybe_flush_windows(0, 0, rd, from_kernel); | 392 | maybe_flush_windows(0, 0, rd, from_kernel); |
404 | value = sign_extend_imm13(insn); | 393 | value = sign_extend_imm13(insn); |
@@ -445,6 +434,8 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs) | |||
445 | int asi = decode_asi(insn, regs); | 434 | int asi = decode_asi(insn, regs); |
446 | int flag = (freg < 32) ? FPRS_DL : FPRS_DU; | 435 | int flag = (freg < 32) ? FPRS_DL : FPRS_DU; |
447 | 436 | ||
437 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0); | ||
438 | |||
448 | save_and_clear_fpu(); | 439 | save_and_clear_fpu(); |
449 | current_thread_info()->xfsr[0] &= ~0x1c000; | 440 | current_thread_info()->xfsr[0] &= ~0x1c000; |
450 | if (freg & 3) { | 441 | if (freg & 3) { |
@@ -566,6 +557,8 @@ void handle_ld_nf(u32 insn, struct pt_regs *regs) | |||
566 | int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; | 557 | int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; |
567 | unsigned long *reg; | 558 | unsigned long *reg; |
568 | 559 | ||
560 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0); | ||
561 | |||
569 | maybe_flush_windows(0, 0, rd, from_kernel); | 562 | maybe_flush_windows(0, 0, rd, from_kernel); |
570 | reg = fetch_reg_addr(rd, regs); | 563 | reg = fetch_reg_addr(rd, regs); |
571 | if (from_kernel || rd < 16) { | 564 | if (from_kernel || rd < 16) { |
@@ -596,6 +589,7 @@ void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr | |||
596 | 589 | ||
597 | if (tstate & TSTATE_PRIV) | 590 | if (tstate & TSTATE_PRIV) |
598 | die_if_kernel("lddfmna from kernel", regs); | 591 | die_if_kernel("lddfmna from kernel", regs); |
592 | perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, sfar); | ||
599 | if (test_thread_flag(TIF_32BIT)) | 593 | if (test_thread_flag(TIF_32BIT)) |
600 | pc = (u32)pc; | 594 | pc = (u32)pc; |
601 | if (get_user(insn, (u32 __user *) pc) != -EFAULT) { | 595 | if (get_user(insn, (u32 __user *) pc) != -EFAULT) { |
@@ -657,6 +651,7 @@ void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr | |||
657 | 651 | ||
658 | if (tstate & TSTATE_PRIV) | 652 | if (tstate & TSTATE_PRIV) |
659 | die_if_kernel("stdfmna from kernel", regs); | 653 | die_if_kernel("stdfmna from kernel", regs); |
654 | perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, sfar); | ||
660 | if (test_thread_flag(TIF_32BIT)) | 655 | if (test_thread_flag(TIF_32BIT)) |
661 | pc = (u32)pc; | 656 | pc = (u32)pc; |
662 | if (get_user(insn, (u32 __user *) pc) != -EFAULT) { | 657 | if (get_user(insn, (u32 __user *) pc) != -EFAULT) { |
diff --git a/arch/sparc/kernel/visemul.c b/arch/sparc/kernel/visemul.c index d231cbd5c526..9dfd2ebcb157 100644 --- a/arch/sparc/kernel/visemul.c +++ b/arch/sparc/kernel/visemul.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/thread_info.h> | 7 | #include <linux/thread_info.h> |
8 | #include <linux/perf_event.h> | ||
8 | 9 | ||
9 | #include <asm/ptrace.h> | 10 | #include <asm/ptrace.h> |
10 | #include <asm/pstate.h> | 11 | #include <asm/pstate.h> |
@@ -801,6 +802,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) | |||
801 | 802 | ||
802 | BUG_ON(regs->tstate & TSTATE_PRIV); | 803 | BUG_ON(regs->tstate & TSTATE_PRIV); |
803 | 804 | ||
805 | perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0); | ||
806 | |||
804 | if (test_thread_flag(TIF_32BIT)) | 807 | if (test_thread_flag(TIF_32BIT)) |
805 | pc = (u32)pc; | 808 | pc = (u32)pc; |
806 | 809 | ||