From: Michael Neumann Date: Sat, 7 Jun 2008 12:03:52 +0000 (+0000) Subject: Remove unnecessary conversion to kilobytes (divide by 1024) to then later X-Git-Tag: v2.0.1~458 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/c0c5de70e168dedd5ea96e662c5b20ec1c594e92 Remove unnecessary conversion to kilobytes (divide by 1024) to then later multiply it again by 1024 to get to bytes. --- diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index 25a26b56f8..732fbcd839 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.131 2008/04/21 15:47:55 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.132 2008/06/07 12:03:52 mneumann Exp $ */ #include "use_apm.h" @@ -1651,7 +1651,7 @@ physmap_done: #ifdef SMP /* make hole for AP bootstrap code YYY */ - physmap[1] = mp_bootaddress(physmap[1] / 1024); + physmap[1] = mp_bootaddress(physmap[1]); /* look for the MP hardware - needed for apic addresses */ mp_probe(); diff --git a/sys/platform/pc32/i386/mp_machdep.c b/sys/platform/pc32/i386/mp_machdep.c index 445247c56d..570f59a2c2 100644 --- a/sys/platform/pc32/i386/mp_machdep.c +++ b/sys/platform/pc32/i386/mp_machdep.c @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.115.2.15 2003/03/14 21:22:35 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/i386/mp_machdep.c,v 1.59 2008/01/05 14:02:41 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/i386/mp_machdep.c,v 1.60 2008/06/07 12:03:52 mneumann Exp $ */ #include "opt_cpu.h" @@ -311,7 +311,7 @@ mp_bootaddress(u_int basemem) { POSTCODE(MP_BOOTADDRESS_POST); - base_memory = basemem * 1024; /* convert to bytes */ + base_memory = basemem; boot_address = base_memory & ~0xfff; /* round down to 4k boundary */ if ((base_memory - boot_address) < bootMP_size)