diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-12 20:44:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-12 20:44:53 -0400 |
commit | aa11d958d1a6572eda08214d7c6a735804fe48a5 (patch) | |
tree | d025b05270ad1e010660d17eeadc6ac3c1abbd7d /arch/parisc | |
parent | 07f6642ee9418e962e54cbc07471cfe2e559c568 (diff) | |
parent | 9799218ae36910af50f002a5db1802d576fffb43 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
arch/microblaze/include/asm/socket.h
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/tlb.h | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/module.c | 50 | ||||
-rw-r--r-- | arch/parisc/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/traps.c | 20 |
6 files changed, 60 insertions, 20 deletions
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index 0407959da489..4ce0edfbe969 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
@@ -23,7 +23,7 @@ struct thread_info { | |||
23 | .flags = 0, \ | 23 | .flags = 0, \ |
24 | .cpu = 0, \ | 24 | .cpu = 0, \ |
25 | .addr_limit = KERNEL_DS, \ | 25 | .addr_limit = KERNEL_DS, \ |
26 | .preempt_count = 1, \ | 26 | .preempt_count = INIT_PREEMPT_COUNT, \ |
27 | .restart_block = { \ | 27 | .restart_block = { \ |
28 | .fn = do_no_restart_syscall \ | 28 | .fn = do_no_restart_syscall \ |
29 | } \ | 29 | } \ |
diff --git a/arch/parisc/include/asm/tlb.h b/arch/parisc/include/asm/tlb.h index 383b1db310ee..07924903989e 100644 --- a/arch/parisc/include/asm/tlb.h +++ b/arch/parisc/include/asm/tlb.h | |||
@@ -21,7 +21,7 @@ do { if (!(tlb)->fullmm) \ | |||
21 | 21 | ||
22 | #include <asm-generic/tlb.h> | 22 | #include <asm-generic/tlb.h> |
23 | 23 | ||
24 | #define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) | 24 | #define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd) |
25 | #define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) | 25 | #define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte) |
26 | 26 | ||
27 | #endif | 27 | #endif |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index ae3e70cd1e14..e552e547cb93 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -553,7 +553,7 @@ | |||
553 | * on most of those machines only handles cache transactions. | 553 | * on most of those machines only handles cache transactions. |
554 | */ | 554 | */ |
555 | extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0 | 555 | extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0 |
556 | depi 1,12,1,\prot | 556 | depdi 1,12,1,\prot |
557 | 557 | ||
558 | /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ | 558 | /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ |
559 | convert_for_tlb_insert20 \pte | 559 | convert_for_tlb_insert20 \pte |
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index ef5caf2e6ed0..61ee0eec4e69 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -86,8 +86,12 @@ | |||
86 | * the bottom of the table, which has a maximum signed displacement of | 86 | * the bottom of the table, which has a maximum signed displacement of |
87 | * 0x3fff; however, since we're only going forward, this becomes | 87 | * 0x3fff; however, since we're only going forward, this becomes |
88 | * 0x1fff, and thus, since each GOT entry is 8 bytes long we can have | 88 | * 0x1fff, and thus, since each GOT entry is 8 bytes long we can have |
89 | * at most 1023 entries */ | 89 | * at most 1023 entries. |
90 | #define MAX_GOTS 1023 | 90 | * To overcome this 14bit displacement with some kernel modules, we'll |
91 | * use instead the unusal 16bit displacement method (see reassemble_16a) | ||
92 | * which gives us a maximum positive displacement of 0x7fff, and as such | ||
93 | * allows us to allocate up to 4095 GOT entries. */ | ||
94 | #define MAX_GOTS 4095 | ||
91 | 95 | ||
92 | /* three functions to determine where in the module core | 96 | /* three functions to determine where in the module core |
93 | * or init pieces the location is */ | 97 | * or init pieces the location is */ |
@@ -145,12 +149,40 @@ struct stub_entry { | |||
145 | /* The reassemble_* functions prepare an immediate value for | 149 | /* The reassemble_* functions prepare an immediate value for |
146 | insertion into an opcode. pa-risc uses all sorts of weird bitfields | 150 | insertion into an opcode. pa-risc uses all sorts of weird bitfields |
147 | in the instruction to hold the value. */ | 151 | in the instruction to hold the value. */ |
152 | static inline int sign_unext(int x, int len) | ||
153 | { | ||
154 | int len_ones; | ||
155 | |||
156 | len_ones = (1 << len) - 1; | ||
157 | return x & len_ones; | ||
158 | } | ||
159 | |||
160 | static inline int low_sign_unext(int x, int len) | ||
161 | { | ||
162 | int sign, temp; | ||
163 | |||
164 | sign = (x >> (len-1)) & 1; | ||
165 | temp = sign_unext(x, len-1); | ||
166 | return (temp << 1) | sign; | ||
167 | } | ||
168 | |||
148 | static inline int reassemble_14(int as14) | 169 | static inline int reassemble_14(int as14) |
149 | { | 170 | { |
150 | return (((as14 & 0x1fff) << 1) | | 171 | return (((as14 & 0x1fff) << 1) | |
151 | ((as14 & 0x2000) >> 13)); | 172 | ((as14 & 0x2000) >> 13)); |
152 | } | 173 | } |
153 | 174 | ||
175 | static inline int reassemble_16a(int as16) | ||
176 | { | ||
177 | int s, t; | ||
178 | |||
179 | /* Unusual 16-bit encoding, for wide mode only. */ | ||
180 | t = (as16 << 1) & 0xffff; | ||
181 | s = (as16 & 0x8000); | ||
182 | return (t ^ s ^ (s >> 1)) | (s >> 15); | ||
183 | } | ||
184 | |||
185 | |||
154 | static inline int reassemble_17(int as17) | 186 | static inline int reassemble_17(int as17) |
155 | { | 187 | { |
156 | return (((as17 & 0x10000) >> 16) | | 188 | return (((as17 & 0x10000) >> 16) | |
@@ -407,6 +439,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, | |||
407 | enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec) | 439 | enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec) |
408 | { | 440 | { |
409 | struct stub_entry *stub; | 441 | struct stub_entry *stub; |
442 | int __maybe_unused d; | ||
410 | 443 | ||
411 | /* initialize stub_offset to point in front of the section */ | 444 | /* initialize stub_offset to point in front of the section */ |
412 | if (!me->arch.section[targetsec].stub_offset) { | 445 | if (!me->arch.section[targetsec].stub_offset) { |
@@ -460,12 +493,19 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, | |||
460 | */ | 493 | */ |
461 | switch (stub_type) { | 494 | switch (stub_type) { |
462 | case ELF_STUB_GOT: | 495 | case ELF_STUB_GOT: |
463 | stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */ | 496 | d = get_got(me, value, addend); |
497 | if (d <= 15) { | ||
498 | /* Format 5 */ | ||
499 | stub->insns[0] = 0x0f6010db; /* ldd 0(%dp),%dp */ | ||
500 | stub->insns[0] |= low_sign_unext(d, 5) << 16; | ||
501 | } else { | ||
502 | /* Format 3 */ | ||
503 | stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */ | ||
504 | stub->insns[0] |= reassemble_16a(d); | ||
505 | } | ||
464 | stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */ | 506 | stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */ |
465 | stub->insns[2] = 0xe820d000; /* bve (%r1) */ | 507 | stub->insns[2] = 0xe820d000; /* bve (%r1) */ |
466 | stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */ | 508 | stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */ |
467 | |||
468 | stub->insns[0] |= reassemble_14(get_got(me, value, addend) & 0x3fff); | ||
469 | break; | 509 | break; |
470 | case ELF_STUB_MILLI: | 510 | case ELF_STUB_MILLI: |
471 | stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ | 511 | stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 61c07078c072..1f3aa8db0203 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -156,7 +156,7 @@ void machine_power_off(void) | |||
156 | * software. The user has to press the button himself. */ | 156 | * software. The user has to press the button himself. */ |
157 | 157 | ||
158 | printk(KERN_EMERG "System shut down completed.\n" | 158 | printk(KERN_EMERG "System shut down completed.\n" |
159 | KERN_EMERG "Please power this system off now."); | 159 | "Please power this system off now."); |
160 | } | 160 | } |
161 | 161 | ||
162 | void (*pm_power_off)(void) = machine_power_off; | 162 | void (*pm_power_off)(void) = machine_power_off; |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index c32f5d6d778e..528f0ff9b273 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -250,15 +250,14 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err) | |||
250 | oops_enter(); | 250 | oops_enter(); |
251 | 251 | ||
252 | /* Amuse the user in a SPARC fashion */ | 252 | /* Amuse the user in a SPARC fashion */ |
253 | if (err) printk( | 253 | if (err) printk(KERN_CRIT |
254 | KERN_CRIT " _______________________________ \n" | 254 | " _______________________________ \n" |
255 | KERN_CRIT " < Your System ate a SPARC! Gah! >\n" | 255 | " < Your System ate a SPARC! Gah! >\n" |
256 | KERN_CRIT " ------------------------------- \n" | 256 | " ------------------------------- \n" |
257 | KERN_CRIT " \\ ^__^\n" | 257 | " \\ ^__^\n" |
258 | KERN_CRIT " \\ (xx)\\_______\n" | 258 | " (__)\\ )\\/\\\n" |
259 | KERN_CRIT " (__)\\ )\\/\\\n" | 259 | " U ||----w |\n" |
260 | KERN_CRIT " U ||----w |\n" | 260 | " || ||\n"); |
261 | KERN_CRIT " || ||\n"); | ||
262 | 261 | ||
263 | /* unlock the pdc lock if necessary */ | 262 | /* unlock the pdc lock if necessary */ |
264 | pdc_emergency_unlock(); | 263 | pdc_emergency_unlock(); |
@@ -797,7 +796,8 @@ void notrace handle_interruption(int code, struct pt_regs *regs) | |||
797 | else | 796 | else |
798 | printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", | 797 | printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", |
799 | code); | 798 | code); |
800 | printk("pid=%d command='%s'\n", task_pid_nr(current), current->comm); | 799 | printk(KERN_CONT "pid=%d command='%s'\n", |
800 | task_pid_nr(current), current->comm); | ||
801 | show_regs(regs); | 801 | show_regs(regs); |
802 | #endif | 802 | #endif |
803 | si.si_signo = SIGSEGV; | 803 | si.si_signo = SIGSEGV; |