Le 11/02/2022 à 17:41, Zi Yan a écrit :
> From: Zi Yan
>
> alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging
> pageblocks with different migratetypes. It might unnecessarily convert
> extra pageblocks at the beginning and at the end of the range. Change
> alloc_contig_rang
>
> const struct iommu_ops intel_iommu_ops;
> @@ -903,7 +905,8 @@ static void pgtable_walk(struct intel_iommu *iommu,
> unsigned long pfn, u8 bus, u
> struct dmar_domain *domain;
> int offset, level;
>
> - info = dmar_search_domain_by_dev_info(iommu->segment, bus, devfn);
> +
On Mon, Feb 14, 2022 at 10:57:02AM +0800, Lu Baolu wrote:
> This removes unnecessary commented code.
Removing dead code is always good:
Reviewed-by: Christoph Hellwig
But someone might really want to take a look if draining makes sense here
or not.
__
On Mon, Feb 14, 2022 at 10:57:01AM +0800, Lu Baolu wrote:
> Remove blanks before goto labels.
The blanks are still pretty common in parts of the kernel, buf if you
want them gone that sounds fine:
Reviewed-by: Christoph Hellwig
___
iommu mailing list
i
On Mon, Feb 14, 2022 at 10:57:00AM +0800, Lu Baolu wrote:
> Some prototypes in iommu.c are unnecessary. Delete them.
>
> Signed-off-by: Lu Baolu
Looks good:
Reviewed-by: Christoph Hellwig
___
iommu mailing list
iommu@lists.linux-foundation.org
https:
On Mon, Feb 14, 2022 at 10:56:59AM +0800, Lu Baolu wrote:
> Remove unnecessary include files and sort the remaining alphabetically.
I can't see I like any of the sorting schemes very much, but dropping the
unused includes is always good, so:
Reviewed-by: Christoph Hellwig
___
Looks good,
Reviewed-by: Christoph Hellwig
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
> +int
> +isolate_single_pageblock(unsigned long boundary_pfn, gfp_t gfp_flags, int
> isolate_before_boundary);
Please avoid the completely unreadably long line. i.e.
int isolate_single_pageblock(unsigned long boundary_pfn, gfp_t gfp_flags,
int isolate_before_boundary);
Same in
Use the common compare helper from component.
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc: Jeremy Szu
Cc: Werner Sembach
Cc: Hui Wang
Cc: Cameron Berkenpas
Cc: Kailang Yang
Cc: Lucas Tanure
Cc: Sami Loone
Cc: alsa-de...@alsa-project.org
Signed-off-by: Yong Wu
---
sound/pci/hda/patch_realtek
Use the common compare helper from component.
Cc: Helge Deller
Cc: linux-o...@vger.kernel.org
Cc: linux-fb...@vger.kernel.org
Signed-off-by: Yong Wu
---
drivers/video/fbdev/omap2/omapfb/dss/dss.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/omap
Use the common compare helper from component.
Cc: Sebastian Reichel
Cc: linux...@vger.kernel.org
Signed-off-by: Yong Wu
---
drivers/power/supply/ab8500_charger.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/power/supply/ab8500_charger.c
b/drivers/power/sup
Use the common compare/release helpers from component.
Cc: Liam Girdwood
Cc: Mark Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc: Srinivas Kandagatla
Cc: Pierre-Louis Bossart
Cc: alsa-de...@alsa-project.org
Signed-off-by: Yong Wu
---
sound/soc/codecs/wcd938x.c | 18 --
1 fil
Use the common compare/release helpers from component.
Cc: Joerg Roedel
Cc: Will Deacon
Cc: Matthias Brugger
Cc: Yunfei Wang
Cc: Libo Kang
Cc: Anan Sun
Cc: Mingyuan Ma
Cc: Xueqi Zhang
Signed-off-by: Yong Wu
---
drivers/iommu/mtk_iommu.c| 4 ++--
drivers/iommu/mtk_iommu.h| 10 ---
Use the common release helper from component.
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Thomas Zimmermann
Signed-off-by: Yong Wu
---
drivers/gpu/drm/drm_of.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 5
Use the common compare helper from component.
Cc: Emma Anholt
Cc: Maxime Ripard
Signed-off-by: Yong Wu
---
drivers/gpu/drm/vc4/vc4_drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 16abc3a3d601..e
Use the common compare helper from component.
Cc: Tomi Valkeinen
Cc: Cai Huoqing
Cc: Arnd Bergmann
Cc: Laurent Pinchart
Signed-off-by: Yong Wu
---
drivers/gpu/drm/omapdrm/dss/dss.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c
b
Use the common compare helper from component.
Cc: Linus Walleij
Signed-off-by: Yong Wu
---
drivers/gpu/drm/mcde/mcde_drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index 5b5afc6aaf8e..a17bfbb152a2
Use the common compare helper from component.
Cc: Inki Dae
Cc: Joonyoung Shim
Cc: Seung-Woo Kim
Cc: Kyungmin Park
Cc: Krzysztof Kozlowski
Cc: linux-samsung-...@vger.kernel.org
Signed-off-by: Yong Wu
---
drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 +---
1 file changed, 1 insertion(+), 7
Use the common compare helper from component.
Cc: Sandy Huang
Cc: "Heiko St¨¹bner"
Cc: linux-rockc...@lists.infradead.org
Signed-off-by: Yong Wu
---
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/ro
Use the common compare helper from component.
Cc: Maxime Ripard
Cc: Chen-Yu Tsai
Cc: Jernej Skrabec
Cc: linux-su...@lists.linux.dev
Signed-off-by: Yong Wu
---
drivers/gpu/drm/sun4i/sun4i_drv.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/sun4
Use the common compare helper from component.
Cc: Benjamin Gaignard
Signed-off-by: Yong Wu
---
drivers/gpu/drm/sti/sti_drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index c7efb43b83ee..890c3103f6bd 1
Use the common compare helper from component.
Cc: Orson Zhai
Cc: Baolin Wang
Cc: Chunyan Zhang
Cc: Kevin Tang
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Signed-off-by: Yong Wu
---
drivers/gpu/drm/sprd/sprd_drm.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers
Use the common compare helper from component.
Cc: Rob Clark
Cc: Sean Paul
Cc: Abhinav Kumar
Cc: linux-arm-...@vger.kernel.org
Cc: freedr...@lists.freedesktop.org
Signed-off-by: Yong Wu
---
drivers/gpu/drm/msm/msm_drv.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
di
Use the common compare helper from component.
Cc: Neil Armstrong
Cc: Kevin Hilman
Cc: Jerome Brunet
Cc: Martin Blumenstingl
Cc: linux-amlo...@lists.infradead.org
Signed-off-by: Yong Wu
---
drivers/gpu/drm/meson/meson_drv.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff
Use the common compare helper from component.
Cc: Chun-Kuang Hu
Cc: Philipp Zabel
Signed-off-by: Yong Wu
---
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
b/drivers/gpu/drm/mediatek/mtk_d
Use the common compare helper from component.
Cc: Paul Cercueil
Cc: linux-m...@vger.kernel.org
Signed-off-by: Yong Wu
---
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
b/drivers/gpu/
Use the common compare helper from component.
Cc: Xinliang Liu
Cc: Tian Tao
Cc: John Stultz
Cc: Xinwei Kong
Cc: Chen Feng
Cc: Thomas Zimmermann
Cc: Laurent Pinchart
Cc: Hao Fang
Signed-off-by: Yong Wu
---
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 7 +--
1 file changed, 1 inse
Use the common compare helpers from component.
Cc: Lucas Stach
Cc: Russell King
Cc: Christian Gmeiner
Cc: etna...@lists.freedesktop.org
Signed-off-by: Yong Wu
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/driver
Use the common compare helpers from component.
Cc: Russell King
Signed-off-by: Yong Wu
---
drivers/gpu/drm/armada/armada_drv.c | 17 +++--
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/armada/armada_drv.c
b/drivers/gpu/drm/armada/armada_drv.c
index
Use the common compare helper from component.
Cc: "James (Qian) Wang"
Cc: Liviu Dudau
Cc: Mihail Atanassov
Cc: Brian Starkey
Signed-off-by: Yong Wu
---
drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/ar
The component requires the compare/release functions, there are so many
copies in current kernel. Just define four common helpers for them.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Signed-off-by: Yong Wu
---
I have run "make htmldocs". Due to my poor english, If the grammer is
wrong or ne
The component requires the compare/release functions, there are many
copies in current kernel. This patchset just defines four common helpers
for them. No functional change.
Change note:
v1: a) Split the original patch into many small patches.
b) Use device_match_of_node helper.
c) Move th
On 2/7/22 2:41 PM, Lu Baolu wrote:
Hi folks,
After a long time of evolution, the drivers/iommu/intel/iommu.c becomes
fat and a bit messy. This series tries to cleanup and refactor the
driver to make it more concise. Your comments are very appreciated.
Best regards,
baolu
Lu Baolu (10):
iomm
Use rculist for list of devices attached by a domain. And use the RCU
lock for read/write protection. As both the global device_domain array
and per-domain device_domain list are protected by RCU lock now, there
is no need to use the spinlock anymore. Cleanup device_domain_lock.
Signed-off-by: Lu
Replace the existing global device_domain_list with an array so that it
could be rapidly searched. The index of the array is composed by the PCI
segment, bus and devfn. Use RCU for lock protection.
Signed-off-by: Lu Baolu
---
include/linux/intel-iommu.h | 1 -
drivers/iommu/intel/iommu.c | 72 +
This removes unnecessary commented code.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index d7fac0a1761d..fb17ed8c08f3 100644
--- a/drivers/iommu/int
Remove blanks before goto labels.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index dfd3698406fa..d7fac0a1761d 100644
--- a/drivers/iommu/intel/iommu.c
++
Some prototypes in iommu.c are unnecessary. Delete them.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index b6a6fea8525d..dfd3698406fa 100644
--- a/drivers/iommu/intel/iom
Remove unnecessary include files and sort the remaining alphabetically.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 34 +++---
1 file changed, 7 insertions(+), 27 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index
Allocate and set the per-device iommu private data during iommu device
probe. This makes the per-device iommu private data always available
during iommu_probe_device() and iommu_release_device(). With this changed,
the dummy DEFER_DEVICE_DOMAIN_INFO pointer could be removed. The wrappers
for gettin
The domain and devinfo memory blocks are only allocated during device
probe and released during remove. There's no hot-path context, hence
no need for memory pools.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
drivers/iommu/intel/iommu.c | 104 ++--
These have been done in drivers/iommu/dma-iommu.c. Remove this duplicate
code.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
drivers/iommu/intel/iommu.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index b30759338
The "domains" field of the intel_iommu structure keeps the mapping of
domain_id to dmar_domain. This information is not used anywhere. Remove
and cleanup it to avoid unnecessary memory consumption.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
include/linux/intel-iommu.h | 1 -
dr
The Intel IOMMU driver has already converted to use default domain
framework in iommu core. There's no need to find a domain for the
device in the domain attaching path. Cleanup that code.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
drivers/iommu/intel/iommu.c | 21 --
Hi folks,
After a long time of evolution, the drivers/iommu/intel/iommu.c
becomes a bit messy. This series tries to cleanup and refactor
the driver to make it more concise.
It includes,
- Remove some unnecessary code, includes and prototypes;
- Move creating per-device driver data from domain_at
On 2/8/22 9:25 AM, Lu Baolu wrote:
Hi,
The guest pasid and aux-domain related code are dead code in current
iommu subtree. As we have reached a consensus that all these features
should be based on the new iommufd framework (which is under active
development), the first part of this series remove
Move the domain specific operations out of struct iommu_ops into a new
structure that only has domain specific operations. This solves the
problem of needing to know if the method vector for a given operation
needs to be retrieved from the device or the domain. Logically the domain
ops are the ones
This converts all the feasible instances of dev->bus->iommu_ops to
dev_iommu_ops() in order to make the operation of obtaining iommu_ops
from a device consistent. The dev_iommu_ops() warns on NULL ops, so
we don't need to keep the confusing ops check.
Suggested-by: Robin Murphy
Signed-off-by: Lu
The is_attach_deferred iommu_ops callback is a device op. The domain
argument is unnecessary and never used. Remove it to make code clean.
Suggested-by: Robin Murphy
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
include/linux/iommu.h | 2 +-
The common iommu_ops is hooked to both device and domain. When a helper
has both device and domain pointer, the way to get the iommu_ops looks
messy in iommu core. This sorts out the way to get iommu_ops. The device
related helpers go through device pointer, while the domain related ones
go through
The supported page sizes of an iommu_domain are saved in the pgsize_bitmap
field. Retrieve the value from the right place.
Signed-off-by: Lu Baolu
Reviewed-by: Robin Murphy
Link:
https://lore.kernel.org/r/20211218074546.1772553-1-baolu...@linux.intel.com
Reviewed-by: Christoph Hellwig
Reviewed
The apply_resv_region callback in iommu_ops was introduced to reserve an
IOVA range in the given DMA domain when the IOMMU driver manages the IOVA
by itself. As all drivers converted to use dma-iommu in the core, there's
no driver using this anymore. Remove it to avoid dead code.
Suggested-by: Rob
The aux-domain related interfaces and iommu_ops are not referenced
anywhere in the tree. We've also reached a consensus to redesign it
based the new iommufd framework. Remove them to avoid dead code.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
includ
The aux-domain related callbacks are not called in the tree. Remove them
to avoid dead code.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
include/linux/intel-iommu.h | 17 --
drivers/iommu/intel/debugfs.c | 3 +-
drivers/iommu/intel/iommu.c | 3
The guest pasid related uapi interfaces and definitions are not referenced
anywhere in the tree. We've also reached a consensus to replace them with
a new iommufd design. Remove them to avoid dead code.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
inc
The guest pasid related callbacks are not called in the tree. Remove them
to avoid dead code.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
include/linux/intel-iommu.h | 10 --
include/linux/intel-svm.h | 12 ---
drivers/iommu/intel/pasid.h | 4 -
Hi,
The guest pasid and aux-domain related code are dead code in current
iommu subtree. As we have reached a consensus that all these features
should be based on the new iommufd framework (which is under active
development), the first part of this series removes and cleanups all
the dead code.
Th
Hi Robin,
On 2/9/22 9:52 PM, Robin Murphy wrote:
On 2022-02-08 01:25, Lu Baolu wrote:
The is_attach_deferred iommu_ops callback is a device op. The domain
argument is unnecessary and never used. Remove it to make code clean.
Suggested-by: Robin Murphy
Signed-off-by: Lu Baolu
---
include/li
Hi Adrian,
On 2/11/22 10:45 AM, Adrian Huang wrote:
From: Adrian Huang
When enabling VMD and IOMMU scalable mode, the following kernel panic
call trace/kernel log is shown in Eagle Stream platform (Sapphire Rapids
CPU) during booting:
pci :59:00.5: Adding to iommu group 42
...
vmd :59:
Hi Jason,
On 2/11/22 9:01 PM, Jason Gunthorpe wrote:
On Mon, Feb 07, 2022 at 02:41:32PM +0800, Lu Baolu wrote:
Hi folks,
After a long time of evolution, the drivers/iommu/intel/iommu.c becomes
fat and a bit messy. This series tries to cleanup and refactor the
driver to make it more concise. Yo
60 matches
Mail list logo