Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1374707 > unrolled thread
| Started by | Darren Hart <dvhart@infradead.org> |
|---|---|
| First post | 2016-04-10 04:50 +0200 |
| Last post | 2016-04-11 09:10 +0200 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources Darren Hart <dvhart@infradead.org> - 2016-04-10 04:50 +0200
RE: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources "Zha, Qipeng" <qipeng.zha@intel.com> - 2016-04-11 04:10 +0200
RE: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources "Chakravarty, Souvik K" <souvik.k.chakravarty@intel.com> - 2016-04-11 06:10 +0200
Re: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources Darren Hart <dvhart@infradead.org> - 2016-04-11 09:00 +0200
Re: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources "Li, Aubrey" <aubrey.li@linux.intel.com> - 2016-04-11 09:10 +0200
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2016-04-10 04:50 +0200 |
| Subject | Re: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources |
| Message-ID | <rmdBL-6Fr-3@gated-at.bofh.it> |
On Thu, Mar 31, 2016 at 02:28:09PM -0500, Aubrey Li wrote:
> Currently the optional IPC resources prevent telemetry driver from
> probing if these resources are not in ACPI table. This patch decouples
> telemetry driver from these optional resources, so that telemetry driver
> has dependency only on the necessary ACPI resources.
>
> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
Given the impact to their recent contributions, I'm looking for reviews from
Qipeng and Souvik before I merge this.
Qipeng, as the listed maintainer for these two files, I particularly need to
hear from you.
Thanks,
> ---
> drivers/platform/x86/intel_pmc_ipc.c | 48 +++++++++++++++-----------------
> drivers/platform/x86/intel_punit_ipc.c | 48 +++++++++++++++++++++-----------
> 2 files changed, 54 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
> index 092519e..29d9c02 100644
> --- a/drivers/platform/x86/intel_pmc_ipc.c
> +++ b/drivers/platform/x86/intel_pmc_ipc.c
> @@ -686,8 +686,8 @@ static int ipc_plat_get_res(struct platform_device *pdev)
> ipcdev.acpi_io_size = size;
> dev_info(&pdev->dev, "io res: %pR\n", res);
>
> - /* This is index 0 to cover BIOS data register */
> punit_res = punit_res_array;
> + /* This is index 0 to cover BIOS data register */
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_BIOS_DATA_INDEX);
> if (!res) {
> @@ -697,55 +697,51 @@ static int ipc_plat_get_res(struct platform_device *pdev)
> *punit_res = *res;
> dev_info(&pdev->dev, "punit BIOS data res: %pR\n", res);
>
> + /* This is index 1 to cover BIOS interface register */
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_BIOS_IFACE_INDEX);
> if (!res) {
> dev_err(&pdev->dev, "Failed to get res of punit BIOS iface\n");
> return -ENXIO;
> }
> - /* This is index 1 to cover BIOS interface register */
> *++punit_res = *res;
> dev_info(&pdev->dev, "punit BIOS interface res: %pR\n", res);
>
> + /* This is index 2 to cover ISP data register, optional */
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_ISP_DATA_INDEX);
> - if (!res) {
> - dev_err(&pdev->dev, "Failed to get res of punit ISP data\n");
> - return -ENXIO;
> + ++punit_res;
> + if (res) {
> + *punit_res = *res;
> + dev_info(&pdev->dev, "punit ISP data res: %pR\n", res);
> }
> - /* This is index 2 to cover ISP data register */
> - *++punit_res = *res;
> - dev_info(&pdev->dev, "punit ISP data res: %pR\n", res);
>
> + /* This is index 3 to cover ISP interface register, optional */
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_ISP_IFACE_INDEX);
> - if (!res) {
> - dev_err(&pdev->dev, "Failed to get res of punit ISP iface\n");
> - return -ENXIO;
> + ++punit_res;
> + if (res) {
> + *punit_res = *res;
> + dev_info(&pdev->dev, "punit ISP interface res: %pR\n", res);
> }
> - /* This is index 3 to cover ISP interface register */
> - *++punit_res = *res;
> - dev_info(&pdev->dev, "punit ISP interface res: %pR\n", res);
>
> + /* This is index 4 to cover GTD data register, optional */
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_GTD_DATA_INDEX);
> - if (!res) {
> - dev_err(&pdev->dev, "Failed to get res of punit GTD data\n");
> - return -ENXIO;
> + ++punit_res;
> + if (res) {
> + *punit_res = *res;
> + dev_info(&pdev->dev, "punit GTD data res: %pR\n", res);
> }
> - /* This is index 4 to cover GTD data register */
> - *++punit_res = *res;
> - dev_info(&pdev->dev, "punit GTD data res: %pR\n", res);
>
> + /* This is index 5 to cover GTD interface register, optional */
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_GTD_IFACE_INDEX);
> - if (!res) {
> - dev_err(&pdev->dev, "Failed to get res of punit GTD iface\n");
> - return -ENXIO;
> + ++punit_res;
> + if (res) {
> + *punit_res = *res;
> + dev_info(&pdev->dev, "punit GTD interface res: %pR\n", res);
> }
> - /* This is index 5 to cover GTD interface register */
> - *++punit_res = *res;
> - dev_info(&pdev->dev, "punit GTD interface res: %pR\n", res);
>
> res = platform_get_resource(pdev, IORESOURCE_MEM,
> PLAT_RESOURCE_IPC_INDEX);
> diff --git a/drivers/platform/x86/intel_punit_ipc.c b/drivers/platform/x86/intel_punit_ipc.c
> index bd87540..a47a41f 100644
> --- a/drivers/platform/x86/intel_punit_ipc.c
> +++ b/drivers/platform/x86/intel_punit_ipc.c
> @@ -227,6 +227,11 @@ static int intel_punit_get_bars(struct platform_device *pdev)
> struct resource *res;
> void __iomem *addr;
>
> + /*
> + * The following resources are required
> + * - BIOS_IPC BASE_DATA
> + * - BIOS_IPC BASE_IFACE
> + */
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> addr = devm_ioremap_resource(&pdev->dev, res);
> if (IS_ERR(addr))
> @@ -239,29 +244,40 @@ static int intel_punit_get_bars(struct platform_device *pdev)
> return PTR_ERR(addr);
> punit_ipcdev->base[BIOS_IPC][BASE_IFACE] = addr;
>
> + /*
> + * The following resources are optional
> + * - ISPDRIVER_IPC BASE_DATA
> + * - ISPDRIVER_IPC BASE_IFACE
> + * - GTDRIVER_IPC BASE_DATA
> + * - GTDRIVER_IPC BASE_IFACE
> + */
> res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> - addr = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(addr))
> - return PTR_ERR(addr);
> - punit_ipcdev->base[ISPDRIVER_IPC][BASE_DATA] = addr;
> + if (res) {
> + addr = devm_ioremap_resource(&pdev->dev, res);
> + if (!IS_ERR(addr))
> + punit_ipcdev->base[ISPDRIVER_IPC][BASE_DATA] = addr;
> + }
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> - addr = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(addr))
> - return PTR_ERR(addr);
> - punit_ipcdev->base[ISPDRIVER_IPC][BASE_IFACE] = addr;
> + if (res) {
> + addr = devm_ioremap_resource(&pdev->dev, res);
> + if (!IS_ERR(addr))
> + punit_ipcdev->base[ISPDRIVER_IPC][BASE_IFACE] = addr;
> + }
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
> - addr = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(addr))
> - return PTR_ERR(addr);
> - punit_ipcdev->base[GTDRIVER_IPC][BASE_DATA] = addr;
> + if (res) {
> + addr = devm_ioremap_resource(&pdev->dev, res);
> + if (!IS_ERR(addr))
> + punit_ipcdev->base[GTDRIVER_IPC][BASE_DATA] = addr;
> + }
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 5);
> - addr = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(addr))
> - return PTR_ERR(addr);
> - punit_ipcdev->base[GTDRIVER_IPC][BASE_IFACE] = addr;
> + if (res) {
> + addr = devm_ioremap_resource(&pdev->dev, res);
> + if (!IS_ERR(addr))
> + punit_ipcdev->base[GTDRIVER_IPC][BASE_IFACE] = addr;
> + }
>
> return 0;
> }
> --
> 1.7.10.4
>
>
--
Darren Hart
Intel Open Source Technology Center
[toc] | [next] | [standalone]
| From | "Zha, Qipeng" <qipeng.zha@intel.com> |
|---|---|
| Date | 2016-04-11 04:10 +0200 |
| Subject | RE: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources |
| Message-ID | <rmzsC-6Cj-5@gated-at.bofh.it> |
| In reply to | #1374707 |
>> Currently the optional IPC resources prevent telemetry driver from >> probing if these resources are not in ACPI table. This patch decouples >> telemetry driver from these optional resources, so that telemetry >> driver has dependency only on the necessary ACPI resources. >> >> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com> >Given the impact to their recent contributions, I'm looking for reviews from Qipeng and Souvik before I merge this. >Qipeng, as the listed maintainer for these two files, I particularly need to hear from you. >Thanks, Hi Darren, I think this is a reasonable solution for such issue. Thanks Aubrey for this fixing patch.
[toc] | [prev] | [next] | [standalone]
| From | "Chakravarty, Souvik K" <souvik.k.chakravarty@intel.com> |
|---|---|
| Date | 2016-04-11 06:10 +0200 |
| Subject | RE: [PATCH] platform:x86 decouple telemetry driver from the optional IPC resources |
| Message-ID | <rmBkK-88x-15@gated-at.bofh.it> |
| In reply to | #1375415 |
> -----Original Message----- > From: Zha, Qipeng > Sent: Monday, April 11, 2016 7:34 AM > To: Darren Hart <dvhart@infradead.org>; Aubrey Li > <aubrey.li@linux.intel.com>; Chakravarty, Souvik K > <souvik.k.chakravarty@intel.com> > Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] platform:x86 decouple telemetry driver from the > optional IPC resources > > >> Currently the optional IPC resources prevent telemetry driver from > >> probing if these resources are not in ACPI table. This patch > >> decouples telemetry driver from these optional resources, so that > >> telemetry driver has dependency only on the necessary ACPI resources. > >> > >> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com> > > >Given the impact to their recent contributions, I'm looking for reviews from > Qipeng and Souvik before I merge this. > > >Qipeng, as the listed maintainer for these two files, I particularly need to > hear from you. > > >Thanks, > > Hi Darren, I think this is a reasonable solution for such issue. > Thanks Aubrey for this fixing patch. We went over this internally once. So OK from my POV.
[toc] | [prev] | [next] | [standalone]
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2016-04-11 09:00 +0200 |
| Message-ID | <rmDZg-1wB-11@gated-at.bofh.it> |
| In reply to | #1375469 |
On Mon, Apr 11, 2016 at 04:04:55AM +0000, Chakravarty, Souvik K wrote: > > > > -----Original Message----- > > From: Zha, Qipeng > > Sent: Monday, April 11, 2016 7:34 AM > > To: Darren Hart <dvhart@infradead.org>; Aubrey Li > > <aubrey.li@linux.intel.com>; Chakravarty, Souvik K > > <souvik.k.chakravarty@intel.com> > > Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org > > Subject: RE: [PATCH] platform:x86 decouple telemetry driver from the > > optional IPC resources > > > > >> Currently the optional IPC resources prevent telemetry driver from > > >> probing if these resources are not in ACPI table. This patch > > >> decouples telemetry driver from these optional resources, so that > > >> telemetry driver has dependency only on the necessary ACPI resources. > > >> > > >> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com> > > > > >Given the impact to their recent contributions, I'm looking for reviews from > > Qipeng and Souvik before I merge this. > > > > >Qipeng, as the listed maintainer for these two files, I particularly need to > > hear from you. > > > > >Thanks, > > > > Hi Darren, I think this is a reasonable solution for such issue. > > Thanks Aubrey for this fixing patch. > > We went over this internally once. So OK from my POV. Qipeng and Souvik, I appreciate the responses. As a point of process, I won't include a "Reviewed-by:" unless you explicitly include it in your response. -- Darren Hart Intel Open Source Technology Center
[toc] | [prev] | [next] | [standalone]
| From | "Li, Aubrey" <aubrey.li@linux.intel.com> |
|---|---|
| Date | 2016-04-11 09:10 +0200 |
| Message-ID | <rmE8V-1RJ-5@gated-at.bofh.it> |
| In reply to | #1375526 |
On 2016/4/11 14:48, Darren Hart wrote: > On Mon, Apr 11, 2016 at 04:04:55AM +0000, Chakravarty, Souvik K wrote: >> >> >>> -----Original Message----- >>> From: Zha, Qipeng >>> Sent: Monday, April 11, 2016 7:34 AM >>> To: Darren Hart <dvhart@infradead.org>; Aubrey Li >>> <aubrey.li@linux.intel.com>; Chakravarty, Souvik K >>> <souvik.k.chakravarty@intel.com> >>> Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org >>> Subject: RE: [PATCH] platform:x86 decouple telemetry driver from the >>> optional IPC resources >>> >>>>> Currently the optional IPC resources prevent telemetry driver from >>>>> probing if these resources are not in ACPI table. This patch >>>>> decouples telemetry driver from these optional resources, so that >>>>> telemetry driver has dependency only on the necessary ACPI resources. >>>>> >>>>> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com> >>> >>>> Given the impact to their recent contributions, I'm looking for reviews from >>> Qipeng and Souvik before I merge this. >>> >>>> Qipeng, as the listed maintainer for these two files, I particularly need to >>> hear from you. >>> >>>> Thanks, >>> >>> Hi Darren, I think this is a reasonable solution for such issue. >>> Thanks Aubrey for this fixing patch. >> >> We went over this internally once. So OK from my POV. > > Qipeng and Souvik, I appreciate the responses. Thank you all. -Aubrey > > As a point of process, I won't include a "Reviewed-by:" unless you explicitly > include it in your response. >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web