Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1545679 > unrolled thread
| Started by | Chen Yu <yu.c.chen@intel.com> |
|---|---|
| First post | 2016-12-21 10:20 +0100 |
| Last post | 2016-12-22 10:20 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] platform: Print the resource range if device failed to claim Chen Yu <yu.c.chen@intel.com> - 2016-12-21 10:20 +0100
Re: [PATCH] platform: Print the resource range if device failed to claim "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-12-22 02:30 +0100
Re: [PATCH] platform: Print the resource range if device failed to claim Chen Yu <yu.c.chen@intel.com> - 2016-12-22 04:30 +0100
Re: [PATCH] platform: Print the resource range if device failed to claim Mika Westerberg <mika.westerberg@intel.com> - 2016-12-22 10:20 +0100
| From | Chen Yu <yu.c.chen@intel.com> |
|---|---|
| Date | 2016-12-21 10:20 +0100 |
| Subject | [PATCH] platform: Print the resource range if device failed to claim |
| Message-ID | <sQLe1-1u1-13@gated-at.bofh.it> |
Sometimes we have the following error message:
platform MSFT0101:00: failed to claim resource 1
acpi MSFT0101:00: platform device creation failed: -16
But there is not enough information to figure out which resource range
failed to claim.
Thus print the resource range at first-place thus /proc/iomem or
ioports should tell us who already claimed this resource, then
the driver bug or incorrect resource assignment which is running
into this conflict can be diagnosed:
platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff]
acpi MSFT0101:00: platform device creation failed: -16
Suggested-by: Len Brown <lenb@kernel.org>
Reported-by: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
drivers/base/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index c4af003..22a6430 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -396,7 +396,7 @@ int platform_device_add(struct platform_device *pdev)
}
if (p && insert_resource(p, r)) {
- dev_err(&pdev->dev, "failed to claim resource %d\n", i);
+ dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);
ret = -EBUSY;
goto failed;
}
--
2.7.4
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-12-22 02:30 +0100 |
| Message-ID | <sR0mJ-2AR-11@gated-at.bofh.it> |
| In reply to | #1545679 |
[CC Mika and linux-acpi]
On Wednesday, December 21, 2016 05:24:55 PM Chen Yu wrote:
> Sometimes we have the following error message:
> platform MSFT0101:00: failed to claim resource 1
> acpi MSFT0101:00: platform device creation failed: -16
> But there is not enough information to figure out which resource range
> failed to claim.
>
> Thus print the resource range at first-place thus /proc/iomem or
> ioports should tell us who already claimed this resource, then
> the driver bug or incorrect resource assignment which is running
> into this conflict can be diagnosed:
> platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff]
> acpi MSFT0101:00: platform device creation failed: -16
>
> Suggested-by: Len Brown <lenb@kernel.org>
> Reported-by: Wendy Wang <wendy.wang@intel.com>
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> ---
> drivers/base/platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index c4af003..22a6430 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -396,7 +396,7 @@ int platform_device_add(struct platform_device *pdev)
> }
>
> if (p && insert_resource(p, r)) {
> - dev_err(&pdev->dev, "failed to claim resource %d\n", i);
> + dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);
Do we still need the resource number?
> ret = -EBUSY;
> goto failed;
> }
>
Thanks,
Rafael
[toc] | [prev] | [next] | [standalone]
| From | Chen Yu <yu.c.chen@intel.com> |
|---|---|
| Date | 2016-12-22 04:30 +0100 |
| Subject | Re: [PATCH] platform: Print the resource range if device failed to claim |
| Message-ID | <sR2eS-3O8-3@gated-at.bofh.it> |
| In reply to | #1546105 |
Hi,
On Thu, Dec 22, 2016 at 02:19:22AM +0100, Rafael J. Wysocki wrote:
> [CC Mika and linux-acpi]
>
> On Wednesday, December 21, 2016 05:24:55 PM Chen Yu wrote:
> > Sometimes we have the following error message:
> > platform MSFT0101:00: failed to claim resource 1
> > acpi MSFT0101:00: platform device creation failed: -16
> > But there is not enough information to figure out which resource range
> > failed to claim.
> >
> > Thus print the resource range at first-place thus /proc/iomem or
> > ioports should tell us who already claimed this resource, then
> > the driver bug or incorrect resource assignment which is running
> > into this conflict can be diagnosed:
> > platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff]
> > acpi MSFT0101:00: platform device creation failed: -16
> >
> > Suggested-by: Len Brown <lenb@kernel.org>
> > Reported-by: Wendy Wang <wendy.wang@intel.com>
> > Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> > ---
> > drivers/base/platform.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> > index c4af003..22a6430 100644
> > --- a/drivers/base/platform.c
> > +++ b/drivers/base/platform.c
> > @@ -396,7 +396,7 @@ int platform_device_add(struct platform_device *pdev)
> > }
> >
> > if (p && insert_resource(p, r)) {
> > - dev_err(&pdev->dev, "failed to claim resource %d\n", i);
> > + dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);
>
> Do we still need the resource number?
>
Seems we don't need the resource number anymore.
(As platform.c was written earlier than 2005, and the support of %pR was introduced
later in 2008.)
> > ret = -EBUSY;
> > goto failed;
> > }
> >
>
> Thanks,
> Rafael
>
Thanks,
Yu
[toc] | [prev] | [next] | [standalone]
| From | Mika Westerberg <mika.westerberg@intel.com> |
|---|---|
| Date | 2016-12-22 10:20 +0100 |
| Subject | Re: [PATCH] platform: Print the resource range if device failed to claim |
| Message-ID | <sR7HA-7BI-9@gated-at.bofh.it> |
| In reply to | #1546105 |
On Thu, Dec 22, 2016 at 02:19:22AM +0100, Rafael J. Wysocki wrote:
> [CC Mika and linux-acpi]
>
> On Wednesday, December 21, 2016 05:24:55 PM Chen Yu wrote:
> > Sometimes we have the following error message:
> > platform MSFT0101:00: failed to claim resource 1
> > acpi MSFT0101:00: platform device creation failed: -16
> > But there is not enough information to figure out which resource range
> > failed to claim.
> >
> > Thus print the resource range at first-place thus /proc/iomem or
> > ioports should tell us who already claimed this resource, then
> > the driver bug or incorrect resource assignment which is running
> > into this conflict can be diagnosed:
> > platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff]
> > acpi MSFT0101:00: platform device creation failed: -16
> >
> > Suggested-by: Len Brown <lenb@kernel.org>
> > Reported-by: Wendy Wang <wendy.wang@intel.com>
> > Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> > ---
> > drivers/base/platform.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> > index c4af003..22a6430 100644
> > --- a/drivers/base/platform.c
> > +++ b/drivers/base/platform.c
> > @@ -396,7 +396,7 @@ int platform_device_add(struct platform_device *pdev)
> > }
> >
> > if (p && insert_resource(p, r)) {
> > - dev_err(&pdev->dev, "failed to claim resource %d\n", i);
> > + dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);
>
> Do we still need the resource number?
It may still be useful. For example some BIOSes fill MMIO resources
based on variables in memory in which case the resource in DSDT is
filled with zeroes when disassembled. With the number you can find out
the right MMIO resource.
Either way, this is a good change. I had it on my list as well but never
got a chance to write a patch.
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web