Commit f3351c55 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: core changes

s390 core changes:
 - Load pid to cr4 on context switch.
 - Correct and check buffer length of cpcmd. Fix cpcmd inline assembly.
 - Add missing cc clobber to do_softirq insline assembly.
 - Regenerate default configuration.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 35eb6af9
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-rc3 # Linux kernel version: 2.6.9
# Fri Oct 8 19:17:35 2004 # Fri Oct 22 13:50:22 2004
# #
CONFIG_MMU=y CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y
...@@ -26,6 +26,7 @@ CONFIG_SYSCTL=y ...@@ -26,6 +26,7 @@ CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set # CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=17 CONFIG_LOG_BUF_SHIFT=17
CONFIG_HOTPLUG=y CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
...@@ -49,6 +50,7 @@ CONFIG_MODULES=y ...@@ -49,6 +50,7 @@ CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set # CONFIG_MODULE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set # CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y CONFIG_KMOD=y
# #
...@@ -144,6 +146,7 @@ CONFIG_SCSI_FC_ATTRS=y ...@@ -144,6 +146,7 @@ CONFIG_SCSI_FC_ATTRS=y
# SCSI low-level drivers # SCSI low-level drivers
# #
# CONFIG_SCSI_SATA is not set # CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
# CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_DEBUG is not set
CONFIG_ZFCP=y CONFIG_ZFCP=y
CONFIG_CCW=y CONFIG_CCW=y
...@@ -157,7 +160,9 @@ CONFIG_BLK_DEV_NBD=m ...@@ -157,7 +160,9 @@ CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set # CONFIG_LBD is not set
# CONFIG_CDROM_PKTCDVD is not set
# #
# S/390 block device drivers # S/390 block device drivers
...@@ -224,6 +229,7 @@ CONFIG_S390_TAPE_BLOCK=y ...@@ -224,6 +229,7 @@ CONFIG_S390_TAPE_BLOCK=y
CONFIG_S390_TAPE_34XX=m CONFIG_S390_TAPE_34XX=m
# CONFIG_VMLOGRDR is not set # CONFIG_VMLOGRDR is not set
# CONFIG_MONREADER is not set # CONFIG_MONREADER is not set
# CONFIG_DCSS_SHM is not set
# #
# Cryptographic devices # Cryptographic devices
...@@ -427,6 +433,7 @@ CONFIG_SYSFS=y ...@@ -427,6 +433,7 @@ CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set # CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y CONFIG_TMPFS=y
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLB_PAGE is not set # CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y CONFIG_RAMFS=y
...@@ -506,6 +513,7 @@ CONFIG_MSDOS_PARTITION=y ...@@ -506,6 +513,7 @@ CONFIG_MSDOS_PARTITION=y
# #
CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_INFO is not set
...@@ -513,6 +521,7 @@ CONFIG_MAGIC_SYSRQ=y ...@@ -513,6 +521,7 @@ CONFIG_MAGIC_SYSRQ=y
# #
# Security options # Security options
# #
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set # CONFIG_SECURITY is not set
# #
......
...@@ -22,6 +22,8 @@ int main(void) ...@@ -22,6 +22,8 @@ int main(void)
DEFINE(__THREAD_mm_segment, DEFINE(__THREAD_mm_segment,
offsetof(struct task_struct, thread.mm_segment),); offsetof(struct task_struct, thread.mm_segment),);
BLANK(); BLANK();
DEFINE(__TASK_pid, offsetof(struct task_struct, pid),);
BLANK();
DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),); DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),);
DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),); DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),);
DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),); DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <asm/system.h> #include <asm/system.h>
static spinlock_t cpcmd_lock = SPIN_LOCK_UNLOCKED; static spinlock_t cpcmd_lock = SPIN_LOCK_UNLOCKED;
static char cpcmd_buf[128]; static char cpcmd_buf[240];
void cpcmd(char *cmd, char *response, int rlen) void cpcmd(char *cmd, char *response, int rlen)
{ {
...@@ -24,22 +24,23 @@ void cpcmd(char *cmd, char *response, int rlen) ...@@ -24,22 +24,23 @@ void cpcmd(char *cmd, char *response, int rlen)
int cmdlen; int cmdlen;
spin_lock_irqsave(&cpcmd_lock, flags); spin_lock_irqsave(&cpcmd_lock, flags);
cmdlen = strlen(cmd); cmdlen = strlen(cmd);
strcpy(cpcmd_buf, cmd); BUG_ON(cmdlen>240);
ASCEBC(cpcmd_buf, cmdlen); strcpy(cpcmd_buf, cmd);
ASCEBC(cpcmd_buf, cmdlen);
if (response != NULL && rlen > 0) { if (response != NULL && rlen > 0) {
#ifndef CONFIG_ARCH_S390X #ifndef CONFIG_ARCH_S390X
asm volatile ("LRA 2,0(%0)\n\t" asm volatile ("LRA 2,0(%0)\n\t"
"LR 4,%1\n\t" "LR 4,%1\n\t"
"O 4,%4\n\t" "O 4,%4\n\t"
"LRA 3,0(%2)\n\t" "LRA 3,0(%2)\n\t"
"LR 5,%3\n\t" "LR 5,%3\n\t"
".long 0x83240008 # Diagnose 83\n\t" ".long 0x83240008 # Diagnose X'08'\n\t"
: /* no output */ : /* no output */
: "a" (cpcmd_buf), "d" (cmdlen), : "a" (cpcmd_buf), "d" (cmdlen),
"a" (response), "d" (rlen), "m" (mask) "a" (response), "d" (rlen), "m" (mask)
: "2", "3", "4", "5" ); : "cc", "2", "3", "4", "5" );
#else /* CONFIG_ARCH_S390X */ #else /* CONFIG_ARCH_S390X */
asm volatile (" lrag 2,0(%0)\n" asm volatile (" lrag 2,0(%0)\n"
" lgr 4,%1\n" " lgr 4,%1\n"
...@@ -47,19 +48,19 @@ void cpcmd(char *cmd, char *response, int rlen) ...@@ -47,19 +48,19 @@ void cpcmd(char *cmd, char *response, int rlen)
" lrag 3,0(%2)\n" " lrag 3,0(%2)\n"
" lgr 5,%3\n" " lgr 5,%3\n"
" sam31\n" " sam31\n"
" .long 0x83240008 # Diagnose 83\n" " .long 0x83240008 # Diagnose X'08'\n"
" sam64" " sam64"
: /* no output */ : /* no output */
: "a" (cpcmd_buf), "d" (cmdlen), : "a" (cpcmd_buf), "d" (cmdlen),
"a" (response), "d" (rlen), "m" (mask) "a" (response), "d" (rlen), "m" (mask)
: "2", "3", "4", "5" ); : "cc", "2", "3", "4", "5" );
#endif /* CONFIG_ARCH_S390X */ #endif /* CONFIG_ARCH_S390X */
EBCASC(response, rlen); EBCASC(response, rlen);
} else { } else {
#ifndef CONFIG_ARCH_S390X #ifndef CONFIG_ARCH_S390X
asm volatile ("LRA 2,0(%0)\n\t" asm volatile ("LRA 2,0(%0)\n\t"
"LR 3,%1\n\t" "LR 3,%1\n\t"
".long 0x83230008 # Diagnose 83\n\t" ".long 0x83230008 # Diagnose X'08'\n\t"
: /* no output */ : /* no output */
: "a" (cpcmd_buf), "d" (cmdlen) : "a" (cpcmd_buf), "d" (cmdlen)
: "2", "3" ); : "2", "3" );
...@@ -67,7 +68,7 @@ void cpcmd(char *cmd, char *response, int rlen) ...@@ -67,7 +68,7 @@ void cpcmd(char *cmd, char *response, int rlen)
asm volatile (" lrag 2,0(%0)\n" asm volatile (" lrag 2,0(%0)\n"
" lgr 3,%1\n" " lgr 3,%1\n"
" sam31\n" " sam31\n"
" .long 0x83230008 # Diagnose 83\n" " .long 0x83230008 # Diagnose X'08'\n"
" sam64" " sam64"
: /* no output */ : /* no output */
: "a" (cpcmd_buf), "d" (cmdlen) : "a" (cpcmd_buf), "d" (cmdlen)
......
...@@ -144,6 +144,7 @@ __switch_to_noper: ...@@ -144,6 +144,7 @@ __switch_to_noper:
l %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp l %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp
lm %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task lm %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task
st %r3,__LC_CURRENT # __LC_CURRENT = current task struct st %r3,__LC_CURRENT # __LC_CURRENT = current task struct
lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4
l %r3,__THREAD_info(%r3) # load thread_info from task struct l %r3,__THREAD_info(%r3) # load thread_info from task struct
st %r3,__LC_THREAD_INFO st %r3,__LC_THREAD_INFO
ahi %r3,STACK_SIZE ahi %r3,STACK_SIZE
......
...@@ -141,6 +141,7 @@ __switch_to_noper: ...@@ -141,6 +141,7 @@ __switch_to_noper:
lg %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp lg %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp
lmg %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task lmg %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task
stg %r3,__LC_CURRENT # __LC_CURRENT = current task struct stg %r3,__LC_CURRENT # __LC_CURRENT = current task struct
lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4
lg %r3,__THREAD_info(%r3) # load thread_info from task struct lg %r3,__THREAD_info(%r3) # load thread_info from task struct
stg %r3,__LC_THREAD_INFO stg %r3,__LC_THREAD_INFO
aghi %r3,STACK_SIZE aghi %r3,STACK_SIZE
......
...@@ -86,7 +86,7 @@ asmlinkage void do_softirq(void) ...@@ -86,7 +86,7 @@ asmlinkage void do_softirq(void)
" la 15,0(%1)\n" " la 15,0(%1)\n"
: : "a" (new), "a" (old), : : "a" (new), "a" (old),
"a" (__do_softirq) "a" (__do_softirq)
: "0", "1", "2", "3", "4", "5", : "0", "1", "2", "3", "4", "5", "14",
"cc", "memory" ); "cc", "memory" );
} else } else
/* We are already on the async stack. */ /* We are already on the async stack. */
......
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