gic.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /*
  2. * linux/arch/arm/common/gic.c
  3. *
  4. * Copyright (C) 2002 ARM Limited, All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Interrupt architecture for the GIC:
  11. *
  12. * o There is one Interrupt Distributor, which receives interrupts
  13. * from system devices and sends them to the Interrupt Controllers.
  14. *
  15. * o There is one CPU Interface per CPU, which sends interrupts sent
  16. * by the Distributor, and interrupts generated locally, to the
  17. * associated CPU. The base address of the CPU interface is usually
  18. * aliased so that the same address points to different chips depending
  19. * on the CPU it is accessed from.
  20. *
  21. * Note that IRQs 0-31 are special - they are local to each CPU.
  22. * As such, the enable set/clear, pending set/clear and active bit
  23. * registers are banked per-cpu for these sources.
  24. */
  25. #include <linux/init.h>
  26. #include <linux/kernel.h>
  27. #include <linux/export.h>
  28. #include <linux/list.h>
  29. #include <linux/smp.h>
  30. #include <linux/cpu_pm.h>
  31. #include <linux/cpumask.h>
  32. #include <linux/io.h>
  33. #include <linux/irqdomain.h>
  34. #include <linux/interrupt.h>
  35. #include <linux/percpu.h>
  36. #include <linux/slab.h>
  37. #include <asm/irq.h>
  38. #include <asm/mach/irq.h>
  39. #include <asm/hardware/gic.h>
  40. static DEFINE_SPINLOCK(irq_controller_lock);
  41. /* Address of GIC 0 CPU interface */
  42. void __iomem *gic_cpu_base_addr __read_mostly;
  43. /*
  44. * Supported arch specific GIC irq extension.
  45. * Default make them NULL.
  46. */
  47. struct irq_chip gic_arch_extn = {
  48. .irq_eoi = NULL,
  49. .irq_mask = NULL,
  50. .irq_unmask = NULL,
  51. .irq_retrigger = NULL,
  52. .irq_set_type = NULL,
  53. .irq_set_wake = NULL,
  54. };
  55. #ifndef MAX_GIC_NR
  56. #define MAX_GIC_NR 1
  57. #endif
  58. static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;
  59. static inline void __iomem *gic_dist_base(struct irq_data *d)
  60. {
  61. struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
  62. return gic_data->dist_base;
  63. }
  64. static inline void __iomem *gic_cpu_base(struct irq_data *d)
  65. {
  66. struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
  67. return gic_data->cpu_base;
  68. }
  69. static inline unsigned int gic_irq(struct irq_data *d)
  70. {
  71. return d->hwirq;
  72. }
  73. /*
  74. * Routines to acknowledge, disable and enable interrupts
  75. */
  76. static void gic_mask_irq(struct irq_data *d)
  77. {
  78. u32 mask = 1 << (gic_irq(d) % 32);
  79. spin_lock(&irq_controller_lock);
  80. writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
  81. if (gic_arch_extn.irq_mask)
  82. gic_arch_extn.irq_mask(d);
  83. spin_unlock(&irq_controller_lock);
  84. }
  85. static void gic_unmask_irq(struct irq_data *d)
  86. {
  87. u32 mask = 1 << (gic_irq(d) % 32);
  88. spin_lock(&irq_controller_lock);
  89. if (gic_arch_extn.irq_unmask)
  90. gic_arch_extn.irq_unmask(d);
  91. writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
  92. spin_unlock(&irq_controller_lock);
  93. }
  94. static void gic_eoi_irq(struct irq_data *d)
  95. {
  96. if (gic_arch_extn.irq_eoi) {
  97. spin_lock(&irq_controller_lock);
  98. gic_arch_extn.irq_eoi(d);
  99. spin_unlock(&irq_controller_lock);
  100. }
  101. writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
  102. }
  103. static int gic_set_type(struct irq_data *d, unsigned int type)
  104. {
  105. void __iomem *base = gic_dist_base(d);
  106. unsigned int gicirq = gic_irq(d);
  107. u32 enablemask = 1 << (gicirq % 32);
  108. u32 enableoff = (gicirq / 32) * 4;
  109. u32 confmask = 0x2 << ((gicirq % 16) * 2);
  110. u32 confoff = (gicirq / 16) * 4;
  111. bool enabled = false;
  112. u32 val;
  113. /* Interrupt configuration for SGIs can't be changed */
  114. if (gicirq < 16)
  115. return -EINVAL;
  116. if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING)
  117. return -EINVAL;
  118. spin_lock(&irq_controller_lock);
  119. if (gic_arch_extn.irq_set_type)
  120. gic_arch_extn.irq_set_type(d, type);
  121. val = readl_relaxed(base + GIC_DIST_CONFIG + confoff);
  122. if (type == IRQ_TYPE_LEVEL_HIGH)
  123. val &= ~confmask;
  124. else if (type == IRQ_TYPE_EDGE_RISING)
  125. val |= confmask;
  126. /*
  127. * As recommended by the spec, disable the interrupt before changing
  128. * the configuration
  129. */
  130. if (readl_relaxed(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) {
  131. writel_relaxed(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff);
  132. enabled = true;
  133. }
  134. writel_relaxed(val, base + GIC_DIST_CONFIG + confoff);
  135. if (enabled)
  136. writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff);
  137. spin_unlock(&irq_controller_lock);
  138. return 0;
  139. }
  140. static int gic_retrigger(struct irq_data *d)
  141. {
  142. if (gic_arch_extn.irq_retrigger)
  143. return gic_arch_extn.irq_retrigger(d);
  144. return -ENXIO;
  145. }
  146. #ifdef CONFIG_SMP
  147. static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
  148. bool force)
  149. {
  150. void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
  151. unsigned int shift = (gic_irq(d) % 4) * 8;
  152. unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
  153. u32 val, mask, bit;
  154. if (cpu >= 8 || cpu >= nr_cpu_ids)
  155. return -EINVAL;
  156. mask = 0xff << shift;
  157. bit = 1 << (cpu_logical_map(cpu) + shift);
  158. spin_lock(&irq_controller_lock);
  159. val = readl_relaxed(reg) & ~mask;
  160. writel_relaxed(val | bit, reg);
  161. spin_unlock(&irq_controller_lock);
  162. return IRQ_SET_MASK_OK;
  163. }
  164. #endif
  165. #ifdef CONFIG_PM
  166. static int gic_set_wake(struct irq_data *d, unsigned int on)
  167. {
  168. int ret = -ENXIO;
  169. if (gic_arch_extn.irq_set_wake)
  170. ret = gic_arch_extn.irq_set_wake(d, on);
  171. return ret;
  172. }
  173. #else
  174. #define gic_set_wake NULL
  175. #endif
  176. static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
  177. {
  178. struct gic_chip_data *chip_data = irq_get_handler_data(irq);
  179. struct irq_chip *chip = irq_get_chip(irq);
  180. unsigned int cascade_irq, gic_irq;
  181. unsigned long status;
  182. chained_irq_enter(chip, desc);
  183. spin_lock(&irq_controller_lock);
  184. status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK);
  185. spin_unlock(&irq_controller_lock);
  186. gic_irq = (status & 0x3ff);
  187. if (gic_irq == 1023)
  188. goto out;
  189. cascade_irq = irq_domain_to_irq(&chip_data->domain, gic_irq);
  190. if (unlikely(gic_irq < 32 || gic_irq > 1020 || cascade_irq >= NR_IRQS))
  191. do_bad_IRQ(cascade_irq, desc);
  192. else
  193. generic_handle_irq(cascade_irq);
  194. out:
  195. chained_irq_exit(chip, desc);
  196. }
  197. static struct irq_chip gic_chip = {
  198. .name = "GIC",
  199. .irq_mask = gic_mask_irq,
  200. .irq_unmask = gic_unmask_irq,
  201. .irq_eoi = gic_eoi_irq,
  202. .irq_set_type = gic_set_type,
  203. .irq_retrigger = gic_retrigger,
  204. #ifdef CONFIG_SMP
  205. .irq_set_affinity = gic_set_affinity,
  206. #endif
  207. .irq_set_wake = gic_set_wake,
  208. };
  209. void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)
  210. {
  211. if (gic_nr >= MAX_GIC_NR)
  212. BUG();
  213. if (irq_set_handler_data(irq, &gic_data[gic_nr]) != 0)
  214. BUG();
  215. irq_set_chained_handler(irq, gic_handle_cascade_irq);
  216. }
  217. static void __init gic_dist_init(struct gic_chip_data *gic)
  218. {
  219. unsigned int i, irq;
  220. u32 cpumask;
  221. unsigned int gic_irqs = gic->gic_irqs;
  222. struct irq_domain *domain = &gic->domain;
  223. void __iomem *base = gic->dist_base;
  224. u32 cpu = 0;
  225. #ifdef CONFIG_SMP
  226. cpu = cpu_logical_map(smp_processor_id());
  227. #endif
  228. cpumask = 1 << cpu;
  229. cpumask |= cpumask << 8;
  230. cpumask |= cpumask << 16;
  231. writel_relaxed(0, base + GIC_DIST_CTRL);
  232. /*
  233. * Set all global interrupts to be level triggered, active low.
  234. */
  235. for (i = 32; i < gic_irqs; i += 16)
  236. writel_relaxed(0, base + GIC_DIST_CONFIG + i * 4 / 16);
  237. /*
  238. * Set all global interrupts to this CPU only.
  239. */
  240. for (i = 32; i < gic_irqs; i += 4)
  241. writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);
  242. /*
  243. * Set priority on all global interrupts.
  244. */
  245. for (i = 32; i < gic_irqs; i += 4)
  246. writel_relaxed(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4);
  247. /*
  248. * Disable all interrupts. Leave the PPI and SGIs alone
  249. * as these enables are banked registers.
  250. */
  251. for (i = 32; i < gic_irqs; i += 32)
  252. writel_relaxed(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32);
  253. /*
  254. * Setup the Linux IRQ subsystem.
  255. */
  256. irq_domain_for_each_irq(domain, i, irq) {
  257. if (i < 32) {
  258. irq_set_percpu_devid(irq);
  259. irq_set_chip_and_handler(irq, &gic_chip,
  260. handle_percpu_devid_irq);
  261. set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
  262. } else {
  263. irq_set_chip_and_handler(irq, &gic_chip,
  264. handle_fasteoi_irq);
  265. set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
  266. }
  267. irq_set_chip_data(irq, gic);
  268. }
  269. writel_relaxed(1, base + GIC_DIST_CTRL);
  270. }
  271. static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
  272. {
  273. void __iomem *dist_base = gic->dist_base;
  274. void __iomem *base = gic->cpu_base;
  275. int i;
  276. /*
  277. * Deal with the banked PPI and SGI interrupts - disable all
  278. * PPI interrupts, ensure all SGI interrupts are enabled.
  279. */
  280. writel_relaxed(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR);
  281. writel_relaxed(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET);
  282. /*
  283. * Set priority on PPI and SGI interrupts
  284. */
  285. for (i = 0; i < 32; i += 4)
  286. writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4);
  287. writel_relaxed(0xf0, base + GIC_CPU_PRIMASK);
  288. writel_relaxed(1, base + GIC_CPU_CTRL);
  289. }
  290. #ifdef CONFIG_CPU_PM
  291. /*
  292. * Saves the GIC distributor registers during suspend or idle. Must be called
  293. * with interrupts disabled but before powering down the GIC. After calling
  294. * this function, no interrupts will be delivered by the GIC, and another
  295. * platform-specific wakeup source must be enabled.
  296. */
  297. static void gic_dist_save(unsigned int gic_nr)
  298. {
  299. unsigned int gic_irqs;
  300. void __iomem *dist_base;
  301. int i;
  302. if (gic_nr >= MAX_GIC_NR)
  303. BUG();
  304. gic_irqs = gic_data[gic_nr].gic_irqs;
  305. dist_base = gic_data[gic_nr].dist_base;
  306. if (!dist_base)
  307. return;
  308. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++)
  309. gic_data[gic_nr].saved_spi_conf[i] =
  310. readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4);
  311. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++)
  312. gic_data[gic_nr].saved_spi_target[i] =
  313. readl_relaxed(dist_base + GIC_DIST_TARGET + i * 4);
  314. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++)
  315. gic_data[gic_nr].saved_spi_enable[i] =
  316. readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
  317. }
  318. /*
  319. * Restores the GIC distributor registers during resume or when coming out of
  320. * idle. Must be called before enabling interrupts. If a level interrupt
  321. * that occured while the GIC was suspended is still present, it will be
  322. * handled normally, but any edge interrupts that occured will not be seen by
  323. * the GIC and need to be handled by the platform-specific wakeup source.
  324. */
  325. static void gic_dist_restore(unsigned int gic_nr)
  326. {
  327. unsigned int gic_irqs;
  328. unsigned int i;
  329. void __iomem *dist_base;
  330. if (gic_nr >= MAX_GIC_NR)
  331. BUG();
  332. gic_irqs = gic_data[gic_nr].gic_irqs;
  333. dist_base = gic_data[gic_nr].dist_base;
  334. if (!dist_base)
  335. return;
  336. writel_relaxed(0, dist_base + GIC_DIST_CTRL);
  337. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++)
  338. writel_relaxed(gic_data[gic_nr].saved_spi_conf[i],
  339. dist_base + GIC_DIST_CONFIG + i * 4);
  340. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++)
  341. writel_relaxed(0xa0a0a0a0,
  342. dist_base + GIC_DIST_PRI + i * 4);
  343. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++)
  344. writel_relaxed(gic_data[gic_nr].saved_spi_target[i],
  345. dist_base + GIC_DIST_TARGET + i * 4);
  346. for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++)
  347. writel_relaxed(gic_data[gic_nr].saved_spi_enable[i],
  348. dist_base + GIC_DIST_ENABLE_SET + i * 4);
  349. writel_relaxed(1, dist_base + GIC_DIST_CTRL);
  350. }
  351. static void gic_cpu_save(unsigned int gic_nr)
  352. {
  353. int i;
  354. u32 *ptr;
  355. void __iomem *dist_base;
  356. void __iomem *cpu_base;
  357. if (gic_nr >= MAX_GIC_NR)
  358. BUG();
  359. dist_base = gic_data[gic_nr].dist_base;
  360. cpu_base = gic_data[gic_nr].cpu_base;
  361. if (!dist_base || !cpu_base)
  362. return;
  363. ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
  364. for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
  365. ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
  366. ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
  367. for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
  368. ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4);
  369. }
  370. static void gic_cpu_restore(unsigned int gic_nr)
  371. {
  372. int i;
  373. u32 *ptr;
  374. void __iomem *dist_base;
  375. void __iomem *cpu_base;
  376. if (gic_nr >= MAX_GIC_NR)
  377. BUG();
  378. dist_base = gic_data[gic_nr].dist_base;
  379. cpu_base = gic_data[gic_nr].cpu_base;
  380. if (!dist_base || !cpu_base)
  381. return;
  382. ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
  383. for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
  384. writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4);
  385. ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
  386. for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
  387. writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4);
  388. for (i = 0; i < DIV_ROUND_UP(32, 4); i++)
  389. writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4);
  390. writel_relaxed(0xf0, cpu_base + GIC_CPU_PRIMASK);
  391. writel_relaxed(1, cpu_base + GIC_CPU_CTRL);
  392. }
  393. static int gic_notifier(struct notifier_block *self, unsigned long cmd, void *v)
  394. {
  395. int i;
  396. for (i = 0; i < MAX_GIC_NR; i++) {
  397. switch (cmd) {
  398. case CPU_PM_ENTER:
  399. gic_cpu_save(i);
  400. break;
  401. case CPU_PM_ENTER_FAILED:
  402. case CPU_PM_EXIT:
  403. gic_cpu_restore(i);
  404. break;
  405. case CPU_CLUSTER_PM_ENTER:
  406. gic_dist_save(i);
  407. break;
  408. case CPU_CLUSTER_PM_ENTER_FAILED:
  409. case CPU_CLUSTER_PM_EXIT:
  410. gic_dist_restore(i);
  411. break;
  412. }
  413. }
  414. return NOTIFY_OK;
  415. }
  416. static struct notifier_block gic_notifier_block = {
  417. .notifier_call = gic_notifier,
  418. };
  419. static void __init gic_pm_init(struct gic_chip_data *gic)
  420. {
  421. gic->saved_ppi_enable = __alloc_percpu(DIV_ROUND_UP(32, 32) * 4,
  422. sizeof(u32));
  423. BUG_ON(!gic->saved_ppi_enable);
  424. gic->saved_ppi_conf = __alloc_percpu(DIV_ROUND_UP(32, 16) * 4,
  425. sizeof(u32));
  426. BUG_ON(!gic->saved_ppi_conf);
  427. cpu_pm_register_notifier(&gic_notifier_block);
  428. }
  429. #else
  430. static void __init gic_pm_init(struct gic_chip_data *gic)
  431. {
  432. }
  433. #endif
  434. const struct irq_domain_ops gic_irq_domain_ops = {
  435. };
  436. void __init gic_init(unsigned int gic_nr, unsigned int irq_start,
  437. void __iomem *dist_base, void __iomem *cpu_base)
  438. {
  439. struct gic_chip_data *gic;
  440. struct irq_domain *domain;
  441. int gic_irqs;
  442. BUG_ON(gic_nr >= MAX_GIC_NR);
  443. gic = &gic_data[gic_nr];
  444. domain = &gic->domain;
  445. gic->dist_base = dist_base;
  446. gic->cpu_base = cpu_base;
  447. /*
  448. * For primary GICs, skip over SGIs.
  449. * For secondary GICs, skip over PPIs, too.
  450. */
  451. if (gic_nr == 0) {
  452. gic_cpu_base_addr = cpu_base;
  453. domain->hwirq_base = 16;
  454. irq_start = (irq_start & ~31) + 16;
  455. } else
  456. domain->hwirq_base = 32;
  457. /*
  458. * Find out how many interrupts are supported.
  459. * The GIC only supports up to 1020 interrupt sources.
  460. */
  461. gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f;
  462. gic_irqs = (gic_irqs + 1) * 32;
  463. if (gic_irqs > 1020)
  464. gic_irqs = 1020;
  465. gic->gic_irqs = gic_irqs;
  466. domain->nr_irq = gic_irqs - domain->hwirq_base;
  467. domain->irq_base = irq_alloc_descs(-1, irq_start, domain->nr_irq,
  468. numa_node_id());
  469. domain->priv = gic;
  470. domain->ops = &gic_irq_domain_ops;
  471. irq_domain_add(domain);
  472. gic_chip.flags |= gic_arch_extn.flags;
  473. gic_dist_init(gic);
  474. gic_cpu_init(gic);
  475. gic_pm_init(gic);
  476. }
  477. void __cpuinit gic_secondary_init(unsigned int gic_nr)
  478. {
  479. BUG_ON(gic_nr >= MAX_GIC_NR);
  480. gic_cpu_init(&gic_data[gic_nr]);
  481. }
  482. #ifdef CONFIG_SMP
  483. void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
  484. {
  485. int cpu;
  486. unsigned long map = 0;
  487. /* Convert our logical CPU mask into a physical one. */
  488. for_each_cpu(cpu, mask)
  489. map |= 1 << cpu_logical_map(cpu);
  490. /*
  491. * Ensure that stores to Normal memory are visible to the
  492. * other CPUs before issuing the IPI.
  493. */
  494. dsb();
  495. /* this always happens on GIC0 */
  496. writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
  497. }
  498. #endif