diff options
-rw-r--r-- | drivers/xen/sys-hypervisor.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c index 1267d6fcc0c7..88a60e03ccf0 100644 --- a/drivers/xen/sys-hypervisor.c +++ b/drivers/xen/sys-hypervisor.c | |||
@@ -353,32 +353,6 @@ static void xen_properties_destroy(void) | |||
353 | sysfs_remove_group(hypervisor_kobj, &xen_properties_group); | 353 | sysfs_remove_group(hypervisor_kobj, &xen_properties_group); |
354 | } | 354 | } |
355 | 355 | ||
356 | #ifdef CONFIG_KEXEC | ||
357 | |||
358 | extern size_t vmcoreinfo_size_xen; | ||
359 | extern unsigned long paddr_vmcoreinfo_xen; | ||
360 | |||
361 | static ssize_t vmcoreinfo_show(struct hyp_sysfs_attr *attr, char *page) | ||
362 | { | ||
363 | return sprintf(page, "%lx %zx\n", | ||
364 | paddr_vmcoreinfo_xen, vmcoreinfo_size_xen); | ||
365 | } | ||
366 | |||
367 | HYPERVISOR_ATTR_RO(vmcoreinfo); | ||
368 | |||
369 | static int __init xen_sysfs_vmcoreinfo_init(void) | ||
370 | { | ||
371 | return sysfs_create_file(hypervisor_kobj, | ||
372 | &vmcoreinfo_attr.attr); | ||
373 | } | ||
374 | |||
375 | static void xen_sysfs_vmcoreinfo_destroy(void) | ||
376 | { | ||
377 | sysfs_remove_file(hypervisor_kobj, &vmcoreinfo_attr.attr); | ||
378 | } | ||
379 | |||
380 | #endif | ||
381 | |||
382 | static int __init hyper_sysfs_init(void) | 356 | static int __init hyper_sysfs_init(void) |
383 | { | 357 | { |
384 | int ret; | 358 | int ret; |
@@ -401,20 +375,9 @@ static int __init hyper_sysfs_init(void) | |||
401 | ret = xen_properties_init(); | 375 | ret = xen_properties_init(); |
402 | if (ret) | 376 | if (ret) |
403 | goto prop_out; | 377 | goto prop_out; |
404 | #ifdef CONFIG_KEXEC | ||
405 | if (vmcoreinfo_size_xen != 0) { | ||
406 | ret = xen_sysfs_vmcoreinfo_init(); | ||
407 | if (ret) | ||
408 | goto vmcoreinfo_out; | ||
409 | } | ||
410 | #endif | ||
411 | 378 | ||
412 | goto out; | 379 | goto out; |
413 | 380 | ||
414 | #ifdef CONFIG_KEXEC | ||
415 | vmcoreinfo_out: | ||
416 | #endif | ||
417 | xen_properties_destroy(); | ||
418 | prop_out: | 381 | prop_out: |
419 | xen_sysfs_uuid_destroy(); | 382 | xen_sysfs_uuid_destroy(); |
420 | uuid_out: | 383 | uuid_out: |
@@ -429,10 +392,6 @@ out: | |||
429 | 392 | ||
430 | static void __exit hyper_sysfs_exit(void) | 393 | static void __exit hyper_sysfs_exit(void) |
431 | { | 394 | { |
432 | #ifdef CONFIG_KEXEC | ||
433 | if (vmcoreinfo_size_xen != 0) | ||
434 | xen_sysfs_vmcoreinfo_destroy(); | ||
435 | #endif | ||
436 | xen_properties_destroy(); | 395 | xen_properties_destroy(); |
437 | xen_compilation_destroy(); | 396 | xen_compilation_destroy(); |
438 | xen_sysfs_uuid_destroy(); | 397 | xen_sysfs_uuid_destroy(); |