diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 12:16:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 12:16:37 -0400 |
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 2782cf9da5b4..b9a1ce1f28e4 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c | |||
@@ -481,9 +481,17 @@ out: | |||
481 | 481 | ||
482 | /* Diagnose 224 functions */ | 482 | /* Diagnose 224 functions */ |
483 | 483 | ||
484 | static void diag224(void *ptr) | 484 | static int diag224(void *ptr) |
485 | { | 485 | { |
486 | asm volatile("diag %0,%1,0x224" : :"d" (0), "d"(ptr) : "memory"); | 486 | int rc = -ENOTSUPP; |
487 | |||
488 | asm volatile( | ||
489 | " diag %1,%2,0x224\n" | ||
490 | "0: lhi %0,0x0\n" | ||
491 | "1:\n" | ||
492 | EX_TABLE(0b,1b) | ||
493 | : "+d" (rc) :"d" (0), "d" (ptr) : "memory"); | ||
494 | return rc; | ||
487 | } | 495 | } |
488 | 496 | ||
489 | static int diag224_get_name_table(void) | 497 | static int diag224_get_name_table(void) |
@@ -492,7 +500,10 @@ static int diag224_get_name_table(void) | |||
492 | diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); | 500 | diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); |
493 | if (!diag224_cpu_names) | 501 | if (!diag224_cpu_names) |
494 | return -ENOMEM; | 502 | return -ENOMEM; |
495 | diag224(diag224_cpu_names); | 503 | if (diag224(diag224_cpu_names)) { |
504 | kfree(diag224_cpu_names); | ||
505 | return -ENOTSUPP; | ||
506 | } | ||
496 | EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); | 507 | EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); |
497 | return 0; | 508 | return 0; |
498 | } | 509 | } |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index dca6eaf82c80..1b2f5ce45320 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; | |||
163 | 163 | ||
164 | static debug_info_t *debug_area_first = NULL; | 164 | static debug_info_t *debug_area_first = NULL; |
165 | static debug_info_t *debug_area_last = NULL; | 165 | static debug_info_t *debug_area_last = NULL; |
166 | static DECLARE_MUTEX(debug_lock); | 166 | static DEFINE_MUTEX(debug_mutex); |
167 | 167 | ||
168 | static int initialized; | 168 | static int initialized; |
169 | 169 | ||
@@ -576,7 +576,7 @@ debug_input(struct file *file, const char __user *user_buf, size_t length, | |||
576 | int rc = 0; | 576 | int rc = 0; |
577 | file_private_info_t *p_info; | 577 | file_private_info_t *p_info; |
578 | 578 | ||
579 | down(&debug_lock); | 579 | mutex_lock(&debug_mutex); |
580 | p_info = ((file_private_info_t *) file->private_data); | 580 | p_info = ((file_private_info_t *) file->private_data); |
581 | if (p_info->view->input_proc) | 581 | if (p_info->view->input_proc) |
582 | rc = p_info->view->input_proc(p_info->debug_info_org, | 582 | 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, | |||
584 | length, offset); | 584 | length, offset); |
585 | else | 585 | else |
586 | rc = -EPERM; | 586 | rc = -EPERM; |
587 | up(&debug_lock); | 587 | mutex_unlock(&debug_mutex); |
588 | return rc; /* number of input characters */ | 588 | return rc; /* number of input characters */ |
589 | } | 589 | } |
590 | 590 | ||
@@ -602,7 +602,7 @@ debug_open(struct inode *inode, struct file *file) | |||
602 | file_private_info_t *p_info; | 602 | file_private_info_t *p_info; |
603 | debug_info_t *debug_info, *debug_info_snapshot; | 603 | debug_info_t *debug_info, *debug_info_snapshot; |
604 | 604 | ||
605 | down(&debug_lock); | 605 | mutex_lock(&debug_mutex); |
606 | debug_info = file->f_path.dentry->d_inode->i_private; | 606 | debug_info = file->f_path.dentry->d_inode->i_private; |
607 | /* find debug view */ | 607 | /* find debug view */ |
608 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { | 608 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { |
@@ -653,7 +653,7 @@ found: | |||
653 | file->private_data = p_info; | 653 | file->private_data = p_info; |
654 | debug_info_get(debug_info); | 654 | debug_info_get(debug_info); |
655 | out: | 655 | out: |
656 | up(&debug_lock); | 656 | mutex_unlock(&debug_mutex); |
657 | return rc; | 657 | return rc; |
658 | } | 658 | } |
659 | 659 | ||
@@ -688,7 +688,7 @@ debug_register (char *name, int pages_per_area, int nr_areas, int buf_size) | |||
688 | 688 | ||
689 | if (!initialized) | 689 | if (!initialized) |
690 | BUG(); | 690 | BUG(); |
691 | down(&debug_lock); | 691 | mutex_lock(&debug_mutex); |
692 | 692 | ||
693 | /* create new debug_info */ | 693 | /* create new debug_info */ |
694 | 694 | ||
@@ -702,7 +702,7 @@ out: | |||
702 | if (!rc){ | 702 | if (!rc){ |
703 | printk(KERN_ERR "debug: debug_register failed for %s\n",name); | 703 | printk(KERN_ERR "debug: debug_register failed for %s\n",name); |
704 | } | 704 | } |
705 | up(&debug_lock); | 705 | mutex_unlock(&debug_mutex); |
706 | return rc; | 706 | return rc; |
707 | } | 707 | } |
708 | 708 | ||
@@ -716,9 +716,9 @@ debug_unregister(debug_info_t * id) | |||
716 | { | 716 | { |
717 | if (!id) | 717 | if (!id) |
718 | goto out; | 718 | goto out; |
719 | down(&debug_lock); | 719 | mutex_lock(&debug_mutex); |
720 | debug_info_put(id); | 720 | debug_info_put(id); |
721 | up(&debug_lock); | 721 | mutex_unlock(&debug_mutex); |
722 | 722 | ||
723 | out: | 723 | out: |
724 | return; | 724 | return; |
@@ -1054,11 +1054,11 @@ __init debug_init(void) | |||
1054 | int rc = 0; | 1054 | int rc = 0; |
1055 | 1055 | ||
1056 | s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); | 1056 | s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); |
1057 | down(&debug_lock); | 1057 | mutex_lock(&debug_mutex); |
1058 | debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); | 1058 | debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); |
1059 | printk(KERN_INFO "debug: Initialization complete\n"); | 1059 | printk(KERN_INFO "debug: Initialization complete\n"); |
1060 | initialized = 1; | 1060 | initialized = 1; |
1061 | up(&debug_lock); | 1061 | mutex_unlock(&debug_mutex); |
1062 | 1062 | ||
1063 | return rc; | 1063 | return rc; |
1064 | } | 1064 | } |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 6bfb0889eb10..51d6309e7f3b 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -102,7 +102,7 @@ static struct resource data_resource = { | |||
102 | /* | 102 | /* |
103 | * cpu_init() initializes state that is per-CPU. | 103 | * cpu_init() initializes state that is per-CPU. |
104 | */ | 104 | */ |
105 | void __devinit cpu_init (void) | 105 | void __cpuinit cpu_init(void) |
106 | { | 106 | { |
107 | int addr = hard_smp_processor_id(); | 107 | int addr = hard_smp_processor_id(); |
108 | 108 | ||
@@ -915,7 +915,7 @@ setup_arch(char **cmdline_p) | |||
915 | setup_zfcpdump(console_devno); | 915 | setup_zfcpdump(console_devno); |
916 | } | 916 | } |
917 | 917 | ||
918 | void print_cpu_info(struct cpuinfo_S390 *cpuinfo) | 918 | void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo) |
919 | { | 919 | { |
920 | printk("cpu %d " | 920 | printk("cpu %d " |
921 | #ifdef CONFIG_SMP | 921 | #ifdef CONFIG_SMP |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 09f028a3266b..8ff2feaf9b00 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) | |||
492 | /* | 492 | /* |
493 | * Activate a secondary processor. | 493 | * Activate a secondary processor. |
494 | */ | 494 | */ |
495 | int __devinit start_secondary(void *cpuvoid) | 495 | int __cpuinit start_secondary(void *cpuvoid) |
496 | { | 496 | { |
497 | /* Setup the cpu */ | 497 | /* Setup the cpu */ |
498 | cpu_init(); | 498 | cpu_init(); |
@@ -741,7 +741,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
741 | smp_create_idle(cpu); | 741 | smp_create_idle(cpu); |
742 | } | 742 | } |
743 | 743 | ||
744 | void __devinit smp_prepare_boot_cpu(void) | 744 | void __init smp_prepare_boot_cpu(void) |
745 | { | 745 | { |
746 | BUG_ON(smp_processor_id() != 0); | 746 | BUG_ON(smp_processor_id() != 0); |
747 | 747 | ||
@@ -750,7 +750,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
750 | current_set[0] = current; | 750 | current_set[0] = current; |
751 | } | 751 | } |
752 | 752 | ||
753 | void smp_cpus_done(unsigned int max_cpus) | 753 | void __init smp_cpus_done(unsigned int max_cpus) |
754 | { | 754 | { |
755 | cpu_present_map = cpu_possible_map; | 755 | cpu_present_map = cpu_possible_map; |
756 | } | 756 | } |