[SRU][F][PATCH 5/12] s390/pci: define kernel parameters for PCI multifunction
frank.heimes at canonical.com
frank.heimes at canonical.com
Mon May 18 18:24:31 UTC 2020
From: Pierre Morel <pmorel at linux.ibm.com>
BugLink: https://bugs.launchpad.net/bugs/1874056
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 <pmorel at linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle at linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor at linux.ibm.com>
(backported from commit 6cf17f9a67c124aa4739b79709008d942635b975)
Signed-off-by: Frank Heimes <frank.heimes at canonical.com>
---
arch/s390/include/asm/pci.h | 1 +
arch/s390/pci/pci.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
index 3ee949a83778..5dfcb8db5828 100644
--- a/arch/s390/include/asm/pci.h
+++ b/arch/s390/include/asm/pci.h
@@ -171,6 +171,7 @@ static inline bool zdev_enabled(struct zpci_dev *zdev)
extern const struct attribute_group *zpci_attr_groups[];
extern unsigned int s390_pci_force_floating __initdata;
+extern unsigned int s390_pci_no_rid;
/* -----------------------------------------------------------------------------
Prototypes
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index c0f80e896d7b..1675fef70690 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -47,6 +47,8 @@ static unsigned int zpci_num_domains_allocated;
min(((unsigned long) ZPCI_NR_DEVICES * PCI_BAR_COUNT / 2), \
ZPCI_IOMAP_MAX_ENTRIES)
+unsigned int s390_pci_no_rid;
+
static DEFINE_SPINLOCK(zpci_iomap_lock);
static unsigned long *zpci_iomap_bitmap;
struct zpci_iomap_entry *zpci_iomap_start;
@@ -886,6 +888,10 @@ char * __init pcibios_setup(char *str)
s390_pci_force_floating = 1;
return NULL;
}
+ if (!strcmp(str, "norid")) {
+ s390_pci_no_rid = 1;
+ return NULL;
+ }
return str;
}
--
2.25.1
More information about the kernel-team
mailing list