patch-2.4.21 linux-2.4.21/arch/ppc64/kernel/misc.S
Next file: linux-2.4.21/arch/ppc64/kernel/mk_defs.c
Previous file: linux-2.4.21/arch/ppc64/kernel/ioctl32.c
Back to the patch index
Back to the overall index
- Lines: 320
- Date:
2003-06-13 07:51:31.000000000 -0700
- Orig file:
linux-2.4.20/arch/ppc64/kernel/misc.S
- Orig date:
2002-11-28 15:53:11.000000000 -0800
diff -urN linux-2.4.20/arch/ppc64/kernel/misc.S linux-2.4.21/arch/ppc64/kernel/misc.S
@@ -165,12 +165,14 @@
*/
LOADADDR(r10,naca) /* Get Naca address */
ld r10,0(r10)
- lhz r7,DCACHEL1LINESIZE(r10) /* Get cache line size */
+ LOADADDR(r11,systemcfg) /* Get systemcfg address */
+ ld r11,0(r11)
+ lwz r7,DCACHEL1LINESIZE(r11) /* Get cache line size */
addi r5,r7,-1
andc r6,r3,r5 /* round low to line bdy */
subf r8,r6,r4 /* compute length */
add r8,r8,r5 /* ensure we get enough */
- lhz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of cache line size */
+ lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of cache line size */
srw. r8,r8,r9 /* compute line count */
beqlr /* nothing to do? */
mtctr r8
@@ -181,12 +183,12 @@
/* Now invalidate the instruction cache */
- lhz r7,ICACHEL1LINESIZE(r10) /* Get Icache line size */
+ lwz r7,ICACHEL1LINESIZE(r11) /* Get Icache line size */
addi r5,r7,-1
andc r6,r3,r5 /* round low to line bdy */
subf r8,r6,r4 /* compute length */
add r8,r8,r5
- lhz r9,ICACHEL1LOGLINESIZE(r10) /* Get log-2 of Icache line size */
+ lwz r9,ICACHEL1LOGLINESIZE(r10) /* Get log-2 of Icache line size */
srw. r8,r8,r9 /* compute line count */
beqlr /* nothing to do? */
mtctr r8
@@ -212,12 +214,14 @@
*/
LOADADDR(r10,naca) /* Get Naca address */
ld r10,0(r10)
- lhz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */
+ LOADADDR(r11,systemcfg) /* Get systemcfg address */
+ ld r11,0(r11)
+ lwz r7,DCACHEL1LINESIZE(r11) /* Get dcache line size */
addi r5,r7,-1
andc r6,r3,r5 /* round low to line bdy */
subf r8,r6,r4 /* compute length */
add r8,r8,r5 /* ensure we get enough */
- lhz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
+ lwz r9,DCACHEL1LOGLINESIZE(r10) /* Get log-2 of dcache line size */
srw. r8,r8,r9 /* compute line count */
beqlr /* nothing to do? */
mtctr r8
@@ -244,9 +248,11 @@
/* Flush the dcache */
LOADADDR(r7,naca)
ld r7,0(r7)
+ LOADADDR(r8,systemcfg) /* Get systemcfg address */
+ ld r8,0(r8)
clrrdi r3,r3,12 /* Page align */
- lhz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */
- lhz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */
+ lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */
+ lwz r5,DCACHEL1LINESIZE(r8) /* Get dcache line size */
mr r6,r3
mtctr r4
0: dcbst 0,r6
@@ -256,8 +262,8 @@
/* Now invalidate the icache */
- lhz r4,ICACHEL1LINESPERPAGE(r7) /* Get # icache lines per page */
- lhz r5,ICACHEL1LINESIZE(r7) /* Get icache line size */
+ lwz r4,ICACHEL1LINESPERPAGE(r7) /* Get # icache lines per page */
+ lwz r5,ICACHEL1LINESIZE(r8) /* Get icache line size */
mtctr r4
1: icbi 0,r3
add r3,r3,r5
@@ -266,24 +272,6 @@
blr
/*
- * Copy a whole page. Assumes a 4096B page size.
- */
-_GLOBAL(copy_page)
- clrrdi r3,r3,12 /* Page align */
- clrrdi r4,r4,12 /* Page align */
- li r5,256
- mtctr r5
- addi r3,r3,-8
- addi r4,r4,-8
-
-1: ld r6,8(r4)
- ldu r7,16(r4)
- std r6,8(r3)
- stdu r7,16(r3)
- bdnz+ 1b
- blr
-
-/*
* I/O string operations
*
* insb(port, buf, len)
@@ -474,28 +462,28 @@
blr
_GLOBAL(cvt_fd)
- lfd 0,-4(r5) /* load up fpscr value */
+ lfd 0,0(r5) /* load up fpscr value */
mtfsf 0xff,0
lfs 0,0(r3)
stfd 0,0(r4)
mffs 0 /* save new fpscr value */
- stfd 0,-4(r5)
+ stfd 0,0(r5)
blr
_GLOBAL(cvt_df)
- lfd 0,-4(r5) /* load up fpscr value */
+ lfd 0,0(r5) /* load up fpscr value */
mtfsf 0xff,0
lfd 0,0(r3)
stfs 0,0(r4)
mffs 0 /* save new fpscr value */
- stfd 0,-4(r5)
+ stfd 0,0(r5)
blr
/*
* Create a kernel thread
- * kernel_thread(fn, arg, flags)
+ * arch_kernel_thread(fn, arg, flags)
*/
-_GLOBAL(kernel_thread)
+_GLOBAL(arch_kernel_thread)
mr r6,r3 /* function */
ori r3,r5,CLONE_VM /* flags */
li r0,__NR_clone
@@ -535,8 +523,8 @@
.llong .sys32_execve
.llong .sys_chdir
.llong .sys32_time
- .llong .sys32_mknod
- .llong .sys32_chmod /* 15 */
+ .llong .sys_mknod
+ .llong .sys_chmod /* 15 */
.llong .sys_lchown
.llong .sys_ni_syscall /* old break syscall holder */
.llong .sys32_stat
@@ -603,7 +591,7 @@
.llong .sys32_settimeofday
.llong .sys32_getgroups /* 80 */
.llong .sys32_setgroups
- .llong .ppc32_select
+ .llong .sys_ni_syscall /* old select syscall */
.llong .sys_symlink
.llong .sys32_lstat
.llong .sys32_readlink /* 85 */
@@ -622,7 +610,7 @@
.llong .sys_ni_syscall /* old profil syscall holder */
.llong .sys32_statfs
.llong .sys32_fstatfs /* 100 */
- .llong .sys32_ioperm
+ .llong .sys_ioperm
.llong .sys32_socketcall
.llong .sys32_syslog
.llong .sys32_setitimer
@@ -631,10 +619,10 @@
.llong .sys32_newlstat
.llong .sys32_newfstat
.llong .sys_uname
- .llong .sys32_iopl /* 110 */
+ .llong .sys_ni_syscall /* 110 old iopl syscall */
.llong .sys_vhangup
.llong .sys_ni_syscall /* old 'idle' syscall */
- .llong .sys32_vm86
+ .llong .sys_ni_syscall /* old vm86 syscall */
.llong .sys32_wait4
.llong .sys_swapoff /* 115 */
.llong .sys32_sysinfo
@@ -644,7 +632,7 @@
.llong .sys32_clone /* 120 */
.llong .sys32_setdomainname
.llong .ppc64_newuname
- .llong .sys32_modify_ldt
+ .llong .sys_ni_syscall /* old modify_ldt syscall */
.llong .sys32_adjtimex
.llong .sys_mprotect /* 125 */
.llong .sys32_sigprocmask
@@ -712,8 +700,8 @@
.llong .sys_ni_syscall /* streams2 */
.llong .sys32_vfork
.llong .sys32_getrlimit /* 190 */
- .llong .sys_ni_syscall /* 191 */ /* Unused */
- .llong .sys_ni_syscall /* 192 - reserved - mmap2 */
+ .llong .sys32_readahead
+ .llong .ppc32_mmap2
.llong .sys32_truncate64 /* 193 - truncate64 */
.llong .sys32_ftruncate64 /* 194 - ftruncate64 */
.llong .sys_stat64 /* 195 - stat64 */
@@ -729,24 +717,7 @@
.llong .sys_madvise /* 205 */
.llong .sys_mincore /* 206 */
.llong .sys_gettid /* 207 */
-#if 0 /* Reserved syscalls */
- .llong .sys_tkill /* 208 */
- .llong .sys_setxattr
- .llong .sys_lsetxattr /* 210 */
- .llong .sys_fsetxattr
- .llong .sys_getxattr
- .llong .sys_lgetxattr
- .llong .sys_fgetxattr
- .llong .sys_listxattr /* 215 */
- .llong .sys_llistxattr
- .llong .sys_flistxattr
- .llong .sys_removexattr
- .llong .sys_lremovexattr
- .llong .sys_fremovexattr /* 220 */
- .llong .sys_futex
-#endif
- .llong .sys_perfmonctl /* Put this here for now ... */
- .rept NR_syscalls-222
+ .rept NR_syscalls-208
.llong .sys_ni_syscall
.endr
#endif
@@ -774,7 +745,7 @@
.llong .sys_lseek
.llong .sys_getpid /* 20 */
.llong .sys_mount
- .llong .sys_oldumount
+ .llong .sys_ni_syscall /* old umount syscall */
.llong .sys_setuid
.llong .sys_getuid
.llong .ppc64_sys_stime /* 25 */
@@ -811,7 +782,7 @@
.llong .sys_ni_syscall /* old mpx syscall holder */
.llong .sys_setpgid
.llong .sys_ni_syscall /* old ulimit syscall holder */
- .llong .sys_olduname
+ .llong .sys_ni_syscall /* old uname syscall */
.llong .sys_umask /* 60 */
.llong .sys_chroot
.llong .sys_ustat
@@ -828,20 +799,20 @@
.llong .sys_sigpending
.llong .sys_sethostname
.llong .sys_setrlimit /* 75 */
- .llong .sys_old_getrlimit
+ .llong .sys_ni_syscall /* old getrlimit syscall */
.llong .sys_getrusage
.llong .sys_gettimeofday
.llong .sys_settimeofday
.llong .sys_getgroups /* 80 */
.llong .sys_setgroups
- .llong .sys_select
+ .llong .sys_ni_syscall /* old select syscall */
.llong .sys_symlink
.llong .sys_lstat
.llong .sys_readlink /* 85 */
.llong .sys_uselib
.llong .sys_swapon
.llong .sys_reboot
- .llong .old_readdir
+ .llong .sys_ni_syscall /* old readdir syscall */
.llong .sys_mmap /* 90 */
.llong .sys_munmap
.llong .sys_truncate
@@ -862,10 +833,10 @@
.llong .sys_newlstat
.llong .sys_newfstat
.llong .sys_uname
- .llong .sys_iopl /* 110 */
+ .llong .sys_ni_syscall /* 110 old iopl syscall */
.llong .sys_vhangup
.llong .sys_ni_syscall /* old 'idle' syscall */
- .llong .sys_vm86
+ .llong .sys_ni_syscall /* old vm86 syscall */
.llong .sys_wait4
.llong .sys_swapoff /* 115 */
.llong .sys_sysinfo
@@ -875,7 +846,7 @@
.llong .sys_clone /* 120 */
.llong .sys_setdomainname
.llong .ppc64_newuname
- .llong .sys_modify_ldt
+ .llong .sys_ni_syscall /* old modify_ldt syscall */
.llong .sys_adjtimex
.llong .sys_mprotect /* 125 */
.llong .sys_sigprocmask
@@ -943,7 +914,7 @@
.llong .sys_ni_syscall /* streams2 */
.llong .sys_vfork
.llong .sys_getrlimit /* 190 */
- .llong .sys_ni_syscall /* 191 */ /* Unused */
+ .llong .sys_readahead
.llong .sys_ni_syscall /* 192 - reserved - mmap2 */
.llong .sys_ni_syscall /* 193 - reserved - truncate64 */
.llong .sys_ni_syscall /* 194 - reserved - ftruncate64 */
@@ -960,23 +931,6 @@
.llong .sys_madvise /* 205 */
.llong .sys_mincore /* 206 */
.llong .sys_gettid /* 207 */
-#if 0 /* Reserved syscalls */
- .llong .sys_tkill /* 208 */
- .llong .sys_setxattr
- .llong .sys_lsetxattr /* 210 */
- .llong .sys_fsetxattr
- .llong .sys_getxattr
- .llong .sys_lgetxattr
- .llong .sys_fgetxattr
- .llong .sys_listxattr /* 215 */
- .llong .sys_llistxattr
- .llong .sys_flistxattr
- .llong .sys_removexattr
- .llong .sys_lremovexattr
- .llong .sys_fremovexattr /* 220 */
- .llong .sys_futex
-#endif
- .llong .sys_perfmonctl /* Put this here for now ... */
- .rept NR_syscalls-222
+ .rept NR_syscalls-208
.llong .sys_ni_syscall
.endr
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)