diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:44:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:44:35 -0400 |
commit | ebc283118ee448dcb6e6cae74a8a43f17a1ccc3f (patch) | |
tree | daeb82c70de678ac10a5cec153097294dd772cb1 /arch/mips/kernel | |
parent | fc8a327db6c46de783b1a4276d846841b9abc24c (diff) | |
parent | 8bb00d83d8fc2de5c0614f5d55780107e0c375fe (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Increase cp0 compare clockevent min_delta_ns from 0x30 to 0x300.
[MIPS] Cache: Provide more information on cache policy on bootup.
[MIPS] Fix aliasing bug in copy_user_highpage, take 2.
[MIPS] VPE loader: convert from struct class_ device to struct device
[MIPS] MIPSsim: Fix booting from NFS root
[MIPS] Alchemy: Get rid of au1xxx_irq_map_t.
[MIPS] Alchemy: Get rid of au_ffz().
[MIPS] Alchemy: Get rid of au_ffs().
[MIPS] Alchemy: cleanup interrupt code.
[MIPS] Lasat: Fix build by conversion to irq_cpu.c.
[MIPS] Lasat: Add #ifndef ... #endif include warpper to lasatint.h.
[MIPS] IP22: Enable -Werror.
[MIPS] IP22: Fix warning.
[MIPS] IP22: Complain if requesting the front panel irq failed.
[MIPS] vmlinux.lds.S: Handle KPROBES_TEXT.
[MIPS] vmlinux.lds.S: Fix handling of .notes in final link.
[MIPS] vmlinux.lds.S: Remove duplicate comment.
[MIPS] MSP71XX: Add workarounds file.
[MIPS] IP32: Fix build by conversion to irq_cpu.c.
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 21 | ||||
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 15 | ||||
-rw-r--r-- | arch/mips/kernel/vpe.c | 27 |
4 files changed, 41 insertions, 24 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 5892491b40eb..05b365167a09 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -421,7 +421,7 @@ void __cpuinit mips_clockevent_init(void) | |||
421 | cd->mult = div_sc((unsigned long) mips_freq, NSEC_PER_SEC, 32); | 421 | cd->mult = div_sc((unsigned long) mips_freq, NSEC_PER_SEC, 32); |
422 | cd->shift = 32; | 422 | cd->shift = 32; |
423 | cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd); | 423 | cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd); |
424 | cd->min_delta_ns = clockevent_delta2ns(0x30, cd); | 424 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); |
425 | 425 | ||
426 | cd->rating = 300; | 426 | cd->rating = 300; |
427 | cd->irq = irq; | 427 | cd->irq = irq; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 632bce1bf420..9c0c478d71ac 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -104,7 +104,7 @@ static int __init set_raw_show_trace(char *str) | |||
104 | __setup("raw_show_trace", set_raw_show_trace); | 104 | __setup("raw_show_trace", set_raw_show_trace); |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | static void show_backtrace(struct task_struct *task, struct pt_regs *regs) | 107 | static void show_backtrace(struct task_struct *task, const struct pt_regs *regs) |
108 | { | 108 | { |
109 | unsigned long sp = regs->regs[29]; | 109 | unsigned long sp = regs->regs[29]; |
110 | unsigned long ra = regs->regs[31]; | 110 | unsigned long ra = regs->regs[31]; |
@@ -126,7 +126,8 @@ static void show_backtrace(struct task_struct *task, struct pt_regs *regs) | |||
126 | * This routine abuses get_user()/put_user() to reference pointers | 126 | * This routine abuses get_user()/put_user() to reference pointers |
127 | * with at least a bit of error checking ... | 127 | * with at least a bit of error checking ... |
128 | */ | 128 | */ |
129 | static void show_stacktrace(struct task_struct *task, struct pt_regs *regs) | 129 | static void show_stacktrace(struct task_struct *task, |
130 | const struct pt_regs *regs) | ||
130 | { | 131 | { |
131 | const int field = 2 * sizeof(unsigned long); | 132 | const int field = 2 * sizeof(unsigned long); |
132 | long stackdata; | 133 | long stackdata; |
@@ -203,7 +204,7 @@ static void show_code(unsigned int __user *pc) | |||
203 | } | 204 | } |
204 | } | 205 | } |
205 | 206 | ||
206 | void show_regs(struct pt_regs *regs) | 207 | static void __show_regs(const struct pt_regs *regs) |
207 | { | 208 | { |
208 | const int field = 2 * sizeof(unsigned long); | 209 | const int field = 2 * sizeof(unsigned long); |
209 | unsigned int cause = regs->cp0_cause; | 210 | unsigned int cause = regs->cp0_cause; |
@@ -299,9 +300,17 @@ void show_regs(struct pt_regs *regs) | |||
299 | cpu_name_string()); | 300 | cpu_name_string()); |
300 | } | 301 | } |
301 | 302 | ||
302 | void show_registers(struct pt_regs *regs) | 303 | /* |
304 | * FIXME: really the generic show_regs should take a const pointer argument. | ||
305 | */ | ||
306 | void show_regs(struct pt_regs *regs) | ||
307 | { | ||
308 | __show_regs((struct pt_regs *)regs); | ||
309 | } | ||
310 | |||
311 | void show_registers(const struct pt_regs *regs) | ||
303 | { | 312 | { |
304 | show_regs(regs); | 313 | __show_regs(regs); |
305 | print_modules(); | 314 | print_modules(); |
306 | printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", | 315 | printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", |
307 | current->comm, current->pid, current_thread_info(), current); | 316 | current->comm, current->pid, current_thread_info(), current); |
@@ -312,7 +321,7 @@ void show_registers(struct pt_regs *regs) | |||
312 | 321 | ||
313 | static DEFINE_SPINLOCK(die_lock); | 322 | static DEFINE_SPINLOCK(die_lock); |
314 | 323 | ||
315 | void __noreturn die(const char * str, struct pt_regs * regs) | 324 | void __noreturn die(const char * str, const struct pt_regs * regs) |
316 | { | 325 | { |
317 | static int die_counter; | 326 | static int die_counter; |
318 | #ifdef CONFIG_MIPS_MT_SMTC | 327 | #ifdef CONFIG_MIPS_MT_SMTC |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 84f9a4cc6f2f..2781cff1485e 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -5,6 +5,10 @@ | |||
5 | #define mips mips | 5 | #define mips mips |
6 | OUTPUT_ARCH(mips) | 6 | OUTPUT_ARCH(mips) |
7 | ENTRY(kernel_entry) | 7 | ENTRY(kernel_entry) |
8 | PHDRS { | ||
9 | text PT_LOAD FLAGS(7); /* RWX */ | ||
10 | note PT_NOTE FLAGS(4); /* R__ */ | ||
11 | } | ||
8 | jiffies = JIFFIES; | 12 | jiffies = JIFFIES; |
9 | 13 | ||
10 | SECTIONS | 14 | SECTIONS |
@@ -22,7 +26,6 @@ SECTIONS | |||
22 | */ | 26 | */ |
23 | 27 | ||
24 | /* . = 0xa800000000300000; */ | 28 | /* . = 0xa800000000300000; */ |
25 | /* . = 0xa800000000300000; */ | ||
26 | . = 0xffffffff80300000; | 29 | . = 0xffffffff80300000; |
27 | #endif | 30 | #endif |
28 | . = LOADADDR; | 31 | . = LOADADDR; |
@@ -32,9 +35,10 @@ SECTIONS | |||
32 | TEXT_TEXT | 35 | TEXT_TEXT |
33 | SCHED_TEXT | 36 | SCHED_TEXT |
34 | LOCK_TEXT | 37 | LOCK_TEXT |
38 | KPROBES_TEXT | ||
35 | *(.fixup) | 39 | *(.fixup) |
36 | *(.gnu.warning) | 40 | *(.gnu.warning) |
37 | } =0 | 41 | } :text = 0 |
38 | _etext = .; /* End of text section */ | 42 | _etext = .; /* End of text section */ |
39 | 43 | ||
40 | /* Exception table */ | 44 | /* Exception table */ |
@@ -51,6 +55,10 @@ SECTIONS | |||
51 | *(__dbe_table) | 55 | *(__dbe_table) |
52 | __stop___dbe_table = .; | 56 | __stop___dbe_table = .; |
53 | } | 57 | } |
58 | |||
59 | NOTES :text :note | ||
60 | .dummy : { *(.dummy) } :text | ||
61 | |||
54 | RODATA | 62 | RODATA |
55 | 63 | ||
56 | /* writeable */ | 64 | /* writeable */ |
@@ -201,7 +209,4 @@ SECTIONS | |||
201 | *(.gptab.bss) | 209 | *(.gptab.bss) |
202 | *(.gptab.sbss) | 210 | *(.gptab.sbss) |
203 | } | 211 | } |
204 | .note : { | ||
205 | *(.note) | ||
206 | } | ||
207 | } | 212 | } |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 61b729fa0548..df8cbe4c7c0d 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -1317,7 +1317,8 @@ static void kspd_sp_exit( int sp_id) | |||
1317 | } | 1317 | } |
1318 | #endif | 1318 | #endif |
1319 | 1319 | ||
1320 | static ssize_t store_kill(struct class_device *dev, const char *buf, size_t len) | 1320 | static ssize_t store_kill(struct device *dev, struct device_attribute *attr, |
1321 | const char *buf, size_t len) | ||
1321 | { | 1322 | { |
1322 | struct vpe *vpe = get_vpe(tclimit); | 1323 | struct vpe *vpe = get_vpe(tclimit); |
1323 | struct vpe_notifications *not; | 1324 | struct vpe_notifications *not; |
@@ -1334,14 +1335,16 @@ static ssize_t store_kill(struct class_device *dev, const char *buf, size_t len) | |||
1334 | return len; | 1335 | return len; |
1335 | } | 1336 | } |
1336 | 1337 | ||
1337 | static ssize_t show_ntcs(struct class_device *cd, char *buf) | 1338 | static ssize_t show_ntcs(struct device *cd, struct device_attribute *attr, |
1339 | char *buf) | ||
1338 | { | 1340 | { |
1339 | struct vpe *vpe = get_vpe(tclimit); | 1341 | struct vpe *vpe = get_vpe(tclimit); |
1340 | 1342 | ||
1341 | return sprintf(buf, "%d\n", vpe->ntcs); | 1343 | return sprintf(buf, "%d\n", vpe->ntcs); |
1342 | } | 1344 | } |
1343 | 1345 | ||
1344 | static ssize_t store_ntcs(struct class_device *dev, const char *buf, size_t len) | 1346 | static ssize_t store_ntcs(struct device *dev, struct device_attribute *attr, |
1347 | const char *buf, size_t len) | ||
1345 | { | 1348 | { |
1346 | struct vpe *vpe = get_vpe(tclimit); | 1349 | struct vpe *vpe = get_vpe(tclimit); |
1347 | unsigned long new; | 1350 | unsigned long new; |
@@ -1362,13 +1365,13 @@ out_einval: | |||
1362 | return -EINVAL;; | 1365 | return -EINVAL;; |
1363 | } | 1366 | } |
1364 | 1367 | ||
1365 | static struct class_device_attribute vpe_class_attributes[] = { | 1368 | static struct device_attribute vpe_class_attributes[] = { |
1366 | __ATTR(kill, S_IWUSR, NULL, store_kill), | 1369 | __ATTR(kill, S_IWUSR, NULL, store_kill), |
1367 | __ATTR(ntcs, S_IRUGO | S_IWUSR, show_ntcs, store_ntcs), | 1370 | __ATTR(ntcs, S_IRUGO | S_IWUSR, show_ntcs, store_ntcs), |
1368 | {} | 1371 | {} |
1369 | }; | 1372 | }; |
1370 | 1373 | ||
1371 | static void vpe_class_device_release(struct class_device *cd) | 1374 | static void vpe_device_release(struct device *cd) |
1372 | { | 1375 | { |
1373 | kfree(cd); | 1376 | kfree(cd); |
1374 | } | 1377 | } |
@@ -1376,11 +1379,11 @@ static void vpe_class_device_release(struct class_device *cd) | |||
1376 | struct class vpe_class = { | 1379 | struct class vpe_class = { |
1377 | .name = "vpe", | 1380 | .name = "vpe", |
1378 | .owner = THIS_MODULE, | 1381 | .owner = THIS_MODULE, |
1379 | .release = vpe_class_device_release, | 1382 | .dev_release = vpe_device_release, |
1380 | .class_dev_attrs = vpe_class_attributes, | 1383 | .dev_attrs = vpe_class_attributes, |
1381 | }; | 1384 | }; |
1382 | 1385 | ||
1383 | struct class_device vpe_device; | 1386 | struct device vpe_device; |
1384 | 1387 | ||
1385 | static int __init vpe_module_init(void) | 1388 | static int __init vpe_module_init(void) |
1386 | { | 1389 | { |
@@ -1423,12 +1426,12 @@ static int __init vpe_module_init(void) | |||
1423 | goto out_chrdev; | 1426 | goto out_chrdev; |
1424 | } | 1427 | } |
1425 | 1428 | ||
1426 | class_device_initialize(&vpe_device); | 1429 | device_initialize(&vpe_device); |
1427 | vpe_device.class = &vpe_class, | 1430 | vpe_device.class = &vpe_class, |
1428 | vpe_device.parent = NULL, | 1431 | vpe_device.parent = NULL, |
1429 | strlcpy(vpe_device.class_id, "vpe1", BUS_ID_SIZE); | 1432 | strlcpy(vpe_device.bus_id, "vpe1", BUS_ID_SIZE); |
1430 | vpe_device.devt = MKDEV(major, minor); | 1433 | vpe_device.devt = MKDEV(major, minor); |
1431 | err = class_device_add(&vpe_device); | 1434 | err = device_add(&vpe_device); |
1432 | if (err) { | 1435 | if (err) { |
1433 | printk(KERN_ERR "Adding vpe_device failed\n"); | 1436 | printk(KERN_ERR "Adding vpe_device failed\n"); |
1434 | goto out_class; | 1437 | goto out_class; |
@@ -1573,7 +1576,7 @@ static void __exit vpe_module_exit(void) | |||
1573 | } | 1576 | } |
1574 | } | 1577 | } |
1575 | 1578 | ||
1576 | class_device_del(&vpe_device); | 1579 | device_del(&vpe_device); |
1577 | unregister_chrdev(major, module_name); | 1580 | unregister_chrdev(major, module_name); |
1578 | } | 1581 | } |
1579 | 1582 | ||