Date: Mon, 23 Apr 2012 08:58:02 +0000 (UTC) From: Fabien Thomas <fabient@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r234598 - head/sys/dev/hwpmc Message-ID: <201204230858.q3N8w2A8083134@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fabient Date: Mon Apr 23 08:58:01 2012 New Revision: 234598 URL: http://svn.freebsd.org/changeset/base/234598 Log: Fix class malloc init for mips and powerpc that was not converted by r233628. Found by: monthadar, adrian MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_mips.c head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mips.c Mon Apr 23 07:15:15 2012 (r234597) +++ head/sys/dev/hwpmc/hwpmc_mips.c Mon Apr 23 08:58:01 2012 (r234598) @@ -431,11 +431,9 @@ pmc_mips_initialize() M_WAITOK|M_ZERO); /* Just one class */ - pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), - M_PMC, M_WAITOK|M_ZERO); + pmc_mdep = pmc_mdep_alloc(1); pmc_mdep->pmd_cputype = mips_pmc_spec.ps_cputype; - pmc_mdep->pmd_nclass = 1; pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_MIPS]; pcd->pcd_caps = mips_pmc_spec.ps_capabilities; Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Apr 23 07:15:15 2012 (r234597) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Apr 23 08:58:01 2012 (r234598) @@ -803,11 +803,9 @@ pmc_md_initialize() M_WAITOK|M_ZERO); /* Just one class */ - pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), - M_PMC, M_WAITOK|M_ZERO); + pmc_mdep = pmc_mdep_alloc(1); pmc_mdep->pmd_cputype = PMC_CPU_PPC_7450; - pmc_mdep->pmd_nclass = 1; pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450]; pcd->pcd_caps = POWERPC_PMC_CAPS;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204230858.q3N8w2A8083134>