--- arch/x86_64/kernel/mce_amd.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: linux-2.6.22-rc4-mm2/arch/x86_64/kernel/mce_amd.c =================================================================== --- linux-2.6.22-rc4-mm2.orig/arch/x86_64/kernel/mce_amd.c +++ linux-2.6.22-rc4-mm2/arch/x86_64/kernel/mce_amd.c @@ -434,6 +434,7 @@ static __cpuinit int allocate_threshold_ kobject_set_name(&b->kobj, "misc%i", block); b->kobj.parent = &per_cpu(threshold_banks, cpu)[bank]->kobj; b->kobj.ktype = &threshold_ktype; + printk("XXX%d registering %s (%p)\n", cpu, kobject_name(&b->kobj), &b->kobj); err = kobject_register(&b->kobj); if (err) goto out_free; @@ -454,6 +455,7 @@ recurse: out_free: if (b) { + printk("XXX%d unregistering %s (%p)\n", cpu, kobject_name(&b->kobj), &b->kobj); kobject_unregister(&b->kobj); kfree(b); } @@ -511,6 +513,7 @@ static __cpuinit int threshold_create_ba #else b->cpus = cpu_core_map[cpu]; #endif + printk("XXX%d registering %s (%p)\n", cpu, kobject_name(&b->kobj), &b->kobj); err = kobject_register(&b->kobj); if (err) goto out_free; @@ -580,6 +583,7 @@ static void deallocate_threshold_block(u return; list_for_each_entry_safe(pos, tmp, &head->blocks->miscj, miscj) { + printk("XXX%d unregistering %s (%p)\n", cpu, kobject_name(&pos->kobj), &pos->kobj); kobject_unregister(&pos->kobj); list_del(&pos->miscj); kfree(pos); @@ -608,6 +612,9 @@ static void threshold_remove_bank(unsign #ifdef CONFIG_SMP /* sibling symlink */ if (shared_bank[bank] && b->blocks->cpu != cpu) { + struct kobject *kobj = &per_cpu(device_mce, cpu).kobj; + + printk("XXX%d removing %s (%p)\n", cpu, kobject_name(kobj), kobj); sysfs_remove_link(&per_cpu(device_mce, cpu).kobj, name); per_cpu(threshold_banks, cpu)[bank] = NULL; return; @@ -626,6 +633,7 @@ static void threshold_remove_bank(unsign deallocate_threshold_block(cpu, bank); free_out: + printk("XXX%d unregistering %s (%p)\n", cpu, kobject_name(&b->kobj), &b->kobj); kobject_unregister(&b->kobj); kfree(b); per_cpu(threshold_banks, cpu)[bank] = NULL;