These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / x86 / include / asm / amd_nb.h
index aaac3b2..3c56ef1 100644 (file)
@@ -81,7 +81,7 @@ static inline struct amd_northbridge *node_to_amd_nb(int node)
        return (node < amd_northbridges.num) ? &amd_northbridges.nb[node] : NULL;
 }
 
-static inline u16 amd_get_node_id(struct pci_dev *pdev)
+static inline u16 amd_pci_dev_to_node_id(struct pci_dev *pdev)
 {
        struct pci_dev *misc;
        int i;
@@ -98,11 +98,22 @@ static inline u16 amd_get_node_id(struct pci_dev *pdev)
        return 0;
 }
 
+static inline bool amd_gart_present(void)
+{
+       /* GART present only on Fam15h, upto model 0fh */
+       if (boot_cpu_data.x86 == 0xf || boot_cpu_data.x86 == 0x10 ||
+           (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model < 0x10))
+               return true;
+
+       return false;
+}
+
 #else
 
 #define amd_nb_num(x)          0
 #define amd_nb_has_feature(x)  false
 #define node_to_amd_nb(x)      NULL
+#define amd_gart_present(x)    false
 
 #endif