Page MenuHomeFreeBSD

D6203.id15895.diff
No OneTemporary

D6203.id15895.diff

Index: head/sys/arm/arm/generic_timer.c
===================================================================
--- head/sys/arm/arm/generic_timer.c
+++ head/sys/arm/arm/generic_timer.c
@@ -100,7 +100,7 @@
static struct resource_spec timer_spec[] = {
{ SYS_RES_IRQ, 0, RF_ACTIVE }, /* Secure */
{ SYS_RES_IRQ, 1, RF_ACTIVE }, /* Non-secure */
- { SYS_RES_IRQ, 2, RF_ACTIVE }, /* Virt */
+ { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, /* Virt */
{ SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, /* Hyp */
{ -1, 0 }
};
@@ -392,13 +392,17 @@
#ifdef __arm__
sc->physical = true;
#else /* __aarch64__ */
- sc->physical = false;
+ /* If we do not have a virtual timer use the physical. */
+ sc->physical = (sc->res[2] == NULL) ? true : false;
#endif
arm_tmr_sc = sc;
/* Setup secure, non-secure and virtual IRQs handler */
for (i = 0; i < 3; i++) {
+ /* If we do not have the interrupt, skip it. */
+ if (sc->res[i] == NULL)
+ continue;
error = bus_setup_intr(dev, sc->res[i], INTR_TYPE_CLK,
arm_tmr_intr, NULL, sc, &sc->ihl[i]);
if (error) {

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 25, 9:48 PM (17 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37252699
Default Alt Text
D6203.id15895.diff (1 KB)

Event Timeline