Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/s390/linux

Pull s390 changes from Martin Schwidefsky:
 "No new functions, a few changes to make the code more robust, some
  cleanups and bug fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (21 commits)
  s390/vtimer: rework virtual timer interface
  s390/dis: Add the servc instruction to the disassembler.
  s390/comments: unify copyright messages and remove file names
  s390/lgr: Add init check to lgr_info_log()
  s390/cpu init: use __get_cpu_var instead of per_cpu
  s390/idle: reduce size of s390_idle_data structure
  s390/idle: fix sequence handling vs cpu hotplug
  s390/ap: resend enable adapter interrupt request.
  s390/hypfs: Add missing get_next_ino()
  s390/dasd: add shutdown action
  s390/ipl: Fix ipib handling for "dumpreipl" shutdown action
  s390/smp: make absolute lowcore / cpu restart parameter accesses more robust
  s390/vmlogrdr: cleanup driver attribute usage
  s390/vmlogrdr: cleanup device attribute usage
  s390/ccwgroup: remove unused ccwgroup_device member
  s390/cio/chp: cleanup attribute usage
  s390/sigp: use sigp order code defines in assembly code
  s390/smp: use sigp cpu status definitions
  s390/smp/kvm: unifiy sigp definitions
  s390/smp: remove redundant check
  ...
  • Loading branch information
torvalds committed Jul 24, 2012
2 parents 759e2a2 + 27f6b41 commit e017507
Show file tree
Hide file tree
Showing 295 changed files with 678 additions and 1,251 deletions.
2 changes: 0 additions & 2 deletions arch/s390/appldata/appldata.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* arch/s390/appldata/appldata.h
*
* Definitions and interface for Linux - z/VM Monitor Stream.
*
* Copyright IBM Corp. 2003, 2008
Expand Down
132 changes: 14 additions & 118 deletions arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* arch/s390/appldata/appldata_base.c
*
* Base infrastructure for Linux-z/VM Monitor Stream, Stage 1.
* Exports appldata_register_ops() and appldata_unregister_ops() for the
* data gathering modules.
Expand Down Expand Up @@ -29,7 +27,7 @@
#include <linux/suspend.h>
#include <linux/platform_device.h>
#include <asm/appldata.h>
#include <asm/timer.h>
#include <asm/vtimer.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/smp.h>
Expand Down Expand Up @@ -84,8 +82,7 @@ static struct ctl_table appldata_dir_table[] = {
/*
* Timer
*/
static DEFINE_PER_CPU(struct vtimer_list, appldata_timer);
static atomic_t appldata_expire_count = ATOMIC_INIT(0);
static struct vtimer_list appldata_timer;

static DEFINE_SPINLOCK(appldata_timer_lock);
static int appldata_interval = APPLDATA_CPU_INTERVAL;
Expand Down Expand Up @@ -115,10 +112,7 @@ static LIST_HEAD(appldata_ops_list);
*/
static void appldata_timer_function(unsigned long data)
{
if (atomic_dec_and_test(&appldata_expire_count)) {
atomic_set(&appldata_expire_count, num_online_cpus());
queue_work(appldata_wq, (struct work_struct *) data);
}
queue_work(appldata_wq, (struct work_struct *) data);
}

/*
Expand All @@ -131,7 +125,6 @@ static void appldata_work_fn(struct work_struct *work)
struct list_head *lh;
struct appldata_ops *ops;

get_online_cpus();
mutex_lock(&appldata_ops_mutex);
list_for_each(lh, &appldata_ops_list) {
ops = list_entry(lh, struct appldata_ops, list);
Expand All @@ -140,7 +133,6 @@ static void appldata_work_fn(struct work_struct *work)
}
}
mutex_unlock(&appldata_ops_mutex);
put_online_cpus();
}

/*
Expand Down Expand Up @@ -168,20 +160,6 @@ int appldata_diag(char record_nr, u16 function, unsigned long buffer,

/****************************** /proc stuff **********************************/

/*
* appldata_mod_vtimer_wrap()
*
* wrapper function for mod_virt_timer(), because smp_call_function_single()
* accepts only one parameter.
*/
static void __appldata_mod_vtimer_wrap(void *p) {
struct {
struct vtimer_list *timer;
u64 expires;
} *args = p;
mod_virt_timer_periodic(args->timer, args->expires);
}

#define APPLDATA_ADD_TIMER 0
#define APPLDATA_DEL_TIMER 1
#define APPLDATA_MOD_TIMER 2
Expand All @@ -192,49 +170,28 @@ static void __appldata_mod_vtimer_wrap(void *p) {
* Add, delete or modify virtual timers on all online cpus.
* The caller needs to get the appldata_timer_lock spinlock.
*/
static void
__appldata_vtimer_setup(int cmd)
static void __appldata_vtimer_setup(int cmd)
{
u64 per_cpu_interval;
int i;
u64 timer_interval = (u64) appldata_interval * 1000 * TOD_MICRO;

switch (cmd) {
case APPLDATA_ADD_TIMER:
if (appldata_timer_active)
break;
per_cpu_interval = (u64) (appldata_interval*1000 /
num_online_cpus()) * TOD_MICRO;
for_each_online_cpu(i) {
per_cpu(appldata_timer, i).expires = per_cpu_interval;
smp_call_function_single(i, add_virt_timer_periodic,
&per_cpu(appldata_timer, i),
1);
}
appldata_timer.expires = timer_interval;
add_virt_timer_periodic(&appldata_timer);
appldata_timer_active = 1;
break;
case APPLDATA_DEL_TIMER:
for_each_online_cpu(i)
del_virt_timer(&per_cpu(appldata_timer, i));
del_virt_timer(&appldata_timer);
if (!appldata_timer_active)
break;
appldata_timer_active = 0;
atomic_set(&appldata_expire_count, num_online_cpus());
break;
case APPLDATA_MOD_TIMER:
per_cpu_interval = (u64) (appldata_interval*1000 /
num_online_cpus()) * TOD_MICRO;
if (!appldata_timer_active)
break;
for_each_online_cpu(i) {
struct {
struct vtimer_list *timer;
u64 expires;
} args;
args.timer = &per_cpu(appldata_timer, i);
args.expires = per_cpu_interval;
smp_call_function_single(i, __appldata_mod_vtimer_wrap,
&args, 1);
}
mod_virt_timer_periodic(&appldata_timer, timer_interval);
}
}

Expand Down Expand Up @@ -265,14 +222,12 @@ appldata_timer_handler(ctl_table *ctl, int write,
len = *lenp;
if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len))
return -EFAULT;
get_online_cpus();
spin_lock(&appldata_timer_lock);
if (buf[0] == '1')
__appldata_vtimer_setup(APPLDATA_ADD_TIMER);
else if (buf[0] == '0')
__appldata_vtimer_setup(APPLDATA_DEL_TIMER);
spin_unlock(&appldata_timer_lock);
put_online_cpus();
out:
*lenp = len;
*ppos += len;
Expand Down Expand Up @@ -305,20 +260,17 @@ appldata_interval_handler(ctl_table *ctl, int write,
goto out;
}
len = *lenp;
if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) {
if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len))
return -EFAULT;
}
interval = 0;
sscanf(buf, "%i", &interval);
if (interval <= 0)
return -EINVAL;

get_online_cpus();
spin_lock(&appldata_timer_lock);
appldata_interval = interval;
__appldata_vtimer_setup(APPLDATA_MOD_TIMER);
spin_unlock(&appldata_timer_lock);
put_online_cpus();
out:
*lenp = len;
*ppos += len;
Expand Down Expand Up @@ -485,14 +437,12 @@ static int appldata_freeze(struct device *dev)
int rc;
struct list_head *lh;

get_online_cpus();
spin_lock(&appldata_timer_lock);
if (appldata_timer_active) {
__appldata_vtimer_setup(APPLDATA_DEL_TIMER);
appldata_timer_suspended = 1;
}
spin_unlock(&appldata_timer_lock);
put_online_cpus();

mutex_lock(&appldata_ops_mutex);
list_for_each(lh, &appldata_ops_list) {
Expand All @@ -516,14 +466,12 @@ static int appldata_restore(struct device *dev)
int rc;
struct list_head *lh;

get_online_cpus();
spin_lock(&appldata_timer_lock);
if (appldata_timer_suspended) {
__appldata_vtimer_setup(APPLDATA_ADD_TIMER);
appldata_timer_suspended = 0;
}
spin_unlock(&appldata_timer_lock);
put_online_cpus();

mutex_lock(&appldata_ops_mutex);
list_for_each(lh, &appldata_ops_list) {
Expand Down Expand Up @@ -567,61 +515,17 @@ static struct platform_driver appldata_pdrv = {

/******************************* init / exit *********************************/

static void __cpuinit appldata_online_cpu(int cpu)
{
init_virt_timer(&per_cpu(appldata_timer, cpu));
per_cpu(appldata_timer, cpu).function = appldata_timer_function;
per_cpu(appldata_timer, cpu).data = (unsigned long)
&appldata_work;
atomic_inc(&appldata_expire_count);
spin_lock(&appldata_timer_lock);
__appldata_vtimer_setup(APPLDATA_MOD_TIMER);
spin_unlock(&appldata_timer_lock);
}

static void __cpuinit appldata_offline_cpu(int cpu)
{
del_virt_timer(&per_cpu(appldata_timer, cpu));
if (atomic_dec_and_test(&appldata_expire_count)) {
atomic_set(&appldata_expire_count, num_online_cpus());
queue_work(appldata_wq, &appldata_work);
}
spin_lock(&appldata_timer_lock);
__appldata_vtimer_setup(APPLDATA_MOD_TIMER);
spin_unlock(&appldata_timer_lock);
}

static int __cpuinit appldata_cpu_notify(struct notifier_block *self,
unsigned long action,
void *hcpu)
{
switch (action) {
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
appldata_online_cpu((long) hcpu);
break;
case CPU_DEAD:
case CPU_DEAD_FROZEN:
appldata_offline_cpu((long) hcpu);
break;
default:
break;
}
return NOTIFY_OK;
}

static struct notifier_block __cpuinitdata appldata_nb = {
.notifier_call = appldata_cpu_notify,
};

/*
* appldata_init()
*
* init timer, register /proc entries
*/
static int __init appldata_init(void)
{
int i, rc;
int rc;

appldata_timer.function = appldata_timer_function;
appldata_timer.data = (unsigned long) &appldata_work;

rc = platform_driver_register(&appldata_pdrv);
if (rc)
Expand All @@ -639,14 +543,6 @@ static int __init appldata_init(void)
goto out_device;
}

get_online_cpus();
for_each_online_cpu(i)
appldata_online_cpu(i);
put_online_cpus();

/* Register cpu hotplug notifier */
register_hotcpu_notifier(&appldata_nb);

appldata_sysctl_header = register_sysctl_table(appldata_dir_table);
return 0;

Expand Down
4 changes: 1 addition & 3 deletions arch/s390/appldata/appldata_mem.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* arch/s390/appldata/appldata_mem.c
*
* Data gathering module for Linux-VM Monitor Stream, Stage 1.
* Collects data related to memory management.
*
* Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH.
* Copyright IBM Corp. 2003, 2006
*
* Author: Gerald Schaefer <[email protected]>
*/
Expand Down
4 changes: 1 addition & 3 deletions arch/s390/appldata/appldata_net_sum.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/*
* arch/s390/appldata/appldata_net_sum.c
*
* Data gathering module for Linux-VM Monitor Stream, Stage 1.
* Collects accumulated network statistics (Packets received/transmitted,
* dropped, errors, ...).
*
* Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH.
* Copyright IBM Corp. 2003, 2006
*
* Author: Gerald Schaefer <[email protected]>
*/
Expand Down
4 changes: 1 addition & 3 deletions arch/s390/appldata/appldata_os.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* arch/s390/appldata/appldata_os.c
*
* Data gathering module for Linux-VM Monitor Stream, Stage 1.
* Collects misc. OS related data (CPU utilization, running processes).
*
* Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH.
* Copyright IBM Corp. 2003, 2006
*
* Author: Gerald Schaefer <[email protected]>
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/crypto/aes_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* s390 implementation of the AES Cipher Algorithm.
*
* s390 Version:
* Copyright IBM Corp. 2005,2007
* Copyright IBM Corp. 2005, 2007
* Author(s): Jan Glauber ([email protected])
* Sebastian Siewior ([email protected]> SW-Fallback
*
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/crypto/crypt_s390.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Support for s390 cryptographic instructions.
*
* Copyright IBM Corp. 2003,2007
* Copyright IBM Corp. 2003, 2007
* Author(s): Thomas Spatzier
* Jan Glauber ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/crypto/des_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* s390 implementation of the DES Cipher Algorithm.
*
* Copyright IBM Corp. 2003,2011
* Copyright IBM Corp. 2003, 2011
* Author(s): Thomas Spatzier
* Jan Glauber ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/crypto/prng.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright IBM Corp. 2006,2007
* Copyright IBM Corp. 2006, 2007
* Author(s): Jan Glauber <[email protected]>
* Driver for the s390 pseudo random number generator
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/crypto/sha1_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* implementation written by Steve Reid.
*
* s390 Version:
* Copyright IBM Corp. 2003,2007
* Copyright IBM Corp. 2003, 2007
* Author(s): Thomas Spatzier
* Jan Glauber ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/crypto/sha256_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* s390 implementation of the SHA256 and SHA224 Secure Hash Algorithm.
*
* s390 Version:
* Copyright IBM Corp. 2005,2011
* Copyright IBM Corp. 2005, 2011
* Author(s): Jan Glauber ([email protected])
*
* This program is free software; you can redistribute it and/or modify it
Expand Down
3 changes: 1 addition & 2 deletions arch/s390/hypfs/hypfs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/*
* arch/s390/hypfs/hypfs.h
* Hypervisor filesystem for Linux on s390.
*
* Copyright (C) IBM Corp. 2006
* Copyright IBM Corp. 2006
* Author(s): Michael Holzheu <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion arch/s390/hypfs/hypfs_dbfs.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Hypervisor filesystem for Linux on s390 - debugfs interface
*
* Copyright (C) IBM Corp. 2010
* Copyright IBM Corp. 2010
* Author(s): Michael Holzheu <[email protected]>
*/

Expand Down
1 change: 0 additions & 1 deletion arch/s390/hypfs/hypfs_diag.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
* arch/s390/hypfs/hypfs_diag.c
* Hypervisor filesystem for Linux on s390. Diag 204 and 224
* implementation.
*
Expand Down
Loading

0 comments on commit e017507

Please sign in to comment.