CFLAGS += $(cflags-y)
CFLAGS += $(call check_gcc,-finline-limit=10000,)
CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
+CFLAGS += -mbackchain
OBJCOPYFLAGS := -O binary
LDFLAGS_vmlinux := -e start
EXPORT_SYMBOL_NOVERS(strrchr);
EXPORT_SYMBOL_NOVERS(strstr);
EXPORT_SYMBOL_NOVERS(strpbrk);
+EXPORT_SYMBOL_NOVERS(strcpy);
/*
* binfmt_elf loader
" cs %0,%1,0(%3)\n"
" jl 0b\n"
: "=&d" (old_val), "=&d" (new_val),
- "+m" (sem->count)
- : "a" (&sem->count), "d" (incr) : "cc" );
+ "=m" (sem->count)
+ : "a" (&sem->count), "d" (incr), "m" (sem->count)
+ : "cc" );
return old_val;
}
{
on_each_cpu(smp_ptlb_callback, NULL, 0, 1);
}
+EXPORT_SYMBOL(smp_ptlb_all);
#endif /* ! CONFIG_ARCH_S390X */
/*
*/
unsigned long long sched_clock(void)
{
- return (get_clock() - jiffies_timer_cc) >> 2;
+ return ((get_clock() - jiffies_timer_cc) * 1000) >> 12;
}
void tod_to_timeval(__u64 todval, struct timespec *xtime)
EXTRA_AFLAGS := -traditional
lib-y += delay.o
-lib-$(CONFIG_ARCH_S390_31) += memset.o strcmp.o strncpy.o uaccess.o
-lib-$(CONFIG_ARCH_S390X) += memset64.o strcmp64.o strncpy64.o uaccess64.o
+lib-$(CONFIG_ARCH_S390_31) += memset.o strcmp.o strcpy.o strncpy.o uaccess.o
+lib-$(CONFIG_ARCH_S390X) += memset64.o strcmp64.o strcpy64.o strncpy64.o uaccess64.o
--- /dev/null
+/*
+ * arch/s390/kernel/strcpy.S
+ * S390 strcpy routine
+ *
+ * S390 version
+ * Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
+ */
+
+/*
+ * R2 = address of destination
+ * R3 = address of source string
+ */
+ .globl strcpy
+strcpy:
+ sr %r0,%r0
+0: mvst %r2,%r3
+ jo 0b
+ br %r14
+
--- /dev/null
+/*
+ * arch/s390/kernel/strcpy.S
+ * S390 strcpy routine
+ *
+ * S390 version
+ * Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
+ */
+
+/*
+ * R2 = address of destination
+ * R3 = address of source string
+ */
+ .globl strcpy
+strcpy:
+ sgr %r0,%r0
+0: mvst %r2,%r3
+ jo 0b
+ br %r14
+
LA 3,1(3)
STC 0,0(1)
LA 1,1(1)
- JZ strncpy_exit # ICM inserted a 0x00
+ JZ strncpy_pad # ICM inserted a 0x00
BRCT 4,strncpy_loop # R4 -= 1, jump to strncpy_loop if > 0
strncpy_exit:
BR 14
-
+strncpy_clear:
+ STC 0,0(1)
+ LA 1,1(1)
+strncpy_pad:
+ BRCT 4,strncpy_clear
+ BR 14
LA 3,1(3)
STC 0,0(1)
LA 1,1(1)
- JZ strncpy_exit # ICM inserted a 0x00
+ JZ strncpy_pad # ICM inserted a 0x00
BRCTG 4,strncpy_loop # R4 -= 1, jump to strncpy_loop if > 0
strncpy_exit:
BR 14
-
+strncpy_clear:
+ STC 0,0(1)
+ LA 1,1(1)
+strncpy_pad:
+ BRCTG 4,strncpy_clear
+ BR 14
static void display_emulation_not_implemented(struct pt_regs *regs, char *instr)
{
- struct pt_regs *regs;
__u16 *location;
#ifdef CONFIG_SYSCTL
__asm__ __volatile__ (
" lrvr %0,%1"
- : "=d" (result) : "d" (x), "m" (x) );
+ : "=d" (result) : "d" (x) );
return result;
#endif /* __s390x__ */
}
#ifdef __KERNEL__
#include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
- #include <asm/spinlock.h>
-#else
- #include <linux/spinlock.h>
-#endif /* LINUX_VERSION_CODE */
+#include <linux/spinlock.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/proc_fs.h>
#ifndef _ASM_DMA_MAPPING_H
#define _ASM_DMA_MAPPING_H
+
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, int flag)
+{
+ BUG();
+ return 0;
+}
+
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t dma_handle)
+{
+ BUG();
+}
+
#endif /* _ASM_DMA_MAPPING_H */
left = copy_to_user(to, ib->data[i], IDA_BLOCK_SIZE);
if (left)
return left + count - IDA_BLOCK_SIZE;
- (addr_t) to += IDA_BLOCK_SIZE;
+ to = (void *) to + IDA_BLOCK_SIZE;
count -= IDA_BLOCK_SIZE;
}
return copy_to_user(to, ib->data[i], count);
left = copy_from_user(ib->data[i], from, IDA_BLOCK_SIZE);
if (left)
return left + count - IDA_BLOCK_SIZE;
- (addr_t) from += IDA_BLOCK_SIZE;
+ from = (void *) from + IDA_BLOCK_SIZE;
count -= IDA_BLOCK_SIZE;
}
return copy_from_user(ib->data[i], from, count);
static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
static inline _syscall1(int,close,int,fd)
-static inline _syscall1(int,_exit,int,exitcode)
static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf)
static inline pid_t waitpid(int pid, int *wait_stat, int flags)