aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/dwarf.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/dwarf.c')
-rw-r--r--arch/sh/kernel/dwarf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c
index 67a049e75ec1..9d209a07235e 100644
--- a/arch/sh/kernel/dwarf.c
+++ b/arch/sh/kernel/dwarf.c
@@ -993,7 +993,7 @@ static struct unwinder dwarf_unwinder = {
993 .rating = 150, 993 .rating = 150,
994}; 994};
995 995
996static void dwarf_unwinder_cleanup(void) 996static void __init dwarf_unwinder_cleanup(void)
997{ 997{
998 struct dwarf_fde *fde, *next_fde; 998 struct dwarf_fde *fde, *next_fde;
999 struct dwarf_cie *cie, *next_cie; 999 struct dwarf_cie *cie, *next_cie;
@@ -1009,6 +1009,10 @@ static void dwarf_unwinder_cleanup(void)
1009 rbtree_postorder_for_each_entry_safe(cie, next_cie, &cie_root, node) 1009 rbtree_postorder_for_each_entry_safe(cie, next_cie, &cie_root, node)
1010 kfree(cie); 1010 kfree(cie);
1011 1011
1012 if (dwarf_reg_pool)
1013 mempool_destroy(dwarf_reg_pool);
1014 if (dwarf_frame_pool)
1015 mempool_destroy(dwarf_frame_pool);
1012 kmem_cache_destroy(dwarf_reg_cachep); 1016 kmem_cache_destroy(dwarf_reg_cachep);
1013 kmem_cache_destroy(dwarf_frame_cachep); 1017 kmem_cache_destroy(dwarf_frame_cachep);
1014} 1018}
@@ -1176,17 +1180,13 @@ static int __init dwarf_unwinder_init(void)
1176 sizeof(struct dwarf_reg), 0, 1180 sizeof(struct dwarf_reg), 0,
1177 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL); 1181 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
1178 1182
1179 dwarf_frame_pool = mempool_create(DWARF_FRAME_MIN_REQ, 1183 dwarf_frame_pool = mempool_create_slab_pool(DWARF_FRAME_MIN_REQ,
1180 mempool_alloc_slab, 1184 dwarf_frame_cachep);
1181 mempool_free_slab,
1182 dwarf_frame_cachep);
1183 if (!dwarf_frame_pool) 1185 if (!dwarf_frame_pool)
1184 goto out; 1186 goto out;
1185 1187
1186 dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ, 1188 dwarf_reg_pool = mempool_create_slab_pool(DWARF_REG_MIN_REQ,
1187 mempool_alloc_slab, 1189 dwarf_reg_cachep);
1188 mempool_free_slab,
1189 dwarf_reg_cachep);
1190 if (!dwarf_reg_pool) 1190 if (!dwarf_reg_pool)
1191 goto out; 1191 goto out;
1192 1192