Daniel Kiper
2012-Aug-10 13:27 UTC
[PATCH v2 4/6] xen: Get idle data from alternative source
idle member was removed from struct schedule_data by 21422 changeset (Fix CPU hotplug after percpu data handling changes). Get idle data from alternative source. Signed-off-by: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> diff -Npru crash-6.0.8.orig/xen_hyper.c crash-6.0.8/xen_hyper.c --- crash-6.0.8.orig/xen_hyper.c 2012-07-05 16:05:31.000000000 +0200 +++ crash-6.0.8/xen_hyper.c 2012-07-05 16:08:52.000000000 +0200 @@ -397,7 +397,8 @@ xen_hyper_misc_init(void) XEN_HYPER_STRUCT_SIZE_INIT(schedule_data, "schedule_data"); XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_schedule_lock, "schedule_data", "schedule_lock"); XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_curr, "schedule_data", "curr"); - XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_idle, "schedule_data", "idle"); + if (MEMBER_EXISTS("schedule_data", "idle")) + XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_idle, "schedule_data", "idle"); XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_sched_priv, "schedule_data", "sched_priv"); XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_s_timer, "schedule_data", "s_timer"); XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_tick, "schedule_data", "tick"); @@ -539,7 +540,10 @@ xen_hyper_schedule_init(void) } schc->cpu_id = cpuid; schc->curr = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_curr)); - schc->idle = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_idle)); + if (MEMBER_EXISTS("schedule_data", "idle")) + schc->idle = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_idle)); + else + schc->idle = xht->idle_vcpu_array[cpuid]; schc->sched_priv ULONG(buf + XEN_HYPER_OFFSET(schedule_data_sched_priv)); if (XEN_HYPER_VALID_MEMBER(schedule_data_tick))