git: 90f33f34bace - main - Remove a bogus assertion from the gic drivers

Andrew Turner andrew at FreeBSD.org
Tue Sep 14 19:11:54 UTC 2021


The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=90f33f34baceab33046ee8401153aaafd164bb48

commit 90f33f34baceab33046ee8401153aaafd164bb48
Author:     Andrew Turner <andrew at FreeBSD.org>
AuthorDate: 2021-09-14 19:03:30 +0000
Commit:     Andrew Turner <andrew at FreeBSD.org>
CommitDate: 2021-09-14 19:06:25 +0000

    Remove a bogus assertion from the gic drivers
    
    When setting a message based interrupt range we set the base and count.
    In an earlier the count was implemented as an end value, however the
    asserts used to check this value was correct were incorrectly left in.
    
    Reported by:    emaste
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm/arm/gic.c        | 2 --
 sys/arm64/arm64/gic_v3.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c
index bd34e92b9e28..d7edd7885404 100644
--- a/sys/arm/arm/gic.c
+++ b/sys/arm/arm/gic.c
@@ -538,8 +538,6 @@ arm_gic_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
 	case GIC_IVAR_MBI_COUNT:
 		MPASS(sc->sc_spi_start != 0);
 		MPASS(sc->sc_spi_count == 0);
-		MPASS(value >= sc->sc_spi_start);
-		MPASS(value >= GIC_FIRST_SPI);
 
 		sc->sc_spi_count = value;
 		sc->sc_spi_end = sc->sc_spi_start + sc->sc_spi_count;
diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c
index a53d0b272723..23e1b3632fb8 100644
--- a/sys/arm64/arm64/gic_v3.c
+++ b/sys/arm64/arm64/gic_v3.c
@@ -506,8 +506,6 @@ gic_v3_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
 	case GIC_IVAR_MBI_COUNT:
 		MPASS(sc->gic_mbi_start != 0);
 		MPASS(sc->gic_mbi_end == 0);
-		MPASS(value >= sc->gic_mbi_start);
-		MPASS(value >= GIC_FIRST_SPI);
 
 		sc->gic_mbi_end = value - sc->gic_mbi_start;
 


More information about the dev-commits-src-all mailing list