Sanitize the malloc types: M_PMAP is not used in pmap.c, so don't

define it there. Don't use M_PMAP in mp_machdep.c; define M_SMP
instead.
This commit is contained in:
Marcel Moolenaar 2008-04-19 04:56:16 +00:00
parent 6d294e500e
commit fca1689378
2 changed files with 3 additions and 5 deletions

View File

@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
#include <machine/smp.h>
#include <i386/include/specialreg.h>
MALLOC_DECLARE(M_PMAP);
MALLOC_DEFINE(M_SMP, "SMP", "SMP related allocations");
void ia64_ap_startup(void);
@ -209,7 +209,7 @@ cpu_mp_add(u_int acpiid, u_int apicid, u_int apiceid)
}
if (acpiid != 0) {
pc = (struct pcpu *)malloc(sizeof(*pc), M_PMAP, M_WAITOK);
pc = (struct pcpu *)malloc(sizeof(*pc), M_SMP, M_WAITOK);
pcpu_init(pc, acpiid, sizeof(*pc));
} else
pc = pcpup;
@ -250,7 +250,7 @@ cpu_mp_start()
pc->pc_other_cpus = all_cpus & ~pc->pc_cpumask;
if (pc->pc_cpuid > 0) {
ap_pcpu = pc;
ap_stack = malloc(KSTACK_PAGES * PAGE_SIZE, M_PMAP,
ap_stack = malloc(KSTACK_PAGES * PAGE_SIZE, M_SMP,
M_WAITOK);
ap_vhpt = pmap_vhpt_base[pc->pc_cpuid];
ap_delay = 2000;

View File

@ -118,8 +118,6 @@ __FBSDID("$FreeBSD$");
/* XXX move to a header. */
extern uint64_t ia64_gateway_page[];
MALLOC_DEFINE(M_PMAP, "PMAP", "PMAP Structures");
#ifndef PMAP_SHPGPERPROC
#define PMAP_SHPGPERPROC 200
#endif