diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2006-06-27 05:54:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 20:32:41 -0400 |
commit | 5a67e4c5b6faaccf31740a07d93704166405d880 (patch) | |
tree | a302ac0dae12f3e430ff485242bc0a85ddfbc00d | |
parent | 39f4885c56073ecafd482d7e10dd7b17900fa312 (diff) |
[PATCH] cpu hotplug: use hotplug version of cpu notifier in appropriate places
Make use the of newly defined hotplug version of cpu_notifier functionality
wherever appropriate.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 4 | ||||
-rw-r--r-- | block/ll_rw_blk.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 18 |
3 files changed, 12 insertions, 14 deletions
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 9d5a823479a3..9065f0f01ba3 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -673,9 +673,7 @@ salinfo_init(void) | |||
673 | salinfo_timer.function = &salinfo_timeout; | 673 | salinfo_timer.function = &salinfo_timeout; |
674 | add_timer(&salinfo_timer); | 674 | add_timer(&salinfo_timer); |
675 | 675 | ||
676 | #ifdef CONFIG_HOTPLUG_CPU | 676 | register_hotcpu_notifier(&salinfo_cpu_notifier); |
677 | register_cpu_notifier(&salinfo_cpu_notifier); | ||
678 | #endif | ||
679 | 677 | ||
680 | return 0; | 678 | return 0; |
681 | } | 679 | } |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 9610b07cc196..eee03a3876a3 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -3541,9 +3541,7 @@ int __init blk_dev_init(void) | |||
3541 | INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); | 3541 | INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); |
3542 | 3542 | ||
3543 | open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL); | 3543 | open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL); |
3544 | #ifdef CONFIG_HOTPLUG_CPU | 3544 | register_hotcpu_notifier(&blk_cpu_notifier); |
3545 | register_cpu_notifier(&blk_cpu_notifier); | ||
3546 | #endif | ||
3547 | 3545 | ||
3548 | blk_max_low_pfn = max_low_pfn; | 3546 | blk_max_low_pfn = max_low_pfn; |
3549 | blk_max_pfn = max_pfn; | 3547 | blk_max_pfn = max_pfn; |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 10dbf203c62f..ed7579beb6b0 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1721,15 +1721,14 @@ xfs_mount_log_sbunit( | |||
1721 | * is present to prevent thrashing). | 1721 | * is present to prevent thrashing). |
1722 | */ | 1722 | */ |
1723 | 1723 | ||
1724 | #ifdef CONFIG_HOTPLUG_CPU | ||
1724 | /* | 1725 | /* |
1725 | * hot-plug CPU notifier support. | 1726 | * hot-plug CPU notifier support. |
1726 | * | 1727 | * |
1727 | * We cannot use the hotcpu_register() function because it does | 1728 | * We need a notifier per filesystem as we need to be able to identify |
1728 | * not allow notifier instances. We need a notifier per filesystem | 1729 | * the filesystem to balance the counters out. This is achieved by |
1729 | * as we need to be able to identify the filesystem to balance | 1730 | * having a notifier block embedded in the xfs_mount_t and doing pointer |
1730 | * the counters out. This is achieved by having a notifier block | 1731 | * magic to get the mount pointer from the notifier block address. |
1731 | * embedded in the xfs_mount_t and doing pointer magic to get the | ||
1732 | * mount pointer from the notifier block address. | ||
1733 | */ | 1732 | */ |
1734 | STATIC int | 1733 | STATIC int |
1735 | xfs_icsb_cpu_notify( | 1734 | xfs_icsb_cpu_notify( |
@@ -1779,6 +1778,7 @@ xfs_icsb_cpu_notify( | |||
1779 | 1778 | ||
1780 | return NOTIFY_OK; | 1779 | return NOTIFY_OK; |
1781 | } | 1780 | } |
1781 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
1782 | 1782 | ||
1783 | int | 1783 | int |
1784 | xfs_icsb_init_counters( | 1784 | xfs_icsb_init_counters( |
@@ -1791,9 +1791,11 @@ xfs_icsb_init_counters( | |||
1791 | if (mp->m_sb_cnts == NULL) | 1791 | if (mp->m_sb_cnts == NULL) |
1792 | return -ENOMEM; | 1792 | return -ENOMEM; |
1793 | 1793 | ||
1794 | #ifdef CONFIG_HOTPLUG_CPU | ||
1794 | mp->m_icsb_notifier.notifier_call = xfs_icsb_cpu_notify; | 1795 | mp->m_icsb_notifier.notifier_call = xfs_icsb_cpu_notify; |
1795 | mp->m_icsb_notifier.priority = 0; | 1796 | mp->m_icsb_notifier.priority = 0; |
1796 | register_cpu_notifier(&mp->m_icsb_notifier); | 1797 | register_hotcpu_notifier(&mp->m_icsb_notifier); |
1798 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
1797 | 1799 | ||
1798 | for_each_online_cpu(i) { | 1800 | for_each_online_cpu(i) { |
1799 | cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i); | 1801 | cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i); |
@@ -1812,7 +1814,7 @@ xfs_icsb_destroy_counters( | |||
1812 | xfs_mount_t *mp) | 1814 | xfs_mount_t *mp) |
1813 | { | 1815 | { |
1814 | if (mp->m_sb_cnts) { | 1816 | if (mp->m_sb_cnts) { |
1815 | unregister_cpu_notifier(&mp->m_icsb_notifier); | 1817 | unregister_hotcpu_notifier(&mp->m_icsb_notifier); |
1816 | free_percpu(mp->m_sb_cnts); | 1818 | free_percpu(mp->m_sb_cnts); |
1817 | } | 1819 | } |
1818 | } | 1820 | } |