phase out CONFIG_VIRT_TO_BUS
Subsystems (19)
cover phase out CONFIG_VIRT_TO_BUS
From: Arnd Bergmann <[email protected]>
The virt_to_bus/bus_to_virt interface has been deprecated for decades. After Jakub Kicinski put a lot of work into cleaning out the network drivers using them, there are only a couple of other drivers left, which can all be removed or otherwise cleaned up, to remove the old interface for good.
Any out of tree drivers using virt_to_bus() should be converted to using the dma-mapping interfaces, typically dma_alloc_coherent() or dma_map_single()).
There are a few m68k and ppc32 specific drivers that keep using the interfaces, but these are all guarded with architecture-specific Kconfig dependencies, and are not actually broken.
There are still a number of drivers that are using virt_to_phys() and phys_to_virt() in place of dma-mapping operations, and these are often broken, but they are out of scope for this series.
Arnd
Arnd Bergmann (6):
vme: remove ca91cx42 Universe-II support
vme: move back to staging
media: sta2x11: remove VIRT_TO_BUS dependency
scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency
scsi: remove stale BusLogic driver arch/*/: remove CONFIG_VIRT_TO_BUS
.../core-api/bus-virt-phys-mapping.rst | 220 -
Documentation/core-api/dma-api-howto.rst | 14 -
Documentation/core-api/index.rst | 1 -
Documentation/driver-api/vme.rst | 4 +-
Documentation/scsi/BusLogic.rst | 581 --
Documentation/scsi/FlashPoint.rst | 176 -
.../translations/zh_CN/core-api/index.rst | 1 -
MAINTAINERS | 11 +-
arch/alpha/Kconfig | 1 -
arch/alpha/include/asm/floppy.h | 2 +-
arch/alpha/include/asm/io.h | 8 +-
arch/ia64/Kconfig | 1 -
arch/ia64/include/asm/io.h | 8 -
arch/m68k/Kconfig | 1 -
arch/m68k/include/asm/virtconvert.h | 4 +-
arch/microblaze/Kconfig | 1 -
arch/microblaze/include/asm/io.h | 2 -
arch/mips/Kconfig | 1 -
arch/mips/include/asm/io.h | 9 -
arch/parisc/Kconfig | 1 -
arch/parisc/include/asm/floppy.h | 4 +-
arch/parisc/include/asm/io.h | 2 -
arch/powerpc/Kconfig | 1 -
arch/powerpc/include/asm/io.h | 2 -
arch/riscv/include/asm/page.h | 1 -
arch/x86/Kconfig | 1 -
arch/x86/include/asm/io.h | 9 -
arch/xtensa/Kconfig | 1 -
arch/xtensa/include/asm/io.h | 3 -
drivers/Kconfig | 2 -
drivers/Makefile | 1 -
drivers/media/pci/sta2x11/Kconfig | 2 +-
drivers/scsi/BusLogic.c | 3727 --------
drivers/scsi/BusLogic.h | 1284 ---
drivers/scsi/FlashPoint.c | 7560 -----------------
drivers/scsi/Kconfig | 26 +-
drivers/scsi/dpt_i2o.c | 4 +-
drivers/staging/vme_user/Kconfig | 27 +
drivers/staging/vme_user/Makefile | 3 +
drivers/{vme => staging/vme_user}/vme.c | 2 +-
.../linux => drivers/staging/vme_user}/vme.h | 0
.../{vme => staging/vme_user}/vme_bridge.h | 2 +-
.../bridges => staging/vme_user}/vme_fake.c | 4 +-
.../bridges => staging/vme_user}/vme_tsi148.c | 4 +-
.../bridges => staging/vme_user}/vme_tsi148.h | 0
drivers/staging/vme_user/vme_user.c | 2 +-
drivers/vme/Kconfig | 18 -
drivers/vme/Makefile | 8 -
drivers/vme/boards/Kconfig | 10 -
drivers/vme/boards/Makefile | 6 -
drivers/vme/boards/vme_vmivme7805.c | 106 -
drivers/vme/boards/vme_vmivme7805.h | 33 -
drivers/vme/bridges/Kconfig | 24 -
drivers/vme/bridges/Makefile | 4 -
drivers/vme/bridges/vme_ca91cx42.c | 1928 -----
drivers/vme/bridges/vme_ca91cx42.h | 579 --
include/asm-generic/io.h | 14 -
mm/Kconfig | 8 -
58 files changed, 54 insertions(+), 16405 deletions(-)
delete mode 100644 Documentation/core-api/bus-virt-phys-mapping.rst
delete mode 100644 Documentation/scsi/BusLogic.rst
delete mode 100644 Documentation/scsi/FlashPoint.rst
delete mode 100644 drivers/scsi/BusLogic.c
delete mode 100644 drivers/scsi/BusLogic.h
delete mode 100644 drivers/scsi/FlashPoint.c
rename drivers/{vme => staging/vme_user}/vme.c (99%)
rename {include/linux => drivers/staging/vme_user}/vme.h (100%)
rename drivers/{vme => staging/vme_user}/vme_bridge.h (99%)
rename drivers/{vme/bridges => staging/vme_user}/vme_fake.c (99%)
rename drivers/{vme/bridges => staging/vme_user}/vme_tsi148.c (99%)
rename drivers/{vme/bridges => staging/vme_user}/vme_tsi148.h (100%)
delete mode 100644 drivers/vme/Kconfig
delete mode 100644 drivers/vme/Makefile
delete mode 100644 drivers/vme/boards/Kconfig
delete mode 100644 drivers/vme/boards/Makefile
delete mode 100644 drivers/vme/boards/vme_vmivme7805.c
delete mode 100644 drivers/vme/boards/vme_vmivme7805.h
delete mode 100644 drivers/vme/bridges/Kconfig
delete mode 100644 drivers/vme/bridges/Makefile
delete mode 100644 drivers/vme/bridges/vme_ca91cx42.c
delete mode 100644 drivers/vme/bridges/vme_ca91cx42.hSignature · 1 line
2.29.2
A message that is not in the archive (sent off-list or not yet received): 20220606084109.4108188-1-arnd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
PATCH 1/6 vme: remove ca91cx42 Universe-II support
From: Arnd Bergmann <[email protected]>
This is one of four remaining drivers using the ancient virt_to_bus() interface instead of the dma-mapping interface, making it incompatible with most modern machines.
As nobody has cleaned this up, there is a high chance that this driver has no actual users. The chip was introduced in 1997 and only supports 32-bit legacy PCI. It was replaced by TSI148 in 2004, but that chip has since been discontinued, while a version of the older Universe II remains in production after 25 years.
The vme_vmivme7805 board uses Universe-II, so this also gets removed in the process, but PCI add-on cards based on TSI148 can still work in theory.
If there are users of the Universe-II driver after all, it is of course possible to revert this patch and fix it to use the dma-mapping interface like the tsi148 driver does.
--- drivers/vme/Kconfig | 2 - drivers/vme/Makefile | 1 - drivers/vme/boards/Kconfig | 10 - drivers/vme/boards/Makefile | 6 - drivers/vme/boards/vme_vmivme7805.c | 106 -- drivers/vme/boards/vme_vmivme7805.h | 33 - drivers/vme/bridges/Kconfig | 7 - drivers/vme/bridges/Makefile | 1 - drivers/vme/bridges/vme_ca91cx42.c | 1928 --------------------------- drivers/vme/bridges/vme_ca91cx42.h | 579 -------- 10 files changed, 2673 deletions(-) delete mode 100644 drivers/vme/boards/Kconfig delete mode 100644 drivers/vme/boards/Makefile delete mode 100644 drivers/vme/boards/vme_vmivme7805.c delete mode 100644 drivers/vme/boards/vme_vmivme7805.h delete mode 100644 drivers/vme/bridges/vme_ca91cx42.c delete mode 100644 drivers/vme/bridges/vme_ca91cx42.h
drivers/vme/Kconfig +0 -2
@@ -13,6 +13,4 @@ if VME_BUS source "drivers/vme/bridges/Kconfig" -source "drivers/vme/boards/Kconfig" - endif # VME
drivers/vme/Makefile +0 -1
@@ -5,4 +5,3 @@ obj-$(CONFIG_VME_BUS) += vme.o obj-y += bridges/ -obj-y += boards/
drivers/vme/boards/Kconfig deleted +0 -10
@@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -comment "VME Board Drivers" - -config VMIVME_7805 - tristate "VMIVME-7805" - help - If you say Y here you get support for the VMIVME-7805 board. - This board has an additional control interface to the Universe II - chip. This driver has to be included if you want to access VME bus - with VMIVME-7805 board.
drivers/vme/boards/Makefile deleted +0 -6
@@ -1,6 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Makefile for the VME board drivers. -# - -obj-$(CONFIG_VMIVME_7805) += vme_vmivme7805.o
drivers/vme/boards/vme_vmivme7805.c deleted +0 -106
106 lines not on this page · raw message
drivers/vme/boards/vme_vmivme7805.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* -* vmivme_7805.h -* -* Support for the VMIVME-7805 board access to the Universe II bridge. -* -* Author: Arthur Benilov <[email protected]> -* Copyright 2010 Ion Beam Application, Inc. -*/ - - -#ifndef _VMIVME_7805_H -#define _VMIVME_7805_H - -#ifndef PCI_VENDOR_ID_VMIC -#define PCI_VENDOR_ID_VMIC 0x114A -#endif - -#ifndef PCI_DEVICE_ID_VTIMR -#define PCI_DEVICE_ID_VTIMR 0x0004 -#endif - -#define VME_CONTROL 0x0000 -#define BM_VME_CONTROL_MASTER_ENDIAN 0x0001 -#define BM_VME_CONTROL_SLAVE_ENDIAN 0x0002 -#define BM_VME_CONTROL_ABLE 0x0004 -#define BM_VME_CONTROL_BERRI 0x0040 -#define BM_VME_CONTROL_BERRST 0x0080 -#define BM_VME_CONTROL_BPENA 0x0400 -#define BM_VME_CONTROL_VBENA 0x0800 - -#endif /* _VMIVME_7805_H */ -
drivers/vme/bridges/Kconfig +0 -7
@@ -1,13 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only comment "VME Bridge Drivers" -config VME_CA91CX42 - tristate "Universe II" - depends on VIRT_TO_BUS - help - If you say Y here you get support for the Tundra CA91C142 - (Universe II) VME bridge chip. - config VME_TSI148 tristate "Tempe" depends on HAS_DMA
drivers/vme/bridges/Makefile +0 -1
@@ -1,4 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_VME_CA91CX42) += vme_ca91cx42.o obj-$(CONFIG_VME_TSI148) += vme_tsi148.o obj-$(CONFIG_VME_FAKE) += vme_fake.o
drivers/vme/bridges/vme_ca91cx42.c deleted +0 -1928
1,928 lines not on this page · raw message
drivers/vme/bridges/vme_ca91cx42.h deleted +0 -579
579 lines not on this page · raw message
Signature · 1 line
2.29.2
PATCH 2/6 vme: move back to staging
In reply to a message not in the archiveFrom: Arnd Bergmann <[email protected]>
The VME subsystem graduated from staging into a top-level subsystem in 2012, with commit db3b9e990e75 ("Staging: VME: move VME drivers out of staging") stating:
The VME device drivers have not moved out yet due to some API questions they are still working through, that should happen soon, hopefully.
However, this never happened: maintenance of drivers/vme effectively stopped in 2017, with all subsequent changes being treewide cleanups. No hardware driver remains in staging, only the limited user-level access, and I just removed one of the two bridge drivers and the only remaining board.
drivers/staging/vme/devices/ was recently moved to drivers/staging/vme_user/, but as the vme_user driver is the only one remaining for this subsystem, it is easier to just move the remaining three source files into this directory rather than keeping the original hierarchy.
---
Documentation/driver-api/vme.rst | 4 +--
MAINTAINERS | 4 +--
drivers/Kconfig | 2 --
drivers/Makefile | 1 -
drivers/staging/vme_user/Kconfig | 27 +++++++++++++++++++
drivers/staging/vme_user/Makefile | 3 +++
drivers/{vme => staging/vme_user}/vme.c | 2 +-
.../linux => drivers/staging/vme_user}/vme.h | 0
.../{vme => staging/vme_user}/vme_bridge.h | 2 +-
.../bridges => staging/vme_user}/vme_fake.c | 4 +--
.../bridges => staging/vme_user}/vme_tsi148.c | 4 +--
.../bridges => staging/vme_user}/vme_tsi148.h | 0
drivers/staging/vme_user/vme_user.c | 2 +-
drivers/vme/Kconfig | 16 -----------
drivers/vme/Makefile | 7 -----
drivers/vme/bridges/Kconfig | 17 ------------
drivers/vme/bridges/Makefile | 3 ---
17 files changed, 40 insertions(+), 58 deletions(-)
rename drivers/{vme => staging/vme_user}/vme.c (99%)
rename {include/linux => drivers/staging/vme_user}/vme.h (100%)
rename drivers/{vme => staging/vme_user}/vme_bridge.h (99%)
rename drivers/{vme/bridges => staging/vme_user}/vme_fake.c (99%)
rename drivers/{vme/bridges => staging/vme_user}/vme_tsi148.c (99%)
rename drivers/{vme/bridges => staging/vme_user}/vme_tsi148.h (100%)
delete mode 100644 drivers/vme/Kconfig
delete mode 100644 drivers/vme/Makefile
delete mode 100644 drivers/vme/bridges/Kconfig
delete mode 100644 drivers/vme/bridges/MakefileDocumentation/driver-api/vme.rst +2 -2
@@ -290,8 +290,8 @@ The function :c:func:`vme_bus_num` returns the bus ID of the provided bridge. VME API ------- -.. kernel-doc:: include/linux/vme.h +.. kernel-doc:: drivers/staging/vme_user/vme.h :internal: -.. kernel-doc:: drivers/vme/vme.c +.. kernel-doc:: drivers/staging/vme_user/vme.c :export:
MAINTAINERS +1 -3
@@ -21229,12 +21229,10 @@ M: Martyn Welch <[email protected]> M: Manohar Vanga <[email protected]> M: Greg Kroah-Hartman <[email protected]> L: [email protected] -S: Maintained +S: Odd fixes T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git F: Documentation/driver-api/vme.rst F: drivers/staging/vme_user/ -F: drivers/vme/ -F: include/linux/vme* VM SOCKETS (AF_VSOCK) M: Stefano Garzarella <[email protected]>
drivers/Kconfig +0 -2
@@ -183,8 +183,6 @@ source "drivers/iio/Kconfig" source "drivers/ntb/Kconfig" -source "drivers/vme/Kconfig" - source "drivers/pwm/Kconfig" source "drivers/irqchip/Kconfig"
drivers/Makefile +0 -1
@@ -165,7 +165,6 @@ obj-$(CONFIG_PM_DEVFREQ) += devfreq/ obj-$(CONFIG_EXTCON) += extcon/ obj-$(CONFIG_MEMORY) += memory/ obj-$(CONFIG_IIO) += iio/ -obj-$(CONFIG_VME_BUS) += vme/ obj-$(CONFIG_IPACK_BUS) += ipack/ obj-$(CONFIG_NTB) += ntb/ obj-$(CONFIG_POWERCAP) += powercap/
drivers/staging/vme_user/Kconfig +27 -0
@@ -1,4 +1,29 @@ # SPDX-License-Identifier: GPL-2.0 +menuconfig VME_BUS + bool "VME bridge support" + depends on STAGING && PCI + help + If you say Y here you get support for the VME bridge Framework. + +if VME_BUS + +comment "VME Bridge Drivers" + +config VME_TSI148 + tristate "Tempe" + depends on HAS_DMA + help + If you say Y here you get support for the Tundra TSI148 VME bridge + chip. + +config VME_FAKE + tristate "Fake" + help + If you say Y here you get support for the fake VME bridge. This + provides a virtualised VME Bus for devices with no VME bridge. This + is mainly useful for VME development (in the absence of VME + hardware). + comment "VME Device Drivers" config VME_USER
@@ -11,3 +36,5 @@ config VME_USER To compile this driver as a module, choose M here. The module will be called vme_user. If unsure, say N. + +endif
drivers/staging/vme_user/Makefile +3 -0
@@ -3,4 +3,7 @@ # Makefile for the VME device drivers. # +obj-$(CONFIG_VME_BUS) += vme.o obj-$(CONFIG_VME_USER) += vme_user.o +obj-$(CONFIG_VME_TSI148) += vme_tsi148.o +obj-$(CONFIG_VME_FAKE) += vme_fake.o
drivers/staging/vme_user/vme.c renamed from drivers/vme/vme.c +1 -1
@@ -26,8 +26,8 @@#include <linux/mutex.h> #include <linux/spinlock.h> #include <linux/slab.h> -#include <linux/vme.h> +#include "vme.h" #include "vme_bridge.h" /* Bitmask and list of registered buses both protected by common mutex */
drivers/staging/vme_user/vme.h renamed from include/linux/vme.h +0 -0
drivers/staging/vme_user/vme_bridge.h renamed from drivers/vme/vme_bridge.h +1 -1
@@ -2,7 +2,7 @@#ifndef _VME_BRIDGE_H_#define _VME_BRIDGE_H_ -#include <linux/vme.h> +#include "vme.h" #define VME_CRCSR_BUF_SIZE (508*1024)/*
drivers/staging/vme_user/vme_fake.c renamed from drivers/vme/bridges/vme_fake.c +2 -2
@@ -29,9 +29,9 @@#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/types.h> -#include <linux/vme.h> -#include "../vme_bridge.h" +#include "vme.h" +#include "vme_bridge.h" /* * Define the number of each that the fake driver supports.
drivers/staging/vme_user/vme_tsi148.c renamed from drivers/vme/bridges/vme_tsi148.c +2 -2
@@ -26,9 +26,9 @@#include <linux/io.h> #include <linux/uaccess.h> #include <linux/byteorder/generic.h> -#include <linux/vme.h> -#include "../vme_bridge.h" +#include "vme.h" +#include "vme_bridge.h" #include "vme_tsi148.h" static int tsi148_probe (struct pci_dev *,const struct pci_device_id *);
drivers/staging/vme_user/vme_tsi148.h renamed from drivers/vme/bridges/vme_tsi148.h +0 -0
drivers/staging/vme_user/vme_user.c +1 -1
@@ -33,8 +33,8 @@#include <linux/io.h> #include <linux/uaccess.h> -#include <linux/vme.h> +#include "vme.h" #include "vme_user.h" static const char driver_name[] ="vme_user" ;
drivers/vme/Kconfig deleted +0 -16
@@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# VME configuration. -# - -menuconfig VME_BUS - bool "VME bridge support" - depends on PCI - help - If you say Y here you get support for the VME bridge Framework. - -if VME_BUS - -source "drivers/vme/bridges/Kconfig" - -endif # VME
drivers/vme/Makefile deleted +0 -7
@@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Makefile for the VME bridge device drivers. -# -obj-$(CONFIG_VME_BUS) += vme.o - -obj-y += bridges/
drivers/vme/bridges/Kconfig deleted +0 -17
@@ -1,17 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -comment "VME Bridge Drivers" - -config VME_TSI148 - tristate "Tempe" - depends on HAS_DMA - help - If you say Y here you get support for the Tundra TSI148 VME bridge - chip. - -config VME_FAKE - tristate "Fake" - help - If you say Y here you get support for the fake VME bridge. This - provides a virtualised VME Bus for devices with no VME bridge. This - is mainly useful for VME development (in the absence of VME - hardware).
drivers/vme/bridges/Makefile deleted +0 -3
@@ -1,3 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_VME_TSI148) += vme_tsi148.o -obj-$(CONFIG_VME_FAKE) += vme_fake.o
Signature · 1 line
2.29.2
PATCH 3/6 media: sta2x11: remove VIRT_TO_BUS dependency
In reply to a message not in the archiveFrom: Arnd Bergmann <[email protected]>
This driver does not use the virt_to_bus() function, though it depends on x86 specific fixups in the swiotlb code, which was last rewritten in commit e380a0394c36 ("x86/PCI: sta2x11: use default DMA address translation").
It is possible that the driver still fails to build on some architectures that are missing CONFIG_VIRT_TO_BUS, but it is always set on x86 machines with the STA2X11 platform enabled.
More likely though is that it was never meant to depend on CONFIG_VIRT_TO_BUS, and the Kconfig dependency was kept from an out-of-tree version when the driver was originally merged.
--- drivers/media/pci/sta2x11/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/sta2x11/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config STA2X11_VIP tristate "STA2X11 VIP Video For Linux" - depends on PCI && VIDEO_DEV && VIRT_TO_BUS && I2C + depends on PCI && VIDEO_DEV && I2C depends on STA2X11 || COMPILE_TEST select GPIOLIB if MEDIA_SUBDRV_AUTOSELECT select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT
Signature · 1 line
2.29.2
PATCH 4/6 scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency
In reply to a message not in the archiveFrom: Arnd Bergmann <[email protected]>
The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008 but it a stale reference in a broken error handling code path that could never work.
Fix it up to build without VIRT_TO_BUS and remove the Kconfig dependency.
The alternative to this would be to just remove the driver, as it is clearly obsolete. The i2o driver layer was removed in 2015 with commit 4a72a7af462d ("staging: remove i2o subsystem"), but the even older dpt_i2o scsi driver stayed around.
The last non-cleanup patches I could find were from Miquel van Smoorenburg and Mark Salyzyn back in 2008, they might know if there is any chance of the hardware still being used anywhere.
--- drivers/scsi/Kconfig | 2 +- drivers/scsi/dpt_i2o.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/Kconfig +1 -1
@@ -460,7 +460,7 @@ config SCSI_MVUMI config SCSI_DPT_I2O tristate "Adaptec I2O RAID support " - depends on SCSI && PCI && VIRT_TO_BUS + depends on SCSI && PCI help This driver supports all of Adaptec's I2O based RAID controllers as well as the DPT SmartRaid V cards. This is an Adaptec maintained
drivers/scsi/dpt_i2o.c +2 -2
@@ -52,11 +52,11 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver");#include <linux/timer.h> #include <linux/string.h> +#include <linux/io.h> #include <linux/ioport.h> #include <linux/mutex.h> #include <asm/processor.h> /* for boot_cpu_data */ -#include <asm/io.h> /* for virt_to_bus, etc. */ #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h>
@@ -2112,7 +2112,7 @@ static irqreturn_t adpt_isr(int irq, void *dev_id) }else {/* Ick, we should *never* be here */ printk (KERN_ERR "dpti: reply frame not from pool\n" ); - reply = (u8 *)bus_to_virt (m); + goto out; }if (readl (reply) &MSG_FAIL ) {
Signature · 1 line
2.29.2
PATCH 5/6 scsi: remove stale BusLogic driver
In reply to a message not in the archiveFrom: Arnd Bergmann <[email protected]>
The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support.
Before commit 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit."), the driver had a dependency on x86-32, presumably because of this problem. However, the change introduced another bug that made it still impossible to use the driver on any 64-bit machine.
This was in turn fixed in commit 56f396146af2 ("scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic"), 8 years later.
The fact that this was found at all is an indication that there are users, and it seems that Maciej, Matt and Khalid all have access to this hardware, but if it took eight years to find the problem, it's likely that nobody actually relies on it.
Remove it as part of the global virt_to_bus()/bus_to_virt() removal. If anyone is still interested in keeping this driver, the alternative is to stop it from using bus_to_virt(), possibly along the lines of how dpt_i2o gets around the same issue.
--- Documentation/scsi/BusLogic.rst | 581 --- Documentation/scsi/FlashPoint.rst | 176 - MAINTAINERS | 7 - drivers/scsi/BusLogic.c | 3727 -------------- drivers/scsi/BusLogic.h | 1284 ----- drivers/scsi/FlashPoint.c | 7560 ----------------------------- drivers/scsi/Kconfig | 24 - 7 files changed, 13359 deletions(-) delete mode 100644 Documentation/scsi/BusLogic.rst delete mode 100644 Documentation/scsi/FlashPoint.rst delete mode 100644 drivers/scsi/BusLogic.c delete mode 100644 drivers/scsi/BusLogic.h delete mode 100644 drivers/scsi/FlashPoint.c
Documentation/scsi/BusLogic.rst deleted +0 -581
@@ -1,581 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 - -========================================================= -BusLogic MultiMaster and FlashPoint SCSI Driver for Linux -========================================================= - - Version 2.0.15 for Linux 2.0 - - Version 2.1.15 for Linux 2.1 - - PRODUCTION RELEASE - - 17 August 1998 - - Leonard N. Zubkoff - - Dandelion Digital - - [email protected] - - Copyright 1995-1998 by Leonard N. Zubkoff <[email protected]> - - -Introduction -============ - -BusLogic, Inc. designed and manufactured a variety of high performance SCSI -host adapters which share a common programming interface across a diverse -collection of bus architectures by virtue of their MultiMaster ASIC technology. -BusLogic was acquired by Mylex Corporation in February 1996, but the products -supported by this driver originated under the BusLogic name and so that name is -retained in the source code and documentation. - -This driver supports all present BusLogic MultiMaster Host Adapters, and should -support any future MultiMaster designs with little or no modification. More -recently, BusLogic introduced the FlashPoint Host Adapters, which are less -costly and rely on the host CPU, rather than including an onboard processor. -Despite not having an onboard CPU, the FlashPoint Host Adapters perform very -well and have very low command latency. BusLogic has recently provided me with -the FlashPoint Driver Developer's Kit, which comprises documentation and freely -redistributable source code for the FlashPoint SCCB Manager. The SCCB Manager -is the library of code that runs on the host CPU and performs functions -analogous to the firmware on the MultiMaster Host Adapters. Thanks to their -having provided the SCCB Manager, this driver now supports the FlashPoint Host -Adapters as well. - -My primary goals in writing this completely new BusLogic driver for Linux are -to achieve the full performance that BusLogic SCSI Host Adapters and modern -SCSI peripherals are capable of, and to provide a highly robust driver that can -be depended upon for high performance mission critical applications. All of -the major performance features can be configured from the Linux kernel command -line or at module initialization time, allowing individual installations to -tune driver performance and error recovery to their particular needs. - -The latest information on Linux support for BusLogic SCSI Host Adapters, as -well as the most recent release of this driver and the latest firmware for the -BT-948/958/958D, will always be available from my Linux Home Page at URL -"http://sourceforge.net/projects/dandelion/". - -Bug reports should be sent via electronic mail to "[email protected]". Please -include with the bug report the complete configuration messages reported by the -driver and SCSI subsystem at startup, along with any subsequent system messages -relevant to SCSI operations, and a detailed description of your system's -hardware configuration. - -Mylex has been an excellent company to work with and I highly recommend their -products to the Linux community. In November 1995, I was offered the -opportunity to become a beta test site for their latest MultiMaster product, -the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI Wide -Ultra SCSI Host Adapter in January 1996. This was mutually beneficial since -Mylex received a degree and kind of testing that their own testing group cannot -readily achieve, and the Linux community has available high performance host -adapters that have been well tested with Linux even before being brought to -market. This relationship has also given me the opportunity to interact -directly with their technical staff, to understand more about the internal -workings of their products, and in turn to educate them about the needs and -potential of the Linux community. - -More recently, Mylex has reaffirmed the company's interest in supporting the -Linux community, and I am now working on a Linux driver for the DAC960 PCI RAID -Controllers. Mylex's interest and support is greatly appreciated. - -Unlike some other vendors, if you contact Mylex Technical Support with a -problem and are running Linux, they will not tell you that your use of their -products is unsupported. Their latest product marketing literature even states -"Mylex SCSI host adapters are compatible with all major operating systems -including: ... Linux ...". - -Mylex Corporation is located at 34551 Ardenwood Blvd., Fremont, California -94555, USA and can be reached at 510/796-6100 or on the World Wide Web at -http://www.mylex.com. Mylex HBA Technical Support can be reached by electronic -mail at [email protected], by Voice at 510/608-2400, or by FAX at 510/745-7715. -Contact information for offices in Europe and Japan is available on the Web -site. - - -Driver Features -=============== - -Configuration Reporting and Testing ------------------------------------ - - During system initialization, the driver reports extensively on the host - adapter hardware configuration, including the synchronous transfer parameters - requested and negotiated with each target device. AutoSCSI settings for - Synchronous Negotiation, Wide Negotiation, and Disconnect/Reconnect are - reported for each target device, as well as the status of Tagged Queuing. - If the same setting is in effect for all target devices, then a single word - or phrase is used; otherwise, a letter is provided for each target device to - indicate the individual status. The following examples - should clarify this reporting format: - - Synchronous Negotiation: Ultra - - Synchronous negotiation is enabled for all target devices and the host - adapter will attempt to negotiate for 20.0 mega-transfers/second. - - Synchronous Negotiation: Fast - - Synchronous negotiation is enabled for all target devices and the host - adapter will attempt to negotiate for 10.0 mega-transfers/second. - - Synchronous Negotiation: Slow - - Synchronous negotiation is enabled for all target devices and the host - adapter will attempt to negotiate for 5.0 mega-transfers/second. - - Synchronous Negotiation: Disabled - - Synchronous negotiation is disabled and all target devices are limited to - asynchronous operation. - - Synchronous Negotiation: UFSNUUU#UUUUUUUU - - Synchronous negotiation to Ultra speed is enabled for target devices 0 - and 4 through 15, to Fast speed for target device 1, to Slow speed for - target device 2, and is not permitted to target device 3. The host - adapter's SCSI ID is represented by the "#". - - The status of Wide Negotiation, Disconnect/Reconnect, and Tagged Queuing - are reported as "Enabled", Disabled", or a sequence of "Y" and "N" letters. - -Performance Features --------------------- - - BusLogic SCSI Host Adapters directly implement SCSI-2 Tagged Queuing, and so - support has been included in the driver to utilize tagged queuing with any - target devices that report having the tagged queuing capability. Tagged - queuing allows for multiple outstanding commands to be issued to each target - device or logical unit, and can improve I/O performance substantially. In - addition, BusLogic's Strict Round Robin Mode is used to optimize host adapter - performance, and scatter/gather I/O can support as many segments as can be - effectively utilized by the Linux I/O subsystem. Control over the use of - tagged queuing for each target device as well as individual selection of the - tagged queue depth is available through driver options provided on the kernel - command line or at module initialization time. By default, the queue depth - is determined automatically based on the host adapter's total queue depth and - the number, type, speed, and capabilities of the target devices found. In - addition, tagged queuing is automatically disabled whenever the host adapter - firmware version is known not to implement it correctly, or whenever a tagged - queue depth of 1 is selected. Tagged queuing is also disabled for individual - target devices if disconnect/reconnect is disabled for that device. - -Robustness Features -------------------- - - The driver implements extensive error recovery procedures. When the higher - level parts of the SCSI subsystem request that a timed out command be reset, - a selection is made between a full host adapter hard reset and SCSI bus reset - versus sending a bus device reset message to the individual target device - based on the recommendation of the SCSI subsystem. Error recovery strategies - are selectable through driver options individually for each target device, - and also include sending a bus device reset to the specific target device - associated with the command being reset, as well as suppressing error - recovery entirely to avoid perturbing an improperly functioning device. If - the bus device reset error recovery strategy is selected and sending a bus - device reset does not restore correct operation, the next command that is - reset will force a full host adapter hard reset and SCSI bus reset. SCSI bus - resets caused by other devices and detected by the host adapter are also - handled by issuing a soft reset to the host adapter and re-initialization. - Finally, if tagged queuing is active and more than one command reset occurs - in a 10 minute interval, or if a command reset occurs within the first 10 - minutes of operation, then tagged queuing will be disabled for that target - device. These error recovery options improve overall system robustness by - preventing individual errant devices from causing the system as a whole to - lock up or crash, and thereby allowing a clean shutdown and restart after the - offending component is removed. - -PCI Configuration Support -------------------------- - - On PCI systems running kernels compiled with PCI BIOS support enabled, this - driver will interrogate the PCI configuration space and use the I/O port - addresses assigned by the system BIOS, rather than the ISA compatible I/O - port addresses. The ISA compatible I/O port address is then disabled by the - driver. On PCI systems it is also recommended that the AutoSCSI utility be - used to disable the ISA compatible I/O port entirely as it is not necessary. - The ISA compatible I/O port is disabled by default on the BT-948/958/958D. - -/proc File System Support -------------------------- - - Copies of the host adapter configuration information together with updated - data transfer and error recovery statistics are available through the - /proc/scsi/BusLogic/<N> interface. - -Shared Interrupts Support -------------------------- - - On systems that support shared interrupts, any number of BusLogic Host - Adapters may share the same interrupt request channel. - - -Supported Host Adapters -======================= - -The following list comprises the supported BusLogic SCSI Host Adapters as of -the date of this document. It is recommended that anyone purchasing a BusLogic -Host Adapter not in the following table contact the author beforehand to verify -that it is or will be supported. - -FlashPoint Series PCI Host Adapters: - -======================= ============================================= -FlashPoint LT (BT-930) Ultra SCSI-3 -FlashPoint LT (BT-930R) Ultra SCSI-3 with RAIDPlus -FlashPoint LT (BT-920) Ultra SCSI-3 (BT-930 without BIOS) -FlashPoint DL (BT-932) Dual Channel Ultra SCSI-3 -FlashPoint DL (BT-932R) Dual Channel Ultra SCSI-3 with RAIDPlus -FlashPoint LW (BT-950) Wide Ultra SCSI-3 -FlashPoint LW (BT-950R) Wide Ultra SCSI-3 with RAIDPlus -FlashPoint DW (BT-952) Dual Channel Wide Ultra SCSI-3 -FlashPoint DW (BT-952R) Dual Channel Wide Ultra SCSI-3 with RAIDPlus -======================= ============================================= - -MultiMaster "W" Series Host Adapters: - -======= === ============================== -BT-948 PCI Ultra SCSI-3 -BT-958 PCI Wide Ultra SCSI-3 -BT-958D PCI Wide Differential Ultra SCSI-3 -======= === ============================== - -MultiMaster "C" Series Host Adapters: - -======== ==== ============================== -BT-946C PCI Fast SCSI-2 -BT-956C PCI Wide Fast SCSI-2 -BT-956CD PCI Wide Differential Fast SCSI-2 -BT-445C VLB Fast SCSI-2 -BT-747C EISA Fast SCSI-2 -BT-757C EISA Wide Fast SCSI-2 -BT-757CD EISA Wide Differential Fast SCSI-2 -======== ==== ============================== - -MultiMaster "S" Series Host Adapters: - -======= ==== ============================== -BT-445S VLB Fast SCSI-2 -BT-747S EISA Fast SCSI-2 -BT-747D EISA Differential Fast SCSI-2 -BT-757S EISA Wide Fast SCSI-2 -BT-757D EISA Wide Differential Fast SCSI-2 -BT-742A EISA SCSI-2 (742A revision H) -======= ==== ============================== - -MultiMaster "A" Series Host Adapters: - -======= ==== ============================== -BT-742A EISA SCSI-2 (742A revisions A - G) -======= ==== ============================== - -AMI FastDisk Host Adapters that are true BusLogic MultiMaster clones are also -supported by this driver. - -BusLogic SCSI Host Adapters are available packaged both as bare boards and as -retail kits. The BT- model numbers above refer to the bare board packaging. -The retail kit model numbers are found by replacing BT- with KT- in the above -list. The retail kit includes the bare board and manual as well as cabling and -driver media and documentation that are not provided with bare boards. - - -FlashPoint Installation Notes -============================= - -RAIDPlus Support ----------------- - - FlashPoint Host Adapters now include RAIDPlus, Mylex's bootable software - RAID. RAIDPlus is not supported on Linux, and there are no plans to support - it. The MD driver in Linux 2.0 provides for concatenation (LINEAR) and - striping (RAID-0), and support for mirroring (RAID-1), fixed parity (RAID-4), - and distributed parity (RAID-5) is available separately. The built-in Linux - RAID support is generally more flexible and is expected to perform better - than RAIDPlus, so there is little impetus to include RAIDPlus support in the - BusLogic driver. - -Enabling UltraSCSI Transfers ----------------------------- - - FlashPoint Host Adapters ship with their configuration set to "Factory - Default" settings that are conservative and do not allow for UltraSCSI speed - to be negotiated. This results in fewer problems when these host adapters - are installed in systems with cabling or termination that is not sufficient - for UltraSCSI operation, or where existing SCSI devices do not properly - respond to synchronous transfer negotiation for UltraSCSI speed. AutoSCSI - may be used to load "Optimum Performance" settings which allow UltraSCSI - speed to be negotiated with all devices, or UltraSCSI speed can be enabled on - an individual basis. It is recommended that SCAM be manually disabled after - the "Optimum Performance" settings are loaded. - - -BT-948/958/958D Installation Notes -================================== - -The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which may -require attention in some circumstances when installing Linux. - -PCI I/O Port Assignments ------------------------- - - When configured to factory default settings, the BT-948/958/958D will only - recognize the PCI I/O port assignments made by the motherboard's PCI BIOS. - The BT-948/958/958D will not respond to any of the ISA compatible I/O ports - that previous BusLogic SCSI Host Adapters respond to. This driver supports - the PCI I/O port assignments, so this is the preferred configuration. - However, if the obsolete BusLogic driver must be used for any reason, such as - a Linux distribution that does not yet use this driver in its boot kernel, - BusLogic has provided an AutoSCSI configuration option to enable a legacy ISA - compatible I/O port. - - To enable this backward compatibility option, invoke the AutoSCSI utility via - Ctrl-B at system startup and select "Adapter Configuration", "View/Modify - Configuration", and then change the "ISA Compatible Port" setting from - "Disable" to "Primary" or "Alternate". Once this driver has been installed, - the "ISA Compatible Port" option should be set back to "Disable" to avoid - possible future I/O port conflicts. The older BT-946C/956C/956CD also have - this configuration option, but the factory default setting is "Primary". - -PCI Slot Scanning Order ------------------------ - - In systems with multiple BusLogic PCI Host Adapters, the order in which the - PCI slots are scanned may appear reversed with the BT-948/958/958D as - compared to the BT-946C/956C/956CD. For booting from a SCSI disk to work - correctly, it is necessary that the host adapter's BIOS and the kernel agree - on which disk is the boot device, which requires that they recognize the PCI - host adapters in the same order. The motherboard's PCI BIOS provides a - standard way of enumerating the PCI host adapters, which is used by the Linux - kernel. Some PCI BIOS implementations enumerate the PCI slots in order of - increasing bus number and device number, while others do so in the opposite - direction. - - Unfortunately, Microsoft decided that Windows 95 would always enumerate the - PCI slots in order of increasing bus number and device number regardless of - the PCI BIOS enumeration, and requires that their scheme be supported by the - host adapter's BIOS to receive Windows 95 certification. Therefore, the - factory default settings of the BT-948/958/958D enumerate the host adapters - by increasing bus number and device number. To disable this feature, invoke - the AutoSCSI utility via Ctrl-B at system startup and select "Adapter - Configuration", "View/Modify Configuration", press Ctrl-F10, and then change - the "Use Bus And Device # For PCI Scanning Seq." option to OFF. - - This driver will interrogate the setting of the PCI Scanning Sequence option - so as to recognize the host adapters in the same order as they are enumerated - by the host adapter's BIOS. - -Enabling UltraSCSI Transfers ----------------------------- - - The BT-948/958/958D ship with their configuration set to "Factory Default" - settings that are conservative and do not allow for UltraSCSI speed to be - negotiated. This results in fewer problems when these host adapters are - installed in systems with cabling or termination that is not sufficient for - UltraSCSI operation, or where existing SCSI devices do not properly respond - to synchronous transfer negotiation for UltraSCSI speed. AutoSCSI may be - used to load "Optimum Performance" settings which allow UltraSCSI speed to be - negotiated with all devices, or UltraSCSI speed can be enabled on an - individual basis. It is recommended that SCAM be manually disabled after the - "Optimum Performance" settings are loaded. - - -Driver Options -============== - -BusLogic Driver Options may be specified either via the Linux Kernel Command -Line or via the Loadable Kernel Module Installation Facility. Driver Options -for multiple host adapters may be specified either by separating the option -strings by a semicolon, or by specifying multiple "BusLogic=" strings on the -command line. Individual option specifications for a single host adapter are -separated by commas. The Probing and Debugging Options apply to all host -adapters whereas the remaining options apply individually only to the -selected host adapter. - -The BusLogic Driver Probing Options comprise the following: - -NoProbe - - The "NoProbe" option disables all probing and therefore no BusLogic Host - Adapters will be detected. - -NoProbePCI - - The "NoProbePCI" options disables the interrogation of PCI Configuration - Space and therefore only ISA Multimaster Host Adapters will be detected, as - well as PCI Multimaster Host Adapters that have their ISA Compatible I/O - Port set to "Primary" or "Alternate". - -NoSortPCI - - The "NoSortPCI" option forces PCI MultiMaster Host Adapters to be - enumerated in the order provided by the PCI BIOS, ignoring any setting of - the AutoSCSI "Use Bus And Device # For PCI Scanning Seq." option. - -MultiMasterFirst - - The "MultiMasterFirst" option forces MultiMaster Host Adapters to be probed - before FlashPoint Host Adapters. By default, if both FlashPoint and PCI - MultiMaster Host Adapters are present, this driver will probe for - FlashPoint Host Adapters first unless the BIOS primary disk is controlled - by the first PCI MultiMaster Host Adapter, in which case MultiMaster Host - Adapters will be probed first. - -FlashPointFirst - - The "FlashPointFirst" option forces FlashPoint Host Adapters to be probed - before MultiMaster Host Adapters. - -The BusLogic Driver Tagged Queuing Options allow for explicitly specifying -the Queue Depth and whether Tagged Queuing is permitted for each Target -Device (assuming that the Target Device supports Tagged Queuing). The Queue -Depth is the number of SCSI Commands that are allowed to be concurrently -presented for execution (either to the Host Adapter or Target Device). Note -that explicitly enabling Tagged Queuing may lead to problems; the option to -enable or disable Tagged Queuing is provided primarily to allow disabling -Tagged Queuing on Target Devices that do not implement it correctly. The -following options are available: - -QueueDepth:<integer> - - The "QueueDepth:" or QD:" option specifies the Queue Depth to use for all - Target Devices that support Tagged Queuing, as well as the maximum Queue - Depth for devices that do not support Tagged Queuing. If no Queue Depth - option is provided, the Queue Depth will be determined automatically based - on the Host Adapter's Total Queue Depth and the number, type, speed, and - capabilities of the detected Target Devices. Target Devices that - do not support Tagged Queuing always have their Queue Depth set to - BusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless a - lower Queue Depth option is provided. A Queue Depth of 1 automatically - disables Tagged Queuing. - -QueueDepth:[<integer>,<integer>...] - - The "QueueDepth:[...]" or "QD:[...]" option specifies the Queue Depth - individually for each Target Device. If an <integer> is omitted, the - associated Target Device will have its Queue Depth selected automatically. - -TaggedQueuing:Default - - The "TaggedQueuing:Default" or "TQ:Default" option permits Tagged Queuing - based on the firmware version of the BusLogic Host Adapter and based on - whether the Queue Depth allows queuing multiple commands. - -TaggedQueuing:Enable - - The "TaggedQueuing:Enable" or "TQ:Enable" option enables Tagged Queuing for - all Target Devices on this Host Adapter, overriding any limitation that - would otherwise be imposed based on the Host Adapter firmware version. - -TaggedQueuing:Disable - - The "TaggedQueuing:Disable" or "TQ:Disable" option disables Tagged Queuing - for all Target Devices on this Host Adapter. - -TaggedQueuing:<Target-Spec> - - The "TaggedQueuing:<Target-Spec>" or "TQ:<Target-Spec>" option controls - Tagged Queuing individually for each Target Device. <Target-Spec> is a - sequence of "Y", "N", and "X" characters. "Y" enables Tagged Queuing, "N" - disables Tagged Queuing, and "X" accepts the default based on the firmware - version. The first character refers to Target Device 0, the second to - Target Device 1, and so on; if the sequence of "Y", "N", and "X" characters - does not cover all the Target Devices, unspecified characters are assumed - to be "X". - -The BusLogic Driver Miscellaneous Options comprise the following: - -BusSettleTime:<seconds> - - The "BusSettleTime:" or "BST:" option specifies the Bus Settle Time in - seconds. The Bus Settle Time is the amount of time to wait between a Host - Adapter Hard Reset which initiates a SCSI Bus Reset and issuing any SCSI - Commands. If unspecified, it defaults to BusLogic_DefaultBusSettleTime. - -InhibitTargetInquiry - - The "InhibitTargetInquiry" option inhibits the execution of an Inquire - Target Devices or Inquire Installed Devices command on MultiMaster Host - Adapters. This may be necessary with some older Target Devices that do not - respond correctly when Logical Units above 0 are addressed. - -The BusLogic Driver Debugging Options comprise the following: - -TraceProbe - - The "TraceProbe" option enables tracing of Host Adapter Probing. - -TraceHardwareReset - - The "TraceHardwareReset" option enables tracing of Host Adapter Hardware - Reset. - -TraceConfiguration - - The "TraceConfiguration" option enables tracing of Host Adapter - Configuration. - -TraceErrors - - The "TraceErrors" option enables tracing of SCSI Commands that return an - error from the Target Device. The CDB and Sense Data will be printed for - each SCSI Command that fails. - -Debug - - The "Debug" option enables all debugging options. - -The following examples demonstrate setting the Queue Depth for Target Devices -1 and 2 on the first host adapter to 7 and 15, the Queue Depth for all Target -Devices on the second host adapter to 31, and the Bus Settle Time on the -second host adapter to 30 seconds. - -Linux Kernel Command Line:: - - linux BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30 - -LILO Linux Boot Loader (in /etc/lilo.conf):: - - append = "BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30" - -INSMOD Loadable Kernel Module Installation Facility:: - - insmod BusLogic.o \ - 'BusLogic="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"' - - -.. Note:: - - Module Utilities 2.1.71 or later is required for correct parsing - of driver options containing commas. - - -Driver Installation -=================== - -This distribution was prepared for Linux kernel version 2.0.35, but should be -compatible with 2.0.4 or any later 2.0 series kernel. - -To install the new BusLogic SCSI driver, you may use the following commands, -replacing "/usr/src" with wherever you keep your Linux kernel source tree:: - - cd /usr/src - tar -xvzf BusLogic-2.0.15.tar.gz - mv README.* LICENSE.* BusLogic.[ch] FlashPoint.c linux/drivers/scsi - patch -p0 < BusLogic.patch (only for 2.0.33 and below) - cd linux - make config - make zImage - -Then install "arch/x86/boot/zImage" as your standard kernel, run lilo if -appropriate, and reboot. - - -BusLogic Announcements Mailing List -=================================== - -The BusLogic Announcements Mailing List provides a forum for informing Linux -users of new driver releases and other announcements regarding Linux support -for BusLogic SCSI Host Adapters. To join the mailing list, send a message to -"buslogic-announce-request-Jy8Lyc2Oj6yaMJb+Lgu22Q@public.gmane.org" with the line "subscribe" in the -message body.
Documentation/scsi/FlashPoint.rst deleted +0 -176
176 lines not on this page · raw message
MAINTAINERS +0 -7
@@ -4279,13 +4279,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git F: Documentation/devicetree/bindings/devfreq/exynos-bus.txt F: drivers/devfreq/exynos-bus.c -BUSLOGIC SCSI DRIVER -M: Khalid Aziz <[email protected]> -L: [email protected] -S: Maintained -F: drivers/scsi/BusLogic.* -F: drivers/scsi/FlashPoint.* - C-MEDIA CMI8788 DRIVER M: Clemens Ladisch <clemens-P6GI/[email protected]> L: alsa-devel-K7yf7f+aM1XWsZ/[email protected] (moderated for non-subscribers)
drivers/scsi/BusLogic.c deleted +0 -3727
2,230 lines not on this page · raw message
drivers/scsi/BusLogic.h deleted +0 -1284
1,284 lines not on this page · raw message
drivers/scsi/FlashPoint.c deleted +0 -7560
7,560 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.29.2
Part of the diff is not shown here. View the raw message.
Re: [PATCH 5/6] scsi: remove stale BusLogic driver
Quoted 7 lines · Arnd Bergmann
This was in turn fixed in commit
56f396146af2("scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic"), 8 years later.The fact that this was found at all is an indication that there are users, and it seems that Maciej, Matt and Khalid all have access to this hardware, but if it took eight years to find the problem, it's likely that nobody actually relies on it.
Umm, I use it with a 32-bit system, so it would be quite an issue for me
to discover a problem with 64-bit configurations. And I quite rely on this system for various stuff too!
Quoted 4 lines
Remove it as part of the global virt_to_bus()/bus_to_virt() removal. If anyone is still interested in keeping this driver, the alternative is to stop it from using
bus_to_virt(), possibly along the lines of howdpt_i2ogets around the same issue.
Thanks for the pointer and for cc-ing me. Please refrain from removing
the driver at least for this release cycle and let me fix it. It should be easy to mimic what I did for the defza driver: all bus addresses in the DMA API come associated with virtual addresses, so it is just a matter of recording those somewhere for later use rather than trying to mess up with bus addresses to figure out a reverse mapping.
Maciej
Re: [PATCH 5/6] scsi: remove stale BusLogic driver
Quoted 6 lines · Maciej W. Rozycki
Quoted 3 lines · Arnd Bergmann
This was in turn fixed in commit
56f396146af2("scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic"), 8 years later.
Quoted 8 lines
Quoted 4 lines
The fact that this was found at all is an indication that there are users, and it seems that Maciej, Matt and Khalid all have access to this hardware, but if it took eight years to find the problem, it's likely that nobody actually relies on it.
Umm, I use it with a 32-bit system, so it would be quite an issue for me
to discover a problem with 64-bit configurations. And I quite rely on this system for various stuff too!
Ok, good to know.
Quoted 7 lines
Quoted 4 lines
Remove it as part of the global virt_to_bus()/bus_to_virt() removal. If anyone is still interested in keeping this driver, the alternative is to stop it from using
bus_to_virt(), possibly along the lines of howdpt_i2ogets around the same issue.Thanks for the pointer and for cc-ing me. Please refrain from removing
the driver at least for this release cycle and let me fix it.
Sure, no problem. It looks like I forgot to actually Cc you on the series as I had meant to, glad it reached you anyway.
Quoted 4 lines
It should be easy to mimic what I did for the defza driver: all bus addresses in the DMA API come associated with virtual addresses, so it is just a matter of recording those somewhere for later use rather than trying to mess up with bus addresses to figure out a reverse mapping.
I looked at the defza driver and that one appears simpler to me, as you can look up the virtual address from an index, but it's possible I missed what you do here. I meant specifically the calculation added by commit 67af2b060e02 ("[SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent") in the dpt_i2o driver that can be used to compute the virtual address. If something simpler works as well, that is of course better.
Arnd
Khalid Aziz
maintainerRe: [PATCH 5/6] scsi: remove stale BusLogic driver
In reply to Arnd BergmannQuoted 37 lines · Arnd Bergmann
From: Arnd Bergmann<[email protected]>
The BusLogic driver is the last remaining driver that relies on the deprecated
bus_to_virt()function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support.Before commit
391e2f25601e("[SCSI] BusLogic: Port driver to 64-bit."), the driver had a dependency on x86-32, presumably because of this problem. However, the change introduced another bug that made it still impossible to use the driver on any 64-bit machine.This was in turn fixed in commit
56f396146af2("scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic"), 8 years later.The fact that this was found at all is an indication that there are users, and it seems that Maciej, Matt and Khalid all have access to this hardware, but if it took eight years to find the problem, it's likely that nobody actually relies on it.
Remove it as part of the global virt_to_bus()/bus_to_virt() removal. If anyone is still interested in keeping this driver, the alternative is to stop it from using
bus_to_virt(), possibly along the lines of howdpt_i2ogets around the same issue.Cc Maciej W. Rozycki<[email protected]>Cc Matt Wang<[email protected]>Cc Khalid Aziz<[email protected]>Signed-off-by Arnd Bergmann<[email protected]>--- Documentation/scsi/BusLogic.rst | 581 --- Documentation/scsi/FlashPoint.rst | 176 - MAINTAINERS | 7 - drivers/scsi/BusLogic.c | 3727 -------------- drivers/scsi/BusLogic.h | 1284 ----- drivers/scsi/FlashPoint.c | 7560 ----------------------------- drivers/scsi/Kconfig | 24 - 7 files changed, 13359 deletions(-)
Quoted 5 lines
delete mode 100644
Documentation/scsi/BusLogic.rstdelete mode 100644Documentation/scsi/FlashPoint.rstdelete mode 100644drivers/scsi/BusLogic.cdelete mode 100644drivers/scsi/BusLogic.hdelete mode 100644drivers/scsi/FlashPoint.c
I would say no to removing BusLogic driver. Virtualbox is another consumer of this driver. This driver is very old but I would rather fix the issues than remove it until we do not have any users.
Thanks,
Khalid
A message that is not in the archive (sent off-list or not yet received): d39fc9bb-07c1-ad74-1e89-d2aa80578cd4-21RPF02GE+GXwddmVfQv5g@public.gmane.org
Re: [PATCH 5/6] scsi: remove stale BusLogic driver
Quoted 5 lines · Khalid Aziz
On 6/6/22 02:41, Arnd Bergmann wrote: From: Arnd Bergmann<[email protected]>
I would say no to removing BusLogic driver. Virtualbox is another consumer of this driver. This driver is very old but I would rather fix the issues than remove it until we do not have any users.
Maciej already offered to help fix the driver, so I think it will be ok.
On the other hand, it sounds like VirtualBox users should not actually try to use the BusLogic driver with modern Linux guests. From what I can tell from the documentation [1], VirtualBox only provides this emulation because it was shipped with early versions of VMware and is supported by Windows 2000 and earlier, but not actually on any modern Windows guest. The VMware documentation in turn explicitly says that BusLogic does not work with 64-bit guests [2], presumably this applies to both Windows and Linux guests.
Arnd
[1] https://www.virtualbox.org/manual/ch05.html#harddiskcontrollers
[2] https://kb.vmware.com/s/article/2010470
PATCH 6/6 arch/*/: remove CONFIG_VIRT_TO_BUS
In reply to a message not in the archiveFrom: Arnd Bergmann <[email protected]>
All architecture-independent users of virt_to_bus() and bus_to_virt() have been fixed to use the dma mapping interfaces or have been removed now. This means the definitions on most architectures, and the CONFIG_VIRT_TO_BUS symbol are now obsolete and can be removed.
The only exceptions to this are a few network and scsi drivers for m68k Amiga and VME machines and ppc32 Macintosh. These drivers work correctly with the old interfaces and are probably not worth changing.
On alpha and parisc, virt_to_bus() were still used in asm/floppy.h. alpha can use isa_virt_to_bus() like x86 does, and parisc can just open-code the virt_to_phys() here, as this is architecture specific code.
I tried updating the bus-virt-phys-mapping.rst documentation, which started as an email from Linus to explain some details of the Linux-2.0 driver interfaces. The bits about virt_to_bus() were declared obsolete backin 2000, and the rest is not all that relevant any more, so in the end I just decided to remove the file completely.
--- .../core-api/bus-virt-phys-mapping.rst | 220 ------------------ Documentation/core-api/dma-api-howto.rst | 14 -- Documentation/core-api/index.rst | 1 - .../translations/zh_CN/core-api/index.rst | 1 - arch/alpha/Kconfig | 1 - arch/alpha/include/asm/floppy.h | 2 +- arch/alpha/include/asm/io.h | 8 +- arch/ia64/Kconfig | 1 - arch/ia64/include/asm/io.h | 8 - arch/m68k/Kconfig | 1 - arch/m68k/include/asm/virtconvert.h | 4 +- arch/microblaze/Kconfig | 1 - arch/microblaze/include/asm/io.h | 2 - arch/mips/Kconfig | 1 - arch/mips/include/asm/io.h | 9 - arch/parisc/Kconfig | 1 - arch/parisc/include/asm/floppy.h | 4 +- arch/parisc/include/asm/io.h | 2 - arch/powerpc/Kconfig | 1 - arch/powerpc/include/asm/io.h | 2 - arch/riscv/include/asm/page.h | 1 - arch/x86/Kconfig | 1 - arch/x86/include/asm/io.h | 9 - arch/xtensa/Kconfig | 1 - arch/xtensa/include/asm/io.h | 3 - include/asm-generic/io.h | 14 -- mm/Kconfig | 8 - 27 files changed, 10 insertions(+), 311 deletions(-) delete mode 100644 Documentation/core-api/bus-virt-phys-mapping.rst
Documentation/core-api/bus-virt-phys-mapping.rst deleted +0 -220
@@ -1,220 +0,0 @@ -========================================================== -How to access I/O mapped memory from within device drivers -========================================================== - -:Author: Linus - -.. warning:: - - The virt_to_bus() and bus_to_virt() functions have been - superseded by the functionality provided by the PCI DMA interface - (see Documentation/core-api/dma-api-howto.rst). They continue - to be documented below for historical purposes, but new code - must not use them. --davidm 00/12/12 - -:: - - [ This is a mail message in response to a query on IO mapping, thus the - strange format for a "document" ] - -The AHA-1542 is a bus-master device, and your patch makes the driver give the -controller the physical address of the buffers, which is correct on x86 -(because all bus master devices see the physical memory mappings directly). - -However, on many setups, there are actually **three** different ways of looking -at memory addresses, and in this case we actually want the third, the -so-called "bus address". - -Essentially, the three ways of addressing memory are (this is "real memory", -that is, normal RAM--see later about other details): - - - CPU untranslated. This is the "physical" address. Physical address - 0 is what the CPU sees when it drives zeroes on the memory bus. - - - CPU translated address. This is the "virtual" address, and is - completely internal to the CPU itself with the CPU doing the appropriate - translations into "CPU untranslated". - - - bus address. This is the address of memory as seen by OTHER devices, - not the CPU. Now, in theory there could be many different bus - addresses, with each device seeing memory in some device-specific way, but - happily most hardware designers aren't actually actively trying to make - things any more complex than necessary, so you can assume that all - external hardware sees the memory the same way. - -Now, on normal PCs the bus address is exactly the same as the physical -address, and things are very simple indeed. However, they are that simple -because the memory and the devices share the same address space, and that is -not generally necessarily true on other PCI/ISA setups. - -Now, just as an example, on the PReP (PowerPC Reference Platform), the -CPU sees a memory map something like this (this is from memory):: - - 0-2 GB "real memory" - 2 GB-3 GB "system IO" (inb/out and similar accesses on x86) - 3 GB-4 GB "IO memory" (shared memory over the IO bus) - -Now, that looks simple enough. However, when you look at the same thing from -the viewpoint of the devices, you have the reverse, and the physical memory -address 0 actually shows up as address 2 GB for any IO master. - -So when the CPU wants any bus master to write to physical memory 0, it -has to give the master address 0x80000000 as the memory address. - -So, for example, depending on how the kernel is actually mapped on the -PPC, you can end up with a setup like this:: - - physical address: 0 - virtual address: 0xC0000000 - bus address: 0x80000000 - -where all the addresses actually point to the same thing. It's just seen -through different translations.. - -Similarly, on the Alpha, the normal translation is:: - - physical address: 0 - virtual address: 0xfffffc0000000000 - bus address: 0x40000000 - -(but there are also Alphas where the physical address and the bus address -are the same). - -Anyway, the way to look up all these translations, you do:: - - #include <asm/io.h> - - phys_addr = virt_to_phys(virt_addr); - virt_addr = phys_to_virt(phys_addr); - bus_addr = virt_to_bus(virt_addr); - virt_addr = bus_to_virt(bus_addr); - -Now, when do you need these? - -You want the **virtual** address when you are actually going to access that -pointer from the kernel. So you can have something like this:: - - /* - * this is the hardware "mailbox" we use to communicate with - * the controller. The controller sees this directly. - */ - struct mailbox { - __u32 status; - __u32 bufstart; - __u32 buflen; - .. - } mbox; - - unsigned char * retbuffer; - - /* get the address from the controller */ - retbuffer = bus_to_virt(mbox.bufstart); - switch (retbuffer[0]) { - case STATUS_OK: - ... - -on the other hand, you want the bus address when you have a buffer that -you want to give to the controller:: - - /* ask the controller to read the sense status into "sense_buffer" */ - mbox.bufstart = virt_to_bus(&sense_buffer); - mbox.buflen = sizeof(sense_buffer); - mbox.status = 0; - notify_controller(&mbox); - -And you generally **never** want to use the physical address, because you can't -use that from the CPU (the CPU only uses translated virtual addresses), and -you can't use it from the bus master. - -So why do we care about the physical address at all? We do need the physical -address in some cases, it's just not very often in normal code. The physical -address is needed if you use memory mappings, for example, because the -"remap_pfn_range()" mm function wants the physical address of the memory to -be remapped as measured in units of pages, a.k.a. the pfn (the memory -management layer doesn't know about devices outside the CPU, so it -shouldn't need to know about "bus addresses" etc). - -.. note:: - - The above is only one part of the whole equation. The above - only talks about "real memory", that is, CPU memory (RAM). - -There is a completely different type of memory too, and that's the "shared -memory" on the PCI or ISA bus. That's generally not RAM (although in the case -of a video graphics card it can be normal DRAM that is just used for a frame -buffer), but can be things like a packet buffer in a network card etc. - -This memory is called "PCI memory" or "shared memory" or "IO memory" or -whatever, and there is only one way to access it: the readb/writeb and -related functions. You should never take the address of such memory, because -there is really nothing you can do with such an address: it's not -conceptually in the same memory space as "real memory" at all, so you cannot -just dereference a pointer. (Sadly, on x86 it **is** in the same memory space, -so on x86 it actually works to just deference a pointer, but it's not -portable). - -For such memory, you can do things like: - - - reading:: - - /* - * read first 32 bits from ISA memory at 0xC0000, aka - * C000:0000 in DOS terms - */ - unsigned int signature = isa_readl(0xC0000); - - - remapping and writing:: - - /* - * remap framebuffer PCI memory area at 0xFC000000, - * size 1MB, so that we can access it: We can directly - * access only the 640k-1MB area, so anything else - * has to be remapped. - */ - void __iomem *baseptr = ioremap(0xFC000000, 1024*1024); - - /* write a 'A' to the offset 10 of the area */ - writeb('A',baseptr+10); - - /* unmap when we unload the driver */ - iounmap(baseptr); - - - copying and clearing:: - - /* get the 6-byte Ethernet address at ISA address E000:0040 */ - memcpy_fromio(kernel_buffer, 0xE0040, 6); - /* write a packet to the driver */ - memcpy_toio(0xE1000, skb->data, skb->len); - /* clear the frame buffer */ - memset_io(0xA0000, 0, 0x10000); - -OK, that just about covers the basics of accessing IO portably. Questions? -Comments? You may think that all the above is overly complex, but one day you -might find yourself with a 500 MHz Alpha in front of you, and then you'll be -happy that your driver works ;) - -Note that kernel versions 2.0.x (and earlier) mistakenly called the -ioremap() function "vremap()". ioremap() is the proper name, but I -didn't think straight when I wrote it originally. People who have to -support both can do something like:: - - /* support old naming silliness */ - #if LINUX_VERSION_CODE < 0x020100 - #define ioremap vremap - #define iounmap vfree - #endif - -at the top of their source files, and then they can use the right names -even on 2.0.x systems. - -And the above sounds worse than it really is. Most real drivers really -don't do all that complex things (or rather: the complexity is not so -much in the actual IO accesses as in error handling and timeouts etc). -It's generally not hard to fix drivers, and in many cases the code -actually looks better afterwards:: - - unsigned long signature = *(unsigned int *) 0xC0000; - vs - unsigned long signature = readl(0xC0000); - -I think the second version actually is more readable, no?
Documentation/core-api/dma-api-howto.rst +0 -14
@@ -707,20 +707,6 @@ to use the dma_sync_*() interfaces:: } } -Drivers converted fully to this interface should not use virt_to_bus() any -longer, nor should they use bus_to_virt(). Some drivers have to be changed a -little bit, because there is no longer an equivalent to bus_to_virt() in the -dynamic DMA mapping scheme - you have to always store the DMA addresses -returned by the dma_alloc_coherent(), dma_pool_alloc(), and dma_map_single() -calls (dma_map_sg() stores them in the scatterlist itself if the platform -supports dynamic DMA mapping in hardware) in your driver structures and/or -in the card registers. - -All drivers should be using these interfaces with no exceptions. It -is planned to completely remove virt_to_bus() and bus_to_virt() as -they are entirely deprecated. Some ports already do not provide these -as it is impossible to correctly support them. - Handling Errors ===============
Documentation/core-api/index.rst +0 -1
@@ -41,7 +41,6 @@ Library functionality that is used throughout the kernel. rbtree generic-radix-tree packing - bus-virt-phys-mapping this_cpu_ops timekeeping errseq
Documentation/translations/zh_CN/core-api/index.rst +0 -1
@@ -52,7 +52,6 @@ Todolist: circular-buffers generic-radix-tree packing - bus-virt-phys-mapping this_cpu_ops timekeeping errseq
arch/alpha/Kconfig +0 -1
@@ -17,7 +17,6 @@ config ALPHA select HAVE_PERF_EVENTS select NEED_DMA_MAP_STATE select NEED_SG_DMA_LENGTH - select VIRT_TO_BUS select GENERIC_IRQ_PROBE select GENERIC_PCI_IOMAP select AUTO_IRQ_AFFINITY if SMP
arch/alpha/include/asm/floppy.h +1 -1
@@ -20,7 +20,7 @@#define fd_free_dma () free_dma(FLOPPY_DMA)#define fd_clear_dma_ff () clear_dma_ff(FLOPPY_DMA)#define fd_set_dma_mode (mode) set_dma_mode(FLOPPY_DMA,mode) -#define fd_set_dma_addr (addr) set_dma_addr(FLOPPY_DMA,virt_to_bus(addr)) +#define fd_set_dma_addr (addr) set_dma_addr(FLOPPY_DMA,isa_virt_to_bus(addr))#define fd_set_dma_count (count) set_dma_count(FLOPPY_DMA,count)#define fd_enable_irq () enable_irq(FLOPPY_IRQ)#define fd_disable_irq () disable_irq(FLOPPY_IRQ)
arch/alpha/include/asm/io.h +4 -4
@@ -106,15 +106,15 @@ static inline void * phys_to_virt(unsigned long address)extern unsigned long __direct_map_base;extern unsigned long __direct_map_size; -static inline unsigned long __deprecated virt_to_bus (volatile void *address) +static inline unsigned long __deprecated isa_virt_to_bus (volatile void *address) {unsigned long phys =virt_to_phys (address);unsigned long bus = phys + __direct_map_base;return phys <= __direct_map_size ? bus :0 ; } -#define isa_virt_to_bus virt_to_bus +#define isa_virt_to_bus isa_virt_to_bus -static inline void *__deprecated bus_to_virt (unsigned long address) +static inline void *__deprecated isa_bus_to_virt (unsigned long address) {void *virt;
@@ -125,7 +125,7 @@ static inline void * __deprecated bus_to_virt(unsigned long address) virt =phys_to_virt (address);return (long )address <=0 ?NULL : virt; } -#define isa_bus_to_virt bus_to_virt +#define isa_bus_to_virt isa_bus_to_virt/* * There are different chipsets to interface the Alpha CPUs to the world.
arch/ia64/Kconfig +0 -1
@@ -39,7 +39,6 @@ config IA64 select HAVE_FUNCTION_DESCRIPTORS select HAVE_VIRT_CPU_ACCOUNTING select HUGETLB_PAGE_SIZE_VARIABLE if HUGETLB_PAGE - select VIRT_TO_BUS select GENERIC_IRQ_PROBE select GENERIC_PENDING_IRQ if SMP select GENERIC_IRQ_SHOW
arch/ia64/include/asm/io.h +0 -8
@@ -96,14 +96,6 @@ extern u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size);extern int valid_phys_addr_range (phys_addr_t addr,size_t count);/* efi.c */ extern int valid_mmap_phys_addr_range (unsigned long pfn,size_t count); -/* -* The following two macros are deprecated and scheduled for removal. -* Please use the PCI-DMA interface defined in <asm/pci.h> instead. -*/ -#define bus_to_virt phys_to_virt -#define virt_to_bus virt_to_phys -#define page_to_bus page_to_phys -# endif /* KERNEL */ /*
arch/m68k/Kconfig +0 -1
@@ -30,7 +30,6 @@ config M68K select OLD_SIGACTION select OLD_SIGSUSPEND3 select UACCESS_MEMCPY if !MMU - select VIRT_TO_BUS select ZONE_DMA config CPU_BIG_ENDIAN
arch/m68k/include/asm/virtconvert.h +3 -1
@@ -33,9 +33,11 @@ static inline void *phys_to_virt(unsigned long address)/* * IO bus memory addresses are 1:1 with the physical address, +* deprecated globally but still used on two machines. */ +#if defined(CONFIG_AMIGA ) || defined(CONFIG_VME )#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt +#endif #endif #endif
arch/microblaze/Kconfig +0 -1
@@ -38,7 +38,6 @@ config MICROBLAZE select OF_EARLY_FLATTREE select PCI_DOMAINS_GENERIC if PCI select PCI_SYSCALL if PCI - select VIRT_TO_BUS select CPU_NO_EFFICIENT_FFS select MMU_GATHER_NO_RANGE select SPARSE_IRQ
arch/microblaze/include/asm/io.h +0 -2
@@ -30,8 +30,6 @@ extern resource_size_t isa_mem_base;#define PCI_IOBASE ((void __iomem *)_IO_BASE)#define IO_SPACE_LIMIT (0xFFFFFFFF) -#define page_to_bus (page) (page_to_phys(page)) -extern void iounmap (volatile void __iomem *addr);extern void __iomem *ioremap (phys_addr_t address,unsigned long size);
arch/mips/Kconfig +0 -1
@@ -100,7 +100,6 @@ config MIPS select RTC_LIB select SYSCTL_EXCEPTION_TRACE select TRACE_IRQFLAGS_SUPPORT - select VIRT_TO_BUS select ARCH_HAS_ELFCORE_COMPAT select HAVE_ARCH_KCSAN if 64BIT
arch/mips/include/asm/io.h +0 -9
@@ -147,15 +147,6 @@ static inline void *isa_bus_to_virt(unsigned long address)return phys_to_virt (address); } -/* -* However PCI ones are not necessarily 1:1 and therefore these interfaces -* are forbidden in portable PCI drivers. -* -* Allow them for x86 for legacy drivers, though. -*/ -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt -/* * Change "struct page" to physical address. */
arch/parisc/Kconfig +0 -1
@@ -43,7 +43,6 @@ config PARISC select SYSCTL_ARCH_UNALIGN_ALLOW select SYSCTL_EXCEPTION_TRACE select HAVE_MOD_ARCH_SPECIFIC - select VIRT_TO_BUS select MODULES_USE_ELF_RELA select CLONE_BACKWARDS select TTY # Needed for pdc_cons.c
arch/parisc/include/asm/floppy.h +2 -2
@@ -179,7 +179,7 @@ static void _fd_chose_dma_mode(char *addr, unsigned long size) {if (can_use_virtual_dma ==2 ) {if ((unsigned int ) addr >= (unsigned int ) high_memory || -virt_to_bus (addr) >=0x1000000 || +virt_to_phys (addr) >=0x1000000 ||_CROSS_64KB (addr, size,0 )) use_virtual_dma =1 ;else
@@ -215,7 +215,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) doing_pdma =0 ;clear_dma_ff (FLOPPY_DMA );set_dma_mode (FLOPPY_DMA ,mode); -set_dma_addr (FLOPPY_DMA ,virt_to_bus (addr)); +set_dma_addr (FLOPPY_DMA ,virt_to_phys (addr));set_dma_count (FLOPPY_DMA ,size);enable_dma (FLOPPY_DMA );return 0 ;
arch/parisc/include/asm/io.h +0 -2
@@ -7,8 +7,6 @@#define virt_to_phys (a) ((unsigned long)__pa(a))#define phys_to_virt (a) __va(a) -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virtstatic inline unsigned long isa_bus_to_virt (unsigned long addr) {BUG ();
arch/powerpc/Kconfig +0 -1
@@ -277,7 +277,6 @@ config PPC select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK select TRACE_IRQFLAGS_SUPPORT - select VIRT_TO_BUS if !PPC64 # # Please keep this list sorted alphabetically. #
arch/powerpc/include/asm/io.h +0 -2
@@ -985,8 +985,6 @@ static inline void * bus_to_virt(unsigned long address) }#define bus_to_virt bus_to_virt -#define page_to_bus (page) (page_to_phys(page) + PCI_DRAM_OFFSET) -#endif /* CONFIG_PPC32 */ /* access ports */
arch/riscv/include/asm/page.h +0 -1
@@ -167,7 +167,6 @@ extern phys_addr_t __phys_addr_symbol(unsigned long x);#define page_to_virt (page) (pfn_to_virt(page_to_pfn(page)))#define page_to_phys (page) (pfn_to_phys(page_to_pfn(page))) -#define page_to_bus (page) (page_to_phys(page))#define phys_to_page (paddr) (pfn_to_page(phys_to_pfn(paddr)))#define sym_to_pfn (x) __phys_to_pfn(__pa_symbol(x))
arch/x86/Kconfig +0 -1
@@ -278,7 +278,6 @@ config X86 select THREAD_INFO_IN_TASK select TRACE_IRQFLAGS_SUPPORT select USER_STACKTRACE_SUPPORT - select VIRT_TO_BUS select HAVE_ARCH_KCSAN if X86_64 select X86_FEATURE_NAMES if PROC_FS select PROC_PID_ARCH_STATUS if PROC_FS
arch/x86/include/asm/io.h +0 -9
@@ -169,15 +169,6 @@ static inline unsigned int isa_virt_to_bus(volatile void *address) }#define isa_bus_to_virt phys_to_virt -/* -* However PCI ones are not necessarily 1:1 and therefore these interfaces -* are forbidden in portable PCI drivers. -* -* Allow them on x86 for legacy drivers, though. -*/ -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt -/* * The default ioremap() behavior is non-cached; if you need something * else, you probably want one of the following.
arch/xtensa/Kconfig +0 -1
@@ -50,7 +50,6 @@ config XTENSA select MODULES_USE_ELF_RELA select PERF_USE_VMALLOC select TRACE_IRQFLAGS_SUPPORT - select VIRT_TO_BUS help Xtensa processors are 32-bit RISC machines designed by Tensilica primarily for embedded systems. These processors are both
arch/xtensa/include/asm/io.h +0 -3
@@ -63,9 +63,6 @@ static inline void iounmap(volatile void __iomem *addr) xtensa_iounmap(addr); } -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt -#endif /* CONFIG_MMU */ #include <asm-generic/io.h>
include/asm-generic/io.h +0 -14
@@ -1059,20 +1059,6 @@ static inline void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) }#endif -#ifdef CONFIG_VIRT_TO_BUS -#ifndef virt_to_bus -static inline unsigned long virt_to_bus (void *address) -{ -return (unsigned long )address; -} - -static inline void *bus_to_virt (unsigned long address) -{ -return (void *)address; -} -#endif -#endif -#ifndef memset_io#define memset_io memset_io/**
mm/Kconfig +0 -8
@@ -639,14 +639,6 @@ config BOUNCE memory available to the CPU. Enabled by default when HIGHMEM is selected, but you may say n to override this. -config VIRT_TO_BUS - bool - help - An architecture should select this if it implements the - deprecated interface virt_to_bus(). All new architectures - should probably not select this. - - config MMU_NOTIFIER bool select SRCU
Signature · 1 line
2.29.2
A message that is not in the archive (sent off-list or not yet received): 20220606084109.4108188-7-arnd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Re: [PATCH 6/6] arch/*/: remove CONFIG_VIRT_TO_BUS
Quoted 22 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
All architecture-independent users of
virt_to_bus()andbus_to_virt()have been fixed to use the dma mapping interfaces or have been removed now. This means the definitions on most architectures, and theCONFIG_VIRT_TO_BUSsymbol are now obsolete and can be removed.The only exceptions to this are a few network and scsi drivers for m68k Amiga and VME machines and ppc32 Macintosh. These drivers work correctly with the old interfaces and are probably not worth changing.
On alpha and parisc,
virt_to_bus()were still used inasm/floppy.h. alpha can useisa_virt_to_bus()like x86 does, and parisc can just open-code thevirt_to_phys()here, as this is architecture specific code.I tried updating the
bus-virt-phys-mapping.rstdocumentation, which started as an email from Linus to explain some details of the Linux-2.0 driver interfaces. The bits aboutvirt_to_bus()were declared obsolete backin 2000, and the rest is not all that relevant any more, so in the end I just decided to remove the file completely.
Quoted 4 lines
Signed-off-by Arnd Bergmann <[email protected]>arch/m68k/Kconfig | 1 - arch/m68k/include/asm/virtconvert.h | 4 +-
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH 6/6] arch/*/: remove CONFIG_VIRT_TO_BUS
In reply to Arnd BergmannQuoted 18 lines · Arnd Bergmann
arch/powerpc/Kconfig +0
-1@@ -277,7 +277,6 @@ config PPC select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK select TRACE_IRQFLAGS_SUPPORT - select VIRT_TO_BUS if !PPC64 # # Please keep this list sorted alphabetically. #arch/powerpc/include/asm/io.h +0
-0
arch/powerpc/include/asm/io.h static inline void * bus_to_virt(unsigned long address) · line 988
Quoted 6 lines
arch/powerpc/include/asm/io.h +0
-2@@ -985,8 +985,6 @@ static inline void * bus_to_virt(unsigned long address) }#define bus_to_virt bus_to_virt -#define page_to_bus (page) (page_to_phys(page) + PCI_DRAM_OFFSET) -#endif /* CONFIG_PPC32 */
Seems that's not used by any drivers, so fine to remove.
cheers
Quoted 12 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The virt_to_bus/bus_to_virt interface has been deprecated for decades. After Jakub Kicinski put a lot of work into cleaning out the network drivers using them, there are only a couple of other drivers left, which can all be removed or otherwise cleaned up, to remove the old interface for good.
Any out of tree drivers using
virt_to_bus()should be converted to using the dma-mapping interfaces, typicallydma_alloc_coherent()ordma_map_single()).
Quoted 7 lines
There are a few m68k and ppc32 specific drivers that keep using the interfaces, but these are all guarded with architecture-specific
Kconfigdependencies, and are not actually broken.There are still a number of drivers that are using
virt_to_phys()andphys_to_virt()in place of dma-mapping operations, and these are often broken, but they are out of scope for this series.
I'll take patches 1 and 2 right now through my staging tree if that's ok.
thanks,
greg k-h
Quoted 3 lines · Greg Kroah-Hartman
I'll take patches 1 and 2 right now through my staging tree if that's ok.
Yes, that's perfect, as there are no actual interdependencies with the other drivers -- applying the last patch first would just hide the driver I'm removing here.
Thanks,
Arnd
Quoted 18 lines · Greg Kroah-Hartman
Quoted 16 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The virt_to_bus/bus_to_virt interface has been deprecated for decades. After Jakub Kicinski put a lot of work into cleaning out the network drivers using them, there are only a couple of other drivers left, which can all be removed or otherwise cleaned up, to remove the old interface for good.
Any out of tree drivers using
virt_to_bus()should be converted to using the dma-mapping interfaces, typicallydma_alloc_coherent()ordma_map_single()).There are a few m68k and ppc32 specific drivers that keep using the interfaces, but these are all guarded with architecture-specific
Kconfigdependencies, and are not actually broken.
Quoted 7 lines
Quoted 3 lines
There are still a number of drivers that are using
virt_to_phys()andphys_to_virt()in place of dma-mapping operations, and these are often broken, but they are out of scope for this series.I'll take patches 1 and 2 right now through my staging tree if that's ok.
Hi,
I'd love to say that I could fix this stuff up, however I've lacked access to suitable hardware for a long time now and don't foresee that changing any time soon...
Martyn
Quoted 4 lines
thanks,
greg k-h