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: <52B88990.5020807@ti.com>
Date:	Mon, 23 Dec 2013 13:05:52 -0600
From:	"Anna, Suman" <s-anna@...com>
To:	Florian Vaussard <florian.vaussard@...l.ch>,
	Joerg Roedel <joro@...tes.org>,
	Tony Lindgren <tony@...mide.com>,
	BenoƮt Cousson <bcousson@...libre.com>
CC:	Rob Herring <rob.herring@...xeda.com>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Rob Landley <rob@...dley.net>,
	Grant Likely <grant.likely@...aro.org>,
	Hiroshi Doyu <hdoyu@...dia.com>,
	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 4/7] iommu/omap: Allow enable/disable even without pdata

Hi Florian,

On 12/17/2013 06:53 AM, Florian Vaussard wrote:
> When booting with a devietree, no platform data is provided. Do not prematurely
> exit iommu_enable() and iommu_disable() in such a case.

Platform data may still be needed if we were to go with the pdata quirks 
approach for handling resets. You may need to revise the patch 
description then, but the change itself may be ok if supporting only DT 
devices.

regards
Suman

>
> Signed-off-by: Florian Vaussard <florian.vaussard@...l.ch>
> ---
>   drivers/iommu/omap-iommu.c | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 51efcc4..0a9854d 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -149,13 +149,10 @@ static int iommu_enable(struct omap_iommu *obj)
>   	struct platform_device *pdev = to_platform_device(obj->dev);
>   	struct iommu_platform_data *pdata = pdev->dev.platform_data;
>
> -	if (!pdata)
> -		return -EINVAL;
> -
>   	if (!arch_iommu)
>   		return -ENODEV;
>
> -	if (pdata->deassert_reset) {
> +	if (pdata && pdata->deassert_reset) {
>   		err = pdata->deassert_reset(pdev, pdata->reset_name);
>   		if (err) {
>   			dev_err(obj->dev, "deassert_reset failed: %d\n", err);
> @@ -175,14 +172,11 @@ static void iommu_disable(struct omap_iommu *obj)
>   	struct platform_device *pdev = to_platform_device(obj->dev);
>   	struct iommu_platform_data *pdata = pdev->dev.platform_data;
>
> -	if (!pdata)
> -		return;
> -
>   	arch_iommu->disable(obj);
>
>   	pm_runtime_put_sync(obj->dev);
>
> -	if (pdata->assert_reset)
> +	if (pdata && pdata->assert_reset)
>   		pdata->assert_reset(pdev, pdata->reset_name);
>   }
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ