xref: /linux/arch/s390/pci/pci_fixup.c (revision 1260ed77798502de9c98020040d2995008de10cc)
1*aa9f168dSNiklas Schnelle // SPDX-License-Identifier: GPL-2.0
2*aa9f168dSNiklas Schnelle /*
3*aa9f168dSNiklas Schnelle  * Exceptions for specific devices,
4*aa9f168dSNiklas Schnelle  *
5*aa9f168dSNiklas Schnelle  * Copyright IBM Corp. 2025
6*aa9f168dSNiklas Schnelle  *
7*aa9f168dSNiklas Schnelle  * Author(s):
8*aa9f168dSNiklas Schnelle  *   Niklas Schnelle <schnelle@linux.ibm.com>
9*aa9f168dSNiklas Schnelle  */
10*aa9f168dSNiklas Schnelle #include <linux/pci.h>
11*aa9f168dSNiklas Schnelle 
12*aa9f168dSNiklas Schnelle static void zpci_ism_bar_no_mmap(struct pci_dev *pdev)
13*aa9f168dSNiklas Schnelle {
14*aa9f168dSNiklas Schnelle 	/*
15*aa9f168dSNiklas Schnelle 	 * ISM's BAR is special. Drivers written for ISM know
16*aa9f168dSNiklas Schnelle 	 * how to handle this but others need to be aware of their
17*aa9f168dSNiklas Schnelle 	 * special nature e.g. to prevent attempts to mmap() it.
18*aa9f168dSNiklas Schnelle 	 */
19*aa9f168dSNiklas Schnelle 	pdev->non_mappable_bars = 1;
20*aa9f168dSNiklas Schnelle }
21*aa9f168dSNiklas Schnelle DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IBM,
22*aa9f168dSNiklas Schnelle 			PCI_DEVICE_ID_IBM_ISM,
23*aa9f168dSNiklas Schnelle 			zpci_ism_bar_no_mmap);
24