lkml.org 
[lkml]   [2012]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH-WIP 07/13] xen/arm: receive xen events on arm
On 23/02/12 17:48, Stefano Stabellini wrote:
> Compile events.c and use IRQ 32 to receive events notifications.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

> +#ifdef CONFIG_ARM
> +#define IRQ_EVTCHN_CALLBACK 63
> +irqreturn_t xen_arm_callback(int irq, void *arg)
> +{
> + __xen_evtchn_do_upcall();
> + return 0;
> +}
> +
> +int __init xen_init_IRQ_arm(void)
> +{
> + int rc;
> + xen_init_IRQ();
> + rc = request_irq(IRQ_EVTCHN_CALLBACK, xen_arm_callback,
> + IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TRIGGER_RISING,
> + "events", "events");
> + if (rc) {
> + printk(KERN_ERR "Error requesting IRQ %d\n", IRQ_EVTCHN_CALLBACK);
> + }
> + return rc;
> +}
> +core_initcall(xen_init_IRQ_arm);
> +#endif

You should (eventually) have a device tree binding for the event channel
and use a OF (device tree) device driver instead of this core_initcall()
to register the handler etc.

David



\
 
 \ /
  Last update: 2012-02-24 12:15    [W:0.218 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site