2019-05-28 13:29:00

by Mark Brown

[permalink] [raw]
Subject: Re: Issue: regmap: use debugfs even when no device

On Tue, May 28, 2019 at 02:20:15AM +0000, Andy Duan wrote:

> So on i.MX8MM/8QM/8QXP platforms, we catch the issue that user dump regmap registers without
> power cause system hang.
> Maybe revert the patch is more reasonable ?

This is an issue with or without a device - you can have the same issue
with devices that are powered off. Typically where power is dynamic the
driver will use a register cache so the registers are always available.


Attachments:
(No filename) (455.00 B)
signature.asc (499.00 B)
Download all attachments

2019-05-29 01:35:31

by Andy Duan

[permalink] [raw]
Subject: RE: [EXT] Re: Issue: regmap: use debugfs even when no device


From: Mark Brown <[email protected]> Sent: Tuesday, May 28, 2019 9:27 PM
> On Tue, May 28, 2019 at 02:20:15AM +0000, Andy Duan wrote:
>
> > So on i.MX8MM/8QM/8QXP platforms, we catch the issue that user dump
> > regmap registers without power cause system hang.
> > Maybe revert the patch is more reasonable ?
>
> This is an issue with or without a device - you can have the same issue with
> devices that are powered off. Typically where power is dynamic the driver
> will use a register cache so the registers are always available.

Correct, regmap without device also has issue when power if off, because regmap
doesn't implement runtime pm for the device, but maybe device driver implement
the runtime pm for the device.

So regmap how to manage the clock and power when access registers by debugfs ?

Andy

2019-05-29 11:17:57

by Mark Brown

[permalink] [raw]
Subject: Re: [EXT] Re: Issue: regmap: use debugfs even when no device

On Wed, May 29, 2019 at 01:33:46AM +0000, Andy Duan wrote:

> Correct, regmap without device also has issue when power if off, because regmap
> doesn't implement runtime pm for the device, but maybe device driver implement
> the runtime pm for the device.

> So regmap how to manage the clock and power when access registers by debugfs ?

Like I say the basic recommendation is to use a cache.


Attachments:
(No filename) (404.00 B)
signature.asc (499.00 B)
Download all attachments

2019-05-30 04:58:31

by Andy Duan

[permalink] [raw]
Subject: RE: [EXT] Re: Issue: regmap: use debugfs even when no device

From: Mark Brown <[email protected]> Sent: Wednesday, May 29, 2019 7:16 PM
> To: Andy Duan <[email protected]>
> Cc: [email protected]; [email protected]; Robby Cai
> <[email protected]>; [email protected]; linux-kernel
> <[email protected]>
> Subject: Re: [EXT] Re: Issue: regmap: use debugfs even when no device
>
> On Wed, May 29, 2019 at 01:33:46AM +0000, Andy Duan wrote:
>
> > Correct, regmap without device also has issue when power if off,
> > because regmap doesn't implement runtime pm for the device, but maybe
> > device driver implement the runtime pm for the device.
>
> > So regmap how to manage the clock and power when access registers by
> debugfs ?
>
> Like I say the basic recommendation is to use a cache.

Got it, thanks.