Project

General

Profile

Actions

Bug #850

closed

hwpmc [3/13]

Added by aoiko over 16 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Support for pmc interrupt.

Obtained-from: FreeBSD

Index: platform/pc32/include/smp.h ===================================================================
retrieving revision 1.20
diff u -p -r1.20 smp.h
--
platform/pc32/include/smp.h
+++ platform/pc32/include/smp.h
@ -16,6 +16,8 @

#ifdef _KERNEL

#include <machine_base/apic/apicreg.h>

#if defined(SMP)

#ifndef LOCORE
@ -35,7 +37,6 @ extern int current_postcode; /** XXX cu
outb(0x80, current_postcode)

-#include <machine_base/apic/apicreg.h>
#include <machine/pcb.h>

/* global data in mpboot.s /
@ -141,9 +142,12 @ extern cpumask_t smp_active_mask;
#endif /
!LOCORE /
#else /
!SMP */

+extern volatile lapic_t lapic;
#define smp_active_mask 1 /
smp_active_mask always 1 on UP machines */

#endif

void lapic_enable_pmc_interrupt(void);

#endif /* KERNEL /
#endif /
_MACHINE_SMP_H
*/
Index: platform/pc32/i386/machdep.c ===================================================================
retrieving revision 1.127
diff u -p -r1.127 machdep.c
--
platform/pc32/i386/machdep.c
+++ platform/pc32/i386/machdep.c
@ -2561,6 +2561,18 @ outb(u_int port, u_char data)

#endif /* DDB */

#include <machine_base/apic/apicreg.h>

void
+lapic_enable_pmc_interrupt(void)
{
+ uint32_t value;

value = lapic->lvt_pcint;
+ value &= ~APIC_LVT_MASKED;
+ lapic->lvt_pcint = value;
}

#include "opt_cpu.h"
Actions #1

Updated by alexh almost 14 years ago

See Issue1714.

Actions

Also available in: Atom PDF