diff --git a/sys/dev/agp/agp_sis.c b/sys/dev/agp/agp_sis.c @@ -212,7 +212,7 @@ || aperture > 256*1024*1024) return EINVAL; - gws = ffs(aperture / 4*1024*1024) - 1; + gws = ffs(aperture / (4*1024*1024)) - 1; pci_write_config(dev, AGP_SIS_WINCTRL, ((pci_read_config(dev, AGP_SIS_WINCTRL, 1) & ~0x70)