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

[PATCH] s390: core changes

s390 core changes:
 - Replace invoke_softirq mechanism with own version of do_softirq.
 - Move /proc/inteerrupts functions to re-added arch/s390/kernel/irq.c
 - Add some includes to avoid compiler warnings.
 - Remove unused #defines.
 - 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 84741e83
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-rc1 # Linux kernel version: 2.6.9-rc2
# Mon Aug 30 19:03:48 2004 # Mon Sep 20 17:16:38 2004
# #
CONFIG_MMU=y CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y
...@@ -17,6 +17,7 @@ CONFIG_CLEAN_COMPILE=y ...@@ -17,6 +17,7 @@ CONFIG_CLEAN_COMPILE=y
# #
# General setup # General setup
# #
CONFIG_LOCALVERSION=""
CONFIG_SWAP=y CONFIG_SWAP=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set # CONFIG_POSIX_MQUEUE is not set
...@@ -38,6 +39,8 @@ CONFIG_IOSCHED_AS=y ...@@ -38,6 +39,8 @@ CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SHMEM=y
# CONFIG_TINY_SHMEM is not set
# #
# Loadable module support # Loadable module support
...@@ -162,7 +165,7 @@ CONFIG_BLK_DEV_INITRD=y ...@@ -162,7 +165,7 @@ CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_XPRAM=m CONFIG_BLK_DEV_XPRAM=m
# CONFIG_DCSSBLK is not set # CONFIG_DCSSBLK is not set
CONFIG_DASD=y CONFIG_DASD=y
# CONFIG_DASD_PROFILE is not set CONFIG_DASD_PROFILE=y
CONFIG_DASD_ECKD=y CONFIG_DASD_ECKD=y
CONFIG_DASD_FBA=y CONFIG_DASD_FBA=y
CONFIG_DASD_DIAG=y CONFIG_DASD_DIAG=y
......
...@@ -6,7 +6,7 @@ EXTRA_AFLAGS := -traditional ...@@ -6,7 +6,7 @@ EXTRA_AFLAGS := -traditional
obj-y := bitmap.o traps.o time.o process.o \ obj-y := bitmap.o traps.o time.o process.o \
setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
semaphore.o s390_ext.o debug.o profile.o semaphore.o s390_ext.o debug.o profile.o irq.o
extra-$(CONFIG_ARCH_S390_31) += head.o extra-$(CONFIG_ARCH_S390_31) += head.o
extra-$(CONFIG_ARCH_S390X) += head64.o extra-$(CONFIG_ARCH_S390X) += head64.o
......
...@@ -150,30 +150,6 @@ __switch_to_noper: ...@@ -150,30 +150,6 @@ __switch_to_noper:
st %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack st %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack
br %r14 br %r14
/*
* do_softirq calling function. We want to run the softirq functions on the
* asynchronous interrupt stack.
*/
.global do_call_softirq
do_call_softirq:
stnsm __SF_EMPTY(%r15),0xfc
stm %r12,%r15,__SF_GPRS(%r15)
lr %r12,%r15
basr %r13,0
do_call_base:
l %r0,__LC_ASYNC_STACK
slr %r0,%r15
sra %r0,STACK_SHIFT
be 0f-do_call_base(%r13)
l %r15,__LC_ASYNC_STACK
0: sl %r15,.Lc_overhead-do_call_base(%r13)
st %r12,__SF_BACKCHAIN(%r15) # store backchain
l %r1,.Ldo_softirq-do_call_base(%r13)
basr %r14,%r1
lm %r12,%r15,__SF_GPRS(%r12)
ssm __SF_EMPTY(%r15)
br %r14
__critical_start: __critical_start:
/* /*
* SVC interrupt handler routine. System calls are synchronous events and * SVC interrupt handler routine. System calls are synchronous events and
...@@ -733,7 +709,6 @@ cleanup_sysc_leave_lpsw: ...@@ -733,7 +709,6 @@ cleanup_sysc_leave_lpsw:
.Ldo_IRQ: .long do_IRQ .Ldo_IRQ: .long do_IRQ
.Ldo_extint: .long do_extint .Ldo_extint: .long do_extint
.Ldo_signal: .long do_signal .Ldo_signal: .long do_signal
.Ldo_softirq: .long do_softirq
.Lhandle_per: .long do_single_step .Lhandle_per: .long do_single_step
.Ljump_table: .long pgm_check_table .Ljump_table: .long pgm_check_table
.Lschedule: .long schedule .Lschedule: .long schedule
......
...@@ -147,27 +147,6 @@ __switch_to_noper: ...@@ -147,27 +147,6 @@ __switch_to_noper:
stg %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack stg %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack
br %r14 br %r14
/*
* do_softirq calling function. We want to run the softirq functions on the
* asynchronous interrupt stack.
*/
.global do_call_softirq
do_call_softirq:
stnsm __SF_EMPTY(%r15),0xfc
stmg %r12,%r15,__SF_GPRS(%r15)
lgr %r12,%r15
lg %r0,__LC_ASYNC_STACK
slgr %r0,%r15
srag %r0,%r0,STACK_SHIFT
je 0f
lg %r15,__LC_ASYNC_STACK
0: aghi %r15,-STACK_FRAME_OVERHEAD
stg %r12,__SF_BACKCHAIN(%r15) # store back chain
brasl %r14,do_softirq
lmg %r12,%r15,__SF_GPRS(%r12)
ssm __SF_EMPTY(%r15)
br %r14
__critical_start: __critical_start:
/* /*
* SVC interrupt handler routine. System calls are synchronous events and * SVC interrupt handler routine. System calls are synchronous events and
......
/*
* arch/s390/kernel/irq.c
*
* S390 version
* Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
*
* This file contains interrupt related functions.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <linux/seq_file.h>
#include <linux/cpu.h>
/*
* show_interrupts is needed by /proc/interrupts.
*/
int show_interrupts(struct seq_file *p, void *v)
{
static const char *intrclass_names[] = { "EXT", "I/O", };
int i = *(loff_t *) v, j;
if (i == 0) {
seq_puts(p, " ");
for (j=0; j<NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "CPU%d ",j);
seq_putc(p, '\n');
}
if (i < NR_IRQS) {
seq_printf(p, "%s: ", intrclass_names[i]);
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(i));
#else
for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
seq_putc(p, '\n');
}
return 0;
}
/*
* For compatibilty only. S/390 specific setup of interrupts et al. is done
* much later in init_channel_subsystem().
*/
void __init
init_IRQ(void)
{
/* nothing... */
}
/*
* Switch to the asynchronous interrupt stack for softirq execution.
*/
extern void __do_softirq(void);
asmlinkage void do_softirq(void)
{
unsigned long flags, old, new;
if (in_interrupt())
return;
local_irq_save(flags);
if (local_softirq_pending()) {
/* Get current stack pointer. */
asm volatile("la %0,0(15)" : "=a" (old));
/* Check against async. stack address range. */
new = S390_lowcore.async_stack;
if (((new - old) >> (PAGE_SHIFT + THREAD_ORDER)) != 0) {
/* Need to switch to the async. stack. */
new -= STACK_FRAME_OVERHEAD;
((struct stack_frame *) new)->back_chain = old;
asm volatile(" la 15,0(%0)\n"
" basr 14,%2\n"
" la 15,0(%1)\n"
: : "a" (new), "a" (old),
"a" (__do_softirq)
: "0", "1", "2", "3", "4", "5",
"cc", "memory" );
} else
/* We are already on the async stack. */
__do_softirq();
}
local_irq_restore(flags);
}
EXPORT_SYMBOL(do_softirq);
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <asm/lowcore.h> #include <asm/lowcore.h>
#include <asm/s390_ext.h> #include <asm/s390_ext.h>
......
...@@ -61,6 +61,5 @@ EXPORT_SYMBOL(csum_fold); ...@@ -61,6 +61,5 @@ EXPORT_SYMBOL(csum_fold);
EXPORT_SYMBOL(console_mode); EXPORT_SYMBOL(console_mode);
EXPORT_SYMBOL(console_devno); EXPORT_SYMBOL(console_devno);
EXPORT_SYMBOL(console_irq); EXPORT_SYMBOL(console_irq);
EXPORT_SYMBOL(do_call_softirq);
EXPORT_SYMBOL(sys_wait4); EXPORT_SYMBOL(sys_wait4);
EXPORT_SYMBOL(cpcmd); EXPORT_SYMBOL(cpcmd);
...@@ -608,49 +608,3 @@ struct seq_operations cpuinfo_op = { ...@@ -608,49 +608,3 @@ struct seq_operations cpuinfo_op = {
.show = show_cpuinfo, .show = show_cpuinfo,
}; };
/*
* show_interrupts is needed by /proc/interrupts.
*/
static const char *intrclass_names[] = {
"EXT",
"I/O",
};
int show_interrupts(struct seq_file *p, void *v)
{
int i = *(loff_t *) v, j;
if (i == 0) {
seq_puts(p, " ");
for (j=0; j<NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "CPU%d ",j);
seq_putc(p, '\n');
}
if (i < NR_IRQS) {
seq_printf(p, "%s: ", intrclass_names[i]);
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(i));
#else
for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
seq_putc(p, '\n');
}
return 0;
}
/*
* For compatibilty only. S/390 specific setup of interrupts et al. is done
* much later in init_channel_subsystem().
*/
void __init
init_IRQ(void)
{
/* nothing... */
}
...@@ -63,10 +63,6 @@ struct crw { ...@@ -63,10 +63,6 @@ struct crw {
#define CRW_ERC_PERRI 0x07 /* perm. error, facility init */ #define CRW_ERC_PERRI 0x07 /* perm. error, facility init */
#define CRW_ERC_PMOD 0x08 /* installed parameters modified */ #define CRW_ERC_PMOD 0x08 /* installed parameters modified */
#define MCHCHK_STATUS_TO_PROCESS 0x00000001
#define MCHCHK_STATUS_IN_PROGRESS 0x00000002
#define MCHCHK_STATUS_WAITING 0x00000004
extern __inline__ int stcrw(struct crw *pcrw ) extern __inline__ int stcrw(struct crw *pcrw )
{ {
int ccode; int ccode;
......
...@@ -61,10 +61,9 @@ softirq_pending(unsigned int cpu) ...@@ -61,10 +61,9 @@ softirq_pending(unsigned int cpu)
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
extern void do_call_softirq(void);
extern void account_ticks(struct pt_regs *); extern void account_ticks(struct pt_regs *);
#define invoke_softirq() do_call_softirq() #define __ARCH_HAS_DO_SOFTIRQ
#define irq_enter() \ #define irq_enter() \
do { \ do { \
...@@ -75,7 +74,7 @@ do { \ ...@@ -75,7 +74,7 @@ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && local_softirq_pending()) \ if (!in_interrupt() && local_softirq_pending()) \
/* Use the async. stack for softirq */ \ /* Use the async. stack for softirq */ \
do_call_softirq(); \ do_softirq(); \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
......
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