Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iommu/amd: Make amd_iommu_make_clear_dte() non-static inline

This will be reused in a new nested.c file for nested translation.

Also, remove unused function parameter ptr.

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

authored by

Suravee Suthikulpanit and committed by
Joerg Roedel
11cfa782 5335fc16

+10 -11
+8
drivers/iommu/amd/amd_iommu.h
··· 190 190 struct dev_table_entry *get_dev_table(struct amd_iommu *iommu); 191 191 struct iommu_dev_data *search_dev_data(struct amd_iommu *iommu, u16 devid); 192 192 193 + static inline void 194 + amd_iommu_make_clear_dte(struct iommu_dev_data *dev_data, struct dev_table_entry *new) 195 + { 196 + /* All existing DTE must have V bit set */ 197 + new->data128[0] = DTE_FLAG_V; 198 + new->data128[1] = 0; 199 + } 200 + 193 201 #endif /* AMD_IOMMU_H */
+2 -11
drivers/iommu/amd/iommu.c
··· 2015 2015 return ret; 2016 2016 } 2017 2017 2018 - static void make_clear_dte(struct iommu_dev_data *dev_data, struct dev_table_entry *ptr, 2019 - struct dev_table_entry *new) 2020 - { 2021 - /* All existing DTE must have V bit set */ 2022 - new->data128[0] = DTE_FLAG_V; 2023 - new->data128[1] = 0; 2024 - } 2025 - 2026 2018 /* 2027 2019 * Note: 2028 2020 * The old value for GCR3 table and GPT have been cleared from caller. ··· 2064 2072 struct dev_table_entry *dte = &get_dev_table(iommu)[dev_data->devid]; 2065 2073 struct pt_iommu_amdv1_hw_info pt_info; 2066 2074 2067 - make_clear_dte(dev_data, dte, &new); 2075 + amd_iommu_make_clear_dte(dev_data, &new); 2068 2076 2069 2077 if (gcr3_info && gcr3_info->gcr3_tbl) 2070 2078 domid = dev_data->gcr3_info.domid; ··· 2145 2153 static void clear_dte_entry(struct amd_iommu *iommu, struct iommu_dev_data *dev_data) 2146 2154 { 2147 2155 struct dev_table_entry new = {}; 2148 - struct dev_table_entry *dte = &get_dev_table(iommu)[dev_data->devid]; 2149 2156 2150 - make_clear_dte(dev_data, dte, &new); 2157 + amd_iommu_make_clear_dte(dev_data, &new); 2151 2158 update_dte256(iommu, dev_data, &new); 2152 2159 } 2153 2160