Expand the pre-existing PPI support to be able to deal with the Extended PPI range (EPPI). This includes obtaining the number of PPIs from each individual redistributor, and compute the minimum set (just in case someone builds something really clever...).
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -124,6 +124,18 @@ · 123 unmodified lines | ||
| 124 | 124 | |
| 125 | 125 | #define GICR_TYPER_CPU_NUMBER(r) (((r) >> 8) & 0xffff) |
| 126 | 126 | |
| 127 | +#define EPPI_BASE_INTID 1056 | |
| 128 | + | |
| 129 | +#define GICR_TYPER_NR_PPIS(r) \ | |
| 130 | + ({ \ | |
| 131 | + unsigned int __ppinum = ((r) >> 27) & 0x1f; \ | |
| 132 | + unsigned int __nr_ppis = 16; \ | |
| 133 | + if (__ppinum == 1 || __ppinum == 2) \ | |
| 134 | + __nr_ppis += __ppinum * 32; \ | |
| 135 | + \ | |
| 136 | + __nr_ppis; \ | |
| 137 | + }) | |
| 138 | + | |
| 127 | 139 | #define GICR_WAKER_ProcessorSleep (1U << 1) |
| 128 | 140 | #define GICR_WAKER_ChildrenAsleep (1U << 2) |
| 129 | 141 | |