gicv3: Use the correct mask

Mask off the bits we'll be setting, rather than retaining only those
bits.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2024-11-21 17:04:00 -07:00
parent e6ec41fa86
commit 56043cbfdd

View File

@ -444,7 +444,7 @@ gicv3_its_table_page_size(struct gicv3_its_softc *sc, int table)
reg = gic_its_read_8(sc, GITS_BASER(table));
while (1) {
reg &= GITS_BASER_PSZ_MASK;
reg &= ~GITS_BASER_PSZ_MASK;
switch (page_size) {
case PAGE_SIZE_4K: /* 4KB */
reg |= GITS_BASER_PSZ_4K << GITS_BASER_PSZ_SHIFT;