s390 patches for 2.6.30-rc3
Subsystems (3)
Hi Linus,
please pull from 'for-linus' branch of
git://git390.marist.edu/pub/scm/linux-2.6.git for-linus
to receive the following updates:
Frank Munzert (1):
[S390] Use tape_generic_offline directly.
Gerald Schaefer (1):
[S390] appldata: avoid deadlock with appldata_mem
Heiko Carstens (2):
[S390] ipl: fix compile breakage
[S390] omit frame pointers on s390 when possible
Martin Schwidefsky (2):
[S390] /proc/stat idle field for idle cpus
[S390] update default configuration.
arch/s390/appldata/appldata_base.c | 32 +++++++++--------- arch/s390/appldata/appldata_mem.c | 2 +- arch/s390/defconfig | 63 ++++++++++++++++++++++++++++------- arch/s390/include/asm/cputime.h | 4 ++ arch/s390/kernel/ipl.c | 1 + arch/s390/kernel/vtime.c | 16 +++++++++ drivers/s390/char/tape.h | 2 +- drivers/s390/char/tape_34xx.c | 8 +---- drivers/s390/char/tape_3590.c | 8 +---- drivers/s390/char/tape_core.c | 5 ++- fs/proc/stat.c | 5 +++ lib/Kconfig.debug | 8 ++-- 12 files changed, 104 insertions(+), 50 deletions(-)
arch/s390/appldata/appldata_base.c +16 -16
@@ -98,7 +98,7 @@ static DECLARE_WORK(appldata_work, appldata_work_fn);/* * Ops list */ -static DEFINE_SPINLOCK (appldata_ops_lock); +static DEFINE_MUTEX (appldata_ops_mutex);static LIST_HEAD (appldata_ops_list);
@@ -129,14 +129,14 @@ static void appldata_work_fn(struct work_struct *work) i =0 ;get_online_cpus (); -spin_lock (&appldata_ops_lock); +mutex_lock (&appldata_ops_mutex);list_for_each (lh, &appldata_ops_list) { ops = list_entry(lh, struct appldata_ops, list);if (ops->active ==1 ) { ops->callback (ops->data); } } -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);put_online_cpus (); }
@@ -338,7 +338,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,struct list_head *lh; found =0 ; -spin_lock (&appldata_ops_lock); +mutex_lock (&appldata_ops_mutex);list_for_each (lh, &appldata_ops_list) { tmp_ops = list_entry(lh, struct appldata_ops, list);if (&tmp_ops->ctl_table[2 ] == ctl) {
@@ -346,15 +346,15 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, } }if (!found) { -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);return -ENODEV ; } ops = ctl->data;if (!try_module_get (ops->owner)) {// protect this function -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);return -ENODEV ; } -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);if (!*lenp || *ppos) { *lenp =0 ;
@@ -378,11 +378,11 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,return -EFAULT ; } -spin_lock (&appldata_ops_lock); +mutex_lock (&appldata_ops_mutex);if ((buf[0 ] =='1' ) && (ops->active ==0 )) {// protect work queue callback if (!try_module_get (ops->owner)) { -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);module_put (ops->owner);return -ENODEV ; }
@@ -407,7 +407,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, "failed with rc=%d\n", ops->name, rc);module_put (ops->owner); } -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex); out: *lenp = len; *ppos += len;
@@ -433,9 +433,9 @@ int appldata_register_ops(struct appldata_ops *ops)if (!ops->ctl_table)return -ENOMEM ; -spin_lock (&appldata_ops_lock); +mutex_lock (&appldata_ops_mutex);list_add (&ops->list, &appldata_ops_list); -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex); ops->ctl_table[0 ].procname = appldata_proc_name; ops->ctl_table[0 ].maxlen =0 ;
@@ -452,9 +452,9 @@ int appldata_register_ops(struct appldata_ops *ops) goto out;return 0 ; out: -spin_lock (&appldata_ops_lock); +mutex_lock (&appldata_ops_mutex);list_del (&ops->list); -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);kfree (ops->ctl_table);return -ENOMEM ; }
@@ -466,9 +466,9 @@ out:*/ void appldata_unregister_ops (struct appldata_ops *ops) { -spin_lock (&appldata_ops_lock); +mutex_lock (&appldata_ops_mutex);list_del (&ops->list); -spin_unlock (&appldata_ops_lock); +mutex_unlock (&appldata_ops_mutex);unregister_sysctl_table (ops->sysctl_header);kfree (ops->ctl_table); }
arch/s390/appldata/appldata_mem.c +1 -1
@@ -78,7 +78,7 @@ static void appldata_get_mem_data(void *data) {/* * don't put large structures on the stack, we are -* serialized through the appldata_ops_lock and can use static +* serialized through the appldata_ops_mutex and can use static */ static struct sysinfo val;unsigned long ev[NR_VM_EVENT_ITEMS ];
arch/s390/defconfig +50 -13
263 lines not on this page · raw message
arch/s390/include/asm/cputime.h +4 -0
@@ -174,4 +174,8 @@ cputime64_to_clock_t(cputime64_t cputime) return __div(cputime, 4096000000ULL / USER_HZ); } +cputime64_t s390_get_idle_time (int cpu); + +#define arch_idle_time (cpu) s390_get_idle_time(cpu) +#endif /* _S390_CPUTIME_H */
arch/s390/kernel/ipl.c +1 -0
@@ -23,6 +23,7 @@#include <asm/ebcdic.h> #include <asm/reset.h> #include <asm/sclp.h> +#include <asm/sigp.h> #include <asm/checksum.h> #define IPL_PARM_BLOCK_VERSION 0
arch/s390/kernel/vtime.c +16 -0
@@ -240,6 +240,22 @@ void vtime_stop_cpu(void) } } +cputime64_t s390_get_idle_time (int cpu) +{ +struct s390_idle_data *idle; +unsigned long long now, idle_time, idle_enter; + + idle = &per_cpu (s390_idle, cpu); +spin_lock (&idle->lock); + now =get_clock (); + idle_time =0 ; + idle_enter = idle->idle_enter; +if (idle_enter !=0ULL && idle_enter < now) + idle_time = now - idle_enter; +spin_unlock (&idle->lock); +return idle_time; +} +/* * Sorted add to a list. List is linear searched until first bigger * element is found.
drivers/s390/char/tape.h +1 -1
@@ -285,7 +285,7 @@ extern int tape_mtop(struct tape_device *, int, int);extern void tape_state_set (struct tape_device *,enum tape_state );extern int tape_generic_online (struct tape_device *,struct tape_discipline *); -extern int tape_generic_offline (struct tape_device *device); +extern int tape_generic_offline (struct ccw_device *);/* Externals from tape_devmap.c */ extern int tape_generic_probe (struct ccw_device *);
drivers/s390/char/tape_34xx.c +1 -7
@@ -1294,12 +1294,6 @@ tape_34xx_online(struct ccw_device *cdev) ); } -static int -tape_34xx_offline (struct ccw_device *cdev) -{ -return tape_generic_offline (cdev->dev.driver_data); -} -static struct ccw_driver tape_34xx_driver = { .name ="tape_34xx" , .owner =THIS_MODULE ,
@@ -1307,7 +1301,7 @@ static struct ccw_driver tape_34xx_driver = { .probe = tape_generic_probe, .remove = tape_generic_remove, .set_online = tape_34xx_online, - .set_offline = tape_34xx_offline, + .set_offline = tape_generic_offline, }; static int
drivers/s390/char/tape_3590.c +1 -7
@@ -1707,19 +1707,13 @@ tape_3590_online(struct ccw_device *cdev) &tape_discipline_3590); } -static int -tape_3590_offline (struct ccw_device *cdev) -{ -return tape_generic_offline (cdev->dev.driver_data); -} -static struct ccw_driver tape_3590_driver = { .name ="tape_3590" , .owner =THIS_MODULE , .ids = tape_3590_ids, .probe = tape_generic_probe, .remove = tape_generic_remove, - .set_offline = tape_3590_offline, + .set_offline = tape_generic_offline, .set_online = tape_3590_online, };
drivers/s390/char/tape_core.c +4 -1
@@ -387,8 +387,11 @@ tape_cleanup_device(struct tape_device *device)* Manual offline is only allowed while the drive is not in use. */ int -tape_generic_offline (struct tape_device *device) +tape_generic_offline (struct ccw_device *cdev) { +struct tape_device *device; + + device = cdev->dev.driver_data;if (!device) {return -ENODEV ; }
fs/proc/stat.c +5 -0
@@ -18,6 +18,9 @@#ifndef arch_irq_stat#define arch_irq_stat () 0#endif +#ifndef arch_idle_time +#define arch_idle_time (cpu) 0 +#endif static int show_stat (struct seq_file *p,void *v) {
@@ -40,6 +43,7 @@ static int show_stat(struct seq_file *p, void *v) nice =cputime64_add (nice,kstat_cpu (i).cpustat.nice); system =cputime64_add (system,kstat_cpu (i).cpustat.system); idle =cputime64_add (idle,kstat_cpu (i).cpustat.idle); + idle =cputime64_add (idle,arch_idle_time (i)); iowait =cputime64_add (iowait,kstat_cpu (i).cpustat.iowait); irq =cputime64_add (irq,kstat_cpu (i).cpustat.irq); softirq =cputime64_add (softirq,kstat_cpu (i).cpustat.softirq);
@@ -69,6 +73,7 @@ static int show_stat(struct seq_file *p, void *v) nice =kstat_cpu (i).cpustat.nice; system =kstat_cpu (i).cpustat.system; idle =kstat_cpu (i).cpustat.idle; + idle =cputime64_add (idle,arch_idle_time (i)); iowait =kstat_cpu (i).cpustat.iowait; irq =kstat_cpu (i).cpustat.irq; softirq =kstat_cpu (i).cpustat.softirq;
lib/Kconfig.debug +4 -4
@@ -440,7 +440,7 @@ config LOCKDEP bool depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT select STACKTRACE - select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND + select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND && !S390 select KALLSYMS select KALLSYMS_ALL
@@ -620,7 +620,7 @@ config ARCH_WANT_FRAME_POINTERS config FRAME_POINTER bool "Compile the kernel with frame pointers" depends on DEBUG_KERNEL && \ - (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ + (CRIS || M68K || M68KNOMMU || FRV || UML || \ AVR32 || SUPERH || BLACKFIN || MN10300) || \ ARCH_WANT_FRAME_POINTERS default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
@@ -809,13 +809,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !PPC + select FRAME_POINTER if !PPC && !S390 help Provide stacktrace filter for fault-injection capabilities config LATENCYTOP bool "Latency measuring infrastructure" - select FRAME_POINTER if !MIPS && !PPC + select FRAME_POINTER if !MIPS && !PPC && !S390 select KALLSYMS select KALLSYMS_ALL select STACKTRACE
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.