Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Krzysztof Kozlowski
	<krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Bartlomiej Zolnierkiewicz
	<b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH 2/5] iommu/exynos: Fix warnings from DMA-debug
Date: Tue, 29 Nov 2016 17:43:10 +0100	[thread overview]
Message-ID: <20161129164310.GC13850@8bytes.org> (raw)
In-Reply-To: <1479986420-30859-3-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

On Thu, Nov 24, 2016 at 12:20:17PM +0100, Marek Szyprowski wrote:
> @@ -744,6 +744,7 @@ static struct iommu_domain *exynos_iommu_domain_alloc(unsigned type)
>  				DMA_TO_DEVICE);
>  	/* For mapping page table entries we rely on dma == phys */
>  	BUG_ON(handle != virt_to_phys(domain->pgtable));
> +	BUG_ON(dma_mapping_error(dma_dev, handle));

A BUG_ON is a bad way of handling this. Please propagate the error
upwards, there is no need to crash the kernel because of a failure like
this.


	Joerg

  parent reply	other threads:[~2016-11-29 16:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 11:20 [PATCH 0/5] Fixes for Exynos IOMMU driver Marek Szyprowski
     [not found] ` <1479986420-30859-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-24 11:20   ` [PATCH 1/5] iommu/exynos: Improve page fault debug message Marek Szyprowski
2016-11-24 11:20   ` [PATCH 2/5] iommu/exynos: Fix warnings from DMA-debug Marek Szyprowski
     [not found]     ` <1479986420-30859-3-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-29 16:43       ` Joerg Roedel [this message]
2016-11-24 11:20   ` [PATCH 3/5] iommu/exynos: Ensure that SYSMMU is added only once to its master device Marek Szyprowski
2016-11-24 11:20 ` [PATCH 4/5] iommu/exynos: Add default_domain check in iommu_attach_device Marek Szyprowski
     [not found]   ` <1479986420-30859-5-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-24 12:25     ` Robin Murphy
     [not found]       ` <6937b5da-23cf-d9bb-0b7c-d54171b02828-5wv7dgnIgG8@public.gmane.org>
2016-11-24 13:05         ` Marek Szyprowski
2016-11-29 16:48     ` Joerg Roedel
     [not found]       ` <20161129164823.GD13850-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-11-30  9:05         ` Marek Szyprowski
2016-11-24 11:20 ` [PATCH 5/5] iommu/exynos: Properly release device from the default domain in ->remove Marek Szyprowski

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=20161129164310.GC13850@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@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