Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ia64: remove support for machvecs

The only thing remaining of the machvecs is a few checks if we are
running on an SGI UV system. Replace those with the existing
is_uv_system() check that has been rewritten to simply check the
OEM ID directly.

That leaves us with a generic kernel that is as fast as the previous
DIG/ZX1/UV kernels, but can support all hardware. Support for UV
and the HP SBA IOMMU is now optional based on new config options.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lkml.kernel.org/r/20190813072514.23299-27-hch@lst.de
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Christoph Hellwig and committed by
Tony Luck
df41017e a8384e6c

+116 -488
+21 -51
arch/ia64/Kconfig
··· 11 11 select ARCH_MIGHT_HAVE_PC_PARPORT 12 12 select ARCH_MIGHT_HAVE_PC_SERIO 13 13 select ACPI 14 + select ACPI_NUMA if NUMA 14 15 select ARCH_SUPPORTS_ACPI 15 16 select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI 16 17 select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI 17 18 select FORCE_PCI 18 19 select PCI_DOMAINS if PCI 20 + select PCI_MSI 19 21 select PCI_SYSCALL if PCI 20 22 select HAVE_UNSTABLE_SCHED_CLOCK 21 23 select HAVE_EXIT_THREAD ··· 32 30 select HAVE_ARCH_TRACEHOOK 33 31 select HAVE_MEMBLOCK_NODE_MAP 34 32 select HAVE_VIRT_CPU_ACCOUNTING 35 - select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB 36 - select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB 33 + select ARCH_HAS_DMA_COHERENT_TO_PFN 34 + select ARCH_HAS_SYNC_DMA_FOR_CPU 37 35 select VIRT_TO_BUS 38 36 select GENERIC_IRQ_PROBE 39 37 select GENERIC_PENDING_IRQ if SMP ··· 47 45 select ARCH_THREAD_STACK_ALLOCATOR 48 46 select ARCH_CLOCKSOURCE_DATA 49 47 select GENERIC_TIME_VSYSCALL 48 + select SWIOTLB 50 49 select SYSCTL_ARCH_UNALIGN_NO_WARN 51 50 select HAVE_MOD_ARCH_SPECIFIC 52 51 select MODULES_USE_ELF_RELA ··· 55 52 select HAVE_ARCH_AUDITSYSCALL 56 53 select NEED_DMA_MAP_STATE 57 54 select NEED_SG_DMA_LENGTH 55 + select NUMA if !FLATMEM 58 56 default y 59 57 help 60 58 The Itanium Processor Family is Intel's 64-bit successor to ··· 124 120 default y 125 121 126 122 choice 127 - prompt "System type" 128 - default IA64_GENERIC 129 - 130 - config IA64_GENERIC 131 - bool "generic" 132 - select NUMA 133 - select ACPI_NUMA 134 - select SWIOTLB 135 - select PCI_MSI 136 - help 137 - This selects the system type of your hardware. A "generic" kernel 138 - will run on any supported IA-64 system. However, if you configure 139 - a kernel for your specific system, it will be faster and smaller. 140 - 141 - generic For any supported IA-64 system 142 - DIG-compliant For DIG ("Developer's Interface Guide") compliant systems 143 - DIG+Intel+IOMMU For DIG systems with Intel IOMMU 144 - HP-zx1/sx1000 For HP systems 145 - SGI-UV For SGI UV systems 146 - 147 - If you don't know what to do, choose "generic". 148 - 149 - config IA64_DIG 150 - bool "DIG-compliant" 151 - select SWIOTLB 152 - 153 - config IA64_HP_ZX1 154 - bool "HP-zx1/sx1000" 155 - help 156 - Build a kernel that runs on HP zx1 and sx1000 systems. This adds 157 - support for the HP I/O MMU. 158 - 159 - config IA64_SGI_UV 160 - bool "SGI-UV" 161 - select NUMA 162 - select ACPI_NUMA 163 - select SWIOTLB 164 - help 165 - Selecting this option will optimize the kernel for use on UV based 166 - systems, but the resulting kernel binary will not run on other 167 - types of ia64 systems. If you have an SGI UV system, it's safe 168 - to select this option. If in doubt, select ia64 generic support 169 - instead. 170 - 171 - endchoice 172 - 173 - choice 174 123 prompt "Processor type" 175 124 default ITANIUM 176 125 ··· 186 229 int 187 230 default "7" if MCKINLEY 188 231 default "6" if ITANIUM 232 + 233 + config IA64_SGI_UV 234 + bool "SGI-UV support" 235 + help 236 + Selecting this option will add specific support for running on SGI 237 + UV based systems. If you have an SGI UV system or are building a 238 + distro kernel, select this option. 239 + 240 + config IA64_HP_SBA_IOMMU 241 + bool "HP SBA IOMMU support" 242 + default y 243 + help 244 + Say Y here to add support for the SBA IOMMU found on HP zx1 and 245 + sx1000 systems. If you're unsure, answer Y. 189 246 190 247 config IA64_CYCLONE 191 248 bool "Cyclone (EXA) Time Source support" ··· 305 334 select SPARSEMEM_VMEMMAP_ENABLE 306 335 307 336 config ARCH_DISCONTIGMEM_DEFAULT 308 - def_bool y if (IA64_GENERIC || IA64_HP_ZX1) 337 + def_bool y 309 338 depends on ARCH_DISCONTIGMEM_ENABLE 310 339 311 340 config NUMA 312 341 bool "NUMA support" 313 342 depends on !FLATMEM 314 - select ACPI_NUMA if ACPI 315 343 help 316 344 Say Y to compile the kernel to support NUMA (Non-Uniform Memory 317 345 Access). This option is for configuring high-end multiprocessor
+1 -1
arch/ia64/Kconfig.debug
··· 14 14 15 15 config IA64_GRANULE_64MB 16 16 bool "64MB" 17 - depends on !(IA64_GENERIC || IA64_HP_ZX1) 17 + depends on BROKEN 18 18 19 19 endchoice 20 20
+1 -6
arch/ia64/Makefile
··· 50 50 51 51 libs-y += arch/ia64/lib/ 52 52 core-y += arch/ia64/kernel/ arch/ia64/mm/ 53 - core-$(CONFIG_IA64_DIG) += arch/ia64/dig/ 54 - core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ 55 - core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/ 56 53 core-$(CONFIG_IA64_SGI_UV) += arch/ia64/uv/ 57 54 58 - drivers-y += arch/ia64/pci/ 59 - drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ 60 - drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/uv/ 55 + drivers-y += arch/ia64/pci/ arch/ia64/hp/common/ 61 56 drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ 62 57 63 58 PHONY += compressed check
-1
arch/ia64/configs/bigsur_defconfig
··· 7 7 CONFIG_MODULE_UNLOAD=y 8 8 CONFIG_PARTITION_ADVANCED=y 9 9 CONFIG_SGI_PARTITION=y 10 - CONFIG_IA64_DIG=y 11 10 CONFIG_SMP=y 12 11 CONFIG_NR_CPUS=2 13 12 CONFIG_PREEMPT=y
-1
arch/ia64/configs/tiger_defconfig
··· 12 12 # CONFIG_BLK_DEV_BSG is not set 13 13 CONFIG_PARTITION_ADVANCED=y 14 14 CONFIG_SGI_PARTITION=y 15 - CONFIG_IA64_DIG=y 16 15 CONFIG_MCKINLEY=y 17 16 CONFIG_IA64_PAGE_SIZE_64KB=y 18 17 CONFIG_IA64_CYCLONE=y
-1
arch/ia64/configs/zx1_defconfig
··· 4 4 CONFIG_KPROBES=y 5 5 CONFIG_MODULES=y 6 6 CONFIG_PARTITION_ADVANCED=y 7 - CONFIG_IA64_HP_ZX1=y 8 7 CONFIG_MCKINLEY=y 9 8 CONFIG_SMP=y 10 9 CONFIG_NR_CPUS=16
-10
arch/ia64/dig/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0 2 - # 3 - # ia64/platform/dig/Makefile 4 - # 5 - # Copyright (C) 1999 Silicon Graphics, Inc. 6 - # Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com) 7 - # 8 - 9 - obj-y := setup.o 10 - obj-$(CONFIG_IA64_GENERIC) += machvec.o
-3
arch/ia64/dig/machvec.c
··· 1 - #define MACHVEC_PLATFORM_NAME dig 2 - #define MACHVEC_PLATFORM_HEADER <asm/machvec_dig.h> 3 - #include <asm/machvec_init.h>
-32
arch/ia64/dig/setup.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * Platform dependent support for DIG64 platforms. 4 - * 5 - * Copyright (C) 1999 Intel Corp. 6 - * Copyright (C) 1999, 2001 Hewlett-Packard Co 7 - * Copyright (C) 1999, 2001, 2003 David Mosberger-Tang <davidm@hpl.hp.com> 8 - * Copyright (C) 1999 VA Linux Systems 9 - * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> 10 - * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com> 11 - */ 12 - 13 - #include <linux/init.h> 14 - #include <linux/delay.h> 15 - #include <linux/kernel.h> 16 - #include <linux/string.h> 17 - #include <linux/screen_info.h> 18 - #include <linux/console.h> 19 - #include <linux/timex.h> 20 - #include <linux/sched.h> 21 - 22 - #include <asm/io.h> 23 - #include <asm/machvec.h> 24 - #include <asm/setup.h> 25 - 26 - void __init 27 - dig_setup (char **cmdline_p) 28 - { 29 - #ifdef CONFIG_SMP 30 - init_smp_config(); 31 - #endif 32 - }
+1 -1
arch/ia64/hp/common/Makefile
··· 6 6 # Copyright (C) Alex Williamson (alex_williamson@hp.com) 7 7 # 8 8 9 - obj-y := sba_iommu.o 9 + obj-$(CONFIG_IA64_HP_SBA_IOMMU) += sba_iommu.o 10 10 obj-$(CONFIG_IA64_HP_AML_NFW) += aml_nfw.o
-9
arch/ia64/hp/zx1/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - # 3 - # ia64/hp/zx1/Makefile 4 - # 5 - # Copyright (C) 2002 Hewlett Packard 6 - # Copyright (C) Alex Williamson (alex_williamson@hp.com) 7 - # 8 - 9 - obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o
-3
arch/ia64/hp/zx1/hpzx1_machvec.c
··· 1 - #define MACHVEC_PLATFORM_NAME hpzx1 2 - #define MACHVEC_PLATFORM_HEADER <asm/machvec_hpzx1.h> 3 - #include <asm/machvec_init.h>
-16
arch/ia64/include/asm/acpi.h
··· 32 32 #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ 33 33 static inline void disable_acpi(void) { } 34 34 35 - #ifdef CONFIG_IA64_GENERIC 36 - const char *acpi_get_sysname (void); 37 - #else 38 - static inline const char *acpi_get_sysname (void) 39 - { 40 - # if defined (CONFIG_IA64_HP_ZX1) 41 - return "hpzx1"; 42 - # elif defined (CONFIG_IA64_SGI_UV) 43 - return "uv"; 44 - # elif defined (CONFIG_IA64_DIG) 45 - return "dig"; 46 - # else 47 - # error Unknown platform. Fix acpi.c. 48 - # endif 49 - } 50 - #endif 51 35 int acpi_request_vector (u32 int_type); 52 36 int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); 53 37
+2 -3
arch/ia64/include/asm/hw_irq.h
··· 12 12 #include <linux/types.h> 13 13 #include <linux/profile.h> 14 14 15 - #include <asm/machvec.h> 16 15 #include <asm/ptrace.h> 17 16 #include <asm/smp.h> 18 17 ··· 55 56 extern int ia64_first_device_vector; 56 57 extern int ia64_last_device_vector; 57 58 58 - #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_DIG)) 59 + #ifdef CONFIG_SMP 59 60 /* Reserve the lower priority vector than device vectors for "move IRQ" IPI */ 60 61 #define IA64_IRQ_MOVE_VECTOR 0x30 /* "move IRQ" IPI */ 61 62 #define IA64_DEF_FIRST_DEVICE_VECTOR 0x31 ··· 126 127 extern void ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action); 127 128 extern void destroy_and_reserve_irq (unsigned int irq); 128 129 129 - #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) 130 + #ifdef CONFIG_SMP 130 131 extern int irq_prepare_move(int irq, int cpu); 131 132 extern void irq_complete_move(unsigned int irq); 132 133 #else
-1
arch/ia64/include/asm/io.h
··· 71 71 #define HAVE_ARCH_PIO_SIZE 72 72 73 73 #include <asm/intrinsics.h> 74 - #include <asm/machvec.h> 75 74 #include <asm/page.h> 76 75 #include <asm-generic/iomap.h> 77 76
-1
arch/ia64/include/asm/iommu.h
··· 15 15 #define no_iommu (1) 16 16 #define iommu_detected (0) 17 17 #endif 18 - extern void machvec_init(const char *name); 19 18 20 19 #endif
-69
arch/ia64/include/asm/machvec.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * Machine vector for IA-64. 4 - * 5 - * Copyright (C) 1999 Silicon Graphics, Inc. 6 - * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com> 7 - * Copyright (C) Vijay Chander <vijay@engr.sgi.com> 8 - * Copyright (C) 1999-2001, 2003-2004 Hewlett-Packard Co. 9 - * David Mosberger-Tang <davidm@hpl.hp.com> 10 - */ 11 - #ifndef _ASM_IA64_MACHVEC_H 12 - #define _ASM_IA64_MACHVEC_H 13 - 14 - #include <linux/types.h> 15 - 16 - struct device; 17 - 18 - typedef void ia64_mv_setup_t (char **); 19 - 20 - extern void machvec_setup (char **); 21 - 22 - # if defined (CONFIG_IA64_DIG) 23 - # include <asm/machvec_dig.h> 24 - # elif defined (CONFIG_IA64_HP_ZX1) 25 - # include <asm/machvec_hpzx1.h> 26 - # elif defined (CONFIG_IA64_SGI_UV) 27 - # include <asm/machvec_uv.h> 28 - # elif defined (CONFIG_IA64_GENERIC) 29 - 30 - # ifdef MACHVEC_PLATFORM_HEADER 31 - # include MACHVEC_PLATFORM_HEADER 32 - # else 33 - # define ia64_platform_name ia64_mv.name 34 - # define platform_setup ia64_mv.setup 35 - # endif 36 - 37 - /* __attribute__((__aligned__(16))) is required to make size of the 38 - * structure multiple of 16 bytes. 39 - * This will fillup the holes created because of section 3.3.1 in 40 - * Software Conventions guide. 41 - */ 42 - struct ia64_machine_vector { 43 - const char *name; 44 - ia64_mv_setup_t *setup; 45 - } __attribute__((__aligned__(16))); /* align attrib? see above comment */ 46 - 47 - #define MACHVEC_INIT(name) \ 48 - { \ 49 - #name, \ 50 - platform_setup, \ 51 - } 52 - 53 - extern struct ia64_machine_vector ia64_mv; 54 - extern void machvec_init (const char *name); 55 - extern void machvec_init_from_cmdline(const char *cmdline); 56 - 57 - # else 58 - # error Unknown configuration. Update arch/ia64/include/asm/machvec.h. 59 - # endif /* CONFIG_IA64_GENERIC */ 60 - 61 - /* 62 - * Define default versions so we can extend machvec for new platforms without having 63 - * to update the machvec files for all existing platforms. 64 - */ 65 - #ifndef platform_setup 66 - # define platform_setup machvec_setup 67 - #endif 68 - 69 - #endif /* _ASM_IA64_MACHVEC_H */
-17
arch/ia64/include/asm/machvec_dig.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_IA64_MACHVEC_DIG_h 3 - #define _ASM_IA64_MACHVEC_DIG_h 4 - 5 - extern ia64_mv_setup_t dig_setup; 6 - 7 - /* 8 - * This stuff has dual use! 9 - * 10 - * For a generic kernel, the macros are used to initialize the 11 - * platform's machvec structure. When compiling a non-generic kernel, 12 - * the macros are used directly. 13 - */ 14 - #define ia64_platform_name "dig" 15 - #define platform_setup dig_setup 16 - 17 - #endif /* _ASM_IA64_MACHVEC_DIG_h */
-17
arch/ia64/include/asm/machvec_hpzx1.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_IA64_MACHVEC_HPZX1_h 3 - #define _ASM_IA64_MACHVEC_HPZX1_h 4 - 5 - extern ia64_mv_setup_t dig_setup; 6 - 7 - /* 8 - * This stuff has dual use! 9 - * 10 - * For a generic kernel, the macros are used to initialize the 11 - * platform's machvec structure. When compiling a non-generic kernel, 12 - * the macros are used directly. 13 - */ 14 - #define ia64_platform_name "hpzx1" 15 - #define platform_setup dig_setup 16 - 17 - #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
-11
arch/ia64/include/asm/machvec_init.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #include <asm/iommu.h> 3 - #include <asm/machvec.h> 4 - 5 - #define MACHVEC_HELPER(name) \ 6 - struct ia64_machine_vector machvec_##name __attribute__ ((unused, __section__ (".machvec"))) \ 7 - = MACHVEC_INIT(name); 8 - 9 - #define MACHVEC_DEFINE(name) MACHVEC_HELPER(name) 10 - 11 - MACHVEC_DEFINE(MACHVEC_PLATFORM_NAME)
-26
arch/ia64/include/asm/machvec_uv.h
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * SGI UV Core Functions 7 - * 8 - * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. 9 - */ 10 - 11 - #ifndef _ASM_IA64_MACHVEC_UV_H 12 - #define _ASM_IA64_MACHVEC_UV_H 13 - 14 - extern ia64_mv_setup_t uv_setup; 15 - 16 - /* 17 - * This stuff has dual use! 18 - * 19 - * For a generic kernel, the macros are used to initialize the 20 - * platform's machvec structure. When compiling a non-generic kernel, 21 - * the macros are used directly. 22 - */ 23 - #define ia64_platform_name "uv" 24 - #define platform_setup uv_setup 25 - 26 - #endif /* _ASM_IA64_MACHVEC_UV_H */
+3 -10
arch/ia64/include/asm/mmzone.h
··· 27 27 return nid; 28 28 } 29 29 30 - #ifdef CONFIG_IA64_DIG /* DIG systems are small */ 31 - # define MAX_PHYSNODE_ID 8 32 - # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) 33 - #else 34 - # define MAX_PHYSNODE_ID 2048 35 - # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) 36 - #endif 37 - 38 - #else /* CONFIG_NUMA */ 39 - # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) 30 + #define MAX_PHYSNODE_ID 2048 40 31 #endif /* CONFIG_NUMA */ 32 + 33 + #define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) 41 34 42 35 #endif /* _ASM_IA64_MMZONE_H */
-2
arch/ia64/include/asm/processor.h
··· 679 679 680 680 void default_idle(void); 681 681 682 - #define ia64_platform_is(x) (strcmp(x, ia64_platform_name) == 0) 683 - 684 682 #endif /* !__ASSEMBLY__ */ 685 683 686 684 #endif /* _ASM_IA64_PROCESSOR_H */
-1
arch/ia64/include/asm/tlb.h
··· 45 45 #include <asm/pgalloc.h> 46 46 #include <asm/processor.h> 47 47 #include <asm/tlbflush.h> 48 - #include <asm/machvec.h> 49 48 50 49 #include <asm-generic/tlb.h> 51 50
+21 -2
arch/ia64/include/asm/uv/uv.h
··· 2 2 #ifndef _ASM_IA64_UV_UV_H 3 3 #define _ASM_IA64_UV_UV_H 4 4 5 + #ifdef CONFIG_IA64_SGI_UV 6 + extern bool ia64_is_uv; 7 + 5 8 static inline int is_uv_system(void) 6 9 { 7 - /* temporary support for running on hardware simulator */ 8 - return ia64_platform_is("uv"); 10 + return ia64_is_uv; 9 11 } 12 + 13 + void __init uv_probe_system_type(void); 14 + void __init uv_setup(char **cmdline_p); 15 + #else /* CONFIG_IA64_SGI_UV */ 16 + static inline int is_uv_system(void) 17 + { 18 + return false; 19 + } 20 + 21 + static inline void __init uv_probe_system_type(void) 22 + { 23 + } 24 + 25 + static inline void __init uv_setup(char **cmdline_p) 26 + { 27 + } 28 + #endif /* CONFIG_IA64_SGI_UV */ 10 29 11 30 #endif /* _ASM_IA64_UV_UV_H */
+2 -2
arch/ia64/kernel/Makefile
··· 10 10 extra-y := head.o vmlinux.lds 11 11 12 12 obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ 13 - irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \ 13 + irq_lsapic.o ivt.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \ 14 14 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \ 15 15 unwind.o mca.o mca_asm.o topology.o dma-mapping.o iosapic.o acpi.o \ 16 16 acpi-ext.o ··· 30 30 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 31 31 obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o 32 32 obj-$(CONFIG_AUDIT) += audit.o 33 - obj-$(CONFIG_PCI_MSI) += msi_ia64.o 33 + obj-y += msi_ia64.o 34 34 mca_recovery-y += mca_drv.o mca_drv_asm.o 35 35 obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o 36 36 obj-$(CONFIG_STACKTRACE) += stacktrace.o
-55
arch/ia64/kernel/acpi.c
··· 31 31 #include <acpi/processor.h> 32 32 #include <asm/io.h> 33 33 #include <asm/iosapic.h> 34 - #include <asm/machvec.h> 35 34 #include <asm/page.h> 36 35 #include <asm/numa.h> 37 36 #include <asm/sal.h> ··· 43 44 unsigned int acpi_cpei_phys_cpuid; 44 45 45 46 unsigned long acpi_wakeup_address = 0; 46 - 47 - #ifdef CONFIG_IA64_GENERIC 48 - static unsigned long __init acpi_find_rsdp(void) 49 - { 50 - unsigned long rsdp_phys = 0; 51 - 52 - if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) 53 - rsdp_phys = efi.acpi20; 54 - else if (efi.acpi != EFI_INVALID_TABLE_ADDR) 55 - printk(KERN_WARNING PREFIX 56 - "v1.0/r0.71 tables no longer supported\n"); 57 - return rsdp_phys; 58 - } 59 - 60 - const char __init * 61 - acpi_get_sysname(void) 62 - { 63 - unsigned long rsdp_phys; 64 - struct acpi_table_rsdp *rsdp; 65 - struct acpi_table_xsdt *xsdt; 66 - struct acpi_table_header *hdr; 67 - 68 - rsdp_phys = acpi_find_rsdp(); 69 - if (!rsdp_phys) { 70 - printk(KERN_ERR 71 - "ACPI 2.0 RSDP not found, default to \"dig\"\n"); 72 - return "dig"; 73 - } 74 - 75 - rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys); 76 - if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) { 77 - printk(KERN_ERR 78 - "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); 79 - return "dig"; 80 - } 81 - 82 - xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_physical_address); 83 - hdr = &xsdt->header; 84 - if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) { 85 - printk(KERN_ERR 86 - "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); 87 - return "dig"; 88 - } 89 - 90 - if (!strcmp(hdr->oem_id, "HP")) { 91 - return "hpzx1"; 92 - } else if (!strcmp(hdr->oem_id, "SGI")) { 93 - if (!strcmp(hdr->oem_table_id + 4, "UV")) 94 - return "uv"; 95 - } 96 - 97 - return "dig"; 98 - } 99 - #endif /* CONFIG_IA64_GENERIC */ 100 47 101 48 #define ACPI_MAX_PLATFORM_INTERRUPTS 256 102 49
-1
arch/ia64/kernel/iosapic.c
··· 93 93 #include <asm/hw_irq.h> 94 94 #include <asm/io.h> 95 95 #include <asm/iosapic.h> 96 - #include <asm/machvec.h> 97 96 #include <asm/processor.h> 98 97 #include <asm/ptrace.h> 99 98
+1 -4
arch/ia64/kernel/irq_ia64.c
··· 37 37 #include <asm/intrinsics.h> 38 38 #include <asm/io.h> 39 39 #include <asm/hw_irq.h> 40 - #include <asm/machvec.h> 41 40 #include <asm/pgtable.h> 42 41 #include <asm/tlbflush.h> 43 42 ··· 248 249 } 249 250 } 250 251 251 - #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) 252 + #ifdef CONFIG_SMP 252 253 253 254 static enum vector_domain_type { 254 255 VECTOR_DOMAIN_NONE, ··· 636 637 ia64_register_ipi(); 637 638 register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); 638 639 #ifdef CONFIG_SMP 639 - #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) 640 640 if (vector_domain_type != VECTOR_DOMAIN_NONE) 641 641 register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); 642 - #endif 643 642 #endif 644 643 #ifdef CONFIG_PERFMON 645 644 pfm_init_percpu();
-70
arch/ia64/kernel/machvec.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #include <linux/module.h> 3 - #include <linux/dma-mapping.h> 4 - #include <asm/machvec.h> 5 - 6 - #ifdef CONFIG_IA64_GENERIC 7 - 8 - #include <linux/kernel.h> 9 - #include <linux/string.h> 10 - 11 - #include <asm/page.h> 12 - 13 - struct ia64_machine_vector ia64_mv = { 14 - }; 15 - EXPORT_SYMBOL(ia64_mv); 16 - 17 - static struct ia64_machine_vector * __init 18 - lookup_machvec (const char *name) 19 - { 20 - extern struct ia64_machine_vector machvec_start[]; 21 - extern struct ia64_machine_vector machvec_end[]; 22 - struct ia64_machine_vector *mv; 23 - 24 - for (mv = machvec_start; mv < machvec_end; ++mv) 25 - if (strcmp (mv->name, name) == 0) 26 - return mv; 27 - 28 - return 0; 29 - } 30 - 31 - void __init 32 - machvec_init (const char *name) 33 - { 34 - struct ia64_machine_vector *mv; 35 - 36 - if (!name) 37 - name = acpi_get_sysname(); 38 - mv = lookup_machvec(name); 39 - if (!mv) 40 - panic("generic kernel failed to find machine vector for" 41 - " platform %s!", name); 42 - 43 - ia64_mv = *mv; 44 - printk(KERN_INFO "booting generic kernel on platform %s\n", name); 45 - } 46 - 47 - void __init 48 - machvec_init_from_cmdline(const char *cmdline) 49 - { 50 - char str[64]; 51 - const char *start; 52 - char *end; 53 - 54 - if (! (start = strstr(cmdline, "machvec=")) ) 55 - return machvec_init(NULL); 56 - 57 - strlcpy(str, start + strlen("machvec="), sizeof(str)); 58 - if ( (end = strchr(str, ' ')) ) 59 - *end = '\0'; 60 - 61 - return machvec_init(str); 62 - } 63 - 64 - #endif /* CONFIG_IA64_GENERIC */ 65 - 66 - void 67 - machvec_setup (char **arg) 68 - { 69 - } 70 - EXPORT_SYMBOL(machvec_setup);
-1
arch/ia64/kernel/mca.c
··· 91 91 #include <linux/gfp.h> 92 92 93 93 #include <asm/delay.h> 94 - #include <asm/machvec.h> 95 94 #include <asm/meminit.h> 96 95 #include <asm/page.h> 97 96 #include <asm/ptrace.h>
-1
arch/ia64/kernel/mca_drv.c
··· 26 26 #include <linux/slab.h> 27 27 28 28 #include <asm/delay.h> 29 - #include <asm/machvec.h> 30 29 #include <asm/page.h> 31 30 #include <asm/ptrace.h> 32 31 #include <asm/sal.h>
-1
arch/ia64/kernel/pci-dma.c
··· 10 10 #include <linux/module.h> 11 11 #include <linux/dmar.h> 12 12 #include <asm/iommu.h> 13 - #include <asm/machvec.h> 14 13 #include <linux/dma-mapping.h> 15 14 #include <linux/kernel.h> 16 15 #include <asm/page.h>
+12 -12
arch/ia64/kernel/setup.c
··· 52 52 #include <linux/kexec.h> 53 53 #include <linux/crash_dump.h> 54 54 55 - #include <asm/machvec.h> 56 55 #include <asm/mca.h> 57 56 #include <asm/meminit.h> 58 57 #include <asm/page.h> ··· 64 65 #include <asm/smp.h> 65 66 #include <asm/tlbflush.h> 66 67 #include <asm/unistd.h> 68 + #include <asm/uv/uv.h> 67 69 68 70 #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) 69 71 # error "struct cpuinfo_ia64 too big!" 70 72 #endif 73 + 74 + char ia64_platform_name[64]; 71 75 72 76 #ifdef CONFIG_SMP 73 77 unsigned long __per_cpu_offset[NR_CPUS]; ··· 267 265 */ 268 266 static int __init check_crashkernel_memory(unsigned long pbase, size_t size) 269 267 { 270 - if (ia64_platform_is("uv")) 268 + if (is_uv_system()) 271 269 return 1; 272 270 else 273 271 return pbase < (1UL << 32); ··· 560 558 efi_init(); 561 559 io_port_init(); 562 560 563 - #ifdef CONFIG_IA64_GENERIC 564 - /* machvec needs to be parsed from the command line 565 - * before parse_early_param() is called to ensure 566 - * that ia64_mv is initialised before any command line 567 - * settings may cause console setup to occur 568 - */ 569 - machvec_init_from_cmdline(*cmdline_p); 570 - #endif 571 - 561 + uv_probe_system_type(); 572 562 parse_early_param(); 573 563 574 564 if (early_console_setup(*cmdline_p) == 0) ··· 635 641 */ 636 642 ROOT_DEV = Root_SDA2; /* default to second partition on first drive */ 637 643 638 - platform_setup(cmdline_p); 644 + if (is_uv_system()) 645 + uv_setup(cmdline_p); 646 + #ifdef CONFIG_SMP 647 + else 648 + init_smp_config(); 649 + #endif 650 + 639 651 screen_info_setup(); 640 652 paging_init(); 641 653
-1
arch/ia64/kernel/smp.c
··· 36 36 #include <linux/atomic.h> 37 37 #include <asm/current.h> 38 38 #include <asm/delay.h> 39 - #include <asm/machvec.h> 40 39 #include <asm/io.h> 41 40 #include <asm/irq.h> 42 41 #include <asm/page.h>
-1
arch/ia64/kernel/smpboot.c
··· 47 47 #include <asm/delay.h> 48 48 #include <asm/io.h> 49 49 #include <asm/irq.h> 50 - #include <asm/machvec.h> 51 50 #include <asm/mca.h> 52 51 #include <asm/page.h> 53 52 #include <asm/pgalloc.h>
-1
arch/ia64/kernel/time.c
··· 25 25 #include <linux/platform_device.h> 26 26 #include <linux/sched/cputime.h> 27 27 28 - #include <asm/machvec.h> 29 28 #include <asm/delay.h> 30 29 #include <asm/hw_irq.h> 31 30 #include <asm/ptrace.h>
-10
arch/ia64/kernel/vmlinux.lds.S
··· 141 141 __end___mckinley_e9_bundles = .; 142 142 } 143 143 144 - #if defined(CONFIG_IA64_GENERIC) 145 - /* Machine Vector */ 146 - . = ALIGN(16); 147 - .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) { 148 - machvec_start = .; 149 - *(.machvec) 150 - machvec_end = .; 151 - } 152 - #endif 153 - 154 144 #ifdef CONFIG_SMP 155 145 . = ALIGN(PERCPU_PAGE_SIZE); 156 146 __cpu0_per_cpu = .;
-1
arch/ia64/mm/init.c
··· 28 28 29 29 #include <asm/dma.h> 30 30 #include <asm/io.h> 31 - #include <asm/machvec.h> 32 31 #include <asm/numa.h> 33 32 #include <asm/patch.h> 34 33 #include <asm/pgalloc.h>
+2 -4
arch/ia64/pci/fixup.c
··· 8 8 #include <linux/init.h> 9 9 #include <linux/vgaarb.h> 10 10 #include <linux/screen_info.h> 11 - 12 - #include <asm/machvec.h> 11 + #include <asm/uv/uv.h> 13 12 14 13 /* 15 14 * Fixup to mark boot BIOS video selected by BIOS before it changes ··· 34 35 u16 config; 35 36 struct resource *res; 36 37 37 - if ((strcmp(ia64_platform_name, "dig") != 0) 38 - && (strcmp(ia64_platform_name, "hpzx1") != 0)) 38 + if (is_uv_system()) 39 39 return; 40 40 /* Maybe, this machine supports legacy memory map. */ 41 41
-1
arch/ia64/pci/pci.c
··· 24 24 #include <linux/memblock.h> 25 25 #include <linux/export.h> 26 26 27 - #include <asm/machvec.h> 28 27 #include <asm/page.h> 29 28 #include <asm/io.h> 30 29 #include <asm/sal.h>
-1
arch/ia64/uv/kernel/Makefile
··· 10 10 ccflags-y := -Iarch/ia64/sn/include 11 11 12 12 obj-y += setup.o 13 - obj-$(CONFIG_IA64_GENERIC) += machvec.o
-11
arch/ia64/uv/kernel/machvec.c
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. 7 - */ 8 - 9 - #define MACHVEC_PLATFORM_NAME uv 10 - #define MACHVEC_PLATFORM_HEADER <asm/machvec_uv.h> 11 - #include <asm/machvec_init.h>
+34
arch/ia64/uv/kernel/setup.c
··· 8 8 * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. 9 9 */ 10 10 11 + #include <linux/acpi.h> 12 + #include <linux/efi.h> 11 13 #include <linux/module.h> 12 14 #include <linux/percpu.h> 15 + #include <asm/uv/uv.h> 13 16 #include <asm/uv/uv_mmrs.h> 14 17 #include <asm/uv/uv_hub.h> 18 + 19 + bool ia64_is_uv; 20 + EXPORT_SYMBOL_GPL(ia64_is_uv); 15 21 16 22 DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); 17 23 EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); ··· 51 45 } 52 46 } 53 47 BUG(); 48 + } 49 + 50 + void __init uv_probe_system_type(void) 51 + { 52 + struct acpi_table_rsdp *rsdp; 53 + struct acpi_table_xsdt *xsdt; 54 + 55 + if (efi.acpi20 == EFI_INVALID_TABLE_ADDR) { 56 + pr_err("ACPI 2.0 RSDP not found.\n"); 57 + return; 58 + } 59 + 60 + rsdp = (struct acpi_table_rsdp *)__va(efi.acpi20); 61 + if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) { 62 + pr_err("ACPI 2.0 RSDP signature incorrect.\n"); 63 + return; 64 + } 65 + 66 + xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_physical_address); 67 + if (strncmp(xsdt->header.signature, ACPI_SIG_XSDT, 68 + sizeof(ACPI_SIG_XSDT) - 1)) { 69 + pr_err("ACPI 2.0 XSDT signature incorrect.\n"); 70 + return; 71 + } 72 + 73 + if (!strcmp(xsdt->header.oem_id, "SGI") && 74 + !strcmp(xsdt->header.oem_table_id + 4, "UV")) 75 + ia64_is_uv = true; 54 76 } 55 77 56 78 void __init uv_setup(char **cmdline_p)
+1 -1
drivers/acpi/Kconfig
··· 323 323 bool "NUMA support" 324 324 depends on NUMA 325 325 depends on (X86 || IA64 || ARM64) 326 - default y if IA64_GENERIC || ARM64 326 + default y if IA64 || ARM64 327 327 328 328 config ACPI_CUSTOM_DSDT_FILE 329 329 string "Custom DSDT Table file to include"
+2 -2
drivers/char/agp/Kconfig
··· 111 111 112 112 config AGP_I460 113 113 tristate "Intel 460GX chipset support" 114 - depends on AGP && (IA64_DIG || IA64_GENERIC) 114 + depends on AGP && IA64 115 115 help 116 116 This option gives you AGP GART support for the Intel 460GX chipset 117 117 for IA64 processors. 118 118 119 119 config AGP_HP_ZX1 120 120 tristate "HP ZX1 chipset AGP support" 121 - depends on AGP && (IA64_HP_ZX1 || IA64_GENERIC) 121 + depends on AGP && IA64 122 122 help 123 123 This option gives you AGP GART support for the HP ZX1 chipset 124 124 for IA64 processors.
+1 -1
drivers/iommu/Kconfig
··· 177 177 178 178 config INTEL_IOMMU 179 179 bool "Support for Intel IOMMU using DMA Remapping Devices" 180 - depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC) 180 + depends on PCI_MSI && ACPI && (X86 || IA64) 181 181 select IOMMU_API 182 182 select IOMMU_IOVA 183 183 select NEED_DMA_MAP_STATE
+1 -1
drivers/misc/Kconfig
··· 188 188 config SGI_XP 189 189 tristate "Support communication between SGI SSIs" 190 190 depends on NET 191 - depends on (IA64_GENERIC || IA64_SGI_UV || X86_UV) && SMP 191 + depends on (IA64_SGI_UV || X86_UV) && SMP 192 192 depends on X86_64 || BROKEN 193 193 select SGI_GRU if X86_64 && SMP 194 194 ---help---
+3 -3
drivers/misc/sgi-xp/xp_uv.c
··· 17 17 #include <asm/uv/uv_hub.h> 18 18 #if defined CONFIG_X86_64 19 19 #include <asm/uv/bios.h> 20 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 20 + #elif defined CONFIG_IA64_SGI_UV 21 21 #include <asm/sn/sn_sal.h> 22 22 #endif 23 23 #include "../sgi-gru/grukservices.h" ··· 99 99 return xpBiosError; 100 100 } 101 101 102 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 102 + #elif defined CONFIG_IA64_SGI_UV 103 103 u64 nasid_array; 104 104 105 105 ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_1, ··· 129 129 return xpBiosError; 130 130 } 131 131 132 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 132 + #elif defined CONFIG_IA64_SGI_UV 133 133 u64 nasid_array; 134 134 135 135 ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_0,
+7 -7
drivers/misc/sgi-xp/xpc_uv.c
··· 27 27 #if defined CONFIG_X86_64 28 28 #include <asm/uv/bios.h> 29 29 #include <asm/uv/uv_irq.h> 30 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 30 + #elif defined CONFIG_IA64_SGI_UV 31 31 #include <asm/sn/intr.h> 32 32 #include <asm/sn/sn_sal.h> 33 33 #endif ··· 35 35 #include "../sgi-gru/grukservices.h" 36 36 #include "xpc.h" 37 37 38 - #if defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 38 + #if defined CONFIG_IA64_SGI_UV 39 39 struct uv_IO_APIC_route_entry { 40 40 __u64 vector : 8, 41 41 delivery_mode : 3, ··· 121 121 122 122 mq->mmr_value = uv_read_global_mmr64(mmr_pnode, mq->mmr_offset); 123 123 124 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 124 + #elif defined CONFIG_IA64_SGI_UV 125 125 if (strcmp(irq_name, XPC_ACTIVATE_IRQ_NAME) == 0) 126 126 mq->irq = SGI_XPC_ACTIVATE; 127 127 else if (strcmp(irq_name, XPC_NOTIFY_IRQ_NAME) == 0) ··· 144 144 #if defined CONFIG_X86_64 145 145 uv_teardown_irq(mq->irq); 146 146 147 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 147 + #elif defined CONFIG_IA64_SGI_UV 148 148 int mmr_pnode; 149 149 unsigned long mmr_value; 150 150 ··· 162 162 { 163 163 int ret; 164 164 165 - #if defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 165 + #if defined CONFIG_IA64_SGI_UV 166 166 int mmr_pnode = uv_blade_to_pnode(mq->mmr_blade); 167 167 168 168 ret = sn_mq_watchlist_alloc(mmr_pnode, (void *)uv_gpa(mq->address), ··· 197 197 #if defined CONFIG_X86_64 198 198 ret = uv_bios_mq_watchlist_free(mmr_pnode, mq->watchlist_num); 199 199 BUG_ON(ret != BIOS_STATUS_SUCCESS); 200 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 200 + #elif defined CONFIG_IA64_SGI_UV 201 201 ret = sn_mq_watchlist_free(mmr_pnode, mq->watchlist_num); 202 202 BUG_ON(ret != SALRET_OK); 203 203 #else ··· 796 796 else 797 797 ret = xpBiosError; 798 798 799 - #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV 799 + #elif defined CONFIG_IA64_SGI_UV 800 800 status = sn_partition_reserved_page_pa((u64)buf, cookie, rp_pa, len); 801 801 if (status == SALRET_OK) 802 802 ret = xpSuccess;