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: <CAMpxmJWMjae8vuNA7feLWp1aXte4a3_RTA+C1PoDBkx3EPpO0g@mail.gmail.com>
Date:   Sun, 29 Dec 2019 13:12:05 +0100
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Yangtao Li <tiny.windzz@...il.com>
Cc:     Jonathan Corbet <corbet@....net>,
        Greg KH <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>, Stephen Boyd <sboyd@...nel.org>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
        Phil Edworthy <phil.edworthy@...esas.com>,
        suzuki.poulose@....com, saravanak@...gle.com,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        dan.j.williams@...el.com, Joe Perches <joe@...ches.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>, mans@...sr.com,
        Thomas Gleixner <tglx@...utronix.de>, hdegoede@...hat.com,
        Andrew Morton <akpm@...ux-foundation.org>,
        ulf.hansson@...aro.org, ztuowen@...il.com,
        Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
        linux-doc <linux-doc@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] drivers: platform: provide devm_platform_ioremap_resource_nocache()

niedz., 29 gru 2019 o 11:43 Yangtao Li <tiny.windzz@...il.com> napisaƂ(a):
>
> Provide a nocache variant of devm_platform_ioremap_resource().
>
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>  .../driver-api/driver-model/devres.rst        |  1 +
>  drivers/base/platform.c                       | 19 +++++++++++++++++++
>  include/linux/platform_device.h               |  3 +++
>  3 files changed, 23 insertions(+)
>
> diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
> index af1b1b9e3a17..3b79a3207490 100644
> --- a/Documentation/driver-api/driver-model/devres.rst
> +++ b/Documentation/driver-api/driver-model/devres.rst
> @@ -320,6 +320,7 @@ IOMAP
>    devm_ioremap_resource_nocache()
>    devm_ioremap_resource_wc()
>    devm_platform_ioremap_resource() : calls devm_ioremap_resource() for platform device
> +  devm_platform_ioremap_resource_nocache()
>    devm_platform_ioremap_resource_wc()
>    devm_platform_ioremap_resource_byname()
>    devm_iounmap()
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index cf6b6b722e5c..80f420b9b4d7 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -79,6 +79,25 @@ void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
>  }
>  EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource);
>
> +/**
> + * devm_platform_ioremap_resource_nocache - nocache variant of
> + *                                         devm_platform_ioremap_resource()
> + *
> + * @pdev: platform device to use both for memory resource lookup as well as
> + *        resource management
> + * @index: resource index
> + */
> +void __iomem *
> +devm_platform_ioremap_resource_nocache(struct platform_device *pdev,
> +                                      unsigned int index)
> +{
> +       struct resource *res;
> +
> +       res = platform_get_resource(pdev, IORESOURCE_MEM, index);
> +       return devm_ioremap_resource_nocache(&pdev->dev, res);
> +}
> +EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource_nocache);
> +
>  /**
>   * devm_platform_ioremap_resource_wc - write-combined variant of
>   *                                     devm_platform_ioremap_resource()
> diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
> index 276a03c24691..b803e670b1c5 100644
> --- a/include/linux/platform_device.h
> +++ b/include/linux/platform_device.h
> @@ -58,6 +58,9 @@ extern void __iomem *
>  devm_platform_ioremap_resource(struct platform_device *pdev,
>                                unsigned int index);
>  extern void __iomem *
> +devm_platform_ioremap_resource_nocache(struct platform_device *pdev,
> +                                      unsigned int index);
> +extern void __iomem *
>  devm_platform_ioremap_resource_wc(struct platform_device *pdev,
>                                   unsigned int index);
>  extern void __iomem *
> --
> 2.17.1
>

Please see my response to patch 1/2.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ