File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#ifndef _ASM_X86_UV_UV_H
33#define _ASM_X86_UV_UV_H
44
5- #include <asm/tlbflush.h>
6-
75enum uv_system_type {UV_NONE , UV_LEGACY_APIC , UV_X2APIC };
86
9- struct cpumask ;
10- struct mm_struct ;
11- struct flush_tlb_info ;
12-
137#ifdef CONFIG_X86_UV
148#include <linux/efi.h>
159
@@ -44,10 +38,6 @@ static inline int is_uv_system(void) { return 0; }
4438static inline int is_uv_hubbed (int uv ) { return 0 ; }
4539static inline void uv_cpu_init (void ) { }
4640static inline void uv_system_init (void ) { }
47- static inline const struct cpumask *
48- uv_flush_tlb_others (const struct cpumask * cpumask ,
49- const struct flush_tlb_info * info )
50- { return cpumask ; }
5141
5242#endif /* X86_UV */
5343
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ static union uvh_apicid uvh_apicid;
3333static int uv_node_id ;
3434
3535/* Unpack AT/OEM/TABLE ID's to be NULL terminated strings */
36- static u8 uv_archtype [UV_AT_SIZE ];
36+ static u8 uv_archtype [UV_AT_SIZE + 1 ];
3737static u8 oem_id [ACPI_OEM_ID_SIZE + 1 ];
3838static u8 oem_table_id [ACPI_OEM_TABLE_ID_SIZE + 1 ];
3939
@@ -320,7 +320,7 @@ static int __init decode_arch_type(unsigned long ptr)
320320
321321 if (n > 0 && n < sizeof (uv_ate -> archtype )) {
322322 pr_info ("UV: UVarchtype received from BIOS\n" );
323- uv_stringify (UV_AT_SIZE , uv_archtype , uv_ate -> archtype );
323+ uv_stringify (sizeof ( uv_archtype ) , uv_archtype , uv_ate -> archtype );
324324 return 1 ;
325325 }
326326 return 0 ;
@@ -378,7 +378,7 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
378378 if (!early_get_arch_type ())
379379
380380 /* If not use OEM ID for UVarchtype */
381- uv_stringify (UV_AT_SIZE , uv_archtype , _oem_id );
381+ uv_stringify (sizeof ( uv_archtype ) , uv_archtype , oem_id );
382382
383383 /* Check if not hubbed */
384384 if (strncmp (uv_archtype , "SGI" , 3 ) != 0 ) {
Original file line number Diff line number Diff line change @@ -333,6 +333,11 @@ static void dmar_pci_bus_del_dev(struct dmar_pci_notify_info *info)
333333 dmar_iommu_notify_scope_dev (info );
334334}
335335
336+ static inline void vf_inherit_msi_domain (struct pci_dev * pdev )
337+ {
338+ dev_set_msi_domain (& pdev -> dev , dev_get_msi_domain (& pdev -> physfn -> dev ));
339+ }
340+
336341static int dmar_pci_bus_notifier (struct notifier_block * nb ,
337342 unsigned long action , void * data )
338343{
@@ -342,8 +347,20 @@ static int dmar_pci_bus_notifier(struct notifier_block *nb,
342347 /* Only care about add/remove events for physical functions.
343348 * For VFs we actually do the lookup based on the corresponding
344349 * PF in device_to_iommu() anyway. */
345- if (pdev -> is_virtfn )
350+ if (pdev -> is_virtfn ) {
351+ /*
352+ * Ensure that the VF device inherits the irq domain of the
353+ * PF device. Ideally the device would inherit the domain
354+ * from the bus, but DMAR can have multiple units per bus
355+ * which makes this impossible. The VF 'bus' could inherit
356+ * from the PF device, but that's yet another x86'sism to
357+ * inflict on everybody else.
358+ */
359+ if (action == BUS_NOTIFY_ADD_DEVICE )
360+ vf_inherit_msi_domain (pdev );
346361 return NOTIFY_DONE ;
362+ }
363+
347364 if (action != BUS_NOTIFY_ADD_DEVICE &&
348365 action != BUS_NOTIFY_REMOVED_DEVICE )
349366 return NOTIFY_DONE ;
You can’t perform that action at this time.
0 commit comments