lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: mfd/intel_pmc_bxt: `intel_pmc_get_resources()` results in page fault
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;
\
 
 \ /
  Last update: 2022-01-25 17:02    [W:0.055 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site