1. 22 5月, 2020 1 次提交
  2. 30 3月, 2020 2 次提交
    • I
      PCI: Add support for root bus sizing · 2c8d5a2d
      Ivan Kokshaysky 提交于
      In certain cases we should be able to enumerate IO and MEM ranges of all
      PCI devices installed in the system, and then set respective host bridge
      apertures basing on calculated size and alignment.  Particularly when
      firmware is broken and fails to assign bridge windows properly, like on
      Alpha UP1500 platform.
      
      Actually, almost everything is already in place, and required changes are
      minimal:
      
      - add "size_windows" flag to struct pci_host_bridge: when set, it
        instructs __pci_bus_size_bridges() to continue with the root bus;
      - in the __pci_bus_size_bridges() path: add checks for bus->self,
        as it can legitimately be null for the root bus.
      
      Link: https://lore.kernel.org/r/20200314194355.GA12510@mail.rc.ruTested-by: NMatt Turner <mattst88@gmail.com>
      Signed-off-by: NIvan Kokshaysky <ink@jurassic.park.msu.ru>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      2c8d5a2d
    • M
      PCI: Use ioremap(), not phys_to_virt() for platform ROM · 72e0ef0e
      Mikel Rychliski 提交于
      On some EFI systems, the video BIOS is provided by the EFI firmware.  The
      boot stub code stores the physical address of the ROM image in pdev->rom.
      Currently we attempt to access this pointer using phys_to_virt(), which
      doesn't work with CONFIG_HIGHMEM.
      
      On these systems, attempting to load the radeon module on a x86_32 kernel
      can result in the following:
      
        BUG: unable to handle page fault for address: 3e8ed03c
        #PF: supervisor read access in kernel mode
        #PF: error_code(0x0000) - not-present page
        *pde = 00000000
        Oops: 0000 [#1] PREEMPT SMP
        CPU: 0 PID: 317 Comm: systemd-udevd Not tainted 5.6.0-rc3-next-20200228 #2
        Hardware name: Apple Computer, Inc. MacPro1,1/Mac-F4208DC8, BIOS     MP11.88Z.005C.B08.0707021221 07/02/07
        EIP: radeon_get_bios+0x5ed/0xe50 [radeon]
        Code: 00 00 84 c0 0f 85 12 fd ff ff c7 87 64 01 00 00 00 00 00 00 8b 47 08 8b 55 b0 e8 1e 83 e1 d6 85 c0 74 1a 8b 55 c0 85 d2 74 13 <80> 38 55 75 0e 80 78 01 aa 0f 84 a4 03 00 00 8d 74 26 00 68 dc 06
        EAX: 3e8ed03c EBX: 00000000 ECX: 3e8ed03c EDX: 00010000
        ESI: 00040000 EDI: eec04000 EBP: eef3fc60 ESP: eef3fbe0
        DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010206
        CR0: 80050033 CR2: 3e8ed03c CR3: 2ec77000 CR4: 000006d0
        Call Trace:
         r520_init+0x26/0x240 [radeon]
         radeon_device_init+0x533/0xa50 [radeon]
         radeon_driver_load_kms+0x80/0x220 [radeon]
         drm_dev_register+0xa7/0x180 [drm]
         radeon_pci_probe+0x10f/0x1a0 [radeon]
         pci_device_probe+0xd4/0x140
      
      Fix the issue by updating all drivers which can access a platform provided
      ROM. Instead of calling the helper function pci_platform_rom() which uses
      phys_to_virt(), call ioremap() directly on the pdev->rom.
      
      radeon_read_platform_bios() previously directly accessed an __iomem
      pointer. Avoid this by calling memcpy_fromio() instead of kmemdup().
      
      pci_platform_rom() now has no remaining callers, so remove it.
      
      Link: https://lore.kernel.org/r/20200319021623.5426-1-mikel@mikelr.comSigned-off-by: NMikel Rychliski <mikel@mikelr.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      72e0ef0e
  3. 29 3月, 2020 2 次提交
  4. 28 3月, 2020 1 次提交
  5. 11 3月, 2020 1 次提交
    • B
      PCI: Add pci_speed_string() · e56faff5
      Bjorn Helgaas 提交于
      Add pci_speed_string() to return a text description of the supplied bus or
      link speed.  The slot code previously used the private
      pci_bus_speed_strings[] array for this purpose, but adding this interface
      will enable us to consolidate similar code elsewhere.
      
      Export pcie_link_speed[] and pci_speed_string() so they can be used by
      modules.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      e56faff5
  6. 06 3月, 2020 1 次提交
  7. 05 3月, 2020 2 次提交
  8. 25 1月, 2020 1 次提交
  9. 19 12月, 2019 1 次提交
  10. 27 11月, 2019 1 次提交
  11. 21 11月, 2019 5 次提交
  12. 21 10月, 2019 2 次提交
  13. 16 10月, 2019 6 次提交
  14. 14 10月, 2019 1 次提交
  15. 10 10月, 2019 1 次提交
    • A
      crypto: inside-secure - Remove #ifdef checks · 977da073
      Arnd Bergmann 提交于
      When both PCI and OF are disabled, no drivers are registered, and
      we get some unused-function warnings:
      
      drivers/crypto/inside-secure/safexcel.c:1221:13: error: unused function 'safexcel_unregister_algorithms' [-Werror,-Wunused-function]
      static void safexcel_unregister_algorithms(struct safexcel_crypto_priv *priv)
      drivers/crypto/inside-secure/safexcel.c:1307:12: error: unused function 'safexcel_probe_generic' [-Werror,-Wunused-function]
      static int safexcel_probe_generic(void *pdev,
      drivers/crypto/inside-secure/safexcel.c:1531:13: error: unused function 'safexcel_hw_reset_rings' [-Werror,-Wunused-function]
      static void safexcel_hw_reset_rings(struct safexcel_crypto_priv *priv)
      
      It's better to make the compiler see what is going on and remove
      such ifdef checks completely. In case of PCI, this is trivial since
      pci_register_driver() is defined to an empty function that makes the
      compiler subsequently drop all unused code silently.
      
      The global pcireg_rc/ofreg_rc variables are not actually needed here
      since the driver registration does not fail in ways that would make
      it helpful.
      
      For CONFIG_OF, an IS_ENABLED() check is still required, since platform
      drivers can exist both with and without it.
      
      A little change to linux/pci.h is needed to ensure that
      pcim_enable_device() is visible to the driver. Moving the declaration
      outside of ifdef would be sufficient here, but for consistency with the
      rest of the file, adding an inline helper is probably best.
      
      Fixes: 212ef6f2 ("crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# pci.h
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      977da073
  16. 21 9月, 2019 1 次提交
  17. 07 9月, 2019 1 次提交
  18. 06 9月, 2019 1 次提交
  19. 31 8月, 2019 1 次提交
  20. 28 8月, 2019 1 次提交
  21. 12 8月, 2019 1 次提交
  22. 09 8月, 2019 1 次提交
  23. 30 7月, 2019 5 次提交