aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/arm/gic.c
blob: 1c8219d18b51800dfd19c83904c4529be8ac5492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
/*
 * xen/arch/arm/gic.c
 *
 * ARM Generic Interrupt Controller support
 *
 * Tim Deegan <tim@xen.org>
 * Copyright (c) 2011 Citrix Systems.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <xen/config.h>
#include <xen/lib.h>
#include <xen/init.h>
#include <xen/mm.h>
#include <xen/irq.h>
#include <xen/sched.h>
#include <xen/errno.h>
#include <xen/softirq.h>
#include <xen/list.h>
#include <xen/device_tree.h>
#include <asm/p2m.h>
#include <asm/domain.h>

#include <asm/gic.h>

/* Access to the GIC Distributor registers through the fixmap */
#define GICD ((volatile uint32_t *) FIXMAP_ADDR(FIXMAP_GICD))
#define GICC ((volatile uint32_t *) FIXMAP_ADDR(FIXMAP_GICC1))
#define GICH ((volatile uint32_t *) FIXMAP_ADDR(FIXMAP_GICH))
static void gic_restore_pending_irqs(struct vcpu *v);

/* Global state */
static struct {
    paddr_t dbase;       /* Address of distributor registers */
    paddr_t cbase;       /* Address of CPU interface registers */
    paddr_t hbase;       /* Address of virtual interface registers */
    paddr_t vbase;       /* Address of virtual cpu interface registers */
    unsigned int lines;
    unsigned int cpus;
    spinlock_t lock;
} gic;

static irq_desc_t irq_desc[NR_IRQS];
static DEFINE_PER_CPU(irq_desc_t[NR_LOCAL_IRQS], local_irq_desc);
static DEFINE_PER_CPU(uint64_t, lr_mask);

unsigned nr_lrs;

irq_desc_t *__irq_to_desc(int irq)
{
    if (irq < NR_LOCAL_IRQS) return &this_cpu(local_irq_desc)[irq];
    return &irq_desc[irq-NR_LOCAL_IRQS];
}

void gic_save_state(struct vcpu *v)
{
    int i;

    spin_lock_irq(&gic.lock);
    for ( i=0; i<nr_lrs; i++)
        v->arch.gic_lr[i] = GICH[GICH_LR + i];
    v->arch.lr_mask = this_cpu(lr_mask);
    spin_unlock_irq(&gic.lock);
    /* Disable until next VCPU scheduled */
    GICH[GICH_HCR] = 0;
    isb();
}

void gic_restore_state(struct vcpu *v)
{
    int i;

    if ( is_idle_vcpu(v) )
        return;

    spin_lock_irq(&gic.lock);
    this_cpu(lr_mask) = v->arch.lr_mask;
    for ( i=0; i<nr_lrs; i++)
        GICH[GICH_LR + i] = v->arch.gic_lr[i];
    spin_unlock_irq(&gic.lock);
    GICH[GICH_HCR] = GICH_HCR_EN;
    isb();

    gic_restore_pending_irqs(v);
}

static unsigned int gic_irq_startup(struct irq_desc *desc)
{
    uint32_t enabler;
    int irq = desc->irq;

    /* Enable routing */
    enabler = GICD[GICD_ISENABLER + irq / 32];
    GICD[GICD_ISENABLER + irq / 32] = enabler | (1u << (irq % 32));

    return 0;
}

static void gic_irq_shutdown(struct irq_desc *desc)
{
    uint32_t enabler;
    int irq = desc->irq;

    /* Disable routing */
    enabler = GICD[GICD_ICENABLER + irq / 32];
    GICD[GICD_ICENABLER + irq / 32] = enabler | (1u << (irq % 32));
}

static void gic_irq_enable(struct irq_desc *desc)
{

}

static void gic_irq_disable(struct irq_desc *desc)
{

}

static void gic_irq_ack(struct irq_desc *desc)
{
    /* No ACK -- reading IAR has done this for us */
}

static void gic_host_irq_end(struct irq_desc *desc)
{
    int irq = desc->irq;
    /* Lower the priority */
    GICC[GICC_EOIR] = irq;
    /* Deactivate */
    GICC[GICC_DIR] = irq;
}

static void gic_guest_irq_end(struct irq_desc *desc)
{
    int irq = desc->irq;
    /* Lower the priority of the IRQ */
    GICC[GICC_EOIR] = irq;
    /* Deactivation happens in maintenance interrupt / via GICV */
}

static void gic_irq_set_affinity(struct irq_desc *desc, const cpumask_t *mask)
{
    BUG();
}

/* XXX different for level vs edge */
static hw_irq_controller gic_host_irq_type = {
    .typename = "gic",
    .startup = gic_irq_startup,
    .shutdown = gic_irq_shutdown,
    .enable = gic_irq_enable,
    .disable = gic_irq_disable,
    .ack = gic_irq_ack,
    .end = gic_host_irq_end,
    .set_affinity = gic_irq_set_affinity,
};
static hw_irq_controller gic_guest_irq_type = {
    .typename = "gic",
    .startup = gic_irq_startup,
    .shutdown = gic_irq_shutdown,
    .enable = gic_irq_enable,
    .disable = gic_irq_disable,
    .ack = gic_irq_ack,
    .end = gic_guest_irq_end,
    .set_affinity = gic_irq_set_affinity,
};

/* needs to be called with gic.lock held */
static void gic_set_irq_properties(unsigned int irq, bool_t level,
        unsigned int cpu_mask, unsigned int priority)
{
    volatile unsigned char *bytereg;
    uint32_t cfg, edgebit;

    /* Set edge / level */
    cfg = GICD[GICD_ICFGR + irq / 16];
    edgebit = 2u << (2 * (irq % 16));
    if ( level )
        cfg &= ~edgebit;
    else
        cfg |= edgebit;
    GICD[GICD_ICFGR + irq / 16] = cfg;

    /* Set target CPU mask (RAZ/WI on uniprocessor) */
    bytereg = (unsigned char *) (GICD + GICD_ITARGETSR);
    bytereg[irq] = cpu_mask;

    /* Set priority */
    bytereg = (unsigned char *) (GICD + GICD_IPRIORITYR);
    bytereg[irq] = priority;

}

/* Program the GIC to route an interrupt */
static int gic_route_irq(unsigned int irq, bool_t level,
                         unsigned int cpu_mask, unsigned int priority)
{
    struct irq_desc *desc = irq_to_desc(irq);
    unsigned long flags;

    ASSERT(!(cpu_mask & ~0xff));  /* Targets bitmap only supports 8 CPUs */
    ASSERT(priority <= 0xff);     /* Only 8 bits of priority */
    ASSERT(irq < gic.lines + 32); /* Can't route interrupts that don't exist */

    spin_lock_irqsave(&desc->lock, flags);
    spin_lock(&gic.lock);

    if ( desc->action != NULL )
    {
        spin_unlock(&gic.lock);
        spin_unlock(&desc->lock);
        return -EBUSY;
    }

    desc->handler = &gic_host_irq_type;

    /* Disable interrupt */
    desc->handler->shutdown(desc);

    gic_set_irq_properties(irq, level, cpu_mask, priority);

    spin_unlock(&gic.lock);
    spin_unlock_irqrestore(&desc->lock, flags);
    return 0;
}

static void __init gic_dist_init(void)
{
    uint32_t type;
    uint32_t cpumask = 1 << smp_processor_id();
    int i;

    cpumask |= cpumask << 8;
    cpumask |= cpumask << 16;

    /* Disable the distributor */
    GICD[GICD_CTLR] = 0;

    type = GICD[GICD_TYPER];
    gic.lines = 32 * (type & GICD_TYPE_LINES);
    gic.cpus = 1 + ((type & GICD_TYPE_CPUS) >> 5);
    printk("GIC: %d lines, %d cpu%s%s (IID %8.8x).\n",
           gic.lines, gic.cpus, (gic.cpus == 1) ? "" : "s",
           (type & GICD_TYPE_SEC) ? ", secure" : "",
           GICD[GICD_IIDR]);

    /* Default all global IRQs to level, active low */
    for ( i = 32; i < gic.lines; i += 16 )
        GICD[GICD_ICFGR + i / 16] = 0x0;

    /* Route all global IRQs to this CPU */
    for ( i = 32; i < gic.lines; i += 4 )
        GICD[GICD_ICFGR + i / 4] = cpumask;

    /* Default priority for global interrupts */
    for ( i = 32; i < gic.lines; i += 4 )
        GICD[GICD_IPRIORITYR + i / 4] = 0xa0a0a0a0;

    /* Disable all global interrupts */
    for ( i = 32; i < gic.lines; i += 32 )
        GICD[GICD_ICENABLER + i / 32] = ~0ul;

    /* Turn on the distributor */
    GICD[GICD_CTLR] = GICD_CTL_ENABLE;
}

static void __cpuinit gic_cpu_init(void)
{
    int i;

    /* The first 32 interrupts (PPI and SGI) are banked per-cpu, so
     * even though they are controlled with GICD registers, they must
     * be set up here with the other per-cpu state. */
    GICD[GICD_ICENABLER] = 0xffff0000; /* Disable all PPI */
    GICD[GICD_ISENABLER] = 0x0000ffff; /* Enable all SGI */
    /* Set PPI and SGI priorities */
    for (i = 0; i < 32; i += 4)
        GICD[GICD_IPRIORITYR + i / 4] = 0xa0a0a0a0;

    /* Local settings: interface controller */
    GICC[GICC_PMR] = 0xff;                /* Don't mask by priority */
    GICC[GICC_BPR] = 0;                   /* Finest granularity of priority */
    GICC[GICC_CTLR] = GICC_CTL_ENABLE|GICC_CTL_EOI;    /* Turn on delivery */
}

static void gic_cpu_disable(void)
{
    GICC[GICC_CTLR] = 0;
}

static void __cpuinit gic_hyp_init(void)
{
    uint32_t vtr;

    vtr = GICH[GICH_VTR];
    nr_lrs  = (vtr & GICH_VTR_NRLRGS) + 1;

    GICH[GICH_MISR] = GICH_MISR_EOI;
    this_cpu(lr_mask) = 0ULL;
}

static void __cpuinit gic_hyp_disable(void)
{
    GICH[GICH_HCR] = 0;
}

/* Set up the GIC */
void __init gic_init(void)
{
    printk("GIC initialization:\n"
              "        gic_dist_addr=%"PRIpaddr"\n"
              "        gic_cpu_addr=%"PRIpaddr"\n"
              "        gic_hyp_addr=%"PRIpaddr"\n"
              "        gic_vcpu_addr=%"PRIpaddr"\n",
              early_info.gic.gic_dist_addr, early_info.gic.gic_cpu_addr,
              early_info.gic.gic_hyp_addr, early_info.gic.gic_vcpu_addr);
    if ( !early_info.gic.gic_dist_addr ||
         !early_info.gic.gic_cpu_addr ||
         !early_info.gic.gic_hyp_addr ||
         !early_info.gic.gic_vcpu_addr )
        panic("the physical address of one of the GIC interfaces is missing\n");
    if ( (early_info.gic.gic_dist_addr & ~PAGE_MASK) ||
         (early_info.gic.gic_cpu_addr & ~PAGE_MASK) ||
         (early_info.gic.gic_hyp_addr & ~PAGE_MASK) ||
         (early_info.gic.gic_vcpu_addr & ~PAGE_MASK) )
        panic("GIC interfaces not page aligned.\n");

    gic.dbase = early_info.gic.gic_dist_addr;
    gic.cbase = early_info.gic.gic_cpu_addr;
    gic.hbase = early_info.gic.gic_hyp_addr;
    gic.vbase = early_info.gic.gic_vcpu_addr;
    set_fixmap(FIXMAP_GICD, gic.dbase >> PAGE_SHIFT, DEV_SHARED);
    BUILD_BUG_ON(FIXMAP_ADDR(FIXMAP_GICC1) !=
                 FIXMAP_ADDR(FIXMAP_GICC2)-PAGE_SIZE);
    set_fixmap(FIXMAP_GICC1, gic.cbase >> PAGE_SHIFT, DEV_SHARED);
    set_fixmap(FIXMAP_GICC2, (gic.cbase >> PAGE_SHIFT) + 1, DEV_SHARED);
    set_fixmap(FIXMAP_GICH, gic.hbase >> PAGE_SHIFT, DEV_SHARED);

    /* Global settings: interrupt distributor */
    spin_lock_init(&gic.lock);
    spin_lock(&gic.lock);

    gic_dist_init();
    gic_cpu_init();
    gic_hyp_init();

    spin_unlock(&gic.lock);
}

void smp_send_state_dump(unsigned int cpu)
{
    printk("WARNING: unable to send state dump request to CPU%d\n", cpu);
    /* XXX TODO -- send an SGI */
}

/* Set up the per-CPU parts of the GIC for a secondary CPU */
void __cpuinit gic_init_secondary_cpu(void)
{
    spin_lock(&gic.lock);
    gic_cpu_init();
    gic_hyp_init();
    spin_unlock(&gic.lock);
}

/* Shut down the per-CPU GIC interface */
void gic_disable_cpu(void)
{
    spin_lock_irq(&gic.lock);
    gic_cpu_disable();
    gic_hyp_disable();
    spin_unlock_irq(&gic.lock);
}

void gic_route_ppis(void)
{
    /* XXX should get these from DT */
    /* GIC maintenance */
    gic_route_irq(25, 1, 1u << smp_processor_id(), 0xa0);
    /* Hypervisor Timer */
    gic_route_irq(26, 1, 1u << smp_processor_id(), 0xa0);
    /* Virtual Timer */
    gic_route_irq(27, 1, 1u << smp_processor_id(), 0xa0);
    /* Physical Timer */
    gic_route_irq(30, 1, 1u << smp_processor_id(), 0xa0);
}

void gic_route_spis(void)
{
    /* XXX should get these from DT */
    /* UART */
    gic_route_irq(37, 0, 1u << smp_processor_id(), 0xa0);
}

void __init release_irq(unsigned int irq)
{
    struct irq_desc *desc;
    unsigned long flags;
   struct irqaction *action;

    desc = irq_to_desc(irq);

    spin_lock_irqsave(&desc->lock,flags);
    action = desc->action;
    desc->action  = NULL;
    desc->status |= IRQ_DISABLED;

    spin_lock(&gic.lock);
    desc->handler->shutdown(desc);
    spin_unlock(&gic.lock);

    spin_unlock_irqrestore(&desc->lock,flags);

    /* Wait to make sure it's not being used on another CPU */
    do { smp_mb(); } while ( desc->status & IRQ_INPROGRESS );

    if (action && action->free_on_release)
        xfree(action);
}

static int __setup_irq(struct irq_desc *desc, unsigned int irq,
                       struct irqaction *new)
{
    if ( desc->action != NULL )
        return -EBUSY;

    desc->action  = new;
    desc->status &= ~IRQ_DISABLED;
    dsb();

    desc->handler->startup(desc);

    return 0;
}

int __init setup_irq(unsigned int irq, struct irqaction *new)
{
    int rc;
    unsigned long flags;
    struct irq_desc *desc;

    desc = irq_to_desc(irq);

    spin_lock_irqsave(&desc->lock, flags);

    rc = __setup_irq(desc, irq, new);

    spin_unlock_irqrestore(&desc->lock, flags);

    return rc;
}

static inline void gic_set_lr(int lr, unsigned int virtual_irq,
        unsigned int state, unsigned int priority)
{
    int maintenance_int = GICH_LR_MAINTENANCE_IRQ;

    BUG_ON(lr > nr_lrs);

    GICH[GICH_LR + lr] = state |
        maintenance_int |
        ((priority >> 3) << GICH_LR_PRIORITY_SHIFT) |
        ((virtual_irq & GICH_LR_VIRTUAL_MASK) << GICH_LR_VIRTUAL_SHIFT);
}

void gic_set_guest_irq(struct vcpu *v, unsigned int virtual_irq,
        unsigned int state, unsigned int priority)
{
    int i;
    struct pending_irq *iter, *n;
    unsigned long flags;

    spin_lock_irqsave(&gic.lock, flags);

    if ( v->is_running && list_empty(&v->arch.vgic.lr_pending) )
    {
        i = find_first_zero_bit(&this_cpu(lr_mask), nr_lrs);
        if (i < nr_lrs) {
            set_bit(i, &this_cpu(lr_mask));
            gic_set_lr(i, virtual_irq, state, priority);
            goto out;
        }
    }

    n = irq_to_pending(v, virtual_irq);
    if ( !list_empty(&n->lr_queue) )
        goto out;

    list_for_each_entry ( iter, &v->arch.vgic.lr_pending, lr_queue )
    {
        if ( iter->priority > priority )
        {
            list_add_tail(&n->lr_queue, &iter->lr_queue);
            goto out;
        }
    }
    list_add_tail(&n->lr_queue, &v->arch.vgic.lr_pending);

out:
    spin_unlock_irqrestore(&gic.lock, flags);
    return;
}

static void gic_restore_pending_irqs(struct vcpu *v)
{
    int i;
    struct pending_irq *p, *t;

    list_for_each_entry_safe ( p, t, &v->arch.vgic.lr_pending, lr_queue )
    {
        i = find_first_zero_bit(&this_cpu(lr_mask), nr_lrs);
        if ( i >= nr_lrs ) return;

        spin_lock_irq(&gic.lock);
        gic_set_lr(i, p->irq, GICH_LR_PENDING, p->priority);
        list_del_init(&p->lr_queue);
        set_bit(i, &this_cpu(lr_mask));
        spin_unlock_irq(&gic.lock);
    }

}

static void gic_inject_irq_start(void)
{
    uint32_t hcr;
    hcr = READ_CP32(HCR);
    WRITE_CP32(hcr | HCR_VI, HCR);
    isb();
}

static void gic_inject_irq_stop(void)
{
    uint32_t hcr;
    hcr = READ_CP32(HCR);
    if (hcr & HCR_VI) {
        WRITE_CP32(hcr & ~HCR_VI, HCR);
        isb();
    }
}

void gic_inject(void)
{
    if (!this_cpu(lr_mask))
        gic_inject_irq_stop();
    else
        gic_inject_irq_start();
}

int gic_route_irq_to_guest(struct domain *d, unsigned int irq,
                           const char * devname)
{
    struct irqaction *action;
    struct irq_desc *desc = irq_to_desc(irq);
    unsigned long flags;
    int retval;

    action = xmalloc(struct irqaction);
    if (!action)
        return -ENOMEM;

    action->dev_id = d;
    action->name = devname;

    spin_lock_irqsave(&desc->lock, flags);
    spin_lock(&gic.lock);

    desc->handler = &gic_guest_irq_type;
    desc->status |= IRQ_GUEST;

    gic_set_irq_properties(irq, 1, 1u << smp_processor_id(), 0xa0);

    retval = __setup_irq(desc, irq, action);
    if (retval) {
        xfree(action);
        goto out;
    }

out:
    spin_unlock(&gic.lock);
    spin_unlock_irqrestore(&desc->lock, flags);
    return retval;
}

/* Accept an interrupt from the GIC and dispatch its handler */
void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
{
    uint32_t intack;
    unsigned int irq;


    do  {
        intack = GICC[GICC_IAR];
        irq = intack & GICC_IA_IRQ;
        local_irq_enable();

        if (likely(irq < 1021))
            do_IRQ(regs, irq, is_fiq);
        else
            break;

        local_irq_disable();
    } while (1);
}

int gicv_setup(struct domain *d)
{
    /* map the gic virtual cpu interface in the gic cpu interface region of
     * the guest */
    return map_mmio_regions(d, gic.cbase,
                        gic.cbase + (2 * PAGE_SIZE) - 1,
                        gic.vbase);
}

static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
{
    int i = 0, virq;
    uint32_t lr;
    struct vcpu *v = current;
    uint64_t eisr = GICH[GICH_EISR0] | (((uint64_t) GICH[GICH_EISR1]) << 32);

    while ((i = find_next_bit((const long unsigned int *) &eisr,
                              64, i)) < 64) {
        struct pending_irq *p;

        spin_lock_irq(&gic.lock);
        lr = GICH[GICH_LR + i];
        virq = lr & GICH_LR_VIRTUAL_MASK;
        GICH[GICH_LR + i] = 0;
        clear_bit(i, &this_cpu(lr_mask));

        if ( !list_empty(&v->arch.vgic.lr_pending) ) {
            p = list_entry(v->arch.vgic.lr_pending.next, typeof(*p), lr_queue);
            gic_set_lr(i, p->irq, GICH_LR_PENDING, p->priority);
            list_del_init(&p->lr_queue);
            set_bit(i, &this_cpu(lr_mask));
        } else {
            gic_inject_irq_stop();
        }
        spin_unlock_irq(&gic.lock);

        spin_lock_irq(&v->arch.vgic.lock);
        p = irq_to_pending(v, virq);
        if ( p->desc != NULL ) {
            p->desc->status &= ~IRQ_INPROGRESS;
            GICC[GICC_DIR] = virq;
        }
        list_del_init(&p->inflight);
        spin_unlock_irq(&v->arch.vgic.lock);

        i++;
    }
}

void __cpuinit init_maintenance_interrupt(void)
{
    request_irq(25, maintenance_interrupt, 0, "irq-maintenance", NULL);
}

/*
 * Local variables:
 * mode: C
 * c-set-style: "BSD"
 * c-basic-offset: 4
 * indent-tabs-mode: nil
 * End:
 */