ResourceMgr: Allow _DMA method in walk resources
Lorenzo Pieralisi
PATCH 1/1 ResourceMgr: Allow _DMA method in walk resources
The _DMA object contains a resource template, this change adds support for the walk resources function so that ACPI devices containing a _DMA object can actually parse it to detect DMA ranges for the respective bus.
--- source/components/resources/rsxface.c | 7 ++++--- source/include/acnames.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-)
source/components/resources/rsxface.c +4 -3
@@ -796,7 +796,7 @@ ACPI_EXPORT_SYMBOL (AcpiWalkResourceBuffer)* device we are querying * Name - Method name of the resources we want. * (METHOD_NAME__CRS, METHOD_NAME__PRS, or -* METHOD_NAME__AEI) +* METHOD_NAME__AEI or METHOD_NAME__DMA) * UserFunction - Called for each resource * Context - Passed to UserFunction *
@@ -827,12 +827,13 @@ AcpiWalkResources (if (!DeviceHandle || !UserFunction || !Name || (!ACPI_COMPARE_NAME (Name,METHOD_NAME__CRS ) && !ACPI_COMPARE_NAME (Name,METHOD_NAME__PRS ) && - !ACPI_COMPARE_NAME (Name,METHOD_NAME__AEI ))) + !ACPI_COMPARE_NAME (Name,METHOD_NAME__AEI ) && + !ACPI_COMPARE_NAME (Name,METHOD_NAME__DMA ))) {return_ACPI_STATUS (AE_BAD_PARAMETER ); } -/* Get the _CRS/_PRS/_AEI resource list */ +/* Get the _CRS/_PRS/_AEI/_DMA resource list */ Buffer.Length =ACPI_ALLOCATE_LOCAL_BUFFER ; Status =AcpiRsGetMethodData (DeviceHandle, Name, &Buffer);
source/include/acnames.h +1 -0
@@ -162,6 +162,7 @@#define METHOD_NAME__CLS "_CLS"#define METHOD_NAME__CRS "_CRS"#define METHOD_NAME__DDN "_DDN" +#define METHOD_NAME__DMA "_DMA"#define METHOD_NAME__HID "_HID"#define METHOD_NAME__INI "_INI"#define METHOD_NAME__PLD "_PLD"
Signature · 1 line
2.10.0
Lorenzo Pieralisi
Hi Robert,
do you pull patches from the list or you require an explicit github pull request for that ?
Plase let me know.
Thanks,
Lorenzo
Quoted 55 lines · Lorenzo Pieralisi
The
_DMAobject contains a resource template, this change adds support for the walk resources function so that ACPI devices containing a_DMAobject can actually parse it to detect DMA ranges for the respective bus.Signed-off-by Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>--- source/components/resources/rsxface.c | 7 ++++--- source/include/acnames.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-)source/components/resources/rsxface.c +4
-3@@ -796,7 +796,7 @@ ACPI_EXPORT_SYMBOL (AcpiWalkResourceBuffer)* device we are querying * Name - Method name of the resources we want. * (METHOD_NAME__CRS, METHOD_NAME__PRS, or -* METHOD_NAME__AEI) +* METHOD_NAME__AEI or METHOD_NAME__DMA) * UserFunction - Called for each resource * Context - Passed to UserFunction * @@ -827,12 +827,13 @@ AcpiWalkResources (if (!DeviceHandle || !UserFunction || !Name || (!ACPI_COMPARE_NAME (Name,METHOD_NAME__CRS ) && !ACPI_COMPARE_NAME (Name,METHOD_NAME__PRS ) && - !ACPI_COMPARE_NAME (Name,METHOD_NAME__AEI ))) + !ACPI_COMPARE_NAME (Name,METHOD_NAME__AEI ) && + !ACPI_COMPARE_NAME (Name,METHOD_NAME__DMA ))) {return_ACPI_STATUS (AE_BAD_PARAMETER ); } -/* Get the _CRS/_PRS/_AEI resource list */ +/* Get the _CRS/_PRS/_AEI/_DMA resource list */ Buffer.Length =ACPI_ALLOCATE_LOCAL_BUFFER ; Status =AcpiRsGetMethodData (DeviceHandle, Name, &Buffer);source/include/acnames.h +1
-0@@ -162,6 +162,7 @@#define METHOD_NAME__CLS "_CLS"#define METHOD_NAME__CRS "_CRS"#define METHOD_NAME__DDN "_DDN" +#define METHOD_NAME__DMA "_DMA"#define METHOD_NAME__HID "_HID"#define METHOD_NAME__INI "_INI"#define METHOD_NAME__PLD "_PLD"Signature · 1 line
2.10.0
Moore
We will just take the patch as posted.
Quoted 76 lines
-----Original Message-----
From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi(a)arm.com]
Sent: Wednesday, July 26, 2017 10:04 AM
To: devel(a)acpica.org; Moore, Robert <robert.moore(a)intel.com>
Subject: Re: [PATCH] ResourceMgr: Allow_DMAmethod in walk resourcesHi Robert,
do you pull patches from the list or you require an explicit github pull request for that ?
Plase let me know.
Thanks,
LorenzoQuoted 17 lines · Lorenzo Pieralisi
The
_DMAobject contains a resource template, this change adds support for the walk resources function so that ACPI devices containing a_DMAobject can actually parse it to detect DMA ranges for the respective bus.Signed-off-by Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>--- source/components/resources/rsxface.c | 7 ++++--- source/include/acnames.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-)source/components/resources/rsxface.c +0
-0source/components/resources/rsxface.c ACPI_EXPORT_SYMBOL (AcpiWalkResourceBuffer) · line 797
Quoted 2 lines
source/components/resources/rsxface.c +0
-0@@ -796,7 +796,7 @@ ACPI_EXPORT_SYMBOL (AcpiWalkResourceBuffer)* device we are querying * Name - Method name of the resources we want.
source/components/resources/rsxface.c ACPI_EXPORT_SYMBOL (AcpiWalkResourceBuffer) · line 798
Quoted 1 line
source/components/resources/rsxface.c +0
-0* (METHOD_NAME__CRS,
METHOD_NAME__PRS, orsource/components/resources/rsxface.c ACPI_EXPORT_SYMBOL (AcpiWalkResourceBuffer) · line 799
Quoted 2 lines
source/components/resources/rsxface.c +1
-1-* METHOD_NAME__AEI) +* METHOD_NAME__AEI or
METHOD_NAME__DMA)Quoted 34 lines
source/components/resources/rsxface.c +3
-3* UserFunction - Called for each resource * Context - Passed to UserFunction * @@ -827,12 +827,13 @@ AcpiWalkResources (if (!DeviceHandle || !UserFunction || !Name || (!ACPI_COMPARE_NAME (Name,METHOD_NAME__CRS ) && !ACPI_COMPARE_NAME (Name,METHOD_NAME__PRS ) && - !ACPI_COMPARE_NAME (Name,METHOD_NAME__AEI ))) + !ACPI_COMPARE_NAME (Name,METHOD_NAME__AEI ) && + !ACPI_COMPARE_NAME (Name,METHOD_NAME__DMA ))) {return_ACPI_STATUS (AE_BAD_PARAMETER ); } -/* Get the _CRS/_PRS/_AEI resource list */ +/* Get the _CRS/_PRS/_AEI/_DMA resource list */ Buffer.Length =ACPI_ALLOCATE_LOCAL_BUFFER ; Status =AcpiRsGetMethodData (DeviceHandle, Name, &Buffer); diff --git a/source/include/acnames.h b/source/include/acnames.h index27b0b97..69f8884 100644
source/include/acnames.h +1
-1@@ -162,6 +162,7 @@#define METHOD_NAME__CLS "_CLS"#define METHOD_NAME__CRS "_CRS"#define METHOD_NAME__DDN "_DDN" +#define METHOD_NAME__DMA "_DMA"#define METHOD_NAME__HID "_HID"#define METHOD_NAME__INI "_INI"#define METHOD_NAME__PLD "_PLD" --2.10.0