Skip to content

Commit 5183a61

Browse files
committed
Merge tag 'x86-platform-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform updates from Ingo Molnar: "The biggest change is the removal of SGI UV1 support, which allowed the removal of the legacy EFI old_mmap code as well. This removes quite a bunch of old code & quirks" * tag 'x86-platform-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Remove unused EFI_UV1_MEMMAP code x86/platform/uv: Remove uv bios and efi code related to EFI_UV1_MEMMAP x86/efi: Remove references to no-longer-used efi_have_uv1_memmap() x86/efi: Delete SGI UV1 detection. x86/platform/uv: Remove efi=old_map command line option x86/platform/uv: Remove vestigial mention of UV1 platform from bios header x86/platform/uv: Remove support for UV1 platform from uv x86/platform/uv: Remove support for uv1 platform from uv_hub x86/platform/uv: Remove support for UV1 platform from uv_bau x86/platform/uv: Remove support for UV1 platform from uv_mmrs x86/platform/uv: Remove support for UV1 platform from x2apic_uv_x x86/platform/uv: Remove support for UV1 platform from uv_tlb x86/platform/uv: Remove support for UV1 platform from uv_time
2 parents e96ec8c + 3bcf25a commit 5183a61

File tree

14 files changed

+86
-1450
lines changed

14 files changed

+86
-1450
lines changed

arch/x86/include/asm/efi.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,7 @@ extern unsigned long efi_fw_vendor, efi_config_table;
2222
*
2323
* This is the main reason why we're doing stable VA mappings for RT
2424
* services.
25-
*
26-
* SGI UV1 machines are known to be incompatible with this scheme, so we
27-
* provide an opt-out for these machines via a DMI quirk that sets the
28-
* attribute below.
2925
*/
30-
#define EFI_UV1_MEMMAP EFI_ARCH_1
31-
32-
static inline bool efi_have_uv1_memmap(void)
33-
{
34-
return IS_ENABLED(CONFIG_X86_UV) && efi_enabled(EFI_UV1_MEMMAP);
35-
}
3626

3727
#define EFI32_LOADER_SIGNATURE "EL32"
3828
#define EFI64_LOADER_SIGNATURE "EL64"
@@ -122,19 +112,15 @@ struct efi_scratch {
122112
efi_sync_low_kernel_mappings(); \
123113
kernel_fpu_begin(); \
124114
firmware_restrict_branch_speculation_start(); \
125-
\
126-
if (!efi_have_uv1_memmap()) \
127-
efi_switch_mm(&efi_mm); \
115+
efi_switch_mm(&efi_mm); \
128116
})
129117

130118
#define arch_efi_call_virt(p, f, args...) \
131119
efi_call((void *)p->f, args) \
132120

133121
#define arch_efi_call_virt_teardown() \
134122
({ \
135-
if (!efi_have_uv1_memmap()) \
136-
efi_switch_mm(efi_scratch.prev_mm); \
137-
\
123+
efi_switch_mm(efi_scratch.prev_mm); \
138124
firmware_restrict_branch_speculation_end(); \
139125
kernel_fpu_end(); \
140126
})
@@ -176,8 +162,6 @@ extern void efi_delete_dummy_variable(void);
176162
extern void efi_switch_mm(struct mm_struct *mm);
177163
extern void efi_recover_from_page_fault(unsigned long phys_addr);
178164
extern void efi_free_boot_services(void);
179-
extern pgd_t * __init efi_uv1_memmap_phys_prolog(void);
180-
extern void __init efi_uv1_memmap_phys_epilog(pgd_t *save_pgd);
181165

182166
/* kexec external ABI */
183167
struct efi_setup_data {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct uv_gam_range_entry {
7272
};
7373

7474
#define UV_SYSTAB_SIG "UVST"
75-
#define UV_SYSTAB_VERSION_1 1 /* UV1/2/3 BIOS version */
75+
#define UV_SYSTAB_VERSION_1 1 /* UV2/3 BIOS version */
7676
#define UV_SYSTAB_VERSION_UV4 0x400 /* UV4 BIOS base version */
7777
#define UV_SYSTAB_VERSION_UV4_1 0x401 /* + gpa_shift */
7878
#define UV_SYSTAB_VERSION_UV4_2 0x402 /* + TYPE_NVRAM/WINDOW/MBOX */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <asm/tlbflush.h>
66

7-
enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
7+
enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC};
88

99
struct cpumask;
1010
struct mm_struct;

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

Lines changed: 7 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@
4646
#define UV_ACT_STATUS_SIZE 2
4747
#define UV_DISTRIBUTION_SIZE 256
4848
#define UV_SW_ACK_NPENDING 8
49-
#define UV1_NET_ENDPOINT_INTD 0x38
50-
#define UV2_NET_ENDPOINT_INTD 0x28
51-
#define UV_NET_ENDPOINT_INTD (is_uv1_hub() ? \
52-
UV1_NET_ENDPOINT_INTD : UV2_NET_ENDPOINT_INTD)
49+
#define UV_NET_ENDPOINT_INTD 0x28
5350
#define UV_PAYLOADQ_GNODE_SHIFT 49
5451
#define UV_PTC_BASENAME "sgi_uv/ptc_statistics"
5552
#define UV_BAU_BASENAME "sgi_uv/bau_tunables"
@@ -64,14 +61,9 @@
6461
* UV2: Bit 19 selects between
6562
* (0): 10 microsecond timebase and
6663
* (1): 80 microseconds
67-
* we're using 560us, similar to UV1: 65 units of 10us
64+
* we're using 560us
6865
*/
69-
#define UV1_INTD_SOFT_ACK_TIMEOUT_PERIOD (9UL)
70-
#define UV2_INTD_SOFT_ACK_TIMEOUT_PERIOD (15UL)
71-
72-
#define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD (is_uv1_hub() ? \
73-
UV1_INTD_SOFT_ACK_TIMEOUT_PERIOD : \
74-
UV2_INTD_SOFT_ACK_TIMEOUT_PERIOD)
66+
#define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD (15UL)
7567
/* assuming UV3 is the same */
7668

7769
#define BAU_MISC_CONTROL_MULT_MASK 3
@@ -148,7 +140,6 @@
148140

149141
#define UV_LB_SUBNODEID 0x10
150142

151-
/* these two are the same for UV1 and UV2: */
152143
#define UV_SA_SHFT UVH_LB_BAU_MISC_CONTROL_INTD_SOFT_ACK_TIMEOUT_PERIOD_SHFT
153144
#define UV_SA_MASK UVH_LB_BAU_MISC_CONTROL_INTD_SOFT_ACK_TIMEOUT_PERIOD_MASK
154145
/* 4 bits of software ack period */
@@ -189,8 +180,7 @@
189180
#define BAU_DESC_QUALIFIER 0x534749
190181

191182
enum uv_bau_version {
192-
UV_BAU_V1 = 1,
193-
UV_BAU_V2,
183+
UV_BAU_V2 = 2,
194184
UV_BAU_V3,
195185
UV_BAU_V4,
196186
};
@@ -233,12 +223,12 @@ struct bau_local_cpumask {
233223
*/
234224

235225
/**
236-
* struct uv1_2_3_bau_msg_payload - defines payload for INTD transactions
226+
* struct uv2_3_bau_msg_payload - defines payload for INTD transactions
237227
* @address: Signifies a page or all TLB's of the cpu
238228
* @sending_cpu: CPU from which the message originates
239229
* @acknowledge_count: CPUs on the destination Hub that received the interrupt
240230
*/
241-
struct uv1_2_3_bau_msg_payload {
231+
struct uv2_3_bau_msg_payload {
242232
u64 address;
243233
u16 sending_cpu;
244234
u16 acknowledge_count;
@@ -259,89 +249,6 @@ struct uv4_bau_msg_payload {
259249
u32 qualifier:24;
260250
};
261251

262-
/*
263-
* UV1 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
264-
* see table 4.2.3.0.1 in broacast_assist spec.
265-
*/
266-
struct uv1_bau_msg_header {
267-
unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */
268-
/* bits 5:0 */
269-
unsigned int base_dest_nasid:15; /* nasid of the first bit */
270-
/* bits 20:6 */ /* in uvhub map */
271-
unsigned int command:8; /* message type */
272-
/* bits 28:21 */
273-
/* 0x38: SN3net EndPoint Message */
274-
unsigned int rsvd_1:3; /* must be zero */
275-
/* bits 31:29 */
276-
/* int will align on 32 bits */
277-
unsigned int rsvd_2:9; /* must be zero */
278-
/* bits 40:32 */
279-
/* Suppl_A is 56-41 */
280-
unsigned int sequence:16; /* message sequence number */
281-
/* bits 56:41 */ /* becomes bytes 16-17 of msg */
282-
/* Address field (96:57) is
283-
never used as an address
284-
(these are address bits
285-
42:3) */
286-
287-
unsigned int rsvd_3:1; /* must be zero */
288-
/* bit 57 */
289-
/* address bits 27:4 are payload */
290-
/* these next 24 (58-81) bits become bytes 12-14 of msg */
291-
/* bits 65:58 land in byte 12 */
292-
unsigned int replied_to:1; /* sent as 0 by the source to
293-
byte 12 */
294-
/* bit 58 */
295-
unsigned int msg_type:3; /* software type of the
296-
message */
297-
/* bits 61:59 */
298-
unsigned int canceled:1; /* message canceled, resource
299-
is to be freed*/
300-
/* bit 62 */
301-
unsigned int payload_1a:1; /* not currently used */
302-
/* bit 63 */
303-
unsigned int payload_1b:2; /* not currently used */
304-
/* bits 65:64 */
305-
306-
/* bits 73:66 land in byte 13 */
307-
unsigned int payload_1ca:6; /* not currently used */
308-
/* bits 71:66 */
309-
unsigned int payload_1c:2; /* not currently used */
310-
/* bits 73:72 */
311-
312-
/* bits 81:74 land in byte 14 */
313-
unsigned int payload_1d:6; /* not currently used */
314-
/* bits 79:74 */
315-
unsigned int payload_1e:2; /* not currently used */
316-
/* bits 81:80 */
317-
318-
unsigned int rsvd_4:7; /* must be zero */
319-
/* bits 88:82 */
320-
unsigned int swack_flag:1; /* software acknowledge flag */
321-
/* bit 89 */
322-
/* INTD trasactions at
323-
destination are to wait for
324-
software acknowledge */
325-
unsigned int rsvd_5:6; /* must be zero */
326-
/* bits 95:90 */
327-
unsigned int rsvd_6:5; /* must be zero */
328-
/* bits 100:96 */
329-
unsigned int int_both:1; /* if 1, interrupt both sockets
330-
on the uvhub */
331-
/* bit 101*/
332-
unsigned int fairness:3; /* usually zero */
333-
/* bits 104:102 */
334-
unsigned int multilevel:1; /* multi-level multicast
335-
format */
336-
/* bit 105 */
337-
/* 0 for TLB: endpoint multi-unicast messages */
338-
unsigned int chaining:1; /* next descriptor is part of
339-
this activation*/
340-
/* bit 106 */
341-
unsigned int rsvd_7:21; /* must be zero */
342-
/* bits 127:107 */
343-
};
344-
345252
/*
346253
* UV2 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
347254
* see figure 9-2 of harp_sys.pdf
@@ -418,25 +325,14 @@ struct bau_desc {
418325
* message template, consisting of header and payload:
419326
*/
420327
union bau_msg_header {
421-
struct uv1_bau_msg_header uv1_hdr;
422328
struct uv2_3_bau_msg_header uv2_3_hdr;
423329
} header;
424330

425331
union bau_payload_header {
426-
struct uv1_2_3_bau_msg_payload uv1_2_3;
332+
struct uv2_3_bau_msg_payload uv2_3;
427333
struct uv4_bau_msg_payload uv4;
428334
} payload;
429335
};
430-
/* UV1:
431-
* -payload-- ---------header------
432-
* bytes 0-11 bits 41-56 bits 58-81
433-
* A B (2) C (3)
434-
*
435-
* A/B/C are moved to:
436-
* A C B
437-
* bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector)
438-
* ------------payload queue-----------
439-
*/
440336
/* UV2:
441337
* -payload-- ---------header------
442338
* bytes 0-11 bits 70-78 bits 21-44

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

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,11 @@ static inline struct uv_hub_info_s *uv_cpu_hub_info(int cpu)
224224
* This is a software convention - NOT the hardware revision numbers in
225225
* the hub chip.
226226
*/
227-
#define UV1_HUB_REVISION_BASE 1
228227
#define UV2_HUB_REVISION_BASE 3
229228
#define UV3_HUB_REVISION_BASE 5
230229
#define UV4_HUB_REVISION_BASE 7
231230
#define UV4A_HUB_REVISION_BASE 8 /* UV4 (fixed) rev 2 */
232231

233-
static inline int is_uv1_hub(void)
234-
{
235-
return is_uv_hubbed(uv(1));
236-
}
237-
238232
static inline int is_uv2_hub(void)
239233
{
240234
return is_uv_hubbed(uv(2));
@@ -265,7 +259,7 @@ static inline int is_uvx_hub(void)
265259

266260
static inline int is_uv_hub(void)
267261
{
268-
return is_uv1_hub() || is_uvx_hub();
262+
return is_uvx_hub();
269263
}
270264

271265
union uvh_apicid {
@@ -292,11 +286,6 @@ union uvh_apicid {
292286
#define UV_PNODE_TO_GNODE(p) ((p) |uv_hub_info->gnode_extra)
293287
#define UV_PNODE_TO_NASID(p) (UV_PNODE_TO_GNODE(p) << 1)
294288

295-
#define UV1_LOCAL_MMR_BASE 0xf4000000UL
296-
#define UV1_GLOBAL_MMR32_BASE 0xf8000000UL
297-
#define UV1_LOCAL_MMR_SIZE (64UL * 1024 * 1024)
298-
#define UV1_GLOBAL_MMR32_SIZE (64UL * 1024 * 1024)
299-
300289
#define UV2_LOCAL_MMR_BASE 0xfa000000UL
301290
#define UV2_GLOBAL_MMR32_BASE 0xfc000000UL
302291
#define UV2_LOCAL_MMR_SIZE (32UL * 1024 * 1024)
@@ -313,25 +302,21 @@ union uvh_apicid {
313302
#define UV4_GLOBAL_MMR32_SIZE (16UL * 1024 * 1024)
314303

315304
#define UV_LOCAL_MMR_BASE ( \
316-
is_uv1_hub() ? UV1_LOCAL_MMR_BASE : \
317305
is_uv2_hub() ? UV2_LOCAL_MMR_BASE : \
318306
is_uv3_hub() ? UV3_LOCAL_MMR_BASE : \
319307
/*is_uv4_hub*/ UV4_LOCAL_MMR_BASE)
320308

321309
#define UV_GLOBAL_MMR32_BASE ( \
322-
is_uv1_hub() ? UV1_GLOBAL_MMR32_BASE : \
323310
is_uv2_hub() ? UV2_GLOBAL_MMR32_BASE : \
324311
is_uv3_hub() ? UV3_GLOBAL_MMR32_BASE : \
325312
/*is_uv4_hub*/ UV4_GLOBAL_MMR32_BASE)
326313

327314
#define UV_LOCAL_MMR_SIZE ( \
328-
is_uv1_hub() ? UV1_LOCAL_MMR_SIZE : \
329315
is_uv2_hub() ? UV2_LOCAL_MMR_SIZE : \
330316
is_uv3_hub() ? UV3_LOCAL_MMR_SIZE : \
331317
/*is_uv4_hub*/ UV4_LOCAL_MMR_SIZE)
332318

333319
#define UV_GLOBAL_MMR32_SIZE ( \
334-
is_uv1_hub() ? UV1_GLOBAL_MMR32_SIZE : \
335320
is_uv2_hub() ? UV2_GLOBAL_MMR32_SIZE : \
336321
is_uv3_hub() ? UV3_GLOBAL_MMR32_SIZE : \
337322
/*is_uv4_hub*/ UV4_GLOBAL_MMR32_SIZE)
@@ -352,8 +337,6 @@ union uvh_apicid {
352337
#define UVH_APICID 0x002D0E00L
353338
#define UV_APIC_PNODE_SHIFT 6
354339

355-
#define UV_APICID_HIBIT_MASK 0xffff0000
356-
357340
/* Local Bus from cpu's perspective */
358341
#define LOCAL_BUS_BASE 0x1c00000
359342
#define LOCAL_BUS_SIZE (4 * 1024 * 1024)
@@ -560,15 +543,6 @@ static inline int uv_apicid_to_pnode(int apicid)
560543
return s2pn ? s2pn[pnode - uv_hub_info->min_socket] : pnode;
561544
}
562545

563-
/* Convert an apicid to the socket number on the blade */
564-
static inline int uv_apicid_to_socket(int apicid)
565-
{
566-
if (is_uv1_hub())
567-
return (apicid >> (uv_hub_info->apic_pnode_shift - 1)) & 1;
568-
else
569-
return 0;
570-
}
571-
572546
/*
573547
* Access global MMRs using the low memory MMR32 space. This region supports
574548
* faster MMR access but not all MMRs are accessible in this space.
@@ -660,7 +634,7 @@ static inline int uv_cpu_blade_processor_id(int cpu)
660634
return uv_cpu_info_per(cpu)->blade_cpu_id;
661635
}
662636

663-
/* Blade number to Node number (UV1..UV4 is 1:1) */
637+
/* Blade number to Node number (UV2..UV4 is 1:1) */
664638
static inline int uv_blade_to_node(int blade)
665639
{
666640
return blade;
@@ -674,7 +648,7 @@ static inline int uv_numa_blade_id(void)
674648

675649
/*
676650
* Convert linux node number to the UV blade number.
677-
* .. Currently for UV1 thru UV4 the node and the blade are identical.
651+
* .. Currently for UV2 thru UV4 the node and the blade are identical.
678652
* .. If this changes then you MUST check references to this function!
679653
*/
680654
static inline int uv_node_to_blade_id(int nid)
@@ -821,8 +795,6 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
821795
}
822796
}
823797

824-
extern unsigned int uv_apicid_hibits;
825-
826798
/*
827799
* Get the minimum revision number of the hub chips within the partition.
828800
* (See UVx_HUB_REVISION_BASE above for specific values.)

0 commit comments

Comments
 (0)