Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13082344ybl; Sun, 29 Dec 2019 04:14:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyAh1Izjwp5qRc9hRxueX8avek6e6sEr8NrttBjf6iwfXtcFdI/oeE/IdYpQd3FfbPyS0+2 X-Received: by 2002:a9d:480b:: with SMTP id c11mr56160737otf.283.1577621667428; Sun, 29 Dec 2019 04:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577621667; cv=none; d=google.com; s=arc-20160816; b=0k9tf8e7BjehQ/F9uoIVozxO3lVkdjr2RyMO9EuTygrSGtVNfa9WDYh8TKKUy6A4lt YRgGj34bHQZYEim/ZSeh8t+84Sa5ywldockOJ9nMUvmjBG3j1LNX3gA1sR/zGTuzYEHK nemNbPR4F3pJ3thjjm7MyKLHuXrskbjtp7qbaCmc1v6Z4vMvxW0GvbJvfa0Cy4Q/mqb7 e/bKB2cwP3hQf+/FMFFrDAU9JMgLCasJTFvDc+aJHbYWv5iGDEYu/Dz/MoNkKPSV6quk 9xKsYeakznLA9pjjD+6mKnnUhro99w5QxoWj5poFD7DBogQNurojdi3VCS2GPUj8uE69 Czhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nGWz5AM5inYzBgxg6kj3I2Blj1fXV3aW/S3gsQEojU8=; b=uE5pqhKMUZSrJIn3XvnuXhCvuxDMu9p1INp8XjWrvoMNoNCMbTB2XN00eyELfF904J w3yABfMIj+/WcR1cB1wN04qPQ7mnS9LFUsmbFrZhoRD9HwQ9eVQobvvPSEtvsj9iF2QN rFQkNDR7c+jUMRdCRiRClvSpykRppz0LWgzlPh3JRxoZU5Q8cuoB0t5B9YfJO+7mL9zP jVDc3xtdGyQ8UNjSXRQ3glR4X56egUsadnfcjhhC5FGYy4NjdaTW7+6OY28L7n9PuMAu l/aJf2CGZ9dVWToULBFBwdmkvPXREm87ua6U2kjLJfWZ4TnQF3ayaOX8ruVBb2NPQ4dY UtIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=PnbjPwcm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si20516376oia.162.2019.12.29.04.14.15; Sun, 29 Dec 2019 04:14:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=PnbjPwcm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbfL2MMR (ORCPT + 99 others); Sun, 29 Dec 2019 07:12:17 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:36099 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbfL2MMQ (ORCPT ); Sun, 29 Dec 2019 07:12:16 -0500 Received: by mail-qt1-f194.google.com with SMTP id q20so27958752qtp.3 for ; Sun, 29 Dec 2019 04:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nGWz5AM5inYzBgxg6kj3I2Blj1fXV3aW/S3gsQEojU8=; b=PnbjPwcmu+f1M4IjS4OVgxrtUhLIU0Ogt50LaWkc0w8nx6Wn6CElPIGmfX+ZpmHrjo UuINDbyroy5Tzj6QxXq2Gtg1lORMAbptUSIHwoRjAEM91mNY7UIG/k38aIyz4YKtKEFU y0mQAfT8kU9ZApI5aeUXY043sZTFCH0tuRn4huEH9SsHSReX+SWuEJItypspy4rgaKto CSymFzSPsEJe59T5Gazd1umjasT4MHbmN4gqyzKY3c6SNRMWgadQN9vlSg7eZCyarPLy 97jwANzdunhqmPktKAQRvDTNG2ikJuL6ZSB5VbqnpTjLIAtq+c8s0v+NGZtKXXgy6Li4 OwTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nGWz5AM5inYzBgxg6kj3I2Blj1fXV3aW/S3gsQEojU8=; b=QpdPmj2gkVIea/MSzdNsPX/XEhYLIjkxv3jPN3g7GIElZ4uEWbhWurkuFMMSy/g9/P PUCXfDIOqbh1IGWe+f0wPAn9YW1kwPaW3sgsCXkBJETfu88OdIqHULBNRkwSLcyJbDWP 5tIDdTUaA+dqrh4UKF9te/Sq0ggUxZ1E5rFqiQmY0ovbPlLwiDlDnolis8kkyN8PecaH fK+TEtePaxv4DmzCsoZSfAbohtDdumZ7jgu4YDGBViAw5xJbx7SmId4nxXpXy8O6GMAR ec2DfapAo6rF5wfH2I1/DUO07mmOzUdn2movwh55/rnATYXSUsibrFm8mUF+ZjDl+vrp Y/3A== X-Gm-Message-State: APjAAAUikF/AzFoaJA2fa2+YUu80JETHVnaehi28W/AZBquTObmQwsjW YJ68+TyWMmXoiHrhHkZIFTMxrVrLiRAuY9K43DAA3w== X-Received: by 2002:ac8:6784:: with SMTP id b4mr43162165qtp.27.1577621535860; Sun, 29 Dec 2019 04:12:15 -0800 (PST) MIME-Version: 1.0 References: <20191229104325.10132-1-tiny.windzz@gmail.com> <20191229104325.10132-3-tiny.windzz@gmail.com> In-Reply-To: <20191229104325.10132-3-tiny.windzz@gmail.com> From: Bartosz Golaszewski Date: Sun, 29 Dec 2019 13:12:05 +0100 Message-ID: Subject: Re: [PATCH 2/2] drivers: platform: provide devm_platform_ioremap_resource_nocache() To: Yangtao Li Cc: Jonathan Corbet , Greg KH , Arnd Bergmann , Stephen Boyd , Mauro Carvalho Chehab , Matti Vaittinen , Phil Edworthy , suzuki.poulose@arm.com, saravanak@google.com, Heikki Krogerus , dan.j.williams@intel.com, Joe Perches , Jeff Kirsher , mans@mansr.com, Thomas Gleixner , hdegoede@redhat.com, Andrew Morton , ulf.hansson@linaro.org, ztuowen@gmail.com, Sergei Shtylyov , linux-doc , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org niedz., 29 gru 2019 o 11:43 Yangtao Li napisa=C5=82= (a): > > Provide a nocache variant of devm_platform_ioremap_resource(). > > Signed-off-by: Yangtao Li > --- > .../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/Documenta= tion/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 p= latform 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 pl= atform_device *pdev, > } > EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource); > > +/** > + * devm_platform_ioremap_resource_nocache - nocache variant of > + * devm_platform_ioremap_resourc= e() > + * > + * @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 =3D 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_dev= ice.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