diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-16 11:51:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-16 11:51:04 -0400 |
commit | 223ddcea898940b0b02bd6e624dbba3507c97365 (patch) | |
tree | 3c88d52453521b143848fed844142ac5ea46fe51 | |
parent | ca412cc992c3226239dd3bf896681bbf30e1b444 (diff) | |
parent | 3e03a2fcb2c031062f9bf698ce999b77cd80aec4 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 6 | ||||
-rw-r--r-- | drivers/s390/block/dasd.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 84 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 8 | ||||
-rw-r--r-- | drivers/s390/block/xpram.c | 25 |
6 files changed, 50 insertions, 77 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 6a4b5f9715c9..a0a94e0ef8d1 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -618,7 +618,7 @@ appldata_offline_cpu(int cpu) | |||
618 | } | 618 | } |
619 | 619 | ||
620 | #ifdef CONFIG_HOTPLUG_CPU | 620 | #ifdef CONFIG_HOTPLUG_CPU |
621 | static int | 621 | static int __cpuinit |
622 | appldata_cpu_notify(struct notifier_block *self, | 622 | appldata_cpu_notify(struct notifier_block *self, |
623 | unsigned long action, void *hcpu) | 623 | unsigned long action, void *hcpu) |
624 | { | 624 | { |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index eb6ebfef134a..6e6b6de77770 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -129,7 +129,7 @@ void __init paging_init(void) | |||
129 | /* | 129 | /* |
130 | * pg_table is physical at this point | 130 | * pg_table is physical at this point |
131 | */ | 131 | */ |
132 | pg_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 132 | pg_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); |
133 | 133 | ||
134 | pg_dir->pgd0 = (_PAGE_TABLE | __pa(pg_table)); | 134 | pg_dir->pgd0 = (_PAGE_TABLE | __pa(pg_table)); |
135 | pg_dir->pgd1 = (_PAGE_TABLE | (__pa(pg_table)+1024)); | 135 | pg_dir->pgd1 = (_PAGE_TABLE | (__pa(pg_table)+1024)); |
@@ -219,7 +219,7 @@ void __init paging_init(void) | |||
219 | continue; | 219 | continue; |
220 | } | 220 | } |
221 | 221 | ||
222 | pm_dir = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE*4); | 222 | pm_dir = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE * 4); |
223 | pgd_populate(&init_mm, pg_dir, pm_dir); | 223 | pgd_populate(&init_mm, pg_dir, pm_dir); |
224 | 224 | ||
225 | for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) { | 225 | for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) { |
@@ -228,7 +228,7 @@ void __init paging_init(void) | |||
228 | continue; | 228 | continue; |
229 | } | 229 | } |
230 | 230 | ||
231 | pt_dir = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 231 | pt_dir = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); |
232 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | 232 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); |
233 | 233 | ||
234 | for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { | 234 | for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 4bf03fb67f8d..d8e9b95f0a1a 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1730,8 +1730,8 @@ dasd_flush_request_queue(struct dasd_device * device) | |||
1730 | req = elv_next_request(device->request_queue); | 1730 | req = elv_next_request(device->request_queue); |
1731 | if (req == NULL) | 1731 | if (req == NULL) |
1732 | break; | 1732 | break; |
1733 | dasd_end_request(req, 0); | ||
1734 | blkdev_dequeue_request(req); | 1733 | blkdev_dequeue_request(req); |
1734 | dasd_end_request(req, 0); | ||
1735 | } | 1735 | } |
1736 | spin_unlock_irq(&device->request_queue_lock); | 1736 | spin_unlock_irq(&device->request_queue_lock); |
1737 | } | 1737 | } |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 7f6fdac74706..9d0c6e1a0e66 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -48,18 +48,20 @@ struct dasd_devmap { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * dasd_servermap is used to store the server_id of all storage servers | 51 | * dasd_server_ssid_map contains a globally unique storage server subsystem ID. |
52 | * accessed by DASD device driver. | 52 | * dasd_server_ssid_list contains the list of all subsystem IDs accessed by |
53 | * the DASD device driver. | ||
53 | */ | 54 | */ |
54 | struct dasd_servermap { | 55 | struct dasd_server_ssid_map { |
55 | struct list_head list; | 56 | struct list_head list; |
56 | struct server_id { | 57 | struct server_id { |
57 | char vendor[4]; | 58 | char vendor[4]; |
58 | char serial[15]; | 59 | char serial[15]; |
59 | } sid; | 60 | } sid; |
61 | __u16 ssid; | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | static struct list_head dasd_serverlist; | 64 | static struct list_head dasd_server_ssid_list; |
63 | 65 | ||
64 | /* | 66 | /* |
65 | * Parameter parsing functions for dasd= parameter. The syntax is: | 67 | * Parameter parsing functions for dasd= parameter. The syntax is: |
@@ -89,7 +91,7 @@ static char *dasd[256]; | |||
89 | module_param_array(dasd, charp, NULL, 0); | 91 | module_param_array(dasd, charp, NULL, 0); |
90 | 92 | ||
91 | /* | 93 | /* |
92 | * Single spinlock to protect devmap structures and lists. | 94 | * Single spinlock to protect devmap and servermap structures and lists. |
93 | */ | 95 | */ |
94 | static DEFINE_SPINLOCK(dasd_devmap_lock); | 96 | static DEFINE_SPINLOCK(dasd_devmap_lock); |
95 | 97 | ||
@@ -264,8 +266,9 @@ dasd_parse_keyword( char *parsestring ) { | |||
264 | if (dasd_page_cache) | 266 | if (dasd_page_cache) |
265 | return residual_str; | 267 | return residual_str; |
266 | dasd_page_cache = | 268 | dasd_page_cache = |
267 | kmem_cache_create("dasd_page_cache", PAGE_SIZE, 0, | 269 | kmem_cache_create("dasd_page_cache", PAGE_SIZE, |
268 | SLAB_CACHE_DMA, NULL, NULL ); | 270 | PAGE_SIZE, SLAB_CACHE_DMA, |
271 | NULL, NULL ); | ||
269 | if (!dasd_page_cache) | 272 | if (!dasd_page_cache) |
270 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " | 273 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " |
271 | "fixed buffer mode disabled."); | 274 | "fixed buffer mode disabled."); |
@@ -859,39 +862,6 @@ static struct attribute_group dasd_attr_group = { | |||
859 | }; | 862 | }; |
860 | 863 | ||
861 | /* | 864 | /* |
862 | * Check if the related storage server is already contained in the | ||
863 | * dasd_serverlist. If server is not contained, create new entry. | ||
864 | * Return 0 if server was already in serverlist, | ||
865 | * 1 if the server was added successfully | ||
866 | * <0 in case of error. | ||
867 | */ | ||
868 | static int | ||
869 | dasd_add_server(struct dasd_uid *uid) | ||
870 | { | ||
871 | struct dasd_servermap *new, *tmp; | ||
872 | |||
873 | /* check if server is already contained */ | ||
874 | list_for_each_entry(tmp, &dasd_serverlist, list) | ||
875 | // normale cmp? | ||
876 | if (strncmp(tmp->sid.vendor, uid->vendor, | ||
877 | sizeof(tmp->sid.vendor)) == 0 | ||
878 | && strncmp(tmp->sid.serial, uid->serial, | ||
879 | sizeof(tmp->sid.serial)) == 0) | ||
880 | return 0; | ||
881 | |||
882 | new = (struct dasd_servermap *) | ||
883 | kzalloc(sizeof(struct dasd_servermap), GFP_KERNEL); | ||
884 | if (!new) | ||
885 | return -ENOMEM; | ||
886 | |||
887 | strncpy(new->sid.vendor, uid->vendor, sizeof(new->sid.vendor)); | ||
888 | strncpy(new->sid.serial, uid->serial, sizeof(new->sid.serial)); | ||
889 | list_add(&new->list, &dasd_serverlist); | ||
890 | return 1; | ||
891 | } | ||
892 | |||
893 | |||
894 | /* | ||
895 | * Return copy of the device unique identifier. | 865 | * Return copy of the device unique identifier. |
896 | */ | 866 | */ |
897 | int | 867 | int |
@@ -910,6 +880,9 @@ dasd_get_uid(struct ccw_device *cdev, struct dasd_uid *uid) | |||
910 | 880 | ||
911 | /* | 881 | /* |
912 | * Register the given device unique identifier into devmap struct. | 882 | * Register the given device unique identifier into devmap struct. |
883 | * In addition check if the related storage server subsystem ID is already | ||
884 | * contained in the dasd_server_ssid_list. If subsystem ID is not contained, | ||
885 | * create new entry. | ||
913 | * Return 0 if server was already in serverlist, | 886 | * Return 0 if server was already in serverlist, |
914 | * 1 if the server was added successful | 887 | * 1 if the server was added successful |
915 | * <0 in case of error. | 888 | * <0 in case of error. |
@@ -918,16 +891,39 @@ int | |||
918 | dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) | 891 | dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) |
919 | { | 892 | { |
920 | struct dasd_devmap *devmap; | 893 | struct dasd_devmap *devmap; |
921 | int rc; | 894 | struct dasd_server_ssid_map *srv, *tmp; |
922 | 895 | ||
923 | devmap = dasd_find_busid(cdev->dev.bus_id); | 896 | devmap = dasd_find_busid(cdev->dev.bus_id); |
924 | if (IS_ERR(devmap)) | 897 | if (IS_ERR(devmap)) |
925 | return PTR_ERR(devmap); | 898 | return PTR_ERR(devmap); |
899 | |||
900 | /* generate entry for server_ssid_map */ | ||
901 | srv = (struct dasd_server_ssid_map *) | ||
902 | kzalloc(sizeof(struct dasd_server_ssid_map), GFP_KERNEL); | ||
903 | if (!srv) | ||
904 | return -ENOMEM; | ||
905 | strncpy(srv->sid.vendor, uid->vendor, sizeof(srv->sid.vendor) - 1); | ||
906 | strncpy(srv->sid.serial, uid->serial, sizeof(srv->sid.serial) - 1); | ||
907 | srv->ssid = uid->ssid; | ||
908 | |||
909 | /* server is already contained ? */ | ||
926 | spin_lock(&dasd_devmap_lock); | 910 | spin_lock(&dasd_devmap_lock); |
927 | devmap->uid = *uid; | 911 | devmap->uid = *uid; |
928 | rc = dasd_add_server(uid); | 912 | list_for_each_entry(tmp, &dasd_server_ssid_list, list) { |
913 | if (!memcmp(&srv->sid, &tmp->sid, | ||
914 | sizeof(struct dasd_server_ssid_map))) { | ||
915 | kfree(srv); | ||
916 | srv = NULL; | ||
917 | break; | ||
918 | } | ||
919 | } | ||
920 | |||
921 | /* add servermap to serverlist */ | ||
922 | if (srv) | ||
923 | list_add(&srv->list, &dasd_server_ssid_list); | ||
929 | spin_unlock(&dasd_devmap_lock); | 924 | spin_unlock(&dasd_devmap_lock); |
930 | return rc; | 925 | |
926 | return (srv ? 1 : 0); | ||
931 | } | 927 | } |
932 | EXPORT_SYMBOL_GPL(dasd_set_uid); | 928 | EXPORT_SYMBOL_GPL(dasd_set_uid); |
933 | 929 | ||
@@ -995,7 +991,7 @@ dasd_devmap_init(void) | |||
995 | INIT_LIST_HEAD(&dasd_hashlists[i]); | 991 | INIT_LIST_HEAD(&dasd_hashlists[i]); |
996 | 992 | ||
997 | /* Initialize servermap structure. */ | 993 | /* Initialize servermap structure. */ |
998 | INIT_LIST_HEAD(&dasd_serverlist); | 994 | INIT_LIST_HEAD(&dasd_server_ssid_list); |
999 | return 0; | 995 | return 0; |
1000 | } | 996 | } |
1001 | 997 | ||
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 39c2281371b5..957ed5db98e4 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -468,11 +468,11 @@ dasd_eckd_generate_uid(struct dasd_device *device, struct dasd_uid *uid) | |||
468 | return -ENODEV; | 468 | return -ENODEV; |
469 | 469 | ||
470 | memset(uid, 0, sizeof(struct dasd_uid)); | 470 | memset(uid, 0, sizeof(struct dasd_uid)); |
471 | strncpy(uid->vendor, confdata->ned1.HDA_manufacturer, | 471 | memcpy(uid->vendor, confdata->ned1.HDA_manufacturer, |
472 | sizeof(uid->vendor) - 1); | 472 | sizeof(uid->vendor) - 1); |
473 | EBCASC(uid->vendor, sizeof(uid->vendor) - 1); | 473 | EBCASC(uid->vendor, sizeof(uid->vendor) - 1); |
474 | strncpy(uid->serial, confdata->ned1.HDA_location, | 474 | memcpy(uid->serial, confdata->ned1.HDA_location, |
475 | sizeof(uid->serial) - 1); | 475 | sizeof(uid->serial) - 1); |
476 | EBCASC(uid->serial, sizeof(uid->serial) - 1); | 476 | EBCASC(uid->serial, sizeof(uid->serial) - 1); |
477 | uid->ssid = confdata->neq.subsystemID; | 477 | uid->ssid = confdata->neq.subsystemID; |
478 | if (confdata->ned2.sneq.flags == 0x40) { | 478 | if (confdata->ned2.sneq.flags == 0x40) { |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 1140302ff11d..ca7d51f7eccc 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -48,15 +48,6 @@ | |||
48 | #define PRINT_ERR(x...) printk(KERN_ERR XPRAM_NAME " error:" x) | 48 | #define PRINT_ERR(x...) printk(KERN_ERR XPRAM_NAME " error:" x) |
49 | 49 | ||
50 | 50 | ||
51 | static struct sysdev_class xpram_sysclass = { | ||
52 | set_kset_name("xpram"), | ||
53 | }; | ||
54 | |||
55 | static struct sys_device xpram_sys_device = { | ||
56 | .id = 0, | ||
57 | .cls = &xpram_sysclass, | ||
58 | }; | ||
59 | |||
60 | typedef struct { | 51 | typedef struct { |
61 | unsigned int size; /* size of xpram segment in pages */ | 52 | unsigned int size; /* size of xpram segment in pages */ |
62 | unsigned int offset; /* start page of xpram segment */ | 53 | unsigned int offset; /* start page of xpram segment */ |
@@ -451,8 +442,6 @@ static void __exit xpram_exit(void) | |||
451 | } | 442 | } |
452 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); | 443 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); |
453 | blk_cleanup_queue(xpram_queue); | 444 | blk_cleanup_queue(xpram_queue); |
454 | sysdev_unregister(&xpram_sys_device); | ||
455 | sysdev_class_unregister(&xpram_sysclass); | ||
456 | } | 445 | } |
457 | 446 | ||
458 | static int __init xpram_init(void) | 447 | static int __init xpram_init(void) |
@@ -470,19 +459,7 @@ static int __init xpram_init(void) | |||
470 | rc = xpram_setup_sizes(xpram_pages); | 459 | rc = xpram_setup_sizes(xpram_pages); |
471 | if (rc) | 460 | if (rc) |
472 | return rc; | 461 | return rc; |
473 | rc = sysdev_class_register(&xpram_sysclass); | 462 | return xpram_setup_blkdev(); |
474 | if (rc) | ||
475 | return rc; | ||
476 | |||
477 | rc = sysdev_register(&xpram_sys_device); | ||
478 | if (rc) { | ||
479 | sysdev_class_unregister(&xpram_sysclass); | ||
480 | return rc; | ||
481 | } | ||
482 | rc = xpram_setup_blkdev(); | ||
483 | if (rc) | ||
484 | sysdev_unregister(&xpram_sys_device); | ||
485 | return rc; | ||
486 | } | 463 | } |
487 | 464 | ||
488 | module_init(xpram_init); | 465 | module_init(xpram_init); |