Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141934656
D19871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19871.diff
View Options
Index: head/sys/arm/arm/generic_timer.c
===================================================================
--- head/sys/arm/arm/generic_timer.c
+++ head/sys/arm/arm/generic_timer.c
@@ -393,7 +393,7 @@
pcell_t clock;
#endif
int error;
- int i;
+ int i, first_timer, last_timer;
sc = device_get_softc(dev);
if (arm_tmr_sc)
@@ -433,17 +433,25 @@
return (ENXIO);
}
-#ifdef __arm__
- sc->physical = true;
-#else /* __aarch64__ */
- /* If we do not have a virtual timer use the physical. */
- sc->physical = (sc->res[2] == NULL) ? true : false;
+#ifdef __aarch64__
+ /* Use the virtual timer if we have one. */
+ if (sc->res[2] != NULL) {
+ sc->physical = false;
+ first_timer = 2;
+ last_timer = 2;
+ } else
#endif
+ /* Otherwise set up the secure and non-secure physical timers. */
+ {
+ sc->physical = true;
+ first_timer = 0;
+ last_timer = 1;
+ }
arm_tmr_sc = sc;
/* Setup secure, non-secure and virtual IRQs handler */
- for (i = 0; i < 3; i++) {
+ for (i = first_timer; i <= last_timer; i++) {
/* If we do not have the interrupt, skip it. */
if (sc->res[i] == NULL)
continue;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 7:01 AM (7 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27635114
Default Alt Text
D19871.diff (1 KB)
Attached To
Mode
D19871: Only set up the interrupts that will actually be used in arm generic_timer.
Attached
Detach File
Event Timeline
Log In to Comment