Commit aac422af authored by Linus Torvalds's avatar Linus Torvalds

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
parents 0c6be871 b1195c0e
...@@ -18,6 +18,7 @@ config PARISC ...@@ -18,6 +18,7 @@ config PARISC
select IRQ_PER_CPU select IRQ_PER_CPU
select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_SMP_IDLE_THREAD select GENERIC_SMP_IDLE_THREAD
select GENERIC_STRNCPY_FROM_USER
help help
The PA-RISC microprocessor is designed by Hewlett-Packard and used The PA-RISC microprocessor is designed by Hewlett-Packard and used
......
...@@ -25,7 +25,6 @@ typedef unsigned long address_t; ...@@ -25,7 +25,6 @@ typedef unsigned long address_t;
#define cpu_number_map(cpu) (cpu) #define cpu_number_map(cpu) (cpu)
#define cpu_logical_map(cpu) (cpu) #define cpu_logical_map(cpu) (cpu)
extern void smp_send_reschedule(int cpu);
extern void smp_send_all_nop(void); extern void smp_send_all_nop(void);
extern void arch_send_call_function_single_ipi(int cpu); extern void arch_send_call_function_single_ipi(int cpu);
...@@ -50,6 +49,5 @@ static inline void __cpu_die (unsigned int cpu) { ...@@ -50,6 +49,5 @@ static inline void __cpu_die (unsigned int cpu) {
while(1) while(1)
; ;
} }
extern int __cpu_up (unsigned int cpu);
#endif /* __ASM_SMP_H */ #endif /* __ASM_SMP_H */
...@@ -218,15 +218,14 @@ struct exception_data { ...@@ -218,15 +218,14 @@ struct exception_data {
extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long); extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long);
extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long); extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long);
extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long); extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long);
extern long lstrncpy_from_user(char *, const char __user *, long); extern long strncpy_from_user(char *, const char __user *, long);
extern unsigned lclear_user(void __user *,unsigned long); extern unsigned lclear_user(void __user *,unsigned long);
extern long lstrnlen_user(const char __user *,long); extern long lstrnlen_user(const char __user *,long);
/* /*
* Complex access routines -- macros * Complex access routines -- macros
*/ */
#define user_addr_max() (~0UL)
#define strncpy_from_user lstrncpy_from_user
#define strnlen_user lstrnlen_user #define strnlen_user lstrnlen_user
#define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) #define strlen_user(str) lstrnlen_user(str, 0x7fffffffL)
#define clear_user lclear_user #define clear_user lclear_user
......
...@@ -552,7 +552,7 @@ ...@@ -552,7 +552,7 @@
* entry (identifying the physical page) and %r23 up with * entry (identifying the physical page) and %r23 up with
* the from tlb entry (or nothing if only a to entry---for * the from tlb entry (or nothing if only a to entry---for
* clear_user_page_asm) */ * clear_user_page_asm) */
.macro do_alias spc,tmp,tmp1,va,pte,prot,fault .macro do_alias spc,tmp,tmp1,va,pte,prot,fault,patype
cmpib,COND(<>),n 0,\spc,\fault cmpib,COND(<>),n 0,\spc,\fault
ldil L%(TMPALIAS_MAP_START),\tmp ldil L%(TMPALIAS_MAP_START),\tmp
#if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000) #if defined(CONFIG_64BIT) && (TMPALIAS_MAP_START >= 0x80000000)
...@@ -581,11 +581,15 @@ ...@@ -581,11 +581,15 @@
*/ */
cmpiclr,= 0x01,\tmp,%r0 cmpiclr,= 0x01,\tmp,%r0
ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot
#ifdef CONFIG_64BIT .ifc \patype,20
depd,z \prot,8,7,\prot depd,z \prot,8,7,\prot
#else .else
.ifc \patype,11
depw,z \prot,8,7,\prot depw,z \prot,8,7,\prot
#endif .else
.error "undefined PA type to do_alias"
.endif
.endif
/* /*
* OK, it is in the temp alias region, check whether "from" or "to". * OK, it is in the temp alias region, check whether "from" or "to".
* Check "subtle" note in pacache.S re: r23/r26. * Check "subtle" note in pacache.S re: r23/r26.
...@@ -1189,7 +1193,7 @@ dtlb_miss_20w: ...@@ -1189,7 +1193,7 @@ dtlb_miss_20w:
nop nop
dtlb_check_alias_20w: dtlb_check_alias_20w:
do_alias spc,t0,t1,va,pte,prot,dtlb_fault do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1213,7 +1217,7 @@ nadtlb_miss_20w: ...@@ -1213,7 +1217,7 @@ nadtlb_miss_20w:
nop nop
nadtlb_check_alias_20w: nadtlb_check_alias_20w:
do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1245,7 +1249,7 @@ dtlb_miss_11: ...@@ -1245,7 +1249,7 @@ dtlb_miss_11:
nop nop
dtlb_check_alias_11: dtlb_check_alias_11:
do_alias spc,t0,t1,va,pte,prot,dtlb_fault do_alias spc,t0,t1,va,pte,prot,dtlb_fault,11
idtlba pte,(va) idtlba pte,(va)
idtlbp prot,(va) idtlbp prot,(va)
...@@ -1277,7 +1281,7 @@ nadtlb_miss_11: ...@@ -1277,7 +1281,7 @@ nadtlb_miss_11:
nop nop
nadtlb_check_alias_11: nadtlb_check_alias_11:
do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,11
idtlba pte,(va) idtlba pte,(va)
idtlbp prot,(va) idtlbp prot,(va)
...@@ -1304,7 +1308,7 @@ dtlb_miss_20: ...@@ -1304,7 +1308,7 @@ dtlb_miss_20:
nop nop
dtlb_check_alias_20: dtlb_check_alias_20:
do_alias spc,t0,t1,va,pte,prot,dtlb_fault do_alias spc,t0,t1,va,pte,prot,dtlb_fault,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1330,7 +1334,7 @@ nadtlb_miss_20: ...@@ -1330,7 +1334,7 @@ nadtlb_miss_20:
nop nop
nadtlb_check_alias_20: nadtlb_check_alias_20:
do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate,20
idtlbt pte,prot idtlbt pte,prot
...@@ -1457,7 +1461,7 @@ naitlb_miss_20w: ...@@ -1457,7 +1461,7 @@ naitlb_miss_20w:
nop nop
naitlb_check_alias_20w: naitlb_check_alias_20w:
do_alias spc,t0,t1,va,pte,prot,naitlb_fault do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
iitlbt pte,prot iitlbt pte,prot
...@@ -1511,7 +1515,7 @@ naitlb_miss_11: ...@@ -1511,7 +1515,7 @@ naitlb_miss_11:
nop nop
naitlb_check_alias_11: naitlb_check_alias_11:
do_alias spc,t0,t1,va,pte,prot,itlb_fault do_alias spc,t0,t1,va,pte,prot,itlb_fault,11
iitlba pte,(%sr0, va) iitlba pte,(%sr0, va)
iitlbp prot,(%sr0, va) iitlbp prot,(%sr0, va)
...@@ -1557,7 +1561,7 @@ naitlb_miss_20: ...@@ -1557,7 +1561,7 @@ naitlb_miss_20:
nop nop
naitlb_check_alias_20: naitlb_check_alias_20:
do_alias spc,t0,t1,va,pte,prot,naitlb_fault do_alias spc,t0,t1,va,pte,prot,naitlb_fault,20
iitlbt pte,prot iitlbt pte,prot
......
...@@ -44,7 +44,6 @@ EXPORT_SYMBOL(__cmpxchg_u64); ...@@ -44,7 +44,6 @@ EXPORT_SYMBOL(__cmpxchg_u64);
#endif #endif
#include <asm/uaccess.h> #include <asm/uaccess.h>
EXPORT_SYMBOL(lstrncpy_from_user);
EXPORT_SYMBOL(lclear_user); EXPORT_SYMBOL(lclear_user);
EXPORT_SYMBOL(lstrnlen_user); EXPORT_SYMBOL(lstrnlen_user);
......
...@@ -50,8 +50,10 @@ SECTIONS ...@@ -50,8 +50,10 @@ SECTIONS
. = KERNEL_BINARY_TEXT_START; . = KERNEL_BINARY_TEXT_START;
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text ALIGN(16) : { .head ALIGN(16) : {
HEAD_TEXT HEAD_TEXT
} = 0
.text ALIGN(16) : {
TEXT_TEXT TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
...@@ -65,7 +67,7 @@ SECTIONS ...@@ -65,7 +67,7 @@ SECTIONS
*(.fixup) *(.fixup)
*(.lock.text) /* out-of-line lock text */ *(.lock.text) /* out-of-line lock text */
*(.gnu.warning) *(.gnu.warning)
} = 0 }
/* End of text section */ /* End of text section */
_etext = .; _etext = .;
......
...@@ -60,47 +60,6 @@ ...@@ -60,47 +60,6 @@
bv %r0(%r1) bv %r0(%r1)
.endm .endm
/*
* long lstrncpy_from_user(char *dst, const char *src, long n)
*
* Returns -EFAULT if exception before terminator,
* N if the entire buffer filled,
* otherwise strlen (i.e. excludes zero byte)
*/
ENTRY(lstrncpy_from_user)
.proc
.callinfo NO_CALLS
.entry
comib,= 0,%r24,$lsfu_done
copy %r24,%r23
get_sr
1: ldbs,ma 1(%sr1,%r25),%r1
$lsfu_loop:
stbs,ma %r1,1(%r26)
comib,=,n 0,%r1,$lsfu_done
addib,<>,n -1,%r24,$lsfu_loop
2: ldbs,ma 1(%sr1,%r25),%r1
$lsfu_done:
sub %r23,%r24,%r28
$lsfu_exit:
bv %r0(%r2)
nop
.exit
ENDPROC(lstrncpy_from_user)
.section .fixup,"ax"
3: fixup_branch $lsfu_exit
ldi -EFAULT,%r28
.previous
.section __ex_table,"aw"
ASM_ULONG_INSN 1b,3b
ASM_ULONG_INSN 2b,3b
.previous
.procend
/* /*
* unsigned long lclear_user(void *to, unsigned long n) * unsigned long lclear_user(void *to, unsigned long n)
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment