From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 00/10] PCI: pci resource allocation test module
Date: Fri, 4 Aug 2017 23:37:51 -0700 [thread overview]
Message-ID: <20170805063801.15880-1-yinghai@kernel.org> (raw)
Read from data file and mask file, to build simulated data structure, and
have pci_ops to use them.
Extract calling for pci_create_root_bus, scan_child_bus, resource survey
and resource assign ... to see if those functions work as expected with
simulated data.
mask is with rw bits on pci registers, so we can make pci BAR sizing working.
It also support bus number assign-all.
Only tested on x86 64bit arch.
# insmod pci_test.ko data_file=pci_test_data.txt mask_file=pci_test_mask.txt
# lspci -tv
# cat /proc/ioports_test
# cat /proc/iomem_test
# rmmod pci_test
also in git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for_pci_v4.14_pci_next
Thanks
Yinghai
Yinghai Lu (10):
PCI: avoid arch_remove_reservations() for PCI_TEST
PCI: introduce ioport_res/iomem_res for PCI_TEST
PCI: export symbol for PCI_TEST module
PCI: extend pci device match_driver state
PCI: Add PCI_TEST module for resource allocation
PCI: PCI_TEST simple data
PCI: PCI_TEST data from x5-8
PCI: PCI_TEST data from x5-8 with zeroed bus number
PCI: PCI_TEST data from x2-8
PCI: PCI_TEST data from x2-8 with zeroed bus number
arch/x86/kernel/resource.c | 15 +-
arch/x86/pci/i386.c | 1 +
drivers/iommu/amd_iommu_init.c | 2 +-
drivers/pci/Kconfig | 6 +
drivers/pci/Makefile | 2 +
drivers/pci/bus.c | 3 +-
drivers/pci/pci-driver.c | 2 +-
drivers/pci/pci_test.c | 1281 ++
drivers/pci/pci_test_data.txt | 24 +
drivers/pci/pci_test_data_x2-8.txt | 22818 +++++++++++++++++++++++++++++++
drivers/pci/pci_test_data_x2-8_bus.txt | 22818 +++++++++++++++++++++++++++++++
drivers/pci/pci_test_data_x5-8.txt | 5656 ++++++++
drivers/pci/pci_test_data_x5-8_bus.txt | 5656 ++++++++
drivers/pci/pci_test_mask.txt | 5 +
drivers/pci/pci_test_mask_x2-8.txt | 319 +
drivers/pci/pci_test_mask_x5-8.txt | 176 +
drivers/pci/probe.c | 4 +-
drivers/pci/quirks.c | 2 +-
drivers/pci/setup-bus.c | 3 +-
drivers/pci/setup-res.c | 4 +-
include/linux/ioport.h | 3 +-
include/linux/pci.h | 15 +-
kernel/resource.c | 7 +-
23 files changed, 58808 insertions(+), 14 deletions(-)
create mode 100644 drivers/pci/pci_test.c
create mode 100644 drivers/pci/pci_test_data.txt
create mode 100644 drivers/pci/pci_test_data_x2-8.txt
create mode 100644 drivers/pci/pci_test_data_x2-8_bus.txt
create mode 100644 drivers/pci/pci_test_data_x5-8.txt
create mode 100644 drivers/pci/pci_test_data_x5-8_bus.txt
create mode 100644 drivers/pci/pci_test_mask.txt
create mode 100644 drivers/pci/pci_test_mask_x2-8.txt
create mode 100644 drivers/pci/pci_test_mask_x5-8.txt
--
2.9.4
next reply other threads:[~2017-08-05 6:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-05 6:37 Yinghai Lu [this message]
2017-08-05 6:37 ` [PATCH 01/10] PCI: avoid arch_remove_reservations() for PCI_TEST Yinghai Lu
2017-08-05 6:37 ` [PATCH 02/10] PCI: introduce ioport_res/iomem_res " Yinghai Lu
2017-08-05 6:37 ` [PATCH 03/10] PCI: export symbol for PCI_TEST module Yinghai Lu
2017-08-05 6:37 ` [PATCH 04/10] PCI: extend pci device match_driver state Yinghai Lu
2017-08-05 6:37 ` [PATCH 05/10] PCI: Add PCI_TEST module for resource allocation Yinghai Lu
2017-08-05 6:37 ` [PATCH 06/10] PCI: PCI_TEST simple data Yinghai Lu
2017-08-05 6:37 ` [PATCH 07/10] PCI: PCI_TEST data from x5-8 Yinghai Lu
2017-08-05 6:37 ` [PATCH 08/10] PCI: PCI_TEST data from x5-8 with zeroed bus number Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170805063801.15880-1-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).