mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-10 16:34:00 +00:00
Fixes:
- Three fixes for ARM/ARM64 to either compile or not certain generic drivers - Fix for avoiding a potential deadlock when an user space event channel is destroyed. - Fix a workqueue resuming multiple times. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQEcBAABAgAGBQJR9/upAAoJEFjIrFwIi8fJueIH/0/cw1AP/wcUfD8QMmF8ySw2 s8BKUAZo6his9fepLw7mWN1r3SDR+TBBq3Oi/M96O3OZNEbLPxQBAIc/rTXJTxKH Jw82IIWSNn50eUX3oldwbNZW+V0rzIupsRwESLOc48wbVnwyw74vU4/8lljH7Xyp u8sSGw+2Q7mx9Pa85fA+HHMJA1LO1QemoSQqFVCbTFdv1MHJgFxb1eeDNQ/8X0by wAOMDkyboWYK84kRxJTh+bj+Ie4Z+kC+NlDS/gvch9cdxHrVENZyND3grNwUXkMr 3S1zF6f0529IwkKjYDNCHtrAdRy6+o1KNvKnbp9/iylSnBRPquukMU1AmuvlrNM= =lwZR -----END PGP SIGNATURE----- Merge tag 'stable/for-linus-3.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull Xen fixes from Konrad Rzeszutek Wilk: - Three fixes for ARM/ARM64 to either compile or not certain generic drivers - Fix for avoiding a potential deadlock when an user space event channel is destroyed. - Fix a workqueue resuming multiple times. * tag 'stable/for-linus-3.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/tmem: do not allow XEN_TMEM on ARM64 xen/evtchn: avoid a deadlock when unbinding an event channel xen/arm: enable PV control for ARM xen/arm64: Don't compile cpu hotplug xenbus: frontend resume cleanup
This commit is contained in:
commit
f66d95d69d
4 changed files with 21 additions and 26 deletions
|
@ -145,7 +145,7 @@ config SWIOTLB_XEN
|
||||||
|
|
||||||
config XEN_TMEM
|
config XEN_TMEM
|
||||||
tristate
|
tristate
|
||||||
depends on !ARM
|
depends on !ARM && !ARM64
|
||||||
default m if (CLEANCACHE || FRONTSWAP)
|
default m if (CLEANCACHE || FRONTSWAP)
|
||||||
help
|
help
|
||||||
Shim to interface in-kernel Transcendent Memory hooks
|
Shim to interface in-kernel Transcendent Memory hooks
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
ifneq ($(CONFIG_ARM),y)
|
ifeq ($(filter y, $(CONFIG_ARM) $(CONFIG_ARM64)),)
|
||||||
obj-y += manage.o
|
|
||||||
obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
|
obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
|
||||||
endif
|
endif
|
||||||
obj-$(CONFIG_X86) += fallback.o
|
obj-$(CONFIG_X86) += fallback.o
|
||||||
obj-y += grant-table.o features.o events.o balloon.o
|
obj-y += grant-table.o features.o events.o balloon.o manage.o
|
||||||
obj-y += xenbus/
|
obj-y += xenbus/
|
||||||
|
|
||||||
nostackp := $(call cc-option, -fno-stack-protector)
|
nostackp := $(call cc-option, -fno-stack-protector)
|
||||||
|
|
|
@ -379,18 +379,12 @@ static long evtchn_ioctl(struct file *file,
|
||||||
if (unbind.port >= NR_EVENT_CHANNELS)
|
if (unbind.port >= NR_EVENT_CHANNELS)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
spin_lock_irq(&port_user_lock);
|
|
||||||
|
|
||||||
rc = -ENOTCONN;
|
rc = -ENOTCONN;
|
||||||
if (get_port_user(unbind.port) != u) {
|
if (get_port_user(unbind.port) != u)
|
||||||
spin_unlock_irq(&port_user_lock);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
disable_irq(irq_from_evtchn(unbind.port));
|
disable_irq(irq_from_evtchn(unbind.port));
|
||||||
|
|
||||||
spin_unlock_irq(&port_user_lock);
|
|
||||||
|
|
||||||
evtchn_unbind_from_user(u, unbind.port);
|
evtchn_unbind_from_user(u, unbind.port);
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
@ -490,26 +484,15 @@ static int evtchn_release(struct inode *inode, struct file *filp)
|
||||||
int i;
|
int i;
|
||||||
struct per_user_data *u = filp->private_data;
|
struct per_user_data *u = filp->private_data;
|
||||||
|
|
||||||
spin_lock_irq(&port_user_lock);
|
|
||||||
|
|
||||||
free_page((unsigned long)u->ring);
|
|
||||||
|
|
||||||
for (i = 0; i < NR_EVENT_CHANNELS; i++) {
|
for (i = 0; i < NR_EVENT_CHANNELS; i++) {
|
||||||
if (get_port_user(i) != u)
|
if (get_port_user(i) != u)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
disable_irq(irq_from_evtchn(i));
|
disable_irq(irq_from_evtchn(i));
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_irq(&port_user_lock);
|
|
||||||
|
|
||||||
for (i = 0; i < NR_EVENT_CHANNELS; i++) {
|
|
||||||
if (get_port_user(i) != u)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
evtchn_unbind_from_user(get_port_user(i), i);
|
evtchn_unbind_from_user(get_port_user(i), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free_page((unsigned long)u->ring);
|
||||||
kfree(u->name);
|
kfree(u->name);
|
||||||
kfree(u);
|
kfree(u);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,6 @@ static int xenbus_frontend_dev_resume(struct device *dev)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_WORK(&xdev->work, xenbus_frontend_delayed_resume);
|
|
||||||
queue_work(xenbus_frontend_wq, &xdev->work);
|
queue_work(xenbus_frontend_wq, &xdev->work);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -124,6 +123,16 @@ static int xenbus_frontend_dev_resume(struct device *dev)
|
||||||
return xenbus_dev_resume(dev);
|
return xenbus_dev_resume(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int xenbus_frontend_dev_probe(struct device *dev)
|
||||||
|
{
|
||||||
|
if (xen_store_domain_type == XS_LOCAL) {
|
||||||
|
struct xenbus_device *xdev = to_xenbus_device(dev);
|
||||||
|
INIT_WORK(&xdev->work, xenbus_frontend_delayed_resume);
|
||||||
|
}
|
||||||
|
|
||||||
|
return xenbus_dev_probe(dev);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops xenbus_pm_ops = {
|
static const struct dev_pm_ops xenbus_pm_ops = {
|
||||||
.suspend = xenbus_dev_suspend,
|
.suspend = xenbus_dev_suspend,
|
||||||
.resume = xenbus_frontend_dev_resume,
|
.resume = xenbus_frontend_dev_resume,
|
||||||
|
@ -142,7 +151,7 @@ static struct xen_bus_type xenbus_frontend = {
|
||||||
.name = "xen",
|
.name = "xen",
|
||||||
.match = xenbus_match,
|
.match = xenbus_match,
|
||||||
.uevent = xenbus_uevent_frontend,
|
.uevent = xenbus_uevent_frontend,
|
||||||
.probe = xenbus_dev_probe,
|
.probe = xenbus_frontend_dev_probe,
|
||||||
.remove = xenbus_dev_remove,
|
.remove = xenbus_dev_remove,
|
||||||
.shutdown = xenbus_dev_shutdown,
|
.shutdown = xenbus_dev_shutdown,
|
||||||
.dev_attrs = xenbus_dev_attrs,
|
.dev_attrs = xenbus_dev_attrs,
|
||||||
|
@ -474,7 +483,11 @@ static int __init xenbus_probe_frontend_init(void)
|
||||||
|
|
||||||
register_xenstore_notifier(&xenstore_notifier);
|
register_xenstore_notifier(&xenstore_notifier);
|
||||||
|
|
||||||
|
if (xen_store_domain_type == XS_LOCAL) {
|
||||||
xenbus_frontend_wq = create_workqueue("xenbus_frontend");
|
xenbus_frontend_wq = create_workqueue("xenbus_frontend");
|
||||||
|
if (!xenbus_frontend_wq)
|
||||||
|
pr_warn("create xenbus frontend workqueue failed, S3 resume is likely to fail\n");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue