Commit 3627be6d authored by Paul Mackerras's avatar Paul Mackerras

Merge samba.org:/home/paulus/kernel/linux-2.5

into samba.org:/home/paulus/kernel/for-linus-ppc
parents 91e2be46 892eb813
......@@ -30,6 +30,7 @@
#include <asm/thread_info.h>
#include <asm/ppc_asm.h>
#include <asm/offsets.h>
#include <asm/unistd.h>
#undef SHOW_SYSCALLS
#undef SHOW_SYSCALLS_TASK
......
......@@ -837,7 +837,7 @@ _GLOBAL(_outsl)
bdnz 00b
blr
_GLOBAL(ide_insw)
_GLOBAL(__ide_mm_insw)
_GLOBAL(_insw_ns)
cmpwi 0,r5,0
mtctr r5
......@@ -849,7 +849,7 @@ _GLOBAL(_insw_ns)
bdnz 00b
blr
_GLOBAL(ide_outsw)
_GLOBAL(__ide_mm_outsw)
_GLOBAL(_outsw_ns)
cmpwi 0,r5,0
mtctr r5
......@@ -861,6 +861,7 @@ _GLOBAL(_outsw_ns)
bdnz 00b
blr
_GLOBAL(__ide_mm_insl)
_GLOBAL(_insl_ns)
cmpwi 0,r5,0
mtctr r5
......@@ -872,6 +873,7 @@ _GLOBAL(_insl_ns)
bdnz 00b
blr
_GLOBAL(__ide_mm_outsl)
_GLOBAL(_outsl_ns)
cmpwi 0,r5,0
mtctr r5
......@@ -1281,7 +1283,12 @@ _GLOBAL(sys_call_table)
.long sys_epoll_ctl
.long sys_epoll_wait
.long sys_remap_file_pages
.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall
.endr
.long sys_timer_create /* 240 */
.long sys_timer_settime
.long sys_timer_gettime
.long sys_timer_getoverrun
.long sys_timer_delete
.long sys_clock_settime /* 245 */
.long sys_clock_gettime
.long sys_clock_getres
.long sys_clock_nanosleep
......@@ -31,21 +31,36 @@ extern void __delay(unsigned int loops);
* -- paulus
*/
#define __MAX_UDELAY (226050910/HZ) /* maximum udelay argument */
#define __MAX_NDELAY (4294967295/HZ) /* maximum ndelay argument */
extern __inline__ void __udelay(unsigned int usecs)
extern __inline__ void __udelay(unsigned int x)
{
unsigned int loops;
__asm__("mulhwu %0,%1,%2" : "=r" (loops) :
"r" (usecs * (19 * HZ)), "r" (loops_per_jiffy * 226));
"r" (x), "r" (loops_per_jiffy * 226));
__delay(loops);
}
extern __inline__ void __ndelay(unsigned int x)
{
unsigned int loops;
__asm__("mulhwu %0,%1,%2" : "=r" (loops) :
"r" (x), "r" (loops_per_jiffy * 5));
__delay(loops);
}
extern void __bad_udelay(void); /* deliberately undefined */
extern void __bad_ndelay(void); /* deliberately undefined */
#define udelay(n) (__builtin_constant_p(n)? \
((n) > __MAX_UDELAY? __bad_udelay(): __udelay((n))) : \
__udelay(n))
((n) > __MAX_UDELAY? __bad_udelay(): __udelay((n) * (19 * HZ))) : \
__udelay((n) * (19 * HZ)))
#define ndelay(n) (__builtin_constant_p(n)? \
((n) > __MAX_NDELAY? __bad_ndelay(): __ndelay((n) * HZ)) : \
__ndelay((n) * HZ))
#endif /* defined(_PPC_DELAY_H) */
#endif /* __KERNEL__ */
......@@ -27,6 +27,11 @@
#include <linux/ioport.h>
#include <asm/io.h>
extern void __ide_mm_insw(unsigned long port, void *addr, u32 count);
extern void __ide_mm_outsw(unsigned long port, void *addr, u32 count);
extern void __ide_mm_insl(unsigned long port, void *addr, u32 count);
extern void __ide_mm_outsl(unsigned long port, void *addr, u32 count);
struct ide_machdep_calls {
int (*default_irq)(ide_ioreg_t base);
ide_ioreg_t (*default_io_base)(int index);
......
......@@ -21,6 +21,8 @@ typedef long __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef short __kernel_ipc_pid_t;
......
......@@ -244,6 +244,17 @@
#define __NR_epoll_ctl 237
#define __NR_epoll_wait 238
#define __NR_remap_file_pages 239
#define __NR_timer_create 240
#define __NR_timer_settime 241
#define __NR_timer_gettime 242
#define __NR_timer_getoverrun 243
#define __NR_timer_delete 244
#define __NR_clock_settime 245
#define __NR_clock_gettime 246
#define __NR_clock_getres 247
#define __NR_clock_nanosleep 248
#define __NR_syscalls 249
#define __NR(n) #n
......@@ -418,6 +429,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
#ifdef __KERNEL__
#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
/*
* Forking from kernel space will result in the child getting a new,
......
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