linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] PCI: pci resource allocation test module
@ 2017-08-05  6:37 Yinghai Lu
  2017-08-05  6:37 ` [PATCH 01/10] PCI: avoid arch_remove_reservations() for PCI_TEST Yinghai Lu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Yinghai Lu @ 2017-08-05  6:37 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Linus Torvalds, linux-pci, linux-kernel, Yinghai Lu

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-05  6:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-05  6:37 [PATCH 00/10] PCI: pci resource allocation test module Yinghai Lu
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

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).