aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-31 13:44:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-31 13:44:34 -0400
commitaac422afeffa9093544799c3257a96b55ba42044 (patch)
tree054663007601e0b8579021125e798f51869135f5
parent0c6be87161a6865a6f685a27c6a0404f9d1a0d5e (diff)
parentb1195c0e3ee1a1ba986923bf3ed8311b7b336432 (diff)
Merge tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Pull misc parisc updates from James Bottomley: "This is a couple of updates to complete our fixes and one to fix a compile failure caused during the merge window. Additionally, we now switch to the generic strncopy_from_user." * tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6: [PARISC] update parisc to use generic strncpy_from_user() [PARISC] Fix parisc compile failure after smp: Add task_struct argument to __cpu_up() [PARISC] fix TLB fault path on PA2.0 narrow systems [PARISC] fix boot failure on 32-bit systems caused by branch stubs placed before .text
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/include/asm/smp.h2
-rw-r--r--arch/parisc/include/asm/uaccess.h5
-rw-r--r--arch/parisc/kernel/entry.S30
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c1
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S6
-rw-r--r--arch/parisc/lib/lusercopy.S41
7 files changed, 24 insertions, 62 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index ddb8b24b823d..3ff21b536f28 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -18,6 +18,7 @@ config PARISC
18 select IRQ_PER_CPU 18 select IRQ_PER_CPU
19 select ARCH_HAVE_NMI_SAFE_CMPXCHG 19 select ARCH_HAVE_NMI_SAFE_CMPXCHG
20 select GENERIC_SMP_IDLE_THREAD 20 select GENERIC_SMP_IDLE_THREAD
21 select GENERIC_STRNCPY_FROM_USER
21 22
22 help 23 help
23 The PA-RISC microprocessor is designed by Hewlett-Packard and used 24 The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h
index e8f8037d872b..a5dc9066c6d8 100644
--- a/arch/parisc/include/asm/smp.h
+++ b/arch/parisc/include/asm/smp.h
@@ -25,7 +25,6 @@ typedef unsigned long address_t;
25#define cpu_number_map(cpu) (cpu) 25#define cpu_number_map(cpu) (cpu)
26#define cpu_logical_map(cpu) (cpu) 26#define cpu_logical_map(cpu) (cpu)
27 27
28extern void smp_send_reschedule(int cpu);
29extern void smp_send_all_nop(void); 28extern void smp_send_all_nop(void);
30 29
31extern void arch_send_call_function_single_ipi(int cpu); 30extern void arch_send_call_function_single_ipi(int cpu);
@@ -50,6 +49,5 @@ static inline void __cpu_die (unsigned int cpu) {
50 while(1) 49 while(1)
51 ; 50 ;
52} 51}
53extern int __cpu_up (unsigned int cpu);
54 52
55#endif /* __ASM_SMP_H */ 53#endif /* __ASM_SMP_H */
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
index 9ac066086f03..4ba2c93770f1 100644
--- a/arch/parisc/include/asm/uaccess.h
+++ b/arch/parisc/include/asm/uaccess.h
@@ -218,15 +218,14 @@ struct exception_data {
218extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long); 218extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long);
219extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long); 219extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long);
220extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long); 220extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long);
221extern long lstrncpy_from_user(char *, const char __user *, long); 221extern long strncpy_from_user(char *, const char __user *, long);
222extern unsigned lclear_user(void __user *,unsigned long); 222extern unsigned lclear_user(void __user *,unsigned long);
223extern long lstrnlen_user(const char __user *,long); 223extern long lstrnlen_user(const char __user *,long);
224
225/* 224/*
226 * Complex access routines -- macros 225 * Complex access routines -- macros
227 */ 226 */
227#define user_addr_max() (~0UL)
228 228
229#define strncpy_from_user lstrncpy_from_user
230#define strnlen_user lstrnlen_user 229#define strnlen_user lstrnlen_user
231#define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) 230#define strlen_user(str) lstrnlen_user(str, 0x7fffffffL)
232#define clear_user lclear_user 231#define clear_user lclear_user
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 535034217021..07ef351edd57 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -552,7 +552,7 @@
552 * entry (identifying the physical page) and %r23 up with 552 * entry (identifying the physical page) and %r23 up with
553 * the from tlb entry (or nothing if only a to entry---for 553 * the from tlb entry (or nothing if only a to entry---for
554 * clear_user_page_asm) */ 554 * clear_user_page_asm) */
555 .macro do_alias spc,tmp,tmp1,va,pte,prot,fault 555 .macro do_alias spc,tmp,tmp1,va,pte,prot,fault,patype
556 cmpib,COND(<>),n 0,\spc,\fault 556 cmpib,COND(<>),n 0,\spc,\fault
557 ldil L%(TMPALIAS_MAP_START),\tmp 557 ldil L%(TMPALIAS_MAP_START),\tmp
558#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000) 558#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000)
@@ -581,11 +581,15 @@
581 */ 581 */
582 cmpiclr,= 0x01,\tmp,%r0 582 cmpiclr,= 0x01,\tmp,%r0
583 ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot 583 ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot
584#ifdef CONFIG_64BIT 584.ifc \patype,20
585 depd,z \prot,8,7,\prot 585 depd,z \prot,8,7,\prot
586#else 586.else
587.ifc \patype,11
587 depw,z \prot,8,7,\prot 588 depw,z \prot,8,7,\prot
588#endif 589.else
590 .error "undefined PA type to do_alias"
591.endif
592.endif
589 /* 593 /*
590 * OK, it is in the temp alias region, check whether "from" or "to". 594 * OK, it is in the temp alias region, check whether "from" or "to".
591 * Check "subtle" note in pacache.S re: r23/r26. 595 * Check "subtle" note in pacache.S re: r23/r26.
@@ -1189,7 +1193,7 @@ dtlb_miss_20w:
1189 nop 1193 nop
1190 1194
1191dtlb_check_alias_20w: 1195dtlb_check_alias_20w:
1192 do_alias spc,t0,t1,va,pte,prot,dtlb_fault 1196 do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
1193 1197
1194 idtlbt pte,prot 1198 idtlbt pte,prot
1195 1199
@@ -1213,7 +1217,7 @@ nadtlb_miss_20w:
1213 nop 1217 nop
1214 1218
1215nadtlb_check_alias_20w: 1219nadtlb_check_alias_20w:
1216 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate 1220 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
1217 1221
1218 idtlbt pte,prot 1222 idtlbt pte,prot
1219 1223
@@ -1245,7 +1249,7 @@ dtlb_miss_11:
1245 nop 1249 nop
1246 1250
1247dtlb_check_alias_11: 1251dtlb_check_alias_11:
1248 do_alias spc,t0,t1,va,pte,prot,dtlb_fault 1252 do_alias spc,t0,t1,va,pte,prot,dtlb_fault,11
1249 1253
1250 idtlba pte,(va) 1254 idtlba pte,(va)
1251 idtlbp prot,(va) 1255 idtlbp prot,(va)
@@ -1277,7 +1281,7 @@ nadtlb_miss_11:
1277 nop 1281 nop
1278 1282
1279nadtlb_check_alias_11: 1283nadtlb_check_alias_11:
1280 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate 1284 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,11
1281 1285
1282 idtlba pte,(va) 1286 idtlba pte,(va)
1283 idtlbp prot,(va) 1287 idtlbp prot,(va)
@@ -1304,7 +1308,7 @@ dtlb_miss_20:
1304 nop 1308 nop
1305 1309
1306dtlb_check_alias_20: 1310dtlb_check_alias_20:
1307 do_alias spc,t0,t1,va,pte,prot,dtlb_fault 1311 do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
1308 1312
1309 idtlbt pte,prot 1313 idtlbt pte,prot
1310 1314
@@ -1330,7 +1334,7 @@ nadtlb_miss_20:
1330 nop 1334 nop
1331 1335
1332nadtlb_check_alias_20: 1336nadtlb_check_alias_20:
1333 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate 1337 do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
1334 1338
1335 idtlbt pte,prot 1339 idtlbt pte,prot
1336 1340
@@ -1457,7 +1461,7 @@ naitlb_miss_20w:
1457 nop 1461 nop
1458 1462
1459naitlb_check_alias_20w: 1463naitlb_check_alias_20w:
1460 do_alias spc,t0,t1,va,pte,prot,naitlb_fault 1464 do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
1461 1465
1462 iitlbt pte,prot 1466 iitlbt pte,prot
1463 1467
@@ -1511,7 +1515,7 @@ naitlb_miss_11:
1511 nop 1515 nop
1512 1516
1513naitlb_check_alias_11: 1517naitlb_check_alias_11:
1514 do_alias spc,t0,t1,va,pte,prot,itlb_fault 1518 do_alias spc,t0,t1,va,pte,prot,itlb_fault,11
1515 1519
1516 iitlba pte,(%sr0, va) 1520 iitlba pte,(%sr0, va)
1517 iitlbp prot,(%sr0, va) 1521 iitlbp prot,(%sr0, va)
@@ -1557,7 +1561,7 @@ naitlb_miss_20:
1557 nop 1561 nop
1558 1562
1559naitlb_check_alias_20: 1563naitlb_check_alias_20:
1560 do_alias spc,t0,t1,va,pte,prot,naitlb_fault 1564 do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
1561 1565
1562 iitlbt pte,prot 1566 iitlbt pte,prot
1563 1567
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index a7bb757a5497..ceec85de6290 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -44,7 +44,6 @@ EXPORT_SYMBOL(__cmpxchg_u64);
44#endif 44#endif
45 45
46#include <asm/uaccess.h> 46#include <asm/uaccess.h>
47EXPORT_SYMBOL(lstrncpy_from_user);
48EXPORT_SYMBOL(lclear_user); 47EXPORT_SYMBOL(lclear_user);
49EXPORT_SYMBOL(lstrnlen_user); 48EXPORT_SYMBOL(lstrnlen_user);
50 49
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index fa6f2b8163e0..64a999882e4f 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -50,8 +50,10 @@ SECTIONS
50 . = KERNEL_BINARY_TEXT_START; 50 . = KERNEL_BINARY_TEXT_START;
51 51
52 _text = .; /* Text and read-only data */ 52 _text = .; /* Text and read-only data */
53 .text ALIGN(16) : { 53 .head ALIGN(16) : {
54 HEAD_TEXT 54 HEAD_TEXT
55 } = 0
56 .text ALIGN(16) : {
55 TEXT_TEXT 57 TEXT_TEXT
56 SCHED_TEXT 58 SCHED_TEXT
57 LOCK_TEXT 59 LOCK_TEXT
@@ -65,7 +67,7 @@ SECTIONS
65 *(.fixup) 67 *(.fixup)
66 *(.lock.text) /* out-of-line lock text */ 68 *(.lock.text) /* out-of-line lock text */
67 *(.gnu.warning) 69 *(.gnu.warning)
68 } = 0 70 }
69 /* End of text section */ 71 /* End of text section */
70 _etext = .; 72 _etext = .;
71 73
diff --git a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S
index 1bd23ccec17b..6f2d9355efe2 100644
--- a/arch/parisc/lib/lusercopy.S
+++ b/arch/parisc/lib/lusercopy.S
@@ -61,47 +61,6 @@
61 .endm 61 .endm
62 62
63 /* 63 /*
64 * long lstrncpy_from_user(char *dst, const char *src, long n)
65 *
66 * Returns -EFAULT if exception before terminator,
67 * N if the entire buffer filled,
68 * otherwise strlen (i.e. excludes zero byte)
69 */
70
71ENTRY(lstrncpy_from_user)
72 .proc
73 .callinfo NO_CALLS
74 .entry
75 comib,= 0,%r24,$lsfu_done
76 copy %r24,%r23
77 get_sr
781: ldbs,ma 1(%sr1,%r25),%r1
79$lsfu_loop:
80 stbs,ma %r1,1(%r26)
81 comib,=,n 0,%r1,$lsfu_done
82 addib,<>,n -1,%r24,$lsfu_loop
832: ldbs,ma 1(%sr1,%r25),%r1
84$lsfu_done:
85 sub %r23,%r24,%r28
86$lsfu_exit:
87 bv %r0(%r2)
88 nop
89 .exit
90ENDPROC(lstrncpy_from_user)
91
92 .section .fixup,"ax"
933: fixup_branch $lsfu_exit
94 ldi -EFAULT,%r28
95 .previous
96
97 .section __ex_table,"aw"
98 ASM_ULONG_INSN 1b,3b
99 ASM_ULONG_INSN 2b,3b
100 .previous
101
102 .procend
103
104 /*
105 * unsigned long lclear_user(void *to, unsigned long n) 64 * unsigned long lclear_user(void *to, unsigned long n)
106 * 65 *
107 * Returns 0 for success. 66 * Returns 0 for success.