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: <56aedefa-fb5d-2251-da71-5cdf0e357576@gmail.com>
Date:   Mon, 27 Jul 2020 02:30:04 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Sowjanya Komatineni <skomatineni@...dia.com>,
        thierry.reding@...il.com, jonathanh@...dia.com, frankc@...dia.com,
        hverkuil@...all.nl, sakari.ailus@....fi, robh+dt@...nel.org,
        helen.koike@...labora.com
Cc:     sboyd@...nel.org, gregkh@...uxfoundation.org,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-i2c@...r.kernel.org
Subject: Re: [RFC PATCH v4 01/14] i2c: tegra: Don't mark VI I2C as IRQ safe
 runtime PM

24.07.2020 02:50, Sowjanya Komatineni пишет:
> Tegra VI I2C is part of VE power domain and typically used for
> camera usecases.
> 
> VE power domain is not always on and is non-IRQ safe. So, IRQ safe
> device cannot be attached to a non-IRQ safe domain as it prevents
> powering off the PM domain and generic power domain driver will warn.
> 
> Current driver marks all I2C devices as IRQ safe and VI I2C device
> does not require IRQ safe as it will not be used for atomic transfers.
> 
> This patch has fix to make VI I2C as non-IRQ safe.
> 
> Signed-off-by: Sowjanya Komatineni <skomatineni@...dia.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 1577296..3be1018 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -1750,7 +1750,15 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>  		goto unprepare_slow_clk;
>  	}
>  
> -	pm_runtime_irq_safe(&pdev->dev);
> +	/*
> +	 * VI I2C is in VE power domain which is not always on and not
> +	 * an IRQ safe. So, IRQ safe device can't be attached to a non-IRQ
> +	 * safe domain as it prevents powering off the PM domain.
> +	 * Also, VI I2C device don't need to use runtime IRQ safe as it will
> +	 * not be used for atomic transfers.
> +	 */
> +	if (!i2c_dev->is_vi)
> +		pm_runtime_irq_safe(&pdev->dev);
>  	pm_runtime_enable(&pdev->dev);
>  	if (!pm_runtime_enabled(&pdev->dev)) {
>  		ret = tegra_i2c_runtime_resume(&pdev->dev);
> 

Reviewed-by: Dmitry Osipenko <digetx@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ