Skip to contentSkip to conversation

RFC: remove sn2, hpsim and ia64 machvecs v2

PATCH In review Christoph Hellwig 2 participants 31 messages Aug 13, 2019

Subsystems (14)
Documentation SCSI ACPI PCI +10 more subsystems
lore
Share & tools
lore
#0 lore raw

[adding some ex-SGI folks to comment as well]

Hi Tony,

let me know what you think of this series. This drops the pretty much dead sn2 and hpsim support, which then allows us to build a single ia64 kernel image that supports all remaining systems without extra indirections in the fast path.

A git tree is also available at:

git://git.infradead.org/users/hch/misc.git ia64-remove-machvecs

Gitweb:

http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/ia64-remove-machvecs

Changes since v1:
- restore !NUMA support
- fix compile for configs

#1 lore raw

PATCH 1/28 char: remove the SGI snsc driver

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 arch/ia64/configs/generic_defconfig   |   1 -
 arch/ia64/configs/gensparse_defconfig |   1 -
 drivers/char/Kconfig                  |   8 -
 drivers/char/Makefile                 |   1 -
 drivers/char/snsc.c                   | 469 --------------------------
 drivers/char/snsc.h                   |  92 -----
 drivers/char/snsc_event.c             | 303 -----------------
 7 files changed, 875 deletions(-)
 delete mode 100644 drivers/char/snsc.c
 delete mode 100644 drivers/char/snsc.h
 delete mode 100644 drivers/char/snsc_event.c
arch/ia64/configs/generic_defconfig +0 -1
index 81f686dee53c..22b98ddc9913 100644
@@ -90,7 +90,6 @@ CONFIG_IGB=y
 # CONFIG_SERIO_SERPORT is not set
 CONFIG_GAMEPORT=m
 CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_SGI_SNSC=y
 CONFIG_SGI_TIOCX=y
 CONFIG_SGI_MBCS=m
 CONFIG_SERIAL_8250=y
arch/ia64/configs/gensparse_defconfig +0 -1
index 5b4fcdd51457..1d230c0a90bd 100644
@@ -79,7 +79,6 @@ CONFIG_E1000=y
 # CONFIG_SERIO_SERPORT is not set
 CONFIG_GAMEPORT=m
 CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_SGI_SNSC=y
 CONFIG_SGI_TIOCX=y
 CONFIG_SGI_MBCS=m
 CONFIG_SERIAL_8250=y
drivers/char/Kconfig +0 -8
index 3e866885a405..c9fbbc6a3967 100644
@@ -26,14 +26,6 @@ config DEVKMEM
 	  kind of kernel debugging operations.
 	  When in doubt, say "N".
 
-config SGI_SNSC
-	bool "SGI Altix system controller communication support"
-	depends on (IA64_SGI_SN2 || IA64_GENERIC)
-	help
-	  If you have an SGI Altix and you want to enable system
-	  controller communication from user space (you want this!),
-	  say Y.  Otherwise, say N.
-
 config SGI_TIOCX
        bool "SGI TIO CX driver support"
        depends on (IA64_SGI_SN2 || IA64_GENERIC)
drivers/char/Makefile +0 -1
index fbea7dd12932..50835d420471 100644
@@ -9,7 +9,6 @@ obj-y				+= misc.o
 obj-$(CONFIG_ATARI_DSP56K)	+= dsp56k.o
 obj-$(CONFIG_VIRTIO_CONSOLE)	+= virtio_console.o
 obj-$(CONFIG_RAW_DRIVER)	+= raw.o
-obj-$(CONFIG_SGI_SNSC)		+= snsc.o snsc_event.o
 obj-$(CONFIG_MSPEC)		+= mspec.o
 obj-$(CONFIG_UV_MMTIMER)	+= uv_mmtimer.o
 obj-$(CONFIG_IBM_BSR)		+= bsr.o
drivers/char/snsc.c deleted +0 -469

469 lines not on this page · raw message

drivers/char/snsc.h deleted +0 -92

92 lines not on this page · raw message

drivers/char/snsc_event.c deleted +0 -303

303 lines not on this page · raw message

Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/28 char: remove the SGI tiocx/mbcs driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 arch/ia64/configs/generic_defconfig   |   2 -
 arch/ia64/configs/gensparse_defconfig |   2 -
 arch/ia64/sn/kernel/Makefile          |   1 -
 arch/ia64/sn/kernel/tiocx.c           | 569 ------------------
 drivers/char/Kconfig                  |  14 -
 drivers/char/Makefile                 |   1 -
 drivers/char/mbcs.c                   | 831 --------------------------
 drivers/char/mbcs.h                   | 553 -----------------
 8 files changed, 1973 deletions(-)
 delete mode 100644 arch/ia64/sn/kernel/tiocx.c
 delete mode 100644 drivers/char/mbcs.c
 delete mode 100644 drivers/char/mbcs.h
arch/ia64/configs/generic_defconfig +0 -2
index 22b98ddc9913..1fc4d5a77e0d 100644
@@ -90,8 +90,6 @@ CONFIG_IGB=y
 # CONFIG_SERIO_SERPORT is not set
 CONFIG_GAMEPORT=m
 CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
arch/ia64/configs/gensparse_defconfig +0 -2
index 1d230c0a90bd..289ed714ad8b 100644
@@ -79,8 +79,6 @@ CONFIG_E1000=y
 # CONFIG_SERIO_SERPORT is not set
 CONFIG_GAMEPORT=m
 CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
arch/ia64/sn/kernel/Makefile +0 -1
index 9c349dd23265..2f580603370d 100644
@@ -14,5 +14,4 @@ obj-y				+= setup.o bte.o bte_error.o irq.o mca.o idle.o \
 				   io_init.o iomv.o klconflib.o pio_phys.o \
 				   sn2/
 obj-$(CONFIG_IA64_GENERIC)      += machvec.o
-obj-$(CONFIG_SGI_TIOCX)		+= tiocx.o
 obj-$(CONFIG_PCI_MSI)		+= msi_sn.o
arch/ia64/sn/kernel/tiocx.c deleted +0 -568

568 lines not on this page · raw message

drivers/char/Kconfig +0 -14
index c9fbbc6a3967..96156c729a31 100644
@@ -26,20 +26,6 @@ config DEVKMEM
 	  kind of kernel debugging operations.
 	  When in doubt, say "N".
 
-config SGI_TIOCX
-       bool "SGI TIO CX driver support"
-       depends on (IA64_SGI_SN2 || IA64_GENERIC)
-       help
-         If you have an SGI Altix and you have fpga devices attached
-         to your TIO, say Y here, otherwise say N.
-
-config SGI_MBCS
-       tristate "SGI FPGA Core Services driver support"
-       depends on SGI_TIOCX
-       help
-         If you have an SGI Altix with an attached SABrick
-         say Y or M here, otherwise say N.
-
 source "drivers/tty/serial/Kconfig"
 source "drivers/tty/serdev/Kconfig"
 
drivers/char/Makefile +0 -1
index 50835d420471..7c5ea6f9df14 100644
@@ -12,7 +12,6 @@ obj-$(CONFIG_RAW_DRIVER)	+= raw.o
 obj-$(CONFIG_MSPEC)		+= mspec.o
 obj-$(CONFIG_UV_MMTIMER)	+= uv_mmtimer.o
 obj-$(CONFIG_IBM_BSR)		+= bsr.o
-obj-$(CONFIG_SGI_MBCS)		+= mbcs.o
 
 obj-$(CONFIG_PRINTER)		+= lp.o
 
drivers/char/mbcs.c deleted +0 -825

825 lines not on this page · raw message

drivers/char/mbcs.h deleted +0 -553

553 lines not on this page · raw message

Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/28 char/agp: remove the sgi-agp driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 arch/ia64/configs/generic_defconfig   |   1 -
 arch/ia64/configs/gensparse_defconfig |   1 -
 drivers/char/agp/Kconfig              |   7 -
 drivers/char/agp/Makefile             |   1 -
 drivers/char/agp/sgi-agp.c            | 338 --------------------------
 5 files changed, 348 deletions(-)
 delete mode 100644 drivers/char/agp/sgi-agp.c
arch/ia64/configs/generic_defconfig +0 -1
index 1fc4d5a77e0d..79b88384c885 100644
@@ -104,7 +104,6 @@ CONFIG_HPET=y
 CONFIG_AGP=m
 CONFIG_AGP_I460=m
 CONFIG_AGP_HP_ZX1=m
-CONFIG_AGP_SGI_TIOCA=m
 CONFIG_DRM=m
 CONFIG_DRM_TDFX=m
 CONFIG_DRM_R128=m
arch/ia64/configs/gensparse_defconfig +0 -1
index 289ed714ad8b..f1490580ed69 100644
@@ -94,7 +94,6 @@ CONFIG_HPET=y
 CONFIG_AGP=m
 CONFIG_AGP_I460=m
 CONFIG_AGP_HP_ZX1=m
-CONFIG_AGP_SGI_TIOCA=m
 CONFIG_DRM=m
 CONFIG_DRM_TDFX=m
 CONFIG_DRM_R128=m
drivers/char/agp/Kconfig +0 -7
index 6231714ef3c8..be50d7a93f4c 100644
@@ -150,13 +150,6 @@ config AGP_EFFICEON
 	  This option gives you AGP support for the Transmeta Efficeon
 	  series processors with integrated northbridges.
 
-config AGP_SGI_TIOCA
-        tristate "SGI TIO chipset AGP support"
-        depends on AGP && (IA64_SGI_SN2 || IA64_GENERIC)
-        help
-          This option gives you AGP GART support for the SGI TIO chipset
-          for IA64 processors.
-
 config INTEL_GTT
 	tristate
 	depends on X86 && PCI
drivers/char/agp/Makefile +0 -1
index 4a786ffd9dee..cb2497d157f6 100644
@@ -16,7 +16,6 @@ obj-$(CONFIG_AGP_I460)		+= i460-agp.o
 obj-$(CONFIG_AGP_INTEL)		+= intel-agp.o
 obj-$(CONFIG_INTEL_GTT)		+= intel-gtt.o
 obj-$(CONFIG_AGP_NVIDIA)	+= nvidia-agp.o
-obj-$(CONFIG_AGP_SGI_TIOCA)	+= sgi-agp.o
 obj-$(CONFIG_AGP_SIS)		+= sis-agp.o
 obj-$(CONFIG_AGP_SWORKS)	+= sworks-agp.o
 obj-$(CONFIG_AGP_UNINORTH)	+= uninorth-agp.o
drivers/char/agp/sgi-agp.c deleted +0 -331

331 lines not on this page · raw message

Signature · 1 line
2.20.1
#4 lore raw

PATCH 4/28 ide: remove the sgiioc4 driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 arch/ia64/configs/generic_defconfig   |   1 -
 arch/ia64/configs/gensparse_defconfig |   1 -
 drivers/Kconfig                       |   2 -
 drivers/ide/Kconfig                   |   9 -
 drivers/ide/Makefile                  |   1 -
 drivers/ide/sgiioc4.c                 | 630 --------------------------
 6 files changed, 644 deletions(-)
 delete mode 100644 drivers/ide/sgiioc4.c
arch/ia64/configs/generic_defconfig +0 -1
index 79b88384c885..a41afb3ef209 100644
@@ -51,7 +51,6 @@ CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_GENERIC=y
 CONFIG_BLK_DEV_CMD64X=y
 CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_SGIIOC4=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_CHR_DEV_ST=m
 CONFIG_BLK_DEV_SR=m
arch/ia64/configs/gensparse_defconfig +0 -1
index f1490580ed69..07484aa6f16f 100644
@@ -44,7 +44,6 @@ CONFIG_IDE_GENERIC=y
 CONFIG_BLK_DEV_GENERIC=y
 CONFIG_BLK_DEV_CMD64X=y
 CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_SGIIOC4=y
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_CHR_DEV_ST=m
drivers/Kconfig +0 -2
index 61cf4ea2c229..477d63d0364d 100644
@@ -30,8 +30,6 @@ source "drivers/block/Kconfig"
 
 source "drivers/nvme/Kconfig"
 
-# misc before ide - BLK_DEV_SGIIOC4 depends on SGI_IOC4
-
 source "drivers/misc/Kconfig"
 
 source "drivers/ide/Kconfig"
drivers/ide/Kconfig +0 -9
index 9eada392df15..1c227ea8ecd3 100644
@@ -567,15 +567,6 @@ config BLK_DEV_SVWKS
 	  This driver adds PIO/(U)DMA support for the ServerWorks OSB4/CSB5
 	  chipsets.
 
-config BLK_DEV_SGIIOC4
-	tristate "Silicon Graphics IOC4 chipset ATA/ATAPI support"
-	depends on (IA64_SGI_SN2 || IA64_GENERIC) && SGI_IOC4
-	select BLK_DEV_IDEDMA_PCI
-	help
-	  This driver adds PIO & MultiMode DMA-2 support for the SGI IOC4
-	  chipset, which has one channel and can support two devices.
-	  Please say Y here if you have an Altix System from SGI.
-
 config BLK_DEV_SIIMAGE
 	tristate "Silicon Image chipset support"
 	select BLK_DEV_IDEDMA_PCI
drivers/ide/Makefile +0 -1
index 9f617a77970f..cac02db4098d 100644
@@ -59,7 +59,6 @@ obj-$(CONFIG_BLK_DEV_PDC202XX_NEW)	+= pdc202xx_new.o
 obj-$(CONFIG_BLK_DEV_PIIX)		+= piix.o
 obj-$(CONFIG_BLK_DEV_RZ1000)		+= rz1000.o
 obj-$(CONFIG_BLK_DEV_SVWKS)		+= serverworks.o
-obj-$(CONFIG_BLK_DEV_SGIIOC4)		+= sgiioc4.o
 obj-$(CONFIG_BLK_DEV_SIIMAGE)		+= siimage.o
 obj-$(CONFIG_BLK_DEV_SIS5513)		+= sis5513.o
 obj-$(CONFIG_BLK_DEV_SL82C105)		+= sl82c105.o
drivers/ide/sgiioc4.c deleted +0 -627

627 lines not on this page · raw message

Signature · 1 line
2.20.1
#5 lore raw

PATCH 5/28 PCI/hotplug: remove the sgi_hotplug driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 drivers/pci/hotplug/Kconfig       |   9 -
 drivers/pci/hotplug/Makefile      |   1 -
 drivers/pci/hotplug/sgi_hotplug.c | 700 ------------------------------
 3 files changed, 710 deletions(-)
 delete mode 100644 drivers/pci/hotplug/sgi_hotplug.c
drivers/pci/hotplug/Kconfig +0 -9
index e9f78eb390d2..e7b493c22bf3 100644
@@ -147,15 +147,6 @@ config HOTPLUG_PCI_RPA_DLPAR
 
 	  When in doubt, say N.
 
-config HOTPLUG_PCI_SGI
-	tristate "SGI PCI Hotplug Support"
-	depends on IA64_SGI_SN2 || IA64_GENERIC
-	help
-	  Say Y here if you want to use the SGI Altix Hotplug
-	  Driver for PCI devices.
-
-	  When in doubt, say N.
-
 config HOTPLUG_PCI_S390
 	bool "System z PCI Hotplug Support"
 	depends on S390 && 64BIT
drivers/pci/hotplug/Makefile +0 -1
index 7e3331603714..5196983220df 100644
@@ -18,7 +18,6 @@ obj-$(CONFIG_HOTPLUG_PCI_SHPC)		+= shpchp.o
 obj-$(CONFIG_HOTPLUG_PCI_POWERNV)	+= pnv-php.o
 obj-$(CONFIG_HOTPLUG_PCI_RPA)		+= rpaphp.o
 obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR)	+= rpadlpar_io.o
-obj-$(CONFIG_HOTPLUG_PCI_SGI)		+= sgi_hotplug.o
 obj-$(CONFIG_HOTPLUG_PCI_ACPI)		+= acpiphp.o
 obj-$(CONFIG_HOTPLUG_PCI_S390)		+= s390_pci_hpc.o
 
drivers/pci/hotplug/sgi_hotplug.c deleted +0 -700

700 lines not on this page · raw message

Signature · 1 line
2.20.1
#6 lore raw

PATCH 6/28 tty/serial: remove the sn_console driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 arch/ia64/configs/generic_defconfig   |    1 -
 arch/ia64/configs/gensparse_defconfig |    1 -
 arch/ia64/kernel/setup.c              |    7 -
 drivers/tty/serial/Kconfig            |   10 -
 drivers/tty/serial/Makefile           |    1 -
 drivers/tty/serial/sn_console.c       | 1036 -------------------------
 6 files changed, 1056 deletions(-)
 delete mode 100644 drivers/tty/serial/sn_console.c
arch/ia64/configs/generic_defconfig +0 -1
index a41afb3ef209..62698ea5d3f2 100644
@@ -94,7 +94,6 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
 CONFIG_SERIAL_SGI_IOC4=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_EFI_RTC=y
arch/ia64/configs/gensparse_defconfig +0 -1
index 07484aa6f16f..b910318f2348 100644
@@ -83,7 +83,6 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
 CONFIG_SERIAL_SGI_IOC4=y
 CONFIG_SERIAL_SGI_IOC3=y
 # CONFIG_HW_RANDOM is not set
arch/ia64/kernel/setup.c +0 -7
index c9cfa760cd57..a0480a4e65c1 100644
@@ -463,13 +463,6 @@ early_console_setup (char *cmdline)
 {
 	int earlycons = 0;
 
-#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
-	{
-		extern int sn_serial_console_early_setup(void);
-		if (!sn_serial_console_early_setup())
-			earlycons++;
-	}
-#endif
 #ifdef CONFIG_EFI_PCDP
 	if (!efi_setup_pcdp_console(cmdline))
 		earlycons++;
drivers/tty/serial/Kconfig +0 -10
index 3083dbae35f7..e9930af78acc 100644
@@ -855,16 +855,6 @@ config SERIAL_CPM_CONSOLE
 	  your boot loader (lilo or loadlin) about how to pass options to the
 	  kernel at boot time.)
 
-config SERIAL_SGI_L1_CONSOLE
-	bool "SGI Altix L1 serial console support"
-	depends on IA64_GENERIC || IA64_SGI_SN2
-	select SERIAL_CORE
-	select SERIAL_CORE_CONSOLE
-	help
-		If you have an SGI Altix and you would like to use the system
-		controller serial port as your console (you want this!),
-		say Y.  Otherwise, say N.
-
 config SERIAL_PIC32
 	tristate "Microchip PIC32 serial support"
 	depends on MACH_PIC32
drivers/tty/serial/Makefile +0 -1
index 15a0fccadf7e..caa978980a6e 100644
@@ -41,7 +41,6 @@ obj-$(CONFIG_SERIAL_HS_LPC32XX) += lpc32xx_hs.o
 obj-$(CONFIG_SERIAL_DZ) += dz.o
 obj-$(CONFIG_SERIAL_ZS) += zs.o
 obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
-obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o
 obj-$(CONFIG_SERIAL_CPM) += cpm_uart/
 obj-$(CONFIG_SERIAL_IMX) += imx.o
 obj-$(CONFIG_SERIAL_MPC52xx) += mpc52xx_uart.o
drivers/tty/serial/sn_console.c deleted +0 -1030

1,030 lines not on this page · raw message

Signature · 1 line
2.20.1
#7 lore raw

PATCH 7/28 tty/serial: remove the ioc4_serial driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 arch/ia64/configs/generic_defconfig   |    1 -
 arch/ia64/configs/gensparse_defconfig |    1 -
 drivers/tty/serial/Kconfig            |    9 -
 drivers/tty/serial/Makefile           |    1 -
 drivers/tty/serial/ioc4_serial.c      | 2955 -------------------------
 5 files changed, 2967 deletions(-)
 delete mode 100644 drivers/tty/serial/ioc4_serial.c
arch/ia64/configs/generic_defconfig +0 -1
index 62698ea5d3f2..8dd921dce4b5 100644
@@ -94,7 +94,6 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_SGI_IOC4=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_EFI_RTC=y
 CONFIG_RAW_DRIVER=m
arch/ia64/configs/gensparse_defconfig +0 -1
index b910318f2348..6e450a4fc93e 100644
@@ -83,7 +83,6 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_SGI_IOC4=y
 CONFIG_SERIAL_SGI_IOC3=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_EFI_RTC=y
drivers/tty/serial/Kconfig +0 -9
index e9930af78acc..d33bd894b9f2 100644
@@ -972,15 +972,6 @@ config SERIAL_JSM
 	  To compile this driver as a module, choose M here: the
 	  module will be called jsm.
 
-config SERIAL_SGI_IOC4
-	tristate "SGI IOC4 controller serial support"
-	depends on (IA64_GENERIC || IA64_SGI_SN2) && SGI_IOC4
-	select SERIAL_CORE
-	help
-		If you have an SGI Altix with an IOC4 based Base IO card
-		and wish to use the serial ports on this card, say Y.
-		Otherwise, say N.
-
 config SERIAL_SGI_IOC3
 	tristate "SGI Altix IOC3 serial support"
 	depends on (IA64_GENERIC || IA64_SGI_SN2) && SGI_IOC3
drivers/tty/serial/Makefile +0 -1
index caa978980a6e..df8f9a8f7651 100644
@@ -52,7 +52,6 @@ obj-$(CONFIG_SERIAL_SC16IS7XX_CORE) += sc16is7xx.o
 obj-$(CONFIG_SERIAL_JSM) += jsm/
 obj-$(CONFIG_SERIAL_TXX9) += serial_txx9.o
 obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o
-obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o
 obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o
 obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o
 obj-$(CONFIG_SERIAL_UARTLITE) += uartlite.o
drivers/tty/serial/ioc4_serial.c deleted +0 -2952

2,952 lines not on this page · raw message

Signature · 1 line
2.20.1
#8 lore raw

PATCH 8/28 tty/serial: remove the ioc3_serial driver

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed. Remove this driver that depends on the SN2 support.

---
 MAINTAINERS                           |    6 -
 arch/ia64/configs/gensparse_defconfig |    1 -
 drivers/tty/serial/Kconfig            |    8 -
 drivers/tty/serial/Makefile           |    1 -
 drivers/tty/serial/ioc3_serial.c      | 2195 -------------------------
 5 files changed, 2211 deletions(-)
 delete mode 100644 drivers/tty/serial/ioc3_serial.c
MAINTAINERS +0 -6
index e81e60bd7c26..4804c03ac7ba 100644
@@ -8400,12 +8400,6 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/ethernet/sgi/ioc3-eth.c
 
-IOC3 SERIAL DRIVER
-M:	Pat Gefre <[email protected]>
-L:	[email protected]
-S:	Maintained
-F:	drivers/tty/serial/ioc3_serial.c
-
 IOMAP FILESYSTEM LIBRARY
 M:	Christoph Hellwig <[email protected]>
 M:	Darrick J. Wong <[email protected]>
arch/ia64/configs/gensparse_defconfig +0 -1
index 6e450a4fc93e..d82d07d060d6 100644
@@ -83,7 +83,6 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_SGI_IOC3=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_EFI_RTC=y
 CONFIG_RAW_DRIVER=m
drivers/tty/serial/Kconfig +0 -8
index d33bd894b9f2..2f631501c75f 100644
@@ -972,14 +972,6 @@ config SERIAL_JSM
 	  To compile this driver as a module, choose M here: the
 	  module will be called jsm.
 
-config SERIAL_SGI_IOC3
-	tristate "SGI Altix IOC3 serial support"
-	depends on (IA64_GENERIC || IA64_SGI_SN2) && SGI_IOC3
-	select SERIAL_CORE
-	help
-	  If you have an SGI Altix with an IOC3 serial card,
-	  say Y or M.  Otherwise, say N.
-
 config SERIAL_MSM
 	tristate "MSM on-chip serial port support"
 	depends on ARCH_QCOM
drivers/tty/serial/Makefile +0 -1
index df8f9a8f7651..d2f44879384e 100644
@@ -52,7 +52,6 @@ obj-$(CONFIG_SERIAL_SC16IS7XX_CORE) += sc16is7xx.o
 obj-$(CONFIG_SERIAL_JSM) += jsm/
 obj-$(CONFIG_SERIAL_TXX9) += serial_txx9.o
 obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o
-obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o
 obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o
 obj-$(CONFIG_SERIAL_UARTLITE) += uartlite.o
 obj-$(CONFIG_SERIAL_MSM) += msm_serial.o
drivers/tty/serial/ioc3_serial.c deleted +0 -2193

2,193 lines not on this page · raw message

Signature · 1 line
2.20.1
#9 lore raw

PATCH 9/28 char/mspec: remove SGI SN2 support

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed, so drop the bits specific to it from this driver.

---
 drivers/char/mspec.c | 155 +++----------------------------------------
 1 file changed, 11 insertions(+), 144 deletions(-)
drivers/char/mspec.c +11 -144
index e75c9df7c2d8..a9d9f074fbd6 100644
@@ -9,11 +9,8 @@
  *
  * This driver exports the SN special memory (mspec) facility to user
  * processes.
- * There are three types of memory made available thru this driver:
- * fetchops, uncached and cached.
- *
- * Fetchops are atomic memory operations that are implemented in the
- * memory controller on SGI SN hardware.
+ * There are two types of memory made available thru this driver:
+ * uncached and cached.
  *
  * Uncached are used for memory write combining feature of the ia64
  * cpu.
@@ -46,16 +43,8 @@
 #include <linux/atomic.h>
 #include <asm/tlbflush.h>
 #include <asm/uncached.h>
-#include <asm/sn/addrs.h>
-#include <asm/sn/arch.h>
-#include <asm/sn/mspec.h>
-#include <asm/sn/sn_cpuid.h>
-#include <asm/sn/io.h>
-#include <asm/sn/bte.h>
-#include <asm/sn/shubio.h>
 
 
-#define FETCHOP_ID	"SGI Fetchop,"
 #define CACHED_ID	"Cached,"
 #define UNCACHED_ID	"Uncached"
 #define REVISION	"4.0"
@@ -65,17 +54,10 @@
  * Page types allocated by the device.
  */
 enum mspec_page_type {
-	MSPEC_FETCHOP = 1,
-	MSPEC_CACHED,
+	MSPEC_CACHED = 2,
 	MSPEC_UNCACHED
 };
 
-#ifdef CONFIG_SGI_SN
-static int is_sn2;
-#else
-#define is_sn2		0
-#endif
-
 /*
  * One of these structures is allocated when an mspec region is mmaped. The
  * structure is pointed to by the vma->vm_private_data field in the vma struct.
@@ -96,39 +78,6 @@ struct vma_data {
 	unsigned long maddr[0];	/* Array of MSPEC addresses. */
 };
 
-/* used on shub2 to clear FOP cache in the HUB */
-static unsigned long scratch_page[MAX_NUMNODES];
-#define SH2_AMO_CACHE_ENTRIES	4
-
-static inline int
-mspec_zero_block(unsigned long addr, int len)
-{
-	int status;
-
-	if (is_sn2) {
-		if (is_shub2()) {
-			int nid;
-			void *p;
-			int i;
-
-			nid = nasid_to_cnodeid(get_node_number(__pa(addr)));
-			p = (void *)TO_AMO(scratch_page[nid]);
-
-			for (i=0; i < SH2_AMO_CACHE_ENTRIES; i++) {
-				FETCHOP_LOAD_OP(p, FETCHOP_LOAD);
-				p += FETCHOP_VAR_SIZE;
-			}
-		}
-
-		status = bte_copy(0, addr & ~__IA64_UNCACHED_OFFSET, len,
-				  BTE_WACQUIRE | BTE_ZERO_FILL, NULL);
-	} else {
-		memset((char *) addr, 0, len);
-		status = 0;
-	}
-	return status;
-}
-
 /*
  * mspec_open
  *
@@ -173,11 +122,8 @@ mspec_close(struct vm_area_struct *vma)
 		 */
 		my_page = vdata->maddr[index];
 		vdata->maddr[index] = 0;
-		if (!mspec_zero_block(my_page, PAGE_SIZE))
-			uncached_free_page(my_page, 1);
-		else
-			printk(KERN_WARNING "mspec_close(): "
-			       "failed to zero page %ld\n", my_page);
+		memset((char *)my_page, 0, PAGE_SIZE);
+		uncached_free_page(my_page, 1);
 	}
 
 	kvfree(vdata);
@@ -213,11 +159,7 @@ mspec_fault(struct vm_fault *vmf)
 		spin_unlock(&vdata->lock);
 	}
 
-	if (vdata->type = MSPEC_FETCHOP)
-		paddr = TO_AMO(maddr);
-	else
-		paddr = maddr & ~__IA64_UNCACHED_OFFSET;
-
+	paddr = maddr & ~__IA64_UNCACHED_OFFSET;
 	pfn = paddr >> PAGE_SHIFT;
 
 	return vmf_insert_pfn(vmf->vma, vmf->address, pfn);
@@ -269,19 +211,13 @@ mspec_mmap(struct file *file, struct vm_area_struct *vma,
 	vma->vm_private_data = vdata;
 
 	vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP;
-	if (vdata->type = MSPEC_FETCHOP || vdata->type = MSPEC_UNCACHED)
+	if (vdata->type = MSPEC_UNCACHED)
 		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 	vma->vm_ops = &mspec_vm_ops;
 
 	return 0;
 }
 
-static int
-fetchop_mmap(struct file *file, struct vm_area_struct *vma)
-{
-	return mspec_mmap(file, vma, MSPEC_FETCHOP);
-}
-
 static int
 cached_mmap(struct file *file, struct vm_area_struct *vma)
 {
@@ -294,18 +230,6 @@ uncached_mmap(struct file *file, struct vm_area_struct *vma)
 	return mspec_mmap(file, vma, MSPEC_UNCACHED);
 }
 
-static const struct file_operations fetchop_fops = {
-	.owner = THIS_MODULE,
-	.mmap = fetchop_mmap,
-	.llseek = noop_llseek,
-};
-
-static struct miscdevice fetchop_miscdev = {
-	.minor = MISC_DYNAMIC_MINOR,
-	.name = "sgi_fetchop",
-	.fops = &fetchop_fops
-};
-
 static const struct file_operations cached_fops = {
 	.owner = THIS_MODULE,
 	.mmap = cached_mmap,
@@ -339,89 +263,32 @@ static int __init
 mspec_init(void)
 {
 	int ret;
-	int nid;
-
-	/*
-	 * The fetchop device only works on SN2 hardware, uncached and cached
-	 * memory drivers should both be valid on all ia64 hardware
-	 */
-#ifdef CONFIG_SGI_SN
-	if (ia64_platform_is("sn2")) {
-		is_sn2 = 1;
-		if (is_shub2()) {
-			ret = -ENOMEM;
-			for_each_node_state(nid, N_ONLINE) {
-				int actual_nid;
-				int nasid;
-				unsigned long phys;
-
-				scratch_page[nid] = uncached_alloc_page(nid, 1);
-				if (scratch_page[nid] = 0)
-					goto free_scratch_pages;
-				phys = __pa(scratch_page[nid]);
-				nasid = get_node_number(phys);
-				actual_nid = nasid_to_cnodeid(nasid);
-				if (actual_nid != nid)
-					goto free_scratch_pages;
-			}
-		}
 
-		ret = misc_register(&fetchop_miscdev);
-		if (ret) {
-			printk(KERN_ERR
-			       "%s: failed to register device %i\n",
-			       FETCHOP_ID, ret);
-			goto free_scratch_pages;
-		}
-	}
-#endif
 	ret = misc_register(&cached_miscdev);
 	if (ret) {
 		printk(KERN_ERR "%s: failed to register device %i\n",
 		       CACHED_ID, ret);
-		if (is_sn2)
-			misc_deregister(&fetchop_miscdev);
-		goto free_scratch_pages;
+		return ret;
 	}
 	ret = misc_register(&uncached_miscdev);
 	if (ret) {
 		printk(KERN_ERR "%s: failed to register device %i\n",
 		       UNCACHED_ID, ret);
 		misc_deregister(&cached_miscdev);
-		if (is_sn2)
-			misc_deregister(&fetchop_miscdev);
-		goto free_scratch_pages;
+		return ret;
 	}
 
-	printk(KERN_INFO "%s %s initialized devices: %s %s %s\n",
-	       MSPEC_BASENAME, REVISION, is_sn2 ? FETCHOP_ID : "",
-	       CACHED_ID, UNCACHED_ID);
+	printk(KERN_INFO "%s %s initialized devices: %s %s\n",
+	       MSPEC_BASENAME, REVISION, CACHED_ID, UNCACHED_ID);
 
 	return 0;
-
- free_scratch_pages:
-	for_each_node(nid) {
-		if (scratch_page[nid] != 0)
-			uncached_free_page(scratch_page[nid], 1);
-	}
-	return ret;
 }
 
 static void __exit
 mspec_exit(void)
 {
-	int nid;
-
 	misc_deregister(&uncached_miscdev);
 	misc_deregister(&cached_miscdev);
-	if (is_sn2) {
-		misc_deregister(&fetchop_miscdev);
-
-		for_each_node(nid) {
-			if (scratch_page[nid] != 0)
-				uncached_free_page(scratch_page[nid], 1);
-		}
-	}
 }
 
 module_init(mspec_init);
Signature · 1 line
2.20.1
#10 lore raw

PATCH 10/28 misc/sgi-xp: remove SGI SN2 support

In reply to Christoph Hellwig

Note this also marks xp broken on ia64 now, as the UV support, which was disable in generic kernels before actually never compiled due to undefined uv_gpa_to_soc_phys_ram and uv_gpa_in_mmr_space symbols since at least commit c2c9f1157414 ("x86: uv: update XPC to handle updated BIOS interface").

---
 arch/ia64/uv/kernel/setup.c         |    4 -
 drivers/misc/Kconfig                |    5 +-
 drivers/misc/sgi-xp/Makefile        |   13 +-
 drivers/misc/sgi-xp/xp.h            |   19 -
 drivers/misc/sgi-xp/xp_main.c       |    8 +-
 drivers/misc/sgi-xp/xp_nofault.S    |   35 -
 drivers/misc/sgi-xp/xp_sn2.c        |  190 ---
 drivers/misc/sgi-xp/xp_uv.c         |    3 +-
 drivers/misc/sgi-xp/xpc.h           |  273 ---
 drivers/misc/sgi-xp/xpc_main.c      |   31 +-
 drivers/misc/sgi-xp/xpc_partition.c |    5 -
 drivers/misc/sgi-xp/xpc_sn2.c       | 2459 ---------------------------
 drivers/misc/sgi-xp/xpc_uv.c        |    2 +
 drivers/misc/sgi-xp/xpnet.c         |    2 +-
 14 files changed, 15 insertions(+), 3034 deletions(-)
 delete mode 100644 drivers/misc/sgi-xp/xp_nofault.S
 delete mode 100644 drivers/misc/sgi-xp/xp_sn2.c
 delete mode 100644 drivers/misc/sgi-xp/xpc_sn2.c
arch/ia64/uv/kernel/setup.c +0 -4
index f1490657bafc..32d6ea2e89f8 100644
@@ -19,12 +19,8 @@ EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
 
 #ifdef CONFIG_IA64_SGI_UV
 int sn_prom_type;
-long sn_partition_id;
-EXPORT_SYMBOL(sn_partition_id);
 long sn_coherency_id;
 EXPORT_SYMBOL_GPL(sn_coherency_id);
-long sn_region_size;
-EXPORT_SYMBOL(sn_region_size);
 #endif
 
 struct redir_addr {
drivers/misc/Kconfig +2 -3
index 6abfc8e92fcc..299032693934 100644
@@ -200,9 +200,8 @@ config ENCLOSURE_SERVICES
 config SGI_XP
 	tristate "Support communication between SGI SSIs"
 	depends on NET
-	depends on (IA64_GENERIC || IA64_SGI_SN2 || IA64_SGI_UV || X86_UV) && SMP
-	select IA64_UNCACHED_ALLOCATOR if IA64_GENERIC || IA64_SGI_SN2
-	select GENERIC_ALLOCATOR if IA64_GENERIC || IA64_SGI_SN2
+	depends on (IA64_GENERIC || IA64_SGI_UV || X86_UV) && SMP
+	depends on X86_64 || BROKEN
 	select SGI_GRU if X86_64 && SMP
 	---help---
 	  An SGI machine can be divided into multiple Single System
drivers/misc/sgi-xp/Makefile +3 -10
index bbb622c19c06..34c55a4045af 100644
@@ -4,17 +4,10 @@
 #
 
 obj-$(CONFIG_SGI_XP)		+= xp.o
-xp-y				:= xp_main.o
-xp-$(CONFIG_IA64_SGI_SN2)	+= xp_sn2.o xp_nofault.o
-xp-$(CONFIG_IA64_GENERIC)	+= xp_sn2.o xp_nofault.o
-xp-$(CONFIG_IA64_SGI_UV)	+= xp_uv.o
-xp-$(CONFIG_X86_64)		+= xp_uv.o
+xp-y				:= xp_main.o xp_uv.o
 
 obj-$(CONFIG_SGI_XP)		+= xpc.o
-xpc-y				:= xpc_main.o xpc_channel.o xpc_partition.o
-xpc-$(CONFIG_IA64_SGI_SN2)	+= xpc_sn2.o
-xpc-$(CONFIG_IA64_GENERIC)	+= xpc_sn2.o
-xpc-$(CONFIG_IA64_SGI_UV) 	+= xpc_uv.o
-xpc-$(CONFIG_X86_64)		+= xpc_uv.o
+xpc-y				:= xpc_main.o xpc_channel.o xpc_partition.o \
+				   xpc_uv.o
 
 obj-$(CONFIG_SGI_XP)		+= xpnet.o
drivers/misc/sgi-xp/xp.h +0 -19
index b8069eec18cb..06469b12aced 100644
@@ -24,23 +24,6 @@
 #define is_uv()		0
 #endif
 
-#if defined CONFIG_IA64
-#include <asm/sn/arch.h>	/* defines is_shub1() and is_shub2() */
-#define is_shub()	ia64_platform_is("sn2")
-#endif
-
-#ifndef is_shub1
-#define is_shub1()	0
-#endif
-
-#ifndef is_shub2
-#define is_shub2()	0
-#endif
-
-#ifndef is_shub
-#define is_shub()	0
-#endif
-
 #ifdef USE_DBUG_ON
 #define DBUG_ON(condition)	BUG_ON(condition)
 #else
@@ -360,9 +343,7 @@ extern int xp_nofault_PIOR(void *);
 extern int xp_error_PIOR(void);
 
 extern struct device *xp;
-extern enum xp_retval xp_init_sn2(void);
 extern enum xp_retval xp_init_uv(void);
-extern void xp_exit_sn2(void);
 extern void xp_exit_uv(void);
 
 #endif /* _DRIVERS_MISC_SGIXP_XP_H */
drivers/misc/sgi-xp/xp_main.c +2 -6
index 6d7f557fd1c1..5fd94d836070 100644
@@ -233,9 +233,7 @@ xp_init(void)
 	for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
 		mutex_init(&xpc_registrations[ch_number].mutex);
 
-	if (is_shub())
-		ret = xp_init_sn2();
-	else if (is_uv())
+	if (is_uv())
 		ret = xp_init_uv();
 	else
 		ret = 0;
@@ -251,9 +249,7 @@ module_init(xp_init);
 void __exit
 xp_exit(void)
 {
-	if (is_shub())
-		xp_exit_sn2();
-	else if (is_uv())
+	if (is_uv())
 		xp_exit_uv();
 }
 
drivers/misc/sgi-xp/xp_nofault.S deleted +0 -35
deleted file mode 100644
index e38d43319429..000000000000
@@ -1,35 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (c) 2004-2008 Silicon Graphics, Inc.  All Rights Reserved.
- */
-
-/*
- * The xp_nofault_PIOR function takes a pointer to a remote PIO register
- * and attempts to load and consume a value from it.  This function
- * will be registered as a nofault code block.  In the event that the
- * PIO read fails, the MCA handler will force the error to look
- * corrected and vector to the xp_error_PIOR which will return an error.
- *
- * The definition of "consumption" and the time it takes for an MCA
- * to surface is processor implementation specific.  This code
- * is sufficient on Itanium through the Montvale processor family.
- * It may need to be adjusted for future processor implementations.
- *
- *	extern int xp_nofault_PIOR(void *remote_register);
- */
-
-	.global xp_nofault_PIOR
-xp_nofault_PIOR:
-	mov	r8=r0			// Stage a success return value
-	ld8.acq	r9=[r32];;		// PIO Read the specified register
-	adds	r9=1,r9;;		// Add to force consumption
-	srlz.i;;			// Allow time for MCA to surface
-	br.ret.sptk.many b0;;		// Return success
-
-	.global xp_error_PIOR
-xp_error_PIOR:
-	mov	r8=1			// Return value of 1
-	br.ret.sptk.many b0;;		// Return failure
drivers/misc/sgi-xp/xp_sn2.c deleted +0 -190

190 lines not on this page · raw message

drivers/misc/sgi-xp/xp_uv.c +2 -1
index a0d093274dc0..5e335e93459c 100644
@@ -151,9 +151,10 @@ xp_init_uv(void)
 	BUG_ON(!is_uv());
 
 	xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
+#ifdef CONFIG_X86
 	xp_partition_id = sn_partition_id;
 	xp_region_size = sn_region_size;
-
+#endif
 	xp_pa = xp_pa_uv;
 	xp_socket_pa = xp_socket_pa_uv;
 	xp_remote_memcpy = xp_remote_memcpy_uv;
drivers/misc/sgi-xp/xpc.h +0 -273

357 lines not on this page · raw message

drivers/misc/sgi-xp/xpc_main.c +3 -28
index 83fc748a91a7..79a963105983 100644
@@ -279,13 +279,6 @@ xpc_hb_checker(void *ignore)
 
 			dev_dbg(xpc_part, "checking remote heartbeats\n");
 			xpc_check_remote_hb();
-
-			/*
-			 * On sn2 we need to periodically recheck to ensure no
-			 * IRQ/amo pairs have been missed.
-			 */
-			if (is_shub())
-				force_IRQ = 1;
 		}
 
 		/* check for outstanding IRQs */
@@ -1050,9 +1043,7 @@ xpc_do_exit(enum xp_retval reason)
 
 	xpc_teardown_partitions();
 
-	if (is_shub())
-		xpc_exit_sn2();
-	else if (is_uv())
+	if (is_uv())
 		xpc_exit_uv();
 }
 
@@ -1235,21 +1226,7 @@ xpc_init(void)
 	dev_set_name(xpc_part, "part");
 	dev_set_name(xpc_chan, "chan");
 
-	if (is_shub()) {
-		/*
-		 * The ia64-sn2 architecture supports at most 64 partitions.
-		 * And the inability to unregister remote amos restricts us
-		 * further to only support exactly 64 partitions on this
-		 * architecture, no less.
-		 */
-		if (xp_max_npartitions != 64) {
-			dev_err(xpc_part, "max #of partitions not set to 64\n");
-			ret = -EINVAL;
-		} else {
-			ret = xpc_init_sn2();
-		}
-
-	} else if (is_uv()) {
+	if (is_uv()) {
 		ret = xpc_init_uv();
 
 	} else {
@@ -1335,9 +1312,7 @@ xpc_init(void)
 
 	xpc_teardown_partitions();
 out_1:
-	if (is_shub())
-		xpc_exit_sn2();
-	else if (is_uv())
+	if (is_uv())
 		xpc_exit_uv();
 	return ret;
 }
drivers/misc/sgi-xp/xpc_partition.c +0 -5
index 782ce95d3f17..21a04bc97d40 100644
@@ -93,10 +93,6 @@ xpc_get_rsvd_page_pa(int nasid)
 		if (ret != xpNeedMoreInfo)
 			break;
 
-		/* !!! L1_CACHE_ALIGN() is only a sn2-bte_copy requirement */
-		if (is_shub())
-			len = L1_CACHE_ALIGN(len);
-
 		if (len > buf_len) {
 			kfree(buf_base);
 			buf_len = L1_CACHE_ALIGN(len);
@@ -452,7 +448,6 @@ xpc_discovery(void)
 		case 32:
 			max_regions *= 2;
 			region_size = 16;
-			DBUG_ON(!is_shub2());
 		}
 	}
 
drivers/misc/sgi-xp/xpc_sn2.c deleted +0 -2459

2,240 lines not on this page · raw message

drivers/misc/sgi-xp/xpc_uv.c +2 -0
index 0c6de97dd347..d8a6fe16e4f5 100644

Lines of this file are not shown. View the raw message.

drivers/misc/sgi-xp/xpnet.c +1 -1
index 44d750d98bc8..f7d610a22347 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.20.1

Part of the diff is not shown here. View the raw message.

#11 lore raw

PATCH 11/28 qla1280: remove SGI SN2 support

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed, so drop the bits specific to it from this driver.

---
 drivers/scsi/qla1280.c | 37 -------------------------------------
 drivers/scsi/qla1280.h |  3 ---
 2 files changed, 40 deletions(-)
drivers/scsi/qla1280.c +0 -31
index e5760c4a27f0..832af4213046 100644
@@ -357,10 +357,6 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_tcq.h>
 
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-#include <asm/sn/io.h>
-#endif
-
 
 /*
  * Compile time Options:
@@ -380,11 +376,6 @@
 
 #define NVRAM_DELAY()			udelay(500)	/* 2 microseconds */
 
-#if defined(__ia64__) && !defined(ia64_platform_is)
-#define ia64_platform_is(foo)		(!strcmp(x, platform_name))
-#endif
-
-
 #define IS_ISP1040(ha) (ha->pdev->device = PCI_DEVICE_ID_QLOGIC_ISP1020)
 #define IS_ISP1x40(ha) (ha->pdev->device = PCI_DEVICE_ID_QLOGIC_ISP1020 || \
 			ha->pdev->device = PCI_DEVICE_ID_QLOGIC_ISP1240)
@@ -1427,15 +1418,6 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha)
 	ha->flags.reset_active = 0;
 	ha->flags.abort_isp_active = 0;
 
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-	if (ia64_platform_is("sn2")) {
-		printk(KERN_INFO "scsi(%li): Enabling SN2 PCI DMA "
-		       "dual channel lockup workaround\n", ha->host_no);
-		ha->flags.use_pci_vchannel = 1;
-		driver_setup.no_nvram = 1;
-	}
-#endif
-
 	/* TODO: implement support for the 1040 nvram format */
 	if (IS_ISP1040(ha))
 		driver_setup.no_nvram = 1;
@@ -2251,13 +2233,6 @@ qla1280_nvram_config(struct scsi_qla_host *ha)
 	mb[1] = nv->firmware_feature.f.enable_fast_posting;
 	mb[1] |= nv->firmware_feature.f.report_lvd_bus_transition << 1;
 	mb[1] |= nv->firmware_feature.f.disable_synchronous_backoff << 5;
-#if defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_SGI_SN2)
-	if (ia64_platform_is("sn2")) {
-		printk(KERN_INFO "scsi(%li): Enabling SN2 PCI DMA "
-		       "workaround\n", ha->host_no);
-		mb[1] |= nv->firmware_feature.f.unused_9 << 9; /* XXX */
-	}
-#endif
 	status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb);
 
 	/* Retry count and delay. */
@@ -2888,12 +2863,6 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 				break;
 
 			dma_handle = sg_dma_address(s);
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-			if (ha->flags.use_pci_vchannel)
-				sn_pci_set_vchan(ha->pdev,
-						 (unsigned long *)&dma_handle,
-						 SCSI_BUS_32(cmd));
-#endif
 			*dword_ptr++  				cpu_to_le32(lower_32_bits(dma_handle));
 			*dword_ptr++ @@ -2950,12 +2919,6 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 				if (cnt = 5)

break;
dma_handle = sg_dma_address(s);
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
- if (ha->flags.use_pci_vchannel)
- sn_pci_set_vchan(ha->pdev,
- (unsigned long *)&dma_handle,
- SCSI_BUS_32(cmd));
-#endif
*dword_ptr++ cpu_to_le32(lower_32_bits(dma_handle));
*dword_ptr++ diff --git a/drivers/scsi/qla1280.h b/drivers/scsi/qla1280.h
index b496206362a9..a1a8aefc7cc3 100644

drivers/scsi/qla1280.h +0 -3
@@ -1055,9 +1055,6 @@ struct scsi_qla_host {
 		uint32_t reset_active:1;		/* 3 */
 		uint32_t abort_isp_active:1;		/* 4 */
 		uint32_t disable_risc_code_load:1;	/* 5 */
-#ifdef __ia64__
-		uint32_t use_pci_vchannel:1;
-#endif
 	} flags;
 
 	struct nvram nvram;
Signature · 1 line
2.20.1
#12 lore raw

PATCH 12/28 qla2xxx: remove SGI SN2 support

In reply to Christoph Hellwig

The SGI SN2 support is about to be removed, so drop the bits specific to it from this driver.

---
 drivers/scsi/qla2xxx/qla_init.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +0 -14
index da83034d4759..d4c3baec9172 100644
@@ -4575,20 +4575,6 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
 		rval = 1;
 	}
 
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-	/*
-	 * The SN2 does not provide BIOS emulation which means you can't change
-	 * potentially bogus BIOS settings. Force the use of default settings
-	 * for link rate and frame size.  Hope that the rest of the settings
-	 * are valid.
-	 */
-	if (ia64_platform_is("sn2")) {
-		nv->frame_payload_size = 2048;
-		if (IS_QLA23XX(ha))
-			nv->special_options[1] = BIT_7;
-	}
-#endif
-
 	/* Reset Initialization control block */
 	memset(icb, 0, ha->init_cb_size);
 
Signature · 1 line
2.20.1
#13 lore raw

PATCH 13/28 drivers: remove the SGI SN2 IOC3 base support

In reply to Christoph Hellwig

The IOC3 is a multi-function chip seen on SGI SN2 and some SGI MIPS systems. This removes the last bit of SN2 specific support, while the bits used by the mips ports are still around (and being substantially rewritten at the moment).

---
 arch/ia64/Kconfig                     |   2 -
 arch/ia64/configs/gensparse_defconfig |   1 -
 drivers/Makefile                      |   1 -
 drivers/sn/Kconfig                    |  22 -
 drivers/sn/Makefile                   |   7 -
 drivers/sn/ioc3.c                     | 844 --------------------------
 6 files changed, 877 deletions(-)
 delete mode 100644 drivers/sn/Kconfig
 delete mode 100644 drivers/sn/Makefile
 delete mode 100644 drivers/sn/ioc3.c
arch/ia64/Kconfig +0 -2
index 7468d8e50467..43f3a3076ab2 100644
@@ -493,8 +493,6 @@ config IA64_HP_AML_NFW
 	  the "force" module parameter, e.g., with the "aml_nfw.force"
 	  kernel command line option.
 
-source "drivers/sn/Kconfig"
-
 config KEXEC
 	bool "kexec system call"
 	depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
arch/ia64/configs/gensparse_defconfig +0 -1
index d82d07d060d6..5d5ea744f7e6 100644
@@ -19,7 +19,6 @@ CONFIG_SPARSEMEM_MANUAL=y
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
-CONFIG_SGI_IOC3=y
 CONFIG_EFI_VARS=y
 CONFIG_BINFMT_MISC=m
 CONFIG_ACPI_BUTTON=m
drivers/Makefile +0 -1
index 6d37564e783c..05be8c798c51 100644
@@ -132,7 +132,6 @@ obj-y				+= mmc/
 obj-$(CONFIG_MEMSTICK)		+= memstick/
 obj-$(CONFIG_NEW_LEDS)		+= leds/
 obj-$(CONFIG_INFINIBAND)	+= infiniband/
-obj-$(CONFIG_SGI_SN)		+= sn/
 obj-y				+= firmware/
 obj-$(CONFIG_CRYPTO)		+= crypto/
 obj-$(CONFIG_SUPERH)		+= sh/
drivers/sn/Kconfig deleted +0 -22
deleted file mode 100644
index a6c443d31a3c..000000000000
@@ -1,22 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Miscellaneous SN-specific devices
-#
-
-menu "SN Devices"
-	depends on SGI_SN
-
-config SGI_IOC3
-	tristate "SGI IOC3 Base IO support"
-	default m
-	---help---
-	This option enables basic support for the SGI IOC3-based Base IO
-	controller card.  This option does not enable any specific
-	functions on such a card, but provides necessary infrastructure
-	for other drivers to utilize.
-
-	If you have an SGI Altix with an IOC3-based
-	I/O controller or a PCI IOC3 serial card say Y.
-	Otherwise say N.
-
-endmenu
drivers/sn/Makefile deleted +0 -7
deleted file mode 100644
index f0e809a38b2d..000000000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the Altix device drivers.
-#
-#
-
-obj-$(CONFIG_SGI_IOC3) += ioc3.o
drivers/sn/ioc3.c deleted +0 -844

844 lines not on this page · raw message

Signature · 1 line
2.20.1
#14 lore raw

PATCH 14/28 drivers: remove the SGI SN2 IOC4 base support

In reply to Christoph Hellwig

The IOC4 is a multi-function chip seen on SGI SN2 and some SGI MIPS systems. This removes the base driver, which while not having an SN2 Kconfig dependency was only for sub-drivers that had one.

---
 Documentation/driver-api/sgi-ioc4.rst    |  49 ---
 arch/ia64/configs/generic_defconfig      |   1 -
 arch/ia64/configs/gensparse_defconfig    |   1 -
 arch/mips/configs/bigsur_defconfig       |   1 -
 arch/mips/configs/ip32_defconfig         |   1 -
 arch/mips/configs/markeins_defconfig     |   1 -
 arch/mips/configs/rm200_defconfig        |   1 -
 arch/mips/configs/sb1250_swarm_defconfig |   1 -
 drivers/misc/Kconfig                     |  12 -
 drivers/misc/Makefile                    |   1 -
 drivers/misc/ioc4.c                      | 498 -----------------------
 include/linux/ioc4.h                     | 184 ---------
 include/linux/pci_ids.h                  |   1 -
 13 files changed, 752 deletions(-)
 delete mode 100644 Documentation/driver-api/sgi-ioc4.rst
 delete mode 100644 drivers/misc/ioc4.c
 delete mode 100644 include/linux/ioc4.h
Documentation/driver-api/sgi-ioc4.rst deleted +0 -47
deleted file mode 100644
index 72709222d3c0..000000000000
@@ -1,49 +0,0 @@
-==================
-SGI IOC4 PCI (multi function) device
-==================
-
-The SGI IOC4 PCI device is a bit of a strange beast, so some notes on
-it are in order.
-
-First, even though the IOC4 performs multiple functions, such as an
-IDE controller, a serial controller, a PS/2 keyboard/mouse controller,
-and an external interrupt mechanism, it's not implemented as a
-multifunction device.  The consequence of this from a software
-standpoint is that all these functions share a single IRQ, and
-they can't all register to own the same PCI device ID.  To make
-matters a bit worse, some of the register blocks (and even registers
-themselves) present in IOC4 are mixed-purpose between these several
-functions, meaning that there's no clear "owning" device driver.
-
-The solution is to organize the IOC4 driver into several independent
-drivers, "ioc4", "sgiioc4", and "ioc4_serial".  Note that there is no
-PS/2 controller driver as this functionality has never been wired up
-on a shipping IO card.
-
-ioc4
-==
-This is the core (or shim) driver for IOC4.  It is responsible for
-initializing the basic functionality of the chip, and allocating
-the PCI resources that are shared between the IOC4 functions.
-
-This driver also provides registration functions that the other
-IOC4 drivers can call to make their presence known.  Each driver
-needs to provide a probe and remove function, which are invoked
-by the core driver at appropriate times.  The interface of these
-IOC4 function probe and remove operations isn't precisely the same
-as PCI device probe and remove operations, but is logically the
-same operation.
-
-sgiioc4
-===-This is the IDE driver for IOC4.  Its name isn't very descriptive
-simply for historical reasons (it used to be the only IOC4 driver
-component).  There's not much to say about it other than it hooks
-up to the ioc4 driver via the appropriate registration, probe, and
-remove functions.
-
-ioc4_serial
-=====-This is the serial driver for IOC4.  There's not much to say about it
-other than it hooks up to the ioc4 driver via the appropriate registration,
-probe, and remove functions.
arch/ia64/configs/generic_defconfig +0 -1
index 8dd921dce4b5..661d90b3e148 100644
@@ -44,7 +44,6 @@ CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
-CONFIG_SGI_IOC4=y
 CONFIG_SGI_XP=m
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDECD=y
arch/ia64/configs/gensparse_defconfig +0 -1
index 5d5ea744f7e6..7844e6a956a4 100644
@@ -36,7 +36,6 @@ CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
-CONFIG_SGI_IOC4=y
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_IDE_GENERIC=y
arch/mips/configs/bigsur_defconfig +0 -1
index 66566026409d..f14ad0538f4e 100644
@@ -103,7 +103,6 @@ CONFIG_FW_LOADER=m
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
-CONFIG_SGI_IOC4=m
 CONFIG_EEPROM_LEGACY=y
 CONFIG_EEPROM_MAX6875=y
 CONFIG_IDE=y
arch/mips/configs/ip32_defconfig +0 -1
index 572cab91670c..370884018aad 100644
@@ -46,7 +46,6 @@ CONFIG_CONNECTOR=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
-CONFIG_SGI_IOC4=y
 CONFIG_RAID_ATTRS=y
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
arch/mips/configs/markeins_defconfig +0 -1
index ae93a94f8c71..507ad91b21e7 100644
@@ -117,7 +117,6 @@ CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_SGI_IOC4=m
 CONFIG_SCSI=m
 # CONFIG_SCSI_PROC_FS is not set
 CONFIG_BLK_DEV_SD=m
arch/mips/configs/rm200_defconfig +0 -1
index 0f4b09f8a0ee..8762e75f5d5f 100644
@@ -198,7 +198,6 @@ CONFIG_BLK_DEV_SX8=m
 CONFIG_BLK_DEV_RAM=m
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_ATA_OVER_ETH=m
-CONFIG_SGI_IOC4=m
 CONFIG_RAID_ATTRS=m
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
arch/mips/configs/sb1250_swarm_defconfig +0 -1
index 6883ea4477d4..bb0b1b22ebe1 100644
@@ -49,7 +49,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE’20
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_ATA_OVER_ETH=m
-CONFIG_SGI_IOC4=m
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDETAPE=y
drivers/misc/Kconfig +0 -12
index 299032693934..423d2d26d8f7 100644
@@ -126,18 +126,6 @@ config INTEL_MID_PTI
 	  an Intel Atom (non-netbook) mobile device containing a MIPI
 	  P1149.7 standard implementation.
 
-config SGI_IOC4
-	tristate "SGI IOC4 Base IO support"
-	depends on PCI
-	---help---
-	  This option enables basic support for the IOC4 chip on certain
-	  SGI IO controller cards (IO9, IO10, and PCI-RT).  This option
-	  does not enable any specific functions on such a card, but provides
-	  necessary infrastructure for other drivers to utilize.
-
-	  If you have an SGI Altix with an IOC4-based card say Y.
-	  Otherwise say N.
-
 config TIFM_CORE
 	tristate "TI Flash Media interface support"
 	depends on PCI
drivers/misc/Makefile +0 -1
index abd8ae249746..8dae0a976200 100644
@@ -21,7 +21,6 @@ obj-$(CONFIG_QCOM_COINCELL)	+= qcom-coincell.o
 obj-$(CONFIG_QCOM_FASTRPC)	+= fastrpc.o
 obj-$(CONFIG_SENSORS_BH1770)	+= bh1770glc.o
 obj-$(CONFIG_SENSORS_APDS990X)	+= apds990x.o
-obj-$(CONFIG_SGI_IOC4)		+= ioc4.o
 obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
 obj-$(CONFIG_KGDB_TESTS)	+= kgdbts.o
 obj-$(CONFIG_SGI_XP)		+= sgi-xp/
drivers/misc/ioc4.c deleted +0 -498

498 lines not on this page · raw message

include/linux/ioc4.h deleted +0 -184

184 lines not on this page · raw message

include/linux/pci_ids.h +0 -1
index c842735a4f45..85e2ca611d42 100644
@@ -1070,7 +1070,6 @@
 #define PCI_VENDOR_ID_SGI		0x10a9
 #define PCI_DEVICE_ID_SGI_IOC3		0x0003
 #define PCI_DEVICE_ID_SGI_LITHIUM	0x1002
-#define PCI_DEVICE_ID_SGI_IOC4		0x100a
 
 #define PCI_VENDOR_ID_WINBOND		0x10ad
 #define PCI_DEVICE_ID_WINBOND_82C105	0x0105
Signature · 1 line
2.20.1
#15 lore raw

PATCH 16/28 ia64: remove now unused machvec indirections

In reply to Christoph Hellwig

With the SGI SN2 machvec removal most of the indirections are unused now, so remove them. This includes the entire removal of the mmio read*/write* macros as the generic ones are identical to the asm-generic/io.h version.

---
 arch/ia64/include/asm/hw_irq.h       |  22 +--
 arch/ia64/include/asm/io.h           | 221 ++++--------------------
 arch/ia64/include/asm/machvec.h      | 241 ---------------------------
 arch/ia64/include/asm/machvec_init.h |  24 ---
 arch/ia64/include/asm/mmiowb.h       |  12 +-
 arch/ia64/include/asm/pci.h          |   6 +-
 arch/ia64/include/asm/switch_to.h    |   1 -
 arch/ia64/kernel/iosapic.c           |   5 +-
 arch/ia64/kernel/irq.c               |  12 --
 arch/ia64/kernel/irq_ia64.c          |   2 +-
 arch/ia64/kernel/machine_kexec.c     |   1 -
 arch/ia64/kernel/machvec.c           |   7 -
 arch/ia64/kernel/mca.c               |  10 +-
 arch/ia64/kernel/msi_ia64.c          |  21 +--
 arch/ia64/kernel/sal.c               |   2 +-
 arch/ia64/kernel/setup.c             |   1 -
 arch/ia64/kernel/smp.c               |   8 +-
 arch/ia64/kernel/smpboot.c           |   2 +-
 arch/ia64/kernel/time.c              |   2 -
 arch/ia64/lib/io.c                   | 114 -------------
 arch/ia64/mm/discontig.c             |   3 +-
 arch/ia64/mm/tlb.c                   |   6 +-
 arch/ia64/pci/pci.c                  |  13 +-
 23 files changed, 67 insertions(+), 669 deletions(-)
arch/ia64/include/asm/hw_irq.h +3 -19
index 5dd3c6485c3a..12808111a767 100644
@@ -137,25 +137,9 @@ static inline void irq_complete_move(unsigned int irq) {}
 
 static inline void ia64_native_resend_irq(unsigned int vector)
 {
-	platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
 }
 
-/*
- * Default implementations for the irq-descriptor API:
- */
-#ifndef CONFIG_IA64_GENERIC
-static inline ia64_vector __ia64_irq_to_vector(int irq)
-{
-	return irq_cfg[irq].vector;
-}
-
-static inline unsigned int
-__ia64_local_vector_to_irq (ia64_vector vec)
-{
-	return __this_cpu_read(vector_irq[vec]);
-}
-#endif
-
 /*
  * Next follows the irq descriptor interface.  On IA-64, each CPU supports 256 interrupt
  * vectors.  On smaller systems, there is a one-to-one correspondence between interrupt
@@ -170,7 +154,7 @@ __ia64_local_vector_to_irq (ia64_vector vec)
 static inline ia64_vector
 irq_to_vector (int irq)
 {
-	return platform_irq_to_vector(irq);
+	return irq_cfg[irq].vector;
 }
 
 /*
@@ -181,7 +165,7 @@ irq_to_vector (int irq)
 static inline unsigned int
 local_vector_to_irq (ia64_vector vec)
 {
-	return platform_local_vector_to_irq(vec);
+	return __this_cpu_read(vector_irq[vec]);
 }
 
 #endif /* _ASM_IA64_HW_IRQ_H */
arch/ia64/include/asm/io.h +33 -188

305 lines not on this page · raw message

arch/ia64/include/asm/machvec.h +0 -241

301 lines not on this page · raw message

arch/ia64/include/asm/machvec_init.h +0 -24
index 2aafb69a3787..7a82e3ea0aff 100644
@@ -2,30 +2,6 @@
 #include <asm/iommu.h>
 #include <asm/machvec.h>
 
-extern ia64_mv_send_ipi_t ia64_send_ipi;
-extern ia64_mv_global_tlb_purge_t ia64_global_tlb_purge;
-extern ia64_mv_irq_to_vector __ia64_irq_to_vector;
-extern ia64_mv_local_vector_to_irq __ia64_local_vector_to_irq;
-extern ia64_mv_pci_get_legacy_mem_t ia64_pci_get_legacy_mem;
-extern ia64_mv_pci_legacy_read_t ia64_pci_legacy_read;
-extern ia64_mv_pci_legacy_write_t ia64_pci_legacy_write;
-
-extern ia64_mv_inb_t __ia64_inb;
-extern ia64_mv_inw_t __ia64_inw;
-extern ia64_mv_inl_t __ia64_inl;
-extern ia64_mv_outb_t __ia64_outb;
-extern ia64_mv_outw_t __ia64_outw;
-extern ia64_mv_outl_t __ia64_outl;
-extern ia64_mv_mmiowb_t __ia64_mmiowb;
-extern ia64_mv_readb_t __ia64_readb;
-extern ia64_mv_readw_t __ia64_readw;
-extern ia64_mv_readl_t __ia64_readl;
-extern ia64_mv_readq_t __ia64_readq;
-extern ia64_mv_readb_t __ia64_readb_relaxed;
-extern ia64_mv_readw_t __ia64_readw_relaxed;
-extern ia64_mv_readl_t __ia64_readl_relaxed;
-extern ia64_mv_readq_t __ia64_readq_relaxed;
-
 #define MACHVEC_HELPER(name)									\
  struct ia64_machine_vector machvec_##name __attribute__ ((unused, __section__ (".machvec")))	\
 	= MACHVEC_INIT(name);
arch/ia64/include/asm/mmiowb.h +2 -10
index 297b85ac84a0..d67aab4ea3b4 100644
@@ -3,22 +3,14 @@
 #ifndef _ASM_IA64_MMIOWB_H
 #define _ASM_IA64_MMIOWB_H
 
-#include <asm/machvec.h>
-
 /**
- * ___ia64_mmiowb - I/O write barrier
+ * mmiowb - I/O write barrier
  *
  * Ensure ordering of I/O space writes.  This will make sure that writes
  * following the barrier will arrive after all previous writes.  For most
  * ia64 platforms, this is a simple 'mf.a' instruction.
  */
-static inline void ___ia64_mmiowb(void)
-{
-	ia64_mfa();
-}
-
-#define __ia64_mmiowb	___ia64_mmiowb
-#define mmiowb()	platform_mmiowb()
+#define mmiowb()	ia64_mfa()
 
 #include <asm-generic/mmiowb.h>
 
arch/ia64/include/asm/pci.h +3 -3
index 780e8744ba85..ef91b780a3f2 100644
@@ -39,9 +39,9 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
 				      struct vm_area_struct *vma,
 				      enum pci_mmap_state mmap_state);
 
-#define pci_get_legacy_mem platform_pci_get_legacy_mem
-#define pci_legacy_read platform_pci_legacy_read
-#define pci_legacy_write platform_pci_legacy_write
+char *pci_get_legacy_mem(struct pci_bus *bus);
+int pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size);
+int pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size);
 
 struct pci_controller {
 	struct acpi_device *companion;
arch/ia64/include/asm/switch_to.h +0 -1
index b10f31ec522c..9011e90a6b97 100644
@@ -69,7 +69,6 @@ extern void ia64_load_extra (struct task_struct *task);
 	if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) &&	       \
 		     (task_cpu(current) !=				       \
 		      		      task_thread_info(current)->last_cpu))) { \
-		platform_migrate(current);				       \
 		task_thread_info(current)->last_cpu = task_cpu(current);       \
 	}								       \
 } while (0)
arch/ia64/kernel/iosapic.c +1 -4
index fe6e4946672e..9e49fd006859 100644
@@ -67,10 +67,7 @@
  *     used as architecture-independent interrupt handling mechanism in Linux.
  *     As an IRQ is a number, we have to have
  *     IA-64 interrupt vector number <-> IRQ number mapping.  On smaller
- *     systems, we use one-to-one mapping between IA-64 vector and IRQ.  A
- *     platform can implement platform_irq_to_vector(irq) and
- *     platform_local_vector_to_irq(vector) APIs to differentiate the mapping.
- *     Please see also arch/ia64/include/asm/hw_irq.h for those APIs.
+ *     systems, we use one-to-one mapping between IA-64 vector and IRQ.
  *
  * To sum up, there are three levels of mappings involved:
  *
arch/ia64/kernel/irq.c +0 -12
index 6d17d26caf98..0a8e5e585edc 100644
@@ -35,18 +35,6 @@ void ack_bad_irq(unsigned int irq)
 	printk(KERN_ERR "Unexpected irq vector 0x%x on CPU %u!\n", irq, smp_processor_id());
 }
 
-#ifdef CONFIG_IA64_GENERIC
-ia64_vector __ia64_irq_to_vector(int irq)
-{
-	return irq_cfg[irq].vector;
-}
-
-unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
-{
-	return __this_cpu_read(vector_irq[vec]);
-}
-#endif
-
 /*
  * Interrupt statistics:
  */
arch/ia64/kernel/irq_ia64.c +1 -1
index ab87d6c25b15..1c81ec752b04 100644
@@ -314,7 +314,7 @@ void irq_complete_move(unsigned irq)
 	cpumask_and(&cleanup_mask, &cfg->old_domain, cpu_online_mask);
 	cfg->move_cleanup_count = cpumask_weight(&cleanup_mask);
 	for_each_cpu(i, &cleanup_mask)
-		platform_send_ipi(i, IA64_IRQ_MOVE_VECTOR, IA64_IPI_DM_INT, 0);
+		ia64_send_ipi(i, IA64_IRQ_MOVE_VECTOR, IA64_IPI_DM_INT, 0);
 	cfg->move_in_progress = 0;
 }
 
arch/ia64/kernel/machine_kexec.c +0 -1
index 3b1dd5496d08..efc9b568401c 100644
@@ -127,7 +127,6 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
 	ia64_srlz_d();
 	while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
 		ia64_eoi();
-	platform_kernel_launch_event();
 	rnk = (relocate_new_kernel_t)&code_addr;
 	(*rnk)(image->head, image->start, ia64_boot_param,
 		     GRANULEROUNDDOWN((unsigned long) pal_addr));
arch/ia64/kernel/machvec.c +0 -7
index ebd82535f51b..3db3be7aaae5 100644
@@ -11,7 +11,6 @@
 #include <asm/page.h>
 
 struct ia64_machine_vector ia64_mv = {
-	.mmiowb	= ___ia64_mmiowb
 };
 EXPORT_SYMBOL(ia64_mv);
 
@@ -69,9 +68,3 @@ machvec_setup (char **arg)
 {
 }
 EXPORT_SYMBOL(machvec_setup);
-
-void
-machvec_timer_interrupt (int irq, void *dev_id)
-{
-}
-EXPORT_SYMBOL(machvec_timer_interrupt);
arch/ia64/kernel/mca.c +5 -5
index 79190d877fa7..f72b05fe918b 100644
@@ -744,7 +744,7 @@ ia64_mca_cmc_vector_enable_keventd(struct work_struct *unused)
 static void
 ia64_mca_wakeup(int cpu)
 {
-	platform_send_ipi(cpu, IA64_MCA_WAKEUP_VECTOR, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(cpu, IA64_MCA_WAKEUP_VECTOR, IA64_IPI_DM_INT, 0);
 }
 
 /*
@@ -1490,7 +1490,7 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg)
 	cpuid = cpumask_next(cpuid+1, cpu_online_mask);
 
 	if (cpuid < nr_cpu_ids) {
-		platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0);
+		ia64_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0);
 	} else {
 		/* If no log record, switch out of polling mode */
 		if (start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC)) {
@@ -1523,7 +1523,7 @@ static void
 ia64_mca_cmc_poll (struct timer_list *unused)
 {
 	/* Trigger a CMC interrupt cascade  */
-	platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CMCP_VECTOR,
+	ia64_send_ipi(cpumask_first(cpu_online_mask), IA64_CMCP_VECTOR,
 							IA64_IPI_DM_INT, 0);
 }
 
@@ -1560,7 +1560,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
 	cpuid = cpumask_next(cpuid+1, cpu_online_mask);
 
 	if (cpuid < NR_CPUS) {
-		platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0);
+		ia64_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0);
 	} else {
 		/*
 		 * If a log was recorded, increase our polling frequency,
@@ -1600,7 +1600,7 @@ static void
 ia64_mca_cpe_poll (struct timer_list *unused)
 {
 	/* Trigger a CPE interrupt cascade  */
-	platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CPEP_VECTOR,
+	ia64_send_ipi(cpumask_first(cpu_online_mask), IA64_CPEP_VECTOR,
 							IA64_IPI_DM_INT, 0);
 }
 
arch/ia64/kernel/msi_ia64.c +2 -19
index 519d9432f407..df5c28f252e3 100644
@@ -43,7 +43,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
 }
 #endif /* CONFIG_SMP */
 
-int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
+int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 {
 	struct msi_msg	msg;
 	unsigned long	dest_phys_id;
@@ -77,7 +77,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 	return 0;
 }
 
-void ia64_teardown_msi_irq(unsigned int irq)
+void arch_teardown_msi_irq(unsigned int irq)
 {
 	destroy_irq(irq);
 }
@@ -111,23 +111,6 @@ static struct irq_chip ia64_msi_chip = {
 	.irq_retrigger		= ia64_msi_retrigger_irq,
 };
 
-
-int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
-{
-	if (platform_setup_msi_irq)
-		return platform_setup_msi_irq(pdev, desc);
-
-	return ia64_setup_msi_irq(pdev, desc);
-}
-
-void arch_teardown_msi_irq(unsigned int irq)
-{
-	if (platform_teardown_msi_irq)
-		return platform_teardown_msi_irq(irq);
-
-	return ia64_teardown_msi_irq(irq);
-}
-
 #ifdef CONFIG_INTEL_IOMMU
 #ifdef CONFIG_SMP
 static int dmar_msi_set_affinity(struct irq_data *data,
arch/ia64/kernel/sal.c +1 -1
index 17085a8078fe..c455ece977ad 100644
@@ -249,7 +249,7 @@ check_sal_cache_flush (void)
 	 * Send ourselves a timer interrupt, wait until it's reported, and see
 	 * if SAL_CACHE_FLUSH drops it.
 	 */
-	platform_send_ipi(cpu, IA64_TIMER_VECTOR, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(cpu, IA64_TIMER_VECTOR, IA64_IPI_DM_INT, 0);
 
 	while (!ia64_get_irr(IA64_TIMER_VECTOR))
 		cpu_relax();
arch/ia64/kernel/setup.c +0 -1
index 78d0d22dd17e..4dc74500eac5 100644
@@ -1039,7 +1039,6 @@ cpu_init (void)
 		ia64_patch_phys_stack_reg(num_phys_stacked*8 + 8);
 		max_num_phys_stacked = num_phys_stacked;
 	}
-	platform_cpu_init();
 }
 
 void __init
arch/ia64/kernel/smp.c +4 -4
index 133b63355814..4825b0b41d49 100644
@@ -146,7 +146,7 @@ static inline void
 send_IPI_single (int dest_cpu, int op)
 {
 	set_bit(op, &per_cpu(ipi_operation, dest_cpu));
-	platform_send_ipi(dest_cpu, IA64_IPI_VECTOR, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(dest_cpu, IA64_IPI_VECTOR, IA64_IPI_DM_INT, 0);
 }
 
 /*
@@ -213,7 +213,7 @@ kdump_smp_send_init(void)
 	for_each_online_cpu(cpu) {
 		if (cpu != self_cpu) {
 			if(kdump_status[cpu] = 0)
-				platform_send_ipi(cpu, 0, IA64_IPI_DM_INIT, 0);
+				ia64_send_ipi(cpu, 0, IA64_IPI_DM_INIT, 0);
 		}
 	}
 }
@@ -224,7 +224,7 @@ kdump_smp_send_init(void)
 void
 smp_send_reschedule (int cpu)
 {
-	platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
 }
 EXPORT_SYMBOL_GPL(smp_send_reschedule);
 
@@ -234,7 +234,7 @@ EXPORT_SYMBOL_GPL(smp_send_reschedule);
 static void
 smp_send_local_flush_tlb (int cpu)
 {
-	platform_send_ipi(cpu, IA64_IPI_LOCAL_TLB_FLUSH, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(cpu, IA64_IPI_LOCAL_TLB_FLUSH, IA64_IPI_DM_INT, 0);
 }
 
 void
arch/ia64/kernel/smpboot.c +1 -1
index df56f739dd11..f7058659526c 100644
@@ -467,7 +467,7 @@ do_boot_cpu (int sapicid, int cpu, struct task_struct *idle)
 	Dprintk("Sending wakeup vector %lu to AP 0x%x/0x%x.\n", ap_wakeup_vector, cpu, sapicid);
 
 	set_brendez_area(cpu);
-	platform_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0);
+	ia64_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0);
 
 	/*
 	 * Wait 10s total for the AP to start
arch/ia64/kernel/time.c +0 -2
index 4ecd81b0e8ec..d9ad93a6d825 100644
@@ -167,8 +167,6 @@ timer_interrupt (int irq, void *dev_id)
 		return IRQ_HANDLED;
 	}
 
-	platform_timer_interrupt(irq, dev_id);
-
 	new_itm = local_cpu_data->itm_next;
 
 	if (!time_after(ia64_get_itc(), new_itm))
arch/ia64/lib/io.c +0 -114

117 lines not on this page · raw message

arch/ia64/mm/discontig.c +1 -2
index 05490dd073e6..921f3efe3538 100644
@@ -396,8 +396,7 @@ static void __meminit scatter_node_data(void)
  *
  * Each node's per-node area has a copy of the global pg_data_t list, so
  * we copy that to each node here, as well as setting the per-cpu pointer
- * to the local node data structure.  The active_cpus field of the per-node
- * structure gets setup by the platform_cpu_init() function later.
+ * to the local node data structure.
  */
 static void __init initialize_pernode_data(void)
 {
arch/ia64/mm/tlb.c +4 -2
index 0714df1b7854..72cc568bc841 100644
@@ -245,7 +245,8 @@ setup_ptcg_sem(int max_purges, int nptcg_from)
 	spinaphore_init(&ptcg_sem, max_purges);
 }
 
-void
+#ifdef CONFIG_SMP
+static void
 ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
 		       unsigned long end, unsigned long nbits)
 {
@@ -282,6 +283,7 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
                 activate_context(active_mm);
         }
 }
+#endif /* CONFIG_SMP */
 
 void
 local_flush_tlb_all (void)
@@ -332,7 +334,7 @@ __flush_tlb_range (struct vm_area_struct *vma, unsigned long start,
 	preempt_disable();
 #ifdef CONFIG_SMP
 	if (mm != current->active_mm || cpumask_weight(mm_cpumask(mm)) != 1) {
-		platform_global_tlb_purge(mm, start, end, nbits);
+		ia64_global_tlb_purge(mm, start, end, nbits);
 		preempt_enable();
 		return;
 	}
arch/ia64/pci/pci.c +6 -7
index 165e561dc81a..89c9f36dc94d 100644
@@ -372,7 +372,6 @@ void pcibios_fixup_bus(struct pci_bus *b)
 	}
 	list_for_each_entry(dev, &b->devices, bus_list)
 		pcibios_fixup_device_resources(dev);
-	platform_pci_fixup_bus(b);
 }
 
 void pcibios_add_bus(struct pci_bus *bus)
@@ -413,7 +412,7 @@ pcibios_disable_device (struct pci_dev *dev)
 }
 
 /**
- * ia64_pci_get_legacy_mem - generic legacy mem routine
+ * pci_get_legacy_mem - generic legacy mem routine
  * @bus: bus to get legacy memory base address for
  *
  * Find the base of legacy memory for @bus.  This is typically the first
@@ -424,7 +423,7 @@ pcibios_disable_device (struct pci_dev *dev)
  * This is the ia64 generic version of this routine.  Other platforms
  * are free to override it with a machine vector.
  */
-char *ia64_pci_get_legacy_mem(struct pci_bus *bus)
+char *pci_get_legacy_mem(struct pci_bus *bus)
 {
 	return (char *)__IA64_UNCACHED_OFFSET;
 }
@@ -473,7 +472,7 @@ pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma,
 }
 
 /**
- * ia64_pci_legacy_read - read from legacy I/O space
+ * pci_legacy_read - read from legacy I/O space
  * @bus: bus to read
  * @port: legacy port value
  * @val: caller allocated storage for returned value
@@ -485,7 +484,7 @@ pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma,
  * overridden by the platform.  This is necessary on platforms that don't
  * support legacy I/O routing or that hard fail on legacy I/O timeouts.
  */
-int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
+int pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
 {
 	int ret = size;
 
@@ -508,7 +507,7 @@ int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
 }
 
 /**
- * ia64_pci_legacy_write - perform a legacy I/O write
+ * pci_legacy_write - perform a legacy I/O write
  * @bus: bus pointer
  * @port: port to write
  * @val: value to write
@@ -516,7 +515,7 @@ int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
  *
  * Simply writes @size bytes of @val to @port.
  */
-int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
+int pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
 {
 	int ret = size;
 
Signature · 1 line
2.20.1
#16 lore raw

PATCH 17/28 ia64: remove the hpsim platform

In reply to Christoph Hellwig

The hpsim platform supports the HP IA64 simulator which was useful as a bring up platform. But it is fairly non-standard vs real IA64 system in that it for example doesn't support ACPI. It also comes with a whole bunch of simulator specific drivers. Remove it to simplify the IA64 port.

Note that through a weird twist only them hpsim boot loader built the vmlinux.gz file, so the makefile targets for that are moved to the main ia64 Makefile now.

---
 arch/ia64/Kconfig                     |  34 +-
 arch/ia64/Makefile                    |  27 +-
 arch/ia64/configs/sim_defconfig       |  52 ---
 arch/ia64/hp/sim/Kconfig              |  23 --
 arch/ia64/hp/sim/Makefile             |  17 -
 arch/ia64/hp/sim/boot/Makefile        |  37 --
 arch/ia64/hp/sim/boot/boot_head.S     | 165 --------
 arch/ia64/hp/sim/boot/bootloader.c    | 175 ---------
 arch/ia64/hp/sim/boot/bootloader.lds  |  67 ----
 arch/ia64/hp/sim/boot/fw-emu.c        | 374 ------------------
 arch/ia64/hp/sim/boot/ssc.h           |  36 --
 arch/ia64/hp/sim/hpsim.S              |  11 -
 arch/ia64/hp/sim/hpsim_console.c      |  77 ----
 arch/ia64/hp/sim/hpsim_irq.c          |  76 ----
 arch/ia64/hp/sim/hpsim_machvec.c      |   3 -
 arch/ia64/hp/sim/hpsim_setup.c        |  41 --
 arch/ia64/hp/sim/hpsim_ssc.h          |  37 --
 arch/ia64/hp/sim/simeth.c             | 510 -------------------------
 arch/ia64/hp/sim/simscsi.c            | 373 ------------------
 arch/ia64/hp/sim/simserial.c          | 521 --------------------------
 arch/ia64/include/asm/acpi.h          |   4 +-
 arch/ia64/include/asm/hpsim.h         |  17 -
 arch/ia64/include/asm/iosapic.h       |  12 -
 arch/ia64/include/asm/machvec.h       |  11 +-
 arch/ia64/include/asm/machvec_hpsim.h |  19 -
 arch/ia64/kernel/Makefile             |   3 +-
 arch/ia64/kernel/irq_ia64.c           |   2 -
 arch/ia64/kernel/setup.c              |  13 +-
 28 files changed, 26 insertions(+), 2711 deletions(-)
 delete mode 100644 arch/ia64/configs/sim_defconfig
 delete mode 100644 arch/ia64/hp/sim/Kconfig
 delete mode 100644 arch/ia64/hp/sim/Makefile
 delete mode 100644 arch/ia64/hp/sim/boot/Makefile
 delete mode 100644 arch/ia64/hp/sim/boot/boot_head.S
 delete mode 100644 arch/ia64/hp/sim/boot/bootloader.c
 delete mode 100644 arch/ia64/hp/sim/boot/bootloader.lds
 delete mode 100644 arch/ia64/hp/sim/boot/fw-emu.c
 delete mode 100644 arch/ia64/hp/sim/boot/ssc.h
 delete mode 100644 arch/ia64/hp/sim/hpsim.S
 delete mode 100644 arch/ia64/hp/sim/hpsim_console.c
 delete mode 100644 arch/ia64/hp/sim/hpsim_irq.c
 delete mode 100644 arch/ia64/hp/sim/hpsim_machvec.c
 delete mode 100644 arch/ia64/hp/sim/hpsim_setup.c
 delete mode 100644 arch/ia64/hp/sim/hpsim_ssc.h
 delete mode 100644 arch/ia64/hp/sim/simeth.c
 delete mode 100644 arch/ia64/hp/sim/simscsi.c
 delete mode 100644 arch/ia64/hp/sim/simserial.c
 delete mode 100644 arch/ia64/include/asm/hpsim.h
 delete mode 100644 arch/ia64/include/asm/machvec_hpsim.h
arch/ia64/Kconfig +7 -27
index ae3aca14506e..63db7a5378ac 100644
@@ -10,11 +10,11 @@ config IA64
 	bool
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
-	select ACPI if (!IA64_HP_SIM)
-	select ARCH_SUPPORTS_ACPI if (!IA64_HP_SIM)
+	select ACPI
+	select ARCH_SUPPORTS_ACPI
 	select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
 	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
-	select FORCE_PCI if (!IA64_HP_SIM)
+	select FORCE_PCI
 	select PCI_DOMAINS if PCI
 	select PCI_SYSCALL if PCI
 	select HAVE_UNSTABLE_SCHED_CLOCK
@@ -140,7 +140,6 @@ config IA64_GENERIC
 	  HP-zx1/sx1000		For HP systems
 	  HP-zx1/sx1000+swiotlb	For HP systems with (broken) DMA-constrained devices.
 	  SGI-UV		For SGI UV systems
-	  Ski-simulator		For the HP simulator <http://www.hpl.hp.com/research/linux/ski/>
 
 	  If you don't know what to do, choose "generic".
 
@@ -181,11 +180,6 @@ config IA64_SGI_UV
 	  to select this option.  If in doubt, select ia64 generic support
 	  instead.
 
-config IA64_HP_SIM
-	bool "Ski-simulator"
-	select SWIOTLB
-	depends on !PM
-
 endchoice
 
 choice
@@ -239,14 +233,7 @@ config IA64_PAGE_SIZE_64KB
 
 endchoice
 
-if IA64_HP_SIM
-config HZ
-	default 32
-endif
-
-if !IA64_HP_SIM
 source "kernel/Kconfig.hz"
-endif
 
 config IA64_BRL_EMU
 	bool
@@ -265,11 +252,6 @@ config IA64_CYCLONE
 	  Say Y here to enable support for IBM EXA Cyclone time source.
 	  If you're unsure, answer N.
 
-config IOSAPIC
-	bool
-	depends on !IA64_HP_SIM
-	default y
-
 config FORCE_MAX_ZONEORDER
 	int "MAX_ORDER (11 - 17)"  if !HUGETLB_PAGE
 	range 11 17  if !HUGETLB_PAGE
@@ -373,7 +355,7 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config NUMA
 	bool "NUMA support"
-	depends on !IA64_HP_SIM && !FLATMEM
+	depends on !FLATMEM
 	select ACPI_NUMA if ACPI
 	help
 	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
@@ -395,7 +377,7 @@ config NODES_SHIFT
 config VIRTUAL_MEM_MAP
 	bool "Virtual mem map"
 	depends on !SPARSEMEM
-	default y if !IA64_HP_SIM
+	default y
 	help
 	  Say Y to compile the kernel with support for a virtual mem map.
 	  This code also only takes effect if a memory hole of greater than
@@ -478,7 +460,7 @@ config IA64_HP_AML_NFW
 
 config KEXEC
 	bool "kexec system call"
-	depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
+	depends on !SMP || HOTPLUG_CPU
 	select KEXEC_CORE
 	help
 	  kexec is a system call that implements the ability to shutdown your
@@ -496,7 +478,7 @@ config KEXEC
 
 config CRASH_DUMP
 	  bool "kernel crash dumps"
-	  depends on IA64_MCA_RECOVERY && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
+	  depends on IA64_MCA_RECOVERY && (!SMP || HOTPLUG_CPU)
 	  help
 	    Generate crash dump after being started by kexec.
 
@@ -518,8 +500,6 @@ endif
 
 endmenu
 
-source "arch/ia64/hp/sim/Kconfig"
-
 config MSPEC
 	tristate "Memory special operations driver"
 	depends on IA64
arch/ia64/Makefile +14 -13
index 0d730b061f72..8b866fc1f9cb 100644
@@ -39,6 +39,12 @@ $(error Sorry, you need a newer version of the assember, one that is built from
 		ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
 endif
 
+quiet_cmd_gzip = GZIP    $@
+cmd_gzip = cat $(real-prereqs) | gzip -n -f -9 > $@
+
+quiet_cmd_objcopy = OBJCOPY $@
+cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
+
 KBUILD_CFLAGS += $(cflags-y)
 head-y := arch/ia64/kernel/head.o
 
@@ -52,15 +58,12 @@ core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
 core-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
 
 drivers-$(CONFIG_PCI)		+= arch/ia64/pci/
-drivers-$(CONFIG_IA64_HP_SIM)	+= arch/ia64/hp/sim/
 drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/
 drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
-drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/uv/
+drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/uv/
 drivers-$(CONFIG_OPROFILE)	+= arch/ia64/oprofile/
 
-boot := arch/ia64/hp/sim/boot
-
-PHONY += boot compressed check
+PHONY += compressed check
 
 all: compressed unwcheck
 
@@ -68,22 +71,21 @@ compressed: vmlinux.gz
 
 vmlinuz: vmlinux.gz
 
-vmlinux.gz: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $@
+vmlinux.gz: vmlinux.bin FORCE
+	$(call if_changed,gzip)
+
+vmlinux.bin: vmlinux FORCE
+	$(call if_changed,objcopy)
 
 unwcheck: vmlinux
 	-$(Q)READELF=$(READELF) $(PYTHON) $(srctree)/arch/ia64/scripts/unwcheck.py $<
 
 archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
 
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all
 
-CLEAN_FILES += vmlinux.gz bootloader
-
-boot:	lib/lib.a vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $@
+CLEAN_FILES += vmlinux.gz
 
 install: vmlinux.gz
 	sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
@@ -91,7 +93,6 @@ install: vmlinux.gz
 define archhelp
   echo '* compressed	- Build compressed kernel image'
   echo '  install	- Install compressed kernel image'
-  echo '  boot		- Build vmlinux and bootloader for Ski simulator'
   echo '* unwcheck	- Check vmlinux for invalid unwind info'
 endef
 
arch/ia64/configs/sim_defconfig deleted +0 -52

52 lines not on this page · raw message

arch/ia64/hp/sim/Kconfig deleted +0 -23
deleted file mode 100644
index 56fb4f1d4f7c..000000000000
@@ -1,23 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-menu "HP Simulator drivers"
-	depends on IA64_HP_SIM || IA64_GENERIC
-
-config HP_SIMETH
-	bool "Simulated Ethernet "
-	depends on NET
-
-config HP_SIMSERIAL
-	bool "Simulated serial driver support"
-	depends on TTY
-
-config HP_SIMSERIAL_CONSOLE
-	bool "Console for HP simulator"
-	depends on HP_SIMSERIAL
-
-config HP_SIMSCSI
-	bool "Simulated SCSI disk"
-	depends on SCSI=y
-
-endmenu
-
arch/ia64/hp/sim/Makefile deleted +0 -17
deleted file mode 100644
index 0224a13d2c5b..000000000000
@@ -1,17 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# ia64/platform/hp/sim/Makefile
-#
-# Copyright (C) 2002 Hewlett-Packard Co.
-#	David Mosberger-Tang <[email protected]>
-# Copyright (C) 1999 Silicon Graphics, Inc.
-# Copyright (C) Srinivasa Thirumalachar ([email protected])
-#
-
-obj-y := hpsim_irq.o hpsim_setup.o hpsim.o
-obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
-
-obj-$(CONFIG_HP_SIMETH)	+= simeth.o
-obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
-obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
-obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
arch/ia64/hp/sim/boot/Makefile deleted +0 -37
deleted file mode 100644
index df6e9968c845..000000000000
@@ -1,37 +0,0 @@
-#
-# ia64/boot/Makefile
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-# Copyright (C) 1998, 2003 by David Mosberger-Tang <[email protected]>
-#
-
-targets-$(CONFIG_IA64_HP_SIM)  += bootloader
-targets := vmlinux.bin vmlinux.gz $(targets-y)
-
-quiet_cmd_cptotop = LN      $@
-      cmd_cptotop = ln -f $< $@
-
-vmlinux.gz: $(obj)/vmlinux.gz $(addprefix $(obj)/,$(targets-y))
-	$(call cmd,cptotop)
-	@echo '  Kernel: $@ is ready'
-
-boot: bootloader
-
-bootloader: $(obj)/bootloader
-	$(call cmd,cptotop)
-
-$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,gzip)
-
-$(obj)/vmlinux.bin: vmlinux FORCE
-	$(call if_changed,objcopy)
-
-
-LDFLAGS_bootloader = -static -T
-
-$(obj)/bootloader: $(src)/bootloader.lds $(obj)/bootloader.o $(obj)/boot_head.o $(obj)/fw-emu.o \
-                   lib/lib.a arch/ia64/lib/lib.a FORCE
-	$(call if_changed,ld)
arch/ia64/hp/sim/boot/boot_head.S deleted +0 -165

165 lines not on this page · raw message

arch/ia64/hp/sim/boot/bootloader.c deleted +0 -175

175 lines not on this page · raw message

arch/ia64/hp/sim/boot/bootloader.lds deleted +0 -67

67 lines not on this page · raw message

arch/ia64/hp/sim/boot/fw-emu.c deleted +0 -373

373 lines not on this page · raw message

arch/ia64/hp/sim/boot/ssc.h deleted +0 -36
deleted file mode 100644
index 88752c7509e0..000000000000
@@ -1,36 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 1998-2003 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- *	Stephane Eranian <[email protected]>
- */
-#ifndef ssc_h
-#define ssc_h
-
-/* Simulator system calls: */
-
-#define SSC_CONSOLE_INIT		20
-#define SSC_GETCHAR			21
-#define SSC_PUTCHAR			31
-#define SSC_OPEN			50
-#define SSC_CLOSE			51
-#define SSC_READ			52
-#define SSC_WRITE			53
-#define SSC_GET_COMPLETION		54
-#define SSC_WAIT_COMPLETION		55
-#define SSC_CONNECT_INTERRUPT		58
-#define SSC_GENERATE_INTERRUPT		59
-#define SSC_SET_PERIODIC_INTERRUPT	60
-#define SSC_GET_RTC			65
-#define SSC_EXIT			66
-#define SSC_LOAD_SYMBOLS		69
-#define SSC_GET_TOD			74
-
-#define SSC_GET_ARGS			75
-
-/*
- * Simulator system call.
- */
-extern long ssc (long arg0, long arg1, long arg2, long arg3, int nr);
-
-#endif /* ssc_h */
arch/ia64/hp/sim/hpsim.S deleted +0 -11
deleted file mode 100644
index 44b4d53e1689..000000000000
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <asm/asmmacro.h>
-
-/*
- * Simulator system call.
- */
-GLOBAL_ENTRY(ia64_ssc)
-	mov r15=r36
-	break 0x80001
-	br.ret.sptk.many rp
-END(ia64_ssc)
arch/ia64/hp/sim/hpsim_console.c deleted +0 -77

77 lines not on this page · raw message

arch/ia64/hp/sim/hpsim_irq.c deleted +0 -76

76 lines not on this page · raw message

arch/ia64/hp/sim/hpsim_machvec.c deleted +0 -3
deleted file mode 100644
index c21419359185..000000000000
@@ -1,3 +0,0 @@
-#define MACHVEC_PLATFORM_NAME		hpsim
-#define MACHVEC_PLATFORM_HEADER		<asm/machvec_hpsim.h>
-#include <asm/machvec_init.h>
arch/ia64/hp/sim/hpsim_setup.c deleted +0 -41

41 lines not on this page · raw message

arch/ia64/hp/sim/hpsim_ssc.h deleted +0 -37
deleted file mode 100644
index 6fd97a487811..000000000000
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Platform dependent support for HP simulator.
- *
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]>
- * Copyright (C) 1999 Vijay Chander <[email protected]>
- */
-#ifndef _IA64_PLATFORM_HPSIM_SSC_H
-#define _IA64_PLATFORM_HPSIM_SSC_H
-
-/* Simulator system calls: */
-
-#define SSC_CONSOLE_INIT		20
-#define SSC_GETCHAR			21
-#define SSC_PUTCHAR			31
-#define SSC_CONNECT_INTERRUPT		58
-#define SSC_GENERATE_INTERRUPT		59
-#define SSC_SET_PERIODIC_INTERRUPT	60
-#define SSC_GET_RTC			65
-#define SSC_EXIT			66
-#define SSC_LOAD_SYMBOLS		69
-#define SSC_GET_TOD			74
-#define SSC_CTL_TRACE			76
-
-#define SSC_NETDEV_PROBE		100
-#define SSC_NETDEV_SEND			101
-#define SSC_NETDEV_RECV			102
-#define SSC_NETDEV_ATTACH		103
-#define SSC_NETDEV_DETACH		104
-
-/*
- * Simulator system call.
- */
-extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr);
-
-#endif /* _IA64_PLATFORM_HPSIM_SSC_H */
arch/ia64/hp/sim/simeth.c deleted +0 -510

510 lines not on this page · raw message

arch/ia64/hp/sim/simscsi.c deleted +0 -373

373 lines not on this page · raw message

arch/ia64/hp/sim/simserial.c deleted +0 -520

520 lines not on this page · raw message

arch/ia64/include/asm/acpi.h +1 -3
index 80c5ef8f475e..0afb3bc4b4a1 100644
@@ -37,9 +37,7 @@ const char *acpi_get_sysname (void);
 #else
 static inline const char *acpi_get_sysname (void)
 {
-# if defined (CONFIG_IA64_HP_SIM)
-	return "hpsim";
-# elif defined (CONFIG_IA64_HP_ZX1)
+# if defined (CONFIG_IA64_HP_ZX1)
 	return "hpzx1";
 # elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
 	return "hpzx1_swiotlb";
arch/ia64/include/asm/hpsim.h deleted +0 -17
deleted file mode 100644
index 00fbd5cc8ab8..000000000000
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASMIA64_HPSIM_H
-#define _ASMIA64_HPSIM_H
-
-#ifndef CONFIG_HP_SIMSERIAL_CONSOLE
-static inline int simcons_register(void) { return 1; }
-#else
-int simcons_register(void);
-#endif
-
-struct tty_driver;
-extern struct tty_driver *hp_simserial_driver;
-
-extern int hpsim_get_irq(int intr);
-void ia64_ctl_trace(long on);
-
-#endif
arch/ia64/include/asm/iosapic.h +0 -12
index f48556cb8afc..a91aeb413e17 100644
@@ -52,8 +52,6 @@
 
 #ifndef __ASSEMBLY__
 
-#ifdef CONFIG_IOSAPIC
-
 #define NR_IOSAPICS			256
 
 #define iosapic_pcat_compat_init	ia64_native_iosapic_pcat_compat_init
@@ -103,16 +101,6 @@ extern int __init iosapic_register_platform_intr (u32 int_type,
 #ifdef CONFIG_NUMA
 extern void map_iosapic_to_node (unsigned int, int);
 #endif
-#else
-#define iosapic_system_init(pcat_compat)			do { } while (0)
-#define iosapic_init(address,gsi_base)				(-EINVAL)
-#define iosapic_remove(gsi_base)				(-ENODEV)
-#define iosapic_register_intr(gsi,polarity,trigger)		(gsi)
-#define iosapic_unregister_intr(irq)				do { } while (0)
-#define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger)	do { } while (0)
-#define iosapic_register_platform_intr(type,gsi,pmi,eid,id, \
-	polarity,trigger)					(gsi)
-#endif
 
 # endif /* !__ASSEMBLY__ */
 #endif /* __ASM_IA64_IOSAPIC_H */
arch/ia64/include/asm/machvec.h +1 -10
index f426a9829595..5a9a8af79308 100644
@@ -16,7 +16,6 @@
 struct device;
 
 typedef void ia64_mv_setup_t (char **);
-typedef void ia64_mv_irq_init_t (void);
 typedef void ia64_mv_dma_init (void);
 typedef const struct dma_map_ops *ia64_mv_dma_get_ops(struct device *);
 
@@ -27,9 +26,7 @@ machvec_noop (void)
 
 extern void machvec_setup (char **);
 
-# if defined (CONFIG_IA64_HP_SIM)
-#  include <asm/machvec_hpsim.h>
-# elif defined (CONFIG_IA64_DIG)
+# if defined (CONFIG_IA64_DIG)
 #  include <asm/machvec_dig.h>
 # elif defined(CONFIG_IA64_DIG_VTD)
 #  include <asm/machvec_dig_vtd.h>
@@ -46,7 +43,6 @@ extern void machvec_setup (char **);
 # else
 #  define ia64_platform_name	ia64_mv.name
 #  define platform_setup	ia64_mv.setup
-#  define platform_irq_init	ia64_mv.irq_init
 #  define platform_dma_init		ia64_mv.dma_init
 #  define platform_dma_get_ops		ia64_mv.dma_get_ops
 # endif
@@ -59,7 +55,6 @@ extern void machvec_setup (char **);
 struct ia64_machine_vector {
 	const char *name;
 	ia64_mv_setup_t *setup;
-	ia64_mv_irq_init_t *irq_init;
 	ia64_mv_dma_init *dma_init;
 	ia64_mv_dma_get_ops *dma_get_ops;
 } __attribute__((__aligned__(16))); /* align attrib? see above comment */
@@ -68,7 +63,6 @@ struct ia64_machine_vector {
 {						\
 	#name,					\
 	platform_setup,				\
-	platform_irq_init,			\
 	platform_dma_init,			\
 	platform_dma_get_ops,			\
 }
@@ -91,9 +85,6 @@ extern const struct dma_map_ops *dma_get_ops(struct device *);
 #ifndef platform_setup
 # define platform_setup			machvec_setup
 #endif
-#ifndef platform_irq_init
-# define platform_irq_init		machvec_noop
-#endif
 #ifndef platform_dma_init
 # define platform_dma_init		swiotlb_dma_init
 #endif
arch/ia64/include/asm/machvec_hpsim.h deleted +0 -19
deleted file mode 100644
index 056f8405822e..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_MACHVEC_HPSIM_h
-#define _ASM_IA64_MACHVEC_HPSIM_h
-
-extern ia64_mv_setup_t hpsim_setup;
-extern ia64_mv_irq_init_t hpsim_irq_init;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name	"hpsim"
-#define platform_setup		hpsim_setup
-#define platform_irq_init	hpsim_irq_init
-
-#endif /* _ASM_IA64_MACHVEC_HPSIM_h */
arch/ia64/kernel/Makefile +1 -2
index 4ba05140b249..3ada440ff893 100644
@@ -12,13 +12,12 @@ extra-y	:= head.o vmlinux.lds
 obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
 	 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
-	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o
+	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o iosapic.o
 
 obj-$(CONFIG_ACPI)		+= acpi.o acpi-ext.o
 obj-$(CONFIG_IA64_BRL_EMU)	+= brl_emu.o
 
 obj-$(CONFIG_IA64_PALINFO)	+= palinfo.o
-obj-$(CONFIG_IOSAPIC)		+= iosapic.o
 obj-$(CONFIG_MODULES)		+= module.o
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_NUMA)		+= numa.o
arch/ia64/kernel/irq_ia64.c +0 -2
index 1c81ec752b04..e3874734b149 100644
@@ -53,7 +53,6 @@
 #define IRQ_USED		(1)
 #define IRQ_RSVD		(2)
 
-/* These can be overridden in platform_irq_init */
 int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR;
 int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR;
 
@@ -648,7 +647,6 @@ init_IRQ (void)
 #ifdef CONFIG_PERFMON
 	pfm_init_percpu();
 #endif
-	platform_irq_init();
 }
 
 void
arch/ia64/kernel/setup.c +2 -11
index 4dc74500eac5..42ef03ce2fd4 100644
@@ -63,7 +63,6 @@
 #include <asm/smp.h>
 #include <asm/tlbflush.h>
 #include <asm/unistd.h>
-#include <asm/hpsim.h>
 
 #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
 # error "struct cpuinfo_ia64 too big!"
@@ -461,16 +460,11 @@ io_port_init (void)
 static inline int __init
 early_console_setup (char *cmdline)
 {
-	int earlycons = 0;
-
 #ifdef CONFIG_EFI_PCDP
 	if (!efi_setup_pcdp_console(cmdline))
-		earlycons++;
+		return 0;
 #endif
-	if (!simcons_register())
-		earlycons++;
-
-	return (earlycons) ? 0 : -1;
+	return -1;
 }
 
 static inline void
@@ -608,9 +602,6 @@ setup_arch (char **cmdline_p)
 		ia64_mca_init();
 
 	platform_setup(cmdline_p);
-#ifndef CONFIG_IA64_HP_SIM
-	check_sal_cache_flush();
-#endif
 	paging_init();
 
 	clear_sched_clock_stable();
Signature · 1 line
2.20.1
#17 lore raw

Re: [PATCH 17/28] ia64: remove the hpsim platform

Quoted 11 lines · Christoph Hellwig

The hpsim platform supports the HP IA64 simulator which was useful as a bring up platform. But it is fairly non-standard vs real IA64 system in that it for example doesn't support ACPI. It also comes with a whole bunch of simulator specific drivers. Remove it to simplify the IA64 port.

Note that through a weird twist only them hpsim boot loader built the vmlinux.gz file, so the makefile targets for that are moved to the main ia64 Makefile now.

Okay to remove hpsim support

Quoted 3,168 lines
---
  arch/ia64/Kconfig                     |  34 +-
  arch/ia64/Makefile                    |  27 +-
  arch/ia64/configs/sim_defconfig       |  52 ---
  arch/ia64/hp/sim/Kconfig              |  23 --
  arch/ia64/hp/sim/Makefile             |  17 -
  arch/ia64/hp/sim/boot/Makefile        |  37 --
  arch/ia64/hp/sim/boot/boot_head.S     | 165 --------
  arch/ia64/hp/sim/boot/bootloader.c    | 175 ---------
  arch/ia64/hp/sim/boot/bootloader.lds  |  67 ----
  arch/ia64/hp/sim/boot/fw-emu.c        | 374 ------------------
  arch/ia64/hp/sim/boot/ssc.h           |  36 --
  arch/ia64/hp/sim/hpsim.S              |  11 -
  arch/ia64/hp/sim/hpsim_console.c      |  77 ----
  arch/ia64/hp/sim/hpsim_irq.c          |  76 ----
  arch/ia64/hp/sim/hpsim_machvec.c      |   3 -
  arch/ia64/hp/sim/hpsim_setup.c        |  41 --
  arch/ia64/hp/sim/hpsim_ssc.h          |  37 --
  arch/ia64/hp/sim/simeth.c             | 510 -------------------------
  arch/ia64/hp/sim/simscsi.c            | 373 ------------------
  arch/ia64/hp/sim/simserial.c          | 521 --------------------------
  arch/ia64/include/asm/acpi.h          |   4 +-
  arch/ia64/include/asm/hpsim.h         |  17 -
  arch/ia64/include/asm/iosapic.h       |  12 -
  arch/ia64/include/asm/machvec.h       |  11 +-
  arch/ia64/include/asm/machvec_hpsim.h |  19 -
  arch/ia64/kernel/Makefile             |   3 +-
  arch/ia64/kernel/irq_ia64.c           |   2 -
  arch/ia64/kernel/setup.c              |  13 +-
  28 files changed, 26 insertions(+), 2711 deletions(-)

delete mode 100644 arch/ia64/configs/sim_defconfig delete mode 100644 arch/ia64/hp/sim/Kconfig delete mode 100644 arch/ia64/hp/sim/Makefile delete mode 100644 arch/ia64/hp/sim/boot/Makefile delete mode 100644 arch/ia64/hp/sim/boot/boot_head.S delete mode 100644 arch/ia64/hp/sim/boot/bootloader.c delete mode 100644 arch/ia64/hp/sim/boot/bootloader.lds delete mode 100644 arch/ia64/hp/sim/boot/fw-emu.c delete mode 100644 arch/ia64/hp/sim/boot/ssc.h delete mode 100644 arch/ia64/hp/sim/hpsim.S delete mode 100644 arch/ia64/hp/sim/hpsim_console.c delete mode 100644 arch/ia64/hp/sim/hpsim_irq.c delete mode 100644 arch/ia64/hp/sim/hpsim_machvec.c delete mode 100644 arch/ia64/hp/sim/hpsim_setup.c delete mode 100644 arch/ia64/hp/sim/hpsim_ssc.h delete mode 100644 arch/ia64/hp/sim/simeth.c delete mode 100644 arch/ia64/hp/sim/simscsi.c delete mode 100644 arch/ia64/hp/sim/simserial.c delete mode 100644 arch/ia64/include/asm/hpsim.h delete mode 100644 arch/ia64/include/asm/machvec_hpsim.h

arch/ia64/Kconfig +7 -27
index ae3aca14506e..63db7a5378ac 100644
@@ -10,11 +10,11 @@ config IA64
  	bool
  	select ARCH_MIGHT_HAVE_PC_PARPORT
  	select ARCH_MIGHT_HAVE_PC_SERIO
-	select ACPI if (!IA64_HP_SIM)
-	select ARCH_SUPPORTS_ACPI if (!IA64_HP_SIM)
+	select ACPI
+	select ARCH_SUPPORTS_ACPI
  	select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
  	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
-	select FORCE_PCI if (!IA64_HP_SIM)
+	select FORCE_PCI
  	select PCI_DOMAINS if PCI
  	select PCI_SYSCALL if PCI
  	select HAVE_UNSTABLE_SCHED_CLOCK
@@ -140,7 +140,6 @@ config IA64_GENERIC
  	  HP-zx1/sx1000		For HP systems
  	  HP-zx1/sx1000+swiotlb	For HP systems with (broken) DMA-constrained devices.
  	  SGI-UV		For SGI UV systems
-	  Ski-simulator		For the HP simulator <http://www.hpl.hp.com/research/linux/ski/>
 
  	  If you don't know what to do, choose "generic".
 
@@ -181,11 +180,6 @@ config IA64_SGI_UV
  	  to select this option.  If in doubt, select ia64 generic support
  	  instead.
 
-config IA64_HP_SIM
-	bool "Ski-simulator"
-	select SWIOTLB
-	depends on !PM
-
  endchoice
 
  choice
@@ -239,14 +233,7 @@ config IA64_PAGE_SIZE_64KB
 
  endchoice
 
-if IA64_HP_SIM
-config HZ
-	default 32
-endif
-
-if !IA64_HP_SIM
  source "kernel/Kconfig.hz"
-endif
 
  config IA64_BRL_EMU
  	bool
@@ -265,11 +252,6 @@ config IA64_CYCLONE
  	  Say Y here to enable support for IBM EXA Cyclone time source.
  	  If you're unsure, answer N.
 
-config IOSAPIC
-	bool
-	depends on !IA64_HP_SIM
-	default y
-
  config FORCE_MAX_ZONEORDER
  	int "MAX_ORDER (11 - 17)"  if !HUGETLB_PAGE
  	range 11 17  if !HUGETLB_PAGE
@@ -373,7 +355,7 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
  config NUMA
  	bool "NUMA support"
-	depends on !IA64_HP_SIM && !FLATMEM
+	depends on !FLATMEM
  	select ACPI_NUMA if ACPI
  	help
  	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
@@ -395,7 +377,7 @@ config NODES_SHIFT
  config VIRTUAL_MEM_MAP
  	bool "Virtual mem map"
  	depends on !SPARSEMEM
-	default y if !IA64_HP_SIM
+	default y
  	help
  	  Say Y to compile the kernel with support for a virtual mem map.
  	  This code also only takes effect if a memory hole of greater than
@@ -478,7 +460,7 @@ config IA64_HP_AML_NFW
 
  config KEXEC
  	bool "kexec system call"
-	depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
+	depends on !SMP || HOTPLUG_CPU
  	select KEXEC_CORE
  	help
  	  kexec is a system call that implements the ability to shutdown your
@@ -496,7 +478,7 @@ config KEXEC
 
  config CRASH_DUMP
  	  bool "kernel crash dumps"
-	  depends on IA64_MCA_RECOVERY && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
+	  depends on IA64_MCA_RECOVERY && (!SMP || HOTPLUG_CPU)
  	  help
  	    Generate crash dump after being started by kexec.
 
@@ -518,8 +500,6 @@ endif
 
  endmenu
 
-source "arch/ia64/hp/sim/Kconfig"
-
  config MSPEC
  	tristate "Memory special operations driver"
  	depends on IA64
arch/ia64/Makefile +14 -13
index 0d730b061f72..8b866fc1f9cb 100644
@@ -39,6 +39,12 @@ $(error Sorry, you need a newer version of the assember, one that is built from
  		ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
  endif
 
+quiet_cmd_gzip = GZIP    $@
+cmd_gzip = cat $(real-prereqs) | gzip -n -f -9 > $@
+
+quiet_cmd_objcopy = OBJCOPY $@
+cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
+
  KBUILD_CFLAGS += $(cflags-y)
  head-y := arch/ia64/kernel/head.o
 
@@ -52,15 +58,12 @@ core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
  core-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
 
  drivers-$(CONFIG_PCI)		+= arch/ia64/pci/
-drivers-$(CONFIG_IA64_HP_SIM)	+= arch/ia64/hp/sim/
  drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/
  drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
-drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/uv/
+drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/uv/
  drivers-$(CONFIG_OPROFILE)	+= arch/ia64/oprofile/
 
-boot := arch/ia64/hp/sim/boot
-
-PHONY += boot compressed check
+PHONY += compressed check
 
  all: compressed unwcheck
 
@@ -68,22 +71,21 @@ compressed: vmlinux.gz
 
  vmlinuz: vmlinux.gz
 
-vmlinux.gz: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $@
+vmlinux.gz: vmlinux.bin FORCE
+	$(call if_changed,gzip)
+
+vmlinux.bin: vmlinux FORCE
+	$(call if_changed,objcopy)
 
  unwcheck: vmlinux
  	-$(Q)READELF=$(READELF) $(PYTHON) $(srctree)/arch/ia64/scripts/unwcheck.py $<
 
  archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
 
  archheaders:
  	$(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all
 
-CLEAN_FILES += vmlinux.gz bootloader
-
-boot:	lib/lib.a vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $@
+CLEAN_FILES += vmlinux.gz
 
  install: vmlinux.gz
  	sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
@@ -91,7 +93,6 @@ install: vmlinux.gz
  define archhelp
    echo '* compressed	- Build compressed kernel image'
    echo '  install	- Install compressed kernel image'
-  echo '  boot		- Build vmlinux and bootloader for Ski simulator'
    echo '* unwcheck	- Check vmlinux for invalid unwind info'
  endef
 
arch/ia64/configs/sim_defconfig deleted +0 -52
deleted file mode 100644
index f0f69fdbddae..000000000000
@@ -1,52 +0,0 @@
-CONFIG_SYSVIPC=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=16
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_IA64_HP_SIM=y
-CONFIG_MCKINLEY=y
-CONFIG_IA64_PAGE_SIZE_64KB=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=64
-CONFIG_PREEMPT=y
-CONFIG_IA64_PALINFO=m
-CONFIG_EFI_VARS=y
-CONFIG_BINFMT_MISC=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IPV6 is not set
-# CONFIG_STANDALONE is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_SCSI=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_SPI_ATTRS=y
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO_I8042 is not set
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_EFI_RTC=y
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_HP_SIMETH=y
-CONFIG_HP_SIMSERIAL=y
-CONFIG_HP_SIMSERIAL_CONSOLE=y
-CONFIG_HP_SIMSCSI=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT3_FS=y
-# CONFIG_EXT3_FS_XATTR is not set
-CONFIG_PROC_KCORE=y
-CONFIG_HUGETLBFS=y
-CONFIG_NFS_FS=y
-CONFIG_NFSD=y
-CONFIG_NFSD_V3=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DEBUG_MUTEXES=y
arch/ia64/hp/sim/Kconfig deleted +0 -23
deleted file mode 100644
index 56fb4f1d4f7c..000000000000
@@ -1,23 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-menu "HP Simulator drivers"
-	depends on IA64_HP_SIM || IA64_GENERIC
-
-config HP_SIMETH
-	bool "Simulated Ethernet "
-	depends on NET
-
-config HP_SIMSERIAL
-	bool "Simulated serial driver support"
-	depends on TTY
-
-config HP_SIMSERIAL_CONSOLE
-	bool "Console for HP simulator"
-	depends on HP_SIMSERIAL
-
-config HP_SIMSCSI
-	bool "Simulated SCSI disk"
-	depends on SCSI=y
-
-endmenu
-
arch/ia64/hp/sim/Makefile deleted +0 -17
deleted file mode 100644
index 0224a13d2c5b..000000000000
@@ -1,17 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# ia64/platform/hp/sim/Makefile
-#
-# Copyright (C) 2002 Hewlett-Packard Co.
-#	David Mosberger-Tang <[email protected]>
-# Copyright (C) 1999 Silicon Graphics, Inc.
-# Copyright (C) Srinivasa Thirumalachar ([email protected])
-#
-
-obj-y := hpsim_irq.o hpsim_setup.o hpsim.o
-obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
-
-obj-$(CONFIG_HP_SIMETH)	+= simeth.o
-obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
-obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
-obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
arch/ia64/hp/sim/boot/Makefile deleted +0 -37
deleted file mode 100644
index df6e9968c845..000000000000
@@ -1,37 +0,0 @@
-#
-# ia64/boot/Makefile
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-# Copyright (C) 1998, 2003 by David Mosberger-Tang <[email protected]>
-#
-
-targets-$(CONFIG_IA64_HP_SIM)  += bootloader
-targets := vmlinux.bin vmlinux.gz $(targets-y)
-
-quiet_cmd_cptotop = LN      $@
-      cmd_cptotop = ln -f $< $@
-
-vmlinux.gz: $(obj)/vmlinux.gz $(addprefix $(obj)/,$(targets-y))
-	$(call cmd,cptotop)
-	@echo '  Kernel: $@ is ready'
-
-boot: bootloader
-
-bootloader: $(obj)/bootloader
-	$(call cmd,cptotop)
-
-$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,gzip)
-
-$(obj)/vmlinux.bin: vmlinux FORCE
-	$(call if_changed,objcopy)
-
-
-LDFLAGS_bootloader = -static -T
-
-$(obj)/bootloader: $(src)/bootloader.lds $(obj)/bootloader.o $(obj)/boot_head.o $(obj)/fw-emu.o \
-                   lib/lib.a arch/ia64/lib/lib.a FORCE
-	$(call if_changed,ld)
arch/ia64/hp/sim/boot/boot_head.S deleted +0 -165
deleted file mode 100644
index a7d178fb41e8..000000000000
@@ -1,165 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 1998-2003 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- */
-
-#include <asm/asmmacro.h>
-#include <asm/pal.h>
-
-	.bss
-	.align 16
-stack_mem:
-	.skip 16834
-
-	.text
-
-/* This needs to be defined because lib/string.c:strlcat() calls it in case of error... */
-GLOBAL_ENTRY(printk)
-	break 0
-END(printk)
-
-GLOBAL_ENTRY(_start)
-	.prologue
-	.save rp, r0
-	.body
-	movl gp = __gp
-	movl sp = stack_mem+16384-16
-	bsw.1
-	br.call.sptk.many rp=start_bootloader
-0:	nop 0		  /* dummy nop to make unwinding work */
-END(_start)
-
-/*
- * Set a break point on this function so that symbols are available to set breakpoints in
- * the kernel being debugged.
- */
-GLOBAL_ENTRY(debug_break)
-	br.ret.sptk.many b0
-END(debug_break)
-
-GLOBAL_ENTRY(ssc)
-	.regstk 5,0,0,0
-	mov r15=in4
-	break 0x80001
-	br.ret.sptk.many b0
-END(ssc)
-
-GLOBAL_ENTRY(jmp_to_kernel)
-	.regstk 2,0,0,0
-	mov r28=in0
-	mov b7=in1
-	br.sptk.few b7
-END(jmp_to_kernel)
-
-/*
- * r28 contains the index of the PAL function
- * r29--31 the args
- * Return values in ret0--3 (r8--11)
- */
-GLOBAL_ENTRY(pal_emulator_static)
-	mov r8=-1
-	mov r9=256
-	;;
-	cmp.gtu p6,p7=r9,r28		/* r28 <= 255? */
-(p6)	br.cond.sptk.few static
-	;;
-	mov r9=512
-	;;
-	cmp.gtu p6,p7=r9,r28
-(p6)	br.cond.sptk.few stacked
-	;;
-static:	cmp.eq p6,p7=PAL_PTCE_INFO,r28
-(p7)	br.cond.sptk.few 1f
-	;;
-	mov r8=0			/* status = 0 */
-	movl r9=0x100000000		/* tc.base */
-	movl r10=0x0000000200000003	/* count[0], count[1] */
-	movl r11=0x1000000000002000	/* stride[0], stride[1] */
-	br.cond.sptk.few rp
-1:	cmp.eq p6,p7=PAL_FREQ_RATIOS,r28
-(p7)	br.cond.sptk.few 1f
-	mov r8=0			/* status = 0 */
-	movl r9 =0x100000064		/* proc_ratio (1/100) */
-	movl r10=0x100000100		/* bus_ratio<<32 (1/256) */
-	movl r11=0x100000064		/* itc_ratio<<32 (1/100) */
-	;;
-1:	cmp.eq p6,p7=PAL_RSE_INFO,r28
-(p7)	br.cond.sptk.few 1f
-	mov r8=0			/* status = 0 */
-	mov r9=96			/* num phys stacked */
-	mov r10=0			/* hints */
-	mov r11=0
-	br.cond.sptk.few rp
-1:	cmp.eq p6,p7=PAL_CACHE_FLUSH,r28		/* PAL_CACHE_FLUSH */
-(p7)	br.cond.sptk.few 1f
-	mov r9=ar.lc
-	movl r8=524288			/* flush 512k million cache lines (16MB) */
-	;;
-	mov ar.lc=r8
-	movl r8=0xe000000000000000
-	;;
-.loop:	fc r8
-	add r8=32,r8
-	br.cloop.sptk.few .loop
-	sync.i
-	;;
-	srlz.i
-	;;
-	mov ar.lc=r9
-	mov r8=r0
-	;;
-1:	cmp.eq p6,p7=PAL_PERF_MON_INFO,r28
-(p7)	br.cond.sptk.few 1f
-	mov r8=0			/* status = 0 */
-	movl r9 =0x08122f04		/* generic=4 width=47 retired=8 cycles=18 */
-	mov r10=0			/* reserved */
-	mov r11=0			/* reserved */
-	mov r16=0xffff			/* implemented PMC */
-	mov r17=0x3ffff			/* implemented PMD */
-	add r18=8,r29			/* second index */
-	;;
-	st8 [r29]=r16,16		/* store implemented PMC */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	;;
-	st8 [r29]=r0,16			/* clear remaining bits  */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	;;
-	st8 [r29]=r17,16		/* store implemented PMD */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	mov r16=0xf0			/* cycles count capable PMC */
-	;;
-	st8 [r29]=r0,16			/* clear remaining bits  */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	mov r17=0xf0			/* retired bundles capable PMC */
-	;;
-	st8 [r29]=r16,16		/* store cycles capable */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	;;
-	st8 [r29]=r0,16			/* clear remaining bits  */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	;;
-	st8 [r29]=r17,16		/* store retired bundle capable */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	;;
-	st8 [r29]=r0,16			/* clear remaining bits  */
-	st8 [r18]=r0,16			/* clear remaining bits  */
-	;;
-1:	cmp.eq p6,p7=PAL_VM_SUMMARY,r28
-(p7)	br.cond.sptk.few 1f
-	mov	r8=0			/* status = 0  */
-	movl	r9=0x2044040020F1865	/* num_tc_levels=2, num_unique_tcs=4 */
-					/* max_itr_entry=64, max_dtr_entry=64 */
-					/* hash_tag_id=2, max_pkr=15 */
-					/* key_size=24, phys_add_size=50, vw=1 */
-	movl	r10=0x183C		/* rid_size=24, impl_va_msb=60 */
-	;;
-1:	cmp.eq p6,p7=PAL_MEM_ATTRIB,r28
-(p7)	br.cond.sptk.few 1f
-	mov	r8=0			/* status = 0 */
-	mov	r9=0x80|0x01		/* NatPage|WB */
-	;;
-1:	br.cond.sptk.few rp
-stacked:
-	br.ret.sptk.few rp
-END(pal_emulator_static)
arch/ia64/hp/sim/boot/bootloader.c deleted +0 -175
deleted file mode 100644
index 6d804608dc81..000000000000
@@ -1,175 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * arch/ia64/hp/sim/boot/bootloader.c
- *
- * Loads an ELF kernel.
- *
- * Copyright (C) 1998-2003 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- *	Stephane Eranian <[email protected]>
- *
- * 01/07/99 S.Eranian modified to pass command line arguments to kernel
- */
-struct task_struct;	/* forward declaration for elf.h */
-
-#include <linux/elf.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-
-#include <asm/elf.h>
-#include <asm/intrinsics.h>
-#include <asm/pal.h>
-#include <asm/pgtable.h>
-#include <asm/sal.h>
-
-#include "ssc.h"
-
-struct disk_req {
-	unsigned long addr;
-	unsigned len;
-};
-
-struct disk_stat {
-	int fd;
-	unsigned count;
-};
-
-extern void jmp_to_kernel (unsigned long bp, unsigned long e_entry);
-extern struct ia64_boot_param *sys_fw_init (const char *args, int arglen);
-extern void debug_break (void);
-
-static void
-cons_write (const char *buf)
-{
-	unsigned long ch;
-
-	while ((ch = *buf++) != '\0') {
-		ssc(ch, 0, 0, 0, SSC_PUTCHAR);
-		if (ch == '\n')
-		  ssc('\r', 0, 0, 0, SSC_PUTCHAR);
-	}
-}
-
-#define MAX_ARGS 32
-
-void
-start_bootloader (void)
-{
-	static char mem[4096];
-	static char buffer[1024];
-	unsigned long off;
-	int fd, i;
-	struct disk_req req;
-	struct disk_stat stat;
-	struct elfhdr *elf;
-	struct elf_phdr *elf_phdr;	/* program header */
-	unsigned long e_entry, e_phoff, e_phnum;
-	register struct ia64_boot_param *bp;
-	char *kpath, *args;
-	long arglen = 0;
-
-	ssc(0, 0, 0, 0, SSC_CONSOLE_INIT);
-
-	/*
-	 * S.Eranian: extract the commandline argument from the simulator
-	 *
-	 * The expected format is as follows:
-         *
-	 *	kernelname args...
-	 *
-	 * Both are optional but you can't have the second one without the first.
-	 */
-	arglen = ssc((long) buffer, 0, 0, 0, SSC_GET_ARGS);
-
-	kpath = "vmlinux";
-	args = buffer;
-	if (arglen > 0) {
-		kpath = buffer;
-		while (*args != ' ' && *args != '\0')
-			++args, --arglen;
-		if (*args == ' ')
-			*args++ = '\0', --arglen;
-	}
-
-	if (arglen <= 0) {
-		args = "";
-		arglen = 1;
-	}
-
-	fd = ssc((long) kpath, 1, 0, 0, SSC_OPEN);
-
-	if (fd < 0) {
-		cons_write(kpath);
-		cons_write(": file not found, reboot now\n");
-		for(;;);
-	}
-	stat.fd = fd;
-	off = 0;
-
-	req.len = sizeof(mem);
-	req.addr = (long) mem;
-	ssc(fd, 1, (long) &req, off, SSC_READ);
-	ssc((long) &stat, 0, 0, 0, SSC_WAIT_COMPLETION);
-
-	elf = (struct elfhdr *) mem;
-	if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) != 0) {
-		cons_write("not an ELF file\n");
-		return;
-	}
-	if (elf->e_type != ET_EXEC) {
-		cons_write("not an ELF executable\n");
-		return;
-	}
-	if (!elf_check_arch(elf)) {
-		cons_write("kernel not for this processor\n");
-		return;
-	}
-
-	e_entry = elf->e_entry;
-	e_phnum = elf->e_phnum;
-	e_phoff = elf->e_phoff;
-
-	cons_write("loading ");
-	cons_write(kpath);
-	cons_write("...\n");
-
-	for (i = 0; i < e_phnum; ++i) {
-		req.len = sizeof(*elf_phdr);
-		req.addr = (long) mem;
-		ssc(fd, 1, (long) &req, e_phoff, SSC_READ);
-		ssc((long) &stat, 0, 0, 0, SSC_WAIT_COMPLETION);
-		if (stat.count != sizeof(*elf_phdr)) {
-			cons_write("failed to read phdr\n");
-			return;
-		}
-		e_phoff += sizeof(*elf_phdr);
-
-		elf_phdr = (struct elf_phdr *) mem;
-
-		if (elf_phdr->p_type != PT_LOAD)
-			continue;
-
-		req.len = elf_phdr->p_filesz;
-		req.addr = __pa(elf_phdr->p_paddr);
-		ssc(fd, 1, (long) &req, elf_phdr->p_offset, SSC_READ);
-		ssc((long) &stat, 0, 0, 0, SSC_WAIT_COMPLETION);
-		memset((char *)__pa(elf_phdr->p_paddr) + elf_phdr->p_filesz, 0,
-		       elf_phdr->p_memsz - elf_phdr->p_filesz);
-	}
-	ssc(fd, 0, 0, 0, SSC_CLOSE);
-
-	cons_write("starting kernel...\n");
-
-	/* fake an I/O base address: */
-	ia64_setreg(_IA64_REG_AR_KR0, 0xffffc000000UL);
-
-	bp = sys_fw_init(args, arglen);
-
-	ssc(0, (long) kpath, 0, 0, SSC_LOAD_SYMBOLS);
-
-	debug_break();
-	jmp_to_kernel((unsigned long) bp, e_entry);
-
-	cons_write("kernel returned!\n");
-	ssc(-1, 0, 0, 0, SSC_EXIT);
-}
arch/ia64/hp/sim/boot/bootloader.lds deleted +0 -67
deleted file mode 100644
index f3f284d6514c..000000000000
@@ -1,67 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-OUTPUT_FORMAT("elf64-ia64-little")
-OUTPUT_ARCH(ia64)
-ENTRY(_start)
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  . = 0x100000;
-
-  _text = .;
-  .text : { *(__ivt_section) *(.text) }
-  _etext = .;
-
-  /* Global data */
-  _data = .;
-  .rodata : { *(.rodata) *(.rodata.*) }
-  .data    : { *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS }
-  __gp = ALIGN (8) + 0x200000;
-  .got           : { *(.got.plt) *(.got) }
-  /* We want the small data sections together, so single-instruction offsets
-     can access them all, and initialized data all before uninitialized, so
-     we can shorten the on-disk segment size.  */
-  .sdata     : { *(.sdata) }
-  _edata  =  .;
-
-  __bss_start = .;
-  .sbss      : { *(.sbss) *(.scommon) }
-  .bss       : { *(.bss) *(COMMON) }
-  . = ALIGN(64 / 8);
-  __bss_stop = .;
-  _end = . ;
-
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
-  /* DWARF debug sections.
-     Symbols in the DWARF debugging sections are relative to the beginning
-     of the section so we begin them at 0.  */
-  /* DWARF 1 */
-  .debug          0 : { *(.debug) }
-  .line           0 : { *(.line) }
-  /* GNU DWARF 1 extensions */
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  /* DWARF 2 */
-  .debug_info     0 : { *(.debug_info) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
-  /* SGI/MIPS DWARF 2 extensions */
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames  0 : { *(.debug_varnames) }
-  /* These must appear regardless of  .  */
-}
arch/ia64/hp/sim/boot/fw-emu.c deleted +0 -374
deleted file mode 100644
index 517fb2822e04..000000000000
@@ -1,374 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * PAL & SAL emulation.
- *
- * Copyright (C) 1998-2001 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- */
-
-#ifdef CONFIG_PCI
-# include <linux/pci.h>
-#endif
-
-#include <linux/efi.h>
-#include <asm/io.h>
-#include <asm/pal.h>
-#include <asm/sal.h>
-#include <asm/setup.h>
-
-#include "ssc.h"
-
-#define MB	(1024*1024UL)
-
-#define SIMPLE_MEMMAP	1
-
-#if SIMPLE_MEMMAP
-# define NUM_MEM_DESCS	4
-#else
-# define NUM_MEM_DESCS	16
-#endif
-
-static char fw_mem[(  sizeof(struct ia64_boot_param)
-		    + sizeof(efi_system_table_t)
-		    + sizeof(efi_runtime_services_t)
-		    + 1*sizeof(efi_config_table_t)
-		    + sizeof(struct ia64_sal_systab)
-		    + sizeof(struct ia64_sal_desc_entry_point)
-		    + NUM_MEM_DESCS*(sizeof(efi_memory_desc_t))
-		    + 1024)] __attribute__ ((aligned (8)));
-
-#define SECS_PER_HOUR   (60 * 60)
-#define SECS_PER_DAY    (SECS_PER_HOUR * 24)
-
-/* Compute the `struct tm' representation of *T,
-   offset OFFSET seconds east of UTC,
-   and store year, yday, mon, mday, wday, hour, min, sec into *TP.
-   Return nonzero if successful.  */
-int
-offtime (unsigned long t, efi_time_t *tp)
-{
-	const unsigned short int __mon_yday[2][13] =
-	{
-		/* Normal years.  */
-		{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
-		/* Leap years.  */
-		{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
-	};
-	long int days, rem, y;
-	const unsigned short int *ip;
-
-	days = t / SECS_PER_DAY;
-	rem = t % SECS_PER_DAY;
-	while (rem < 0) {
-		rem += SECS_PER_DAY;
-		--days;
-	}
-	while (rem >= SECS_PER_DAY) {
-		rem -= SECS_PER_DAY;
-		++days;
-	}
-	tp->hour = rem / SECS_PER_HOUR;
-	rem %= SECS_PER_HOUR;
-	tp->minute = rem / 60;
-	tp->second = rem % 60;
-	/* January 1, 1970 was a Thursday.  */
-	y = 1970;
-
-#	define DIV(a, b) ((a) / (b) - ((a) % (b) < 0))
-#	define LEAPS_THRU_END_OF(y) (DIV (y, 4) - DIV (y, 100) + DIV (y, 400))
-#	define __isleap(year) \
-	  ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
-
-	while (days < 0 || days >= (__isleap (y) ? 366 : 365)) {
-		/* Guess a corrected year, assuming 365 days per year.  */
-		long int yg = y + days / 365 - (days % 365 < 0);
-
-		/* Adjust DAYS and Y to match the guessed year.  */
-		days -= ((yg - y) * 365 + LEAPS_THRU_END_OF (yg - 1)
-			 - LEAPS_THRU_END_OF (y - 1));
-		y = yg;
-	}
-	tp->year = y;
-	ip = __mon_yday[__isleap(y)];
-	for (y = 11; days < (long int) ip[y]; --y)
-		continue;
-	days -= ip[y];
-	tp->month = y + 1;
-	tp->day = days + 1;
-	return 1;
-}
-
-extern void pal_emulator_static (void);
-
-/* Macro to emulate SAL call using legacy IN and OUT calls to CF8, CFC etc.. */
-
-#define BUILD_CMD(addr)		((0x80000000 | (addr)) & ~3)
-
-#define REG_OFFSET(addr)	(0x00000000000000FF & (addr))
-#define DEVICE_FUNCTION(addr)	(0x000000000000FF00 & (addr))
-#define BUS_NUMBER(addr)	(0x0000000000FF0000 & (addr))
-
-static efi_status_t
-fw_efi_get_time (efi_time_t *tm, efi_time_cap_t *tc)
-{
-#if defined(CONFIG_IA64_HP_SIM) || defined(CONFIG_IA64_GENERIC)
-	struct {
-		int tv_sec;	/* must be 32bits to work */
-		int tv_usec;
-	} tv32bits;
-
-	ssc((unsigned long) &tv32bits, 0, 0, 0, SSC_GET_TOD);
-
-	memset(tm, 0, sizeof(*tm));
-	offtime(tv32bits.tv_sec, tm);
-
-	if (tc)
-		memset(tc, 0, sizeof(*tc));
-#else
-#	error Not implemented yet...
-#endif
-	return EFI_SUCCESS;
-}
-
-static void
-efi_reset_system (int reset_type, efi_status_t status, unsigned long data_size, efi_char16_t *data)
-{
-#if defined(CONFIG_IA64_HP_SIM) || defined(CONFIG_IA64_GENERIC)
-	ssc(status, 0, 0, 0, SSC_EXIT);
-#else
-#	error Not implemented yet...
-#endif
-}
-
-static efi_status_t
-efi_unimplemented (void)
-{
-	return EFI_UNSUPPORTED;
-}
-
-static struct sal_ret_values
-sal_emulator (long index, unsigned long in1, unsigned long in2,
-	      unsigned long in3, unsigned long in4, unsigned long in5,
-	      unsigned long in6, unsigned long in7)
-{
-	long r9  = 0;
-	long r10 = 0;
-	long r11 = 0;
-	long status;
-
-	/*
-	 * Don't do a "switch" here since that gives us code that
-	 * isn't self-relocatable.
-	 */
-	status = 0;
-	if (index == SAL_FREQ_BASE) {
-		if (in1 == SAL_FREQ_BASE_PLATFORM)
-			r9 = 200000000;
-		else if (in1 == SAL_FREQ_BASE_INTERVAL_TIMER) {
-			/*
-			 * Is this supposed to be the cr.itc frequency
-			 * or something platform specific?  The SAL
-			 * doc ain't exactly clear on this...
-			 */
-			r9 = 700000000;
-		} else if (in1 == SAL_FREQ_BASE_REALTIME_CLOCK)
-			r9 = 1;
-		else
-			status = -1;
-	} else if (index == SAL_SET_VECTORS) {
-		;
-	} else if (index == SAL_GET_STATE_INFO) {
-		;
-	} else if (index == SAL_GET_STATE_INFO_SIZE) {
-		;
-	} else if (index == SAL_CLEAR_STATE_INFO) {
-		;
-	} else if (index == SAL_MC_RENDEZ) {
-		;
-	} else if (index == SAL_MC_SET_PARAMS) {
-		;
-	} else if (index == SAL_CACHE_FLUSH) {
-		;
-	} else if (index == SAL_CACHE_INIT) {
-		;
-#ifdef CONFIG_PCI
-	} else if (index == SAL_PCI_CONFIG_READ) {
-		/*
-		 * in1 contains the PCI configuration address and in2
-		 * the size of the read.  The value that is read is
-		 * returned via the general register r9.
-		 */
-                outl(BUILD_CMD(in1), 0xCF8);
-                if (in2 == 1)                           /* Reading byte  */
-                        r9 = inb(0xCFC + ((REG_OFFSET(in1) & 3)));
-                else if (in2 == 2)                      /* Reading word  */
-                        r9 = inw(0xCFC + ((REG_OFFSET(in1) & 2)));
-                else                                    /* Reading dword */
-                        r9 = inl(0xCFC);
-                status = PCIBIOS_SUCCESSFUL;
-	} else if (index == SAL_PCI_CONFIG_WRITE) {
-	      	/*
-		 * in1 contains the PCI configuration address, in2 the
-		 * size of the write, and in3 the actual value to be
-		 * written out.
-		 */
-                outl(BUILD_CMD(in1), 0xCF8);
-                if (in2 == 1)                           /* Writing byte  */
-                        outb(in3, 0xCFC + ((REG_OFFSET(in1) & 3)));
-                else if (in2 == 2)                      /* Writing word  */
-                        outw(in3, 0xCFC + ((REG_OFFSET(in1) & 2)));
-                else                                    /* Writing dword */
-                        outl(in3, 0xCFC);
-                status = PCIBIOS_SUCCESSFUL;
-#endif /* CONFIG_PCI */
-	} else if (index == SAL_UPDATE_PAL) {
-		;
-	} else {
-		status = -1;
-	}
-	return ((struct sal_ret_values) {status, r9, r10, r11});
-}
-
-struct ia64_boot_param *
-sys_fw_init (const char *args, int arglen)
-{
-	efi_system_table_t *efi_systab;
-	efi_runtime_services_t *efi_runtime;
-	efi_config_table_t *efi_tables;
-	struct ia64_sal_systab *sal_systab;
-	efi_memory_desc_t *efi_memmap, *md;
-	unsigned long *pal_desc, *sal_desc;
-	struct ia64_sal_desc_entry_point *sal_ed;
-	struct ia64_boot_param *bp;
-	unsigned char checksum = 0;
-	char *cp, *cmd_line;
-	int i = 0;
-#	define MAKE_MD(typ, attr, start, end)		\
-	do {						\
-		md = efi_memmap + i++;			\
-		md->type = typ;				\
-		md->pad = 0;				\
-		md->phys_addr = start;			\
-		md->virt_addr = 0;			\
-		md->num_pages = (end - start) >> 12;	\
-		md->attribute = attr;			\
-	} while (0)
-
-	memset(fw_mem, 0, sizeof(fw_mem));
-
-	pal_desc = (unsigned long *) &pal_emulator_static;
-	sal_desc = (unsigned long *) &sal_emulator;
-
-	cp = fw_mem;
-	efi_systab  = (void *) cp; cp += sizeof(*efi_systab);
-	efi_runtime = (void *) cp; cp += sizeof(*efi_runtime);
-	efi_tables  = (void *) cp; cp += sizeof(*efi_tables);
-	sal_systab  = (void *) cp; cp += sizeof(*sal_systab);
-	sal_ed      = (void *) cp; cp += sizeof(*sal_ed);
-	efi_memmap  = (void *) cp; cp += NUM_MEM_DESCS*sizeof(*efi_memmap);
-	bp	    = (void *) cp; cp += sizeof(*bp);
-	cmd_line    = (void *) cp;
-
-	if (args) {
-		if (arglen >= 1024)
-			arglen = 1023;
-		memcpy(cmd_line, args, arglen);
-	} else {
-		arglen = 0;
-	}
-	cmd_line[arglen] = '\0';
-
-	memset(efi_systab, 0, sizeof(*efi_systab));
-	efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE;
-	efi_systab->hdr.revision  = ((1 << 16) | 00);
-	efi_systab->hdr.headersize = sizeof(efi_systab->hdr);
-	efi_systab->fw_vendor = __pa("H\0e\0w\0l\0e\0t\0t\0-\0P\0a\0c\0k\0a\0r\0d\0\0");
-	efi_systab->fw_revision = 1;
-	efi_systab->runtime = (void *) __pa(efi_runtime);
-	efi_systab->nr_tables = 1;
-	efi_systab->tables = __pa(efi_tables);
-
-	efi_runtime->hdr.signature = EFI_RUNTIME_SERVICES_SIGNATURE;
-	efi_runtime->hdr.revision = EFI_RUNTIME_SERVICES_REVISION;
-	efi_runtime->hdr.headersize = sizeof(efi_runtime->hdr);
-	efi_runtime->get_time = (void *)__pa(&fw_efi_get_time);
-	efi_runtime->set_time = (void *)__pa(&efi_unimplemented);
-	efi_runtime->get_wakeup_time = (void *)__pa(&efi_unimplemented);
-	efi_runtime->set_wakeup_time = (void *)__pa(&efi_unimplemented);
-	efi_runtime->set_virtual_address_map = (void *)__pa(&efi_unimplemented);
-	efi_runtime->get_variable = (void *)__pa(&efi_unimplemented);
-	efi_runtime->get_next_variable = (void *)__pa(&efi_unimplemented);
-	efi_runtime->set_variable = (void *)__pa(&efi_unimplemented);
-	efi_runtime->get_next_high_mono_count = (void *)__pa(&efi_unimplemented);
-	efi_runtime->reset_system = (void *)__pa(&efi_reset_system);
-
-	efi_tables->guid = SAL_SYSTEM_TABLE_GUID;
-	efi_tables->table = __pa(sal_systab);
-
-	/* fill in the SAL system table: */
-	memcpy(sal_systab->signature, "SST_", 4);
-	sal_systab->size = sizeof(*sal_systab);
-	sal_systab->sal_rev_minor = 1;
-	sal_systab->sal_rev_major = 0;
-	sal_systab->entry_count = 1;
-
-#ifdef CONFIG_IA64_GENERIC
-        strcpy(sal_systab->oem_id, "Generic");
-        strcpy(sal_systab->product_id, "IA-64 system");
-#endif
-
-#ifdef CONFIG_IA64_HP_SIM
-	strcpy(sal_systab->oem_id, "Hewlett-Packard");
-	strcpy(sal_systab->product_id, "HP-simulator");
-#endif
-
-	/* fill in an entry point: */
-	sal_ed->type = SAL_DESC_ENTRY_POINT;
-	sal_ed->pal_proc = __pa(pal_desc[0]);
-	sal_ed->sal_proc = __pa(sal_desc[0]);
-	sal_ed->gp = __pa(sal_desc[1]);
-
-	for (cp = (char *) sal_systab; cp < (char *) efi_memmap; ++cp)
-		checksum += *cp;
-
-	sal_systab->checksum = -checksum;
-
-#if SIMPLE_MEMMAP
-	/* simulate free memory at physical address zero */
-	MAKE_MD(EFI_BOOT_SERVICES_DATA,		EFI_MEMORY_WB,    0*MB,    1*MB);
-	MAKE_MD(EFI_PAL_CODE,			EFI_MEMORY_WB,    1*MB,    2*MB);
-	MAKE_MD(EFI_CONVENTIONAL_MEMORY,	EFI_MEMORY_WB,    2*MB,  130*MB);
-	MAKE_MD(EFI_CONVENTIONAL_MEMORY,	EFI_MEMORY_WB, 4096*MB, 4128*MB);
-#else
-	MAKE_MD( 4,		   0x9, 0x0000000000000000, 0x0000000000001000);
-	MAKE_MD( 7,		   0x9, 0x0000000000001000, 0x000000000008a000);
-	MAKE_MD( 4,		   0x9, 0x000000000008a000, 0x00000000000a0000);
-	MAKE_MD( 5, 0x8000000000000009, 0x00000000000c0000, 0x0000000000100000);
-	MAKE_MD( 7,		   0x9, 0x0000000000100000, 0x0000000004400000);
-	MAKE_MD( 2,		   0x9, 0x0000000004400000, 0x0000000004be5000);
-	MAKE_MD( 7,		   0x9, 0x0000000004be5000, 0x000000007f77e000);
-	MAKE_MD( 6, 0x8000000000000009, 0x000000007f77e000, 0x000000007fb94000);
-	MAKE_MD( 6, 0x8000000000000009, 0x000000007fb94000, 0x000000007fb95000);
-	MAKE_MD( 6, 0x8000000000000009, 0x000000007fb95000, 0x000000007fc00000);
-	MAKE_MD(13, 0x8000000000000009, 0x000000007fc00000, 0x000000007fc3a000);
-	MAKE_MD( 7,		   0x9, 0x000000007fc3a000, 0x000000007fea0000);
-	MAKE_MD( 5, 0x8000000000000009, 0x000000007fea0000, 0x000000007fea8000);
-	MAKE_MD( 7,		   0x9, 0x000000007fea8000, 0x000000007feab000);
-	MAKE_MD( 5, 0x8000000000000009, 0x000000007feab000, 0x000000007ffff000);
-	MAKE_MD( 7,		   0x9, 0x00000000ff400000, 0x0000000104000000);
-#endif
-
-	bp->efi_systab = __pa(&fw_mem);
-	bp->efi_memmap = __pa(efi_memmap);
-	bp->efi_memmap_size = NUM_MEM_DESCS*sizeof(efi_memory_desc_t);
-	bp->efi_memdesc_size = sizeof(efi_memory_desc_t);
-	bp->efi_memdesc_version = 1;
-	bp->command_line = __pa(cmd_line);
-	bp->console_info.num_cols = 80;
-	bp->console_info.num_rows = 25;
-	bp->console_info.orig_x = 0;
-	bp->console_info.orig_y = 24;
-	bp->fpswa = 0;
-
-	return bp;
-}
arch/ia64/hp/sim/boot/ssc.h deleted +0 -36
deleted file mode 100644
index 88752c7509e0..000000000000
@@ -1,36 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 1998-2003 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- *	Stephane Eranian <[email protected]>
- */
-#ifndef ssc_h
-#define ssc_h
-
-/* Simulator system calls: */
-
-#define SSC_CONSOLE_INIT		20
-#define SSC_GETCHAR			21
-#define SSC_PUTCHAR			31
-#define SSC_OPEN			50
-#define SSC_CLOSE			51
-#define SSC_READ			52
-#define SSC_WRITE			53
-#define SSC_GET_COMPLETION		54
-#define SSC_WAIT_COMPLETION		55
-#define SSC_CONNECT_INTERRUPT		58
-#define SSC_GENERATE_INTERRUPT		59
-#define SSC_SET_PERIODIC_INTERRUPT	60
-#define SSC_GET_RTC			65
-#define SSC_EXIT			66
-#define SSC_LOAD_SYMBOLS		69
-#define SSC_GET_TOD			74
-
-#define SSC_GET_ARGS			75
-
-/*
- * Simulator system call.
- */
-extern long ssc (long arg0, long arg1, long arg2, long arg3, int nr);
-
-#endif /* ssc_h */
arch/ia64/hp/sim/hpsim.S deleted +0 -11
deleted file mode 100644
index 44b4d53e1689..000000000000
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <asm/asmmacro.h>
-
-/*
- * Simulator system call.
- */
-GLOBAL_ENTRY(ia64_ssc)
-	mov r15=r36
-	break 0x80001
-	br.ret.sptk.many rp
-END(ia64_ssc)
arch/ia64/hp/sim/hpsim_console.c deleted +0 -77
deleted file mode 100644
index bffd9f67a8a1..000000000000
@@ -1,77 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Platform dependent support for HP simulator.
- *
- * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- * Copyright (C) 1999 Vijay Chander <[email protected]>
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/tty.h>
-#include <linux/kdev_t.h>
-#include <linux/console.h>
-
-#include <asm/delay.h>
-#include <asm/irq.h>
-#include <asm/pal.h>
-#include <asm/machvec.h>
-#include <asm/pgtable.h>
-#include <asm/sal.h>
-#include <asm/hpsim.h>
-
-#include "hpsim_ssc.h"
-
-static int simcons_init (struct console *, char *);
-static void simcons_write (struct console *, const char *, unsigned);
-static struct tty_driver *simcons_console_device (struct console *, int *);
-
-static struct console hpsim_cons = {
-	.name =		"simcons",
-	.write =	simcons_write,
-	.device =	simcons_console_device,
-	.setup =	simcons_init,
-	.flags =	CON_PRINTBUFFER,
-	.index =	-1,
-};
-
-static int
-simcons_init (struct console *cons, char *options)
-{
-	return 0;
-}
-
-static void
-simcons_write (struct console *cons, const char *buf, unsigned count)
-{
-	unsigned long ch;
-
-	while (count-- > 0) {
-		ch = *buf++;
-		ia64_ssc(ch, 0, 0, 0, SSC_PUTCHAR);
-		if (ch == '\n')
-		  ia64_ssc('\r', 0, 0, 0, SSC_PUTCHAR);
-	}
-}
-
-static struct tty_driver *simcons_console_device (struct console *c, int *index)
-{
-	*index = c->index;
-	return hp_simserial_driver;
-}
-
-int simcons_register(void)
-{
-	if (!ia64_platform_is("hpsim"))
-		return 1;
-
-	if (hpsim_cons.flags & CON_ENABLED)
-		return 1;
-
-	register_console(&hpsim_cons);
-	return 0;
-}
arch/ia64/hp/sim/hpsim_irq.c deleted +0 -76
deleted file mode 100644
index 2f1cc59650ab..000000000000
@@ -1,76 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Platform dependent support for HP simulator.
- *
- * Copyright (C) 1998-2001 Hewlett-Packard Co
- * Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]>
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/irq.h>
-
-#include "hpsim_ssc.h"
-
-static unsigned int
-hpsim_irq_startup(struct irq_data *data)
-{
-	return 0;
-}
-
-static void
-hpsim_irq_noop(struct irq_data *data)
-{
-}
-
-static int
-hpsim_set_affinity_noop(struct irq_data *d, const struct cpumask *b, bool f)
-{
-	return 0;
-}
-
-static struct irq_chip irq_type_hp_sim = {
-	.name =			"hpsim",
-	.irq_startup =		hpsim_irq_startup,
-	.irq_shutdown =		hpsim_irq_noop,
-	.irq_enable =		hpsim_irq_noop,
-	.irq_disable =		hpsim_irq_noop,
-	.irq_ack =		hpsim_irq_noop,
-	.irq_set_affinity =	hpsim_set_affinity_noop,
-};
-
-static void hpsim_irq_set_chip(int irq)
-{
-	struct irq_chip *chip = irq_get_chip(irq);
-
-	if (chip == &no_irq_chip)
-		irq_set_chip(irq, &irq_type_hp_sim);
-}
-
-static void hpsim_connect_irq(int intr, int irq)
-{
-	ia64_ssc(intr, irq, 0, 0, SSC_CONNECT_INTERRUPT);
-}
-
-int hpsim_get_irq(int intr)
-{
-	int irq = assign_irq_vector(AUTO_ASSIGN);
-
-	if (irq >= 0) {
-		hpsim_irq_set_chip(irq);
-		irq_set_handler(irq, handle_simple_irq);
-		hpsim_connect_irq(intr, irq);
-	}
-
-	return irq;
-}
-
-void __init
-hpsim_irq_init (void)
-{
-	int i;
-
-	for_each_active_irq(i)
-		hpsim_irq_set_chip(i);
-}
arch/ia64/hp/sim/hpsim_machvec.c deleted +0 -3
deleted file mode 100644
index c21419359185..000000000000
@@ -1,3 +0,0 @@
-#define MACHVEC_PLATFORM_NAME		hpsim
-#define MACHVEC_PLATFORM_HEADER		<asm/machvec_hpsim.h>
-#include <asm/machvec_init.h>
arch/ia64/hp/sim/hpsim_setup.c deleted +0 -41
deleted file mode 100644
index 41d21d51dc4d..000000000000
@@ -1,41 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Platform dependent support for HP simulator.
- *
- * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- * Copyright (C) 1999 Vijay Chander <[email protected]>
- */
-#include <linux/console.h>
-#include <linux/init.h>
-#include <linux/kdev_t.h>
-#include <linux/kernel.h>
-#include <linux/major.h>
-#include <linux/param.h>
-#include <linux/root_dev.h>
-#include <linux/string.h>
-#include <linux/types.h>
-
-#include <asm/delay.h>
-#include <asm/irq.h>
-#include <asm/pal.h>
-#include <asm/machvec.h>
-#include <asm/pgtable.h>
-#include <asm/sal.h>
-#include <asm/hpsim.h>
-
-#include "hpsim_ssc.h"
-
-void
-ia64_ctl_trace (long on)
-{
-	ia64_ssc(on, 0, 0, 0, SSC_CTL_TRACE);
-}
-
-void __init
-hpsim_setup (char **cmdline_p)
-{
-	ROOT_DEV = Root_SDA1;		/* default to first SCSI drive */
-
-	simcons_register();
-}
arch/ia64/hp/sim/hpsim_ssc.h deleted +0 -37
deleted file mode 100644
index 6fd97a487811..000000000000
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Platform dependent support for HP simulator.
- *
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]>
- * Copyright (C) 1999 Vijay Chander <[email protected]>
- */
-#ifndef _IA64_PLATFORM_HPSIM_SSC_H
-#define _IA64_PLATFORM_HPSIM_SSC_H
-
-/* Simulator system calls: */
-
-#define SSC_CONSOLE_INIT		20
-#define SSC_GETCHAR			21
-#define SSC_PUTCHAR			31
-#define SSC_CONNECT_INTERRUPT		58
-#define SSC_GENERATE_INTERRUPT		59
-#define SSC_SET_PERIODIC_INTERRUPT	60
-#define SSC_GET_RTC			65
-#define SSC_EXIT			66
-#define SSC_LOAD_SYMBOLS		69
-#define SSC_GET_TOD			74
-#define SSC_CTL_TRACE			76
-
-#define SSC_NETDEV_PROBE		100
-#define SSC_NETDEV_SEND			101
-#define SSC_NETDEV_RECV			102
-#define SSC_NETDEV_ATTACH		103
-#define SSC_NETDEV_DETACH		104
-
-/*
- * Simulator system call.
- */
-extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr);
-
-#endif /* _IA64_PLATFORM_HPSIM_SSC_H */
arch/ia64/hp/sim/simeth.c deleted +0 -510
deleted file mode 100644
index f39ef2b4ed72..000000000000
@@ -1,510 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Simulated Ethernet Driver
- *
- * Copyright (C) 1999-2001, 2003 Hewlett-Packard Co
- *	Stephane Eranian <[email protected]>
- */
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/types.h>
-#include <linux/in.h>
-#include <linux/string.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/interrupt.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/inetdevice.h>
-#include <linux/if_ether.h>
-#include <linux/if_arp.h>
-#include <linux/skbuff.h>
-#include <linux/notifier.h>
-#include <linux/bitops.h>
-#include <asm/irq.h>
-#include <asm/hpsim.h>
-
-#include "hpsim_ssc.h"
-
-#define SIMETH_RECV_MAX	10
-
-/*
- * Maximum possible received frame for Ethernet.
- * We preallocate an sk_buff of that size to avoid costly
- * memcpy for temporary buffer into sk_buff. We do basically
- * what's done in other drivers, like eepro with a ring.
- * The difference is, of course, that we don't have real DMA !!!
- */
-#define SIMETH_FRAME_SIZE	ETH_FRAME_LEN
-
-
-#define NETWORK_INTR			8
-
-struct simeth_local {
-	struct net_device_stats stats;
-	int 			simfd;	 /* descriptor in the simulator */
-};
-
-static int simeth_probe1(void);
-static int simeth_open(struct net_device *dev);
-static int simeth_close(struct net_device *dev);
-static int simeth_tx(struct sk_buff *skb, struct net_device *dev);
-static int simeth_rx(struct net_device *dev);
-static struct net_device_stats *simeth_get_stats(struct net_device *dev);
-static irqreturn_t simeth_interrupt(int irq, void *dev_id);
-static void set_multicast_list(struct net_device *dev);
-static int simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr);
-
-static char *simeth_version="0.3";
-
-/*
- * This variable is used to establish a mapping between the Linux/ia64 kernel
- * and the host linux kernel.
- *
- * As of today, we support only one card, even though most of the code
- * is ready for many more. The mapping is then:
- *	linux/ia64 -> linux/x86
- * 	   eth0    -> eth1
- *
- * In the future, we some string operations, we could easily support up
- * to 10 cards (0-9).
- *
- * The default mapping can be changed on the kernel command line by
- * specifying simeth=ethX (or whatever string you want).
- */
-static char *simeth_device="eth0";	 /* default host interface to use */
-
-
-
-static volatile unsigned int card_count; /* how many cards "found" so far */
-static int simeth_debug;		/* set to 1 to get debug information */
-
-/*
- * Used to catch IFF_UP & IFF_DOWN events
- */
-static struct notifier_block simeth_dev_notifier = {
-	simeth_device_event,
-	NULL
-};
-
-
-/*
- * Function used when using a kernel command line option.
- *
- * Format: simeth=interface_name (like eth0)
- */
-static int __init
-simeth_setup(char *str)
-{
-	simeth_device = str;
-	return 1;
-}
-
-__setup("simeth=", simeth_setup);
-
-/*
- * Function used to probe for simeth devices when not installed
- * as a loadable module
- */
-
-int __init
-simeth_probe (void)
-{
-	int r;
-
-	printk(KERN_INFO "simeth: v%s\n", simeth_version);
-
-	r = simeth_probe1();
-
-	if (r == 0) register_netdevice_notifier(&simeth_dev_notifier);
-
-	return r;
-}
-
-static inline int
-netdev_probe(char *name, unsigned char *ether)
-{
-	return ia64_ssc(__pa(name), __pa(ether), 0,0, SSC_NETDEV_PROBE);
-}
-
-
-static inline int
-netdev_attach(int fd, int irq, unsigned int ipaddr)
-{
-	/* this puts the host interface in the right mode (start interrupting) */
-	return ia64_ssc(fd, ipaddr, 0,0, SSC_NETDEV_ATTACH);
-}
-
-
-static inline int
-netdev_detach(int fd)
-{
-	/*
-	 * inactivate the host interface (don't interrupt anymore) */
-	return ia64_ssc(fd, 0,0,0, SSC_NETDEV_DETACH);
-}
-
-static inline int
-netdev_send(int fd, unsigned char *buf, unsigned int len)
-{
-	return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_SEND);
-}
-
-static inline int
-netdev_read(int fd, unsigned char *buf, unsigned int len)
-{
-	return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV);
-}
-
-static const struct net_device_ops simeth_netdev_ops = {
-	.ndo_open		= simeth_open,
-	.ndo_stop		= simeth_close,
-	.ndo_start_xmit		= simeth_tx,
-	.ndo_get_stats		= simeth_get_stats,
-	.ndo_set_rx_mode	= set_multicast_list, /* not yet used */
-
-};
-
-/*
- * Function shared with module code, so cannot be in init section
- *
- * So far this function "detects" only one card (test_&_set) but could
- * be extended easily.
- *
- * Return:
- * 	- -ENODEV is no device found
- *	- -ENOMEM is no more memory
- *	- 0 otherwise
- */
-static int
-simeth_probe1(void)
-{
-	unsigned char mac_addr[ETH_ALEN];
-	struct simeth_local *local;
-	struct net_device *dev;
-	int fd, err, rc;
-
-	/*
-	 * XXX Fix me
-	 * let's support just one card for now
-	 */
-	if (test_and_set_bit(0, &card_count))
-		return -ENODEV;
-
-	/*
-	 * check with the simulator for the device
-	 */
-	fd = netdev_probe(simeth_device, mac_addr);
-	if (fd == -1)
-		return -ENODEV;
-
-	dev = alloc_etherdev(sizeof(struct simeth_local));
-	if (!dev)
-		return -ENOMEM;
-
-	memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr));
-
-	local = netdev_priv(dev);
-	local->simfd = fd; /* keep track of underlying file descriptor */
-
-	dev->netdev_ops = &simeth_netdev_ops;
-
-	err = register_netdev(dev);
-	if (err) {
-		free_netdev(dev);
-		return err;
-	}
-
-	/*
-	 * attach the interrupt in the simulator, this does enable interrupts
-	 * until a netdev_attach() is called
-	 */
-	if ((rc = hpsim_get_irq(NETWORK_INTR)) < 0)
-		panic("%s: out of interrupt vectors!\n", __func__);
-	dev->irq = rc;
-
-	printk(KERN_INFO "%s: hosteth=%s simfd=%d, HwAddr=%pm, IRQ %d\n",
-	       dev->name, simeth_device, local->simfd, dev->dev_addr, dev->irq);
-
-	return 0;
-}
-
-/*
- * actually binds the device to an interrupt vector
- */
-static int
-simeth_open(struct net_device *dev)
-{
-	if (request_irq(dev->irq, simeth_interrupt, 0, "simeth", dev)) {
-		printk(KERN_WARNING "simeth: unable to get IRQ %d.\n", dev->irq);
-		return -EAGAIN;
-	}
-
-	netif_start_queue(dev);
-
-	return 0;
-}
-
-/* copied from lapbether.c */
-static __inline__ int dev_is_ethdev(struct net_device *dev)
-{
-       return ( dev->type == ARPHRD_ETHER && strncmp(dev->name, "dummy", 5));
-}
-
-
-/*
- * Handler for IFF_UP or IFF_DOWN
- *
- * The reason for that is that we don't want to be interrupted when the
- * interface is down. There is no way to unconnect in the simualtor. Instead
- * we use this function to shutdown packet processing in the frame filter
- * in the simulator. Thus no interrupts are generated
- *
- *
- * That's also the place where we pass the IP address of this device to the
- * simulator so that that we can start filtering packets for it
- *
- * There may be a better way of doing this, but I don't know which yet.
- */
-static int
-simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
-{
-	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
-	struct simeth_local *local;
-	struct in_device *in_dev;
-	struct in_ifaddr **ifap = NULL;
-	struct in_ifaddr *ifa = NULL;
-	int r;
-
-
-	if ( ! dev ) {
-		printk(KERN_WARNING "simeth_device_event dev=0\n");
-		return NOTIFY_DONE;
-	}
-
-	if (dev_net(dev) != &init_net)
-		return NOTIFY_DONE;
-
-	if ( event != NETDEV_UP && event != NETDEV_DOWN ) return NOTIFY_DONE;
-
-	/*
-	 * Check whether or not it's for an ethernet device
-	 *
-	 * XXX Fixme: This works only as long as we support one
-	 * type of ethernet device.
-	 */
-	if ( !dev_is_ethdev(dev) ) return NOTIFY_DONE;
-
-	if ((in_dev=dev->ip_ptr) != NULL) {
-		for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next)
-			if (strcmp(dev->name, ifa->ifa_label) == 0) break;
-	}
-	if ( ifa == NULL ) {
-		printk(KERN_ERR "simeth_open: can't find device %s's ifa\n", dev->name);
-		return NOTIFY_DONE;
-	}
-
-	printk(KERN_INFO "simeth_device_event: %s ipaddr=0x%x\n",
-	       dev->name, ntohl(ifa->ifa_local));
-
-	/*
-	 * XXX Fix me
-	 * if the device was up, and we're simply reconfiguring it, not sure
-	 * we get DOWN then UP.
-	 */
-
-	local = netdev_priv(dev);
-	/* now do it for real */
-	r = event == NETDEV_UP ?
-		netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)):
-		netdev_detach(local->simfd);
-
-	printk(KERN_INFO "simeth: netdev_attach/detach: event=%s ->%d\n",
-	       event == NETDEV_UP ? "attach":"detach", r);
-
-	return NOTIFY_DONE;
-}
-
-static int
-simeth_close(struct net_device *dev)
-{
-	netif_stop_queue(dev);
-
-	free_irq(dev->irq, dev);
-
-	return 0;
-}
-
-/*
- * Only used for debug
- */
-static void
-frame_print(unsigned char *from, unsigned char *frame, int len)
-{
-	int i;
-
-	printk("%s: (%d) %02x", from, len, frame[0] & 0xff);
-	for(i=1; i < 6; i++ ) {
-		printk(":%02x", frame[i] &0xff);
-	}
-	printk(" %2x", frame[6] &0xff);
-	for(i=7; i < 12; i++ ) {
-		printk(":%02x", frame[i] &0xff);
-	}
-	printk(" [%02x%02x]\n", frame[12], frame[13]);
-
-	for(i=14; i < len; i++ ) {
-		printk("%02x ", frame[i] &0xff);
-		if ( (i%10)==0) printk("\n");
-	}
-	printk("\n");
-}
-
-
-/*
- * Function used to transmit of frame, very last one on the path before
- * going to the simulator.
- */
-static int
-simeth_tx(struct sk_buff *skb, struct net_device *dev)
-{
-	struct simeth_local *local = netdev_priv(dev);
-
-#if 0
-	/* ensure we have at least ETH_ZLEN bytes (min frame size) */
-	unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
-	/* Where do the extra padding bytes comes from inthe skbuff ? */
-#else
-	/* the real driver in the host system is going to take care of that
-	 * or maybe it's the NIC itself.
-	 */
-	unsigned int length = skb->len;
-#endif
-
-	local->stats.tx_bytes += skb->len;
-	local->stats.tx_packets++;
-
-
-	if (simeth_debug > 5) frame_print("simeth_tx", skb->data, length);
-
-	netdev_send(local->simfd, skb->data, length);
-
-	/*
-	 * we are synchronous on write, so we don't simulate a
-	 * trasnmit complete interrupt, thus we don't need to arm a tx
-	 */
-
-	dev_kfree_skb(skb);
-	return NETDEV_TX_OK;
-}
-
-static inline struct sk_buff *
-make_new_skb(struct net_device *dev)
-{
-	struct sk_buff *nskb;
-
-	/*
-	 * The +2 is used to make sure that the IP header is nicely
-	 * aligned (on 4byte boundary I assume 14+2=16)
-	 */
-	nskb = dev_alloc_skb(SIMETH_FRAME_SIZE + 2);
-	if ( nskb == NULL ) {
-		printk(KERN_NOTICE "%s: memory squeeze. dropping packet.\n", dev->name);
-		return NULL;
-	}
-
-	skb_reserve(nskb, 2);	/* Align IP on 16 byte boundaries */
-
-	skb_put(nskb,SIMETH_FRAME_SIZE);
-
-	return nskb;
-}
-
-/*
- * called from interrupt handler to process a received frame
- */
-static int
-simeth_rx(struct net_device *dev)
-{
-	struct simeth_local	*local;
-	struct sk_buff		*skb;
-	int			len;
-	int			rcv_count = SIMETH_RECV_MAX;
-
-	local = netdev_priv(dev);
-	/*
-	 * the loop concept has been borrowed from other drivers
-	 * looks to me like it's a throttling thing to avoid pushing to many
-	 * packets at one time into the stack. Making sure we can process them
-	 * upstream and make forward progress overall
-	 */
-	do {
-		if ( (skb=make_new_skb(dev)) == NULL ) {
-			printk(KERN_NOTICE "%s: memory squeeze. dropping packet.\n", dev->name);
-			local->stats.rx_dropped++;
-			return 0;
-		}
-		/*
-		 * Read only one frame at a time
-		 */
-		len = netdev_read(local->simfd, skb->data, SIMETH_FRAME_SIZE);
-		if ( len == 0 ) {
-			if ( simeth_debug > 0 ) printk(KERN_WARNING "%s: count=%d netdev_read=0\n",
-						       dev->name, SIMETH_RECV_MAX-rcv_count);
-			break;
-		}
-#if 0
-		/*
-		 * XXX Fix me
-		 * Should really do a csum+copy here
-		 */
-		skb_copy_to_linear_data(skb, frame, len);
-#endif
-		skb->protocol = eth_type_trans(skb, dev);
-
-		if ( simeth_debug > 6 ) frame_print("simeth_rx", skb->data, len);
-
-		/*
-		 * push the packet up & trigger software interrupt
-		 */
-		netif_rx(skb);
-
-		local->stats.rx_packets++;
-		local->stats.rx_bytes += len;
-
-	} while ( --rcv_count );
-
-	return len; /* 0 = nothing left to read, otherwise, we can try again */
-}
-
-/*
- * Interrupt handler (Yes, we can do it too !!!)
- */
-static irqreturn_t
-simeth_interrupt(int irq, void *dev_id)
-{
-	struct net_device *dev = dev_id;
-
-	/*
-	 * very simple loop because we get interrupts only when receiving
-	 */
-	while (simeth_rx(dev));
-	return IRQ_HANDLED;
-}
-
-static struct net_device_stats *
-simeth_get_stats(struct net_device *dev)
-{
-	struct simeth_local *local = netdev_priv(dev);
-
-	return &local->stats;
-}
-
-/* fake multicast ability */
-static void
-set_multicast_list(struct net_device *dev)
-{
-	printk(KERN_WARNING "%s: set_multicast_list called\n", dev->name);
-}
-
-__initcall(simeth_probe);
arch/ia64/hp/sim/simscsi.c deleted +0 -373
deleted file mode 100644
index 0a8a74271173..000000000000
@@ -1,373 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Simulated SCSI driver.
- *
- * Copyright (C) 1999, 2001-2003 Hewlett-Packard Co
- *	David Mosberger-Tang <[email protected]>
- *	Stephane Eranian <[email protected]>
- *
- * 02/01/15 David Mosberger	Updated for v2.5.1
- * 99/12/18 David Mosberger	Added support for READ10/WRITE10 needed by linux v2.3.33
- */
-#include <linux/blkdev.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/kernel.h>
-#include <linux/timer.h>
-#include <asm/irq.h>
-#include "hpsim_ssc.h"
-
-#include <scsi/scsi.h>
-#include <scsi/scsi_cmnd.h>
-#include <scsi/scsi_device.h>
-#include <scsi/scsi_host.h>
-
-#define DEBUG_SIMSCSI	0
-
-#define SIMSCSI_REQ_QUEUE_LEN	64
-#define DEFAULT_SIMSCSI_ROOT	"/var/ski-disks/sd"
-
-/* Simulator system calls: */
-
-#define SSC_OPEN			50
-#define SSC_CLOSE			51
-#define SSC_READ			52
-#define SSC_WRITE			53
-#define SSC_GET_COMPLETION		54
-#define SSC_WAIT_COMPLETION		55
-
-#define SSC_WRITE_ACCESS		2
-#define SSC_READ_ACCESS			1
-
-#if DEBUG_SIMSCSI
-  int simscsi_debug;
-# define DBG	simscsi_debug
-#else
-# define DBG	0
-#endif
-
-static struct Scsi_Host *host;
-
-static void simscsi_interrupt (unsigned long val);
-static DECLARE_TASKLET(simscsi_tasklet, simscsi_interrupt, 0);
-
-struct disk_req {
-	unsigned long addr;
-	unsigned len;
-};
-
-struct disk_stat {
-	int fd;
-	unsigned count;
-};
-
-static int desc[16] = {
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
-};
-
-static struct queue_entry {
-	struct scsi_cmnd *sc;
-} queue[SIMSCSI_REQ_QUEUE_LEN];
-
-static int rd, wr;
-static atomic_t num_reqs = ATOMIC_INIT(0);
-
-/* base name for default disks */
-static char *simscsi_root = DEFAULT_SIMSCSI_ROOT;
-
-#define MAX_ROOT_LEN	128
-
-/*
- * used to setup a new base for disk images
- * to use /foo/bar/disk[a-z] as disk images
- * you have to specify simscsi=/foo/bar/disk on the command line
- */
-static int __init
-simscsi_setup (char *s)
-{
-	/* XXX Fix me we may need to strcpy() ? */
-	if (strlen(s) > MAX_ROOT_LEN) {
-		printk(KERN_ERR "simscsi_setup: prefix too long---using default %s\n",
-		       simscsi_root);
-	} else
-		simscsi_root = s;
-	return 1;
-}
-
-__setup("simscsi=", simscsi_setup);
-
-static void
-simscsi_interrupt (unsigned long val)
-{
-	struct scsi_cmnd *sc;
-
-	while ((sc = queue[rd].sc) != NULL) {
-		atomic_dec(&num_reqs);
-		queue[rd].sc = NULL;
-		if (DBG)
-			printk("simscsi_interrupt: done with %u\n",
-			       sc->request->tag);
-		(*sc->scsi_done)(sc);
-		rd = (rd + 1) % SIMSCSI_REQ_QUEUE_LEN;
-	}
-}
-
-static int
-simscsi_biosparam (struct scsi_device *sdev, struct block_device *n,
-		sector_t capacity, int ip[])
-{
-	ip[0] = 64;		/* heads */
-	ip[1] = 32;		/* sectors */
-	ip[2] = capacity >> 11;	/* cylinders */
-	return 0;
-}
-
-static void
-simscsi_sg_readwrite (struct scsi_cmnd *sc, int mode, unsigned long offset)
-{
-	int i;
-	struct scatterlist *sl;
-	struct disk_stat stat;
-	struct disk_req req;
-
-	stat.fd = desc[sc->device->id];
-
-	scsi_for_each_sg(sc, sl, scsi_sg_count(sc), i) {
-		req.addr = __pa(sg_virt(sl));
-		req.len  = sl->length;
-		if (DBG)
-			printk("simscsi_sg_%s @ %lx (off %lx) use_sg=%d len=%d\n",
-			       mode == SSC_READ ? "read":"write", req.addr, offset,
-			       scsi_sg_count(sc) - i, sl->length);
-		ia64_ssc(stat.fd, 1, __pa(&req), offset, mode);
-		ia64_ssc(__pa(&stat), 0, 0, 0, SSC_WAIT_COMPLETION);
-
-		/* should not happen in our case */
-		if (stat.count != req.len) {
-			sc->result = DID_ERROR << 16;
-			return;
-		}
-		offset +=  sl->length;
-	}
-	sc->result = GOOD;
-}
-
-/*
- * function handling both READ_6/WRITE_6 (non-scatter/gather mode)
- * commands.
- * Added 02/26/99 S.Eranian
- */
-static void
-simscsi_readwrite6 (struct scsi_cmnd *sc, int mode)
-{
-	unsigned long offset;
-
-	offset = (((sc->cmnd[1] & 0x1f) << 16) | (sc->cmnd[2] << 8) | sc->cmnd[3])*512;
-	simscsi_sg_readwrite(sc, mode, offset);
-}
-
-static size_t
-simscsi_get_disk_size (int fd)
-{
-	struct disk_stat stat;
-	size_t bit, sectors = 0;
-	struct disk_req req;
-	char buf[512];
-
-	/*
-	 * This is a bit kludgey: the simulator doesn't provide a
-	 * direct way of determining the disk size, so we do a binary
-	 * search, assuming a maximum disk size of 128GB.
-	 */
-	for (bit = (128UL << 30)/512; bit != 0; bit >>= 1) {
-		req.addr = __pa(&buf);
-		req.len = sizeof(buf);
-		ia64_ssc(fd, 1, __pa(&req), ((sectors | bit) - 1)*512, SSC_READ);
-		stat.fd = fd;
-		ia64_ssc(__pa(&stat), 0, 0, 0, SSC_WAIT_COMPLETION);
-		if (stat.count == sizeof(buf))
-			sectors |= bit;
-	}
-	return sectors - 1;	/* return last valid sector number */
-}
-
-static void
-simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
-{
-	unsigned long offset;
-
-	offset = (((unsigned long)sc->cmnd[2] << 24)
-		| ((unsigned long)sc->cmnd[3] << 16)
-		| ((unsigned long)sc->cmnd[4] <<  8)
-		| ((unsigned long)sc->cmnd[5] <<  0))*512UL;
-	simscsi_sg_readwrite(sc, mode, offset);
-}
-
-static int
-simscsi_queuecommand_lck (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
-{
-	unsigned int target_id = sc->device->id;
-	char fname[MAX_ROOT_LEN+16];
-	size_t disk_size;
-	char *buf;
-	char localbuf[36];
-#if DEBUG_SIMSCSI
-	register long sp asm ("sp");
-
-	if (DBG)
-		printk("simscsi_queuecommand: target=%d,cmnd=%u,sc=%u,sp=%lx,done=%p\n",
-		       target_id, sc->cmnd[0], sc->request->tag, sp, done);
-#endif
-
-	sc->result = DID_BAD_TARGET << 16;
-	sc->scsi_done = done;
-	if (target_id <= 15 && sc->device->lun == 0) {
-		switch (sc->cmnd[0]) {
-		      case INQUIRY:
-			if (scsi_bufflen(sc) < 35) {
-				break;
-			}
-			sprintf (fname, "%s%c", simscsi_root, 'a' + target_id);
-			desc[target_id] = ia64_ssc(__pa(fname), SSC_READ_ACCESS|SSC_WRITE_ACCESS,
-						   0, 0, SSC_OPEN);
-			if (desc[target_id] < 0) {
-				/* disk doesn't exist... */
-				break;
-			}
-			buf = localbuf;
-			buf[0] = 0;	/* magnetic disk */
-			buf[1] = 0;	/* not a removable medium */
-			buf[2] = 2;	/* SCSI-2 compliant device */
-			buf[3] = 2;	/* SCSI-2 response data format */
-			buf[4] = 31;	/* additional length (bytes) */
-			buf[5] = 0;	/* reserved */
-			buf[6] = 0;	/* reserved */
-			buf[7] = 0;	/* various flags */
-			memcpy(buf + 8, "HP      SIMULATED DISK  0.00",  28);
-			scsi_sg_copy_from_buffer(sc, buf, 36);
-			sc->result = GOOD;
-			break;
-
-		      case TEST_UNIT_READY:
-			sc->result = GOOD;
-			break;
-
-		      case READ_6:
-			if (desc[target_id] < 0 )
-				break;
-			simscsi_readwrite6(sc, SSC_READ);
-			break;
-
-		      case READ_10:
-			if (desc[target_id] < 0 )
-				break;
-			simscsi_readwrite10(sc, SSC_READ);
-			break;
-
-		      case WRITE_6:
-			if (desc[target_id] < 0)
-				break;
-			simscsi_readwrite6(sc, SSC_WRITE);
-			break;
-
-		      case WRITE_10:
-			if (desc[target_id] < 0)
-				break;
-			simscsi_readwrite10(sc, SSC_WRITE);
-			break;
-
-		      case READ_CAPACITY:
-			if (desc[target_id] < 0 || scsi_bufflen(sc) < 8) {
-				break;
-			}
-			buf = localbuf;
-			disk_size = simscsi_get_disk_size(desc[target_id]);
-
-			buf[0] = (disk_size >> 24) & 0xff;
-			buf[1] = (disk_size >> 16) & 0xff;
-			buf[2] = (disk_size >>  8) & 0xff;
-			buf[3] = (disk_size >>  0) & 0xff;
-			/* set block size of 512 bytes: */
-			buf[4] = 0;
-			buf[5] = 0;
-			buf[6] = 2;
-			buf[7] = 0;
-			scsi_sg_copy_from_buffer(sc, buf, 8);
-			sc->result = GOOD;
-			break;
-
-		      case MODE_SENSE:
-		      case MODE_SENSE_10:
-			/* sd.c uses this to determine whether disk does write-caching. */
-			scsi_sg_copy_from_buffer(sc, (char *)empty_zero_page,
-						 PAGE_SIZE);
-			sc->result = GOOD;
-			break;
-
-		      case START_STOP:
-			printk(KERN_ERR "START_STOP\n");
-			break;
-
-		      default:
-			panic("simscsi: unknown SCSI command %u\n", sc->cmnd[0]);
-		}
-	}
-	if (sc->result == DID_BAD_TARGET) {
-		sc->result |= DRIVER_SENSE << 24;
-		sc->sense_buffer[0] = 0x70;
-		sc->sense_buffer[2] = 0x00;
-	}
-	if (atomic_read(&num_reqs) >= SIMSCSI_REQ_QUEUE_LEN) {
-		panic("Attempt to queue command while command is pending!!");
-	}
-	atomic_inc(&num_reqs);
-	queue[wr].sc = sc;
-	wr = (wr + 1) % SIMSCSI_REQ_QUEUE_LEN;
-
-	tasklet_schedule(&simscsi_tasklet);
-	return 0;
-}
-
-static DEF_SCSI_QCMD(simscsi_queuecommand)
-
-static int
-simscsi_host_reset (struct scsi_cmnd *sc)
-{
-	printk(KERN_ERR "simscsi_host_reset: not implemented\n");
-	return 0;
-}
-
-static struct scsi_host_template driver_template = {
-	.name			= "simulated SCSI host adapter",
-	.proc_name		= "simscsi",
-	.queuecommand		= simscsi_queuecommand,
-	.eh_host_reset_handler	= simscsi_host_reset,
-	.bios_param		= simscsi_biosparam,
-	.can_queue		= SIMSCSI_REQ_QUEUE_LEN,
-	.this_id		= -1,
-	.sg_tablesize		= SG_ALL,
-	.max_sectors		= 1024,
-	.cmd_per_lun		= SIMSCSI_REQ_QUEUE_LEN,
-	.dma_boundary		= PAGE_SIZE - 1,
-};
-
-static int __init
-simscsi_init(void)
-{
-	int error;
-
-	host = scsi_host_alloc(&driver_template, 0);
-	if (!host)
-		return -ENOMEM;
-
-	error = scsi_add_host(host, NULL);
-	if (error)
-		goto free_host;
-	scsi_scan_host(host);
-	return 0;
-
- free_host:
-	scsi_host_put(host);
-	return error;
-}
-device_initcall(simscsi_init);
arch/ia64/hp/sim/simserial.c deleted +0 -521
deleted file mode 100644
index 1a338e541334..000000000000
@@ -1,521 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Simulated Serial Driver (fake serial)
- *
- * This driver is mostly used for bringup purposes and will go away.
- * It has a strong dependency on the system console. All outputs
- * are rerouted to the same facility as the one used by printk which, in our
- * case means sys_sim.c console (goes via the simulator).
- *
- * Copyright (C) 1999-2000, 2002-2003 Hewlett-Packard Co
- *	Stephane Eranian <[email protected]>
- *	David Mosberger-Tang <[email protected]>
- */
-
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/sched/debug.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/major.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/seq_file.h>
-#include <linux/slab.h>
-#include <linux/capability.h>
-#include <linux/circ_buf.h>
-#include <linux/console.h>
-#include <linux/irq.h>
-#include <linux/module.h>
-#include <linux/serial.h>
-#include <linux/sysrq.h>
-#include <linux/uaccess.h>
-
-#include <asm/hpsim.h>
-
-#include "hpsim_ssc.h"
-
-#undef SIMSERIAL_DEBUG	/* define this to get some debug information */
-
-#define KEYBOARD_INTR	3	/* must match with simulator! */
-
-#define NR_PORTS	1	/* only one port for now */
-
-struct serial_state {
-	struct tty_port port;
-	struct circ_buf xmit;
-	int irq;
-	int x_char;
-};
-
-static struct serial_state rs_table[NR_PORTS];
-
-struct tty_driver *hp_simserial_driver;
-
-static struct console *console;
-
-static void receive_chars(struct tty_port *port)
-{
-	unsigned char ch;
-	static unsigned char seen_esc = 0;
-
-	while ( (ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR)) ) {
-		if (ch == 27 && seen_esc == 0) {
-			seen_esc = 1;
-			continue;
-		} else if (seen_esc == 1 && ch == 'O') {
-			seen_esc = 2;
-			continue;
-		} else if (seen_esc == 2) {
-			if (ch == 'P') /* F1 */
-				show_state();
-#ifdef CONFIG_MAGIC_SYSRQ
-			if (ch == 'S') { /* F4 */
-				do {
-					ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR);
-				} while (!ch);
-				handle_sysrq(ch);
-			}
-#endif
-			seen_esc = 0;
-			continue;
-		}
-		seen_esc = 0;
-
-		if (tty_insert_flip_char(port, ch, TTY_NORMAL) == 0)
-			break;
-	}
-	tty_flip_buffer_push(port);
-}
-
-/*
- * This is the serial driver's interrupt routine for a single port
- */
-static irqreturn_t rs_interrupt_single(int irq, void *dev_id)
-{
-	struct serial_state *info = dev_id;
-
-	receive_chars(&info->port);
-
-	return IRQ_HANDLED;
-}
-
-/*
- * -------------------------------------------------------------------
- * Here ends the serial interrupt routines.
- * -------------------------------------------------------------------
- */
-
-static int rs_put_char(struct tty_struct *tty, unsigned char ch)
-{
-	struct serial_state *info = tty->driver_data;
-	unsigned long flags;
-
-	if (!info->xmit.buf)
-		return 0;
-
-	local_irq_save(flags);
-	if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) == 0) {
-		local_irq_restore(flags);
-		return 0;
-	}
-	info->xmit.buf[info->xmit.head] = ch;
-	info->xmit.head = (info->xmit.head + 1) & (SERIAL_XMIT_SIZE-1);
-	local_irq_restore(flags);
-	return 1;
-}
-
-static void transmit_chars(struct tty_struct *tty, struct serial_state *info,
-		int *intr_done)
-{
-	int count;
-	unsigned long flags;
-
-	local_irq_save(flags);
-
-	if (info->x_char) {
-		char c = info->x_char;
-
-		console->write(console, &c, 1);
-
-		info->x_char = 0;
-
-		goto out;
-	}
-
-	if (info->xmit.head == info->xmit.tail || tty->stopped) {
-#ifdef SIMSERIAL_DEBUG
-		printk("transmit_chars: head=%d, tail=%d, stopped=%d\n",
-		       info->xmit.head, info->xmit.tail, tty->stopped);
-#endif
-		goto out;
-	}
-	/*
-	 * We removed the loop and try to do it in to chunks. We need
-	 * 2 operations maximum because it's a ring buffer.
-	 *
-	 * First from current to tail if possible.
-	 * Then from the beginning of the buffer until necessary
-	 */
-
-	count = min(CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE),
-		    SERIAL_XMIT_SIZE - info->xmit.tail);
-	console->write(console, info->xmit.buf+info->xmit.tail, count);
-
-	info->xmit.tail = (info->xmit.tail+count) & (SERIAL_XMIT_SIZE-1);
-
-	/*
-	 * We have more at the beginning of the buffer
-	 */
-	count = CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
-	if (count) {
-		console->write(console, info->xmit.buf, count);
-		info->xmit.tail += count;
-	}
-out:
-	local_irq_restore(flags);
-}
-
-static void rs_flush_chars(struct tty_struct *tty)
-{
-	struct serial_state *info = tty->driver_data;
-
-	if (info->xmit.head == info->xmit.tail || tty->stopped ||
-			!info->xmit.buf)
-		return;
-
-	transmit_chars(tty, info, NULL);
-}
-
-static int rs_write(struct tty_struct * tty,
-		    const unsigned char *buf, int count)
-{
-	struct serial_state *info = tty->driver_data;
-	int	c, ret = 0;
-	unsigned long flags;
-
-	if (!info->xmit.buf)
-		return 0;
-
-	local_irq_save(flags);
-	while (1) {
-		c = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
-		if (count < c)
-			c = count;
-		if (c <= 0) {
-			break;
-		}
-		memcpy(info->xmit.buf + info->xmit.head, buf, c);
-		info->xmit.head = ((info->xmit.head + c) &
-				   (SERIAL_XMIT_SIZE-1));
-		buf += c;
-		count -= c;
-		ret += c;
-	}
-	local_irq_restore(flags);
-	/*
-	 * Hey, we transmit directly from here in our case
-	 */
-	if (CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) &&
-			!tty->stopped)
-		transmit_chars(tty, info, NULL);
-
-	return ret;
-}
-
-static int rs_write_room(struct tty_struct *tty)
-{
-	struct serial_state *info = tty->driver_data;
-
-	return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
-}
-
-static int rs_chars_in_buffer(struct tty_struct *tty)
-{
-	struct serial_state *info = tty->driver_data;
-
-	return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
-}
-
-static void rs_flush_buffer(struct tty_struct *tty)
-{
-	struct serial_state *info = tty->driver_data;
-	unsigned long flags;
-
-	local_irq_save(flags);
-	info->xmit.head = info->xmit.tail = 0;
-	local_irq_restore(flags);
-
-	tty_wakeup(tty);
-}
-
-/*
- * This function is used to send a high-priority XON/XOFF character to
- * the device
- */
-static void rs_send_xchar(struct tty_struct *tty, char ch)
-{
-	struct serial_state *info = tty->driver_data;
-
-	info->x_char = ch;
-	if (ch) {
-		/*
-		 * I guess we could call console->write() directly but
-		 * let's do that for now.
-		 */
-		transmit_chars(tty, info, NULL);
-	}
-}
-
-/*
- * ------------------------------------------------------------
- * rs_throttle()
- *
- * This routine is called by the upper-layer tty layer to signal that
- * incoming characters should be throttled.
- * ------------------------------------------------------------
- */
-static void rs_throttle(struct tty_struct * tty)
-{
-	if (I_IXOFF(tty))
-		rs_send_xchar(tty, STOP_CHAR(tty));
-
-	printk(KERN_INFO "simrs_throttle called\n");
-}
-
-static void rs_unthrottle(struct tty_struct * tty)
-{
-	struct serial_state *info = tty->driver_data;
-
-	if (I_IXOFF(tty)) {
-		if (info->x_char)
-			info->x_char = 0;
-		else
-			rs_send_xchar(tty, START_CHAR(tty));
-	}
-	printk(KERN_INFO "simrs_unthrottle called\n");
-}
-
-static int rs_setserial(struct tty_struct *tty, struct serial_struct *ss)
-{
-	return 0;
-}
-
-static int rs_getserial(struct tty_struct *tty, struct serial_struct *ss)
-{
-	return 0;
-}
-
-static int rs_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
-{
-	if ((cmd != TIOCSERCONFIG) && (cmd != TIOCMIWAIT)) {
-		if (tty_io_error(tty))
-		    return -EIO;
-	}
-
-	switch (cmd) {
-	case TIOCMIWAIT:
-		return 0;
-	case TIOCSERCONFIG:
-	case TIOCSERGETLSR: /* Get line status register */
-		return -EINVAL;
-	}
-	return -ENOIOCTLCMD;
-}
-
-/*
- * This routine will shutdown a serial port; interrupts are disabled, and
- * DTR is dropped if the hangup on close termio flag is on.
- */
-static void shutdown(struct tty_port *port)
-{
-	struct serial_state *info = container_of(port, struct serial_state,
-			port);
-	unsigned long flags;
-
-	local_irq_save(flags);
-	if (info->irq)
-		free_irq(info->irq, info);
-
-	if (info->xmit.buf) {
-		free_page((unsigned long) info->xmit.buf);
-		info->xmit.buf = NULL;
-	}
-	local_irq_restore(flags);
-}
-
-static void rs_close(struct tty_struct *tty, struct file * filp)
-{
-	struct serial_state *info = tty->driver_data;
-
-	tty_port_close(&info->port, tty, filp);
-}
-
-static void rs_hangup(struct tty_struct *tty)
-{
-	struct serial_state *info = tty->driver_data;
-
-	rs_flush_buffer(tty);
-	tty_port_hangup(&info->port);
-}
-
-static int activate(struct tty_port *port, struct tty_struct *tty)
-{
-	struct serial_state *state = container_of(port, struct serial_state,
-			port);
-	unsigned long flags, page;
-	int retval = 0;
-
-	page = get_zeroed_page(GFP_KERNEL);
-	if (!page)
-		return -ENOMEM;
-
-	local_irq_save(flags);
-
-	if (state->xmit.buf)
-		free_page(page);
-	else
-		state->xmit.buf = (unsigned char *) page;
-
-	if (state->irq) {
-		retval = request_irq(state->irq, rs_interrupt_single, 0,
-				"simserial", state);
-		if (retval)
-			goto errout;
-	}
-
-	state->xmit.head = state->xmit.tail = 0;
-errout:
-	local_irq_restore(flags);
-	return retval;
-}
-
-
-/*
- * This routine is called whenever a serial port is opened.  It
- * enables interrupts for a serial port, linking in its async structure into
- * the IRQ chain.   It also performs the serial-specific
- * initialization for the tty structure.
- */
-static int rs_open(struct tty_struct *tty, struct file * filp)
-{
-	struct serial_state *info = rs_table + tty->index;
-	struct tty_port *port = &info->port;
-
-	tty->driver_data = info;
-	port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-
-	/*
-	 * figure out which console to use (should be one already)
-	 */
-	console = console_drivers;
-	while (console) {
-		if ((console->flags & CON_ENABLED) && console->write) break;
-		console = console->next;
-	}
-
-	return tty_port_open(port, tty, filp);
-}
-
-/*
- * /proc fs routines....
- */
-
-static int rs_proc_show(struct seq_file *m, void *v)
-{
-	int i;
-
-	seq_printf(m, "simserinfo:1.0\n");
-	for (i = 0; i < NR_PORTS; i++)
-		seq_printf(m, "%d: uart:16550 port:3F8 irq:%d\n",
-		       i, rs_table[i].irq);
-	return 0;
-}
-
-static const struct tty_operations hp_ops = {
-	.open = rs_open,
-	.close = rs_close,
-	.write = rs_write,
-	.put_char = rs_put_char,
-	.flush_chars = rs_flush_chars,
-	.write_room = rs_write_room,
-	.chars_in_buffer = rs_chars_in_buffer,
-	.flush_buffer = rs_flush_buffer,
-	.ioctl = rs_ioctl,
-	.throttle = rs_throttle,
-	.unthrottle = rs_unthrottle,
-	.send_xchar = rs_send_xchar,
-	.set_serial = rs_setserial,
-	.get_serial = rs_getserial,
-	.hangup = rs_hangup,
-	.proc_show = rs_proc_show,
-};
-
-static const struct tty_port_operations hp_port_ops = {
-	.activate = activate,
-	.shutdown = shutdown,
-};
-
-static int __init simrs_init(void)
-{
-	struct serial_state *state;
-	int retval;
-
-	if (!ia64_platform_is("hpsim"))
-		return -ENODEV;
-
-	hp_simserial_driver = alloc_tty_driver(NR_PORTS);
-	if (!hp_simserial_driver)
-		return -ENOMEM;
-
-	printk(KERN_INFO "SimSerial driver with no serial options enabled\n");
-
-	/* Initialize the tty_driver structure */
-
-	hp_simserial_driver->driver_name = "simserial";
-	hp_simserial_driver->name = "ttyS";
-	hp_simserial_driver->major = TTY_MAJOR;
-	hp_simserial_driver->minor_start = 64;
-	hp_simserial_driver->type = TTY_DRIVER_TYPE_SERIAL;
-	hp_simserial_driver->subtype = SERIAL_TYPE_NORMAL;
-	hp_simserial_driver->init_termios = tty_std_termios;
-	hp_simserial_driver->init_termios.c_cflag =
-		B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-	hp_simserial_driver->flags = TTY_DRIVER_REAL_RAW;
-	tty_set_operations(hp_simserial_driver, &hp_ops);
-
-	state = rs_table;
-	tty_port_init(&state->port);
-	state->port.ops = &hp_port_ops;
-	state->port.close_delay = 0; /* XXX really 0? */
-
-	retval = hpsim_get_irq(KEYBOARD_INTR);
-	if (retval < 0) {
-		printk(KERN_ERR "%s: out of interrupt vectors!\n",
-				__func__);
-		goto err_free_tty;
-	}
-
-	state->irq = retval;
-
-	/* the port is imaginary */
-	printk(KERN_INFO "ttyS0 at 0x03f8 (irq = %d) is a 16550\n", state->irq);
-
-	tty_port_link_device(&state->port, hp_simserial_driver, 0);
-	retval = tty_register_driver(hp_simserial_driver);
-	if (retval) {
-		printk(KERN_ERR "Couldn't register simserial driver\n");
-		goto err_free_tty;
-	}
-
-	return 0;
-err_free_tty:
-	put_tty_driver(hp_simserial_driver);
-	tty_port_destroy(&state->port);
-	return retval;
-}
-
-#ifndef MODULE
-__initcall(simrs_init);
-#endif
arch/ia64/include/asm/acpi.h +1 -3
index 80c5ef8f475e..0afb3bc4b4a1 100644
@@ -37,9 +37,7 @@ const char *acpi_get_sysname (void);
  #else
  static inline const char *acpi_get_sysname (void)
  {
-# if defined (CONFIG_IA64_HP_SIM)
-	return "hpsim";
-# elif defined (CONFIG_IA64_HP_ZX1)
+# if defined (CONFIG_IA64_HP_ZX1)
  	return "hpzx1";
  # elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
  	return "hpzx1_swiotlb";
arch/ia64/include/asm/hpsim.h deleted +0 -17
deleted file mode 100644
index 00fbd5cc8ab8..000000000000
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASMIA64_HPSIM_H
-#define _ASMIA64_HPSIM_H
-
-#ifndef CONFIG_HP_SIMSERIAL_CONSOLE
-static inline int simcons_register(void) { return 1; }
-#else
-int simcons_register(void);
-#endif
-
-struct tty_driver;
-extern struct tty_driver *hp_simserial_driver;
-
-extern int hpsim_get_irq(int intr);
-void ia64_ctl_trace(long on);
-
-#endif
arch/ia64/include/asm/iosapic.h +0 -12
index f48556cb8afc..a91aeb413e17 100644
@@ -52,8 +52,6 @@
 
  #ifndef __ASSEMBLY__
 
-#ifdef CONFIG_IOSAPIC
-
  #define NR_IOSAPICS			256
 
  #define iosapic_pcat_compat_init	ia64_native_iosapic_pcat_compat_init
@@ -103,16 +101,6 @@ extern int __init iosapic_register_platform_intr (u32 int_type,
  #ifdef CONFIG_NUMA
  extern void map_iosapic_to_node (unsigned int, int);
  #endif
-#else
-#define iosapic_system_init(pcat_compat)			do { } while (0)
-#define iosapic_init(address,gsi_base)				(-EINVAL)
-#define iosapic_remove(gsi_base)				(-ENODEV)
-#define iosapic_register_intr(gsi,polarity,trigger)		(gsi)
-#define iosapic_unregister_intr(irq)				do { } while (0)
-#define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger)	do { } while (0)
-#define iosapic_register_platform_intr(type,gsi,pmi,eid,id, \
-	polarity,trigger)					(gsi)
-#endif
 
  # endif /* !__ASSEMBLY__ */
  #endif /* __ASM_IA64_IOSAPIC_H */
arch/ia64/include/asm/machvec.h +1 -10
index f426a9829595..5a9a8af79308 100644
@@ -16,7 +16,6 @@
  struct device;
 
  typedef void ia64_mv_setup_t (char **);
-typedef void ia64_mv_irq_init_t (void);
  typedef void ia64_mv_dma_init (void);
  typedef const struct dma_map_ops *ia64_mv_dma_get_ops(struct device *);
 
@@ -27,9 +26,7 @@ machvec_noop (void)
 
  extern void machvec_setup (char **);
 
-# if defined (CONFIG_IA64_HP_SIM)
-#  include <asm/machvec_hpsim.h>
-# elif defined (CONFIG_IA64_DIG)
+# if defined (CONFIG_IA64_DIG)
  #  include <asm/machvec_dig.h>
  # elif defined(CONFIG_IA64_DIG_VTD)
  #  include <asm/machvec_dig_vtd.h>
@@ -46,7 +43,6 @@ extern void machvec_setup (char **);
  # else
  #  define ia64_platform_name	ia64_mv.name
  #  define platform_setup	ia64_mv.setup
-#  define platform_irq_init	ia64_mv.irq_init
  #  define platform_dma_init		ia64_mv.dma_init
  #  define platform_dma_get_ops		ia64_mv.dma_get_ops
  # endif
@@ -59,7 +55,6 @@ extern void machvec_setup (char **);
  struct ia64_machine_vector {
  	const char *name;
  	ia64_mv_setup_t *setup;
-	ia64_mv_irq_init_t *irq_init;
  	ia64_mv_dma_init *dma_init;
  	ia64_mv_dma_get_ops *dma_get_ops;
  } __attribute__((__aligned__(16))); /* align attrib? see above comment */
@@ -68,7 +63,6 @@ struct ia64_machine_vector {
  {						\
  	#name,					\
  	platform_setup,				\
-	platform_irq_init,			\
  	platform_dma_init,			\
  	platform_dma_get_ops,			\
  }
@@ -91,9 +85,6 @@ extern const struct dma_map_ops *dma_get_ops(struct device *);
  #ifndef platform_setup
  # define platform_setup			machvec_setup
  #endif
-#ifndef platform_irq_init
-# define platform_irq_init		machvec_noop
-#endif
  #ifndef platform_dma_init
  # define platform_dma_init		swiotlb_dma_init
  #endif
arch/ia64/include/asm/machvec_hpsim.h deleted +0 -19
deleted file mode 100644
index 056f8405822e..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_MACHVEC_HPSIM_h
-#define _ASM_IA64_MACHVEC_HPSIM_h
-
-extern ia64_mv_setup_t hpsim_setup;
-extern ia64_mv_irq_init_t hpsim_irq_init;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name	"hpsim"
-#define platform_setup		hpsim_setup
-#define platform_irq_init	hpsim_irq_init
-
-#endif /* _ASM_IA64_MACHVEC_HPSIM_h */
arch/ia64/kernel/Makefile +1 -2
index 4ba05140b249..3ada440ff893 100644
@@ -12,13 +12,12 @@ extra-y	:= head.o vmlinux.lds
  obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
  	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
  	 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
-	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o
+	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o iosapic.o
 
  obj-$(CONFIG_ACPI)		+= acpi.o acpi-ext.o
  obj-$(CONFIG_IA64_BRL_EMU)	+= brl_emu.o
 
  obj-$(CONFIG_IA64_PALINFO)	+= palinfo.o
-obj-$(CONFIG_IOSAPIC)		+= iosapic.o
  obj-$(CONFIG_MODULES)		+= module.o
  obj-$(CONFIG_SMP)		+= smp.o smpboot.o
  obj-$(CONFIG_NUMA)		+= numa.o
arch/ia64/kernel/irq_ia64.c +0 -2
index 1c81ec752b04..e3874734b149 100644
@@ -53,7 +53,6 @@
  #define IRQ_USED		(1)
  #define IRQ_RSVD		(2)
 
-/* These can be overridden in platform_irq_init */
  int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR;
  int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR;
 
@@ -648,7 +647,6 @@ init_IRQ (void)
  #ifdef CONFIG_PERFMON
  	pfm_init_percpu();
  #endif
-	platform_irq_init();
  }
 
  void
arch/ia64/kernel/setup.c +2 -11
index 4dc74500eac5..42ef03ce2fd4 100644
@@ -63,7 +63,6 @@
  #include <asm/smp.h>
  #include <asm/tlbflush.h>
  #include <asm/unistd.h>
-#include <asm/hpsim.h>
 
  #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
  # error "struct cpuinfo_ia64 too big!"
@@ -461,16 +460,11 @@ io_port_init (void)
  static inline int __init
  early_console_setup (char *cmdline)
  {
-	int earlycons = 0;
-
  #ifdef CONFIG_EFI_PCDP
  	if (!efi_setup_pcdp_console(cmdline))
-		earlycons++;
+		return 0;
  #endif
-	if (!simcons_register())
-		earlycons++;
-
-	return (earlycons) ? 0 : -1;
+	return -1;
  }
 
  static inline void
@@ -608,9 +602,6 @@ setup_arch (char **cmdline_p)
  		ia64_mca_init();
 
  	platform_setup(cmdline_p);
-#ifndef CONFIG_IA64_HP_SIM
-	check_sal_cache_flush();
-#endif
  	paging_init();
 
  	clear_sched_clock_stable();
#18 lore raw

PATCH 18/28 ia64: remove CONFIG_PCI ifdefs

In reply to Christoph Hellwig

Now that hpsim support is gone, CONFIG_PCI is forced on for ia64, and we can remove a few ifdefs for it.

---
 arch/ia64/Makefile              |  2 +-
 arch/ia64/hp/common/sba_iommu.c | 10 +---------
 arch/ia64/include/asm/dma.h     |  6 +-----
 arch/ia64/kernel/sys_ia64.c     | 18 ------------------
 arch/ia64/mm/init.c             |  2 --
 5 files changed, 3 insertions(+), 35 deletions(-)
arch/ia64/Makefile +1 -1
index 8b866fc1f9cb..c06802799659 100644
@@ -57,7 +57,7 @@ core-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/dig/
 core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
 core-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
 
-drivers-$(CONFIG_PCI)		+= arch/ia64/pci/
+drivers-y			+= arch/ia64/pci/
 drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/
 drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
 drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/uv/
arch/ia64/hp/common/sba_iommu.c +1 -9
index 3d24cc43385b..18321ce8bfa0 100644
@@ -251,12 +251,8 @@ static SBA_INLINE void sba_free_range(struct ioc *, dma_addr_t, size_t);
 static u64 prefetch_spill_page;
 #endif
 
-#ifdef CONFIG_PCI
-# define GET_IOC(dev)	((dev_is_pci(dev))						\
+#define GET_IOC(dev)	((dev_is_pci(dev))						\
 			 ? ((struct ioc *) PCI_CONTROLLER(to_pci_dev(dev))->iommu) : NULL)
-#else
-# define GET_IOC(dev)	NULL
-#endif
 
 /*
 ** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
@@ -1741,9 +1737,7 @@ ioc_sac_init(struct ioc *ioc)
 	controller->iommu = ioc;
 	sac->sysdata = controller;
 	sac->dma_mask = 0xFFFFFFFFUL;
-#ifdef CONFIG_PCI
 	sac->dev.bus = &pci_bus_type;
-#endif
 	ioc->sac_only_dev = sac;
 }
 
@@ -2121,13 +2115,11 @@ sba_init(void)
 	}
 #endif
 
-#ifdef CONFIG_PCI
 	{
 		struct pci_bus *b = NULL;
 		while ((b = pci_find_next_bus(b)) != NULL)
 			sba_connect_bus(b);
 	}
-#endif
 
 #ifdef CONFIG_PROC_FS
 	ioc_proc_init();
arch/ia64/include/asm/dma.h +1 -5
index 23604d6a2cb2..59625e9c1f9c 100644
@@ -12,11 +12,7 @@
 
 extern unsigned long MAX_DMA_ADDRESS;
 
-#ifdef CONFIG_PCI
-  extern int isa_dma_bridge_buggy;
-#else
-# define isa_dma_bridge_buggy 	(0)
-#endif
+extern int isa_dma_bridge_buggy;
 
 #define free_dma(x)
 
arch/ia64/kernel/sys_ia64.c +0 -18
index 9ebe1d633abc..e14db25146c2 100644
@@ -166,21 +166,3 @@ ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, u
 		force_successful_syscall_return();
 	return addr;
 }
-
-#ifndef CONFIG_PCI
-
-asmlinkage long
-sys_pciconfig_read (unsigned long bus, unsigned long dfn, unsigned long off, unsigned long len,
-		    void *buf)
-{
-	return -ENOSYS;
-}
-
-asmlinkage long
-sys_pciconfig_write (unsigned long bus, unsigned long dfn, unsigned long off, unsigned long len,
-		     void *buf)
-{
-	return -ENOSYS;
-}
-
-#endif /* CONFIG_PCI */
arch/ia64/mm/init.c +0 -2
index aae75fd7b810..9a4a16439900 100644
@@ -632,14 +632,12 @@ mem_init (void)
 	BUG_ON(PTRS_PER_PMD * sizeof(pmd_t) != PAGE_SIZE);
 	BUG_ON(PTRS_PER_PTE * sizeof(pte_t) != PAGE_SIZE);
 
-#ifdef CONFIG_PCI
 	/*
 	 * This needs to be called _after_ the command line has been parsed but _before_
 	 * any drivers that may need the PCI DMA interface are initialized or bootmem has
 	 * been freed.
 	 */
 	platform_dma_init();
-#endif
 
 #ifdef CONFIG_FLATMEM
 	BUG_ON(!mem_map);
Signature · 1 line
2.20.1
#19 lore raw

Re: [PATCH 18/28] ia64: remove CONFIG_PCI ifdefs

DQoNCk9uIDgvMTMvMTkgMzoyNSBBTSwgQ2hyaXN0b3BoIEhlbGx3aWcgd3JvdGU6DQo+IE5vdyB0 aGF0IGhwc2ltIHN1cHBvcnQgaXMgZ29uZSwgQ09ORklHX1BDSSBpcyBmb3JjZWQgb24gZm9yIGlh NjQsIGFuZA0KPiB3ZSBjYW4gcmVtb3ZlIGEgZmV3IGlmZGVmcyBmb3IgaXQuDQo+IA0KPiBTaWdu ZWQtb2ZmLWJ5OiBDaHJpc3RvcGggSGVsbHdpZyA8aGNoQGxzdC5kZT4NCg0KT2theSB0byByZW1v dmUgaHBzaW0gc3VwcG9ydA0KQWNrZWQtYnk6IFRvbSBWYWRlbiA8dG9tLnZhZGVuQGhwZS5jb20+ DQoNCj4gLS0tDQo+ICAgYXJjaC9pYTY0L01ha2VmaWxlICAgICAgICAgICAgICB8ICAyICstDQo+ ICAgYXJjaC9pYTY0L2hwL2NvbW1vbi9zYmFfaW9tbXUuYyB8IDEwICstLS0tLS0tLS0NCj4gICBh cmNoL2lhNjQvaW5jbHVkZS9hc20vZG1hLmggICAgIHwgIDYgKy0tLS0tDQo+ICAgYXJjaC9pYTY0 L2tlcm5lbC9zeXNfaWE2NC5jICAgICB8IDE4IC0tLS0tLS0tLS0tLS0tLS0tLQ0KPiAgIGFyY2gv aWE2NC9tbS9pbml0LmMgICAgICAgICAgICAgfCAgMiAtLQ0KPiAgIDUgZmlsZXMgY2hhbmdlZCwg MyBpbnNlcnRpb25zKCspLCAzNSBkZWxldGlvbnMoLSkNCj4gDQo+IGRpZmYgLS1naXQgYS9hcmNo L2lhNjQvTWFrZWZpbGUgYi9hcmNoL2lhNjQvTWFrZWZpbGUNCj4gaW5kZXggOGI4NjZmYzFmOWNi Li5jMDY4MDI3OTk2NTkgMTAwNjQ0DQo+IC0tLSBhL2FyY2gvaWE2NC9NYWtlZmlsZQ0KPiArKysg Yi9hcmNoL2lhNjQvTWFrZWZpbGUNCj4gQEAgLTU3LDcgKzU3LDcgQEAgY29yZS0kKENPTkZJR19J QTY0X0hQX1pYMSkJKz0gYXJjaC9pYTY0L2RpZy8NCj4gICBjb3JlLSQoQ09ORklHX0lBNjRfSFBf WlgxX1NXSU9UTEIpICs9IGFyY2gvaWE2NC9kaWcvDQo+ICAgY29yZS0kKENPTkZJR19JQTY0X1NH SV9VVikJKz0gYXJjaC9pYTY0L3V2Lw0KPiAgIA0KPiAtZHJpdmVycy0kKENPTkZJR19QQ0kpCQkr PSBhcmNoL2lhNjQvcGNpLw0KPiArZHJpdmVycy15CQkJKz0gYXJjaC9pYTY0L3BjaS8NCj4gICBk cml2ZXJzLSQoQ09ORklHX0lBNjRfSFBfWlgxKQkrPSBhcmNoL2lhNjQvaHAvY29tbW9uLyBhcmNo L2lhNjQvaHAvengxLw0KPiAgIGRyaXZlcnMtJChDT05GSUdfSUE2NF9IUF9aWDFfU1dJT1RMQikg Kz0gYXJjaC9pYTY0L2hwL2NvbW1vbi8gYXJjaC9pYTY0L2hwL3p4MS8NCj4gICBkcml2ZXJzLSQo Q09ORklHX0lBNjRfR0VORVJJQykJKz0gYXJjaC9pYTY0L2hwL2NvbW1vbi8gYXJjaC9pYTY0L2hw L3p4MS8gYXJjaC9pYTY0L3V2Lw0KPiBkaWZmIC0tZ2l0IGEvYXJjaC9pYTY0L2hwL2NvbW1vbi9z YmFfaW9tbXUuYyBiL2FyY2gvaWE2NC9ocC9jb21tb24vc2JhX2lvbW11LmMNCj4gaW5kZXggM2Qy NGNjNDMzODViLi4xODMyMWNlOGJmYTAgMTAwNjQ0DQo+IC0tLSBhL2FyY2gvaWE2NC9ocC9jb21t b24vc2JhX2lvbW11LmMNCj4gKysrIGIvYXJjaC9pYTY0L2hwL2NvbW1vbi9zYmFfaW9tbXUuYw0K PiBAQCAtMjUxLDEyICsyNTEsOCBAQCBzdGF0aWMgU0JBX0lOTElORSB2b2lkIHNiYV9mcmVlX3Jh bmdlKHN0cnVjdCBpb2MgKiwgZG1hX2FkZHJfdCwgc2l6ZV90KTsNCj4gICBzdGF0aWMgdTY0IHBy ZWZldGNoX3NwaWxsX3BhZ2U7DQo+ICAgI2VuZGlmDQo+ICAgDQo+IC0jaWZkZWYgQ09ORklHX1BD SQ0KPiAtIyBkZWZpbmUgR0VUX0lPQyhkZXYpCSgoZGV2X2lzX3BjaShkZXYpKQkJCQkJCVwNCj4g KyNkZWZpbmUgR0VUX0lPQyhkZXYpCSgoZGV2X2lzX3BjaShkZXYpKQkJCQkJCVwNCj4gICAJCQkg PyAoKHN0cnVjdCBpb2MgKikgUENJX0NPTlRST0xMRVIodG9fcGNpX2RldihkZXYpKS0+aW9tbXUp IDogTlVMTCkNCj4gLSNlbHNlDQo+IC0jIGRlZmluZSBHRVRfSU9DKGRldikJTlVMTA0KPiAtI2Vu ZGlmDQo+ICAgDQo+ICAgLyoNCj4gICAqKiBETUFfQ0hVTktfU0laRSBpcyB1c2VkIGJ5IHRoZSBT Q1NJIG1pZC1sYXllciB0byBicmVhayB1cA0KPiBAQCAtMTc0MSw5ICsxNzM3LDcgQEAgaW9jX3Nh Y19pbml0KHN0cnVjdCBpb2MgKmlvYykNCj4gICAJY29udHJvbGxlci0+aW9tbXUgPSBpb2M7DQo+ ICAgCXNhYy0+c3lzZGF0YSA9IGNvbnRyb2xsZXI7DQo+ICAgCXNhYy0+ZG1hX21hc2sgPSAweEZG RkZGRkZGVUw7DQo+IC0jaWZkZWYgQ09ORklHX1BDSQ0KPiAgIAlzYWMtPmRldi5idXMgPSAmcGNp X2J1c190eXBlOw0KPiAtI2VuZGlmDQo+ICAgCWlvYy0+c2FjX29ubHlfZGV2ID0gc2FjOw0KPiAg IH0NCj4gICANCj4gQEAgLTIxMjEsMTMgKzIxMTUsMTEgQEAgc2JhX2luaXQodm9pZCkNCj4gICAJ fQ0KPiAgICNlbmRpZg0KPiAgIA0KPiAtI2lmZGVmIENPTkZJR19QQ0kNCj4gICAJew0KPiAgIAkJ c3RydWN0IHBjaV9idXMgKmIgPSBOVUxMOw0KPiAgIAkJd2hpbGUgKChiID0gcGNpX2ZpbmRfbmV4 dF9idXMoYikpICE9IE5VTEwpDQo+ICAgCQkJc2JhX2Nvbm5lY3RfYnVzKGIpOw0KPiAgIAl9DQo+ IC0jZW5kaWYNCj4gICANCj4gICAjaWZkZWYgQ09ORklHX1BST0NfRlMNCj4gICAJaW9jX3Byb2Nf aW5pdCgpOw0KPiBkaWZmIC0tZ2l0IGEvYXJjaC9pYTY0L2luY2x1ZGUvYXNtL2RtYS5oIGIvYXJj aC9pYTY0L2luY2x1ZGUvYXNtL2RtYS5oDQo+IGluZGV4IDIzNjA0ZDZhMmNiMi4uNTk2MjVlOWMx ZjljIDEwMDY0NA0KPiAtLS0gYS9hcmNoL2lhNjQvaW5jbHVkZS9hc20vZG1hLmgNCj4gKysrIGIv YXJjaC9pYTY0L2luY2x1ZGUvYXNtL2RtYS5oDQo+IEBAIC0xMiwxMSArMTIsNyBAQA0KPiAgIA0K PiAgIGV4dGVybiB1bnNpZ25lZCBsb25nIE1BWF9ETUFfQUREUkVTUzsNCj4gICANCj4gLSNpZmRl ZiBDT05GSUdfUENJDQo+IC0gIGV4dGVybiBpbnQgaXNhX2RtYV9icmlkZ2VfYnVnZ3k7DQo+IC0j ZWxzZQ0KPiAtIyBkZWZpbmUgaXNhX2RtYV9icmlkZ2VfYnVnZ3kgCSgwKQ0KPiAtI2VuZGlmDQo+ ICtleHRlcm4gaW50IGlzYV9kbWFfYnJpZGdlX2J1Z2d5Ow0KPiAgIA0KPiAgICNkZWZpbmUgZnJl ZV9kbWEoeCkNCj4gICANCj4gZGlmZiAtLWdpdCBhL2FyY2gvaWE2NC9rZXJuZWwvc3lzX2lhNjQu YyBiL2FyY2gvaWE2NC9rZXJuZWwvc3lzX2lhNjQuYw0KPiBpbmRleCA5ZWJlMWQ2MzNhYmMuLmUx NGRiMjUxNDZjMiAxMDA2NDQNCj4gLS0tIGEvYXJjaC9pYTY0L2tlcm5lbC9zeXNfaWE2NC5jDQo+ ICsrKyBiL2FyY2gvaWE2NC9rZXJuZWwvc3lzX2lhNjQuYw0KPiBAQCAtMTY2LDIxICsxNjYsMyBA QCBpYTY0X21yZW1hcCAodW5zaWduZWQgbG9uZyBhZGRyLCB1bnNpZ25lZCBsb25nIG9sZF9sZW4s IHVuc2lnbmVkIGxvbmcgbmV3X2xlbiwgdQ0KPiAgIAkJZm9yY2Vfc3VjY2Vzc2Z1bF9zeXNjYWxs X3JldHVybigpOw0KPiAgIAlyZXR1cm4gYWRkcjsNCj4gICB9DQo+IC0NCj4gLSNpZm5kZWYgQ09O RklHX1BDSQ0KPiAtDQo+IC1hc21saW5rYWdlIGxvbmcNCj4gLXN5c19wY2ljb25maWdfcmVhZCAo dW5zaWduZWQgbG9uZyBidXMsIHVuc2lnbmVkIGxvbmcgZGZuLCB1bnNpZ25lZCBsb25nIG9mZiwg dW5zaWduZWQgbG9uZyBsZW4sDQo+IC0JCSAgICB2b2lkICpidWYpDQo+IC17DQo+IC0JcmV0dXJu IC1FTk9TWVM7DQo+IC19DQo+IC0NCj4gLWFzbWxpbmthZ2UgbG9uZw0KPiAtc3lzX3BjaWNvbmZp Z193cml0ZSAodW5zaWduZWQgbG9uZyBidXMsIHVuc2lnbmVkIGxvbmcgZGZuLCB1bnNpZ25lZCBs b25nIG9mZiwgdW5zaWduZWQgbG9uZyBsZW4sDQo+IC0JCSAgICAgdm9pZCAqYnVmKQ0KPiAtew0K PiAtCXJldHVybiAtRU5PU1lTOw0KPiAtfQ0KPiAtDQo+IC0jZW5kaWYgLyogQ09ORklHX1BDSSAq Lw0KPiBkaWZmIC0tZ2l0IGEvYXJjaC9pYTY0L21tL2luaXQuYyBiL2FyY2gvaWE2NC9tbS9pbml0 LmMNCj4gaW5kZXggYWFlNzVmZDdiODEwLi45YTRhMTY0Mzk5MDAgMTAwNjQ0DQo+IC0tLSBhL2Fy Y2gvaWE2NC9tbS9pbml0LmMNCj4gKysrIGIvYXJjaC9pYTY0L21tL2luaXQuYw0KPiBAQCAtNjMy LDE0ICs2MzIsMTIgQEAgbWVtX2luaXQgKHZvaWQpDQo+ICAgCUJVR19PTihQVFJTX1BFUl9QTUQg KiBzaXplb2YocG1kX3QpICE9IFBBR0VfU0laRSk7DQo+ICAgCUJVR19PTihQVFJTX1BFUl9QVEUg KiBzaXplb2YocHRlX3QpICE9IFBBR0VfU0laRSk7DQo+ICAgDQo+IC0jaWZkZWYgQ09ORklHX1BD SQ0KPiAgIAkvKg0KPiAgIAkgKiBUaGlzIG5lZWRzIHRvIGJlIGNhbGxlZCBfYWZ0ZXJfIHRoZSBj b21tYW5kIGxpbmUgaGFzIGJlZW4gcGFyc2VkIGJ1dCBfYmVmb3JlXw0KPiAgIAkgKiBhbnkgZHJp dmVycyB0aGF0IG1heSBuZWVkIHRoZSBQQ0kgRE1BIGludGVyZmFjZSBhcmUgaW5pdGlhbGl6ZWQg b3IgYm9vdG1lbSBoYXMNCj4gICAJICogYmVlbiBmcmVlZC4NCj4gICAJICovDQo+ICAgCXBsYXRm b3JtX2RtYV9pbml0KCk7DQo+IC0jZW5kaWYNCj4gICANCj4gICAjaWZkZWYgQ09ORklHX0ZMQVRN RU0NCj4gICAJQlVHX09OKCFtZW1fbWFwKTsNCj4gDQo

#20 lore raw

PATCH 19/28 ia64: remove CONFIG_ACPI ifdefs

In reply to Christoph Hellwig

Now that hpsim support is gone, CONFIG_ACPI is forced on for ia64, and we can remove a few ifdefs for it.

---
 arch/ia64/include/asm/acpi.h |  4 ++--
 arch/ia64/kernel/Makefile    |  4 ++--
 arch/ia64/kernel/iosapic.c   |  2 --
 arch/ia64/kernel/irq_ia64.c  |  2 --
 arch/ia64/kernel/mca.c       | 18 ------------------
 arch/ia64/kernel/setup.c     | 10 ++++------
 arch/ia64/kernel/topology.c  |  4 ----
 7 files changed, 8 insertions(+), 36 deletions(-)
arch/ia64/include/asm/acpi.h +2 -2
index 0afb3bc4b4a1..01c1c269aa13 100644
@@ -17,7 +17,7 @@
 #include <linux/numa.h>
 #include <asm/numa.h>
 
-#ifdef	CONFIG_ACPI
+
 extern int acpi_lapic;
 #define acpi_disabled 0	/* ACPI always enabled on IA64 */
 #define acpi_noirq 0	/* ACPI always enabled on IA64 */
@@ -28,7 +28,7 @@ static inline bool acpi_has_cpu_in_madt(void)
 {
 	return !!acpi_lapic;
 }
-#endif
+
 #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
 static inline void disable_acpi(void) { }
 
arch/ia64/kernel/Makefile +2 -2
index 3ada440ff893..dbde36702cf2 100644
@@ -12,9 +12,9 @@ extra-y	:= head.o vmlinux.lds
 obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
 	 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
-	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o iosapic.o
+	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o iosapic.o acpi.o \
+	 acpi-ext.o
 
-obj-$(CONFIG_ACPI)		+= acpi.o acpi-ext.o
 obj-$(CONFIG_IA64_BRL_EMU)	+= brl_emu.o
 
 obj-$(CONFIG_IA64_PALINFO)	+= palinfo.o
arch/ia64/kernel/iosapic.c +0 -2
index 9e49fd006859..2d25958a7ed7 100644
@@ -643,10 +643,8 @@ get_target_cpu (unsigned int gsi, int irq)
 	if (!cpu_online(smp_processor_id()))
 		return cpu_physical_id(smp_processor_id());
 
-#ifdef CONFIG_ACPI
 	if (cpe_vector > 0 && irq_to_vector(irq) = IA64_CPEP_VECTOR)
 		return get_cpei_target_cpu();
-#endif
 
 #ifdef CONFIG_NUMA
 	{
arch/ia64/kernel/irq_ia64.c +0 -2
index e3874734b149..b989731bbeac 100644
@@ -633,9 +633,7 @@ ia64_native_register_ipi(void)
 void __init
 init_IRQ (void)
 {
-#ifdef CONFIG_ACPI
 	acpi_boot_init();
-#endif
 	ia64_register_ipi();
 	register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
 #ifdef CONFIG_SMP
arch/ia64/kernel/mca.c +0 -18
index f72b05fe918b..a7f05883935b 100644
@@ -149,9 +149,7 @@ static ia64_mc_info_t		ia64_mc_info;
 #define CPE_HISTORY_LENGTH    5
 #define CMC_HISTORY_LENGTH    5
 
-#ifdef CONFIG_ACPI
 static struct timer_list cpe_poll_timer;
-#endif
 static struct timer_list cmc_poll_timer;
 /*
  * This variable tells whether we are currently in polling mode.
@@ -532,8 +530,6 @@ int mca_recover_range(unsigned long addr)
 }
 EXPORT_SYMBOL_GPL(mca_recover_range);
 
-#ifdef CONFIG_ACPI
-
 int cpe_vector = -1;
 int ia64_cpe_irq = -1;
 
@@ -595,9 +591,6 @@ ia64_mca_cpe_int_handler (int cpe_irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-#endif /* CONFIG_ACPI */
-
-#ifdef CONFIG_ACPI
 /*
  * ia64_mca_register_cpev
  *
@@ -625,7 +618,6 @@ ia64_mca_register_cpev (int cpev)
 	IA64_MCA_DEBUG("%s: corrected platform error "
 		       "vector %#x registered\n", __func__, cpev);
 }
-#endif /* CONFIG_ACPI */
 
 /*
  * ia64_mca_cmc_vector_setup
@@ -1540,8 +1532,6 @@ ia64_mca_cmc_poll (struct timer_list *unused)
  * Outputs
  * 	handled
  */
-#ifdef CONFIG_ACPI
-
 static irqreturn_t
 ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
 {
@@ -1604,8 +1594,6 @@ ia64_mca_cpe_poll (struct timer_list *unused)
 							IA64_IPI_DM_INT, 0);
 }
 
-#endif /* CONFIG_ACPI */
-
 static int
 default_monarch_init_process(struct notifier_block *self, unsigned long val, void *data)
 {
@@ -1799,7 +1787,6 @@ static struct irqaction mca_wkup_irqaction = {
 	.name =		"mca_wkup"
 };
 
-#ifdef CONFIG_ACPI
 static struct irqaction mca_cpe_irqaction = {
 	.handler =	ia64_mca_cpe_int_handler,
 	.name =		"cpe_hndlr"
@@ -1809,7 +1796,6 @@ static struct irqaction mca_cpep_irqaction = {
 	.handler =	ia64_mca_cpe_int_caller,
 	.name =		"cpe_poll"
 };
-#endif /* CONFIG_ACPI */
 
 /* Minimal format of the MCA/INIT stacks.  The pseudo processes that run on
  * these stacks can never sleep, they cannot return from the kernel to user
@@ -2081,10 +2067,8 @@ void __init ia64_mca_irq_init(void)
 	/* Setup the MCA wakeup interrupt vector */
 	register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction);
 
-#ifdef CONFIG_ACPI
 	/* Setup the CPEI/P handler */
 	register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);
-#endif
 }
 
 /*
@@ -2112,7 +2096,6 @@ ia64_mca_late_init(void)
 			  ia64_mca_cpu_online, NULL);
 	IA64_MCA_DEBUG("%s: CMCI/P setup and enabled.\n", __func__);
 
-#ifdef CONFIG_ACPI
 	/* Setup the CPEI/P vector and handler */
 	cpe_vector = acpi_request_vector(ACPI_INTERRUPT_CPEI);
 	timer_setup(&cpe_poll_timer, ia64_mca_cpe_poll, 0);
@@ -2143,7 +2126,6 @@ ia64_mca_late_init(void)
 			IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __func__);
 		}
 	}
-#endif
 
 	return 0;
 }
arch/ia64/kernel/setup.c +4 -6
index 42ef03ce2fd4..8d47836d932c 100644
@@ -537,21 +537,19 @@ setup_arch (char **cmdline_p)
 	if (early_console_setup(*cmdline_p) = 0)
 		mark_bsp_online();
 
-#ifdef CONFIG_ACPI
 	/* Initialize the ACPI boot-time table parser */
 	acpi_table_init();
 	early_acpi_boot_init();
-# ifdef CONFIG_ACPI_NUMA
+#ifdef CONFIG_ACPI_NUMA
 	acpi_numa_init();
 	acpi_numa_fixup();
-#  ifdef CONFIG_ACPI_HOTPLUG_CPU
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
 	prefill_possible_map();
-#  endif
+#endif
 	per_cpu_scan_finalize((cpumask_weight(&early_cpu_possible_map) = 0 ?
 		32 : cpumask_weight(&early_cpu_possible_map)),
 		additional_cpus > 0 ? additional_cpus : 0);
-# endif
-#endif /* CONFIG_APCI_BOOT */
+#endif /* CONFIG_ACPI_NUMA */
 
 #ifdef CONFIG_SMP
 	smp_build_cpu_map();
arch/ia64/kernel/topology.c +0 -4
index e311ee13e61d..09fc385c2acd 100644
@@ -42,7 +42,6 @@ EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
 #ifdef CONFIG_HOTPLUG_CPU
 int __ref arch_register_cpu(int num)
 {
-#ifdef CONFIG_ACPI
 	/*
 	 * If CPEI can be re-targeted or if this is not
 	 * CPEI target, then it is hotpluggable
@@ -50,7 +49,6 @@ int __ref arch_register_cpu(int num)
 	if (can_cpei_retarget() || !is_cpu_cpei_target(num))
 		sysfs_cpus[num].cpu.hotpluggable = 1;
 	map_cpu_to_node(num, node_cpuid[num].nid);
-#endif
 	return register_cpu(&sysfs_cpus[num].cpu, num);
 }
 EXPORT_SYMBOL(arch_register_cpu);
@@ -58,9 +56,7 @@ EXPORT_SYMBOL(arch_register_cpu);
 void __ref arch_unregister_cpu(int num)
 {
 	unregister_cpu(&sysfs_cpus[num].cpu);
-#ifdef CONFIG_ACPI
 	unmap_cpu_from_node(num, cpu_to_node(num));
-#endif
 }
 EXPORT_SYMBOL(arch_unregister_cpu);
 #else
Signature · 1 line
2.20.1
#21 lore raw

Re: [PATCH 19/28] ia64: remove CONFIG_ACPI ifdefs

DQoNCk9uIDgvMTMvMTkgMzoyNSBBTSwgQ2hyaXN0b3BoIEhlbGx3aWcgd3JvdGU6DQo+IE5vdyB0 aGF0IGhwc2ltIHN1cHBvcnQgaXMgZ29uZSwgQ09ORklHX0FDUEkgaXMgZm9yY2VkIG9uIGZvciBp YTY0LCBhbmQNCj4gd2UgY2FuIHJlbW92ZSBhIGZldyBpZmRlZnMgZm9yIGl0Lg0KPiANCj4gU2ln bmVkLW9mZi1ieTogQ2hyaXN0b3BoIEhlbGx3aWcgPGhjaEBsc3QuZGU+DQoNCk9rYXkgdG8gcmVt b3ZlIGhwc2ltIHN1cHBvcnQNCkFja2VkLWJ5OiBUb20gVmFkZW4gPHRvbS52YWRlbkBocGUuY29t Pg0KDQo+IC0tLQ0KPiAgIGFyY2gvaWE2NC9pbmNsdWRlL2FzbS9hY3BpLmggfCAgNCArKy0tDQo+ ICAgYXJjaC9pYTY0L2tlcm5lbC9NYWtlZmlsZSAgICB8ICA0ICsrLS0NCj4gICBhcmNoL2lhNjQv a2VybmVsL2lvc2FwaWMuYyAgIHwgIDIgLS0NCj4gICBhcmNoL2lhNjQva2VybmVsL2lycV9pYTY0 LmMgIHwgIDIgLS0NCj4gICBhcmNoL2lhNjQva2VybmVsL21jYS5jICAgICAgIHwgMTggLS0tLS0t LS0tLS0tLS0tLS0tDQo+ICAgYXJjaC9pYTY0L2tlcm5lbC9zZXR1cC5jICAgICB8IDEwICsrKyst LS0tLS0NCj4gICBhcmNoL2lhNjQva2VybmVsL3RvcG9sb2d5LmMgIHwgIDQgLS0tLQ0KPiAgIDcg ZmlsZXMgY2hhbmdlZCwgOCBpbnNlcnRpb25zKCspLCAzNiBkZWxldGlvbnMoLSkNCj4gDQo+IGRp ZmYgLS1naXQgYS9hcmNoL2lhNjQvaW5jbHVkZS9hc20vYWNwaS5oIGIvYXJjaC9pYTY0L2luY2x1 ZGUvYXNtL2FjcGkuaA0KPiBpbmRleCAwYWZiM2JjNGI0YTEuLjAxYzFjMjY5YWExMyAxMDA2NDQN Cj4gLS0tIGEvYXJjaC9pYTY0L2luY2x1ZGUvYXNtL2FjcGkuaA0KPiArKysgYi9hcmNoL2lhNjQv aW5jbHVkZS9hc20vYWNwaS5oDQo+IEBAIC0xNyw3ICsxNyw3IEBADQo+ICAgI2luY2x1ZGUgPGxp bnV4L251bWEuaD4NCj4gICAjaW5jbHVkZSA8YXNtL251bWEuaD4NCj4gICANCj4gLSNpZmRlZglD T05GSUdfQUNQSQ0KPiArDQo+ICAgZXh0ZXJuIGludCBhY3BpX2xhcGljOw0KPiAgICNkZWZpbmUg YWNwaV9kaXNhYmxlZCAwCS8qIEFDUEkgYWx3YXlzIGVuYWJsZWQgb24gSUE2NCAqLw0KPiAgICNk ZWZpbmUgYWNwaV9ub2lycSAwCS8qIEFDUEkgYWx3YXlzIGVuYWJsZWQgb24gSUE2NCAqLw0KPiBA QCAtMjgsNyArMjgsNyBAQCBzdGF0aWMgaW5saW5lIGJvb2wgYWNwaV9oYXNfY3B1X2luX21hZHQo dm9pZCkNCj4gICB7DQo+ICAgCXJldHVybiAhIWFjcGlfbGFwaWM7DQo+ICAgfQ0KPiAtI2VuZGlm DQo+ICsNCj4gICAjZGVmaW5lIGFjcGlfcHJvY2Vzc29yX2NzdGF0ZV9jaGVjayh4KSAoeCkgLyog bm8gaWRsZSBsaW1pdHMgb24gSUE2NCA6KSAqLw0KPiAgIHN0YXRpYyBpbmxpbmUgdm9pZCBkaXNh YmxlX2FjcGkodm9pZCkgeyB9DQo+ICAgDQo+IGRpZmYgLS1naXQgYS9hcmNoL2lhNjQva2VybmVs L01ha2VmaWxlIGIvYXJjaC9pYTY0L2tlcm5lbC9NYWtlZmlsZQ0KPiBpbmRleCAzYWRhNDQwZmY4 OTMuLmRiZGUzNjcwMmNmMiAxMDA2NDQNCj4gLS0tIGEvYXJjaC9pYTY0L2tlcm5lbC9NYWtlZmls ZQ0KPiArKysgYi9hcmNoL2lhNjQva2VybmVsL01ha2VmaWxlDQo+IEBAIC0xMiw5ICsxMiw5IEBA IGV4dHJhLXkJOj0gaGVhZC5vIHZtbGludXgubGRzDQo+ICAgb2JqLXkgOj0gZW50cnkubyBlZmku byBlZmlfc3R1Yi5vIGdhdGUtZGF0YS5vIGZzeXMubyBpYTY0X2tzeW1zLm8gaXJxLm8gaXJxX2lh NjQubwlcDQo+ICAgCSBpcnFfbHNhcGljLm8gaXZ0Lm8gbWFjaHZlYy5vIHBhbC5vIHBhdGNoLm8g cHJvY2Vzcy5vIHBlcmZtb24ubyBwdHJhY2UubyBzYWwubwkJXA0KPiAgIAkgc2FsaW5mby5vIHNl dHVwLm8gc2lnbmFsLm8gc3lzX2lhNjQubyB0aW1lLm8gdHJhcHMubyB1bmFsaWduZWQubyBcDQo+ IC0JIHVud2luZC5vIG1jYS5vIG1jYV9hc20ubyB0b3BvbG9neS5vIGRtYS1tYXBwaW5nLm8gaW9z YXBpYy5vDQo+ICsJIHVud2luZC5vIG1jYS5vIG1jYV9hc20ubyB0b3BvbG9neS5vIGRtYS1tYXBw aW5nLm8gaW9zYXBpYy5vIGFjcGkubyBcDQo+ICsJIGFjcGktZXh0Lm8NCj4gICANCj4gLW9iai0k KENPTkZJR19BQ1BJKQkJKz0gYWNwaS5vIGFjcGktZXh0Lm8NCj4gICBvYmotJChDT05GSUdfSUE2 NF9CUkxfRU1VKQkrPSBicmxfZW11Lm8NCj4gICANCj4gICBvYmotJChDT05GSUdfSUE2NF9QQUxJ TkZPKQkrPSBwYWxpbmZvLm8NCj4gZGlmZiAtLWdpdCBhL2FyY2gvaWE2NC9rZXJuZWwvaW9zYXBp Yy5jIGIvYXJjaC9pYTY0L2tlcm5lbC9pb3NhcGljLmMNCj4gaW5kZXggOWU0OWZkMDA2ODU5Li4y ZDI1OTU4YTdlZDcgMTAwNjQ0DQo+IC0tLSBhL2FyY2gvaWE2NC9rZXJuZWwvaW9zYXBpYy5jDQo+ ICsrKyBiL2FyY2gvaWE2NC9rZXJuZWwvaW9zYXBpYy5jDQo+IEBAIC02NDMsMTAgKzY0Myw4IEBA IGdldF90YXJnZXRfY3B1ICh1bnNpZ25lZCBpbnQgZ3NpLCBpbnQgaXJxKQ0KPiAgIAlpZiAoIWNw dV9vbmxpbmUoc21wX3Byb2Nlc3Nvcl9pZCgpKSkNCj4gICAJCXJldHVybiBjcHVfcGh5c2ljYWxf aWQoc21wX3Byb2Nlc3Nvcl9pZCgpKTsNCj4gICANCj4gLSNpZmRlZiBDT05GSUdfQUNQSQ0KPiAg IAlpZiAoY3BlX3ZlY3RvciA+IDAgJiYgaXJxX3RvX3ZlY3RvcihpcnEpID09IElBNjRfQ1BFUF9W RUNUT1IpDQo+ICAgCQlyZXR1cm4gZ2V0X2NwZWlfdGFyZ2V0X2NwdSgpOw0KPiAtI2VuZGlmDQo+ ICAgDQo+ICAgI2lmZGVmIENPTkZJR19OVU1BDQo+ICAgCXsNCj4gZGlmZiAtLWdpdCBhL2FyY2gv aWE2NC9rZXJuZWwvaXJxX2lhNjQuYyBiL2FyY2gvaWE2NC9rZXJuZWwvaXJxX2lhNjQuYw0KPiBp bmRleCBlMzg3NDczNGIxNDkuLmI5ODk3MzFiYmVhYyAxMDA2NDQNCj4gLS0tIGEvYXJjaC9pYTY0 L2tlcm5lbC9pcnFfaWE2NC5jDQo+ICsrKyBiL2FyY2gvaWE2NC9rZXJuZWwvaXJxX2lhNjQuYw0K PiBAQCAtNjMzLDkgKzYzMyw3IEBAIGlhNjRfbmF0aXZlX3JlZ2lzdGVyX2lwaSh2b2lkKQ0KPiAg IHZvaWQgX19pbml0DQo+ICAgaW5pdF9JUlEgKHZvaWQpDQo+ICAgew0KPiAtI2lmZGVmIENPTkZJ R19BQ1BJDQo+ICAgCWFjcGlfYm9vdF9pbml0KCk7DQo+IC0jZW5kaWYNCj4gICAJaWE2NF9yZWdp c3Rlcl9pcGkoKTsNCj4gICAJcmVnaXN0ZXJfcGVyY3B1X2lycShJQTY0X1NQVVJJT1VTX0lOVF9W RUNUT1IsIE5VTEwpOw0KPiAgICNpZmRlZiBDT05GSUdfU01QDQo+IGRpZmYgLS1naXQgYS9hcmNo L2lhNjQva2VybmVsL21jYS5jIGIvYXJjaC9pYTY0L2tlcm5lbC9tY2EuYw0KPiBpbmRleCBmNzJi MDVmZTkxOGIuLmE3ZjA1ODgzOTM1YiAxMDA2NDQNCj4gLS0tIGEvYXJjaC9pYTY0L2tlcm5lbC9t Y2EuYw0KPiArKysgYi9hcmNoL2lhNjQva2VybmVsL21jYS5jDQo+IEBAIC0xNDksOSArMTQ5LDcg QEAgc3RhdGljIGlhNjRfbWNfaW5mb190CQlpYTY0X21jX2luZm87DQo+ICAgI2RlZmluZSBDUEVf SElTVE9SWV9MRU5HVEggICAgNQ0KPiAgICNkZWZpbmUgQ01DX0hJU1RPUllfTEVOR1RIICAgIDUN Cj4gICANCj4gLSNpZmRlZiBDT05GSUdfQUNQSQ0KPiAgIHN0YXRpYyBzdHJ1Y3QgdGltZXJfbGlz dCBjcGVfcG9sbF90aW1lcjsNCj4gLSNlbmRpZg0KPiAgIHN0YXRpYyBzdHJ1Y3QgdGltZXJfbGlz dCBjbWNfcG9sbF90aW1lcjsNCj4gICAvKg0KPiAgICAqIFRoaXMgdmFyaWFibGUgdGVsbHMgd2hl dGhlciB3ZSBhcmUgY3VycmVudGx5IGluIHBvbGxpbmcgbW9kZS4NCj4gQEAgLTUzMiw4ICs1MzAs NiBAQCBpbnQgbWNhX3JlY292ZXJfcmFuZ2UodW5zaWduZWQgbG9uZyBhZGRyKQ0KPiAgIH0NCj4g ICBFWFBPUlRfU1lNQk9MX0dQTChtY2FfcmVjb3Zlcl9yYW5nZSk7DQo+ICAgDQo+IC0jaWZkZWYg Q09ORklHX0FDUEkNCj4gLQ0KPiAgIGludCBjcGVfdmVjdG9yID0gLTE7DQo+ICAgaW50IGlhNjRf Y3BlX2lycSA9IC0xOw0KPiAgIA0KPiBAQCAtNTk1LDkgKzU5MSw2IEBAIGlhNjRfbWNhX2NwZV9p bnRfaGFuZGxlciAoaW50IGNwZV9pcnEsIHZvaWQgKmFyZykNCj4gICAJcmV0dXJuIElSUV9IQU5E TEVEOw0KPiAgIH0NCj4gICANCj4gLSNlbmRpZiAvKiBDT05GSUdfQUNQSSAqLw0KPiAtDQo+IC0j aWZkZWYgQ09ORklHX0FDUEkNCj4gICAvKg0KPiAgICAqIGlhNjRfbWNhX3JlZ2lzdGVyX2NwZXYN Cj4gICAgKg0KPiBAQCAtNjI1LDcgKzYxOCw2IEBAIGlhNjRfbWNhX3JlZ2lzdGVyX2NwZXYgKGlu dCBjcGV2KQ0KPiAgIAlJQTY0X01DQV9ERUJVRygiJXM6IGNvcnJlY3RlZCBwbGF0Zm9ybSBlcnJv ciAiDQo+ICAgCQkgICAgICAgInZlY3RvciAlI3ggcmVnaXN0ZXJlZFxuIiwgX19mdW5jX18sIGNw ZXYpOw0KPiAgIH0NCj4gLSNlbmRpZiAvKiBDT05GSUdfQUNQSSAqLw0KPiAgIA0KPiAgIC8qDQo+ ICAgICogaWE2NF9tY2FfY21jX3ZlY3Rvcl9zZXR1cA0KPiBAQCAtMTU0MCw4ICsxNTMyLDYgQEAg aWE2NF9tY2FfY21jX3BvbGwgKHN0cnVjdCB0aW1lcl9saXN0ICp1bnVzZWQpDQo+ICAgICogT3V0 cHV0cw0KPiAgICAqIAloYW5kbGVkDQo+ICAgICovDQo+IC0jaWZkZWYgQ09ORklHX0FDUEkNCj4g LQ0KPiAgIHN0YXRpYyBpcnFyZXR1cm5fdA0KPiAgIGlhNjRfbWNhX2NwZV9pbnRfY2FsbGVyKGlu dCBjcGVfaXJxLCB2b2lkICphcmcpDQo+ICAgew0KPiBAQCAtMTYwNCw4ICsxNTk0LDYgQEAgaWE2 NF9tY2FfY3BlX3BvbGwgKHN0cnVjdCB0aW1lcl9saXN0ICp1bnVzZWQpDQo+ICAgCQkJCQkJCUlB NjRfSVBJX0RNX0lOVCwgMCk7DQo+ICAgfQ0KPiAgIA0KPiAtI2VuZGlmIC8qIENPTkZJR19BQ1BJ ICovDQo+IC0NCj4gICBzdGF0aWMgaW50DQo+ICAgZGVmYXVsdF9tb25hcmNoX2luaXRfcHJvY2Vz cyhzdHJ1Y3Qgbm90aWZpZXJfYmxvY2sgKnNlbGYsIHVuc2lnbmVkIGxvbmcgdmFsLCB2b2lkICpk YXRhKQ0KPiAgIHsNCj4gQEAgLTE3OTksNyArMTc4Nyw2IEBAIHN0YXRpYyBzdHJ1Y3QgaXJxYWN0 aW9uIG1jYV93a3VwX2lycWFjdGlvbiA9IHsNCj4gICAJLm5hbWUgPQkJIm1jYV93a3VwIg0KPiAg IH07DQo+ICAgDQo+IC0jaWZkZWYgQ09ORklHX0FDUEkNCj4gICBzdGF0aWMgc3RydWN0IGlycWFj dGlvbiBtY2FfY3BlX2lycWFjdGlvbiA9IHsNCj4gICAJLmhhbmRsZXIgPQlpYTY0X21jYV9jcGVf aW50X2hhbmRsZXIsDQo+ICAgCS5uYW1lID0JCSJjcGVfaG5kbHIiDQo+IEBAIC0xODA5LDcgKzE3 OTYsNiBAQCBzdGF0aWMgc3RydWN0IGlycWFjdGlvbiBtY2FfY3BlcF9pcnFhY3Rpb24gPSB7DQo+ ICAgCS5oYW5kbGVyID0JaWE2NF9tY2FfY3BlX2ludF9jYWxsZXIsDQo+ICAgCS5uYW1lID0JCSJj cGVfcG9sbCINCj4gICB9Ow0KPiAtI2VuZGlmIC8qIENPTkZJR19BQ1BJICovDQo+ICAgDQo+ICAg LyogTWluaW1hbCBmb3JtYXQgb2YgdGhlIE1DQS9JTklUIHN0YWNrcy4gIFRoZSBwc2V1ZG8gcHJv Y2Vzc2VzIHRoYXQgcnVuIG9uDQo+ICAgICogdGhlc2Ugc3RhY2tzIGNhbiBuZXZlciBzbGVlcCwg dGhleSBjYW5ub3QgcmV0dXJuIGZyb20gdGhlIGtlcm5lbCB0byB1c2VyDQo+IEBAIC0yMDgxLDEw ICsyMDY3LDggQEAgdm9pZCBfX2luaXQgaWE2NF9tY2FfaXJxX2luaXQodm9pZCkNCj4gICAJLyog U2V0dXAgdGhlIE1DQSB3YWtldXAgaW50ZXJydXB0IHZlY3RvciAqLw0KPiAgIAlyZWdpc3Rlcl9w ZXJjcHVfaXJxKElBNjRfTUNBX1dBS0VVUF9WRUNUT1IsICZtY2Ffd2t1cF9pcnFhY3Rpb24pOw0K PiAgIA0KPiAtI2lmZGVmIENPTkZJR19BQ1BJDQo+ICAgCS8qIFNldHVwIHRoZSBDUEVJL1AgaGFu ZGxlciAqLw0KPiAgIAlyZWdpc3Rlcl9wZXJjcHVfaXJxKElBNjRfQ1BFUF9WRUNUT1IsICZtY2Ff Y3BlcF9pcnFhY3Rpb24pOw0KPiAtI2VuZGlmDQo+ICAgfQ0KPiAgIA0KPiAgIC8qDQo+IEBAIC0y MTEyLDcgKzIwOTYsNiBAQCBpYTY0X21jYV9sYXRlX2luaXQodm9pZCkNCj4gICAJCQkgIGlhNjRf bWNhX2NwdV9vbmxpbmUsIE5VTEwpOw0KPiAgIAlJQTY0X01DQV9ERUJVRygiJXM6IENNQ0kvUCBz ZXR1cCBhbmQgZW5hYmxlZC5cbiIsIF9fZnVuY19fKTsNCj4gICANCj4gLSNpZmRlZiBDT05GSUdf QUNQSQ0KPiAgIAkvKiBTZXR1cCB0aGUgQ1BFSS9QIHZlY3RvciBhbmQgaGFuZGxlciAqLw0KPiAg IAljcGVfdmVjdG9yID0gYWNwaV9yZXF1ZXN0X3ZlY3RvcihBQ1BJX0lOVEVSUlVQVF9DUEVJKTsN Cj4gICAJdGltZXJfc2V0dXAoJmNwZV9wb2xsX3RpbWVyLCBpYTY0X21jYV9jcGVfcG9sbCwgMCk7 DQo+IEBAIC0yMTQzLDcgKzIxMjYsNiBAQCBpYTY0X21jYV9sYXRlX2luaXQodm9pZCkNCj4gICAJ CQlJQTY0X01DQV9ERUJVRygiJXM6IENQRVAgc2V0dXAgYW5kIGVuYWJsZWQuXG4iLCBfX2Z1bmNf Xyk7DQo+ICAgCQl9DQo+ICAgCX0NCj4gLSNlbmRpZg0KPiAgIA0KPiAgIAlyZXR1cm4gMDsNCj4g ICB9DQo+IGRpZmYgLS1naXQgYS9hcmNoL2lhNjQva2VybmVsL3NldHVwLmMgYi9hcmNoL2lhNjQv a2VybmVsL3NldHVwLmMNCj4gaW5kZXggNDJlZjAzY2UyZmQ0Li44ZDQ3ODM2ZDkzMmMgMTAwNjQ0 DQo+IC0tLSBhL2FyY2gvaWE2NC9rZXJuZWwvc2V0dXAuYw0KPiArKysgYi9hcmNoL2lhNjQva2Vy bmVsL3NldHVwLmMNCj4gQEAgLTUzNywyMSArNTM3LDE5IEBAIHNldHVwX2FyY2ggKGNoYXIgKipj bWRsaW5lX3ApDQo+ICAgCWlmIChlYXJseV9jb25zb2xlX3NldHVwKCpjbWRsaW5lX3ApID09IDAp DQo+ICAgCQltYXJrX2JzcF9vbmxpbmUoKTsNCj4gICANCj4gLSNpZmRlZiBDT05GSUdfQUNQSQ0K PiAgIAkvKiBJbml0aWFsaXplIHRoZSBBQ1BJIGJvb3QtdGltZSB0YWJsZSBwYXJzZXIgKi8NCj4g ICAJYWNwaV90YWJsZV9pbml0KCk7DQo+ICAgCWVhcmx5X2FjcGlfYm9vdF9pbml0KCk7DQo+IC0j IGlmZGVmIENPTkZJR19BQ1BJX05VTUENCj4gKyNpZmRlZiBDT05GSUdfQUNQSV9OVU1BDQo+ICAg CWFjcGlfbnVtYV9pbml0KCk7DQo+ICAgCWFjcGlfbnVtYV9maXh1cCgpOw0KPiAtIyAgaWZkZWYg Q09ORklHX0FDUElfSE9UUExVR19DUFUNCj4gKyNpZmRlZiBDT05GSUdfQUNQSV9IT1RQTFVHX0NQ VQ0KPiAgIAlwcmVmaWxsX3Bvc3NpYmxlX21hcCgpOw0KPiAtIyAgZW5kaWYNCj4gKyNlbmRpZg0K PiAgIAlwZXJfY3B1X3NjYW5fZmluYWxpemUoKGNwdW1hc2tfd2VpZ2h0KCZlYXJseV9jcHVfcG9z c2libGVfbWFwKSA9PSAwID8NCj4gICAJCTMyIDogY3B1bWFza193ZWlnaHQoJmVhcmx5X2NwdV9w b3NzaWJsZV9tYXApKSwNCj4gICAJCWFkZGl0aW9uYWxfY3B1cyA+IDAgPyBhZGRpdGlvbmFsX2Nw dXMgOiAwKTsNCj4gLSMgZW5kaWYNCj4gLSNlbmRpZiAvKiBDT05GSUdfQVBDSV9CT09UICovDQo+ ICsjZW5kaWYgLyogQ09ORklHX0FDUElfTlVNQSAqLw0KPiAgIA0KPiAgICNpZmRlZiBDT05GSUdf U01QDQo+ICAgCXNtcF9idWlsZF9jcHVfbWFwKCk7DQo+IGRpZmYgLS1naXQgYS9hcmNoL2lhNjQv a2VybmVsL3RvcG9sb2d5LmMgYi9hcmNoL2lhNjQva2VybmVsL3RvcG9sb2d5LmMNCj4gaW5kZXgg ZTMxMWVlMTNlNjFkLi4wOWZjMzg1YzJhY2QgMTAwNjQ0DQo+IC0tLSBhL2FyY2gvaWE2NC9rZXJu ZWwvdG9wb2xvZ3kuYw0KPiArKysgYi9hcmNoL2lhNjQva2VybmVsL3RvcG9sb2d5LmMNCj4gQEAg LTQyLDcgKzQyLDYgQEAgRVhQT1JUX1NZTUJPTF9HUEwoYXJjaF9maXhfcGh5c19wYWNrYWdlX2lk KTsNCj4gICAjaWZkZWYgQ09ORklHX0hPVFBMVUdfQ1BVDQo+ICAgaW50IF9fcmVmIGFyY2hfcmVn aXN0ZXJfY3B1KGludCBudW0pDQo+ICAgew0KPiAtI2lmZGVmIENPTkZJR19BQ1BJDQo+ICAgCS8q DQo+ICAgCSAqIElmIENQRUkgY2FuIGJlIHJlLXRhcmdldGVkIG9yIGlmIHRoaXMgaXMgbm90DQo+ ICAgCSAqIENQRUkgdGFyZ2V0LCB0aGVuIGl0IGlzIGhvdHBsdWdnYWJsZQ0KPiBAQCAtNTAsNyAr NDksNiBAQCBpbnQgX19yZWYgYXJjaF9yZWdpc3Rlcl9jcHUoaW50IG51bSkNCj4gICAJaWYgKGNh bl9jcGVpX3JldGFyZ2V0KCkgfHwgIWlzX2NwdV9jcGVpX3RhcmdldChudW0pKQ0KPiAgIAkJc3lz ZnNfY3B1c1tudW1dLmNwdS5ob3RwbHVnZ2FibGUgPSAxOw0KPiAgIAltYXBfY3B1X3RvX25vZGUo bnVtLCBub2RlX2NwdWlkW251bV0ubmlkKTsNCj4gLSNlbmRpZg0KPiAgIAlyZXR1cm4gcmVnaXN0 ZXJfY3B1KCZzeXNmc19jcHVzW251bV0uY3B1LCBudW0pOw0KPiAgIH0NCj4gICBFWFBPUlRfU1lN Qk9MKGFyY2hfcmVnaXN0ZXJfY3B1KTsNCj4gQEAgLTU4LDkgKzU2LDcgQEAgRVhQT1JUX1NZTUJP TChhcmNoX3JlZ2lzdGVyX2NwdSk7DQo+ICAgdm9pZCBfX3JlZiBhcmNoX3VucmVnaXN0ZXJfY3B1 KGludCBudW0pDQo+ICAgew0KPiAgIAl1bnJlZ2lzdGVyX2NwdSgmc3lzZnNfY3B1c1tudW1dLmNw dSk7DQo+IC0jaWZkZWYgQ09ORklHX0FDUEkNCj4gICAJdW5tYXBfY3B1X2Zyb21fbm9kZShudW0s IGNwdV90b19ub2RlKG51bSkpOw0KPiAtI2VuZGlmDQo+ICAgfQ0KPiAgIEVYUE9SVF9TWU1CT0wo YXJjaF91bnJlZ2lzdGVyX2NwdSk7DQo+ICAgI2Vsc2UNCj4gDQo

#22 lore raw

PATCH 20/28 ia64: remove the zx1 swiotlb machvec

In reply to Christoph Hellwig

The aim of this machvec is to support devices with < 32-bit dma masks. But given that ia64 only has a ZONE_DMA32 and not a ZONE_DMA that isn't supported by swiotlb either.

---
 .../admin-guide/kernel-parameters.txt         |  2 +-
 arch/ia64/Kconfig                             | 13 +---
 arch/ia64/Kconfig.debug                       |  2 +-
 arch/ia64/Makefile                            |  2 -
 arch/ia64/hp/common/Makefile                  |  2 -
 arch/ia64/hp/common/hwsw_iommu.c              | 60 -------------------
 arch/ia64/hp/common/sba_iommu.c               | 15 +----
 arch/ia64/hp/zx1/Makefile                     |  2 +-
 arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c      |  3 -
 arch/ia64/include/asm/acpi.h                  |  2 -
 arch/ia64/include/asm/dma-mapping.h           |  8 +--
 arch/ia64/include/asm/machvec.h               | 15 -----
 arch/ia64/include/asm/machvec_hpzx1_swiotlb.h | 20 -------
 arch/ia64/kernel/dma-mapping.c                |  6 --
 drivers/char/agp/Kconfig                      |  2 +-
 15 files changed, 7 insertions(+), 147 deletions(-)
 delete mode 100644 arch/ia64/hp/common/hwsw_iommu.c
 delete mode 100644 arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c
 delete mode 100644 arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
Documentation/admin-guide/kernel-parameters.txt +1 -1
index 47d981a86e2f..33ab47447ef1 100644
@@ -2373,7 +2373,7 @@
 
 	machvec=	[IA-64] Force the use of a particular machine-vector
 			(machvec) in a generic kernel.
-			Example: machvec=hpzx1_swiotlb
+			Example: machvec=hpzx1
 
 	machtype=	[Loongson] Share the same kernel image file between different
 			 yeeloong laptop.
arch/ia64/Kconfig +1 -12
index 63db7a5378ac..a42ab41ee8ab 100644
@@ -138,7 +138,6 @@ config IA64_GENERIC
 	  DIG-compliant		For DIG ("Developer's Interface Guide") compliant systems
 	  DIG+Intel+IOMMU	For DIG systems with Intel IOMMU
 	  HP-zx1/sx1000		For HP systems
-	  HP-zx1/sx1000+swiotlb	For HP systems with (broken) DMA-constrained devices.
 	  SGI-UV		For SGI UV systems
 
 	  If you don't know what to do, choose "generic".
@@ -158,16 +157,6 @@ config IA64_HP_ZX1
 	  Build a kernel that runs on HP zx1 and sx1000 systems.  This adds
 	  support for the HP I/O MMU.
 
-config IA64_HP_ZX1_SWIOTLB
-	bool "HP-zx1/sx1000 with software I/O TLB"
-	select SWIOTLB
-	help
-	  Build a kernel that runs on HP zx1 and sx1000 systems even when they
-	  have broken PCI devices which cannot DMA to full 32 bits.  Apart
-	  from support for the HP I/O MMU, this includes support for the software
-	  I/O TLB, which allows supporting the broken devices at the expense of
-	  wasting some kernel memory (about 2MB by default).
-
 config IA64_SGI_UV
 	bool "SGI-UV"
 	select NUMA
@@ -350,7 +339,7 @@ config ARCH_SPARSEMEM_ENABLE
 	select SPARSEMEM_VMEMMAP_ENABLE
 
 config ARCH_DISCONTIGMEM_DEFAULT
-	def_bool y if (IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
+	def_bool y if (IA64_GENERIC || IA64_HP_ZX1)
 	depends on ARCH_DISCONTIGMEM_ENABLE
 
 config NUMA
arch/ia64/Kconfig.debug +1 -1
index 793a613c54ab..abf8d04ab6ab 100644
@@ -14,7 +14,7 @@ config IA64_GRANULE_16MB
 
 config IA64_GRANULE_64MB
 	bool "64MB"
-	depends on !(IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
+	depends on !(IA64_GENERIC || IA64_HP_ZX1)
 
 endchoice
 
arch/ia64/Makefile +0 -2
index c06802799659..0b3647efde5d 100644
@@ -54,12 +54,10 @@ core-$(CONFIG_IA64_DIG) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_DIG_VTD) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_GENERIC) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/dig/
-core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
 core-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
 
 drivers-y			+= arch/ia64/pci/
 drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/
-drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
 drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/uv/
 drivers-$(CONFIG_OPROFILE)	+= arch/ia64/oprofile/
 
arch/ia64/hp/common/Makefile +0 -2
index 6026308f9a62..47c8f6ecb6f4 100644
@@ -7,6 +7,4 @@
 #
 
 obj-y := sba_iommu.o
-obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += hwsw_iommu.o
-obj-$(CONFIG_IA64_GENERIC) += hwsw_iommu.o
 obj-$(CONFIG_IA64_HP_AML_NFW) += aml_nfw.o
arch/ia64/hp/common/hwsw_iommu.c deleted +0 -60

60 lines not on this page · raw message

arch/ia64/hp/common/sba_iommu.c +1 -14
index 18321ce8bfa0..215fa688b729 100644
@@ -2059,7 +2059,7 @@ arch_initcall(acpi_sba_ioc_init_acpi);
 static int __init
 sba_init(void)
 {
-	if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb"))
+	if (!ia64_platform_is("hpzx1"))
 		return 0;
 
 #if defined(CONFIG_IA64_GENERIC)
@@ -2102,19 +2102,6 @@ sba_init(void)
 		return 0;
 	}
 
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_HP_ZX1_SWIOTLB)
-	/*
-	 * hpzx1_swiotlb needs to have a fairly small swiotlb bounce
-	 * buffer setup to support devices with smaller DMA masks than
-	 * sba_iommu can handle.
-	 */
-	if (ia64_platform_is("hpzx1_swiotlb")) {
-		extern void hwsw_init(void);
-
-		hwsw_init();
-	}
-#endif
-
 	{
 		struct pci_bus *b = NULL;
 		while ((b = pci_find_next_bus(b)) != NULL)
arch/ia64/hp/zx1/Makefile +1 -1
index 46b37d820b59..bea44b4ed173 100644
@@ -6,4 +6,4 @@
 # Copyright (C) Alex Williamson ([email protected])
 #
 
-obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o hpzx1_swiotlb_machvec.o
+obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o
arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c deleted +0 -3
deleted file mode 100644
index 4392a96b3c58..000000000000
@@ -1,3 +0,0 @@
-#define MACHVEC_PLATFORM_NAME		hpzx1_swiotlb
-#define MACHVEC_PLATFORM_HEADER		<asm/machvec_hpzx1_swiotlb.h>
-#include <asm/machvec_init.h>
arch/ia64/include/asm/acpi.h +0 -2
index 01c1c269aa13..9e563df73038 100644
@@ -39,8 +39,6 @@ static inline const char *acpi_get_sysname (void)
 {
 # if defined (CONFIG_IA64_HP_ZX1)
 	return "hpzx1";
-# elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
-	return "hpzx1_swiotlb";
 # elif defined (CONFIG_IA64_SGI_UV)
 	return "uv";
 # elif defined (CONFIG_IA64_DIG)
arch/ia64/include/asm/dma-mapping.h +1 -7
index f7ec71e4001e..a5d9d788eede 100644
@@ -6,17 +6,11 @@
  * Copyright (C) 2003-2004 Hewlett-Packard Co
  *	David Mosberger-Tang <[email protected]>
  */
-#include <asm/machvec.h>
-#include <linux/scatterlist.h>
-#include <linux/dma-debug.h>
-
 extern const struct dma_map_ops *dma_ops;
-extern struct ia64_machine_vector ia64_mv;
-extern void set_iommu_machvec(void);
 
 static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
 {
-	return platform_dma_get_ops(NULL);
+	return dma_ops;
 }
 
 #endif /* _ASM_IA64_DMA_MAPPING_H */
arch/ia64/include/asm/machvec.h +0 -15
index 5a9a8af79308..fa867e980d87 100644
@@ -17,12 +17,6 @@ struct device;
 
 typedef void ia64_mv_setup_t (char **);
 typedef void ia64_mv_dma_init (void);
-typedef const struct dma_map_ops *ia64_mv_dma_get_ops(struct device *);
-
-static inline void
-machvec_noop (void)
-{
-}
 
 extern void machvec_setup (char **);
 
@@ -32,8 +26,6 @@ extern void machvec_setup (char **);
 #  include <asm/machvec_dig_vtd.h>
 # elif defined (CONFIG_IA64_HP_ZX1)
 #  include <asm/machvec_hpzx1.h>
-# elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
-#  include <asm/machvec_hpzx1_swiotlb.h>
 # elif defined (CONFIG_IA64_SGI_UV)
 #  include <asm/machvec_uv.h>
 # elif defined (CONFIG_IA64_GENERIC)
@@ -44,7 +36,6 @@ extern void machvec_setup (char **);
 #  define ia64_platform_name	ia64_mv.name
 #  define platform_setup	ia64_mv.setup
 #  define platform_dma_init		ia64_mv.dma_init
-#  define platform_dma_get_ops		ia64_mv.dma_get_ops
 # endif
 
 /* __attribute__((__aligned__(16))) is required to make size of the
@@ -56,7 +47,6 @@ struct ia64_machine_vector {
 	const char *name;
 	ia64_mv_setup_t *setup;
 	ia64_mv_dma_init *dma_init;
-	ia64_mv_dma_get_ops *dma_get_ops;
 } __attribute__((__aligned__(16))); /* align attrib? see above comment */
 
 #define MACHVEC_INIT(name)			\
@@ -64,7 +54,6 @@ struct ia64_machine_vector {
 	#name,					\
 	platform_setup,				\
 	platform_dma_init,			\
-	platform_dma_get_ops,			\
 }
 
 extern struct ia64_machine_vector ia64_mv;
@@ -76,7 +65,6 @@ extern void machvec_init_from_cmdline(const char *cmdline);
 # endif /* CONFIG_IA64_GENERIC */
 
 extern void swiotlb_dma_init(void);
-extern const struct dma_map_ops *dma_get_ops(struct device *);
 
 /*
  * Define default versions so we can extend machvec for new platforms without having
@@ -88,8 +76,5 @@ extern const struct dma_map_ops *dma_get_ops(struct device *);
 #ifndef platform_dma_init
 # define platform_dma_init		swiotlb_dma_init
 #endif
-#ifndef platform_dma_get_ops
-# define platform_dma_get_ops		dma_get_ops
-#endif
 
 #endif /* _ASM_IA64_MACHVEC_H */
arch/ia64/include/asm/machvec_hpzx1_swiotlb.h deleted +0 -20
deleted file mode 100644
index 5aec6a008c61..000000000000
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
-#define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
-
-extern ia64_mv_setup_t				dig_setup;
-extern ia64_mv_dma_get_ops			hwsw_dma_get_ops;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name			"hpzx1_swiotlb"
-#define platform_setup				dig_setup
-#define platform_dma_init			machvec_noop
-#define platform_dma_get_ops			hwsw_dma_get_ops
-
-#endif /* _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h */
arch/ia64/kernel/dma-mapping.c +0 -6
index ad7d9963de34..4be5ee04ccfa 100644
@@ -9,12 +9,6 @@ int iommu_detected __read_mostly;
 const struct dma_map_ops *dma_ops;
 EXPORT_SYMBOL(dma_ops);
 
-const struct dma_map_ops *dma_get_ops(struct device *dev)
-{
-	return dma_ops;
-}
-EXPORT_SYMBOL(dma_get_ops);
-
 #ifdef CONFIG_SWIOTLB
 void *arch_dma_alloc(struct device *dev, size_t size,
 		dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs)
drivers/char/agp/Kconfig +1 -1
index be50d7a93f4c..42d45e97c2ae 100644
@@ -118,7 +118,7 @@ config AGP_I460
 
 config AGP_HP_ZX1
 	tristate "HP ZX1 chipset AGP support"
-	depends on AGP && (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC)
+	depends on AGP && (IA64_HP_ZX1 || IA64_GENERIC)
 	help
 	  This option gives you AGP GART support for the HP ZX1 chipset
 	  for IA64 processors.
Signature · 1 line
2.20.1
#23 lore raw

PATCH 21/28 ia64: remove the SGI UV simulator support

In reply to Christoph Hellwig

The simulator support was marked as temporary since the initial commit, so drop it more than 10 years later.

---
 arch/ia64/include/asm/sn/simulator.h | 25 ----------------------
 arch/ia64/include/asm/sn/sn_sal.h    | 10 ---------
 arch/ia64/include/asm/uv/uv.h        |  4 +---
 arch/ia64/uv/kernel/setup.c          | 31 +++++-----------------------
 4 files changed, 6 insertions(+), 64 deletions(-)
 delete mode 100644 arch/ia64/include/asm/sn/simulator.h
arch/ia64/include/asm/sn/simulator.h deleted +0 -25
deleted file mode 100644
index 3e4557df3b7c..000000000000
@@ -1,25 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved.
- */
-
-#ifndef _ASM_IA64_SN_SIMULATOR_H
-#define _ASM_IA64_SN_SIMULATOR_H
-
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_UV)
-#define SNMAGIC 0xaeeeeeee8badbeefL
-#define IS_MEDUSA()			({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn = SNMAGIC;})
-
-#define SIMULATOR_SLEEP()		asm("nop.i 0x8beef")
-#define IS_RUNNING_ON_SIMULATOR()	(sn_prom_type)
-#define IS_RUNNING_ON_FAKE_PROM()	(sn_prom_type = 2)
-extern int sn_prom_type;		/* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */
-#else
-#define IS_MEDUSA()			0
-#define SIMULATOR_SLEEP()
-#define IS_RUNNING_ON_SIMULATOR()	0
-#endif
-
-#endif /* _ASM_IA64_SN_SIMULATOR_H */
arch/ia64/include/asm/sn/sn_sal.h +0 -10
index 48b88d0807db..d437aa43343b 100644
@@ -30,8 +30,6 @@
 #define SALRET_INVALID_ARG	(-2)
 #define SALRET_ERROR		(-3)
 
-#define SN_SAL_FAKE_PROM			   0x02009999
-
 /*
  * Returns the physical address of the partition's reserved page through
  * an iterative number of calls.
@@ -81,14 +79,6 @@ sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array)
 #define SN_MEMPROT_ACCESS_CLASS_6		0x084080
 #define SN_MEMPROT_ACCESS_CLASS_7		0x021080
 
-static inline int
-ia64_sn_is_fake_prom(void)
-{
-	struct ia64_sal_retval rv;
-	SAL_CALL_NOLOCK(rv, SN_SAL_FAKE_PROM, 0, 0, 0, 0, 0, 0, 0);
-	return (rv.status = 0);
-}
-
 union sn_watchlist_u {
 	u64     val;
 	struct {
arch/ia64/include/asm/uv/uv.h +1 -3
index 71df93ee3bc0..502cf1c56369 100644
@@ -2,12 +2,10 @@
 #ifndef _ASM_IA64_UV_UV_H
 #define _ASM_IA64_UV_UV_H
 
-#include <asm/sn/simulator.h>
-
 static inline int is_uv_system(void)
 {
 	/* temporary support for running on hardware simulator */
-	return IS_MEDUSA() || ia64_platform_is("uv");
+	return ia64_platform_is("uv");
 }
 
 #endif	/* _ASM_IA64_UV_UV_H */
arch/ia64/uv/kernel/setup.c +5 -25
index 11478d2d863d..6ac4bd314d92 100644
@@ -10,14 +10,12 @@
 
 #include <linux/module.h>
 #include <linux/percpu.h>
-#include <asm/sn/simulator.h>
 #include <asm/uv/uv_mmrs.h>
 #include <asm/uv/uv_hub.h>
 
 DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
 EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
 
-int sn_prom_type;
 long sn_coherency_id;
 EXPORT_SYMBOL_GPL(sn_coherency_id);
 
@@ -60,30 +58,11 @@ void __init uv_setup(char **cmdline_p)
 	int nid, cpu, m_val, n_val;
 	unsigned long mmr_base, lowmem_redir_base, lowmem_redir_size;
 
-	if (IS_MEDUSA()) {
-		lowmem_redir_base = 0;
-		lowmem_redir_size = 0;
-		node_id.v = 0;
-		m_n_config.s.m_skt = 37;
-		m_n_config.s.n_skt = 0;
-		mmr_base = 0;
-#if 0
-		/* Need BIOS calls - TDB */
-		if (!ia64_sn_is_fake_prom())
-			sn_prom_type = 1;
-		else
-#endif
-			sn_prom_type = 2;
-		printk(KERN_INFO "Running on medusa with %s PROM\n",
-					(sn_prom_type = 1) ? "real" : "fake");
-	} else {
-		get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
-		node_id.v = uv_read_local_mmr(UVH_NODE_ID);
-		m_n_config.v = uv_read_local_mmr(UVH_SI_ADDR_MAP_CONFIG);
-		mmr_base -			uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR) &
-				~UV_MMR_ENABLE;
-	}
+	get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
+	node_id.v = uv_read_local_mmr(UVH_NODE_ID);
+	m_n_config.v = uv_read_local_mmr(UVH_SI_ADDR_MAP_CONFIG);
+	mmr_base = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR) &
+			~UV_MMR_ENABLE;
 
 	m_val = m_n_config.s.m_skt;
 	n_val = m_n_config.s.n_skt;
Signature · 1 line
2.20.1
#24 lore raw

PATCH 22/28 ia64: remove the unused sn_coherency_id symbol

In reply to Christoph Hellwig

The sn_coherency_id symbol isn't used anywhere, remove it.

---
 arch/ia64/uv/kernel/setup.c | 3 ---
 1 file changed, 3 deletions(-)
arch/ia64/uv/kernel/setup.c +0 -3
index 6ac4bd314d92..b081f5138f5c 100644
@@ -16,9 +16,6 @@
 DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
 EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
 
-long sn_coherency_id;
-EXPORT_SYMBOL_GPL(sn_coherency_id);
-
 struct redir_addr {
 	unsigned long redirect;
 	unsigned long alias;
Signature · 1 line
2.20.1
#25 lore raw

PATCH 23/28 ia64: rework iommu probing

In reply to Christoph Hellwig

ia64 currently organizes the iommu probing along machves, which isn't very helpful. Instead just try to probe for Intel IOMMUs in mem_init as they are properly described in ACPI and if none was found initialize the swiotlb buffer. The HP SBA handling is then only done delayed when the actual hardware is probed. Only in the case that we actually found usable IOMMUs we then set up the DMA ops and free the not needed swiotlb buffer. This scheme gets rid of the need for the dma_init machvec operation, and the dig_vtd machvec.

---
 arch/ia64/Kconfig                       |  5 --
 arch/ia64/Makefile                      |  1 -
 arch/ia64/dig/Makefile                  |  5 --
 arch/ia64/dig/machvec_vtd.c             |  3 -
 arch/ia64/hp/common/sba_iommu.c         | 82 +++++++++----------------
 arch/ia64/include/asm/acpi.h            |  2 -
 arch/ia64/include/asm/machvec.h         | 11 ----
 arch/ia64/include/asm/machvec_dig_vtd.h | 19 ------
 arch/ia64/include/asm/machvec_hpzx1.h   |  2 -
 arch/ia64/include/asm/pci.h             |  3 -
 arch/ia64/kernel/acpi.c                 | 15 -----
 arch/ia64/kernel/dma-mapping.c          |  6 --
 arch/ia64/kernel/pci-dma.c              | 21 -------
 arch/ia64/mm/init.c                     | 16 +++--
 14 files changed, 40 insertions(+), 151 deletions(-)
 delete mode 100644 arch/ia64/dig/machvec_vtd.c
 delete mode 100644 arch/ia64/include/asm/machvec_dig_vtd.h
arch/ia64/Kconfig +0 -5
index a42ab41ee8ab..9a8c7ec60cfc 100644
@@ -146,11 +146,6 @@ config IA64_DIG
 	bool "DIG-compliant"
 	select SWIOTLB
 
-config IA64_DIG_VTD
-	bool "DIG+Intel+IOMMU"
-	select INTEL_IOMMU
-	select PCI_MSI
-
 config IA64_HP_ZX1
 	bool "HP-zx1/sx1000"
 	help
arch/ia64/Makefile +0 -1
index 0b3647efde5d..22deb5e6f346 100644
@@ -51,7 +51,6 @@ head-y := arch/ia64/kernel/head.o
 libs-y				+= arch/ia64/lib/
 core-y				+= arch/ia64/kernel/ arch/ia64/mm/
 core-$(CONFIG_IA64_DIG) 	+= arch/ia64/dig/
-core-$(CONFIG_IA64_DIG_VTD) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_GENERIC) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/dig/
 core-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
arch/ia64/dig/Makefile +0 -5
index e7f830825470..5c2f638c31f4 100644
@@ -7,9 +7,4 @@
 #
 
 obj-y := setup.o
-ifeq ($(CONFIG_INTEL_IOMMU), y)
-obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o
-else
 obj-$(CONFIG_IA64_GENERIC) += machvec.o
-endif
-
arch/ia64/dig/machvec_vtd.c deleted +0 -3
deleted file mode 100644
index 7cd3eb471cad..000000000000
@@ -1,3 +0,0 @@
-#define MACHVEC_PLATFORM_NAME		dig_vtd
-#define MACHVEC_PLATFORM_HEADER		<asm/machvec_dig_vtd.h>
-#include <asm/machvec_init.h>
arch/ia64/hp/common/sba_iommu.c +28 -54

127 lines not on this page · raw message

arch/ia64/include/asm/acpi.h +0 -2
index 9e563df73038..be6bf3e499a6 100644
@@ -43,8 +43,6 @@ static inline const char *acpi_get_sysname (void)
 	return "uv";
 # elif defined (CONFIG_IA64_DIG)
 	return "dig";
-# elif defined(CONFIG_IA64_DIG_VTD)
-	return "dig_vtd";
 # else
 #	error Unknown platform.  Fix acpi.c.
 # endif
arch/ia64/include/asm/machvec.h +0 -11
index fa867e980d87..b22d0499b58c 100644
@@ -16,14 +16,11 @@
 struct device;
 
 typedef void ia64_mv_setup_t (char **);
-typedef void ia64_mv_dma_init (void);
 
 extern void machvec_setup (char **);
 
 # if defined (CONFIG_IA64_DIG)
 #  include <asm/machvec_dig.h>
-# elif defined(CONFIG_IA64_DIG_VTD)
-#  include <asm/machvec_dig_vtd.h>
 # elif defined (CONFIG_IA64_HP_ZX1)
 #  include <asm/machvec_hpzx1.h>
 # elif defined (CONFIG_IA64_SGI_UV)
@@ -35,7 +32,6 @@ extern void machvec_setup (char **);
 # else
 #  define ia64_platform_name	ia64_mv.name
 #  define platform_setup	ia64_mv.setup
-#  define platform_dma_init		ia64_mv.dma_init
 # endif
 
 /* __attribute__((__aligned__(16))) is required to make size of the
@@ -46,14 +42,12 @@ extern void machvec_setup (char **);
 struct ia64_machine_vector {
 	const char *name;
 	ia64_mv_setup_t *setup;
-	ia64_mv_dma_init *dma_init;
 } __attribute__((__aligned__(16))); /* align attrib? see above comment */
 
 #define MACHVEC_INIT(name)			\
 {						\
 	#name,					\
 	platform_setup,				\
-	platform_dma_init,			\
 }
 
 extern struct ia64_machine_vector ia64_mv;
@@ -64,8 +58,6 @@ extern void machvec_init_from_cmdline(const char *cmdline);
 #  error Unknown configuration.  Update arch/ia64/include/asm/machvec.h.
 # endif /* CONFIG_IA64_GENERIC */
 
-extern void swiotlb_dma_init(void);
-
 /*
  * Define default versions so we can extend machvec for new platforms without having
  * to update the machvec files for all existing platforms.
@@ -73,8 +65,5 @@ extern void swiotlb_dma_init(void);
 #ifndef platform_setup
 # define platform_setup			machvec_setup
 #endif
-#ifndef platform_dma_init
-# define platform_dma_init		swiotlb_dma_init
-#endif
 
 #endif /* _ASM_IA64_MACHVEC_H */
arch/ia64/include/asm/machvec_dig_vtd.h deleted +0 -19
deleted file mode 100644
index bb44eb9039dd..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_MACHVEC_DIG_VTD_h
-#define _ASM_IA64_MACHVEC_DIG_VTD_h
-
-extern ia64_mv_setup_t			dig_setup;
-extern ia64_mv_dma_init			pci_iommu_alloc;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name			"dig_vtd"
-#define platform_setup				dig_setup
-#define platform_dma_init			pci_iommu_alloc
-
-#endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */
arch/ia64/include/asm/machvec_hpzx1.h +0 -2
index 5299ac38bfb6..7d37998ffdbf 100644
@@ -3,7 +3,6 @@
 #define _ASM_IA64_MACHVEC_HPZX1_h
 
 extern ia64_mv_setup_t			dig_setup;
-extern ia64_mv_dma_init			sba_dma_init;
 
 /*
  * This stuff has dual use!
@@ -14,6 +13,5 @@ extern ia64_mv_dma_init			sba_dma_init;
  */
 #define ia64_platform_name			"hpzx1"
 #define platform_setup				dig_setup
-#define platform_dma_init			sba_dma_init
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
arch/ia64/include/asm/pci.h +0 -3
index ef91b780a3f2..8c163d1d0189 100644
@@ -69,7 +69,4 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 	return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14);
 }
 
-#ifdef CONFIG_INTEL_IOMMU
-extern void pci_iommu_alloc(void);
-#endif
 #endif /* _ASM_IA64_PCI_H */
arch/ia64/kernel/acpi.c +0 -15
index a63e472f5317..644f34e4342e 100644
@@ -65,9 +65,6 @@ acpi_get_sysname(void)
 	struct acpi_table_rsdp *rsdp;
 	struct acpi_table_xsdt *xsdt;
 	struct acpi_table_header *hdr;
-#ifdef CONFIG_INTEL_IOMMU
-	u64 i, nentries;
-#endif
 
 	rsdp_phys = acpi_find_rsdp();
 	if (!rsdp_phys) {
@@ -98,18 +95,6 @@ acpi_get_sysname(void)
 			return "uv";
 	}
 
-#ifdef CONFIG_INTEL_IOMMU
-	/* Look for Intel IOMMU */
-	nentries = (hdr->length - sizeof(*hdr)) /
-			 sizeof(xsdt->table_offset_entry[0]);
-	for (i = 0; i < nentries; i++) {
-		hdr = __va(xsdt->table_offset_entry[i]);
-		if (strncmp(hdr->signature, ACPI_SIG_DMAR,
-			sizeof(ACPI_SIG_DMAR) - 1) = 0)
-			return "dig_vtd";
-	}
-#endif
-
 	return "dig";
 }
 #endif /* CONFIG_IA64_GENERIC */
arch/ia64/kernel/dma-mapping.c +0 -6
index 4be5ee04ccfa..53aaa8597920 100644
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/dma-direct.h>
-#include <linux/swiotlb.h>
 #include <linux/export.h>
 
 /* Set this to 1 if there is a HW IOMMU in the system */
@@ -27,9 +26,4 @@ long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr,
 {
 	return page_to_pfn(virt_to_page(cpu_addr));
 }
-
-void __init swiotlb_dma_init(void)
-{
-	swiotlb_init(1);
-}
 #endif
arch/ia64/kernel/pci-dma.c +0 -21
index fe988c49f01c..c5a8df9e77d0 100644
@@ -34,24 +34,3 @@ static int __init pci_iommu_init(void)
 
 /* Must execute after PCI subsystem */
 fs_initcall(pci_iommu_init);
-
-void __init pci_iommu_alloc(void)
-{
-	/*
-	 * The order of these functions is important for
-	 * fall-back/fail-over reasons
-	 */
-	detect_intel_iommu();
-
-#ifdef CONFIG_SWIOTLB
-	if (!iommu_detected) {
-#ifdef CONFIG_IA64_GENERIC
-		printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
-		machvec_init("dig");
-		swiotlb_dma_init();
-#else
-		panic("Unable to find Intel IOMMU");
-#endif /* CONFIG_IA64_GENERIC */
-	}
-#endif /* CONFIG_SWIOTLB */
-}
arch/ia64/mm/init.c +12 -4
index 9a4a16439900..ed3ced65705e 100644
@@ -9,6 +9,7 @@
 #include <linux/init.h>
 
 #include <linux/dma-noncoherent.h>
+#include <linux/dmar.h>
 #include <linux/efi.h>
 #include <linux/elf.h>
 #include <linux/memblock.h>
@@ -23,6 +24,7 @@
 #include <linux/proc_fs.h>
 #include <linux/bitops.h>
 #include <linux/kexec.h>
+#include <linux/swiotlb.h>
 
 #include <asm/dma.h>
 #include <asm/io.h>
@@ -633,11 +635,17 @@ mem_init (void)
 	BUG_ON(PTRS_PER_PTE * sizeof(pte_t) != PAGE_SIZE);
 
 	/*
-	 * This needs to be called _after_ the command line has been parsed but _before_
-	 * any drivers that may need the PCI DMA interface are initialized or bootmem has
-	 * been freed.
+	 * This needs to be called _after_ the command line has been parsed but
+	 * _before_ any drivers that may need the PCI DMA interface are
+	 * initialized or bootmem has been freed.
 	 */
-	platform_dma_init();
+#ifdef CONFIG_INTEL_IOMMU
+	detect_intel_iommu();
+	if (!iommu_detected)
+#endif
+#ifdef CONFIG_SWIOTLB
+		swiotlb_init(1);
+#endif
 
 #ifdef CONFIG_FLATMEM
 	BUG_ON(!mem_map);
Signature · 1 line
2.20.1
#26 lore raw

PATCH 24/28 ia64: move the ROOT_DEV setup to common code

In reply to Christoph Hellwig

I'm not sure how useful a platform default ROOT_DEV is these days, but it pretty sure isn't machvec dependent.

---
 arch/ia64/dig/setup.c    | 9 ---------
 arch/ia64/kernel/setup.c | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)
arch/ia64/dig/setup.c +0 -9
index cc14fdce6db6..0b1866d2462a 100644
@@ -13,13 +13,11 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
-#include <linux/kdev_t.h>
 #include <linux/string.h>
 #include <linux/screen_info.h>
 #include <linux/console.h>
 #include <linux/timex.h>
 #include <linux/sched.h>
-#include <linux/root_dev.h>
 
 #include <asm/io.h>
 #include <asm/machvec.h>
@@ -30,13 +28,6 @@ dig_setup (char **cmdline_p)
 {
 	unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
 
-	/*
-	 * Default to /dev/sda2.  This assumes that the EFI partition
-	 * is physical disk 1 partition 1 and the Linux root disk is
-	 * physical disk 1 partition 2.
-	 */
-	ROOT_DEV = Root_SDA2;		/* default to second partition on first drive */
-
 #ifdef CONFIG_SMP
 	init_smp_config();
 #endif
arch/ia64/kernel/setup.c +9 -0
index 8d47836d932c..560f9833c665 100644
@@ -30,6 +30,7 @@
 #include <linux/console.h>
 #include <linux/delay.h>
 #include <linux/cpu.h>
+#include <linux/kdev_t.h>
 #include <linux/kernel.h>
 #include <linux/memblock.h>
 #include <linux/reboot.h>
@@ -41,6 +42,7 @@
 #include <linux/threads.h>
 #include <linux/screen_info.h>
 #include <linux/dmi.h>
+#include <linux/root_dev.h>
 #include <linux/serial.h>
 #include <linux/serial_core.h>
 #include <linux/efi.h>
@@ -599,6 +601,13 @@ setup_arch (char **cmdline_p)
 	if (!nomca)
 		ia64_mca_init();
 
+	/*
+	 * Default to /dev/sda2.  This assumes that the EFI partition
+	 * is physical disk 1 partition 1 and the Linux root disk is
+	 * physical disk 1 partition 2.
+	 */
+	ROOT_DEV = Root_SDA2;		/* default to second partition on first drive */
+
 	platform_setup(cmdline_p);
 	paging_init();
 
Signature · 1 line
2.20.1
#27 lore raw

PATCH 25/28 ia64: move the screen_info setup to common code

In reply to Christoph Hellwig

There is nothing really platform specific about setting about the screen_info from the ia64_boot_param structure, so move it from the dig machvec to common code.

---
 arch/ia64/dig/setup.c    | 30 ------------------------------
 arch/ia64/kernel/setup.c | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 30 deletions(-)
arch/ia64/dig/setup.c +0 -30
index 0b1866d2462a..ca8be4617b2e 100644
@@ -26,37 +26,7 @@
 void __init
 dig_setup (char **cmdline_p)
 {
-	unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
-
 #ifdef CONFIG_SMP
 	init_smp_config();
 #endif
-
-	memset(&screen_info, 0, sizeof(screen_info));
-
-	if (!ia64_boot_param->console_info.num_rows
-	    || !ia64_boot_param->console_info.num_cols)
-	{
-		printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n");
-		orig_x = 0;
-		orig_y = 0;
-		num_cols = 80;
-		num_rows = 25;
-		font_height = 16;
-	} else {
-		orig_x = ia64_boot_param->console_info.orig_x;
-		orig_y = ia64_boot_param->console_info.orig_y;
-		num_cols = ia64_boot_param->console_info.num_cols;
-		num_rows = ia64_boot_param->console_info.num_rows;
-		font_height = 400 / num_rows;
-	}
-
-	screen_info.orig_x = orig_x;
-	screen_info.orig_y = orig_y;
-	screen_info.orig_video_cols  = num_cols;
-	screen_info.orig_video_lines = num_rows;
-	screen_info.orig_video_points = font_height;
-	screen_info.orig_video_mode = 3;	/* XXX fake */
-	screen_info.orig_video_isVGA = 1;	/* XXX fake */
-	screen_info.orig_video_ega_bx = 3;	/* XXX fake */
 }
arch/ia64/kernel/setup.c +34 -0
index 560f9833c665..65d07c60f12d 100644
@@ -469,6 +469,39 @@ early_console_setup (char *cmdline)
 	return -1;
 }
 
+static void __init
+screen_info_setup(void)
+{
+	unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
+
+	memset(&screen_info, 0, sizeof(screen_info));
+
+	if (!ia64_boot_param->console_info.num_rows ||
+	    !ia64_boot_param->console_info.num_cols) {
+		printk(KERN_WARNING "invalid screen-info, guessing 80x25\n");
+		orig_x = 0;
+		orig_y = 0;
+		num_cols = 80;
+		num_rows = 25;
+		font_height = 16;
+	} else {
+		orig_x = ia64_boot_param->console_info.orig_x;
+		orig_y = ia64_boot_param->console_info.orig_y;
+		num_cols = ia64_boot_param->console_info.num_cols;
+		num_rows = ia64_boot_param->console_info.num_rows;
+		font_height = 400 / num_rows;
+	}
+
+	screen_info.orig_x = orig_x;
+	screen_info.orig_y = orig_y;
+	screen_info.orig_video_cols  = num_cols;
+	screen_info.orig_video_lines = num_rows;
+	screen_info.orig_video_points = font_height;
+	screen_info.orig_video_mode = 3;	/* XXX fake */
+	screen_info.orig_video_isVGA = 1;	/* XXX fake */
+	screen_info.orig_video_ega_bx = 3;	/* XXX fake */
+}
+
 static inline void
 mark_bsp_online (void)
 {
@@ -609,6 +642,7 @@ setup_arch (char **cmdline_p)
 	ROOT_DEV = Root_SDA2;		/* default to second partition on first drive */
 
 	platform_setup(cmdline_p);
+	screen_info_setup();
 	paging_init();
 
 	clear_sched_clock_stable();
Signature · 1 line
2.20.1
#28 lore raw

PATCH 26/28 ia64: remove support for machvecs

In reply to Christoph Hellwig

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.

---
 arch/ia64/Kconfig                     | 72 ++++++++-------------------
 arch/ia64/Kconfig.debug               |  2 +-
 arch/ia64/Makefile                    |  7 +--
 arch/ia64/configs/bigsur_defconfig    |  1 -
 arch/ia64/configs/tiger_defconfig     |  1 -
 arch/ia64/configs/zx1_defconfig       |  1 -
 arch/ia64/dig/Makefile                | 10 ----
 arch/ia64/dig/machvec.c               |  3 --
 arch/ia64/dig/setup.c                 | 32 ------------
 arch/ia64/hp/common/Makefile          |  2 +-
 arch/ia64/hp/zx1/Makefile             |  9 ----
 arch/ia64/hp/zx1/hpzx1_machvec.c      |  3 --
 arch/ia64/include/asm/acpi.h          | 16 ------
 arch/ia64/include/asm/hw_irq.h        |  5 +-
 arch/ia64/include/asm/io.h            |  1 -
 arch/ia64/include/asm/iommu.h         |  1 -
 arch/ia64/include/asm/machvec.h       | 69 -------------------------
 arch/ia64/include/asm/machvec_dig.h   | 17 -------
 arch/ia64/include/asm/machvec_hpzx1.h | 17 -------
 arch/ia64/include/asm/machvec_init.h  | 11 ----
 arch/ia64/include/asm/machvec_uv.h    | 26 ----------
 arch/ia64/include/asm/mmzone.h        | 13 ++---
 arch/ia64/include/asm/processor.h     |  2 -
 arch/ia64/include/asm/tlb.h           |  1 -
 arch/ia64/include/asm/uv/uv.h         | 23 ++++++++-
 arch/ia64/kernel/Makefile             |  4 +-
 arch/ia64/kernel/acpi.c               | 55 --------------------
 arch/ia64/kernel/iosapic.c            |  1 -
 arch/ia64/kernel/irq_ia64.c           |  5 +-
 arch/ia64/kernel/machvec.c            | 70 --------------------------
 arch/ia64/kernel/mca.c                |  1 -
 arch/ia64/kernel/mca_drv.c            |  1 -
 arch/ia64/kernel/pci-dma.c            |  1 -
 arch/ia64/kernel/setup.c              | 24 ++++-----
 arch/ia64/kernel/smp.c                |  1 -
 arch/ia64/kernel/smpboot.c            |  1 -
 arch/ia64/kernel/time.c               |  1 -
 arch/ia64/kernel/vmlinux.lds.S        | 10 ----
 arch/ia64/mm/init.c                   |  1 -
 arch/ia64/pci/fixup.c                 |  6 +--
 arch/ia64/pci/pci.c                   |  1 -
 arch/ia64/uv/kernel/Makefile          |  1 -
 arch/ia64/uv/kernel/machvec.c         | 11 ----
 arch/ia64/uv/kernel/setup.c           | 34 +++++++++++++
 drivers/acpi/Kconfig                  |  2 +-
 drivers/char/agp/Kconfig              |  4 +-
 drivers/iommu/Kconfig                 |  2 +-
 drivers/misc/Kconfig                  |  2 +-
 drivers/misc/sgi-xp/xp_uv.c           |  6 +--
 drivers/misc/sgi-xp/xpc_uv.c          | 14 +++---
 50 files changed, 116 insertions(+), 488 deletions(-)
 delete mode 100644 arch/ia64/dig/Makefile
 delete mode 100644 arch/ia64/dig/machvec.c
 delete mode 100644 arch/ia64/dig/setup.c
 delete mode 100644 arch/ia64/hp/zx1/Makefile
 delete mode 100644 arch/ia64/hp/zx1/hpzx1_machvec.c
 delete mode 100644 arch/ia64/include/asm/machvec.h
 delete mode 100644 arch/ia64/include/asm/machvec_dig.h
 delete mode 100644 arch/ia64/include/asm/machvec_hpzx1.h
 delete mode 100644 arch/ia64/include/asm/machvec_init.h
 delete mode 100644 arch/ia64/include/asm/machvec_uv.h
 delete mode 100644 arch/ia64/kernel/machvec.c
 delete mode 100644 arch/ia64/uv/kernel/machvec.c
arch/ia64/Kconfig +21 -51
index 9a8c7ec60cfc..13d49c232556 100644
@@ -11,11 +11,13 @@ config IA64
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select ACPI
+	select ACPI_NUMA if NUMA
 	select ARCH_SUPPORTS_ACPI
 	select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
 	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
 	select FORCE_PCI
 	select PCI_DOMAINS if PCI
+	select PCI_MSI
 	select PCI_SYSCALL if PCI
 	select HAVE_UNSTABLE_SCHED_CLOCK
 	select HAVE_EXIT_THREAD
@@ -30,8 +32,8 @@ config IA64
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_MEMBLOCK_NODE_MAP
 	select HAVE_VIRT_CPU_ACCOUNTING
-	select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB
-	select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB
+	select ARCH_HAS_DMA_COHERENT_TO_PFN
+	select ARCH_HAS_SYNC_DMA_FOR_CPU
 	select VIRT_TO_BUS
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PENDING_IRQ if SMP
@@ -45,6 +47,7 @@ config IA64
 	select ARCH_THREAD_STACK_ALLOCATOR
 	select ARCH_CLOCKSOURCE_DATA
 	select GENERIC_TIME_VSYSCALL
+	select SWIOTLB
 	select SYSCTL_ARCH_UNALIGN_NO_WARN
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
@@ -52,6 +55,7 @@ config IA64
 	select HAVE_ARCH_AUDITSYSCALL
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
+	select NUMA if !FLATMEM
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
@@ -119,53 +123,6 @@ config AUDIT_ARCH
 	bool
 	default y
 
-choice
-	prompt "System type"
-	default IA64_GENERIC
-
-config IA64_GENERIC
-	bool "generic"
-	select NUMA
-	select ACPI_NUMA
-	select SWIOTLB
-	select PCI_MSI
-	help
-	  This selects the system type of your hardware.  A "generic" kernel
-	  will run on any supported IA-64 system.  However, if you configure
-	  a kernel for your specific system, it will be faster and smaller.
-
-	  generic		For any supported IA-64 system
-	  DIG-compliant		For DIG ("Developer's Interface Guide") compliant systems
-	  DIG+Intel+IOMMU	For DIG systems with Intel IOMMU
-	  HP-zx1/sx1000		For HP systems
-	  SGI-UV		For SGI UV systems
-
-	  If you don't know what to do, choose "generic".
-
-config IA64_DIG
-	bool "DIG-compliant"
-	select SWIOTLB
-
-config IA64_HP_ZX1
-	bool "HP-zx1/sx1000"
-	help
-	  Build a kernel that runs on HP zx1 and sx1000 systems.  This adds
-	  support for the HP I/O MMU.
-
-config IA64_SGI_UV
-	bool "SGI-UV"
-	select NUMA
-	select ACPI_NUMA
-	select SWIOTLB
-	help
-	  Selecting this option will optimize the kernel for use on UV based
-	  systems, but the resulting kernel binary will not run on other
-	  types of ia64 systems.  If you have an SGI UV system, it's safe
-	  to select this option.  If in doubt, select ia64 generic support
-	  instead.
-
-endchoice
-
 choice
 	prompt "Processor type"
 	default ITANIUM
@@ -230,6 +187,20 @@ config IA64_L1_CACHE_SHIFT
 	default "7" if MCKINLEY
 	default "6" if ITANIUM
 
+config IA64_SGI_UV
+	bool "SGI-UV support"
+	help
+	  Selecting this option will add specific support for running on SGI
+	  UV based systems.  If you have an SGI UV system or are building a
+	  distro kernel, select this option.
+
+config IA64_HP_SBA_IOMMU
+	bool "HP SBA IOMMU support"
+	default y
+	help
+	  Say Y here to add support for the SBA IOMMU found on HP zx1 and
+	  sx1000 systems.  If you're unsure, answer Y.
+
 config IA64_CYCLONE
 	bool "Cyclone (EXA) Time Source support"
 	help
@@ -334,13 +305,12 @@ config ARCH_SPARSEMEM_ENABLE
 	select SPARSEMEM_VMEMMAP_ENABLE
 
 config ARCH_DISCONTIGMEM_DEFAULT
-	def_bool y if (IA64_GENERIC || IA64_HP_ZX1)
+	def_bool y
 	depends on ARCH_DISCONTIGMEM_ENABLE
 
 config NUMA
 	bool "NUMA support"
 	depends on !FLATMEM
-	select ACPI_NUMA if ACPI
 	help
 	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
 	  Access).  This option is for configuring high-end multiprocessor
arch/ia64/Kconfig.debug +1 -1
index abf8d04ab6ab..40ca23bd228d 100644
@@ -14,7 +14,7 @@ config IA64_GRANULE_16MB
 
 config IA64_GRANULE_64MB
 	bool "64MB"
-	depends on !(IA64_GENERIC || IA64_HP_ZX1)
+	depends on BROKEN
 
 endchoice
 
arch/ia64/Makefile +1 -6
index 22deb5e6f346..e0bb2b6aaa35 100644
@@ -50,14 +50,9 @@ head-y := arch/ia64/kernel/head.o
 
 libs-y				+= arch/ia64/lib/
 core-y				+= arch/ia64/kernel/ arch/ia64/mm/
-core-$(CONFIG_IA64_DIG) 	+= arch/ia64/dig/
-core-$(CONFIG_IA64_GENERIC) 	+= arch/ia64/dig/
-core-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/dig/
 core-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
 
-drivers-y			+= arch/ia64/pci/
-drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/
-drivers-$(CONFIG_IA64_GENERIC)	+= arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/uv/
+drivers-y			+= arch/ia64/pci/ arch/ia64/hp/common/
 drivers-$(CONFIG_OPROFILE)	+= arch/ia64/oprofile/
 
 PHONY += compressed check
arch/ia64/configs/bigsur_defconfig +0 -1
index b6bda1838629..b630bd7351c4 100644
@@ -7,7 +7,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_SGI_PARTITION=y
-CONFIG_IA64_DIG=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
 CONFIG_PREEMPT=y
arch/ia64/configs/tiger_defconfig +0 -1
index 192ed157c9ce..1d6e2a01452b 100644
@@ -12,7 +12,6 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_SGI_PARTITION=y
-CONFIG_IA64_DIG=y
 CONFIG_MCKINLEY=y
 CONFIG_IA64_PAGE_SIZE_64KB=y
 CONFIG_IA64_CYCLONE=y
arch/ia64/configs/zx1_defconfig +0 -1
index b504c8e2fd52..8c92e095f8bb 100644
@@ -4,7 +4,6 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_KPROBES=y
 CONFIG_MODULES=y
 CONFIG_PARTITION_ADVANCED=y
-CONFIG_IA64_HP_ZX1=y
 CONFIG_MCKINLEY=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS
arch/ia64/dig/Makefile deleted +0 -10
deleted file mode 100644
index 5c2f638c31f4..000000000000
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# ia64/platform/dig/Makefile
-#
-# Copyright (C) 1999 Silicon Graphics, Inc.
-# Copyright (C) Srinivasa Thirumalachar ([email protected])
-#
-
-obj-y := setup.o
-obj-$(CONFIG_IA64_GENERIC) += machvec.o
arch/ia64/dig/machvec.c deleted +0 -3
deleted file mode 100644
index 0c55bdafb473..000000000000
@@ -1,3 +0,0 @@
-#define MACHVEC_PLATFORM_NAME		dig
-#define MACHVEC_PLATFORM_HEADER		<asm/machvec_dig.h>
-#include <asm/machvec_init.h>
arch/ia64/dig/setup.c deleted +0 -32
deleted file mode 100644
index ca8be4617b2e..000000000000
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Platform dependent support for DIG64 platforms.
- *
- * Copyright (C) 1999 Intel Corp.
- * Copyright (C) 1999, 2001 Hewlett-Packard Co
- * Copyright (C) 1999, 2001, 2003 David Mosberger-Tang <[email protected]>
- * Copyright (C) 1999 VA Linux Systems
- * Copyright (C) 1999 Walt Drummond <[email protected]>
- * Copyright (C) 1999 Vijay Chander <[email protected]>
- */
-
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/screen_info.h>
-#include <linux/console.h>
-#include <linux/timex.h>
-#include <linux/sched.h>
-
-#include <asm/io.h>
-#include <asm/machvec.h>
-#include <asm/setup.h>
-
-void __init
-dig_setup (char **cmdline_p)
-{
-#ifdef CONFIG_SMP
-	init_smp_config();
-#endif
-}
arch/ia64/hp/common/Makefile +1 -1
index 47c8f6ecb6f4..11a56ed38229 100644
@@ -6,5 +6,5 @@
 # Copyright (C) Alex Williamson ([email protected])
 #
 
-obj-y := sba_iommu.o
+obj-$(CONFIG_IA64_HP_SBA_IOMMU) += sba_iommu.o
 obj-$(CONFIG_IA64_HP_AML_NFW) += aml_nfw.o
arch/ia64/hp/zx1/Makefile deleted +0 -9
deleted file mode 100644
index bea44b4ed173..000000000000
@@ -1,9 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# ia64/hp/zx1/Makefile
-#
-# Copyright (C) 2002 Hewlett Packard
-# Copyright (C) Alex Williamson ([email protected])
-#
-
-obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o
arch/ia64/hp/zx1/hpzx1_machvec.c deleted +0 -3
deleted file mode 100644
index 32518b0f923e..000000000000
@@ -1,3 +0,0 @@
-#define MACHVEC_PLATFORM_NAME		hpzx1
-#define MACHVEC_PLATFORM_HEADER		<asm/machvec_hpzx1.h>
-#include <asm/machvec_init.h>
arch/ia64/include/asm/acpi.h +0 -16
index be6bf3e499a6..f886d4dc9d55 100644
@@ -32,22 +32,6 @@ static inline bool acpi_has_cpu_in_madt(void)
 #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
 static inline void disable_acpi(void) { }
 
-#ifdef CONFIG_IA64_GENERIC
-const char *acpi_get_sysname (void);
-#else
-static inline const char *acpi_get_sysname (void)
-{
-# if defined (CONFIG_IA64_HP_ZX1)
-	return "hpzx1";
-# elif defined (CONFIG_IA64_SGI_UV)
-	return "uv";
-# elif defined (CONFIG_IA64_DIG)
-	return "dig";
-# else
-#	error Unknown platform.  Fix acpi.c.
-# endif
-}
-#endif
 int acpi_request_vector (u32 int_type);
 int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
arch/ia64/include/asm/hw_irq.h +2 -3
index 12808111a767..e6385c7bdeb0 100644
@@ -12,7 +12,6 @@
 #include <linux/types.h>
 #include <linux/profile.h>
 
-#include <asm/machvec.h>
 #include <asm/ptrace.h>
 #include <asm/smp.h>
 
@@ -56,7 +55,7 @@ typedef u8 ia64_vector;
 extern int ia64_first_device_vector;
 extern int ia64_last_device_vector;
 
-#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_DIG))
+#ifdef CONFIG_SMP
 /* Reserve the lower priority vector than device vectors for "move IRQ" IPI */
 #define IA64_IRQ_MOVE_VECTOR		0x30	/* "move IRQ" IPI */
 #define IA64_DEF_FIRST_DEVICE_VECTOR	0x31
@@ -127,7 +126,7 @@ extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect)
 extern void ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action);
 extern void destroy_and_reserve_irq (unsigned int irq);
 
-#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
+#ifdef CONFIG_SMP
 extern int irq_prepare_move(int irq, int cpu);
 extern void irq_complete_move(unsigned int irq);
 #else
arch/ia64/include/asm/io.h +0 -1
index edd5c262d360..54e70c21352a 100644
@@ -71,7 +71,6 @@ extern unsigned int num_io_spaces;
 #define HAVE_ARCH_PIO_SIZE
 
 #include <asm/intrinsics.h>
-#include <asm/machvec.h>
 #include <asm/page.h>
 #include <asm-generic/iomap.h>
 
arch/ia64/include/asm/iommu.h +0 -1
index 7429a72f3f92..679854fbdfc5 100644
@@ -15,6 +15,5 @@ extern int iommu_detected;
 #define no_iommu		(1)
 #define iommu_detected		(0)
 #endif
-extern void machvec_init(const char *name);
 
 #endif
arch/ia64/include/asm/machvec.h deleted +0 -69

69 lines not on this page · raw message

arch/ia64/include/asm/machvec_dig.h deleted +0 -17
deleted file mode 100644
index bc230f69faeb..000000000000
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_MACHVEC_DIG_h
-#define _ASM_IA64_MACHVEC_DIG_h
-
-extern ia64_mv_setup_t dig_setup;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name	"dig"
-#define platform_setup		dig_setup
-
-#endif /* _ASM_IA64_MACHVEC_DIG_h */
arch/ia64/include/asm/machvec_hpzx1.h deleted +0 -17
deleted file mode 100644
index 7d37998ffdbf..000000000000
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_IA64_MACHVEC_HPZX1_h
-#define _ASM_IA64_MACHVEC_HPZX1_h
-
-extern ia64_mv_setup_t			dig_setup;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name			"hpzx1"
-#define platform_setup				dig_setup
-
-#endif /* _ASM_IA64_MACHVEC_HPZX1_h */
arch/ia64/include/asm/machvec_init.h deleted +0 -11
deleted file mode 100644
index 7a82e3ea0aff..000000000000
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <asm/iommu.h>
-#include <asm/machvec.h>
-
-#define MACHVEC_HELPER(name)									\
- struct ia64_machine_vector machvec_##name __attribute__ ((unused, __section__ (".machvec")))	\
-	= MACHVEC_INIT(name);
-
-#define MACHVEC_DEFINE(name)	MACHVEC_HELPER(name)
-
-MACHVEC_DEFINE(MACHVEC_PLATFORM_NAME)
arch/ia64/include/asm/machvec_uv.h deleted +0 -26
deleted file mode 100644
index 2c50853f35ac..000000000000
@@ -1,26 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * SGI UV Core Functions
- *
- * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved.
- */
-
-#ifndef _ASM_IA64_MACHVEC_UV_H
-#define _ASM_IA64_MACHVEC_UV_H
-
-extern ia64_mv_setup_t uv_setup;
-
-/*
- * This stuff has dual use!
- *
- * For a generic kernel, the macros are used to initialize the
- * platform's machvec structure.  When compiling a non-generic kernel,
- * the macros are used directly.
- */
-#define ia64_platform_name		"uv"
-#define platform_setup			uv_setup
-
-#endif /* _ASM_IA64_MACHVEC_UV_H */
arch/ia64/include/asm/mmzone.h +3 -10
index e5f461fd6a58..767201f66c93 100644
@@ -27,16 +27,9 @@ static inline int pfn_to_nid(unsigned long pfn)
 		return nid;
 }
 
-#ifdef CONFIG_IA64_DIG /* DIG systems are small */
-# define MAX_PHYSNODE_ID	8
-# define NR_NODE_MEMBLKS	(MAX_NUMNODES * 8)
-#else 
-# define MAX_PHYSNODE_ID	2048
-# define NR_NODE_MEMBLKS	(MAX_NUMNODES * 4)
-#endif
-
-#else /* CONFIG_NUMA */
-# define NR_NODE_MEMBLKS	(MAX_NUMNODES * 4)
+#define MAX_PHYSNODE_ID		2048
 #endif /* CONFIG_NUMA */
 
+#define NR_NODE_MEMBLKS		(MAX_NUMNODES * 4)
+
 #endif /* _ASM_IA64_MMZONE_H */
arch/ia64/include/asm/processor.h +0 -2
index c91ef98ed6bf..95a2ec37400f 100644
@@ -679,8 +679,6 @@ enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_FORCE_MWAIT,
 
 void default_idle(void);
 
-#define ia64_platform_is(x) (strcmp(x, ia64_platform_name) = 0)
-
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _ASM_IA64_PROCESSOR_H */
arch/ia64/include/asm/tlb.h +0 -1
index 86ec034ba499..f1f257d632b3 100644
@@ -45,7 +45,6 @@
 #include <asm/pgalloc.h>
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
-#include <asm/machvec.h>
 
 #include <asm-generic/tlb.h>
 
arch/ia64/include/asm/uv/uv.h +21 -2
index 502cf1c56369..48d4526bf4cd 100644
@@ -2,10 +2,29 @@
 #ifndef _ASM_IA64_UV_UV_H
 #define _ASM_IA64_UV_UV_H
 
+#ifdef CONFIG_IA64_SGI_UV
+extern bool ia64_is_uv;
+
+static inline int is_uv_system(void)
+{
+	return ia64_is_uv;
+}
+
+void __init uv_probe_system_type(void);
+void __init uv_setup(char **cmdline_p);
+#else /* CONFIG_IA64_SGI_UV */
 static inline int is_uv_system(void)
 {
-	/* temporary support for running on hardware simulator */
-	return ia64_platform_is("uv");
+	return false;
+}
+
+static inline void __init uv_probe_system_type(void)
+{
+}
+
+static inline void __init uv_setup(char **cmdline_p)
+{
 }
+#endif /* CONFIG_IA64_SGI_UV */
 
 #endif	/* _ASM_IA64_UV_UV_H */
arch/ia64/kernel/Makefile +2 -2
index dbde36702cf2..1a8df6669eee 100644
@@ -10,7 +10,7 @@ endif
 extra-y	:= head.o vmlinux.lds
 
 obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
-	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
+	 irq_lsapic.o ivt.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
 	 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
 	 unwind.o mca.o mca_asm.o topology.o dma-mapping.o iosapic.o acpi.o \
 	 acpi-ext.o
@@ -30,7 +30,7 @@ obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o crash.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
 obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR)	+= uncached.o
 obj-$(CONFIG_AUDIT)		+= audit.o
-obj-$(CONFIG_PCI_MSI)		+= msi_ia64.o
+obj-y				+= msi_ia64.o
 mca_recovery-y			+= mca_drv.o mca_drv_asm.o
 obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
arch/ia64/kernel/acpi.c +0 -55

67 lines not on this page · raw message

arch/ia64/kernel/iosapic.c +0 -1
index 2d25958a7ed7..fad4db20ce65 100644
@@ -93,7 +93,6 @@
 #include <asm/hw_irq.h>
 #include <asm/io.h>
 #include <asm/iosapic.h>
-#include <asm/machvec.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 
arch/ia64/kernel/irq_ia64.c +1 -4
index b989731bbeac..f10208478131 100644
@@ -37,7 +37,6 @@
 #include <asm/intrinsics.h>
 #include <asm/io.h>
 #include <asm/hw_irq.h>
-#include <asm/machvec.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 
@@ -249,7 +248,7 @@ void __setup_vector_irq(int cpu)
 	}
 }
 
-#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
+#ifdef CONFIG_SMP
 
 static enum vector_domain_type {
 	VECTOR_DOMAIN_NONE,
@@ -637,11 +636,9 @@ init_IRQ (void)
 	ia64_register_ipi();
 	register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
 #ifdef CONFIG_SMP
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)
 	if (vector_domain_type != VECTOR_DOMAIN_NONE)
 		register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction);
 #endif
-#endif
 #ifdef CONFIG_PERFMON
 	pfm_init_percpu();
 #endif
arch/ia64/kernel/machvec.c deleted +0 -70

70 lines not on this page · raw message

arch/ia64/kernel/mca.c +0 -1
index a7f05883935b..bf2cb9294795 100644
@@ -91,7 +91,6 @@
 #include <linux/gfp.h>
 
 #include <asm/delay.h>
-#include <asm/machvec.h>
 #include <asm/meminit.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
arch/ia64/kernel/mca_drv.c +0 -1
index cd7972ede1d6..4d0ab323dee8 100644
@@ -26,7 +26,6 @@
 #include <linux/slab.h>
 
 #include <asm/delay.h>
-#include <asm/machvec.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
 #include <asm/sal.h>
arch/ia64/kernel/pci-dma.c +0 -1
index c5a8df9e77d0..7885b4a22a59 100644
@@ -10,7 +10,6 @@
 #include <linux/module.h>
 #include <linux/dmar.h>
 #include <asm/iommu.h>
-#include <asm/machvec.h>
 #include <linux/dma-mapping.h>
 #include <linux/kernel.h>
 #include <asm/page.h>
arch/ia64/kernel/setup.c +12 -12
index 65d07c60f12d..18de565d5825 100644
@@ -52,7 +52,6 @@
 #include <linux/kexec.h>
 #include <linux/crash_dump.h>
 
-#include <asm/machvec.h>
 #include <asm/mca.h>
 #include <asm/meminit.h>
 #include <asm/page.h>
@@ -65,11 +64,14 @@
 #include <asm/smp.h>
 #include <asm/tlbflush.h>
 #include <asm/unistd.h>
+#include <asm/uv/uv.h>
 
 #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
 # error "struct cpuinfo_ia64 too big!"
 #endif
 
+char ia64_platform_name[64];
+
 #ifdef CONFIG_SMP
 unsigned long __per_cpu_offset[NR_CPUS];
 EXPORT_SYMBOL(__per_cpu_offset);
@@ -265,7 +267,7 @@ __initcall(register_memory);
  */
 static int __init check_crashkernel_memory(unsigned long pbase, size_t size)
 {
-	if (ia64_platform_is("uv"))
+	if (is_uv_system())
 		return 1;
 	else
 		return pbase < (1UL << 32);
@@ -558,15 +560,7 @@ setup_arch (char **cmdline_p)
 	efi_init();
 	io_port_init();
 
-#ifdef CONFIG_IA64_GENERIC
-	/* machvec needs to be parsed from the command line
-	 * before parse_early_param() is called to ensure
-	 * that ia64_mv is initialised before any command line
-	 * settings may cause console setup to occur
-	 */
-	machvec_init_from_cmdline(*cmdline_p);
-#endif
-
+	uv_probe_system_type();
 	parse_early_param();
 
 	if (early_console_setup(*cmdline_p) = 0)
@@ -641,7 +635,13 @@ setup_arch (char **cmdline_p)
 	 */
 	ROOT_DEV = Root_SDA2;		/* default to second partition on first drive */
 
-	platform_setup(cmdline_p);
+	if (is_uv_system())
+		uv_setup(cmdline_p);
+#ifdef CONFIG_SMP
+	else
+		init_smp_config();
+#endif
+
 	screen_info_setup();
 	paging_init();
 
arch/ia64/kernel/smp.c +0 -1
index 4825b0b41d49..de35c54f033d 100644
@@ -36,7 +36,6 @@
 #include <linux/atomic.h>
 #include <asm/current.h>
 #include <asm/delay.h>
-#include <asm/machvec.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/page.h>
arch/ia64/kernel/smpboot.c +0 -1
index f7058659526c..6501d9a9a21b 100644
@@ -47,7 +47,6 @@
 #include <asm/delay.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/machvec.h>
 #include <asm/mca.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
arch/ia64/kernel/time.c +0 -1
index d9ad93a6d825..1e95d32c8877 100644
@@ -25,7 +25,6 @@
 #include <linux/platform_device.h>
 #include <linux/sched/cputime.h>
 
-#include <asm/machvec.h>
 #include <asm/delay.h>
 #include <asm/hw_irq.h>
 #include <asm/ptrace.h>
arch/ia64/kernel/vmlinux.lds.S +0 -10
index 0da58cf8e213..d9d4e21107cd 100644
@@ -141,16 +141,6 @@ SECTIONS {
 		__end___mckinley_e9_bundles = .;
 	}
 
-#if defined(CONFIG_IA64_GENERIC)
-	/* Machine Vector */
-	. = ALIGN(16);
-	.machvec : AT(ADDR(.machvec) - LOAD_OFFSET) {
-		machvec_start = .;
-		*(.machvec)
-		machvec_end = .;
-	}
-#endif
-
 #ifdef	CONFIG_SMP
 	. = ALIGN(PERCPU_PAGE_SIZE);
 	__cpu0_per_cpu = .;
arch/ia64/mm/init.c +0 -1
index ed3ced65705e..1979cdb61d7c 100644
@@ -28,7 +28,6 @@
 
 #include <asm/dma.h>
 #include <asm/io.h>
-#include <asm/machvec.h>
 #include <asm/numa.h>
 #include <asm/patch.h>
 #include <asm/pgalloc.h>
arch/ia64/pci/fixup.c +2 -4
index e1fa45b2148c..acb55a41260d 100644
@@ -8,8 +8,7 @@
 #include <linux/init.h>
 #include <linux/vgaarb.h>
 #include <linux/screen_info.h>
-
-#include <asm/machvec.h>
+#include <asm/uv/uv.h>
 
 /*
  * Fixup to mark boot BIOS video selected by BIOS before it changes
@@ -35,8 +34,7 @@ static void pci_fixup_video(struct pci_dev *pdev)
 	u16 config;
 	struct resource *res;
 
-	if ((strcmp(ia64_platform_name, "dig") != 0)
-	    && (strcmp(ia64_platform_name, "hpzx1")  != 0))
+	if (is_uv_system())
 		return;
 	/* Maybe, this machine supports legacy memory map. */
 
arch/ia64/pci/pci.c +0 -1
index 89c9f36dc94d..211757e34198 100644
@@ -24,7 +24,6 @@
 #include <linux/memblock.h>
 #include <linux/export.h>
 
-#include <asm/machvec.h>
 #include <asm/page.h>
 #include <asm/io.h>
 #include <asm/sal.h>
arch/ia64/uv/kernel/Makefile +0 -1
index 124e441d383d..297196578d19 100644
@@ -10,4 +10,3 @@
 ccflags-y := -Iarch/ia64/sn/include
 
 obj-y				+= setup.o
-obj-$(CONFIG_IA64_GENERIC)      += machvec.o
arch/ia64/uv/kernel/machvec.c deleted +0 -11
deleted file mode 100644
index 50737a9dca74..000000000000
@@ -1,11 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
- */
-
-#define MACHVEC_PLATFORM_NAME	uv
-#define MACHVEC_PLATFORM_HEADER	<asm/machvec_uv.h>
-#include <asm/machvec_init.h>
arch/ia64/uv/kernel/setup.c +34 -0
index b081f5138f5c..bb025486d791 100644
@@ -8,11 +8,17 @@
  * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved.
  */
 
+#include <linux/acpi.h>
+#include <linux/efi.h>
 #include <linux/module.h>
 #include <linux/percpu.h>
+#include <asm/uv/uv.h>
 #include <asm/uv/uv_mmrs.h>
 #include <asm/uv/uv_hub.h>
 
+bool ia64_is_uv;
+EXPORT_SYMBOL_GPL(ia64_is_uv);
+
 DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
 EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
 
@@ -47,6 +53,34 @@ static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size)
 	BUG();
 }
 
+void __init uv_probe_system_type(void)
+{
+	struct acpi_table_rsdp *rsdp;
+	struct acpi_table_xsdt *xsdt;
+
+	if (efi.acpi20 = EFI_INVALID_TABLE_ADDR) {
+		pr_err("ACPI 2.0 RSDP not found.\n");
+		return;
+	}
+
+	rsdp = (struct acpi_table_rsdp *)__va(efi.acpi20);
+	if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) {
+		pr_err("ACPI 2.0 RSDP signature incorrect.\n");
+		return;
+	}
+
+	xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_physical_address);
+	if (strncmp(xsdt->header.signature, ACPI_SIG_XSDT,
+			sizeof(ACPI_SIG_XSDT) - 1)) {
+		pr_err("ACPI 2.0 XSDT signature incorrect.\n");
+		return;
+	}
+
+	if (!strcmp(xsdt->header.oem_id, "SGI") &&
+	    !strcmp(xsdt->header.oem_table_id + 4, "UV"))
+		ia64_is_uv = true;
+}
+
 void __init uv_setup(char **cmdline_p)
 {
 	union uvh_si_addr_map_config_u m_n_config;
drivers/acpi/Kconfig +1 -1
index 06a16dc5cfb5..ebe1e9e5fd81 100644
@@ -323,7 +323,7 @@ config ACPI_NUMA
 	bool "NUMA support"
 	depends on NUMA
 	depends on (X86 || IA64 || ARM64)
-	default y if IA64_GENERIC || ARM64
+	default y if IA64 || ARM64
 
 config ACPI_CUSTOM_DSDT_FILE
 	string "Custom DSDT Table file to include"
drivers/char/agp/Kconfig +2 -2
index 42d45e97c2ae..812d6aa6e013 100644
@@ -111,14 +111,14 @@ config AGP_VIA
 
 config AGP_I460
 	tristate "Intel 460GX chipset support"
-	depends on AGP && (IA64_DIG || IA64_GENERIC)
+	depends on AGP && IA64
 	help
 	  This option gives you AGP GART support for the Intel 460GX chipset
 	  for IA64 processors.
 
 config AGP_HP_ZX1
 	tristate "HP ZX1 chipset AGP support"
-	depends on AGP && (IA64_HP_ZX1 || IA64_GENERIC)
+	depends on AGP && IA64
 	help
 	  This option gives you AGP GART support for the HP ZX1 chipset
 	  for IA64 processors.
drivers/iommu/Kconfig +1 -1
index e15cdcd8cb3c..9a618459d067 100644
@@ -177,7 +177,7 @@ config DMAR_TABLE
 
 config INTEL_IOMMU
 	bool "Support for Intel IOMMU using DMA Remapping Devices"
-	depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
+	depends on PCI_MSI && ACPI && (X86 || IA64)
 	select IOMMU_API
 	select IOMMU_IOVA
 	select NEED_DMA_MAP_STATE
drivers/misc/Kconfig +1 -1
index 423d2d26d8f7..4ef2b751410c 100644
@@ -188,7 +188,7 @@ config ENCLOSURE_SERVICES
 config SGI_XP
 	tristate "Support communication between SGI SSIs"
 	depends on NET
-	depends on (IA64_GENERIC || IA64_SGI_UV || X86_UV) && SMP
+	depends on (IA64_SGI_UV || X86_UV) && SMP
 	depends on X86_64 || BROKEN
 	select SGI_GRU if X86_64 && SMP
 	---help---
drivers/misc/sgi-xp/xp_uv.c +3 -3
index 5e335e93459c..c4a50baa16c2 100644
@@ -17,7 +17,7 @@
 #include <asm/uv/uv_hub.h>
 #if defined CONFIG_X86_64
 #include <asm/uv/bios.h>
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined CONFIG_IA64_SGI_UV
 #include <asm/sn/sn_sal.h>
 #endif
 #include "../sgi-gru/grukservices.h"
@@ -99,7 +99,7 @@ xp_expand_memprotect_uv(unsigned long phys_addr, unsigned long size)
 		return xpBiosError;
 	}
 
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined defined CONFIG_IA64_SGI_UV
 	u64 nasid_array;
 
 	ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_1,
@@ -129,7 +129,7 @@ xp_restrict_memprotect_uv(unsigned long phys_addr, unsigned long size)
 		return xpBiosError;
 	}
 
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined CONFIG_IA64_SGI_UV
 	u64 nasid_array;
 
 	ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_0,
drivers/misc/sgi-xp/xpc_uv.c +7 -7
index d8a6fe16e4f5..54115415d88e 100644
@@ -27,7 +27,7 @@
 #if defined CONFIG_X86_64
 #include <asm/uv/bios.h>
 #include <asm/uv/uv_irq.h>
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined defined CONFIG_IA64_SGI_UV
 #include <asm/sn/intr.h>
 #include <asm/sn/sn_sal.h>
 #endif
@@ -35,7 +35,7 @@
 #include "../sgi-gru/grukservices.h"
 #include "xpc.h"
 
-#if defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#if defined CONFIG_IA64_SGI_UV
 struct uv_IO_APIC_route_entry {
 	__u64	vector		:  8,
 		delivery_mode	:  3,
@@ -121,7 +121,7 @@ xpc_get_gru_mq_irq_uv(struct xpc_gru_mq_uv *mq, int cpu, char *irq_name)
 
 	mq->mmr_value = uv_read_global_mmr64(mmr_pnode, mq->mmr_offset);
 
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined defined CONFIG_IA64_SGI_UV
 	if (strcmp(irq_name, XPC_ACTIVATE_IRQ_NAME) = 0)
 		mq->irq = SGI_XPC_ACTIVATE;
 	else if (strcmp(irq_name, XPC_NOTIFY_IRQ_NAME) = 0)
@@ -144,7 +144,7 @@ xpc_release_gru_mq_irq_uv(struct xpc_gru_mq_uv *mq)
 #if defined CONFIG_X86_64
 	uv_teardown_irq(mq->irq);
 
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined defined CONFIG_IA64_SGI_UV
 	int mmr_pnode;
 	unsigned long mmr_value;
 
@@ -162,7 +162,7 @@ xpc_gru_mq_watchlist_alloc_uv(struct xpc_gru_mq_uv *mq)
 {
 	int ret;
 
-#if defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#if defined defined CONFIG_IA64_SGI_UV
 	int mmr_pnode = uv_blade_to_pnode(mq->mmr_blade);
 
 	ret = sn_mq_watchlist_alloc(mmr_pnode, (void *)uv_gpa(mq->address),
@@ -197,7 +197,7 @@ xpc_gru_mq_watchlist_free_uv(struct xpc_gru_mq_uv *mq)
 #if defined CONFIG_X86_64
 	ret = uv_bios_mq_watchlist_free(mmr_pnode, mq->watchlist_num);
 	BUG_ON(ret != BIOS_STATUS_SUCCESS);
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined CONFIG_IA64_SGI_UV
 	ret = sn_mq_watchlist_free(mmr_pnode, mq->watchlist_num);
 	BUG_ON(ret != SALRET_OK);
 #else
@@ -796,7 +796,7 @@ xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa,
 	else
 		ret = xpBiosError;
 
-#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#elif defined defined CONFIG_IA64_SGI_UV
 	status = sn_partition_reserved_page_pa((u64)buf, cookie, rp_pa, len);
 	if (status = SALRET_OK)
 		ret = xpSuccess;
Signature · 1 line
2.20.1
#29 lore raw

PATCH 27/28 ia64: remove CONFIG_SWIOTLB ifdefs

In reply to Christoph Hellwig

CONFIG_SWIOTLB is now unconditionally selected on ia64, so remove the ifdefs.

---
 arch/ia64/kernel/dma-mapping.c | 2 --
 arch/ia64/mm/init.c            | 2 --
 2 files changed, 4 deletions(-)
arch/ia64/kernel/dma-mapping.c +0 -2
index 53aaa8597920..4a3262795890 100644
@@ -8,7 +8,6 @@ int iommu_detected __read_mostly;
 const struct dma_map_ops *dma_ops;
 EXPORT_SYMBOL(dma_ops);
 
-#ifdef CONFIG_SWIOTLB
 void *arch_dma_alloc(struct device *dev, size_t size,
 		dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs)
 {
@@ -26,4 +25,3 @@ long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr,
 {
 	return page_to_pfn(virt_to_page(cpu_addr));
 }
-#endif
arch/ia64/mm/init.c +0 -2
index 1979cdb61d7c..678b98a09c85 100644
@@ -68,7 +68,6 @@ __ia64_sync_icache_dcache (pte_t pte)
 	set_bit(PG_arch_1, &page->flags);	/* mark page as clean */
 }
 
-#ifdef CONFIG_SWIOTLB
 /*
  * Since DMA is i-cache coherent, any (complete) pages that were written via
  * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to
@@ -83,7 +82,6 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
 		set_bit(PG_arch_1, &pfn_to_page(pfn)->flags);
 	} while (++pfn <= PHYS_PFN(paddr + size - 1));
 }
-#endif
 
 inline void
 ia64_set_rbs_bot (void)
Signature · 1 line
2.20.1
#30 lore raw

PATCH 28/28 genirq: remove the is_affinity_mask_valid hook

In reply to Christoph Hellwig

This override was only used by the ia64 SGI SN2 platform, which is gone now.

---
 kernel/irq/proc.c | 14 --------------
 1 file changed, 14 deletions(-)
kernel/irq/proc.c +0 -14
index da9addb8d655..cfc4f088a0e7 100644
@@ -100,10 +100,6 @@ static int irq_affinity_hint_proc_show(struct seq_file *m, void *v)
 	return 0;
 }
 
-#ifndef is_affinity_mask_valid
-#define is_affinity_mask_valid(val) 1
-#endif
-
 int no_irq_affinity;
 static int irq_affinity_proc_show(struct seq_file *m, void *v)
 {
@@ -136,11 +132,6 @@ static ssize_t write_irq_affinity(int type, struct file *file,
 	if (err)
 		goto free_cpumask;
 
-	if (!is_affinity_mask_valid(new_value)) {
-		err = -EINVAL;
-		goto free_cpumask;
-	}
-
 	/*
 	 * Do not allow disabling IRQs completely - it's a too easy
 	 * way to make the system unusable accidentally :-) At least
@@ -232,11 +223,6 @@ static ssize_t default_affinity_write(struct file *file,
 	if (err)
 		goto out;
 
-	if (!is_affinity_mask_valid(new_value)) {
-		err = -EINVAL;
-		goto out;
-	}
-
 	/*
 	 * Do not allow disabling IRQs completely - it's a too easy
 	 * way to make the system unusable accidentally :-) At least
Signature · 1 line
2.20.1