From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Moore, Robert" Subject: RE: [PATCH 1/4] ACPI: Allow _DMA method in walk resources Date: Thu, 20 Jul 2017 15:50:16 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37E5D914D@ORSMSX110.amr.corp.intel.com> References: <20170720144517.32529-1-lorenzo.pieralisi@arm.com> <20170720144517.32529-2-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Lorenzo Pieralisi , "linux-acpi@vger.kernel.org" Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Zhang, Rui" , "Rafael J. Wysocki" , Will Deacon , Robin Murphy , Hanjun Guo , Feng Kan , Jon Masters , Nate Watterson List-Id: linux-acpi@vger.kernel.org Could you post this as a pull request on our github? https://github.com/acpica/acpica > -----Original Message----- > From: Moore, Robert > Sent: Thursday, July 20, 2017 8:49 AM > To: 'Lorenzo Pieralisi' ; linux- > acpi@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > Zhang, Rui ; Rafael J. Wysocki ; > Will Deacon ; Robin Murphy ; > Hanjun Guo ; Feng Kan ; Jon Masters > ; Nate Watterson > Subject: RE: [PATCH 1/4] ACPI: Allow _DMA method in walk resources > > I think we can take this as-is into ACPICA. > Bob > > > > -----Original Message----- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com] > > Sent: Thursday, July 20, 2017 7:45 AM > > To: linux-acpi@vger.kernel.org > > Cc: linux-arm-kernel@lists.infradead.org; > > linux-kernel@vger.kernel.org; Lorenzo Pieralisi > > ; Moore, Robert ; > Zhang, Rui ; Rafael J. > > Wysocki ; Will Deacon ; Robin > > Murphy ; Hanjun Guo ; > > Feng Kan ; Jon Masters ; Nate Watterson > > > > Subject: [PATCH 1/4] ACPI: 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. > > > > Signed-off-by: Lorenzo Pieralisi > > Cc: Robert Moore > > Cc: Zhang Rui > > Cc: "Rafael J. Wysocki" > > --- > > drivers/acpi/acpica/rsxface.c | 7 ++++--- > > include/acpi/acnames.h | 1 + > > 2 files changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/acpi/acpica/rsxface.c > > b/drivers/acpi/acpica/rsxface.c index 59a4f9e..be65e65 100644 > > --- a/drivers/acpi/acpica/rsxface.c > > +++ b/drivers/acpi/acpica/rsxface.c > > @@ -615,7 +615,7 @@ ACPI_EXPORT_SYMBOL(acpi_walk_resource_buffer) > > * 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) > > * user_function - Called for each resource > > * context - Passed to user_function > > * > > @@ -641,11 +641,12 @@ acpi_walk_resources(acpi_handle device_handle, > > if (!device_handle || !user_function || !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 = acpi_rs_get_method_data(device_handle, name, &buffer); > diff > > --git a/include/acpi/acnames.h b/include/acpi/acnames.h index > > b421584..d8dd3bf 100644 > > --- a/include/acpi/acnames.h > > +++ b/include/acpi/acnames.h > > @@ -54,6 +54,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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965682AbdGTPuV convert rfc822-to-8bit (ORCPT ); Thu, 20 Jul 2017 11:50:21 -0400 Received: from mga09.intel.com ([134.134.136.24]:54912 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965659AbdGTPuS (ORCPT ); Thu, 20 Jul 2017 11:50:18 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,384,1496127600"; d="scan'208";a="129789610" From: "Moore, Robert" To: Lorenzo Pieralisi , "linux-acpi@vger.kernel.org" CC: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Zhang, Rui" , "Rafael J. Wysocki" , Will Deacon , "Robin Murphy" , Hanjun Guo , Feng Kan , Jon Masters , Nate Watterson Subject: RE: [PATCH 1/4] ACPI: Allow _DMA method in walk resources Thread-Topic: [PATCH 1/4] ACPI: Allow _DMA method in walk resources Thread-Index: AQHTAWag/TnUtomIyUS0Lfb1/8a/KqJc3HPQgAAAW/A= Date: Thu, 20 Jul 2017 15:50:16 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37E5D914D@ORSMSX110.amr.corp.intel.com> References: <20170720144517.32529-1-lorenzo.pieralisi@arm.com> <20170720144517.32529-2-lorenzo.pieralisi@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Could you post this as a pull request on our github? https://github.com/acpica/acpica > -----Original Message----- > From: Moore, Robert > Sent: Thursday, July 20, 2017 8:49 AM > To: 'Lorenzo Pieralisi' ; linux- > acpi@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > Zhang, Rui ; Rafael J. Wysocki ; > Will Deacon ; Robin Murphy ; > Hanjun Guo ; Feng Kan ; Jon Masters > ; Nate Watterson > Subject: RE: [PATCH 1/4] ACPI: Allow _DMA method in walk resources > > I think we can take this as-is into ACPICA. > Bob > > > > -----Original Message----- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com] > > Sent: Thursday, July 20, 2017 7:45 AM > > To: linux-acpi@vger.kernel.org > > Cc: linux-arm-kernel@lists.infradead.org; > > linux-kernel@vger.kernel.org; Lorenzo Pieralisi > > ; Moore, Robert ; > Zhang, Rui ; Rafael J. > > Wysocki ; Will Deacon ; Robin > > Murphy ; Hanjun Guo ; > > Feng Kan ; Jon Masters ; Nate Watterson > > > > Subject: [PATCH 1/4] ACPI: 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. > > > > Signed-off-by: Lorenzo Pieralisi > > Cc: Robert Moore > > Cc: Zhang Rui > > Cc: "Rafael J. Wysocki" > > --- > > drivers/acpi/acpica/rsxface.c | 7 ++++--- > > include/acpi/acnames.h | 1 + > > 2 files changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/acpi/acpica/rsxface.c > > b/drivers/acpi/acpica/rsxface.c index 59a4f9e..be65e65 100644 > > --- a/drivers/acpi/acpica/rsxface.c > > +++ b/drivers/acpi/acpica/rsxface.c > > @@ -615,7 +615,7 @@ ACPI_EXPORT_SYMBOL(acpi_walk_resource_buffer) > > * 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) > > * user_function - Called for each resource > > * context - Passed to user_function > > * > > @@ -641,11 +641,12 @@ acpi_walk_resources(acpi_handle device_handle, > > if (!device_handle || !user_function || !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 = acpi_rs_get_method_data(device_handle, name, &buffer); > diff > > --git a/include/acpi/acnames.h b/include/acpi/acnames.h index > > b421584..d8dd3bf 100644 > > --- a/include/acpi/acnames.h > > +++ b/include/acpi/acnames.h > > @@ -54,6 +54,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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: robert.moore@intel.com (Moore, Robert) Date: Thu, 20 Jul 2017 15:50:16 +0000 Subject: [PATCH 1/4] ACPI: Allow _DMA method in walk resources References: <20170720144517.32529-1-lorenzo.pieralisi@arm.com> <20170720144517.32529-2-lorenzo.pieralisi@arm.com> Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37E5D914D@ORSMSX110.amr.corp.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Could you post this as a pull request on our github? https://github.com/acpica/acpica > -----Original Message----- > From: Moore, Robert > Sent: Thursday, July 20, 2017 8:49 AM > To: 'Lorenzo Pieralisi' ; linux- > acpi at vger.kernel.org > Cc: linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; > Zhang, Rui ; Rafael J. Wysocki ; > Will Deacon ; Robin Murphy ; > Hanjun Guo ; Feng Kan ; Jon Masters > ; Nate Watterson > Subject: RE: [PATCH 1/4] ACPI: Allow _DMA method in walk resources > > I think we can take this as-is into ACPICA. > Bob > > > > -----Original Message----- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi at arm.com] > > Sent: Thursday, July 20, 2017 7:45 AM > > To: linux-acpi at vger.kernel.org > > Cc: linux-arm-kernel at lists.infradead.org; > > linux-kernel at vger.kernel.org; Lorenzo Pieralisi > > ; Moore, Robert ; > Zhang, Rui ; Rafael J. > > Wysocki ; Will Deacon ; Robin > > Murphy ; Hanjun Guo ; > > Feng Kan ; Jon Masters ; Nate Watterson > > > > Subject: [PATCH 1/4] ACPI: 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. > > > > Signed-off-by: Lorenzo Pieralisi > > Cc: Robert Moore > > Cc: Zhang Rui > > Cc: "Rafael J. Wysocki" > > --- > > drivers/acpi/acpica/rsxface.c | 7 ++++--- > > include/acpi/acnames.h | 1 + > > 2 files changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/acpi/acpica/rsxface.c > > b/drivers/acpi/acpica/rsxface.c index 59a4f9e..be65e65 100644 > > --- a/drivers/acpi/acpica/rsxface.c > > +++ b/drivers/acpi/acpica/rsxface.c > > @@ -615,7 +615,7 @@ ACPI_EXPORT_SYMBOL(acpi_walk_resource_buffer) > > * 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) > > * user_function - Called for each resource > > * context - Passed to user_function > > * > > @@ -641,11 +641,12 @@ acpi_walk_resources(acpi_handle device_handle, > > if (!device_handle || !user_function || !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 = acpi_rs_get_method_data(device_handle, name, &buffer); > diff > > --git a/include/acpi/acnames.h b/include/acpi/acnames.h index > > b421584..d8dd3bf 100644 > > --- a/include/acpi/acnames.h > > +++ b/include/acpi/acnames.h > > @@ -54,6 +54,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