linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: keithp@keithp.com, Eric Anholt <eric@anholt.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add io-mapping functions to dynamically map large device apertures
Date: Fri, 31 Oct 2008 09:59:29 -0700	[thread overview]
Message-ID: <1225472369.10543.27.camel@koto.keithp.com> (raw)
In-Reply-To: <20081031092125.GC14127@elte.hu>

[-- Attachment #1: Type: text/plain, Size: 1752 bytes --]

On Fri, 2008-10-31 at 10:21 +0100, Ingo Molnar wrote:

> it's ugly and inflexible to put x86 dependencies into generic headers. 
> (even though with a high likelyhood 32-bit x86 will be the only arch 
> to ever implement the iomap_atomic() APIs)
> 
> Instead please add a HAVE_ATOMIC_IOMAP define to arch/x86/Kconfig:
> 
>  config HAVE_ATOMIC_IOMAP
>          def_bool y
>          depends on X86_32
> 
> ... and use #ifndef HAVE_ATOMIC_IOMAP in include/linux/io-mapping.h 
> instead of #ifdef CONFIG_X86_64.

Just to clarify the issue here: there are two separate implementations
of the io_mapping API -- one for 'large address space' machines where
ioremap_wc can handle the typical graphics aperture within the kernel
virtual map, and the other using iomap_atomic_prot_pfn for machines with
puny address spaces.

All large address space machines can provide the io_mapping API without
any archtecture-specific support. For efficient 32-bit io_mapping
support, we require the new iomap_atomic_prot_pfn function.

So, it seems like what I want to do is use the large address space code
on any machine which supports it, and then use the iomap_atomic_prot_pfn
version for small address space machines which have the
iomap_atomic_prot_pfn function.

What I think you're suggesting is to just assume that machines without
iomap_atomic_prot_pfn have address spaces large enough to support the
ioremap_wc path. The alternative is to create a third (slow) path (which
I did before the iomap_atomic_prot_pfn API was introduced) that uses
ioremap_wc at run time for small address space machines without
iomap_atomic_prot_pfn.

Let me know which you'd prefer and I'll get a patch out ASAP.

-- 
keith.packard@intel.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-10-31 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1225392985-6832-1-git-send-email-eric@anholt.net>
2008-10-31  2:38 ` [PATCH] Add io-mapping functions to dynamically map large device apertures Eric Anholt
2008-10-31  2:38   ` [PATCH] i915: Use io-mapping interfaces instead of a variety of mapping kludges Eric Anholt
2008-10-31  9:21   ` [PATCH] Add io-mapping functions to dynamically map large device apertures Ingo Molnar
2008-10-31 16:59     ` Keith Packard [this message]
2008-11-03  8:37       ` Ingo Molnar
2008-11-03 17:09 [PATCH] [x86_32] Add io_map_atomic using fixmaps Keith Packard
2008-11-03 17:09 ` [PATCH] Add io-mapping functions to dynamically map large device apertures Keith Packard
  -- strict thread matches above, loose matches on Subject: below --
2008-10-22  9:36 io resources and cached mappings (was: [git pull] drm patches for 2.6.27-rc1) Ingo Molnar
2008-10-23  7:14 ` Keith Packard
2008-10-23  7:14   ` [PATCH] Add io-mapping functions to dynamically map large device apertures Keith Packard
2008-10-24  4:49     ` Randy Dunlap
2008-10-24  6:26       ` Keith Packard

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=1225472369.10543.27.camel@koto.keithp.com \
    --to=keithp@keithp.com \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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).