Re: [PATCH 6/8] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-01-18 Thread Jason Gunthorpe
On Wed, Jan 18, 2023 at 01:18:18AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Tuesday, January 17, 2023 9:30 PM > > > > On Tue, Jan 17, 2023 at 03:35:08AM +, Tian, Kevin wrote: > > > > From: Jason Gunthorpe > > > > Sent: Saturday, January 7, 2023 12:43 AM > > > > > > > >

Re: [PATCH 1/2] wifi: cfg80211: Add beacon hint notifier support

2023-01-18 Thread Johannes Berg
> +++ b/include/net/cfg80211.h > @@ -5386,6 +5386,8 @@ struct wiphy { > void (*reg_notifier)(struct wiphy *wiphy, >struct regulatory_request *request); > > + void (*beacon_hint_notifier)(struct wiphy *wiphy); missing documentation, for sure Also this

[PATCH v2 02/10] iommu: Remove iommu_map_atomic()

2023-01-18 Thread Jason Gunthorpe
There is only one call site and it can now just pass the GFP_ATOMIC to the normal iommu_map(). Signed-off-by: Jason Gunthorpe --- drivers/iommu/dma-iommu.c | 2 +- drivers/iommu/iommu.c | 7 --- include/linux/iommu.h | 9 - 3 files changed, 1 insertion(+), 17 deletions(-)

[PATCH v2 03/10] iommu: Add a gfp parameter to iommu_map_sg()

2023-01-18 Thread Jason Gunthorpe
Follow the pattern for iommu_map() and remove iommu_map_sg_atomic(). This allows __iommu_dma_alloc_noncontiguous() to use a GFP_KERNEL allocation here, based on the provided gfp flags. Signed-off-by: Jason Gunthorpe --- drivers/iommu/dma-iommu.c | 5 +++-- drivers/iommu/iommu.c | 26

[PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-01-18 Thread Jason Gunthorpe
Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and __domain_mapping(). Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel/iommu.c

[kvalo-ath:pending] BUILD SUCCESS 25844d62c9351ba63242a700097adff33329eeb8

2023-01-18 Thread kernel test robot
titan_defconfig powerpc mpc837x_mds_defconfig mips maltasmvp_defconfig riscvrandconfig-r042-20230118 s390 randconfig-r044-20230118 arc randconfig-r043-20230118 powerpc eiger_defconfig arc

[PATCH v2 00/10] Let iommufd charge IOPTE allocations to the memory cgroup

2023-01-18 Thread Jason Gunthorpe
iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT to charge its own memory. However, one of the biggest consumers of kernel memory is the

[kvalo-ath:master-pending] BUILD SUCCESS c7eda91f0fb0f8269511ab5e32db5ac878e946a5

2023-01-18 Thread kernel test robot
maltasmvp_defconfig riscvrandconfig-r042-20230118 s390 randconfig-r044-20230118 arc randconfig-r043-20230118 powerpc eiger_defconfig arc nsimosci_hs_defconfig i386 randconfig-c001 i386

[PATCH v2 06/10] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-01-18 Thread Jason Gunthorpe
This is eventually called by iommufd through intel_iommu_map_pages() and it should not be forced to atomic. Push the GFP_ATOMIC to all callers. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 14 +++--- drivers/iommu/intel/iommu.h | 2 +- drivers/iommu/intel/pasid.c |

[PATCH v2 05/10] iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map()

2023-01-18 Thread Jason Gunthorpe
iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT. However, one of the biggest consumers of kernel memory is the IOPTEs stored under the

[PATCH v2 01/10] iommu: Add a gfp parameter to iommu_map()

2023-01-18 Thread Jason Gunthorpe
The internal mechanisms support this, but instead of exposting the gfp to the caller it wrappers it into iommu_map() and iommu_map_atomic() Fix this instead of adding more variants for GFP_KERNEL_ACCOUNT. Signed-off-by: Jason Gunthorpe --- arch/arm/mm/dma-mapping.c | 11

[PATCH v2 09/10] iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s

2023-01-18 Thread Jason Gunthorpe
dma_alloc_cpu_table() and dma_alloc_page_table() are eventually called by iommufd through s390_iommu_map_pages() and it should not be forced to atomic. Thread the gfp parameter through the call chain starting from s390_iommu_map_pages(). Reviewed-by: Niklas Schnelle Signed-off-by: Jason

[kvalo-ath:master] BUILD SUCCESS ddd8e84e007263f3aa8993f32a3dd4dc8ec0876a

2023-01-18 Thread kernel test robot
randconfig-r043-20230118 m68kq40_defconfig powerpc taishan_defconfig shtitan_defconfig powerpc mpc837x_mds_defconfig mips maltasmvp_defconfig riscvrandconfig-r042-20230118 s390

[kvalo-ath:ath-qca] BUILD SUCCESS ea726a8d305ac2db035028aa6c23e3e7b7747837

2023-01-18 Thread kernel test robot
-20230118 s390 randconfig-r044-20230118 arc randconfig-r043-20230118 i386 randconfig-a012 i386 randconfig-a014 i386 randconfig-a016 clang tested configs: x86_64 randconfig-a001

[PATCH v2 08/10] iommu/intel: Use GFP_KERNEL in sleepable contexts

2023-01-18 Thread Jason Gunthorpe
These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/intel/iommu.c

[PATCH v2 10/10] iommu/s390: Use GFP_KERNEL in sleepable contexts

2023-01-18 Thread Jason Gunthorpe
These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Reviewed-by: Niklas Schnelle Signed-off-by: Jason Gunthorpe --- arch/s390/pci/pci_dma.c| 2 +- drivers/iommu/s390-iommu.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v2 04/10] iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous()

2023-01-18 Thread Jason Gunthorpe
Change the sg_alloc_table_from_pages() allocation that was hardwired to GFP_KERNEL to use the gfp parameter like the other allocations in this function. Auditing says this is never called from an atomic context, so it is safe as is, but reads wrong. Signed-off-by: Jason Gunthorpe ---

RE: [PATCH v2 01/10] iommu: Add a gfp parameter to iommu_map()

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > The internal mechanisms support this, but instead of exposting the gfp to > the caller it wrappers it into iommu_map() and iommu_map_atomic() > > Fix this instead of adding more variants for GFP_KERNEL_ACCOUNT. > >

RE: [PATCH v2 03/10] iommu: Add a gfp parameter to iommu_map_sg()

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > Follow the pattern for iommu_map() and remove iommu_map_sg_atomic(). > > This allows __iommu_dma_alloc_noncontiguous() to use a GFP_KERNEL > allocation here, based on the provided gfp flags. > > Signed-off-by: Jason

RE: [PATCH v2 02/10] iommu: Remove iommu_map_atomic()

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > There is only one call site and it can now just pass the GFP_ATOMIC to the > normal iommu_map(). > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian ___ ath10k mailing

RE: [PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and > __domain_mapping(). > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian ___ ath10k mailing list

Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.

2023-01-18 Thread Wen Gong
On 12/22/2022 8:42 PM, Youghandhar Chintala wrote: ... +static void ath10k_mac_beacon_notifier(struct wiphy *wiphy) +{ + struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); + struct ath10k *ar = hw->priv; + + if (ath10k_update_channel_list(ar)) +

RE: [PATCH v2 04/10] iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous()

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > Change the sg_alloc_table_from_pages() allocation that was hardwired to > GFP_KERNEL to use the gfp parameter like the other allocations in this > function. > > Auditing says this is never called from an atomic context, so

RE: [PATCH v2 06/10] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > This is eventually called by iommufd through intel_iommu_map_pages() and > it should not be forced to atomic. Push the GFP_ATOMIC to all callers. > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian

RE: [PATCH v2 05/10] iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map()

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > iommufd follows the same design as KVM and uses memory cgroups to limit > the amount of kernel memory a iommufd file descriptor can pin down. The > various internal data structures already use GFP_KERNEL_ACCOUNT. > >

RE: [PATCH v2 08/10] iommu/intel: Use GFP_KERNEL in sleepable contexts

2023-01-18 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > These contexts are sleepable, so use the proper annotation. The > GFP_ATOMIC > was added mechanically in the prior patches. > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian

Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.

2023-01-18 Thread Youghandhar Chintala (Temp)
On 1/19/2023 7:56 AM, Wen Gong wrote: On 12/22/2022 8:42 PM, Youghandhar Chintala wrote: ...   +static void ath10k_mac_beacon_notifier(struct wiphy *wiphy) +{ +    struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); +    struct ath10k *ar = hw->priv; + +    if