xen: features for 5.4-rc1
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCXYzHbAAKCRCAXGG7T9hj vhKNAQCjraD9oDM2XKziBsubdhft7S05AVPpAJFCQufldbHvOQD9GhJGSVSOdjpz sBtitmie8Nyjgno4GtdiHZqpWPjBAAk= =aSTl -----END PGP SIGNATURE----- Merge tag 'for-linus-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen update from Juergen Gross: "Only two small patches this time: - a small cleanup for swiotlb-xen - a fix for PCI initialization for some platforms" * tag 'for-linus-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/pci: reserve MCFG areas earlier swiotlb-xen: Convert to use macro
This commit is contained in:
Коммит
ec56103e18
|
@ -17,6 +17,8 @@
|
|||
#include "../pci/pci.h"
|
||||
#ifdef CONFIG_PCI_MMCONFIG
|
||||
#include <asm/pci_x86.h>
|
||||
|
||||
static int xen_mcfg_late(void);
|
||||
#endif
|
||||
|
||||
static bool __read_mostly pci_seg_supported = true;
|
||||
|
@ -28,7 +30,18 @@ static int xen_add_device(struct device *dev)
|
|||
#ifdef CONFIG_PCI_IOV
|
||||
struct pci_dev *physfn = pci_dev->physfn;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_MMCONFIG
|
||||
static bool pci_mcfg_reserved = false;
|
||||
/*
|
||||
* Reserve MCFG areas in Xen on first invocation due to this being
|
||||
* potentially called from inside of acpi_init immediately after
|
||||
* MCFG table has been finally parsed.
|
||||
*/
|
||||
if (!pci_mcfg_reserved) {
|
||||
xen_mcfg_late();
|
||||
pci_mcfg_reserved = true;
|
||||
}
|
||||
#endif
|
||||
if (pci_seg_supported) {
|
||||
struct {
|
||||
struct physdev_pci_device_add add;
|
||||
|
@ -201,7 +214,7 @@ static int __init register_xen_pci_notifier(void)
|
|||
arch_initcall(register_xen_pci_notifier);
|
||||
|
||||
#ifdef CONFIG_PCI_MMCONFIG
|
||||
static int __init xen_mcfg_late(void)
|
||||
static int xen_mcfg_late(void)
|
||||
{
|
||||
struct pci_mmcfg_region *cfg;
|
||||
int rc;
|
||||
|
@ -240,8 +253,4 @@ static int __init xen_mcfg_late(void)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Needs to be done after acpi_init which are subsys_initcall.
|
||||
*/
|
||||
subsys_initcall_sync(xen_mcfg_late);
|
||||
#endif
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <asm/xen/page-coherent.h>
|
||||
|
||||
#include <trace/events/swiotlb.h>
|
||||
#define MAX_DMA_BITS 32
|
||||
/*
|
||||
* Used to do a quick range check in swiotlb_tbl_unmap_single and
|
||||
* swiotlb_tbl_sync_single_*, to see if the memory was in fact allocated by this
|
||||
|
@ -115,8 +116,6 @@ static int is_xen_swiotlb_buffer(dma_addr_t dma_addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int max_dma_bits = 32;
|
||||
|
||||
static int
|
||||
xen_swiotlb_fixup(void *buf, size_t size, unsigned long nslabs)
|
||||
{
|
||||
|
@ -136,7 +135,7 @@ xen_swiotlb_fixup(void *buf, size_t size, unsigned long nslabs)
|
|||
p + (i << IO_TLB_SHIFT),
|
||||
get_order(slabs << IO_TLB_SHIFT),
|
||||
dma_bits, &dma_handle);
|
||||
} while (rc && dma_bits++ < max_dma_bits);
|
||||
} while (rc && dma_bits++ < MAX_DMA_BITS);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче