diff options
author | Sree Vemuri <sree.lakshmi.vemuri@oracle.com> | 2010-03-26 16:54:05 -0700 |
---|---|---|
committer | Sree Vemuri <sree.lakshmi.vemuri@oracle.com> | 2010-03-26 16:54:05 -0700 |
commit | 1e81ac6e0a5d3782b6bdbcc7e2cbda4fda909ab9 (patch) | |
tree | 2630adde6b9b79fb02f0f6ad1f13b53b1d219b31 /usr/src | |
parent | 0bc523e585d34fb799f65e1c4fd7d163e401a501 (diff) | |
download | illumos-joyent-1e81ac6e0a5d3782b6bdbcc7e2cbda4fda909ab9.tar.gz |
6907226 memcpy() may produce bad copy when interrupted
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/sun4v/pcbe/niagara2_pcbe.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/src/uts/sun4v/pcbe/niagara2_pcbe.c b/usr/src/uts/sun4v/pcbe/niagara2_pcbe.c index d78d184d32..689c8fa452 100644 --- a/usr/src/uts/sun4v/pcbe/niagara2_pcbe.c +++ b/usr/src/uts/sun4v/pcbe/niagara2_pcbe.c @@ -105,6 +105,9 @@ extern uint64_t ultra_getpic(void); extern uint64_t ultra_gettick(void); extern char cpu_module_name[]; +#define L2_dmiss_ld_event 0x320 +int pcbe_l2dmiss_ovtrap_enable = 0; + pcbe_ops_t ni2_pcbe_ops = { PCBE_VER_1, CPC_CAP_OVERFLOW_INTERRUPT | CPC_CAP_OVERFLOW_PRECISE, @@ -669,6 +672,19 @@ ni2_pcbe_program(void *token) if (pic0->pcbe_flags & CPC_COUNT_SAMPLE_MODE) pcr |= (1ull << CPC_PCR_SAMPLE_MODE_SHIFT); #endif + + if (pcbe_l2dmiss_ovtrap_enable == 0) { + /* + * SW workaround for HW Erratum 108. + * Disable overflow interrupts when L2_dmiss_ld event is + * selected. + */ + if ((pic0->pcbe_evsel & L2_dmiss_ld_event) == L2_dmiss_ld_event) + toe &= ~CPC_PCR_TOE0; + + if ((pic1->pcbe_evsel & L2_dmiss_ld_event) == L2_dmiss_ld_event) + toe &= ~CPC_PCR_TOE1; + } pcr |= toe; DTRACE_PROBE1(niagara2__setpcr, uint64_t, pcr); |