public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andy Pont <andy.pont@sdcsystems.com>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	Zha Qipeng <qipeng.zha@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: mfd/intel_pmc_bxt: `intel_pmc_get_resources()` results in page fault
Date: Tue, 25 Jan 2022 17:45:08 +0200	[thread overview]
Message-ID: <YfAbBIxDvfIYrgPV@lahna> (raw)
In-Reply-To: <em755e7a07-2a6b-4b3a-9bc8-5f28857392dc@andys-imac.local>

Hi,

On Tue, Jan 25, 2022 at 02:54:53PM +0000, Andy Pont wrote:
>    Hello Mika
> 
>    `intel_pmc_get_resources()` does not set the name member in the
>    `resource`
> 
>    struct `gcr_res` resulting in a page fault.
> 
> 
> 
>    On which system you reproduce this,
> 
> 
> 
>    The dump contains the name:
> 
> 
> 
>    Hardware name: Star Labs Lite/Lite, BIOS 8 01/24/2022
> 
>    The Star Labs Lite platform is based on the Gemini Lake N5000 CPU and
>    the test hardware is running Ubuntu 20.04 (Ubuntu
>    5.13.0-27.29~20.04.1-generic 5.13.19).
> 
>    and how?
> 
>    It happens every system boot.  The boot process is coreboot, tianocore
>    as a payload then Ubuntu.
> 
>    Can you also share ACPI dump from that system.
> 
>    I have attached the dsdt.asl file from the coreboot build process.

Thanks! The dump looks OK to me wrt. the PMC device. However, I think I
found the bug.

Can you try if the below hack fixes the issue?

diff --git a/drivers/mfd/intel_pmc_bxt.c b/drivers/mfd/intel_pmc_bxt.c
index 9f01d38acc7f..96a0aa316925 100644
--- a/drivers/mfd/intel_pmc_bxt.c
+++ b/drivers/mfd/intel_pmc_bxt.c
@@ -304,7 +304,7 @@ static int intel_pmc_get_resources(struct platform_device *pdev,
 				   struct intel_pmc_dev *pmc,
 				   struct intel_scu_ipc_data *scu_data)
 {
-	struct resource gcr_res;
+	struct resource gcr_res = {};
 	size_t npunit_res = 0;
 	struct resource *res;
 	int ret;

  parent reply	other threads:[~2022-01-25 15:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 13:08 mfd/intel_pmc_bxt: `intel_pmc_get_resources()` results in page fault Paul Menzel
2022-01-25 14:26 ` Mika Westerberg
2022-01-25 14:40   ` Paul Menzel
2022-01-25 14:53     ` Mika Westerberg
     [not found]     ` <em755e7a07-2a6b-4b3a-9bc8-5f28857392dc@andys-imac.local>
2022-01-25 15:45       ` Mika Westerberg [this message]
2022-01-25 16:27         ` Andy Pont
2022-01-25 16:29           ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfAbBIxDvfIYrgPV@lahna \
    --to=mika.westerberg@linux.intel.com \
    --cc=andy.pont@sdcsystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=qipeng.zha@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox