Re: [PATCH] iommu/vt-d: Fix PCI bus rescan device hot add

2022-01-13 Thread Lu Baolu
On 1/14/22 11:11 AM, Jacob Pan wrote: On Fri, 14 Jan 2022 08:58:53 +0800, Lu Baolu wrote: Hi Jacob, On 1/13/22 9:23 PM, Jacob Pan wrote: During PCI bus rescan, adding new devices involve two notifiers. 1. dmar_pci_bus_notifier() 2. iommu_bus_notifier() The current code sets #1 as low priority

Re: [PATCH] iommu/vt-d: Fix PCI bus rescan device hot add

2022-01-13 Thread Jacob Pan
Hi BaoLu, On Fri, 14 Jan 2022 08:58:53 +0800, Lu Baolu wrote: > Hi Jacob, > > On 1/13/22 9:23 PM, Jacob Pan wrote: > > During PCI bus rescan, adding new devices involve two notifiers. > > 1. dmar_pci_bus_notifier() > > 2. iommu_bus_notifier() > > The current code sets #1 as low priority (INT_MI

Re: [PATCH] iommu/vt-d: Fix PCI bus rescan device hot add

2022-01-13 Thread Lu Baolu
Hi Jacob, On 1/13/22 9:23 PM, Jacob Pan wrote: During PCI bus rescan, adding new devices involve two notifiers. 1. dmar_pci_bus_notifier() 2. iommu_bus_notifier() The current code sets #1 as low priority (INT_MIN) which resulted in #2 being invoked first. The result is that struct device pointer

[PATCH] iommu/vt-d: Fix PCI bus rescan device hot add

2022-01-13 Thread Jacob Pan
During PCI bus rescan, adding new devices involve two notifiers. 1. dmar_pci_bus_notifier() 2. iommu_bus_notifier() The current code sets #1 as low priority (INT_MIN) which resulted in #2 being invoked first. The result is that struct device pointer cannot be found in DRHD search for the new device

Re: [RFC PATCH v3 2/8] mm: compaction: handle non-lru compound pages properly in isolate_migratepages_block().

2022-01-13 Thread Zi Yan via iommu
On 13 Jan 2022, at 9:57, Zi Yan wrote: > On 12 Jan 2022, at 6:01, David Hildenbrand wrote: > >> On 05.01.22 22:47, Zi Yan wrote: >>> From: Zi Yan >>> >>> In isolate_migratepages_block(), a !PageLRU tail page can be encountered >>> when the page is larger than a pageblock. Use compound head page f

Re: [PATCH v9 12/15] media: mtk-vcodec: enc: Remove mtk_vcodec_release_enc_pm

2022-01-13 Thread Matthias Brugger
Hi Hans, On 13/01/2022 11:15, Hans Verkuil wrote: On 13/01/2022 11:11, AngeloGioacchino Del Regno wrote: Il 11/01/22 11:57, AngeloGioacchino Del Regno ha scritto: Il 12/11/21 11:55, Yong Wu ha scritto: After this patchset, mtk_vcodec_release_enc_pm has only one line. then remove that function

Re: [RFC PATCH v3 3/8] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2022-01-13 Thread David Hildenbrand
On 13.01.22 16:46, Zi Yan wrote: > On 12 Jan 2022, at 6:04, David Hildenbrand wrote: > >> On 05.01.22 22:47, Zi Yan wrote: >>> From: Zi Yan >>> >>> alloc_migration_target() is used by alloc_contig_range() and non-LRU >>> movable compound pages can be migrated. Current code does not allocate the >

Re: [RFC PATCH v3 3/8] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2022-01-13 Thread Zi Yan via iommu
On 12 Jan 2022, at 6:04, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> alloc_migration_target() is used by alloc_contig_range() and non-LRU >> movable compound pages can be migrated. Current code does not allocate the >> right page size for such pages. Check TH

Re: [PATCH v3 2/7] dt-bindings: memory: mtk-smi: No need mediatek,larb-id for mt8167

2022-01-13 Thread AngeloGioacchino Del Regno
Il 13/01/22 12:10, Yong Wu ha scritto: Mute the warning from "make dtbs_check": larb@14016000: 'mediatek,larb-id' is a required property arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml larb@15001000: 'mediatek,larb-id' is a required property arch/arm64/boot/dts/mediatek/mt816

Re: [PATCH v3 3/7] dt-bindings: memory: mtk-smi: Correct minItems to 2 for the gals clocks

2022-01-13 Thread AngeloGioacchino Del Regno
Il 13/01/22 12:10, Yong Wu ha scritto: Mute the warning from "make dtbs_check": larb@14017000: clock-names: ['apb', 'smi'] is too short arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml ... larb@1601: clo

Re: [PATCH v3 4/7] dt-bindings: memory: mediatek: Add mt8186 support

2022-01-13 Thread AngeloGioacchino Del Regno
Il 13/01/22 12:10, Yong Wu ha scritto: Add mt8186 smi support in the bindings. Signed-off-by: Yong Wu Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfounda

Re: [PATCH v3 1/7] dt-bindings: memory: mtk-smi: Rename clock to clocks

2022-01-13 Thread AngeloGioacchino Del Regno
Il 13/01/22 12:10, Yong Wu ha scritto: The property "clock" should be rename to "clocks", and delete the "items", the minItems/maxItems should not be put under "items". Fixes: 27bb0e42855a ("dt-bindings: memory: mediatek: Convert SMI to DT schema") Signed-off-by: Yong Wu Acked-by: AngeloGioac

Re: [RFC PATCH v3 2/8] mm: compaction: handle non-lru compound pages properly in isolate_migratepages_block().

2022-01-13 Thread Zi Yan via iommu
On 12 Jan 2022, at 6:01, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> In isolate_migratepages_block(), a !PageLRU tail page can be encountered >> when the page is larger than a pageblock. Use compound head page for the >> checks inside and skip the entire comp

Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-13 Thread Zi Yan via iommu
On 13 Jan 2022, at 7:28, David Hildenbrand wrote: > On 13.01.22 12:36, Mike Rapoport wrote: >> On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: >>> On 05.01.22 22:47, Zi Yan wrote: From: Zi Yan This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance.

Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-13 Thread Zi Yan via iommu
On 12 Jan 2022, at 5:54, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. >> It prepares for the upcoming removal of the MAX_ORDER-1 alignment >> requirement for CMA and alloc_contig_range(). >

Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-13 Thread David Hildenbrand
On 13.01.22 12:36, Mike Rapoport wrote: > On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: >> On 05.01.22 22:47, Zi Yan wrote: >>> From: Zi Yan >>> >>> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. >>> It prepares for the upcoming removal of the MAX_ORDER

Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-13 Thread Mike Rapoport
On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: > > From: Zi Yan > > > > This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. > > It prepares for the upcoming removal of the MAX_ORDER-1 alignment > > requirement for CMA and a

[PATCH v3 6/7] memory: mtk-smi: Add sleep ctrl function

2022-01-13 Thread Yong Wu
Sleep control means that when the larb goes to sleep, we should wait a bit until all the current commands are finished. Thus, when the larb runtime suspends, we need to enable this function to wait until all the existed commands are finished. When the larb resumes, just disable this function. This

[PATCH v3 7/7] memory: mtk-smi: mt8186: Add smi support

2022-01-13 Thread Yong Wu
Add mt8186 SMI support. Signed-off-by: Yong Wu Acked-by: AngeloGioacchino Del Regno --- drivers/memory/mtk-smi.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index 12d15fcc65e2..378affd43fc4 100644 --- a/drivers/memory/mt

[PATCH v3 5/7] memory: mtk-smi: Fix the return value for clk_bulk_prepare_enable

2022-01-13 Thread Yong Wu
Function clk_bulk_prepare_enable() returns 0 for success or a negative number for error. Fix this code style issue. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno --- drivers/memory/mtk-smi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/mtk

[PATCH v3 4/7] dt-bindings: memory: mediatek: Add mt8186 support

2022-01-13 Thread Yong Wu
Add mt8186 smi support in the bindings. Signed-off-by: Yong Wu Acked-by: Rob Herring --- .../bindings/memory-controllers/mediatek,smi-common.yaml | 4 +++- .../bindings/memory-controllers/mediatek,smi-larb.yaml| 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/

[PATCH v3 3/7] dt-bindings: memory: mtk-smi: Correct minItems to 2 for the gals clocks

2022-01-13 Thread Yong Wu
Mute the warning from "make dtbs_check": larb@14017000: clock-names: ['apb', 'smi'] is too short arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml ... larb@1601: clock-names: ['apb', 'smi'] is too short

[PATCH v3 2/7] dt-bindings: memory: mtk-smi: No need mediatek, larb-id for mt8167

2022-01-13 Thread Yong Wu
Mute the warning from "make dtbs_check": larb@14016000: 'mediatek,larb-id' is a required property arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml larb@15001000: 'mediatek,larb-id' is a required property arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml larb@1601: 'mediate

[PATCH v3 1/7] dt-bindings: memory: mtk-smi: Rename clock to clocks

2022-01-13 Thread Yong Wu
The property "clock" should be rename to "clocks", and delete the "items", the minItems/maxItems should not be put under "items". Fixes: 27bb0e42855a ("dt-bindings: memory: mediatek: Convert SMI to DT schema") Signed-off-by: Yong Wu --- .../mediatek,smi-common.yaml | 28

[PATCH v3 0/7] MT8186 SMI SUPPORT

2022-01-13 Thread Yong Wu
This patchset adds mt8186 smi support. mainly adds a sleep control function. Change note: v3: a) Add a new binding patch for renaming "clock" to "clocks". b) Reword the title for the binding patches, more detailed. c) Add the sleep control error path: if err, return directly. also c

Re: [PATCH v9 12/15] media: mtk-vcodec: enc: Remove mtk_vcodec_release_enc_pm

2022-01-13 Thread Hans Verkuil
On 13/01/2022 11:11, AngeloGioacchino Del Regno wrote: > Il 11/01/22 11:57, AngeloGioacchino Del Regno ha scritto: >> Il 12/11/21 11:55, Yong Wu ha scritto: >>> After this patchset, mtk_vcodec_release_enc_pm has only one line. >>> then remove that function, use pm_runtime_disable instead. >>> >>> m

Re: [PATCH v9 12/15] media: mtk-vcodec: enc: Remove mtk_vcodec_release_enc_pm

2022-01-13 Thread AngeloGioacchino Del Regno
Il 13/01/22 11:15, Hans Verkuil ha scritto: On 13/01/2022 11:11, AngeloGioacchino Del Regno wrote: Il 11/01/22 11:57, AngeloGioacchino Del Regno ha scritto: Il 12/11/21 11:55, Yong Wu ha scritto: After this patchset, mtk_vcodec_release_enc_pm has only one line. then remove that function, use p

Re: [PATCH v9 12/15] media: mtk-vcodec: enc: Remove mtk_vcodec_release_enc_pm

2022-01-13 Thread AngeloGioacchino Del Regno
Il 11/01/22 11:57, AngeloGioacchino Del Regno ha scritto: Il 12/11/21 11:55, Yong Wu ha scritto: After this patchset, mtk_vcodec_release_enc_pm has only one line. then remove that function, use pm_runtime_disable instead. meanwhile, mtk_vcodec_init_enc_pm only operate for the clocks, rename it