Skip to content

Commit c4d9807

Browse files
mike-travissuryasaimadhu
authored andcommitted
x86/platform/uv: Remove SCIR MMR references for UV systems
UV class systems no longer use System Controller for monitoring of CPU activity provided by this driver. Other methods have been developed for BIOS and the management controller (BMC). Remove that supporting code. Signed-off-by: Mike Travis <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Dimitri Sivanich <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 39297dd commit c4d9807

File tree

2 files changed

+3
-122
lines changed

2 files changed

+3
-122
lines changed

arch/x86/include/asm/uv/uv_hub.h

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,6 @@
129129
*/
130130
#define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_BLADES * 2)
131131

132-
/* System Controller Interface Reg info */
133-
struct uv_scir_s {
134-
struct timer_list timer;
135-
unsigned long offset;
136-
unsigned long last;
137-
unsigned long idle_on;
138-
unsigned long idle_off;
139-
unsigned char state;
140-
unsigned char enabled;
141-
};
142-
143132
/* GAM (globally addressed memory) range table */
144133
struct uv_gam_range_s {
145134
u32 limit; /* PA bits 56:26 (GAM_RANGE_SHFT) */
@@ -191,16 +180,13 @@ struct uv_hub_info_s {
191180
struct uv_cpu_info_s {
192181
void *p_uv_hub_info;
193182
unsigned char blade_cpu_id;
194-
struct uv_scir_s scir;
183+
void *reserved;
195184
};
196185
DECLARE_PER_CPU(struct uv_cpu_info_s, __uv_cpu_info);
197186

198187
#define uv_cpu_info this_cpu_ptr(&__uv_cpu_info)
199188
#define uv_cpu_info_per(cpu) (&per_cpu(__uv_cpu_info, cpu))
200189

201-
#define uv_scir_info (&uv_cpu_info->scir)
202-
#define uv_cpu_scir_info(cpu) (&uv_cpu_info_per(cpu)->scir)
203-
204190
/* Node specific hub common info struct */
205191
extern void **__uv_hub_info_list;
206192
static inline struct uv_hub_info_s *uv_hub_info_list(int node)
@@ -297,9 +283,9 @@ union uvh_apicid {
297283
#define UV3_GLOBAL_MMR32_SIZE (32UL * 1024 * 1024)
298284

299285
#define UV4_LOCAL_MMR_BASE 0xfa000000UL
300-
#define UV4_GLOBAL_MMR32_BASE 0xfc000000UL
286+
#define UV4_GLOBAL_MMR32_BASE 0
301287
#define UV4_LOCAL_MMR_SIZE (32UL * 1024 * 1024)
302-
#define UV4_GLOBAL_MMR32_SIZE (16UL * 1024 * 1024)
288+
#define UV4_GLOBAL_MMR32_SIZE 0
303289

304290
#define UV_LOCAL_MMR_BASE ( \
305291
is_uv2_hub() ? UV2_LOCAL_MMR_BASE : \
@@ -772,29 +758,6 @@ DECLARE_PER_CPU(struct uv_cpu_nmi_s, uv_cpu_nmi);
772758
#define UV_NMI_STATE_DUMP 2
773759
#define UV_NMI_STATE_DUMP_DONE 3
774760

775-
/* Update SCIR state */
776-
static inline void uv_set_scir_bits(unsigned char value)
777-
{
778-
if (uv_scir_info->state != value) {
779-
uv_scir_info->state = value;
780-
uv_write_local_mmr8(uv_scir_info->offset, value);
781-
}
782-
}
783-
784-
static inline unsigned long uv_scir_offset(int apicid)
785-
{
786-
return SCIR_LOCAL_MMR_BASE | (apicid & 0x3f);
787-
}
788-
789-
static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
790-
{
791-
if (uv_cpu_scir_info(cpu)->state != value) {
792-
uv_write_global_mmr8(uv_cpu_to_pnode(cpu),
793-
uv_cpu_scir_info(cpu)->offset, value);
794-
uv_cpu_scir_info(cpu)->state = value;
795-
}
796-
}
797-
798761
/*
799762
* Get the minimum revision number of the hub chips within the partition.
800763
* (See UVx_HUB_REVISION_BASE above for specific values.)

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -909,85 +909,6 @@ static __init void uv_rtc_init(void)
909909
}
910910
}
911911

912-
/*
913-
* percpu heartbeat timer
914-
*/
915-
static void uv_heartbeat(struct timer_list *timer)
916-
{
917-
unsigned char bits = uv_scir_info->state;
918-
919-
/* Flip heartbeat bit: */
920-
bits ^= SCIR_CPU_HEARTBEAT;
921-
922-
/* Is this CPU idle? */
923-
if (idle_cpu(raw_smp_processor_id()))
924-
bits &= ~SCIR_CPU_ACTIVITY;
925-
else
926-
bits |= SCIR_CPU_ACTIVITY;
927-
928-
/* Update system controller interface reg: */
929-
uv_set_scir_bits(bits);
930-
931-
/* Enable next timer period: */
932-
mod_timer(timer, jiffies + SCIR_CPU_HB_INTERVAL);
933-
}
934-
935-
static int uv_heartbeat_enable(unsigned int cpu)
936-
{
937-
while (!uv_cpu_scir_info(cpu)->enabled) {
938-
struct timer_list *timer = &uv_cpu_scir_info(cpu)->timer;
939-
940-
uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
941-
timer_setup(timer, uv_heartbeat, TIMER_PINNED);
942-
timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
943-
add_timer_on(timer, cpu);
944-
uv_cpu_scir_info(cpu)->enabled = 1;
945-
946-
/* Also ensure that boot CPU is enabled: */
947-
cpu = 0;
948-
}
949-
return 0;
950-
}
951-
952-
#ifdef CONFIG_HOTPLUG_CPU
953-
static int uv_heartbeat_disable(unsigned int cpu)
954-
{
955-
if (uv_cpu_scir_info(cpu)->enabled) {
956-
uv_cpu_scir_info(cpu)->enabled = 0;
957-
del_timer(&uv_cpu_scir_info(cpu)->timer);
958-
}
959-
uv_set_cpu_scir_bits(cpu, 0xff);
960-
return 0;
961-
}
962-
963-
static __init void uv_scir_register_cpu_notifier(void)
964-
{
965-
cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "x86/x2apic-uvx:online",
966-
uv_heartbeat_enable, uv_heartbeat_disable);
967-
}
968-
969-
#else /* !CONFIG_HOTPLUG_CPU */
970-
971-
static __init void uv_scir_register_cpu_notifier(void)
972-
{
973-
}
974-
975-
static __init int uv_init_heartbeat(void)
976-
{
977-
int cpu;
978-
979-
if (is_uv_system()) {
980-
for_each_online_cpu(cpu)
981-
uv_heartbeat_enable(cpu);
982-
}
983-
984-
return 0;
985-
}
986-
987-
late_initcall(uv_init_heartbeat);
988-
989-
#endif /* !CONFIG_HOTPLUG_CPU */
990-
991912
/* Direct Legacy VGA I/O traffic to designated IOH */
992913
static int uv_set_vga_state(struct pci_dev *pdev, bool decode, unsigned int command_bits, u32 flags)
993914
{
@@ -1517,8 +1438,6 @@ static void __init uv_system_init_hub(void)
15171438
uv_hub_info_list(numa_node_id)->pnode = pnode;
15181439
else if (uv_cpu_hub_info(cpu)->pnode == 0xffff)
15191440
uv_cpu_hub_info(cpu)->pnode = pnode;
1520-
1521-
uv_cpu_scir_info(cpu)->offset = uv_scir_offset(apicid);
15221441
}
15231442

15241443
for_each_node(nodeid) {
@@ -1547,7 +1466,6 @@ static void __init uv_system_init_hub(void)
15471466

15481467
uv_nmi_setup();
15491468
uv_cpu_init();
1550-
uv_scir_register_cpu_notifier();
15511469
uv_setup_proc_files(0);
15521470

15531471
/* Register Legacy VGA I/O redirection handler: */

0 commit comments

Comments
 (0)