mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
Linux 3.7
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJQxqj1AAoJEHm+PkMAQRiG9MQH/j21UwP2QGpdpXbWAnFMjtlv uE/yCFhPoqR1QjjE6oRlO6MHFA41xGDbr5RQki9Ik2AfSYiastt4ZWYvtSJKVTCr O0Lj+Cdt/2qBkGiARHqVEBZ4S/l/cw4/EHPb5StFyu3ggnPPQhoPIP7oAmRn0+mh NNb5CEcJOLqIaJSteqMP71Q899ncbLayBnimYCaC2f6r00beqNXIqxSHipcPlUsf ehNxqCX+5z5Q788EL33EL8GpBcy4Ueevu6nvnuVI8qIEnBnrBVngsiaQ4Hti+2eK A//4DYoF2N1wLjQv7hFeiwMURQ16OlxXoc/Z66sv2QQRwPxOIQlxdhWuey4KebA= =7LYr -----END PGP SIGNATURE----- Merge tag 'v3.7' into stable/for-linus-3.8 Linux 3.7 * tag 'v3.7': (833 commits) Linux 3.7 Input: matrix-keymap - provide proper module license Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damage ipv4: ip_check_defrag must not modify skb before unsharing Revert "mm: avoid waking kswapd for THP allocations when compaction is deferred or contended" inet_diag: validate port comparison byte code to prevent unsafe reads inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run() inet_diag: validate byte code to prevent oops in inet_diag_bc_run() inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state mm: vmscan: fix inappropriate zone congestion clearing vfs: fix O_DIRECT read past end of block device net: gro: fix possible panic in skb_gro_receive() tcp: bug fix Fast Open client retransmission tmpfs: fix shared mempolicy leak mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones mm: compaction: validate pfn range passed to isolate_freepages_block mmc: sh-mmcif: avoid oops on spurious interrupts (second try) Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts" mmc: sdhci-s3c: fix missing clock for gpio card-detect lib/Makefile: Fix oid_registry build dependency ... Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Conflicts: arch/arm/xen/enlighten.c drivers/xen/Makefile [We need to have the v3.7 base as the 'for-3.8' was based off v3.7-rc3 and there are some patches in v3.7-rc6 that we to have in our branch]
This commit is contained in:
commit
7bcc1ec077
851 changed files with 9301 additions and 5507 deletions
|
|
@ -2,6 +2,7 @@ ifneq ($(CONFIG_ARM),y)
|
|||
obj-y += manage.o
|
||||
obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
|
||||
endif
|
||||
obj-$(CONFIG_X86) += fallback.o
|
||||
obj-y += grant-table.o features.o events.o balloon.o
|
||||
obj-y += xenbus/
|
||||
|
||||
|
|
|
|||
|
|
@ -1395,10 +1395,10 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)
|
|||
{
|
||||
struct pt_regs *old_regs = set_irq_regs(regs);
|
||||
|
||||
irq_enter();
|
||||
#ifdef CONFIG_X86
|
||||
exit_idle();
|
||||
#endif
|
||||
irq_enter();
|
||||
|
||||
__xen_evtchn_do_upcall();
|
||||
|
||||
|
|
|
|||
80
drivers/xen/fallback.c
Normal file
80
drivers/xen/fallback.c
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/export.h>
|
||||
#include <asm/hypervisor.h>
|
||||
#include <asm/xen/hypercall.h>
|
||||
|
||||
int xen_event_channel_op_compat(int cmd, void *arg)
|
||||
{
|
||||
struct evtchn_op op;
|
||||
int rc;
|
||||
|
||||
op.cmd = cmd;
|
||||
memcpy(&op.u, arg, sizeof(op.u));
|
||||
rc = _hypercall1(int, event_channel_op_compat, &op);
|
||||
|
||||
switch (cmd) {
|
||||
case EVTCHNOP_close:
|
||||
case EVTCHNOP_send:
|
||||
case EVTCHNOP_bind_vcpu:
|
||||
case EVTCHNOP_unmask:
|
||||
/* no output */
|
||||
break;
|
||||
|
||||
#define COPY_BACK(eop) \
|
||||
case EVTCHNOP_##eop: \
|
||||
memcpy(arg, &op.u.eop, sizeof(op.u.eop)); \
|
||||
break
|
||||
|
||||
COPY_BACK(bind_interdomain);
|
||||
COPY_BACK(bind_virq);
|
||||
COPY_BACK(bind_pirq);
|
||||
COPY_BACK(status);
|
||||
COPY_BACK(alloc_unbound);
|
||||
COPY_BACK(bind_ipi);
|
||||
#undef COPY_BACK
|
||||
|
||||
default:
|
||||
WARN_ON(rc != -ENOSYS);
|
||||
break;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xen_event_channel_op_compat);
|
||||
|
||||
int HYPERVISOR_physdev_op_compat(int cmd, void *arg)
|
||||
{
|
||||
struct physdev_op op;
|
||||
int rc;
|
||||
|
||||
op.cmd = cmd;
|
||||
memcpy(&op.u, arg, sizeof(op.u));
|
||||
rc = _hypercall1(int, physdev_op_compat, &op);
|
||||
|
||||
switch (cmd) {
|
||||
case PHYSDEVOP_IRQ_UNMASK_NOTIFY:
|
||||
case PHYSDEVOP_set_iopl:
|
||||
case PHYSDEVOP_set_iobitmap:
|
||||
case PHYSDEVOP_apic_write:
|
||||
/* no output */
|
||||
break;
|
||||
|
||||
#define COPY_BACK(pop, fld) \
|
||||
case PHYSDEVOP_##pop: \
|
||||
memcpy(arg, &op.u.fld, sizeof(op.u.fld)); \
|
||||
break
|
||||
|
||||
COPY_BACK(irq_status_query, irq_status_query);
|
||||
COPY_BACK(apic_read, apic_op);
|
||||
COPY_BACK(ASSIGN_VECTOR, irq_op);
|
||||
#undef COPY_BACK
|
||||
|
||||
default:
|
||||
WARN_ON(rc != -ENOSYS);
|
||||
break;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -105,6 +105,21 @@ static void gntdev_print_maps(struct gntdev_priv *priv,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void gntdev_free_map(struct grant_map *map)
|
||||
{
|
||||
if (map == NULL)
|
||||
return;
|
||||
|
||||
if (map->pages)
|
||||
free_xenballooned_pages(map->count, map->pages);
|
||||
kfree(map->pages);
|
||||
kfree(map->grants);
|
||||
kfree(map->map_ops);
|
||||
kfree(map->unmap_ops);
|
||||
kfree(map->kmap_ops);
|
||||
kfree(map);
|
||||
}
|
||||
|
||||
static struct grant_map *gntdev_alloc_map(struct gntdev_priv *priv, int count)
|
||||
{
|
||||
struct grant_map *add;
|
||||
|
|
@ -142,12 +157,7 @@ static struct grant_map *gntdev_alloc_map(struct gntdev_priv *priv, int count)
|
|||
return add;
|
||||
|
||||
err:
|
||||
kfree(add->pages);
|
||||
kfree(add->grants);
|
||||
kfree(add->map_ops);
|
||||
kfree(add->unmap_ops);
|
||||
kfree(add->kmap_ops);
|
||||
kfree(add);
|
||||
gntdev_free_map(add);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -198,17 +208,9 @@ static void gntdev_put_map(struct grant_map *map)
|
|||
evtchn_put(map->notify.event);
|
||||
}
|
||||
|
||||
if (map->pages) {
|
||||
if (!use_ptemod)
|
||||
unmap_grant_pages(map, 0, map->count);
|
||||
|
||||
free_xenballooned_pages(map->count, map->pages);
|
||||
}
|
||||
kfree(map->pages);
|
||||
kfree(map->grants);
|
||||
kfree(map->map_ops);
|
||||
kfree(map->unmap_ops);
|
||||
kfree(map);
|
||||
if (map->pages && !use_ptemod)
|
||||
unmap_grant_pages(map, 0, map->count);
|
||||
gntdev_free_map(map);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
|
|
|||
|
|
@ -399,13 +399,13 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
|
|||
down_write(&mm->mmap_sem);
|
||||
|
||||
vma = find_vma(mm, m.addr);
|
||||
ret = -EINVAL;
|
||||
if (!vma ||
|
||||
vma->vm_ops != &privcmd_vm_ops ||
|
||||
(m.addr != vma->vm_start) ||
|
||||
((m.addr + (nr_pages << PAGE_SHIFT)) != vma->vm_end) ||
|
||||
!privcmd_enforce_singleshot_mapping(vma)) {
|
||||
up_write(&mm->mmap_sem);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (xen_feature(XENFEAT_auto_translated_physmap)) {
|
||||
|
|
@ -429,12 +429,16 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
|
|||
|
||||
up_write(&mm->mmap_sem);
|
||||
|
||||
if (state.global_error && (version == 1)) {
|
||||
/* Write back errors in second pass. */
|
||||
state.user_mfn = (xen_pfn_t *)m.arr;
|
||||
state.err = err_array;
|
||||
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
|
||||
&pagelist, mmap_return_errors_v1, &state);
|
||||
if (version == 1) {
|
||||
if (state.global_error) {
|
||||
/* Write back errors in second pass. */
|
||||
state.user_mfn = (xen_pfn_t *)m.arr;
|
||||
state.err = err_array;
|
||||
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
|
||||
&pagelist, mmap_return_errors_v1, &state);
|
||||
} else
|
||||
ret = 0;
|
||||
|
||||
} else if (version == 2) {
|
||||
ret = __copy_to_user(m.err, err_array, m.num * sizeof(int));
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ static ssize_t xenbus_file_write(struct file *filp,
|
|||
goto out;
|
||||
|
||||
/* Can't write a xenbus message larger we can buffer */
|
||||
if ((len + u->len) > sizeof(u->u.buffer)) {
|
||||
if (len > sizeof(u->u.buffer) - u->len) {
|
||||
/* On error, dump existing buffer */
|
||||
u->len = 0;
|
||||
rc = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue