Use howmany(x, y) rather than roundup(x, y)/y. No binary change.
This commit is contained in:
parent
b954c58e71
commit
636ff16d48
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: amiga_init.c,v 1.104 2009/01/03 07:04:42 tsutsui Exp $ */
|
||||
/* $NetBSD: amiga_init.c,v 1.105 2009/01/04 04:18:35 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
@ -36,7 +36,7 @@
|
||||
#include "opt_devreload.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.104 2009/01/03 07:04:42 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.105 2009/01/04 04:18:35 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -447,10 +447,10 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync,
|
||||
|
||||
/*
|
||||
* Initialize level 1 descriptors. We need:
|
||||
* roundup(nl2desc, SG4_LEV2SIZE) / SG4_LEVEL2SIZE
|
||||
* howmany(nl2desc, SG4_LEV2SIZE)
|
||||
* level 1 descriptors to map the 'nl2desc' level 2's.
|
||||
*/
|
||||
nl1desc = roundup(nl2desc, SG4_LEV2SIZE) / SG4_LEV2SIZE;
|
||||
nl1desc = howmany(nl2desc, SG4_LEV2SIZE);
|
||||
sg = (st_entry_t *)RELOC(Sysseg_pa, u_int);
|
||||
esg = &sg[nl1desc];
|
||||
sg_proto = (paddr_t)&sg[SG4_LEV1SIZE] | SG_U | SG_RW | SG_V;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atari_init.c,v 1.71 2009/01/03 07:11:02 tsutsui Exp $ */
|
||||
/* $NetBSD: atari_init.c,v 1.72 2009/01/04 04:18:36 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.71 2009/01/03 07:11:02 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.72 2009/01/04 04:18:36 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_mbtype.h"
|
||||
@ -1015,10 +1015,10 @@ mmu040_setup(sysseg_pa, kstsize, ptpa, ptsize, sysptmap_pa, kbase)
|
||||
|
||||
/*
|
||||
* Initialize level 1 descriptors. We need:
|
||||
* roundup(nl2desc, SG4_LEV2SIZE) / SG4_LEVEL2SIZE
|
||||
* howmany(nl2desc, SG4_LEV2SIZE)
|
||||
* level 1 descriptors to map the 'nl2desc' level 2's.
|
||||
*/
|
||||
nl1desc = roundup(nl2desc, SG4_LEV2SIZE) / SG4_LEV2SIZE;
|
||||
nl1desc = howmany(nl2desc, SG4_LEV2SIZE);
|
||||
sg = (st_entry_t *)sysseg_pa;
|
||||
esg = &sg[nl1desc];
|
||||
sg_proto = ((paddr_t)&sg[SG4_LEV1SIZE] + kbase) /* relocated PA */
|
||||
|
Loading…
Reference in New Issue
Block a user