Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] dcss: Initialize workqueue before using it.
  [S390] Remove BUILD_BUG_ON() in vmem code.
  [S390] sclp_tty/sclp_vt220: Fix scheduling while atomic
  [S390] dasd: fix panic caused by alias device offline
  [S390] dasd: add ifcc handling
  [S390] latencytop s390 support.
  [S390] Implement ext2_find_next_bit.
  [S390] Cleanup & optimize bitops.
  [S390] Define GENERIC_LOCKBREAK.
  [S390] console: allow vt220 console to be the only console
  [S390] Fix couple of section mismatches.
  [S390] Fix smp_call_function_mask semantics.
  [S390] Fix linker script.
  [S390] DEBUG_PAGEALLOC support for s390.
  [S390] cio: Add shutdown callback for ccwgroup.
  [S390] cio: Update documentation.
  [S390] cio: Clean up chsc response code handling.
  [S390] cio: make sense id procedure work with partial hardware response
  • Loading branch information
Linus Torvalds committed Feb 5, 2008
2 parents 3d412f6 + c5411db commit 39ce941
Show file tree
Hide file tree
Showing 25 changed files with 587 additions and 520 deletions.
21 changes: 16 additions & 5 deletions Documentation/DocBook/s390-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<title>Introduction</title>
<para>
This document describes the interfaces available for device drivers that
drive s390 based channel attached devices. This includes interfaces for
drive s390 based channel attached I/O devices. This includes interfaces for
interaction with the hardware and interfaces for interacting with the
common driver core. Those interfaces are provided by the s390 common I/O
layer.
Expand All @@ -86,9 +86,10 @@
The ccw bus typically contains the majority of devices available to
a s390 system. Named after the channel command word (ccw), the basic
command structure used to address its devices, the ccw bus contains
so-called channel attached devices. They are addressed via subchannels,
visible on the css bus. A device driver, however, will never interact
with the subchannel directly, but only via the device on the ccw bus,
so-called channel attached devices. They are addressed via I/O
subchannels, visible on the css bus. A device driver for
channel-attached devices, however, will never interact with the
subchannel directly, but only via the I/O device on the ccw bus,
the ccw device.
</para>
<sect1 id="channelIO">
Expand Down Expand Up @@ -116,7 +117,6 @@
!Iinclude/asm-s390/ccwdev.h
!Edrivers/s390/cio/device.c
!Edrivers/s390/cio/device_ops.c
!Edrivers/s390/cio/airq.c
</sect1>
<sect1 id="cmf">
<title>The channel-measurement facility</title>
Expand Down Expand Up @@ -147,4 +147,15 @@
</sect1>
</chapter>

<chapter id="genericinterfaces">
<title>Generic interfaces</title>
<para>
Some interfaces are available to other drivers that do not necessarily
have anything to do with the busses described above, but still are
indirectly using basic infrastructure in the common I/O layer.
One example is the support for adapter interrupts.
</para>
!Edrivers/s390/cio/airq.c
</chapter>

</book>
8 changes: 8 additions & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ config LOCKDEP_SUPPORT
config STACKTRACE_SUPPORT
def_bool y

config HAVE_LATENCYTOP_SUPPORT
def_bool y

config RWSEM_GENERIC_SPINLOCK
bool

Expand Down Expand Up @@ -47,6 +50,11 @@ config NO_IOMEM
config NO_DMA
def_bool y

config GENERIC_LOCKBREAK
bool
default y
depends on SMP && PREEMPT

mainmenu "Linux Kernel Configuration"

config S390
Expand Down
8 changes: 8 additions & 0 deletions arch/s390/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ config TRACE_IRQFLAGS_SUPPORT

source "lib/Kconfig.debug"

config DEBUG_PAGEALLOC
bool "Debug page memory allocations"
depends on DEBUG_KERNEL
help
Unmap pages from the kernel linear mapping after free_pages().
This results in a slowdown, but helps to find certain types of
memory corruptions.

endmenu
7 changes: 2 additions & 5 deletions arch/s390/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <linux/sys.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/cache.h>
#include <asm/lowcore.h>
#include <asm/errno.h>
Expand Down Expand Up @@ -830,9 +831,7 @@ mcck_return:
* Restart interruption handler, kick starter for additional CPUs
*/
#ifdef CONFIG_SMP
#ifndef CONFIG_HOTPLUG_CPU
.section .init.text,"ax"
#endif
__CPUINIT
.globl restart_int_handler
restart_int_handler:
l %r15,__LC_SAVE_AREA+60 # load ksp
Expand All @@ -845,9 +844,7 @@ restart_int_handler:
br %r14 # branch to start_secondary
restart_addr:
.long start_secondary
#ifndef CONFIG_HOTPLUG_CPU
.previous
#endif
#else
/*
* If we do not run with SMP enabled, let the new CPU crash ...
Expand Down
7 changes: 2 additions & 5 deletions arch/s390/kernel/entry64.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <linux/sys.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/cache.h>
#include <asm/lowcore.h>
#include <asm/errno.h>
Expand Down Expand Up @@ -801,9 +802,7 @@ mcck_return:
* Restart interruption handler, kick starter for additional CPUs
*/
#ifdef CONFIG_SMP
#ifndef CONFIG_HOTPLUG_CPU
.section .init.text,"ax"
#endif
__CPUINIT
.globl restart_int_handler
restart_int_handler:
lg %r15,__LC_SAVE_AREA+120 # load ksp
Expand All @@ -814,9 +813,7 @@ restart_int_handler:
lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone
stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
jg start_secondary
#ifndef CONFIG_HOTPLUG_CPU
.previous
#endif
#else
/*
* If we do not run with SMP enabled, let the new CPU crash ...
Expand Down
27 changes: 18 additions & 9 deletions arch/s390/kernel/ipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static void ipl_run(struct shutdown_trigger *trigger)
reipl_ccw_dev(&ipl_info.data.ccw.dev_id);
}

static int ipl_init(void)
static int __init ipl_init(void)
{
int rc;

Expand Down Expand Up @@ -471,8 +471,11 @@ static int ipl_init(void)
return 0;
}

static struct shutdown_action ipl_action = {SHUTDOWN_ACTION_IPL_STR, ipl_run,
ipl_init};
static struct shutdown_action __refdata ipl_action = {
.name = SHUTDOWN_ACTION_IPL_STR,
.fn = ipl_run,
.init = ipl_init,
};

/*
* reipl shutdown action: Reboot Linux on shutdown.
Expand Down Expand Up @@ -792,7 +795,7 @@ static int __init reipl_fcp_init(void)
return 0;
}

static int reipl_init(void)
static int __init reipl_init(void)
{
int rc;

Expand All @@ -819,8 +822,11 @@ static int reipl_init(void)
return 0;
}

static struct shutdown_action reipl_action = {SHUTDOWN_ACTION_REIPL_STR,
reipl_run, reipl_init};
static struct shutdown_action __refdata reipl_action = {
.name = SHUTDOWN_ACTION_REIPL_STR,
.fn = reipl_run,
.init = reipl_init,
};

/*
* dump shutdown action: Dump Linux on shutdown.
Expand Down Expand Up @@ -998,7 +1004,7 @@ static int __init dump_fcp_init(void)
return 0;
}

static int dump_init(void)
static int __init dump_init(void)
{
int rc;

Expand All @@ -1020,8 +1026,11 @@ static int dump_init(void)
return 0;
}

static struct shutdown_action dump_action = {SHUTDOWN_ACTION_DUMP_STR,
dump_run, dump_init};
static struct shutdown_action __refdata dump_action = {
.name = SHUTDOWN_ACTION_DUMP_STR,
.fn = dump_run,
.init = dump_init,
};

/*
* vmcmd shutdown action: Trigger vm command on shutdown.
Expand Down
14 changes: 7 additions & 7 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ unsigned long machine_flags = 0;
unsigned long elf_hwcap = 0;
char elf_platform[ELF_PLATFORM_SIZE];

struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS];
struct mem_chunk __meminitdata memory_chunk[MEMORY_CHUNKS];
volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */
static unsigned long __initdata memory_end;

Expand Down Expand Up @@ -145,7 +145,7 @@ __setup("condev=", condev_setup);

static int __init conmode_setup(char *str)
{
#if defined(CONFIG_SCLP_CONSOLE)
#if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
if (strncmp(str, "hwc", 4) == 0 || strncmp(str, "sclp", 5) == 0)
SET_CONSOLE_SCLP;
#endif
Expand Down Expand Up @@ -183,7 +183,7 @@ static void __init conmode_default(void)
*/
cpcmd("TERM CONMODE 3215", NULL, 0, NULL);
if (ptr == NULL) {
#if defined(CONFIG_SCLP_CONSOLE)
#if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
SET_CONSOLE_SCLP;
#endif
return;
Expand All @@ -193,15 +193,15 @@ static void __init conmode_default(void)
SET_CONSOLE_3270;
#elif defined(CONFIG_TN3215_CONSOLE)
SET_CONSOLE_3215;
#elif defined(CONFIG_SCLP_CONSOLE)
#elif defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
SET_CONSOLE_SCLP;
#endif
} else if (strncmp(ptr + 8, "3215", 4) == 0) {
#if defined(CONFIG_TN3215_CONSOLE)
SET_CONSOLE_3215;
#elif defined(CONFIG_TN3270_CONSOLE)
SET_CONSOLE_3270;
#elif defined(CONFIG_SCLP_CONSOLE)
#elif defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
SET_CONSOLE_SCLP;
#endif
}
Expand All @@ -212,7 +212,7 @@ static void __init conmode_default(void)
SET_CONSOLE_3270;
#endif
} else {
#if defined(CONFIG_SCLP_CONSOLE)
#if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
SET_CONSOLE_SCLP;
#endif
}
Expand Down Expand Up @@ -528,7 +528,7 @@ static void __init setup_memory_end(void)
memory_size = 0;
memory_end &= PAGE_MASK;

max_mem = memory_end ? min(VMALLOC_START, memory_end) : VMALLOC_START;
max_mem = memory_end ? min(VMEM_MAX_PHYS, memory_end) : VMEM_MAX_PHYS;
memory_end = min(max_mem, memory_end);

/*
Expand Down
13 changes: 6 additions & 7 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,11 @@ EXPORT_SYMBOL(smp_call_function_single);
* You must not call this function with disabled interrupts or from a
* hardware interrupt handler or from a bottom half handler.
*/
int
smp_call_function_mask(cpumask_t mask,
void (*func)(void *), void *info,
int wait)
int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
int wait)
{
preempt_disable();
cpu_clear(smp_processor_id(), mask);
__smp_call_function_map(func, info, 0, wait, mask);
preempt_enable();
return 0;
Expand Down Expand Up @@ -1008,7 +1007,7 @@ static struct notifier_block __cpuinitdata smp_cpu_nb = {
.notifier_call = smp_cpu_notify,
};

static int smp_add_present_cpu(int cpu)
static int __devinit smp_add_present_cpu(int cpu)
{
struct cpu *c = &per_cpu(cpu_devices, cpu);
struct sys_device *s = &c->sysdev;
Expand Down Expand Up @@ -1036,8 +1035,8 @@ static int smp_add_present_cpu(int cpu)
}

#ifdef CONFIG_HOTPLUG_CPU
static ssize_t rescan_store(struct sys_device *dev, const char *buf,
size_t count)
static ssize_t __ref rescan_store(struct sys_device *dev,
const char *buf, size_t count)
{
cpumask_t newcpus;
int cpu;
Expand Down
31 changes: 23 additions & 8 deletions arch/s390/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
static unsigned long save_context_stack(struct stack_trace *trace,
unsigned long sp,
unsigned long low,
unsigned long high)
unsigned long high,
int savesched)
{
struct stack_frame *sf;
struct pt_regs *regs;
Expand Down Expand Up @@ -47,10 +48,12 @@ static unsigned long save_context_stack(struct stack_trace *trace,
return sp;
regs = (struct pt_regs *)sp;
addr = regs->psw.addr & PSW_ADDR_INSN;
if (!trace->skip)
trace->entries[trace->nr_entries++] = addr;
else
trace->skip--;
if (savesched || !in_sched_functions(addr)) {
if (!trace->skip)
trace->entries[trace->nr_entries++] = addr;
else
trace->skip--;
}
if (trace->nr_entries >= trace->max_entries)
return sp;
low = sp;
Expand All @@ -66,15 +69,27 @@ void save_stack_trace(struct stack_trace *trace)
orig_sp = sp & PSW_ADDR_INSN;
new_sp = save_context_stack(trace, orig_sp,
S390_lowcore.panic_stack - PAGE_SIZE,
S390_lowcore.panic_stack);
S390_lowcore.panic_stack, 1);
if (new_sp != orig_sp)
return;
new_sp = save_context_stack(trace, new_sp,
S390_lowcore.async_stack - ASYNC_SIZE,
S390_lowcore.async_stack);
S390_lowcore.async_stack, 1);
if (new_sp != orig_sp)
return;
save_context_stack(trace, new_sp,
S390_lowcore.thread_info,
S390_lowcore.thread_info + THREAD_SIZE);
S390_lowcore.thread_info + THREAD_SIZE, 1);
}

void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{
unsigned long sp, low, high;

sp = tsk->thread.ksp & PSW_ADDR_INSN;
low = (unsigned long) task_stack_page(tsk);
high = (unsigned long) task_pt_regs(tsk);
save_context_stack(trace, sp, low, high, 0);
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}
5 changes: 4 additions & 1 deletion arch/s390/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ void die(const char * str, struct pt_regs * regs, long err)
printk("PREEMPT ");
#endif
#ifdef CONFIG_SMP
printk("SMP");
printk("SMP ");
#endif
#ifdef CONFIG_DEBUG_PAGEALLOC
printk("DEBUG_PAGEALLOC");
#endif
printk("\n");
notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SECTIONS
KPROBES_TEXT
*(.fixup)
*(.gnu.warning)
} = 0x0700
} :text = 0x0700

_etext = .; /* End of text section */

Expand Down
Loading

0 comments on commit 39ce941

Please sign in to comment.