You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits) [PARISC] Use symbolic last syscall in __NR_Linux_syscalls [PARISC] Add missing statfs64 and fstatfs64 syscalls Revert "[PARISC] Optimize TLB flush on SMP systems" [PARISC] Compat signal fixes for 64-bit parisc [PARISC] Reorder syscalls to match unistd.h Revert "[PATCH] make kernel/signal.c:kill_proc_info() static" [PARISC] fix sys_rt_sigqueueinfo [PARISC] fix section mismatch warnings in harmony sound driver [PARISC] do not export get_register/set_register [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code [PARISC] convert to use CONFIG_64BIT instead of __LP64__ [PARISC] use CONFIG_64BIT instead of __LP64__ [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro [PARISC] more ENTRY(), ENDPROC(), END() conversions [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc [PARISC] Fixes /proc/cpuinfo cache output on B160L [PARISC] implement standard ENTRY(), END() and ENDPROC() [PARISC] kill ENTRY_SYS_CPUS [PARISC] clean up debugging printks in smp.c [PARISC] factor syscall_restart code out of do_signal ... Fix conflict in include/linux/sched.h due to kill_proc_info() being made publicly available to PARISC again.
This commit is contained in:
@@ -37,6 +37,11 @@ config GENERIC_FIND_NEXT_BIT
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_BUG
|
||||
bool
|
||||
default y
|
||||
depends on BUG
|
||||
|
||||
config GENERIC_HWEIGHT
|
||||
bool
|
||||
default y
|
||||
@@ -45,6 +50,10 @@ config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_TIME
|
||||
bool
|
||||
default y
|
||||
|
||||
config TIME_LOW_RES
|
||||
bool
|
||||
depends on SMP
|
||||
|
||||
@@ -35,12 +35,8 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
|
||||
|
||||
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
|
||||
|
||||
GCC_VERSION := $(call cc-version)
|
||||
ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
|
||||
$(error Sorry, couldn't find ($(cc-version)).)
|
||||
endif
|
||||
ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
|
||||
$(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.)
|
||||
ifneq ($(call cc-ifversion, -lt, 0303, "bad"),)
|
||||
$(error Sorry, GCC v3.3 or above is required.)
|
||||
endif
|
||||
|
||||
cflags-y := -pipe
|
||||
|
||||
@@ -18,17 +18,16 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/assembly.h>
|
||||
#include <linux/sys.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#define ENTRY_NAME(_name_) .word _name_
|
||||
#define ENTRY_NAME(_name_) ASM_ULONG_INSN _name_
|
||||
|
||||
.section .rodata,"a"
|
||||
.align 4
|
||||
.export hpux_call_table
|
||||
.import hpux_unimplemented_wrapper
|
||||
hpux_call_table:
|
||||
ENTRY(hpux_call_table)
|
||||
ENTRY_NAME(sys_ni_syscall) /* 0 */
|
||||
ENTRY_NAME(sys_exit)
|
||||
ENTRY_NAME(hpux_fork_wrapper)
|
||||
@@ -542,5 +541,6 @@ hpux_call_table:
|
||||
ENTRY_NAME(hpux_unimplemented_wrapper) /* 510 */
|
||||
ENTRY_NAME(hpux_unimplemented_wrapper)
|
||||
ENTRY_NAME(hpux_unimplemented_wrapper)
|
||||
END(hpux_call_table)
|
||||
.end
|
||||
|
||||
|
||||
+13
-13
@@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs)
|
||||
int error;
|
||||
char *filename;
|
||||
|
||||
filename = getname((char *) regs->gr[26]);
|
||||
filename = getname((char __user *) regs->gr[26]);
|
||||
error = PTR_ERR(filename);
|
||||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
|
||||
error = do_execve(filename, (char **) regs->gr[25],
|
||||
(char **)regs->gr[24], regs);
|
||||
error = do_execve(filename, (char __user * __user *) regs->gr[25],
|
||||
(char __user * __user *) regs->gr[24], regs);
|
||||
|
||||
if (error == 0) {
|
||||
task_lock(current);
|
||||
@@ -63,19 +63,19 @@ struct hpux_dirent {
|
||||
};
|
||||
|
||||
struct getdents_callback {
|
||||
struct hpux_dirent *current_dir;
|
||||
struct hpux_dirent *previous;
|
||||
struct hpux_dirent __user *current_dir;
|
||||
struct hpux_dirent __user *previous;
|
||||
int count;
|
||||
int error;
|
||||
};
|
||||
|
||||
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
|
||||
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
|
||||
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
|
||||
|
||||
static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
|
||||
u64 ino, unsigned d_type)
|
||||
{
|
||||
struct hpux_dirent * dirent;
|
||||
struct hpux_dirent __user * dirent;
|
||||
struct getdents_callback * buf = (struct getdents_callback *) __buf;
|
||||
ino_t d_ino;
|
||||
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
|
||||
@@ -105,10 +105,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
|
||||
#undef NAME_OFFSET
|
||||
#undef ROUND_UP
|
||||
|
||||
int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count)
|
||||
int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
|
||||
{
|
||||
struct file * file;
|
||||
struct hpux_dirent * lastdirent;
|
||||
struct hpux_dirent __user * lastdirent;
|
||||
struct getdents_callback buf;
|
||||
int error = -EBADF;
|
||||
|
||||
@@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag,
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
|
||||
static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf)
|
||||
{
|
||||
struct hpux_stat64 tmp;
|
||||
|
||||
@@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
|
||||
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
|
||||
long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf)
|
||||
{
|
||||
struct kstat stat;
|
||||
int error = vfs_stat(filename, &stat);
|
||||
@@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
|
||||
return error;
|
||||
}
|
||||
|
||||
long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
|
||||
long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf)
|
||||
{
|
||||
struct kstat stat;
|
||||
int error = vfs_fstat(fd, &stat);
|
||||
@@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
|
||||
return error;
|
||||
}
|
||||
|
||||
long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf)
|
||||
long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf)
|
||||
{
|
||||
struct kstat stat;
|
||||
int error = vfs_lstat(filename, &stat);
|
||||
|
||||
+7
-16
@@ -12,27 +12,18 @@
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/errno.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __LP64__
|
||||
.level 2.0w
|
||||
#else
|
||||
.level 1.1
|
||||
#endif
|
||||
.level LEVEL
|
||||
.text
|
||||
|
||||
#ifdef __LP64__
|
||||
#define FRAME_SIZE 128
|
||||
#else
|
||||
#define FRAME_SIZE 64
|
||||
#endif
|
||||
.import hpux_call_table
|
||||
.import hpux_syscall_exit,code
|
||||
.export hpux_gateway_page
|
||||
|
||||
.align 4096
|
||||
hpux_gateway_page:
|
||||
ENTRY(hpux_gateway_page)
|
||||
nop
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
#warning NEEDS WORK for 64-bit
|
||||
#endif
|
||||
ldw -64(%r30), %r29 ;! 8th argument
|
||||
@@ -101,7 +92,7 @@ hpux_gateway_page:
|
||||
ldo R%hpux_call_table(%r21), %r21
|
||||
comiclr,>>= __NR_HPUX_syscalls, %r22, %r0
|
||||
b,n syscall_nosys
|
||||
ldwx,s %r22(%r21), %r21
|
||||
LDREGX %r22(%r21), %r21
|
||||
ldil L%hpux_syscall_exit,%r2
|
||||
be 0(%sr7,%r21)
|
||||
ldo R%hpux_syscall_exit(%r2),%r2
|
||||
@@ -110,7 +101,7 @@ syscall_nosys:
|
||||
ldil L%hpux_syscall_exit,%r1
|
||||
be R%hpux_syscall_exit(%sr7,%r1)
|
||||
ldo -ENOSYS(%r0),%r28
|
||||
ENDPROC(hpux_gateway_page)
|
||||
|
||||
.align 4096
|
||||
.export end_hpux_gateway_page
|
||||
end_hpux_gateway_page:
|
||||
ENTRY(end_hpux_gateway_page)
|
||||
|
||||
+17
-15
@@ -61,7 +61,7 @@ int hpux_ptrace(void)
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
int hpux_wait(int *stat_loc)
|
||||
int hpux_wait(int __user *stat_loc)
|
||||
{
|
||||
return sys_waitpid(-1, stat_loc, 0);
|
||||
}
|
||||
@@ -255,7 +255,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf)
|
||||
/* TODO: Are these put_user calls OK? Should they pass an int?
|
||||
* (I copied it from sys_i386.c like this.)
|
||||
*/
|
||||
static int hpux_uname(struct hpux_utsname *name)
|
||||
static int hpux_uname(struct hpux_utsname __user *name)
|
||||
{
|
||||
int error;
|
||||
|
||||
@@ -300,14 +300,14 @@ static int hpux_uname(struct hpux_utsname *name)
|
||||
/* Note: HP-UX just uses the old suser() function to check perms
|
||||
* in this system call. We'll use capable(CAP_SYS_ADMIN).
|
||||
*/
|
||||
int hpux_utssys(char *ubuf, int n, int type)
|
||||
int hpux_utssys(char __user *ubuf, int n, int type)
|
||||
{
|
||||
int len;
|
||||
int error;
|
||||
switch( type ) {
|
||||
case 0:
|
||||
/* uname(): */
|
||||
return( hpux_uname( (struct hpux_utsname *)ubuf ) );
|
||||
return hpux_uname((struct hpux_utsname __user *)ubuf);
|
||||
break ;
|
||||
case 1:
|
||||
/* Obsolete (used to be umask().) */
|
||||
@@ -315,8 +315,9 @@ int hpux_utssys(char *ubuf, int n, int type)
|
||||
break ;
|
||||
case 2:
|
||||
/* ustat(): */
|
||||
return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) );
|
||||
break ;
|
||||
return hpux_ustat(new_decode_dev(n),
|
||||
(struct hpux_ustat __user *)ubuf);
|
||||
break;
|
||||
case 3:
|
||||
/* setuname():
|
||||
*
|
||||
@@ -332,7 +333,7 @@ int hpux_utssys(char *ubuf, int n, int type)
|
||||
return -EINVAL ;
|
||||
/* Unlike Linux, HP-UX truncates it if n is too big: */
|
||||
len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
|
||||
return( sys_sethostname(ubuf, len) );
|
||||
return sys_sethostname(ubuf, len);
|
||||
break ;
|
||||
case 4:
|
||||
/* sethostname():
|
||||
@@ -346,7 +347,7 @@ int hpux_utssys(char *ubuf, int n, int type)
|
||||
return -EINVAL ;
|
||||
/* Unlike Linux, HP-UX truncates it if n is too big: */
|
||||
len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
|
||||
return( sys_sethostname(ubuf, len) );
|
||||
return sys_sethostname(ubuf, len);
|
||||
break ;
|
||||
case 5:
|
||||
/* gethostname():
|
||||
@@ -356,7 +357,7 @@ int hpux_utssys(char *ubuf, int n, int type)
|
||||
/* Unlike Linux, HP-UX returns an error if n==0: */
|
||||
if ( n <= 0 )
|
||||
return -EINVAL ;
|
||||
return( sys_gethostname(ubuf, n) );
|
||||
return sys_gethostname(ubuf, n);
|
||||
break ;
|
||||
case 6:
|
||||
/* Supposedly called from setuname() in libc.
|
||||
@@ -420,7 +421,7 @@ int hpux_utssys(char *ubuf, int n, int type)
|
||||
}
|
||||
}
|
||||
|
||||
int hpux_getdomainname(char *name, int len)
|
||||
int hpux_getdomainname(char __user *name, int len)
|
||||
{
|
||||
int nlen;
|
||||
int err = -EFAULT;
|
||||
@@ -471,17 +472,18 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
|
||||
printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1);
|
||||
|
||||
if ( opcode == 1 ) { /* GETFSIND */
|
||||
len = strlen_user((char *)arg1);
|
||||
char __user *user_fsname = (char __user *)arg1;
|
||||
len = strlen_user(user_fsname);
|
||||
printk(KERN_DEBUG "len of arg1 = %d\n", len);
|
||||
if (len == 0)
|
||||
return 0;
|
||||
fsname = kmalloc(len, GFP_KERNEL);
|
||||
if ( !fsname ) {
|
||||
if (!fsname) {
|
||||
printk(KERN_DEBUG "failed to kmalloc fsname\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( copy_from_user(fsname, (char *)arg1, len) ) {
|
||||
if (copy_from_user(fsname, user_fsname, len)) {
|
||||
printk(KERN_DEBUG "failed to copy_from_user fsname\n");
|
||||
kfree(fsname);
|
||||
return 0;
|
||||
@@ -495,7 +497,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
|
||||
fstype = 0;
|
||||
} else {
|
||||
fstype = 0;
|
||||
};
|
||||
}
|
||||
|
||||
kfree(fsname);
|
||||
|
||||
@@ -509,7 +511,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
|
||||
|
||||
|
||||
/* Table of syscall names and handle for unimplemented routines */
|
||||
static const char *syscall_names[] = {
|
||||
static const char * const syscall_names[] = {
|
||||
"nosys", /* 0 */
|
||||
"exit",
|
||||
"fork",
|
||||
|
||||
+19
-26
@@ -20,19 +20,16 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
#warning PA64 support needs more work...did first cut
|
||||
#endif
|
||||
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/assembly.h>
|
||||
#include <asm/signal.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef __LP64__
|
||||
.level 2.0w
|
||||
#else
|
||||
.level 1.1
|
||||
#endif
|
||||
.level LEVEL
|
||||
.text
|
||||
|
||||
/* These should probably go in a header file somewhere.
|
||||
@@ -41,7 +38,7 @@
|
||||
* register save/restore macros.
|
||||
*/
|
||||
.macro reg_save regs
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
#warning NEEDS WORK for 64-bit
|
||||
#endif
|
||||
STREG %r3, PT_GR3(\regs)
|
||||
@@ -82,11 +79,9 @@
|
||||
.endm
|
||||
|
||||
|
||||
.export hpux_fork_wrapper
|
||||
.export hpux_child_return
|
||||
.import sys_fork
|
||||
|
||||
hpux_fork_wrapper:
|
||||
ENTRY(hpux_fork_wrapper)
|
||||
ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs
|
||||
;! pointer in task
|
||||
reg_save %r1
|
||||
@@ -128,27 +123,26 @@ fork_return:
|
||||
fork_exit:
|
||||
bv %r0(%r2)
|
||||
nop
|
||||
ENDPROC(hpux_fork_wrapper)
|
||||
|
||||
/* Set the return value for the child */
|
||||
|
||||
hpux_child_return:
|
||||
ENTRY(hpux_child_return)
|
||||
#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
|
||||
bl schedule_tail, %r2
|
||||
nop
|
||||
bl,n schedule_tail, %r2
|
||||
#endif
|
||||
|
||||
LDREG TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2
|
||||
b fork_return
|
||||
copy %r0,%r28
|
||||
ENDPROC(hpux_child_return)
|
||||
|
||||
.export hpux_execve_wrapper
|
||||
.export hpux_execv_wrapper
|
||||
.import hpux_execve
|
||||
|
||||
hpux_execv_wrapper:
|
||||
ENTRY(hpux_execv_wrapper)
|
||||
copy %r0,%r24 /* NULL environment */
|
||||
|
||||
hpux_execve_wrapper:
|
||||
ENTRY(hpux_execve_wrapper)
|
||||
|
||||
ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs
|
||||
|
||||
@@ -187,13 +181,13 @@ hpux_execve_wrapper:
|
||||
exec_error:
|
||||
bv %r0(%r19)
|
||||
nop
|
||||
ENDPROC(hpux_execv_wrapper)
|
||||
|
||||
.export hpux_pipe_wrapper
|
||||
.import hpux_pipe
|
||||
|
||||
/* HP-UX expects pipefd's returned in r28 & r29 */
|
||||
|
||||
hpux_pipe_wrapper:
|
||||
ENTRY(hpux_pipe_wrapper)
|
||||
STREG %r2,-20(%r30)
|
||||
ldo 64(%r30),%r30
|
||||
bl hpux_pipe,%r2
|
||||
@@ -212,12 +206,11 @@ hpux_pipe_wrapper:
|
||||
pipe_exit:
|
||||
bv %r0(%r2)
|
||||
ldo -64(%r30),%r30
|
||||
ENDPROC(hpux_pipe_wrapper)
|
||||
|
||||
.export hpux_syscall_exit
|
||||
.import syscall_exit
|
||||
|
||||
hpux_syscall_exit:
|
||||
|
||||
ENTRY(hpux_syscall_exit)
|
||||
/*
|
||||
*
|
||||
* HP-UX call return conventions:
|
||||
@@ -246,12 +239,12 @@ hpux_syscall_exit:
|
||||
ldo 1(%r0),%r22
|
||||
|
||||
no_error:
|
||||
b syscall_exit
|
||||
nop
|
||||
b,n syscall_exit
|
||||
ENDPROC(hpux_syscall_exit)
|
||||
|
||||
.export hpux_unimplemented_wrapper
|
||||
.import hpux_unimplemented
|
||||
|
||||
hpux_unimplemented_wrapper:
|
||||
ENTRY(hpux_unimplemented_wrapper)
|
||||
b hpux_unimplemented
|
||||
STREG %r22,-64(%r30) /* overwrite arg8 with syscall number */
|
||||
ENDPROC(hpux_unimplemented_wrapper)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#define BLANK() asm volatile("\n->" : : )
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
#define FRAME_SIZE 128
|
||||
#else
|
||||
#define FRAME_SIZE 64
|
||||
|
||||
+176
-12
@@ -68,16 +68,6 @@ flush_cache_all_local(void)
|
||||
}
|
||||
EXPORT_SYMBOL(flush_cache_all_local);
|
||||
|
||||
/* flushes EVERYTHING (tlb & cache) */
|
||||
|
||||
void
|
||||
flush_all_caches(void)
|
||||
{
|
||||
flush_cache_all();
|
||||
flush_tlb_all();
|
||||
}
|
||||
EXPORT_SYMBOL(flush_all_caches);
|
||||
|
||||
void
|
||||
update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
|
||||
{
|
||||
@@ -99,7 +89,7 @@ show_cache_info(struct seq_file *m)
|
||||
|
||||
seq_printf(m, "I-cache\t\t: %ld KB\n",
|
||||
cache_info.ic_size/1024 );
|
||||
if (cache_info.dc_loop == 1)
|
||||
if (cache_info.dc_loop != 1)
|
||||
snprintf(buf, 32, "%lu-way associative", cache_info.dc_loop);
|
||||
seq_printf(m, "D-cache\t\t: %ld KB (%s%s, %s)\n",
|
||||
cache_info.dc_size/1024,
|
||||
@@ -270,6 +260,83 @@ void disable_sr_hashing(void)
|
||||
panic("SpaceID hashing is still on!\n");
|
||||
}
|
||||
|
||||
/* Simple function to work out if we have an existing address translation
|
||||
* for a user space vma. */
|
||||
static inline int translation_exists(struct vm_area_struct *vma,
|
||||
unsigned long addr, unsigned long pfn)
|
||||
{
|
||||
pgd_t *pgd = pgd_offset(vma->vm_mm, addr);
|
||||
pmd_t *pmd;
|
||||
pte_t pte;
|
||||
|
||||
if(pgd_none(*pgd))
|
||||
return 0;
|
||||
|
||||
pmd = pmd_offset(pgd, addr);
|
||||
if(pmd_none(*pmd) || pmd_bad(*pmd))
|
||||
return 0;
|
||||
|
||||
/* We cannot take the pte lock here: flush_cache_page is usually
|
||||
* called with pte lock already held. Whereas flush_dcache_page
|
||||
* takes flush_dcache_mmap_lock, which is lower in the hierarchy:
|
||||
* the vma itself is secure, but the pte might come or go racily.
|
||||
*/
|
||||
pte = *pte_offset_map(pmd, addr);
|
||||
/* But pte_unmap() does nothing on this architecture */
|
||||
|
||||
/* Filter out coincidental file entries and swap entries */
|
||||
if (!(pte_val(pte) & (_PAGE_FLUSH|_PAGE_PRESENT)))
|
||||
return 0;
|
||||
|
||||
return pte_pfn(pte) == pfn;
|
||||
}
|
||||
|
||||
/* Private function to flush a page from the cache of a non-current
|
||||
* process. cr25 contains the Page Directory of the current user
|
||||
* process; we're going to hijack both it and the user space %sr3 to
|
||||
* temporarily make the non-current process current. We have to do
|
||||
* this because cache flushing may cause a non-access tlb miss which
|
||||
* the handlers have to fill in from the pgd of the non-current
|
||||
* process. */
|
||||
static inline void
|
||||
flush_user_cache_page_non_current(struct vm_area_struct *vma,
|
||||
unsigned long vmaddr)
|
||||
{
|
||||
/* save the current process space and pgd */
|
||||
unsigned long space = mfsp(3), pgd = mfctl(25);
|
||||
|
||||
/* we don't mind taking interrups since they may not
|
||||
* do anything with user space, but we can't
|
||||
* be preempted here */
|
||||
preempt_disable();
|
||||
|
||||
/* make us current */
|
||||
mtctl(__pa(vma->vm_mm->pgd), 25);
|
||||
mtsp(vma->vm_mm->context, 3);
|
||||
|
||||
flush_user_dcache_page(vmaddr);
|
||||
if(vma->vm_flags & VM_EXEC)
|
||||
flush_user_icache_page(vmaddr);
|
||||
|
||||
/* put the old current process back */
|
||||
mtsp(space, 3);
|
||||
mtctl(pgd, 25);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
__flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr)
|
||||
{
|
||||
if (likely(vma->vm_mm->context == mfsp(3))) {
|
||||
flush_user_dcache_page(vmaddr);
|
||||
if (vma->vm_flags & VM_EXEC)
|
||||
flush_user_icache_page(vmaddr);
|
||||
} else {
|
||||
flush_user_cache_page_non_current(vma, vmaddr);
|
||||
}
|
||||
}
|
||||
|
||||
void flush_dcache_page(struct page *page)
|
||||
{
|
||||
struct address_space *mapping = page_mapping(page);
|
||||
@@ -342,7 +409,7 @@ void clear_user_page_asm(void *page, unsigned long vaddr)
|
||||
#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
|
||||
int parisc_cache_flush_threshold __read_mostly = FLUSH_THRESHOLD;
|
||||
|
||||
void parisc_setup_cache_timing(void)
|
||||
void __init parisc_setup_cache_timing(void)
|
||||
{
|
||||
unsigned long rangetime, alltime;
|
||||
unsigned long size;
|
||||
@@ -366,6 +433,9 @@ void parisc_setup_cache_timing(void)
|
||||
if (!parisc_cache_flush_threshold)
|
||||
parisc_cache_flush_threshold = FLUSH_THRESHOLD;
|
||||
|
||||
if (parisc_cache_flush_threshold > cache_info.dc_size)
|
||||
parisc_cache_flush_threshold = cache_info.dc_size;
|
||||
|
||||
printk(KERN_INFO "Setting cache flush threshold to %x (%d CPUs online)\n", parisc_cache_flush_threshold, num_online_cpus());
|
||||
}
|
||||
|
||||
@@ -410,3 +480,97 @@ void kunmap_parisc(void *addr)
|
||||
}
|
||||
EXPORT_SYMBOL(kunmap_parisc);
|
||||
#endif
|
||||
|
||||
void __flush_tlb_range(unsigned long sid, unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
unsigned long npages;
|
||||
|
||||
npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
|
||||
if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */
|
||||
flush_tlb_all();
|
||||
else {
|
||||
mtsp(sid, 1);
|
||||
purge_tlb_start();
|
||||
if (split_tlb) {
|
||||
while (npages--) {
|
||||
pdtlb(start);
|
||||
pitlb(start);
|
||||
start += PAGE_SIZE;
|
||||
}
|
||||
} else {
|
||||
while (npages--) {
|
||||
pdtlb(start);
|
||||
start += PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
purge_tlb_end();
|
||||
}
|
||||
}
|
||||
|
||||
static void cacheflush_h_tmp_function(void *dummy)
|
||||
{
|
||||
flush_cache_all_local();
|
||||
}
|
||||
|
||||
void flush_cache_all(void)
|
||||
{
|
||||
on_each_cpu(cacheflush_h_tmp_function, NULL, 1, 1);
|
||||
}
|
||||
|
||||
void flush_cache_mm(struct mm_struct *mm)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
flush_cache_all();
|
||||
#else
|
||||
flush_cache_all_local();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
flush_user_dcache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
if ((end - start) < parisc_cache_flush_threshold)
|
||||
flush_user_dcache_range_asm(start,end);
|
||||
else
|
||||
flush_data_cache();
|
||||
}
|
||||
|
||||
void
|
||||
flush_user_icache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
if ((end - start) < parisc_cache_flush_threshold)
|
||||
flush_user_icache_range_asm(start,end);
|
||||
else
|
||||
flush_instruction_cache();
|
||||
}
|
||||
|
||||
|
||||
void flush_cache_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
{
|
||||
int sr3;
|
||||
|
||||
if (!vma->vm_mm->context) {
|
||||
BUG();
|
||||
return;
|
||||
}
|
||||
|
||||
sr3 = mfsp(3);
|
||||
if (vma->vm_mm->context == sr3) {
|
||||
flush_user_dcache_range(start,end);
|
||||
flush_user_icache_range(start,end);
|
||||
} else {
|
||||
flush_cache_all();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn)
|
||||
{
|
||||
BUG_ON(!vma->vm_mm->context);
|
||||
|
||||
if (likely(translation_exists(vma, vmaddr, pfn)))
|
||||
__flush_cache_page(vma, vmaddr);
|
||||
|
||||
}
|
||||
|
||||
@@ -562,12 +562,23 @@ pa_dev_attr(rev, id.hversion_rev, "0x%x\n");
|
||||
pa_dev_attr_id(hversion, "0x%03x\n");
|
||||
pa_dev_attr_id(sversion, "0x%05x\n");
|
||||
|
||||
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct parisc_device *padev = to_parisc_device(dev);
|
||||
struct parisc_device_id *id = &padev->id;
|
||||
|
||||
return sprintf(buf, "parisc:t%02Xhv%04Xrev%02Xsv%08X\n",
|
||||
(u8)id->hw_type, (u16)id->hversion, (u8)id->hversion_rev,
|
||||
(u32)id->sversion);
|
||||
}
|
||||
|
||||
static struct device_attribute parisc_device_attrs[] = {
|
||||
__ATTR_RO(irq),
|
||||
__ATTR_RO(hw_type),
|
||||
__ATTR_RO(rev),
|
||||
__ATTR_RO(hversion),
|
||||
__ATTR_RO(sversion),
|
||||
__ATTR_RO(modalias),
|
||||
__ATTR_NULL,
|
||||
};
|
||||
|
||||
@@ -689,7 +700,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
|
||||
.fn = check_parent,
|
||||
};
|
||||
|
||||
device_for_each_child(parent, &recurse_data, descend_children);
|
||||
if (device_for_each_child(parent, &recurse_data, descend_children))
|
||||
/* nothing */;
|
||||
|
||||
return d.dev;
|
||||
}
|
||||
|
||||
@@ -835,8 +848,8 @@ static void print_parisc_device(struct parisc_device *dev)
|
||||
static int count;
|
||||
|
||||
print_pa_hwpath(dev, hw_path);
|
||||
printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
|
||||
++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type,
|
||||
printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
|
||||
++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
|
||||
dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
|
||||
|
||||
if (dev->num_addrs) {
|
||||
|
||||
+103
-138
@@ -37,6 +37,8 @@
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define CMPIB cmpib,*
|
||||
#define CMPB cmpb,*
|
||||
@@ -648,13 +650,11 @@
|
||||
* the static part of the kernel address space.
|
||||
*/
|
||||
|
||||
.export fault_vector_20
|
||||
|
||||
.text
|
||||
|
||||
.align 4096
|
||||
|
||||
fault_vector_20:
|
||||
ENTRY(fault_vector_20)
|
||||
/* First vector is invalid (0) */
|
||||
.ascii "cows can fly"
|
||||
.byte 0
|
||||
@@ -695,14 +695,13 @@ fault_vector_20:
|
||||
def 29
|
||||
def 30
|
||||
def 31
|
||||
END(fault_vector_20)
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
|
||||
.export fault_vector_11
|
||||
|
||||
.align 2048
|
||||
|
||||
fault_vector_11:
|
||||
ENTRY(fault_vector_11)
|
||||
/* First vector is invalid (0) */
|
||||
.ascii "cows can fly"
|
||||
.byte 0
|
||||
@@ -743,6 +742,7 @@ fault_vector_11:
|
||||
def 29
|
||||
def 30
|
||||
def 31
|
||||
END(fault_vector_11)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -762,9 +762,8 @@ fault_vector_11:
|
||||
#define CLONE_VM 0x100 /* Must agree with <linux/sched.h> */
|
||||
#define CLONE_UNTRACED 0x00800000
|
||||
|
||||
.export __kernel_thread, code
|
||||
.import do_fork
|
||||
__kernel_thread:
|
||||
ENTRY(__kernel_thread)
|
||||
STREG %r2, -RP_OFFSET(%r30)
|
||||
|
||||
copy %r30, %r1
|
||||
@@ -797,6 +796,7 @@ __kernel_thread:
|
||||
ldo -PT_SZ_ALGN(%r30), %r30
|
||||
bv %r0(%r2)
|
||||
nop
|
||||
ENDPROC(__kernel_thread)
|
||||
|
||||
/*
|
||||
* Child Returns here
|
||||
@@ -805,8 +805,7 @@ __kernel_thread:
|
||||
* into task save area.
|
||||
*/
|
||||
|
||||
.export ret_from_kernel_thread
|
||||
ret_from_kernel_thread:
|
||||
ENTRY(ret_from_kernel_thread)
|
||||
|
||||
/* Call schedule_tail first though */
|
||||
BL schedule_tail, %r2
|
||||
@@ -833,10 +832,10 @@ ret_from_kernel_thread:
|
||||
bv %r0(%r1)
|
||||
#endif
|
||||
ldi 0, %r26
|
||||
ENDPROC(ret_from_kernel_thread)
|
||||
|
||||
.import sys_execve, code
|
||||
.export __execve, code
|
||||
__execve:
|
||||
ENTRY(__execve)
|
||||
copy %r2, %r15
|
||||
copy %r30, %r16
|
||||
ldo PT_SZ_ALGN(%r30), %r30
|
||||
@@ -856,16 +855,15 @@ __execve:
|
||||
copy %r16, %r30
|
||||
bv %r0(%r2)
|
||||
nop
|
||||
ENDPROC(__execve)
|
||||
|
||||
.align 4
|
||||
|
||||
/*
|
||||
* struct task_struct *_switch_to(struct task_struct *prev,
|
||||
* struct task_struct *next)
|
||||
*
|
||||
* switch kernel stacks and return prev */
|
||||
.export _switch_to, code
|
||||
_switch_to:
|
||||
ENTRY(_switch_to)
|
||||
STREG %r2, -RP_OFFSET(%r30)
|
||||
|
||||
callee_save_float
|
||||
@@ -890,6 +888,7 @@ _switch_to_ret:
|
||||
LDREG -RP_OFFSET(%r30), %r2
|
||||
bv %r0(%r2)
|
||||
copy %r26, %r28
|
||||
ENDPROC(_switch_to)
|
||||
|
||||
/*
|
||||
* Common rfi return path for interruptions, kernel execve, and
|
||||
@@ -907,8 +906,7 @@ _switch_to_ret:
|
||||
|
||||
.align 4096
|
||||
|
||||
.export syscall_exit_rfi
|
||||
syscall_exit_rfi:
|
||||
ENTRY(syscall_exit_rfi)
|
||||
mfctl %cr30,%r16
|
||||
LDREG TI_TASK(%r16), %r16 /* thread_info -> task_struct */
|
||||
ldo TASK_REGS(%r16),%r16
|
||||
@@ -978,11 +976,36 @@ intr_check_resched:
|
||||
LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_NEED_RESCHED */
|
||||
bb,<,n %r19,31-TIF_NEED_RESCHED,intr_do_resched /* forward */
|
||||
|
||||
.import do_notify_resume,code
|
||||
intr_check_sig:
|
||||
/* As above */
|
||||
mfctl %cr30,%r1
|
||||
LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_SIGPENDING */
|
||||
bb,<,n %r19, 31-TIF_SIGPENDING, intr_do_signal /* forward */
|
||||
LDREG TI_FLAGS(%r1),%r19
|
||||
ldi (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %r20
|
||||
and,COND(<>) %r19, %r20, %r0
|
||||
b,n intr_restore /* skip past if we've nothing to do */
|
||||
|
||||
/* This check is critical to having LWS
|
||||
* working. The IASQ is zero on the gateway
|
||||
* page and we cannot deliver any signals until
|
||||
* we get off the gateway page.
|
||||
*
|
||||
* Only do signals if we are returning to user space
|
||||
*/
|
||||
LDREG PT_IASQ0(%r16), %r20
|
||||
CMPIB=,n 0,%r20,intr_restore /* backward */
|
||||
LDREG PT_IASQ1(%r16), %r20
|
||||
CMPIB=,n 0,%r20,intr_restore /* backward */
|
||||
|
||||
copy %r0, %r25 /* long in_syscall = 0 */
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#endif
|
||||
|
||||
BL do_notify_resume,%r2
|
||||
copy %r16, %r26 /* struct pt_regs *regs */
|
||||
|
||||
b,n intr_check_sig
|
||||
|
||||
intr_restore:
|
||||
copy %r16,%r29
|
||||
@@ -1072,35 +1095,6 @@ intr_do_preempt:
|
||||
b,n intr_restore /* ssm PSW_SM_I done by intr_restore */
|
||||
#endif /* CONFIG_PREEMPT */
|
||||
|
||||
.import do_signal,code
|
||||
intr_do_signal:
|
||||
/*
|
||||
This check is critical to having LWS
|
||||
working. The IASQ is zero on the gateway
|
||||
page and we cannot deliver any signals until
|
||||
we get off the gateway page.
|
||||
|
||||
Only do signals if we are returning to user space
|
||||
*/
|
||||
LDREG PT_IASQ0(%r16), %r20
|
||||
CMPIB= 0,%r20,intr_restore /* backward */
|
||||
nop
|
||||
LDREG PT_IASQ1(%r16), %r20
|
||||
CMPIB= 0,%r20,intr_restore /* backward */
|
||||
nop
|
||||
|
||||
copy %r0, %r24 /* unsigned long in_syscall */
|
||||
copy %r16, %r25 /* struct pt_regs *regs */
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#endif
|
||||
|
||||
BL do_signal,%r2
|
||||
copy %r0, %r26 /* sigset_t *oldset = NULL */
|
||||
|
||||
b intr_check_sig
|
||||
nop
|
||||
|
||||
/*
|
||||
* External interrupts.
|
||||
*/
|
||||
@@ -1115,11 +1109,7 @@ intr_extint:
|
||||
mfctl %cr31,%r1
|
||||
copy %r30,%r17
|
||||
/* FIXME! depi below has hardcoded idea of interrupt stack size (32k)*/
|
||||
#ifdef CONFIG_64BIT
|
||||
depdi 0,63,15,%r17
|
||||
#else
|
||||
depi 0,31,15,%r17
|
||||
#endif
|
||||
DEPI 0,31,15,%r17
|
||||
CMPB=,n %r1,%r17,2f
|
||||
get_stack_use_cr31
|
||||
b,n 3f
|
||||
@@ -1148,13 +1138,12 @@ intr_extint:
|
||||
|
||||
b do_cpu_irq_mask
|
||||
ldo R%intr_return(%r2), %r2 /* return to intr_return, not here */
|
||||
ENDPROC(syscall_exit_rfi)
|
||||
|
||||
|
||||
/* Generic interruptions (illegal insn, unaligned, page fault, etc) */
|
||||
|
||||
.export intr_save, code /* for os_hpmc */
|
||||
|
||||
intr_save:
|
||||
ENTRY(intr_save) /* for os_hpmc */
|
||||
mfsp %sr7,%r16
|
||||
CMPIB=,n 0,%r16,1f
|
||||
get_stack_use_cr30
|
||||
@@ -1229,6 +1218,7 @@ skip_save_ior:
|
||||
|
||||
b handle_interruption
|
||||
ldo R%intr_check_sig(%r2), %r2
|
||||
ENDPROC(intr_save)
|
||||
|
||||
|
||||
/*
|
||||
@@ -1814,9 +1804,7 @@ dtlb_fault:
|
||||
LDREG PT_GR18(\regs),%r18
|
||||
.endm
|
||||
|
||||
.export sys_fork_wrapper
|
||||
.export child_return
|
||||
sys_fork_wrapper:
|
||||
ENTRY(sys_fork_wrapper)
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
|
||||
ldo TASK_REGS(%r1),%r1
|
||||
reg_save %r1
|
||||
@@ -1853,9 +1841,10 @@ wrapper_exit:
|
||||
ldi __NR_fork,%r20
|
||||
bv %r0(%r2)
|
||||
STREG %r20,PT_GR20(%r1)
|
||||
ENDPROC(sys_fork_wrapper)
|
||||
|
||||
/* Set the return value for the child */
|
||||
child_return:
|
||||
ENTRY(child_return)
|
||||
BL schedule_tail, %r2
|
||||
nop
|
||||
|
||||
@@ -1863,10 +1852,10 @@ child_return:
|
||||
LDREG TASK_PT_GR19(%r1),%r2
|
||||
b wrapper_exit
|
||||
copy %r0,%r28
|
||||
ENDPROC(child_return)
|
||||
|
||||
|
||||
.export sys_clone_wrapper
|
||||
sys_clone_wrapper:
|
||||
|
||||
ENTRY(sys_clone_wrapper)
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1),%r1 /* get pt regs */
|
||||
reg_save %r1
|
||||
@@ -1887,9 +1876,10 @@ sys_clone_wrapper:
|
||||
|
||||
b wrapper_exit
|
||||
LDREG -RP_OFFSET-FRAME_SIZE(%r30),%r2
|
||||
ENDPROC(sys_clone_wrapper)
|
||||
|
||||
.export sys_vfork_wrapper
|
||||
sys_vfork_wrapper:
|
||||
|
||||
ENTRY(sys_vfork_wrapper)
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1),%r1 /* get pt regs */
|
||||
reg_save %r1
|
||||
@@ -1910,6 +1900,7 @@ sys_vfork_wrapper:
|
||||
|
||||
b wrapper_exit
|
||||
LDREG -RP_OFFSET-FRAME_SIZE(%r30),%r2
|
||||
ENDPROC(sys_vfork_wrapper)
|
||||
|
||||
|
||||
.macro execve_wrapper execve
|
||||
@@ -1946,22 +1937,19 @@ error_\execve:
|
||||
nop
|
||||
.endm
|
||||
|
||||
.export sys_execve_wrapper
|
||||
.import sys_execve
|
||||
|
||||
sys_execve_wrapper:
|
||||
ENTRY(sys_execve_wrapper)
|
||||
execve_wrapper sys_execve
|
||||
ENDPROC(sys_execve_wrapper)
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
.export sys32_execve_wrapper
|
||||
.import sys32_execve
|
||||
|
||||
sys32_execve_wrapper:
|
||||
ENTRY(sys32_execve_wrapper)
|
||||
execve_wrapper sys32_execve
|
||||
ENDPROC(sys32_execve_wrapper)
|
||||
#endif
|
||||
|
||||
.export sys_rt_sigreturn_wrapper
|
||||
sys_rt_sigreturn_wrapper:
|
||||
ENTRY(sys_rt_sigreturn_wrapper)
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26
|
||||
ldo TASK_REGS(%r26),%r26 /* get pt regs */
|
||||
/* Don't save regs, we are going to restore them from sigcontext. */
|
||||
@@ -1989,9 +1977,9 @@ sys_rt_sigreturn_wrapper:
|
||||
*/
|
||||
bv %r0(%r2)
|
||||
LDREG PT_GR28(%r1),%r28 /* reload original r28 for syscall_exit */
|
||||
ENDPROC(sys_rt_sigreturn_wrapper)
|
||||
|
||||
.export sys_sigaltstack_wrapper
|
||||
sys_sigaltstack_wrapper:
|
||||
ENTRY(sys_sigaltstack_wrapper)
|
||||
/* Get the user stack pointer */
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1),%r24 /* get pt regs */
|
||||
@@ -1999,10 +1987,10 @@ sys_sigaltstack_wrapper:
|
||||
STREG %r2, -RP_OFFSET(%r30)
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo FRAME_SIZE(%r30), %r30
|
||||
b,l do_sigaltstack,%r2
|
||||
BL do_sigaltstack,%r2
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#else
|
||||
bl do_sigaltstack,%r2
|
||||
BL do_sigaltstack,%r2
|
||||
ldo FRAME_SIZE(%r30), %r30
|
||||
#endif
|
||||
|
||||
@@ -2010,53 +1998,26 @@ sys_sigaltstack_wrapper:
|
||||
LDREG -RP_OFFSET(%r30), %r2
|
||||
bv %r0(%r2)
|
||||
nop
|
||||
ENDPROC(sys_sigaltstack_wrapper)
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
.export sys32_sigaltstack_wrapper
|
||||
sys32_sigaltstack_wrapper:
|
||||
ENTRY(sys32_sigaltstack_wrapper)
|
||||
/* Get the user stack pointer */
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r24
|
||||
LDREG TASK_PT_GR30(%r24),%r24
|
||||
STREG %r2, -RP_OFFSET(%r30)
|
||||
ldo FRAME_SIZE(%r30), %r30
|
||||
b,l do_sigaltstack32,%r2
|
||||
BL do_sigaltstack32,%r2
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
|
||||
ldo -FRAME_SIZE(%r30), %r30
|
||||
LDREG -RP_OFFSET(%r30), %r2
|
||||
bv %r0(%r2)
|
||||
nop
|
||||
ENDPROC(sys32_sigaltstack_wrapper)
|
||||
#endif
|
||||
|
||||
.export sys_rt_sigsuspend_wrapper
|
||||
sys_rt_sigsuspend_wrapper:
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
|
||||
ldo TASK_REGS(%r1),%r24
|
||||
reg_save %r24
|
||||
|
||||
STREG %r2, -RP_OFFSET(%r30)
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo FRAME_SIZE(%r30), %r30
|
||||
b,l sys_rt_sigsuspend,%r2
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#else
|
||||
bl sys_rt_sigsuspend,%r2
|
||||
ldo FRAME_SIZE(%r30), %r30
|
||||
#endif
|
||||
|
||||
ldo -FRAME_SIZE(%r30), %r30
|
||||
LDREG -RP_OFFSET(%r30), %r2
|
||||
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
|
||||
ldo TASK_REGS(%r1),%r1
|
||||
reg_restore %r1
|
||||
|
||||
bv %r0(%r2)
|
||||
nop
|
||||
|
||||
.export syscall_exit
|
||||
syscall_exit:
|
||||
|
||||
ENTRY(syscall_exit)
|
||||
/* NOTE: HP-UX syscalls also come through here
|
||||
* after hpux_syscall_exit fixes up return
|
||||
* values. */
|
||||
@@ -2119,9 +2080,35 @@ syscall_check_resched:
|
||||
LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */
|
||||
bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */
|
||||
|
||||
.import do_signal,code
|
||||
syscall_check_sig:
|
||||
LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* get ti flags */
|
||||
bb,<,n %r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */
|
||||
LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19
|
||||
ldi (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %r26
|
||||
and,COND(<>) %r19, %r26, %r0
|
||||
b,n syscall_restore /* skip past if we've nothing to do */
|
||||
|
||||
syscall_do_signal:
|
||||
/* Save callee-save registers (for sigcontext).
|
||||
* FIXME: After this point the process structure should be
|
||||
* consistent with all the relevant state of the process
|
||||
* before the syscall. We need to verify this.
|
||||
*/
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1), %r26 /* struct pt_regs *regs */
|
||||
reg_save %r26
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#endif
|
||||
|
||||
BL do_notify_resume,%r2
|
||||
ldi 1, %r25 /* long in_syscall = 1 */
|
||||
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1), %r20 /* reload pt_regs */
|
||||
reg_restore %r20
|
||||
|
||||
b,n syscall_check_sig
|
||||
|
||||
syscall_restore:
|
||||
/* Are we being ptraced? */
|
||||
@@ -2259,31 +2246,10 @@ syscall_do_resched:
|
||||
#endif
|
||||
b syscall_check_bh /* if resched, we start over again */
|
||||
nop
|
||||
ENDPROC(syscall_exit)
|
||||
|
||||
.import do_signal,code
|
||||
syscall_do_signal:
|
||||
/* Save callee-save registers (for sigcontext).
|
||||
FIXME: After this point the process structure should be
|
||||
consistent with all the relevant state of the process
|
||||
before the syscall. We need to verify this. */
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1), %r25 /* struct pt_regs *regs */
|
||||
reg_save %r25
|
||||
|
||||
ldi 1, %r24 /* unsigned long in_syscall */
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#endif
|
||||
BL do_signal,%r2
|
||||
copy %r0, %r26 /* sigset_t *oldset = NULL */
|
||||
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1), %r20 /* reload pt_regs */
|
||||
reg_restore %r20
|
||||
|
||||
b,n syscall_check_sig
|
||||
|
||||
get_register:
|
||||
/*
|
||||
* get_register is used by the non access tlb miss handlers to
|
||||
* copy the value of the general register specified in r8 into
|
||||
@@ -2294,8 +2260,6 @@ syscall_do_signal:
|
||||
* a -1 in it, but that is OK, it just means that we will have
|
||||
* to use the slow path instead).
|
||||
*/
|
||||
|
||||
get_register:
|
||||
blr %r8,%r0
|
||||
nop
|
||||
bv %r0(%r25) /* r0 */
|
||||
@@ -2363,13 +2327,13 @@ get_register:
|
||||
bv %r0(%r25) /* r31 */
|
||||
copy %r31,%r1
|
||||
|
||||
|
||||
set_register:
|
||||
/*
|
||||
* set_register is used by the non access tlb miss handlers to
|
||||
* copy the value of r1 into the general register specified in
|
||||
* r8.
|
||||
*/
|
||||
|
||||
set_register:
|
||||
blr %r8,%r0
|
||||
nop
|
||||
bv %r0(%r25) /* r0 (silly, but it is a place holder) */
|
||||
@@ -2436,3 +2400,4 @@ set_register:
|
||||
copy %r1,%r30
|
||||
bv %r0(%r25) /* r31 */
|
||||
copy %r1,%r31
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(pdc_lock);
|
||||
static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
|
||||
static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
#define WIDE_FIRMWARE 0x1
|
||||
#define NARROW_FIRMWARE 0x2
|
||||
|
||||
@@ -94,12 +94,12 @@ int parisc_narrow_firmware __read_mostly = 1;
|
||||
* when running a 64-bit kernel on such boxes (e.g. C200 or C360).
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
long real64_call(unsigned long function, ...);
|
||||
#endif
|
||||
long real32_call(unsigned long function, ...);
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
# define MEM_PDC (unsigned long)(PAGE0->mem_pdc_hi) << 32 | PAGE0->mem_pdc
|
||||
# define mem_pdc_call(args...) unlikely(parisc_narrow_firmware) ? real32_call(MEM_PDC, args) : real64_call(MEM_PDC, args)
|
||||
#else
|
||||
@@ -117,7 +117,7 @@ long real32_call(unsigned long function, ...);
|
||||
*/
|
||||
static unsigned long f_extend(unsigned long address)
|
||||
{
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
if(unlikely(parisc_narrow_firmware)) {
|
||||
if((address & 0xff000000) == 0xf0000000)
|
||||
return 0xf0f0f0f000000000UL | (u32)address;
|
||||
@@ -139,7 +139,7 @@ static unsigned long f_extend(unsigned long address)
|
||||
*/
|
||||
static void convert_to_wide(unsigned long *addr)
|
||||
{
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
int i;
|
||||
unsigned int *p = (unsigned int *)addr;
|
||||
|
||||
@@ -158,7 +158,7 @@ static void convert_to_wide(unsigned long *addr)
|
||||
*/
|
||||
void __init set_firmware_width(void)
|
||||
{
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
int retval;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -238,7 +238,7 @@ int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_inf
|
||||
*
|
||||
* Must be correctly formatted or expect system crash
|
||||
*/
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
|
||||
{
|
||||
int retval = 0;
|
||||
@@ -949,7 +949,7 @@ int pdc_tod_set(unsigned long sec, unsigned long usec)
|
||||
}
|
||||
EXPORT_SYMBOL(pdc_tod_set);
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
|
||||
struct pdc_memory_table *tbl, unsigned long entries)
|
||||
{
|
||||
@@ -965,7 +965,7 @@ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
|
||||
|
||||
return retval;
|
||||
}
|
||||
#endif /* __LP64__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
/* FIXME: Is this pdc used? I could not find type reference to ftc_bitmap
|
||||
* so I guessed at unsigned long. Someone who knows what this does, can fix
|
||||
@@ -1204,7 +1204,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
|
||||
}
|
||||
EXPORT_SYMBOL(pdc_sti_call);
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
/**
|
||||
* pdc_pat_cell_get_number - Returns the cell number.
|
||||
* @cell_info: The return buffer.
|
||||
@@ -1387,7 +1387,7 @@ int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val)
|
||||
|
||||
return retval;
|
||||
}
|
||||
#endif /* __LP64__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
|
||||
/***************** 32-bit real-mode calls ***********/
|
||||
@@ -1445,7 +1445,7 @@ long real32_call(unsigned long fn, ...)
|
||||
return real32_call_asm(&real_stack.sp, &real_stack.arg0, fn);
|
||||
}
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
/***************** 64-bit real-mode calls ***********/
|
||||
|
||||
struct wide_stack {
|
||||
@@ -1496,5 +1496,5 @@ long real64_call(unsigned long fn, ...)
|
||||
return real64_call_asm(&real64_stack.sp, &real64_stack.arg0, fn);
|
||||
}
|
||||
|
||||
#endif /* __LP64__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1999 by Helge Deller
|
||||
* Copyright (C) 1999-2007 by Helge Deller <deller@gmx.de>
|
||||
* Copyright 1999 SuSE GmbH (Philipp Rumpf)
|
||||
* Copyright 1999 Philipp Rumpf (prumpf@tux.org)
|
||||
* Copyright 2000 Hewlett Packard (Paul Bame, bame@puffin.external.hp.com)
|
||||
@@ -19,16 +19,17 @@
|
||||
#include <asm/assembly.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
.level LEVEL
|
||||
|
||||
.data
|
||||
|
||||
.export boot_args
|
||||
boot_args:
|
||||
ENTRY(boot_args)
|
||||
.word 0 /* arg0 */
|
||||
.word 0 /* arg1 */
|
||||
.word 0 /* arg2 */
|
||||
.word 0 /* arg3 */
|
||||
END(boot_args)
|
||||
|
||||
.text
|
||||
.align 4
|
||||
@@ -38,10 +39,9 @@ boot_args:
|
||||
.import fault_vector_11,code /* IVA parisc 1.1 32 bit */
|
||||
.import $global$ /* forward declaration */
|
||||
#endif /*!CONFIG_64BIT*/
|
||||
.export stext
|
||||
.export _stext,data /* Kernel want it this way! */
|
||||
_stext:
|
||||
stext:
|
||||
ENTRY(stext)
|
||||
.proc
|
||||
.callinfo
|
||||
|
||||
@@ -343,6 +343,9 @@ smp_slave_stext:
|
||||
|
||||
.procend
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
ENDPROC(stext)
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
.data
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#include <asm/assembly.h>
|
||||
#include <asm/pdc.h>
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
* stack for os_hpmc, the HPMC handler.
|
||||
* buffer for IODC procedures (for the HPMC handler).
|
||||
@@ -69,17 +71,15 @@ hpmc_raddr:
|
||||
|
||||
#define HPMC_PIM_DATA_SIZE 896 /* Enough to hold all architected 2.0 state */
|
||||
|
||||
.export hpmc_pim_data, data
|
||||
.align 8
|
||||
hpmc_pim_data:
|
||||
ENTRY(hpmc_pim_data)
|
||||
.block HPMC_PIM_DATA_SIZE
|
||||
END(hpmc_pim_data)
|
||||
|
||||
.text
|
||||
|
||||
.export os_hpmc, code
|
||||
.import intr_save, code
|
||||
|
||||
os_hpmc:
|
||||
ENTRY(os_hpmc)
|
||||
|
||||
/*
|
||||
* registers modified:
|
||||
@@ -294,11 +294,9 @@ os_hpmc_6:
|
||||
|
||||
b .
|
||||
nop
|
||||
ENDPROC(os_hpmc)
|
||||
|
||||
/* this label used to compute os_hpmc checksum */
|
||||
|
||||
.export os_hpmc_end, code
|
||||
|
||||
os_hpmc_end:
|
||||
ENTRY(os_hpmc_end)
|
||||
|
||||
nop
|
||||
|
||||
@@ -47,7 +47,7 @@ void __init setup_pdc(void)
|
||||
struct pdc_system_map_mod_info module_result;
|
||||
struct pdc_module_path module_path;
|
||||
struct pdc_model model;
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
struct pdc_pat_cell_num cell_info;
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,7 @@ void __init setup_pdc(void)
|
||||
* clearer message.
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
status = pdc_pat_cell_get_number(&cell_info);
|
||||
if (status == PDC_OK) {
|
||||
pdc_type = PDC_TYPE_PAT;
|
||||
@@ -152,7 +152,7 @@ static void __init pagezero_memconfig(void)
|
||||
npmem_ranges = 1;
|
||||
}
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
|
||||
/* All of the PDC PAT specific code is 64-bit only */
|
||||
|
||||
@@ -408,13 +408,13 @@ static void __init sprockets_memconfig(void)
|
||||
}
|
||||
}
|
||||
|
||||
#else /* !__LP64__ */
|
||||
#else /* !CONFIG_64BIT */
|
||||
|
||||
#define pat_inventory() do { } while (0)
|
||||
#define pat_memconfig() do { } while (0)
|
||||
#define sprockets_memconfig() pagezero_memconfig()
|
||||
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* !CONFIG_64BIT */
|
||||
|
||||
|
||||
#ifndef CONFIG_PA20
|
||||
|
||||
@@ -336,11 +336,7 @@ unsigned int txn_alloc_data(unsigned int virt_irq)
|
||||
|
||||
static inline int eirr_to_irq(unsigned long eirr)
|
||||
{
|
||||
#ifdef CONFIG_64BIT
|
||||
int bit = fls64(eirr);
|
||||
#else
|
||||
int bit = fls(eirr);
|
||||
#endif
|
||||
int bit = fls_long(eirr);
|
||||
return (BITS_PER_LONG - bit) + TIMER_IRQ;
|
||||
}
|
||||
|
||||
|
||||
+13
-10
@@ -46,6 +46,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
#include <asm/unwind.h>
|
||||
|
||||
@@ -96,7 +97,7 @@ static inline int in_local_section(struct module *me, void *loc, void *dot)
|
||||
}
|
||||
|
||||
|
||||
#ifndef __LP64__
|
||||
#ifndef CONFIG_64BIT
|
||||
struct got_entry {
|
||||
Elf32_Addr addr;
|
||||
};
|
||||
@@ -176,7 +177,7 @@ void *module_alloc(unsigned long size)
|
||||
return vmalloc(size);
|
||||
}
|
||||
|
||||
#ifndef __LP64__
|
||||
#ifndef CONFIG_64BIT
|
||||
static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n)
|
||||
{
|
||||
return 0;
|
||||
@@ -319,7 +320,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -342,9 +343,9 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
|
||||
value);
|
||||
return i * sizeof(struct got_entry);
|
||||
}
|
||||
#endif /* __LP64__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
|
||||
{
|
||||
Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset;
|
||||
@@ -368,7 +369,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
|
||||
fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset;
|
||||
return (Elf_Addr)fdesc;
|
||||
}
|
||||
#endif /* __LP64__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
enum elf_stub_type {
|
||||
ELF_STUB_GOT,
|
||||
@@ -394,7 +395,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
|
||||
i * sizeof(struct stub_entry);
|
||||
}
|
||||
|
||||
#ifndef __LP64__
|
||||
#ifndef CONFIG_64BIT
|
||||
/* for 32-bit the stub looks like this:
|
||||
* ldil L'XXX,%r1
|
||||
* be,n R'XXX(%sr4,%r1)
|
||||
@@ -472,7 +473,7 @@ int apply_relocate(Elf_Shdr *sechdrs,
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
#ifndef __LP64__
|
||||
#ifndef CONFIG_64BIT
|
||||
int apply_relocate_add(Elf_Shdr *sechdrs,
|
||||
const char *strtab,
|
||||
unsigned int symindex,
|
||||
@@ -822,7 +823,8 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
me->name, strtab, symhdr);
|
||||
|
||||
if(me->arch.got_count > MAX_GOTS) {
|
||||
printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS);
|
||||
printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n",
|
||||
me->name, me->arch.got_count, MAX_GOTS);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -850,10 +852,11 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
nsyms = newptr - (Elf_Sym *)symhdr->sh_addr;
|
||||
DEBUGP("NEW num_symtab %lu\n", nsyms);
|
||||
symhdr->sh_size = nsyms * sizeof(Elf_Sym);
|
||||
return 0;
|
||||
return module_bug_finalize(hdr, sechdrs, me);
|
||||
}
|
||||
|
||||
void module_arch_cleanup(struct module *mod)
|
||||
{
|
||||
deregister_unwind_table(mod);
|
||||
module_bug_cleanup(mod);
|
||||
}
|
||||
|
||||
@@ -27,31 +27,21 @@
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define ADDIB addib,*
|
||||
#define CMPB cmpb,*
|
||||
#define ANDCM andcm,*
|
||||
|
||||
.level 2.0w
|
||||
#else
|
||||
#define ADDIB addib,
|
||||
#define CMPB cmpb,
|
||||
#define ANDCM andcm
|
||||
|
||||
.level 2.0
|
||||
#endif
|
||||
|
||||
|
||||
#include <asm/psw.h>
|
||||
#include <asm/assembly.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/cache.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
.text
|
||||
.align 128
|
||||
|
||||
.export flush_tlb_all_local,code
|
||||
|
||||
flush_tlb_all_local:
|
||||
ENTRY(flush_tlb_all_local)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -200,11 +190,11 @@ fdtdone:
|
||||
|
||||
.exit
|
||||
.procend
|
||||
ENDPROC(flush_tlb_all_local)
|
||||
|
||||
.export flush_instruction_cache_local,code
|
||||
.import cache_info,data
|
||||
|
||||
flush_instruction_cache_local:
|
||||
ENTRY(flush_instruction_cache_local)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -241,11 +231,11 @@ fisync:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_instruction_cache_local)
|
||||
|
||||
|
||||
.export flush_data_cache_local, code
|
||||
.import cache_info, data
|
||||
|
||||
flush_data_cache_local:
|
||||
ENTRY(flush_data_cache_local)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -283,11 +273,11 @@ fdsync:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_data_cache_local)
|
||||
|
||||
.export copy_user_page_asm,code
|
||||
.align 16
|
||||
|
||||
copy_user_page_asm:
|
||||
ENTRY(copy_user_page_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -409,6 +399,7 @@ copy_user_page_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(copy_user_page_asm)
|
||||
|
||||
/*
|
||||
* NOTE: Code in clear_user_page has a hard coded dependency on the
|
||||
@@ -446,9 +437,7 @@ copy_user_page_asm:
|
||||
* lobby for such a change.
|
||||
*/
|
||||
|
||||
.export copy_user_page_asm,code
|
||||
|
||||
copy_user_page_asm:
|
||||
ENTRY(copy_user_page_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -534,11 +523,10 @@ copy_user_page_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(copy_user_page_asm)
|
||||
#endif
|
||||
|
||||
.export __clear_user_page_asm,code
|
||||
|
||||
__clear_user_page_asm:
|
||||
ENTRY(__clear_user_page_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -618,10 +606,9 @@ __clear_user_page_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(__clear_user_page_asm)
|
||||
|
||||
.export flush_kernel_dcache_page_asm
|
||||
|
||||
flush_kernel_dcache_page_asm:
|
||||
ENTRY(flush_kernel_dcache_page_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -662,10 +649,9 @@ flush_kernel_dcache_page_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_kernel_dcache_page_asm)
|
||||
|
||||
.export flush_user_dcache_page
|
||||
|
||||
flush_user_dcache_page:
|
||||
ENTRY(flush_user_dcache_page)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -706,10 +692,9 @@ flush_user_dcache_page:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_user_dcache_page)
|
||||
|
||||
.export flush_user_icache_page
|
||||
|
||||
flush_user_icache_page:
|
||||
ENTRY(flush_user_icache_page)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -750,11 +735,10 @@ flush_user_icache_page:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_user_icache_page)
|
||||
|
||||
|
||||
.export purge_kernel_dcache_page
|
||||
|
||||
purge_kernel_dcache_page:
|
||||
ENTRY(purge_kernel_dcache_page)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -794,15 +778,14 @@ purge_kernel_dcache_page:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(purge_kernel_dcache_page)
|
||||
|
||||
#if 0
|
||||
/* Currently not used, but it still is a possible alternate
|
||||
* solution.
|
||||
*/
|
||||
|
||||
.export flush_alias_page
|
||||
|
||||
flush_alias_page:
|
||||
ENTRY(flush_alias_page)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -882,10 +865,9 @@ flush_user_dcache_range_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_alias_page)
|
||||
|
||||
.export flush_kernel_dcache_range_asm
|
||||
|
||||
flush_kernel_dcache_range_asm:
|
||||
ENTRY(flush_kernel_dcache_range_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -905,10 +887,9 @@ flush_kernel_dcache_range_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_kernel_dcache_range_asm)
|
||||
|
||||
.export flush_user_icache_range_asm
|
||||
|
||||
flush_user_icache_range_asm:
|
||||
ENTRY(flush_user_icache_range_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -927,10 +908,9 @@ flush_user_icache_range_asm:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_user_icache_range_asm)
|
||||
|
||||
.export flush_kernel_icache_page
|
||||
|
||||
flush_kernel_icache_page:
|
||||
ENTRY(flush_kernel_icache_page)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -971,10 +951,9 @@ flush_kernel_icache_page:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(flush_kernel_icache_page)
|
||||
|
||||
.export flush_kernel_icache_range_asm
|
||||
|
||||
flush_kernel_icache_range_asm:
|
||||
ENTRY(flush_kernel_icache_range_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -992,14 +971,13 @@ flush_kernel_icache_range_asm:
|
||||
nop
|
||||
.exit
|
||||
.procend
|
||||
ENDPROC(flush_kernel_icache_range_asm)
|
||||
|
||||
/* align should cover use of rfi in disable_sr_hashing_asm and
|
||||
* srdis_done.
|
||||
*/
|
||||
.align 256
|
||||
.export disable_sr_hashing_asm,code
|
||||
|
||||
disable_sr_hashing_asm:
|
||||
ENTRY(disable_sr_hashing_asm)
|
||||
.proc
|
||||
.callinfo NO_CALLS
|
||||
.entry
|
||||
@@ -1088,5 +1066,6 @@ srdis_done:
|
||||
.exit
|
||||
|
||||
.procend
|
||||
ENDPROC(disable_sr_hashing_asm)
|
||||
|
||||
.end
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2001-2003 Grant Grundler <grundler with parisc-linux.org>
|
||||
* Copyright (C) 2002-2003 Matthew Wilcox <willy at parisc-linux.org>
|
||||
* Copyright (C) 2002 Randolph Chung <tausq at parisc-linux.org>
|
||||
* Copyright (C) 2002-2003 Helge Deller <deller with parisc-linux.org>
|
||||
* Copyright (C) 2002-2007 Helge Deller <deller with parisc-linux.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -38,7 +38,7 @@ EXPORT_SYMBOL(__cmpxchg_u32);
|
||||
#ifdef CONFIG_SMP
|
||||
EXPORT_SYMBOL(__atomic_hash);
|
||||
#endif
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
EXPORT_SYMBOL(__xchg64);
|
||||
EXPORT_SYMBOL(__cmpxchg_u64);
|
||||
#endif
|
||||
@@ -58,7 +58,7 @@ EXPORT_SYMBOL(fixup_get_user_skip_2);
|
||||
EXPORT_SYMBOL(fixup_put_user_skip_1);
|
||||
EXPORT_SYMBOL(fixup_put_user_skip_2);
|
||||
|
||||
#ifndef __LP64__
|
||||
#ifndef CONFIG_64BIT
|
||||
/* Needed so insmod can set dp value */
|
||||
extern int $global$;
|
||||
EXPORT_SYMBOL($global$);
|
||||
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(__muldi3);
|
||||
asmlinkage void * __canonicalize_funcptr_for_compare(void *);
|
||||
EXPORT_SYMBOL(__canonicalize_funcptr_for_compare);
|
||||
|
||||
#ifdef __LP64__
|
||||
#ifdef CONFIG_64BIT
|
||||
extern void __divdi3(void);
|
||||
extern void __udivdi3(void);
|
||||
extern void __umoddi3(void);
|
||||
@@ -147,7 +147,7 @@ EXPORT_SYMBOL(__umoddi3);
|
||||
EXPORT_SYMBOL(__moddi3);
|
||||
#endif
|
||||
|
||||
#ifndef __LP64__
|
||||
#ifndef CONFIG_64BIT
|
||||
extern void $$dyncall(void);
|
||||
EXPORT_SYMBOL($$dyncall);
|
||||
#endif
|
||||
|
||||
@@ -342,7 +342,7 @@ pcxl_dma_init(void)
|
||||
pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
|
||||
get_order(pcxl_res_size));
|
||||
memset(pcxl_res_map, 0, pcxl_res_size);
|
||||
proc_gsc_root = proc_mkdir("gsc", 0);
|
||||
proc_gsc_root = proc_mkdir("gsc", NULL);
|
||||
if (!proc_gsc_root)
|
||||
printk(KERN_WARNING
|
||||
"pcxl_dma_init: Unable to create gsc /proc dir entry\n");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user