From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Hiroshi DOYU <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Bharat Nihalani
<bnihalani-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource
Date: Mon, 21 May 2012 16:11:52 +0200 [thread overview]
Message-ID: <20120521141152.GA21513@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <1337019127-6863-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
* Hiroshi DOYU wrote:
> GART Register/Aperture range should be reserved.
>
> Signed-off-by: Hiroshi DOYU <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/iommu/tegra-gart.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
> index 33a23b6..a431006 100644
> --- a/drivers/iommu/tegra-gart.c
> +++ b/drivers/iommu/tegra-gart.c
> @@ -366,12 +366,18 @@ static int tegra_gart_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> - gart_regs = devm_ioremap(dev, res->start, resource_size(res));
> + gart_regs = devm_request_and_ioremap(dev, res);
> if (!gart_regs) {
> dev_err(dev, "failed to remap GART registers\n");
> return -ENXIO;
> }
>
> + if (!devm_request_mem_region(dev, res_remap->start,
> + resource_size(res_remap), dev_name(dev))) {
> + dev_err(dev, "failed to reserve GART aperture\n");
> + return -EBUSY;
> + }
> +
I'm not so sure that this is a good idea. If the GART driver requests the
GART aperture, then users of the GART aperture (e.g. the DRM driver) will no
longer be able to use it.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-05-21 14:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 18:12 [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*() Hiroshi DOYU
2012-05-14 18:12 ` [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource Hiroshi DOYU
[not found] ` <1337019127-6863-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-21 14:11 ` Thierry Reding [this message]
2012-05-21 16:41 ` Stephen Warren
[not found] ` <4FBA702A.1010203-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-21 17:05 ` Lucas Stach
2012-05-21 17:14 ` Stephen Warren
[not found] ` <4FBA77E2.4000409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-21 17:31 ` Thierry Reding
2012-05-21 17:38 ` Lucas Stach
2012-06-18 10:37 ` Hiroshi Doyu
[not found] ` <20120618133736.8d23c4e70b34b1de8cb71f6f-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-18 21:14 ` Lucas Stach
2012-06-20 7:04 ` [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*() Hiroshi DOYU
[not found] ` <1340175873-12531-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-20 7:04 ` [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource Hiroshi DOYU
[not found] ` <1340175873-12531-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-20 16:01 ` Stephen Warren
2012-06-20 16:00 ` [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*() Stephen Warren
[not found] ` <20120521173124.GB11824-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-05-21 17:38 ` [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource Thierry Reding
[not found] ` <1337019127-6863-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-21 14:16 ` [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*() Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120521141152.GA21513@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
--cc=bnihalani-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=joerg.roedel-5C7GfCeVMHo@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).