From: Raag Jadav <raag.jadav@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com,
andriy.shevchenko@linux.intel.com, lakshmi.sowjanya.d@intel.com,
linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/4] pwm: dwc: Fix PM regression
Date: Mon, 19 Feb 2024 11:05:29 +0200 [thread overview]
Message-ID: <ZdMZ2dgoVYbZgd4K@black.fi.intel.com> (raw)
In-Reply-To: <luewujhgmgypcpnngyriv4trklznrkzngxe7syvfp2dontorwf@3xoooabwfitg>
On Mon, Feb 19, 2024 at 08:22:15AM +0100, Uwe Kleine-König wrote:
> Hello Raag,
>
> On Mon, Feb 19, 2024 at 09:08:32AM +0530, Raag Jadav wrote:
> > While preparing dwc driver for devm_pwmchip_alloc() usage, commit
> > df41cd8bbcad ("pwm: dwc: Prepare removing pwm_chip from driver data")
> > modified ->suspend() handle to use the pwm_chip as driver_data for
> > accessing struct dwc_pwm, but didn't modify ->resume() handle with
> > relevant changes. This results into illegal memory access during
> > device wakeup and causes a PM regression.
> >
> > Fix this by correctly accessing struct dwc_pwm in ->resume() handle.
> >
> > Fixes: df41cd8bbcad ("pwm: dwc: Prepare removing pwm_chip from driver data")
> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > ---
> > drivers/pwm/pwm-dwc.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
> > index 8ca1c20a6aaf..c0e586688e57 100644
> > --- a/drivers/pwm/pwm-dwc.c
> > +++ b/drivers/pwm/pwm-dwc.c
> > @@ -95,7 +95,8 @@ static int dwc_pwm_suspend(struct device *dev)
> >
> > static int dwc_pwm_resume(struct device *dev)
> > {
> > - struct dwc_pwm *dwc = dev_get_drvdata(dev);
> > + struct pwm_chip *chip = dev_get_drvdata(dev);
> > + struct dwc_pwm *dwc = to_dwc_pwm(chip);
> > int i;
> >
> > for (i = 0; i < DWC_TIMERS_TOTAL; i++) {
>
> If you're ok I'd squash this into df41cd8bbcad adding
>
> Thanks to Raag Jadav for providing a hunk of this patch that Uwe
> missed during creation of this patch.
>
> to the commit log.
Works for me.
Raag
next prev parent reply other threads:[~2024-02-19 9:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 3:38 [PATCH v4 0/4] DesignWare PWM improvements Raag Jadav
2024-02-19 3:38 ` [PATCH v4 1/4] pwm: dwc: Fix PM regression Raag Jadav
2024-02-19 7:22 ` Uwe Kleine-König
2024-02-19 9:05 ` Raag Jadav [this message]
2024-02-19 3:38 ` [PATCH v4 2/4] pwm: dwc: drop redundant error check Raag Jadav
2024-02-19 7:11 ` Thorsten Scherer
2024-02-19 7:27 ` Uwe Kleine-König
2024-02-19 9:15 ` Raag Jadav
2024-02-19 8:00 ` Thorsten Scherer
2024-02-19 3:38 ` [PATCH v4 3/4] pwm: dwc: Add 16 channel support for Intel Elkhart Lake Raag Jadav
2024-02-19 3:38 ` [PATCH v4 4/4] pwm: dwc: simplify error handling Raag Jadav
2024-02-20 16:00 ` [PATCH v4 0/4] DesignWare PWM improvements Uwe Kleine-König
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=ZdMZ2dgoVYbZgd4K@black.fi.intel.com \
--to=raag.jadav@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=lakshmi.sowjanya.d@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=u.kleine-koenig@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.