mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge commit '683b6c6f82' into stable/for-linus-3.15
This merge of the irq-core-for-linus branch broke the ARM build when Xen is enabled. Conflicts: drivers/xen/events/events_base.c
This commit is contained in:
commit
2c5cb27703
1493 changed files with 25211 additions and 13637 deletions
|
|
@ -399,12 +399,26 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
|
|||
state = BP_EAGAIN;
|
||||
break;
|
||||
}
|
||||
|
||||
pfn = page_to_pfn(page);
|
||||
frame_list[i] = pfn_to_mfn(pfn);
|
||||
|
||||
scrub_page(page);
|
||||
|
||||
frame_list[i] = page_to_pfn(page);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure that ballooned highmem pages don't have kmaps.
|
||||
*
|
||||
* Do this before changing the p2m as kmap_flush_unused()
|
||||
* reads PTEs to obtain pages (and hence needs the original
|
||||
* p2m entry).
|
||||
*/
|
||||
kmap_flush_unused();
|
||||
|
||||
/* Update direct mapping, invalidate P2M, and add to balloon. */
|
||||
for (i = 0; i < nr_pages; i++) {
|
||||
pfn = frame_list[i];
|
||||
frame_list[i] = pfn_to_mfn(pfn);
|
||||
page = pfn_to_page(pfn);
|
||||
|
||||
#ifdef CONFIG_XEN_HAVE_PVMMU
|
||||
/*
|
||||
* Ballooned out frames are effectively replaced with
|
||||
|
|
@ -429,11 +443,9 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
|
|||
}
|
||||
#endif
|
||||
|
||||
balloon_append(pfn_to_page(pfn));
|
||||
balloon_append(page);
|
||||
}
|
||||
|
||||
/* Ensure that ballooned highmem pages don't have kmaps. */
|
||||
kmap_flush_unused();
|
||||
flush_tlb_all();
|
||||
|
||||
set_xen_guest_handle(reservation.extent_start, frame_list);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ static void evtchn_2l_handle_events(unsigned cpu)
|
|||
int start_word_idx, start_bit_idx;
|
||||
int word_idx, bit_idx;
|
||||
int i;
|
||||
struct irq_desc *desc;
|
||||
struct shared_info *s = HYPERVISOR_shared_info;
|
||||
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
|
||||
|
||||
|
|
@ -176,11 +175,8 @@ static void evtchn_2l_handle_events(unsigned cpu)
|
|||
unsigned int evtchn = evtchn_from_irq(irq);
|
||||
word_idx = evtchn / BITS_PER_LONG;
|
||||
bit_idx = evtchn % BITS_PER_LONG;
|
||||
if (active_evtchns(cpu, s, word_idx) & (1ULL << bit_idx)) {
|
||||
desc = irq_to_desc(irq);
|
||||
if (desc)
|
||||
generic_handle_irq_desc(irq, desc);
|
||||
}
|
||||
if (active_evtchns(cpu, s, word_idx) & (1ULL << bit_idx))
|
||||
generic_handle_irq(irq);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -245,11 +241,8 @@ static void evtchn_2l_handle_events(unsigned cpu)
|
|||
port = (word_idx * BITS_PER_EVTCHN_WORD) + bit_idx;
|
||||
irq = get_evtchn_to_irq(port);
|
||||
|
||||
if (irq != -1) {
|
||||
desc = irq_to_desc(irq);
|
||||
if (desc)
|
||||
generic_handle_irq_desc(irq, desc);
|
||||
}
|
||||
if (irq != -1)
|
||||
generic_handle_irq(irq);
|
||||
|
||||
bit_idx = (bit_idx + 1) % BITS_PER_EVTCHN_WORD;
|
||||
|
||||
|
|
|
|||
|
|
@ -336,9 +336,8 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
|
|||
|
||||
BUG_ON(irq == -1);
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_copy(irq_to_desc(irq)->irq_data.affinity, cpumask_of(cpu));
|
||||
cpumask_copy(irq_get_irq_data(irq)->affinity, cpumask_of(cpu));
|
||||
#endif
|
||||
|
||||
xen_evtchn_port_bind_to_cpu(info, cpu);
|
||||
|
||||
info->cpu = cpu;
|
||||
|
|
@ -373,10 +372,8 @@ static void xen_irq_init(unsigned irq)
|
|||
{
|
||||
struct irq_info *info;
|
||||
#ifdef CONFIG_SMP
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
/* By default all event channels notify CPU#0. */
|
||||
cpumask_copy(desc->irq_data.affinity, cpumask_of(0));
|
||||
cpumask_copy(irq_get_irq_data(irq)->affinity, cpumask_of(0));
|
||||
#endif
|
||||
|
||||
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
||||
|
|
@ -495,13 +492,6 @@ static void pirq_query_unmask(int irq)
|
|||
info->u.pirq.flags |= PIRQ_NEEDS_EOI;
|
||||
}
|
||||
|
||||
static bool probing_irq(int irq)
|
||||
{
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
return desc && desc->action == NULL;
|
||||
}
|
||||
|
||||
static void eoi_pirq(struct irq_data *data)
|
||||
{
|
||||
int evtchn = evtchn_from_irq(data->irq);
|
||||
|
|
@ -543,8 +533,7 @@ static unsigned int __startup_pirq(unsigned int irq)
|
|||
BIND_PIRQ__WILL_SHARE : 0;
|
||||
rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &bind_pirq);
|
||||
if (rc != 0) {
|
||||
if (!probing_irq(irq))
|
||||
pr_info("Failed to obtain physical IRQ %d\n", irq);
|
||||
pr_warn("Failed to obtain physical IRQ %d\n", irq);
|
||||
return 0;
|
||||
}
|
||||
evtchn = bind_pirq.port;
|
||||
|
|
@ -781,17 +770,12 @@ error_irq:
|
|||
|
||||
int xen_destroy_irq(int irq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
struct physdev_unmap_pirq unmap_irq;
|
||||
struct irq_info *info = info_for_irq(irq);
|
||||
int rc = -ENOENT;
|
||||
|
||||
mutex_lock(&irq_mapping_update_lock);
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
if (!desc)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* If trying to remove a vector in a MSI group different
|
||||
* than the first one skip the PIRQ unmap unless this vector
|
||||
|
|
@ -1265,6 +1249,7 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)
|
|||
#ifdef CONFIG_X86
|
||||
exit_idle();
|
||||
#endif
|
||||
inc_irq_stat(irq_hv_callback_count);
|
||||
|
||||
__xen_evtchn_do_upcall();
|
||||
|
||||
|
|
@ -1353,7 +1338,7 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
|||
static int set_affinity_irq(struct irq_data *data, const struct cpumask *dest,
|
||||
bool force)
|
||||
{
|
||||
unsigned tcpu = cpumask_first(dest);
|
||||
unsigned tcpu = cpumask_first_and(dest, cpu_online_mask);
|
||||
|
||||
return rebind_irq_to_cpu(data->irq, tcpu);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,14 +235,10 @@ static uint32_t clear_linked(volatile event_word_t *word)
|
|||
static void handle_irq_for_port(unsigned port)
|
||||
{
|
||||
int irq;
|
||||
struct irq_desc *desc;
|
||||
|
||||
irq = get_evtchn_to_irq(port);
|
||||
if (irq != -1) {
|
||||
desc = irq_to_desc(irq);
|
||||
if (desc)
|
||||
generic_handle_irq_desc(irq, desc);
|
||||
}
|
||||
if (irq != -1)
|
||||
generic_handle_irq(irq);
|
||||
}
|
||||
|
||||
static void consume_one_event(unsigned cpu,
|
||||
|
|
|
|||
Loading…
Reference in a new issue