[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] RE: [PATCH][DOM0] Expose physical CPU information in dom0
Some little comments.. .. snip .. > + if (info->flags & XEN_PCPU_FLAGS_INVALID) { > + /* The pcpu has been removed */ > + *result = 0; You use #defines for the other cases. Should there be one for 0? Is 0 PCPU_REMOVED? > + if (pcpu) { > + raw_notifier_call_chain(&xen_pcpu_chain, > + XEN_PCPU_REMOVE, > + (void *)(long)pcpu->xen_id); > + xen_pcpu_free(pcpu); > + *result = PCPU_REMOVED; > + } > + return NULL; > + } > + > + > + if (!pcpu) { > + *result = PCPU_ADDED; > + pcpu = init_pcpu(info); > + if (pcpu == NULL) { > + printk(KERN_WARNING "Failed to init pcpu %x\n", > + info->xen_cpuid); > + *result = -1; How about #define PCPU_BAD -1? .. snip.. > +/* > + * type: 0 add, 1 remove > + */ Why not make this an enum? > +int xen_pcpu_hotplug(int type, uint32_t apic_id) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |