diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 09:16:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 09:16:37 -0700 |
commit | 51d7cfc670e4c09e296af101326a6270060e72e7 (patch) | |
tree | d18858aacd9634b71f543f6a187f313950a13432 /arch | |
parent | 5983b125740553d08a67d0c57e8c1021f5a06e31 (diff) | |
parent | 3ecb0a5a7b567c9719d61938bcdba22938084b65 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] cio: deregister ccw device when pgid disband failed
[S390] cio: Use device_schedule_callback() for removing disconnected devices.
[S390] Fix section annotations.
[S390] raw3270: use mutex instead of semaphore
[S390] arch/s390/kernel/debug.c: use mutex instead of semaphore
[S390] dasd_eer: use mutex instead of semaphore
[S390] Add exception handler for diagnose 224
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/hypfs/hypfs_diag.c | 17 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 22 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 6 |
4 files changed, 30 insertions, 19 deletions
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 2782cf9da5b..b9a1ce1f28e 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c @@ -481,9 +481,17 @@ out: /* Diagnose 224 functions */ -static void diag224(void *ptr) +static int diag224(void *ptr) { - asm volatile("diag %0,%1,0x224" : :"d" (0), "d"(ptr) : "memory"); + int rc = -ENOTSUPP; + + asm volatile( + " diag %1,%2,0x224\n" + "0: lhi %0,0x0\n" + "1:\n" + EX_TABLE(0b,1b) + : "+d" (rc) :"d" (0), "d" (ptr) : "memory"); + return rc; } static int diag224_get_name_table(void) @@ -492,7 +500,10 @@ static int diag224_get_name_table(void) diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); if (!diag224_cpu_names) return -ENOMEM; - diag224(diag224_cpu_names); + if (diag224(diag224_cpu_names)) { + kfree(diag224_cpu_names); + return -ENOTSUPP; + } EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); return 0; } diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index dca6eaf82c8..1b2f5ce4532 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -163,7 +163,7 @@ unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION; static debug_info_t *debug_area_first = NULL; static debug_info_t *debug_area_last = NULL; -static DECLARE_MUTEX(debug_lock); +static DEFINE_MUTEX(debug_mutex); static int initialized; @@ -576,7 +576,7 @@ debug_input(struct file *file, const char __user *user_buf, size_t length, int rc = 0; file_private_info_t *p_info; - down(&debug_lock); + mutex_lock(&debug_mutex); p_info = ((file_private_info_t *) file->private_data); if (p_info->view->input_proc) rc = p_info->view->input_proc(p_info->debug_info_org, @@ -584,7 +584,7 @@ debug_input(struct file *file, const char __user *user_buf, size_t length, length, offset); else rc = -EPERM; - up(&debug_lock); + mutex_unlock(&debug_mutex); return rc; /* number of input characters */ } @@ -602,7 +602,7 @@ debug_open(struct inode *inode, struct file *file) file_private_info_t *p_info; debug_info_t *debug_info, *debug_info_snapshot; - down(&debug_lock); + mutex_lock(&debug_mutex); debug_info = file->f_path.dentry->d_inode->i_private; /* find debug view */ for (i = 0; i < DEBUG_MAX_VIEWS; i++) { @@ -653,7 +653,7 @@ found: file->private_data = p_info; debug_info_get(debug_info); out: - up(&debug_lock); + mutex_unlock(&debug_mutex); return rc; } @@ -688,7 +688,7 @@ debug_register (char *name, int pages_per_area, int nr_areas, int buf_size) if (!initialized) BUG(); - down(&debug_lock); + mutex_lock(&debug_mutex); /* create new debug_info */ @@ -702,7 +702,7 @@ out: if (!rc){ printk(KERN_ERR "debug: debug_register failed for %s\n",name); } - up(&debug_lock); + mutex_unlock(&debug_mutex); return rc; } @@ -716,9 +716,9 @@ debug_unregister(debug_info_t * id) { if (!id) goto out; - down(&debug_lock); + mutex_lock(&debug_mutex); debug_info_put(id); - up(&debug_lock); + mutex_unlock(&debug_mutex); out: return; @@ -1054,11 +1054,11 @@ __init debug_init(void) int rc = 0; s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); - down(&debug_lock); + mutex_lock(&debug_mutex); debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); printk(KERN_INFO "debug: Initialization complete\n"); initialized = 1; - up(&debug_lock); + mutex_unlock(&debug_mutex); return rc; } diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 6bfb0889eb1..51d6309e7f3 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -102,7 +102,7 @@ static struct resource data_resource = { /* * cpu_init() initializes state that is per-CPU. */ -void __devinit cpu_init (void) +void __cpuinit cpu_init(void) { int addr = hard_smp_processor_id(); @@ -915,7 +915,7 @@ setup_arch(char **cmdline_p) setup_zfcpdump(console_devno); } -void print_cpu_info(struct cpuinfo_S390 *cpuinfo) +void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo) { printk("cpu %d " #ifdef CONFIG_SMP diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 09f028a3266..8ff2feaf9b0 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -492,7 +492,7 @@ static unsigned int __init smp_count_cpus(void) /* * Activate a secondary processor. */ -int __devinit start_secondary(void *cpuvoid) +int __cpuinit start_secondary(void *cpuvoid) { /* Setup the cpu */ cpu_init(); @@ -741,7 +741,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) smp_create_idle(cpu); } -void __devinit smp_prepare_boot_cpu(void) +void __init smp_prepare_boot_cpu(void) { BUG_ON(smp_processor_id() != 0); @@ -750,7 +750,7 @@ void __devinit smp_prepare_boot_cpu(void) current_set[0] = current; } -void smp_cpus_done(unsigned int max_cpus) +void __init smp_cpus_done(unsigned int max_cpus) { cpu_present_map = cpu_possible_map; } |