diff options
Diffstat (limited to 'arch/x86/include/asm/uv/uv_hub.h')
-rw-r--r-- | arch/x86/include/asm/uv/uv_hub.h | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index 2c32df95bb78..a30836c8ac4d 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h | |||
@@ -502,8 +502,8 @@ struct uv_blade_info { | |||
502 | unsigned short nr_online_cpus; | 502 | unsigned short nr_online_cpus; |
503 | unsigned short pnode; | 503 | unsigned short pnode; |
504 | short memory_nid; | 504 | short memory_nid; |
505 | spinlock_t nmi_lock; | 505 | spinlock_t nmi_lock; /* obsolete, see uv_hub_nmi */ |
506 | unsigned long nmi_count; | 506 | unsigned long nmi_count; /* obsolete, see uv_hub_nmi */ |
507 | }; | 507 | }; |
508 | extern struct uv_blade_info *uv_blade_info; | 508 | extern struct uv_blade_info *uv_blade_info; |
509 | extern short *uv_node_to_blade; | 509 | extern short *uv_node_to_blade; |
@@ -576,6 +576,59 @@ static inline int uv_num_possible_blades(void) | |||
576 | return uv_possible_blades; | 576 | return uv_possible_blades; |
577 | } | 577 | } |
578 | 578 | ||
579 | /* Per Hub NMI support */ | ||
580 | extern void uv_nmi_setup(void); | ||
581 | |||
582 | /* BMC sets a bit this MMR non-zero before sending an NMI */ | ||
583 | #define UVH_NMI_MMR UVH_SCRATCH5 | ||
584 | #define UVH_NMI_MMR_CLEAR UVH_SCRATCH5_ALIAS | ||
585 | #define UVH_NMI_MMR_SHIFT 63 | ||
586 | #define UVH_NMI_MMR_TYPE "SCRATCH5" | ||
587 | |||
588 | /* Newer SMM NMI handler, not present in all systems */ | ||
589 | #define UVH_NMI_MMRX UVH_EVENT_OCCURRED0 | ||
590 | #define UVH_NMI_MMRX_CLEAR UVH_EVENT_OCCURRED0_ALIAS | ||
591 | #define UVH_NMI_MMRX_SHIFT (is_uv1_hub() ? \ | ||
592 | UV1H_EVENT_OCCURRED0_EXTIO_INT0_SHFT :\ | ||
593 | UVXH_EVENT_OCCURRED0_EXTIO_INT0_SHFT) | ||
594 | #define UVH_NMI_MMRX_TYPE "EXTIO_INT0" | ||
595 | |||
596 | /* Non-zero indicates newer SMM NMI handler present */ | ||
597 | #define UVH_NMI_MMRX_SUPPORTED UVH_EXTIO_INT0_BROADCAST | ||
598 | |||
599 | /* Indicates to BIOS that we want to use the newer SMM NMI handler */ | ||
600 | #define UVH_NMI_MMRX_REQ UVH_SCRATCH5_ALIAS_2 | ||
601 | #define UVH_NMI_MMRX_REQ_SHIFT 62 | ||
602 | |||
603 | struct uv_hub_nmi_s { | ||
604 | raw_spinlock_t nmi_lock; | ||
605 | atomic_t in_nmi; /* flag this node in UV NMI IRQ */ | ||
606 | atomic_t cpu_owner; /* last locker of this struct */ | ||
607 | atomic_t read_mmr_count; /* count of MMR reads */ | ||
608 | atomic_t nmi_count; /* count of true UV NMIs */ | ||
609 | unsigned long nmi_value; /* last value read from NMI MMR */ | ||
610 | }; | ||
611 | |||
612 | struct uv_cpu_nmi_s { | ||
613 | struct uv_hub_nmi_s *hub; | ||
614 | atomic_t state; | ||
615 | atomic_t pinging; | ||
616 | int queries; | ||
617 | int pings; | ||
618 | }; | ||
619 | |||
620 | DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); | ||
621 | #define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) | ||
622 | #define uv_hub_nmi (uv_cpu_nmi.hub) | ||
623 | #define uv_cpu_nmi_per(cpu) (per_cpu(__uv_cpu_nmi, cpu)) | ||
624 | #define uv_hub_nmi_per(cpu) (uv_cpu_nmi_per(cpu).hub) | ||
625 | |||
626 | /* uv_cpu_nmi_states */ | ||
627 | #define UV_NMI_STATE_OUT 0 | ||
628 | #define UV_NMI_STATE_IN 1 | ||
629 | #define UV_NMI_STATE_DUMP 2 | ||
630 | #define UV_NMI_STATE_DUMP_DONE 3 | ||
631 | |||
579 | /* Update SCIR state */ | 632 | /* Update SCIR state */ |
580 | static inline void uv_set_scir_bits(unsigned char value) | 633 | static inline void uv_set_scir_bits(unsigned char value) |
581 | { | 634 | { |