linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: David Miller <davem@davemloft.net>
Cc: "joro@8bytes.org" <joro@8bytes.org>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] iommu-common: only compile lib/iommu_common.c for Sparc64
Date: Fri, 18 Sep 2015 10:03:40 +0100	[thread overview]
Message-ID: <55FBD36C.5070301@arm.com> (raw)
In-Reply-To: <20150917.113806.1491126940106627619.davem@davemloft.net>

Hi David,

On 17/09/15 19:38, David Miller wrote:
> From: Andre Przywara <andre.przywara@arm.com>
> Date: Thu, 17 Sep 2015 09:40:27 +0100
> 
>> It seems the types used in this file are not really correct, but a
>> fix isn't trivial.  So for the time being restrict this code to be
>> compiled only when we actually need it.  Compile tested on Sparc,
>> Sparc64, PPC64, ARM, ARM64, x86.
> 
> The whole reason this code gets compiled unconditionally is to
> ensure it's portability so that other platforms can use it at
> some point.
> 
> So I would ask that, instead of sweeping it under the rug, you
> help work on fixing the problem you've uncovered.

OK, I understand that. To be honest I tried that: changing the return
type of iommu_tbl_range_alloc() to dma_addr_t and taking it from there.
This resulted in quite some changes in the callers in arch/sparc, which
scared me a bit because I don't have a clue about the Sparc IOMMU and I
cannot test it seriously.
Also I deemed it not appropriate still for the 4.3 release, which was
what my patch was aiming at (because it is a 4.3 merging window regression).

So I have a simpler version of the proper fix mentioned above, which
simply changes the return type of iommu_tbl_range_alloc() and pushes
this warning away, though this still isn't right and just papers over
the issue, I think. (Sending that out in a minute in a separate mail for
reference).

So what is your hunch on that? Shall we go with a dual approach: Fixing
the compiler warning with either the simple return type change or the
Kconfig approach now for 4.3 and revert that after the actual culprit
gets fixed later?

Or do you know of a simpler way to fixing it properly which could make
it still into 4.3?

Cheers,
Andre.

  reply	other threads:[~2015-09-18  9:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  8:40 [PATCH] iommu-common: only compile lib/iommu_common.c for Sparc64 Andre Przywara
2015-09-17 18:38 ` David Miller
2015-09-18  9:03   ` Andre Przywara [this message]
2015-09-18  9:09     ` [PATCH] iommu-common: fix return type of iommu_tbl_range_alloc() Andre Przywara
2015-10-21 19:12       ` Geert Uytterhoeven
2015-10-21 19:56         ` Sowmini Varadhan
2015-09-18 17:09     ` [PATCH] iommu-common: only compile lib/iommu_common.c for Sparc64 David Miller
2015-09-18 17:28       ` Andre Przywara
2015-09-21 17:17         ` [PATCH] sparc(64)/iommu: fixup iommu_tbl_range_alloc() types Andre Przywara
2015-10-05  9:54           ` Andre Przywara
2015-11-04 16:38             ` David Miller

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=55FBD36C.5070301@arm.com \
    --to=andre.przywara@arm.com \
    --cc=davem@davemloft.net \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.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).