From: miod Date: Tue, 16 Jun 2015 18:28:51 +0000 (+0000) Subject: alloc_contiguous_pages() is supposed to round the allocation size to a page X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=95e992d0d7d7f899b3317b2c08c953747cc88323;p=openbsd alloc_contiguous_pages() is supposed to round the allocation size to a page boundary, not to an u area boundary. Oops. --- diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c index 88f3e35e0da..43eca293aa7 100644 --- a/sys/arch/mips64/mips64/cpu.c +++ b/sys/arch/mips64/mips64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.57 2015/02/11 05:25:15 miod Exp $ */ +/* $OpenBSD: cpu.c,v 1.58 2015/06/16 18:28:51 miod Exp $ */ /* * Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se) @@ -456,7 +456,7 @@ alloc_contiguous_pages(size_t size) paddr_t pa; TAILQ_INIT(&mlist); - error = uvm_pglistalloc(roundup(size, USPACE), 0, (paddr_t)-1, 0, 0, + error = uvm_pglistalloc(round_page(size), 0, (paddr_t)-1, 0, 0, &mlist, 1, UVM_PLA_NOWAIT | UVM_PLA_ZERO); if (error) return 0;