Skip to content

Commit 6cf17f9

Browse files
Pierre MorelVasily Gorbik
authored andcommitted
s390/pci: define kernel parameters for PCI multifunction
Using PCI multifunctions in S390 is a new feature we may want to ignore to continue provide the same topology as in the past to userland even if the configuration supports exposing the topology of a multi-Function device. A new boolean parameters allows to overwrite the kernel pci configuration: - pci=norid when on, disallow the use a new firmware field, RID, which provides the PCI <bus>:<device>.<function> part of the PCI address. To be used in the following patches and satisfy the checkpatch.pl the variable is exposed in pci.h Signed-off-by: Pierre Morel <[email protected]> Reviewed-by: Niklas Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent d08d6f5 commit 6cf17f9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/s390/include/asm/pci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ static inline bool zdev_enabled(struct zpci_dev *zdev)
168168

169169
extern const struct attribute_group *zpci_attr_groups[];
170170
extern unsigned int s390_pci_force_floating __initdata;
171+
extern unsigned int s390_pci_no_rid;
171172

172173
/* -----------------------------------------------------------------------------
173174
Prototypes

arch/s390/pci/pci.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ static unsigned int zpci_num_domains_allocated;
4848
min(((unsigned long) ZPCI_NR_DEVICES * PCI_STD_NUM_BARS / 2), \
4949
ZPCI_IOMAP_MAX_ENTRIES)
5050

51+
unsigned int s390_pci_no_rid;
52+
5153
static DEFINE_SPINLOCK(zpci_iomap_lock);
5254
static unsigned long *zpci_iomap_bitmap;
5355
struct zpci_iomap_entry *zpci_iomap_start;
@@ -844,6 +846,10 @@ char * __init pcibios_setup(char *str)
844846
s390_pci_force_floating = 1;
845847
return NULL;
846848
}
849+
if (!strcmp(str, "norid")) {
850+
s390_pci_no_rid = 1;
851+
return NULL;
852+
}
847853
return str;
848854
}
849855

0 commit comments

Comments
 (0)