Hi Suresh, Unfortunately, this patch will introduce its own set of bugs. However, your analysis was spot-on. I think I see the problem now. It was introduced when I put a hack in to "fix" s2ram problems in -mm as a result of the new root-domain logic. I think the following patch will fix both issues:

(I verified that I could take a cpu offline/online, but I don't have ans2ram compatible machine handy. Andrew, I believe you could reproducethe s2ram problem a few months ago when that issue popped up. So if youcould, please verify that s2ram also works with this patch applied, inaddition to the hotplug problem.

We currently set the root-domain online span automatically when the domainis added to the cpu if the cpu is already a member of cpu_online_map.This was done as a hack/bug-fix for s2ram, but it also causes a problemwith hotplug CPU_DOWN transitioning. The right way to fix the originalproblem is to actually respond to CPU_UP events, instead of CPU_ONLINE,which is already too late.