lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7hley7itlx.fsf@baylibre.com>
Date:   Fri, 18 Feb 2022 16:32:26 -0800
From:   Kevin Hilman <khilman@...libre.com>
To:     "shunzhou.jiang@...ogic.com" <shunzhou.jiang@...ogic.com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-amlogic <linux-amlogic@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Cc:     Neil Armstrong <narmstrong@...libre.com>,
        jbrunet <jbrunet@...libre.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        "jianxin.pan" <jianxin.pan@...ogic.com>
Subject: Re: Re: [PATCH 2/2] soc: s4: Add support for power domains controller

"shunzhou.jiang@...ogic.com" <shunzhou.jiang@...ogic.com> writes:

> Hi Kevin:
> Thanks your reply
> This has been mentioned before

Yes, you mentioned what the domains are for, but you have not answered
why the domains need to remain powered on when they are not in use.
 
>> S4_VPU_HDMI:  for vpu,  this domain provide power to many moudles(osd, vpp, hdr, dv, di), if close, will cause system crash

Why does the system crash?  Most likely because a driver in this domain
is still trying to access.  This suggests that that the DT shoud be
updated so those devices are listed in the power domain, and also that
those drivers use runtime PM so that the power domain is turned off ONLY
when the devices are not in use.

>> S4_USB_COMB domain: for usb, if not always on,  all usb status will clear to 0, that's not right status for usb

Why is this not the right status for usb?

Again, my question is: why does the power domain need to stay on when
the underlying devices are NOT used.

If the underlying devices are in use, then if the power domain turns off
it is a software bug.  Devices need to be connected to the power domain
(in DT) and their drivers need to use runtime PM.  If that is done
correctly, then there is no reason for the power domain to be turned off
when the devices are in use.

In other words, your solution to always keep the power domain on has a
two main problems:

1) it just hides improperly configured, or poorly written drivers
2) it wastes power and prevents low-power usecases

Kevin

> Shunzhou Jiang
> SW Department
>  
> From: Kevin Hilman
> Date: 2022-02-12 02:52
> To: shunzhou.jiang@...ogic.com; linux-arm-kernel; linux-amlogic; linux-kernel
> CC: Neil Armstrong; jbrunet; Martin Blumenstingl; jianxin.pan
> Subject: Re: Re: [PATCH 2/2] soc: s4: Add support for power domains controller
> [ EXTERNAL EMAIL ]
>  
> Hi Shunzhou,
>  
> "shunzhou.jiang@...ogic.com" <shunzhou.jiang@...ogic.com> writes:
>  
>> Hi Kevin:
>> Thanks your kindly reply
>  
> You're welcome.  For future reference, please avoid top-posting.  See:
> https://www.kernel.org/doc/html/latest/process/2.Process.html?highlight=top-posting#mailing-lists
>  
>> For those domains,  default is active, we hope not close when in use or not in use, in our case, 
>> only runtime PM (include suspend) control this, so set always on flag to avoid domain shutdown,
>  
> my question remains: why do want to keep these powered on even when they
> are not in use?
>  
> The goal of the power-domain framework + runtime PM is to be able to
> save power by turnin off power domains when they are not in use.
>  
>> if you also have concern, we can control this not in kernel, but this not our expect.
>  
> My strong preference is that this is controlled by the kernel.
>  
> Kevin
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ