<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/arm64, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-09T16:54:16+00:00</updated>
<entry>
<title>ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()</title>
<updated>2025-09-09T16:54:16+00:00</updated>
<author>
<name>Miaoqian Lin</name>
<email>linmq006@gmail.com</email>
</author>
<published>2025-08-28T11:22:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0daeb2e7189951150fa7d6cc0967346e33bcb3e2'/>
<id>urn:sha1:0daeb2e7189951150fa7d6cc0967346e33bcb3e2</id>
<content type='text'>
commit f3ef7110924b897f4b79db9f7ac75d319ec09c4a upstream.

If krealloc_array() fails in iort_rmr_alloc_sids(), the function returns
NULL but does not free the original 'sids' allocation. This results in a
memory leak since the caller overwrites the original pointer with the
NULL return value.

Fixes: 491cf4a6735a ("ACPI/IORT: Add support to retrieve IORT RMR reserved regions")
Cc: &lt;stable@vger.kernel.org&gt; # 6.0.x
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Reviewed-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Link: https://lore.kernel.org/r/20250828112243.61460-1-linmq006@gmail.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()</title>
<updated>2024-12-14T18:53:15+00:00</updated>
<author>
<name>Aleksandr Mishin</name>
<email>amishin@t-argos.ru</email>
</author>
<published>2024-08-27T10:12:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c68110dee0a7d108069a916ebb82538edda834f4'/>
<id>urn:sha1:c68110dee0a7d108069a916ebb82538edda834f4</id>
<content type='text'>
[ Upstream commit 1a9de2f6fda69d5f105dd8af776856a66abdaa64 ]

In case of error in gtdt_parse_timer_block() invalid 'gtdt_frame'
will be used in 'do {} while (i-- &gt;= 0 &amp;&amp; gtdt_frame--);' statement block
because do{} block will be executed even if 'i == 0'.

Adjust error handling procedure by replacing 'i-- &gt;= 0' with 'i-- &gt; 0'.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")
Signed-off-by: Aleksandr Mishin &lt;amishin@t-argos.ru&gt;
Acked-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Aleksandr Mishin &lt;amishin@t-argos.ru&gt;
Link: https://lore.kernel.org/r/20240827101239.22020-1-amishin@t-argos.ru
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09</title>
<updated>2023-09-23T09:11:00+00:00</updated>
<author>
<name>Yicong Yang</name>
<email>yangyicong@hisilicon.com</email>
</author>
<published>2023-08-14T12:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d9b5cbc12f49fbdbbc454383981039005af8211'/>
<id>urn:sha1:9d9b5cbc12f49fbdbbc454383981039005af8211</id>
<content type='text'>
[ Upstream commit 0242737dc4eb9f6e9a5ea594b3f93efa0b12f28d ]

Some HiSilicon SMMU PMCG suffers the erratum 162001900 that the PMU
disable control sometimes fail to disable the counters. This will lead
to error or inaccurate data since before we enable the counters the
counter's still counting for the event used in last perf session.

This patch tries to fix this by hardening the global disable process.
Before disable the PMU, writing an invalid event type (0xffff) to
focibly stop the counters. Correspondingly restore each events on
pmu::pmu_enable().

Signed-off-by: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Link: https://lore.kernel.org/r/20230814124012.58013-1-yangyicong@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI/IORT: Remove erroneous id_count check in iort_node_get_rmr_info()</title>
<updated>2023-08-03T08:24:13+00:00</updated>
<author>
<name>Guanghui Feng</name>
<email>guanghuifeng@linux.alibaba.com</email>
</author>
<published>2023-07-17T11:33:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c9af433b113892e7141990ab9574dccc53608bd5'/>
<id>urn:sha1:c9af433b113892e7141990ab9574dccc53608bd5</id>
<content type='text'>
commit 003e6b56d780095a9adc23efc9cb4b4b4717169b upstream.

According to the ARM IORT specifications DEN 0049 issue E,
the "Number of IDs" field in the ID mapping format reports
the number of IDs in the mapping range minus one.

In iort_node_get_rmr_info(), we erroneously skip ID mappings
whose "Number of IDs" equal to 0, resulting in valid mapping
nodes with a single ID to map being skipped, which is wrong.

Fix iort_node_get_rmr_info() by removing the bogus id_count
check.

Fixes: 491cf4a6735a ("ACPI/IORT: Add support to retrieve IORT RMR reserved regions")
Signed-off-by: Guanghui Feng &lt;guanghuifeng@linux.alibaba.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 6.0.x
Acked-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Tested-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Link: https://lore.kernel.org/r/1689593625-45213-1-git-send-email-guanghuifeng@linux.alibaba.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iommu: Add gfp parameter to iommu_alloc_resv_region</title>
<updated>2022-10-21T08:49:32+00:00</updated>
<author>
<name>Lu Baolu</name>
<email>baolu.lu@linux.intel.com</email>
</author>
<published>2022-10-19T00:44:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0251d0107cfb0bb5ab2d3f97710487b9522db020'/>
<id>urn:sha1:0251d0107cfb0bb5ab2d3f97710487b9522db020</id>
<content type='text'>
Add gfp parameter to iommu_alloc_resv_region() for the callers to specify
the memory allocation behavior. Thus iommu_alloc_resv_region() could also
be available in critical contexts.

Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Tested-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Link: https://lore.kernel.org/r/20220927053109.4053662-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>ACPI: scan: Support multiple DMA windows with different offsets</title>
<updated>2022-09-24T16:39:21+00:00</updated>
<author>
<name>Jianmin Lv</name>
<email>lvjianmin@loongson.cn</email>
</author>
<published>2022-09-11T09:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf2ee8d0c385f883a00473768b67faf2189b2410'/>
<id>urn:sha1:bf2ee8d0c385f883a00473768b67faf2189b2410</id>
<content type='text'>
In DT systems configurations, of_dma_get_range() returns struct
bus_dma_region DMA regions; they are used to set-up devices
DMA windows with different offset available for translation between DMA
address and CPU address.

In ACPI systems configuration, acpi_dma_get_range() does not return
DMA regions yet and that precludes setting up the dev-&gt;dma_range_map
pointer and therefore DMA regions with multiple offsets.

Update acpi_dma_get_range() to return struct bus_dma_region
DMA regions like of_dma_get_range() does.

After updating acpi_dma_get_range(), acpi_arch_dma_setup() is changed for
ARM64, where the original dma_addr and size are removed as these
arguments are now redundant, and pass 0 and U64_MAX for dma_base
and size of arch_setup_dma_ops; this is a simplification consistent
with what other ACPI architectures also pass to iommu_setup_dma_ops().

Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Jianmin Lv &lt;lvjianmin@loongson.cn&gt;
Reviewed-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI/IORT: Fix build error implicit-function-declaration</title>
<updated>2022-07-29T08:20:49+00:00</updated>
<author>
<name>Ren Zhijie</name>
<email>renzhijie2@huawei.com</email>
</author>
<published>2022-07-26T03:35:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de0269765b268717b70f16f809560e83d5a8d0e7'/>
<id>urn:sha1:de0269765b268717b70f16f809560e83d5a8d0e7</id>
<content type='text'>
If CONFIG_ACPI_IORT=y and CONFIG_IOMMU_API is not set,
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-,
will be failed, like this:

drivers/acpi/arm64/iort.c: In function ‘iort_get_rmr_sids’:
drivers/acpi/arm64/iort.c:1406:2: error: implicit declaration of function ‘iort_iommu_rmr_get_resv_regions’; did you mean ‘iort_iommu_get_resv_regions’? [-Werror=implicit-function-declaration]
  iort_iommu_rmr_get_resv_regions(iommu_fwnode, NULL, head);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  iort_iommu_get_resv_regions
cc1: some warnings being treated as errors
make[3]: *** [drivers/acpi/arm64/iort.o] Error 1

The function iort_iommu_rmr_get_resv_regions()
is declared under CONFIG_IOMMU_API,
and the callers of iort_get_rmr_sids() and iort_put_rmr_sids()
would select IOMMU_API.

To fix this error, move the definitions to #ifdef CONFIG_IOMMU_API.

Fixes: e302eea8f497 ("ACPI/IORT: Add a helper to retrieve RMR info directly")
Signed-off-by: Ren Zhijie &lt;renzhijie2@huawei.com&gt;
Acked-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Link: https://lore.kernel.org/r/20220726033520.47865-1-renzhijie2@huawei.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>ACPI/IORT: Add a helper to retrieve RMR info directly</title>
<updated>2022-07-06T10:51:11+00:00</updated>
<author>
<name>Shameer Kolothum</name>
<email>shameerali.kolothum.thodi@huawei.com</email>
</author>
<published>2022-06-15T10:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e302eea8f49717253ac64fd45b7cc719e87fa010'/>
<id>urn:sha1:e302eea8f49717253ac64fd45b7cc719e87fa010</id>
<content type='text'>
This will provide a way for SMMU drivers to retrieve StreamIDs
associated with IORT RMR nodes and use that to set bypass settings
for those IDs.

Tested-by: Steven Price &lt;steven.price@arm.com&gt;
Tested-by: Laurentiu Tudor &lt;laurentiu.tudor@nxp.com&gt;
Tested-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Signed-off-by: Shameer Kolothum &lt;shameerali.kolothum.thodi@huawei.com&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Link: https://lore.kernel.org/r/20220615101044.1972-6-shameerali.kolothum.thodi@huawei.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>ACPI/IORT: Add support to retrieve IORT RMR reserved regions</title>
<updated>2022-07-06T10:51:10+00:00</updated>
<author>
<name>Shameer Kolothum</name>
<email>shameerali.kolothum.thodi@huawei.com</email>
</author>
<published>2022-06-15T10:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=491cf4a6735a957cd0733365f8d17e0f4308f5a4'/>
<id>urn:sha1:491cf4a6735a957cd0733365f8d17e0f4308f5a4</id>
<content type='text'>
Parse through the IORT RMR nodes and populate the reserve region list
corresponding to a given IOMMU and device(optional). Also, go through
the ID mappings of the RMR node and retrieve all the SIDs associated
with it.

Reviewed-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Tested-by: Steven Price &lt;steven.price@arm.com&gt;
Tested-by: Laurentiu Tudor &lt;laurentiu.tudor@nxp.com&gt;
Tested-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Signed-off-by: Shameer Kolothum &lt;shameerali.kolothum.thodi@huawei.com&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Link: https://lore.kernel.org/r/20220615101044.1972-5-shameerali.kolothum.thodi@huawei.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>ACPI/IORT: Provide a generic helper to retrieve reserve regions</title>
<updated>2022-07-06T10:51:10+00:00</updated>
<author>
<name>Shameer Kolothum</name>
<email>shameerali.kolothum.thodi@huawei.com</email>
</author>
<published>2022-06-15T10:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55be25b8b5e4e2fd680cfb073b84a74a79c002fa'/>
<id>urn:sha1:55be25b8b5e4e2fd680cfb073b84a74a79c002fa</id>
<content type='text'>
Currently IORT provides a helper to retrieve HW MSI reserve regions.
Change this to a generic helper to retrieve any IORT related reserve
regions. This will be useful when we add support for RMR nodes in
subsequent patches.

[Lorenzo: For ACPI IORT]

Reviewed-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Steven Price &lt;steven.price@arm.com&gt;
Tested-by: Laurentiu Tudor &lt;laurentiu.tudor@nxp.com&gt;
Tested-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Signed-off-by: Shameer Kolothum &lt;shameerali.kolothum.thodi@huawei.com&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Link: https://lore.kernel.org/r/20220615101044.1972-4-shameerali.kolothum.thodi@huawei.com
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
</feed>
