forked from luck/tmp_suning_uos_patched
Xen ARM initialization fixes.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJRkRGeAAoJEIlPj0hw4a6QVtQQAKFd2beNkM9cdqnuItZKCNng 6Hh99woohgKZe5WKmBbmESBh3L034fCHRNHKocz8XNS9r+/EHDbEtehAEO6GkbnR QtrJ0CFeh2ESOMzI5JIeLuzhL65KYP+pfJyhbNDB707Gtw3snlgLsPCDEoEVbXTS O/AfNchmKwUOOfuqibykaK1Cuj1C4qq2huVPEVseCy6KC6VSQk0kBBAbZ3IFWRJ0 71saW+iMBfQ8FTFyJmj74sQZs1+Ee1GZ4TKS3CCeIzsozsxbzdzul0mrdgcs6xQN F4ar+0weVAzsV3CGEP0fw9WFYGfGKvdG/39gE5ZrOh3DI4kx+Q79sW1CY3JVWnJn kBXg6zb2rFoL5sB+NOSq3lL/EDNeHl0nle/r/dh/3IJS18OMYnwmLlEXrGG1h1qt tdHf9bIrqwJ6fw4e5Vf8aTbdK8clwZKXpYDsHSbms50qPwIBNnC1byc8FWsKYXbW XYIlk8yVdv/HqKzBjusAXe+g9oa2280N8+eIJ/CaCEfi+XMLPWOevs7G7ZvV79CJ nQ1Q9scMVKtdLduGkChxURTLZ2fEkYSaharylveRgq81lHoLnBiyAl/GY74BWqyH auvqCkbouH4EjeoD1HP+habdcVsc4bbroFSf2uNOLjHhFxqXn70LPoSP4QVSDbYN J0cFnLv0/9/khSZane2z =Q3Ri -----END PGP SIGNATURE----- Merge tag 'fixes-for-3.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/sstabellini/xen Pull Xen/arm fixes from Stefano Stabellini: "This contains a couple of Xen on ARM initialization fixes and a patch to improve error handling" * tag 'fixes-for-3.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/sstabellini/xen: xen/arm: rename xen_secondary_init and run it on every online cpu xen/arm: do not handle VCPUOP_register_vcpu_info failures xen/arm: initialize pm functions later
This commit is contained in:
commit
674825d050
|
@ -152,11 +152,12 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(xen_unmap_domain_mfn_range);
|
||||
|
||||
static int __init xen_secondary_init(unsigned int cpu)
|
||||
static void __init xen_percpu_init(void *unused)
|
||||
{
|
||||
struct vcpu_register_vcpu_info info;
|
||||
struct vcpu_info *vcpup;
|
||||
int err;
|
||||
int cpu = get_cpu();
|
||||
|
||||
pr_info("Xen: initializing cpu%d\n", cpu);
|
||||
vcpup = per_cpu_ptr(xen_vcpu_info, cpu);
|
||||
|
@ -165,14 +166,10 @@ static int __init xen_secondary_init(unsigned int cpu)
|
|||
info.offset = offset_in_page(vcpup);
|
||||
|
||||
err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, cpu, &info);
|
||||
if (err) {
|
||||
pr_debug("register_vcpu_info failed: err=%d\n", err);
|
||||
} else {
|
||||
/* This cpu is using the registered vcpu info, even if
|
||||
later ones fail to. */
|
||||
per_cpu(xen_vcpu, cpu) = vcpup;
|
||||
}
|
||||
return 0;
|
||||
BUG_ON(err);
|
||||
per_cpu(xen_vcpu, cpu) = vcpup;
|
||||
|
||||
enable_percpu_irq(xen_events_irq, 0);
|
||||
}
|
||||
|
||||
static void xen_restart(char str, const char *cmd)
|
||||
|
@ -208,7 +205,6 @@ static int __init xen_guest_init(void)
|
|||
const char *version = NULL;
|
||||
const char *xen_prefix = "xen,xen-";
|
||||
struct resource res;
|
||||
int i;
|
||||
|
||||
node = of_find_compatible_node(NULL, NULL, "xen,xen");
|
||||
if (!node) {
|
||||
|
@ -265,19 +261,23 @@ static int __init xen_guest_init(void)
|
|||
sizeof(struct vcpu_info));
|
||||
if (xen_vcpu_info == NULL)
|
||||
return -ENOMEM;
|
||||
for_each_online_cpu(i)
|
||||
xen_secondary_init(i);
|
||||
|
||||
gnttab_init();
|
||||
if (!xen_initial_domain())
|
||||
xenbus_probe(NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
core_initcall(xen_guest_init);
|
||||
|
||||
static int __init xen_pm_init(void)
|
||||
{
|
||||
pm_power_off = xen_power_off;
|
||||
arm_pm_restart = xen_restart;
|
||||
|
||||
return 0;
|
||||
}
|
||||
core_initcall(xen_guest_init);
|
||||
subsys_initcall(xen_pm_init);
|
||||
|
||||
static irqreturn_t xen_arm_callback(int irq, void *arg)
|
||||
{
|
||||
|
@ -285,11 +285,6 @@ static irqreturn_t xen_arm_callback(int irq, void *arg)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static __init void xen_percpu_enable_events(void *unused)
|
||||
{
|
||||
enable_percpu_irq(xen_events_irq, 0);
|
||||
}
|
||||
|
||||
static int __init xen_init_events(void)
|
||||
{
|
||||
if (!xen_domain() || xen_events_irq < 0)
|
||||
|
@ -303,7 +298,7 @@ static int __init xen_init_events(void)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
on_each_cpu(xen_percpu_enable_events, NULL, 0);
|
||||
on_each_cpu(xen_percpu_init, NULL, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user