| ce2b49b8 | 20-Jan-2021 |
Heyi Guo <guoheyi@linux.alibaba.com> |
refactor(gicv3): use helper functions to get SPI/ESPI INTID limit
Use helper functions to get SPI and ESPI INTID limit, to remove several pieces of similar code in gicv3 driver.
Signed-off-by: Heyi
refactor(gicv3): use helper functions to get SPI/ESPI INTID limit
Use helper functions to get SPI and ESPI INTID limit, to remove several pieces of similar code in gicv3 driver.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: Iaf441fe5e333c4260e7f6d98df6fdd931591976d
show more ...
|
| 612b4a3f | 19-May-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: also shift eSPI register offset in GICD_OFFSET_64()
ESPI register offset should also be shifted right by REG##R_SHIFT to keep consistent.
It is not a functional issue, for GICD_OFFSE
drivers/gicv3: also shift eSPI register offset in GICD_OFFSET_64()
ESPI register offset should also be shifted right by REG##R_SHIFT to keep consistent.
It is not a functional issue, for GICD_OFFSET_64() is only used for GICD_IROUTER<E>, and IROUTER_SHIFT is 0.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I76eee5c50e4300890e78e80bddde135ce88daa2d
show more ...
|
| 705032de | 21-Jan-2021 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: add debug log for maximum INTID of SPI and eSPI
Add debug log for the maximum supported INTID of SPI and eSPI on the current GIC implementation.
Signed-off-by: Heyi Guo <guoheyi@linu
drivers/gicv3: add debug log for maximum INTID of SPI and eSPI
Add debug log for the maximum supported INTID of SPI and eSPI on the current GIC implementation.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: Ie45ab1d85b39658c4ca4bc54ee433ac44e41d03f
show more ...
|
| 4e42c227 | 19-May-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: limit SPI ID to avoid misjudgement in GICD_OFFSET()
The GICv3 architecture allows GICD_TYPER.ITLinesNumber to be 31, so the maximum possible value for num_ints is 1024. The value must
drivers/gicv3: limit SPI ID to avoid misjudgement in GICD_OFFSET()
The GICv3 architecture allows GICD_TYPER.ITLinesNumber to be 31, so the maximum possible value for num_ints is 1024. The value must be limited to (MAX_SPI_ID + 1), or GICD_OFFSET() will consider it as ESPI INTID and return wrong register address.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: Iddcb83d3e5d241b39f4176c19c2bceaa2c3dd653
show more ...
|
| 69ae4427 | 19-May-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: fix logical issue for num_eints
In function gicv3_spis_config_defaults(), the variable num_ints is set to (maximum SPI INTID + 1), while num_eints is set to (maximum ESPI INTID). It i
drivers/gicv3: fix logical issue for num_eints
In function gicv3_spis_config_defaults(), the variable num_ints is set to (maximum SPI INTID + 1), while num_eints is set to (maximum ESPI INTID). It introduces not only inconsistency to the code, but also logical bug in the "for" loops, for the INTID of num_eints is also valid and the check should be inclusive.
Fix this by setting num_eints to (maximum ESPI INTID + 1) as well.
Fix similar issues in gicv3_distif_save() and gicv3_distif_init_restore().
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I4425777d17e84e85f38853603340bd348640154f
show more ...
|
| deb18901 | 14-Jan-2021 |
Heyi Guo <guoheyi@linux.alibaba.com> |
drivers/gicv3: fix potential GICD context override with ESPI enabled
RESTORE/SAVE_GICD_EREGS uses (int_id - (MIN_ESPI_ID - MIN_SPI_ID)) to get the context array index for ESPI, which will override t
drivers/gicv3: fix potential GICD context override with ESPI enabled
RESTORE/SAVE_GICD_EREGS uses (int_id - (MIN_ESPI_ID - MIN_SPI_ID)) to get the context array index for ESPI, which will override the space of standard SPI starting from (MIN_SPI_ID + MIN_SPI_ID).
However, using TOTAL_SPI_INTR_NUM to replace the above MIN_SPI_ID cannot totally fix the issue, for TOTAL_SPI_INTR_NUM is not well aligned and the array index will be rounded down by the shifting operation if being shifted more than 2 bits. It will cause buffer override again when the existing maximum SPI reaches 1019.
So round up TOTAL_SPI_INTR_NUM with (1 << REG##R_SHIFT) for GICD context arrays.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I5be2837c42f381a62f8d46a4ecd778009b1fe059
show more ...
|