@@ -244,8 +244,10 @@ static inline bool uv_nmi_action_is(const char *action)
244
244
/* Setup which NMI support is present in system */
245
245
static void uv_nmi_setup_mmrs (void )
246
246
{
247
+ bool new_nmi_method_only = false;
248
+
247
249
/* First determine arch specific MMRs to handshake with BIOS */
248
- if (UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK ) {
250
+ if (UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK ) { /* UV2,3,4 setup */
249
251
uvh_nmi_mmrx = UVH_EVENT_OCCURRED0 ;
250
252
uvh_nmi_mmrx_clear = UVH_EVENT_OCCURRED0_ALIAS ;
251
253
uvh_nmi_mmrx_shift = UVH_EVENT_OCCURRED0_EXTIO_INT0_SHFT ;
@@ -255,26 +257,25 @@ static void uv_nmi_setup_mmrs(void)
255
257
uvh_nmi_mmrx_req = UVH_BIOS_KERNEL_MMR_ALIAS_2 ;
256
258
uvh_nmi_mmrx_req_shift = 62 ;
257
259
258
- } else if (UVH_EVENT_OCCURRED1_EXTIO_INT0_MASK ) {
260
+ } else if (UVH_EVENT_OCCURRED1_EXTIO_INT0_MASK ) { /* UV5+ setup */
259
261
uvh_nmi_mmrx = UVH_EVENT_OCCURRED1 ;
260
262
uvh_nmi_mmrx_clear = UVH_EVENT_OCCURRED1_ALIAS ;
261
263
uvh_nmi_mmrx_shift = UVH_EVENT_OCCURRED1_EXTIO_INT0_SHFT ;
262
264
uvh_nmi_mmrx_type = "OCRD1-EXTIO_INT0" ;
263
265
264
- uvh_nmi_mmrx_supported = UVH_EXTIO_INT0_BROADCAST ;
265
- uvh_nmi_mmrx_req = UVH_BIOS_KERNEL_MMR_ALIAS_2 ;
266
- uvh_nmi_mmrx_req_shift = 62 ;
266
+ new_nmi_method_only = true; /* Newer nmi always valid on UV5+ */
267
+ uvh_nmi_mmrx_req = 0 ; /* no request bit to clear */
267
268
268
269
} else {
269
- pr_err ("UV:%s:cannot find EVENT_OCCURRED*_EXTIO_INT0\n" ,
270
- __func__ );
270
+ pr_err ("UV:%s:NMI support not available on this system\n" , __func__ );
271
271
return ;
272
272
}
273
273
274
274
/* Then find out if new NMI is supported */
275
- if (likely (uv_read_local_mmr (uvh_nmi_mmrx_supported ))) {
276
- uv_write_local_mmr (uvh_nmi_mmrx_req ,
277
- 1UL << uvh_nmi_mmrx_req_shift );
275
+ if (new_nmi_method_only || uv_read_local_mmr (uvh_nmi_mmrx_supported )) {
276
+ if (uvh_nmi_mmrx_req )
277
+ uv_write_local_mmr (uvh_nmi_mmrx_req ,
278
+ 1UL << uvh_nmi_mmrx_req_shift );
278
279
nmi_mmr = uvh_nmi_mmrx ;
279
280
nmi_mmr_clear = uvh_nmi_mmrx_clear ;
280
281
nmi_mmr_pending = 1UL << uvh_nmi_mmrx_shift ;
0 commit comments