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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9292d85-83b5-5b43-6c2a-7e393213c6c9@loongson.cn>
Date:   Fri, 16 Jun 2023 09:45:45 +0800
From:   zhuyinbo <zhuyinbo@...ngson.cn>
To:     Huacai Chen <chenhuacai@...nel.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        WANG Xuerui <kernel@...0n.name>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Pavel Machek <pavel@....cz>, Marc Zyngier <maz@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        loongarch@...ts.linux.dev, Jianmin Lv <lvjianmin@...ngson.cn>,
        wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
        loongson-kernel@...ts.loongnix.cn, zhuyinbo@...ngson.cn
Subject: Re: [PATCH v3 3/3] soc: loongson2_pm: add power management support


Hi huacai,


在 2023/6/15 下午7:15, zhuyinbo 写道:
> 
> 
> 在 2023/6/15 下午6:00, Huacai Chen 写道:
> 
>>> +static void loongson2_pm_status_clear(void)
>>> +{
>>> +       u16 value;
>>> +
>>> +       value = loongson2_pm_readw(LOONGSON2_PM1_STS_REG);
>>> +       value |= (LOONGSON2_PM1_PWRBTN_STS | 
>>> LOONGSON2_PM1_PCIEXP_WAKE_STS |
>>> +                 LOONGSON2_PM1_WAKE_STS);
>>> +       loongson2_pm_writew(value, LOONGSON2_PM1_STS_REG);
>>> +       loongson2_pm_writel(loongson2_pm_readl(LOONGSON2_GPE0_STS_REG),
>>> +                           LOONGSON2_GPE0_STS_REG);
>> Long-line warnings is removed in latest kernel, so you don't need to 
>> split here.
> 
> 
> okay, I got it.
> 
>>
>>> +}
>>> +
>>> +static void loongson2_power_button_irq_enable(void)
>>
>> Using loongson2_pm_irq_enable is a little better.
> 
> 

Previously, you suggested that I combine loongson2_pm_irq_enable() and
power button irq enable code as loongson2_power_button_irq_enable, then
I remove the function loongson2_pm_irq_enable, in this case that I won't
be able to call loongson2_pm_irq_enable, so have I misunderstood your
meaning ? or only rename loongson2_power_button_irq_enable as
loongson2_pm_irq_enable ?

Thanks,
Yinbo

> 
> ...
> 
>>> +static int loongson2_suspend_valid_state(suspend_state_t state)
>>> +{
>>> +       if (state == PM_SUSPEND_MEM)
>>> +               return 1;
>>> +
>>> +       return 0;
>> "return (state == PM_SUSPEND_MEM)" is enough.
> 
> 
> okay, I got it.
> 
> 
> Thanks,
> Yinbo
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ