diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-16 13:48:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-16 13:48:23 -0400 |
commit | 69d1d523cc961b6f3c2fe313694263fc81ada231 (patch) | |
tree | 207118ff51e133b1308d37e1d14365b5b0f2ecb2 /arch | |
parent | 9a9e0d685553af76cb6ae2af93cca4913e7fcd47 (diff) | |
parent | 56ee0cfd095eab246c0ecd4398c4f30a546663f7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
[PARISC] make ptr_to_pide() static
[PARISC] head.S: section mismatch fixes
[PARISC] add back Crestone Peak cpu
[PARISC] futex: special case cmpxchg NULL in kernel space
[PARISC] clean up show_stack
[PARISC] add pa8900 CPUs to hardware inventory
[PARISC] clean up include/asm-parisc/elf.h
[PARISC] move defconfig to arch/parisc/configs/
[PARISC] add back AD1889 MAINTAINERS entry
[PARISC] pdc_console: fix bizarre panic on boot
[PARISC] dump_stack in show_regs
[PARISC] pdc_stable: fix compile errors
[PARISC] remove unused pdc_iodc_printf function
[PARISC] bump __NR_syscalls
[PARISC] unbreak pgalloc.h
[PARISC] move VMALLOC_* definitions to fixmap.h
[PARISC] wire up timerfd syscalls
[PARISC] remove old timerfd syscall
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/Makefile | 3 | ||||
-rw-r--r-- | arch/parisc/configs/default_defconfig (renamed from arch/parisc/defconfig) | 0 | ||||
-rw-r--r-- | arch/parisc/kernel/firmware.c | 27 | ||||
-rw-r--r-- | arch/parisc/kernel/hardware.c | 13 | ||||
-rw-r--r-- | arch/parisc/kernel/head.S | 7 | ||||
-rw-r--r-- | arch/parisc/kernel/pdc_cons.c | 30 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 5 | ||||
-rw-r--r-- | arch/parisc/kernel/traps.c | 25 |
8 files changed, 78 insertions, 32 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index e574de4efb3..5ddad7bd60a 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -16,6 +16,9 @@ | |||
16 | # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, | 16 | # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, |
17 | # Mike Shaver, Helge Deller and Martin K. Petersen | 17 | # Mike Shaver, Helge Deller and Martin K. Petersen |
18 | # | 18 | # |
19 | |||
20 | KBUILD_DEFCONFIG := default_defconfig | ||
21 | |||
19 | NM = sh $(srctree)/arch/parisc/nm | 22 | NM = sh $(srctree)/arch/parisc/nm |
20 | CHECKFLAGS += -D__hppa__=1 | 23 | CHECKFLAGS += -D__hppa__=1 |
21 | 24 | ||
diff --git a/arch/parisc/defconfig b/arch/parisc/configs/default_defconfig index 448a757b06c..448a757b06c 100644 --- a/arch/parisc/defconfig +++ b/arch/parisc/configs/default_defconfig | |||
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 4ab83d56974..7177a6cd1b7 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -1080,6 +1080,9 @@ void pdc_io_reset_devices(void) | |||
1080 | spin_unlock_irqrestore(&pdc_lock, flags); | 1080 | spin_unlock_irqrestore(&pdc_lock, flags); |
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | /* locked by pdc_console_lock */ | ||
1084 | static int __attribute__((aligned(8))) iodc_retbuf[32]; | ||
1085 | static char __attribute__((aligned(64))) iodc_dbuf[4096]; | ||
1083 | 1086 | ||
1084 | /** | 1087 | /** |
1085 | * pdc_iodc_print - Console print using IODC. | 1088 | * pdc_iodc_print - Console print using IODC. |
@@ -1091,24 +1094,20 @@ void pdc_io_reset_devices(void) | |||
1091 | * Since the HP console requires CR+LF to perform a 'newline', we translate | 1094 | * Since the HP console requires CR+LF to perform a 'newline', we translate |
1092 | * "\n" to "\r\n". | 1095 | * "\n" to "\r\n". |
1093 | */ | 1096 | */ |
1094 | int pdc_iodc_print(unsigned char *str, unsigned count) | 1097 | int pdc_iodc_print(const unsigned char *str, unsigned count) |
1095 | { | 1098 | { |
1096 | /* XXX Should we spinlock posx usage */ | ||
1097 | static int posx; /* for simple TAB-Simulation... */ | 1099 | static int posx; /* for simple TAB-Simulation... */ |
1098 | int __attribute__((aligned(8))) iodc_retbuf[32]; | ||
1099 | char __attribute__((aligned(64))) iodc_dbuf[4096]; | ||
1100 | unsigned int i; | 1100 | unsigned int i; |
1101 | unsigned long flags; | 1101 | unsigned long flags; |
1102 | 1102 | ||
1103 | memset(iodc_dbuf, 0, 4096); | 1103 | for (i = 0; i < count && i < 79;) { |
1104 | for (i = 0; i < count && i < 2048;) { | ||
1105 | switch(str[i]) { | 1104 | switch(str[i]) { |
1106 | case '\n': | 1105 | case '\n': |
1107 | iodc_dbuf[i+0] = '\r'; | 1106 | iodc_dbuf[i+0] = '\r'; |
1108 | iodc_dbuf[i+1] = '\n'; | 1107 | iodc_dbuf[i+1] = '\n'; |
1109 | i += 2; | 1108 | i += 2; |
1110 | posx = 0; | 1109 | posx = 0; |
1111 | break; | 1110 | goto print; |
1112 | case '\t': | 1111 | case '\t': |
1113 | while (posx & 7) { | 1112 | while (posx & 7) { |
1114 | iodc_dbuf[i] = ' '; | 1113 | iodc_dbuf[i] = ' '; |
@@ -1124,6 +1123,16 @@ int pdc_iodc_print(unsigned char *str, unsigned count) | |||
1124 | } | 1123 | } |
1125 | } | 1124 | } |
1126 | 1125 | ||
1126 | /* if we're at the end of line, and not already inserting a newline, | ||
1127 | * insert one anyway. iodc console doesn't claim to support >79 char | ||
1128 | * lines. don't account for this in the return value. | ||
1129 | */ | ||
1130 | if (i == 79 && iodc_dbuf[i-1] != '\n') { | ||
1131 | iodc_dbuf[i+0] = '\r'; | ||
1132 | iodc_dbuf[i+1] = '\n'; | ||
1133 | } | ||
1134 | |||
1135 | print: | ||
1127 | spin_lock_irqsave(&pdc_lock, flags); | 1136 | spin_lock_irqsave(&pdc_lock, flags); |
1128 | real32_call(PAGE0->mem_cons.iodc_io, | 1137 | real32_call(PAGE0->mem_cons.iodc_io, |
1129 | (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT, | 1138 | (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT, |
@@ -1142,11 +1151,9 @@ int pdc_iodc_print(unsigned char *str, unsigned count) | |||
1142 | */ | 1151 | */ |
1143 | int pdc_iodc_getc(void) | 1152 | int pdc_iodc_getc(void) |
1144 | { | 1153 | { |
1145 | unsigned long flags; | ||
1146 | static int __attribute__((aligned(8))) iodc_retbuf[32]; | ||
1147 | static char __attribute__((aligned(64))) iodc_dbuf[4096]; | ||
1148 | int ch; | 1154 | int ch; |
1149 | int status; | 1155 | int status; |
1156 | unsigned long flags; | ||
1150 | 1157 | ||
1151 | /* Bail if no console input device. */ | 1158 | /* Bail if no console input device. */ |
1152 | if (!PAGE0->mem_kbd.iodc_io) | 1159 | if (!PAGE0->mem_kbd.iodc_io) |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 84b9611a922..f48a640b55f 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -274,7 +274,18 @@ static struct hp_hardware hp_hardware_list[] __devinitdata = { | |||
274 | {HPHW_NPROC,0x887,0x4,0x91,"Storm Peak Slow"}, | 274 | {HPHW_NPROC,0x887,0x4,0x91,"Storm Peak Slow"}, |
275 | {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"}, | 275 | {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"}, |
276 | {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"}, | 276 | {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"}, |
277 | {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak"}, | 277 | {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"}, |
278 | {HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"}, | ||
279 | {HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"}, | ||
280 | {HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"}, | ||
281 | {HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"}, | ||
282 | {HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"}, | ||
283 | {HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"}, | ||
284 | {HPHW_NPROC,0x897,0x4,0x91,"Storm Peak DC- Slow Mako+"}, | ||
285 | {HPHW_NPROC,0x898,0x4,0x91,"Storm Peak DC- Fast Mako+"}, | ||
286 | {HPHW_NPROC,0x899,0x4,0x91,"Mt. Hamilton Slow Mako+"}, | ||
287 | {HPHW_NPROC,0x89B,0x4,0x91,"Crestone Peak Mako+ Slow"}, | ||
288 | {HPHW_NPROC,0x89C,0x4,0x91,"Crestone Peak Mako+ Fast"}, | ||
278 | {HPHW_A_DIRECT, 0x004, 0x0000D, 0x00, "Arrakis MUX"}, | 289 | {HPHW_A_DIRECT, 0x004, 0x0000D, 0x00, "Arrakis MUX"}, |
279 | {HPHW_A_DIRECT, 0x005, 0x0000D, 0x00, "Dyun Kiuh MUX"}, | 290 | {HPHW_A_DIRECT, 0x005, 0x0000D, 0x00, "Dyun Kiuh MUX"}, |
280 | {HPHW_A_DIRECT, 0x006, 0x0000D, 0x00, "Baat Kiuh AP/MUX (40299B)"}, | 291 | {HPHW_A_DIRECT, 0x006, 0x0000D, 0x00, "Baat Kiuh AP/MUX (40299B)"}, |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index a7b8859488b..ec2482dc1be 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -20,10 +20,11 @@ | |||
20 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
21 | 21 | ||
22 | #include <linux/linkage.h> | 22 | #include <linux/linkage.h> |
23 | #include <linux/init.h> | ||
23 | 24 | ||
24 | .level LEVEL | 25 | .level LEVEL |
25 | 26 | ||
26 | .data | 27 | __INITDATA |
27 | ENTRY(boot_args) | 28 | ENTRY(boot_args) |
28 | .word 0 /* arg0 */ | 29 | .word 0 /* arg0 */ |
29 | .word 0 /* arg1 */ | 30 | .word 0 /* arg1 */ |
@@ -31,7 +32,7 @@ ENTRY(boot_args) | |||
31 | .word 0 /* arg3 */ | 32 | .word 0 /* arg3 */ |
32 | END(boot_args) | 33 | END(boot_args) |
33 | 34 | ||
34 | .text | 35 | .section .text.head |
35 | .align 4 | 36 | .align 4 |
36 | .import init_thread_union,data | 37 | .import init_thread_union,data |
37 | .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ | 38 | .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ |
@@ -343,7 +344,7 @@ smp_slave_stext: | |||
343 | ENDPROC(stext) | 344 | ENDPROC(stext) |
344 | 345 | ||
345 | #ifndef CONFIG_64BIT | 346 | #ifndef CONFIG_64BIT |
346 | .data | 347 | .section .data.read_mostly |
347 | 348 | ||
348 | .align 4 | 349 | .align 4 |
349 | .export $global$,data | 350 | .export $global$,data |
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 33b1f84441b..ccb68090781 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c | |||
@@ -52,28 +52,30 @@ | |||
52 | #include <linux/tty.h> | 52 | #include <linux/tty.h> |
53 | #include <asm/pdc.h> /* for iodc_call() proto and friends */ | 53 | #include <asm/pdc.h> /* for iodc_call() proto and friends */ |
54 | 54 | ||
55 | static spinlock_t pdc_console_lock = SPIN_LOCK_UNLOCKED; | ||
55 | 56 | ||
56 | static void pdc_console_write(struct console *co, const char *s, unsigned count) | 57 | static void pdc_console_write(struct console *co, const char *s, unsigned count) |
57 | { | 58 | { |
58 | pdc_iodc_print(s, count); | 59 | int i = 0; |
60 | unsigned long flags; | ||
61 | |||
62 | spin_lock_irqsave(&pdc_console_lock, flags); | ||
63 | do { | ||
64 | i += pdc_iodc_print(s + i, count - i); | ||
65 | } while (i < count); | ||
66 | spin_unlock_irqrestore(&pdc_console_lock, flags); | ||
59 | } | 67 | } |
60 | 68 | ||
61 | void pdc_printf(const char *fmt, ...) | 69 | int pdc_console_poll_key(struct console *co) |
62 | { | 70 | { |
63 | va_list args; | 71 | int c; |
64 | char buf[1024]; | 72 | unsigned long flags; |
65 | int i, len; | ||
66 | |||
67 | va_start(args, fmt); | ||
68 | len = vscnprintf(buf, sizeof(buf), fmt, args); | ||
69 | va_end(args); | ||
70 | 73 | ||
71 | pdc_iodc_print(buf, len); | 74 | spin_lock_irqsave(&pdc_console_lock, flags); |
72 | } | 75 | c = pdc_iodc_getc(); |
76 | spin_unlock_irqrestore(&pdc_console_lock, flags); | ||
73 | 77 | ||
74 | int pdc_console_poll_key(struct console *co) | 78 | return c; |
75 | { | ||
76 | return pdc_iodc_getc(); | ||
77 | } | 79 | } |
78 | 80 | ||
79 | static int pdc_console_setup(struct console *co, char *options) | 81 | static int pdc_console_setup(struct console *co, char *options) |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 117438e9eb2..6b5ac38f5a9 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -401,9 +401,12 @@ | |||
401 | ENTRY_COMP(kexec_load) /* 300 */ | 401 | ENTRY_COMP(kexec_load) /* 300 */ |
402 | ENTRY_COMP(utimensat) | 402 | ENTRY_COMP(utimensat) |
403 | ENTRY_COMP(signalfd) | 403 | ENTRY_COMP(signalfd) |
404 | ENTRY_COMP(timerfd) | 404 | ENTRY_SAME(ni_syscall) /* was timerfd */ |
405 | ENTRY_SAME(eventfd) | 405 | ENTRY_SAME(eventfd) |
406 | ENTRY_COMP(fallocate) /* 305 */ | 406 | ENTRY_COMP(fallocate) /* 305 */ |
407 | ENTRY_SAME(timerfd_create) | ||
408 | ENTRY_COMP(timerfd_settime) | ||
409 | ENTRY_COMP(timerfd_gettime) | ||
407 | 410 | ||
408 | /* Nothing yet */ | 411 | /* Nothing yet */ |
409 | 412 | ||
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 99fd56939af..9dc6dc42f9c 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -51,6 +51,9 @@ | |||
51 | DEFINE_SPINLOCK(pa_dbit_lock); | 51 | DEFINE_SPINLOCK(pa_dbit_lock); |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | void parisc_show_stack(struct task_struct *t, unsigned long *sp, | ||
55 | struct pt_regs *regs); | ||
56 | |||
54 | static int printbinary(char *buf, unsigned long x, int nbits) | 57 | static int printbinary(char *buf, unsigned long x, int nbits) |
55 | { | 58 | { |
56 | unsigned long mask = 1UL << (nbits - 1); | 59 | unsigned long mask = 1UL << (nbits - 1); |
@@ -148,6 +151,8 @@ void show_regs(struct pt_regs *regs) | |||
148 | print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]); | 151 | print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]); |
149 | printk(level); | 152 | printk(level); |
150 | print_symbol(" RP(r2): %s\n", regs->gr[2]); | 153 | print_symbol(" RP(r2): %s\n", regs->gr[2]); |
154 | |||
155 | parisc_show_stack(current, NULL, regs); | ||
151 | } | 156 | } |
152 | 157 | ||
153 | 158 | ||
@@ -181,11 +186,19 @@ static void do_show_stack(struct unwind_frame_info *info) | |||
181 | printk("\n"); | 186 | printk("\n"); |
182 | } | 187 | } |
183 | 188 | ||
184 | void show_stack(struct task_struct *task, unsigned long *s) | 189 | void parisc_show_stack(struct task_struct *task, unsigned long *sp, |
190 | struct pt_regs *regs) | ||
185 | { | 191 | { |
186 | struct unwind_frame_info info; | 192 | struct unwind_frame_info info; |
193 | struct task_struct *t; | ||
194 | |||
195 | t = task ? task : current; | ||
196 | if (regs) { | ||
197 | unwind_frame_init(&info, t, regs); | ||
198 | goto show_stack; | ||
199 | } | ||
187 | 200 | ||
188 | if (!task) { | 201 | if (t == current) { |
189 | unsigned long sp; | 202 | unsigned long sp; |
190 | 203 | ||
191 | HERE: | 204 | HERE: |
@@ -201,12 +214,18 @@ HERE: | |||
201 | unwind_frame_init(&info, current, &r); | 214 | unwind_frame_init(&info, current, &r); |
202 | } | 215 | } |
203 | } else { | 216 | } else { |
204 | unwind_frame_init_from_blocked_task(&info, task); | 217 | unwind_frame_init_from_blocked_task(&info, t); |
205 | } | 218 | } |
206 | 219 | ||
220 | show_stack: | ||
207 | do_show_stack(&info); | 221 | do_show_stack(&info); |
208 | } | 222 | } |
209 | 223 | ||
224 | void show_stack(struct task_struct *t, unsigned long *sp) | ||
225 | { | ||
226 | return parisc_show_stack(t, sp, NULL); | ||
227 | } | ||
228 | |||
210 | int is_valid_bugaddr(unsigned long iaoq) | 229 | int is_valid_bugaddr(unsigned long iaoq) |
211 | { | 230 | { |
212 | return 1; | 231 | return 1; |