Commit 326fd6db authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A small set of fixes for x86:

   - Cure the fallout from the MSI irqdomain overhaul which missed that
     the Intel IOMMU does not register virtual function devices and
     therefore never reaches the point where the MSI interrupt domain is
     assigned. This made the VF devices use the non-remapped MSI domain
     which is trapped by the IOMMU/remap unit

   - Remove an extra space in the SGI_UV architecture type procfs output
     for UV5

   - Remove a unused function which was missed when removing the UV BAU
     TLB shootdown handler"

* tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  iommu/vt-d: Cure VF irqdomain hickup
  x86/platform/uv: Fix copied UV5 output archtype
  x86/platform/uv: Drop last traces of uv_flush_tlb_others
parents 64b609d6 ff828729
...@@ -2,14 +2,8 @@ ...@@ -2,14 +2,8 @@
#ifndef _ASM_X86_UV_UV_H #ifndef _ASM_X86_UV_UV_H
#define _ASM_X86_UV_UV_H #define _ASM_X86_UV_UV_H
#include <asm/tlbflush.h>
enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC}; enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC};
struct cpumask;
struct mm_struct;
struct flush_tlb_info;
#ifdef CONFIG_X86_UV #ifdef CONFIG_X86_UV
#include <linux/efi.h> #include <linux/efi.h>
...@@ -44,10 +38,6 @@ static inline int is_uv_system(void) { return 0; } ...@@ -44,10 +38,6 @@ static inline int is_uv_system(void) { return 0; }
static inline int is_uv_hubbed(int uv) { return 0; } static inline int is_uv_hubbed(int uv) { return 0; }
static inline void uv_cpu_init(void) { } static inline void uv_cpu_init(void) { }
static inline void uv_system_init(void) { } static inline void uv_system_init(void) { }
static inline const struct cpumask *
uv_flush_tlb_others(const struct cpumask *cpumask,
const struct flush_tlb_info *info)
{ return cpumask; }
#endif /* X86_UV */ #endif /* X86_UV */
......
...@@ -33,7 +33,7 @@ static union uvh_apicid uvh_apicid; ...@@ -33,7 +33,7 @@ static union uvh_apicid uvh_apicid;
static int uv_node_id; static int uv_node_id;
/* Unpack AT/OEM/TABLE ID's to be NULL terminated strings */ /* Unpack AT/OEM/TABLE ID's to be NULL terminated strings */
static u8 uv_archtype[UV_AT_SIZE]; static u8 uv_archtype[UV_AT_SIZE + 1];
static u8 oem_id[ACPI_OEM_ID_SIZE + 1]; static u8 oem_id[ACPI_OEM_ID_SIZE + 1];
static u8 oem_table_id[ACPI_OEM_TABLE_ID_SIZE + 1]; static u8 oem_table_id[ACPI_OEM_TABLE_ID_SIZE + 1];
...@@ -320,7 +320,7 @@ static int __init decode_arch_type(unsigned long ptr) ...@@ -320,7 +320,7 @@ static int __init decode_arch_type(unsigned long ptr)
if (n > 0 && n < sizeof(uv_ate->archtype)) { if (n > 0 && n < sizeof(uv_ate->archtype)) {
pr_info("UV: UVarchtype received from BIOS\n"); pr_info("UV: UVarchtype received from BIOS\n");
uv_stringify(UV_AT_SIZE, uv_archtype, uv_ate->archtype); uv_stringify(sizeof(uv_archtype), uv_archtype, uv_ate->archtype);
return 1; return 1;
} }
return 0; return 0;
...@@ -378,7 +378,7 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id) ...@@ -378,7 +378,7 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
if (!early_get_arch_type()) if (!early_get_arch_type())
/* If not use OEM ID for UVarchtype */ /* If not use OEM ID for UVarchtype */
uv_stringify(UV_AT_SIZE, uv_archtype, _oem_id); uv_stringify(sizeof(uv_archtype), uv_archtype, oem_id);
/* Check if not hubbed */ /* Check if not hubbed */
if (strncmp(uv_archtype, "SGI", 3) != 0) { if (strncmp(uv_archtype, "SGI", 3) != 0) {
......
...@@ -333,6 +333,11 @@ static void dmar_pci_bus_del_dev(struct dmar_pci_notify_info *info) ...@@ -333,6 +333,11 @@ static void dmar_pci_bus_del_dev(struct dmar_pci_notify_info *info)
dmar_iommu_notify_scope_dev(info); dmar_iommu_notify_scope_dev(info);
} }
static inline void vf_inherit_msi_domain(struct pci_dev *pdev)
{
dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&pdev->physfn->dev));
}
static int dmar_pci_bus_notifier(struct notifier_block *nb, static int dmar_pci_bus_notifier(struct notifier_block *nb,
unsigned long action, void *data) unsigned long action, void *data)
{ {
...@@ -342,8 +347,20 @@ static int dmar_pci_bus_notifier(struct notifier_block *nb, ...@@ -342,8 +347,20 @@ static int dmar_pci_bus_notifier(struct notifier_block *nb,
/* Only care about add/remove events for physical functions. /* Only care about add/remove events for physical functions.
* For VFs we actually do the lookup based on the corresponding * For VFs we actually do the lookup based on the corresponding
* PF in device_to_iommu() anyway. */ * PF in device_to_iommu() anyway. */
if (pdev->is_virtfn) if (pdev->is_virtfn) {
/*
* Ensure that the VF device inherits the irq domain of the
* PF device. Ideally the device would inherit the domain
* from the bus, but DMAR can have multiple units per bus
* which makes this impossible. The VF 'bus' could inherit
* from the PF device, but that's yet another x86'sism to
* inflict on everybody else.
*/
if (action == BUS_NOTIFY_ADD_DEVICE)
vf_inherit_msi_domain(pdev);
return NOTIFY_DONE; return NOTIFY_DONE;
}
if (action != BUS_NOTIFY_ADD_DEVICE && if (action != BUS_NOTIFY_ADD_DEVICE &&
action != BUS_NOTIFY_REMOVED_DEVICE) action != BUS_NOTIFY_REMOVED_DEVICE)
return NOTIFY_DONE; return NOTIFY_DONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment