Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1704588

[PATCH 00/10] PCI: pci resource allocation test module

From Yinghai Lu <yinghai@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 00/10] PCI: pci resource allocation test module
Date 2017-08-05 08:40 +0200
Message-ID <ub0UF-189-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] PCI: pci resource allocation test module Yinghai Lu <yinghai@kernel.org> - 2017-08-05 08:40 +0200
  [PATCH 03/10] PCI: export symbol for PCI_TEST module Yinghai Lu <yinghai@kernel.org> - 2017-08-05 08:50 +0200
  [PATCH 04/10] PCI: extend pci device match_driver state Yinghai Lu <yinghai@kernel.org> - 2017-08-05 08:50 +0200
  [PATCH 01/10] PCI: avoid arch_remove_reservations() for PCI_TEST Yinghai Lu <yinghai@kernel.org> - 2017-08-05 08:50 +0200

csiph-web