mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
irq: change ->set_affinity() to return status
according to Ingo, change set_affinity() in irq_chip should return int, because that way we can handle failure cases in a much cleaner way, in the genirq layer. v2: fix two typos [ Impact: extend API ] Signed-off-by: Yinghai Lu <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Suresh Siddha <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Rusty Russell <[email protected]> Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
fcef5911c7
commit
d5dedd4507
23 changed files with 140 additions and 74 deletions
|
|
@ -688,13 +688,13 @@ void rebind_evtchn_irq(int evtchn, int irq)
|
|||
}
|
||||
|
||||
/* Rebind an evtchn so that it gets delivered to a specific cpu */
|
||||
static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
||||
static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
||||
{
|
||||
struct evtchn_bind_vcpu bind_vcpu;
|
||||
int evtchn = evtchn_from_irq(irq);
|
||||
|
||||
if (!VALID_EVTCHN(evtchn))
|
||||
return;
|
||||
return -1;
|
||||
|
||||
/* Send future instances of this interrupt to other vcpu. */
|
||||
bind_vcpu.port = evtchn;
|
||||
|
|
@ -707,13 +707,15 @@ static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
|||
*/
|
||||
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
|
||||
bind_evtchn_to_cpu(evtchn, tcpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void set_affinity_irq(unsigned irq, const struct cpumask *dest)
|
||||
static int set_affinity_irq(unsigned irq, const struct cpumask *dest)
|
||||
{
|
||||
unsigned tcpu = cpumask_first(dest);
|
||||
rebind_irq_to_cpu(irq, tcpu);
|
||||
|
||||
return rebind_irq_to_cpu(irq, tcpu);
|
||||
}
|
||||
|
||||
int resend_irq_on_evtchn(unsigned int irq)
|
||||
|
|
|
|||
Loading…
Reference in a new issue