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