-/* $OpenBSD: mainbus.c,v 1.90 2022/03/13 08:04:38 mpi Exp $ */
+/* $OpenBSD: mainbus.c,v 1.91 2024/02/07 20:32:54 miod Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
vsize_t len;
#ifdef BTLBDEBUG
- printf("bus_mem_add_mapping(%x,%x,%scachable,%p)\n",
+ printf("bus_mem_add_mapping(%lx,%lx,%scachable,%p)\n",
bpa, size, flags? "" : "non", bshp);
#endif
size -= min(size, HPPA_FLEX_SIZE - (pa - spa));
/* do need a new mapping? */
- if (!(bmm[flex / 32] & (1 << (flex % 32)))) {
+ if (!(bmm[flex / 32] & (1U << (flex % 32)))) {
#ifdef BTLBDEBUG
printf("bus_mem_add_mapping: adding flex=%x "
- "%x-%x, ", flex, spa, epa - 1);
+ "%lx-%lx, ", flex, spa, epa - 1);
#endif
while (spa != epa) {
len = epa - spa;
>= 0) {
pa = spa + len; /* may wrap to 0... */
#ifdef BTLBDEBUG
- printf("--- %x/%x, %x-%x ",
+ printf("--- %x/%lx, %lx-%lx ",
flex, HPPA_FLEX(pa - 1),
spa, pa - 1);
#endif
printf("mask %x ", flex);
#endif
bmm[flex / 32] |=
- (1 << (flex % 32));
+ (1U << (flex % 32));
}
if (len > epa - spa)
spa = epa;
spa = pa;
} else {
#ifdef BTLBDEBUG
- printf("kenter 0x%x-0x%x", spa, epa);
+ printf("kenter 0x%lx-0x%lx", spa, epa);
#endif
for (; spa != epa; spa += PAGE_SIZE)
pmap_kenter_pa(spa, spa,