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: <20160824064153.GC8103@lukather>
Date:   Wed, 24 Aug 2016 08:41:53 +0200
From:   Maxime Ripard <maxime.ripard@...e-electrons.com>
To:     Quentin Schulz <quentin.schulz@...e-electrons.com>
Cc:     jdelvare@...e.com, linux@...ck-us.net, jic23@...nel.org,
        knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net, wens@...e.org,
        lee.jones@...aro.org, linux-kernel@...r.kernel.org,
        linux-hwmon@...r.kernel.org, linux-iio@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        thomas.petazzoni@...e-electrons.com,
        antoine.tenart@...e-electrons.com
Subject: Re: [PATCH v3 4/4] iio: adc: add support for Allwinner SoCs ADC

On Thu, Aug 04, 2016 at 10:41:00AM +0200, Quentin Schulz wrote:
> > However, I'm not sure this is even possible. Isn't the point of the
> > runtime_pm precisely to not be called while you're using the device?
> 
> I agree on the principle but I am using runtime_pm functions (I am
> mainly talking about the pm_runtime_put function) when probing or
> removing the driver. Let's say we remove the mutex locks in runtime_pm
> functions, what will happen if we are reading raw values from the ADC
> when removing the ADC driver for example?

Most likely, the first thing you will be doing in your remove is to
unregister from the framework, so you won't be able to start any new
conversion. So that case shouldn't happen.

> >> +	/* Disable all hardware interrupts */
> >> +	regmap_write(info->regmap, SUNXI_GPADC_TP_INT_FIFOC, 0);
> > 
> > This looks like the wrong place to do that. You'll disable the
> > interrupts of all the devices of the MFD, which is probbaly not what
> > you want to do (and if you do, you want to do it in the MFD driver).
> 
> Yes but all subdrivers of the MFD are using IIO channels from the ADC
> driver so anyway they would not work at all.

I'm not sure what you mean by that.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ