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: <a5cb8869bbc342c2a1451a63bf6ce0d9@realtek.com>
Date: Tue, 19 Dec 2023 03:29:57 +0000
From: James Tai [戴志峰] <james.tai@...ltek.com>
To: Thomas Gleixner <tglx@...utronix.de>, Marc Zyngier <maz@...nel.org>,
        "Rob
 Herring" <robh+dt@...nel.org>,
        Krzysztof Kozlowski
	<krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        kernel test robot
	<lkp@...el.com>
Subject: RE: [PATCH v3 6/6] irqchip: Introduce RTD1619B support using the Realtek common interrupt controller driver

Hi Thomas,

>On Wed, Nov 29 2023 at 13:43, James Tai wrote:
>> +static int realtek_intc_rtd1619b_suspend(struct device *dev) {
>> +     struct realtek_intc_data *data = dev_get_drvdata(dev);
>> +     const struct realtek_intc_info *info = data->info;
>> +
>> +     data->saved_en = readl(data->base + info->scpu_int_en_offset);
>> +
>> +     writel(DISABLE_INTC, data->base + info->scpu_int_en_offset);
>> +     writel(CLEAN_INTC_STATUS, data->base + info->umsk_isr_offset);
>> +     writel(CLEAN_INTC_STATUS, data->base + info->isr_offset);
>> +
>> +     return 0;
>> +}
>> +
>> +static int realtek_intc_rtd1619b_resume(struct device *dev) {
>> +     struct realtek_intc_data *data = dev_get_drvdata(dev);
>> +     const struct realtek_intc_info *info = data->info;
>> +
>> +     writel(CLEAN_INTC_STATUS, data->base + info->umsk_isr_offset);
>> +     writel(CLEAN_INTC_STATUS, data->base + info->isr_offset);
>> +     writel(data->saved_en, data->base + info->scpu_int_en_offset);
>> +
>> +     return 0;
>> +}
>> +
>> +static const struct dev_pm_ops realtek_intc_rtd1619b_pm_ops = {
>> +     .suspend_noirq = realtek_intc_rtd1619b_suspend,
>> +     .resume_noirq  = realtek_intc_rtd1619b_resume, };
>
>So this is the 4th copy of the same code, really? Why is this not part of the
>common code?
>
Yes it is the same code. 
I had originally assumed that each platform would require some different settings, 
but I've realized that there is no such requirement in the current architecture.
I will move this part to the common code.

Thanks for your feedback.

Regards,
James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ