mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de,
	torvalds@linux-foundation.org
Subject: Re: [PATCH 2/2] x86: add early quirk for reserving Intel graphics stolen memory v3
Date: Thu, 25 Jul 2013 23:42:15 +0100	[thread overview]
Message-ID: <20130725224006.GC13295@cantiga.alporthouse.com> (raw)
In-Reply-To: <1374770269-3223-3-git-send-email-jbarnes@virtuousgeek.org>

On Thu, Jul 25, 2013 at 09:37:49AM -0700, Jesse Barnes wrote:
> Systems with Intel graphics controllers set aside memory exclusively for
> gfx driver use.  This memory is not marked in the E820 as reserved or as
> RAM, and so is subject to overlap from E820 manipulation later in the
> boot process.  On some systems, MMIO space is allocated on top, despite
> the efforts of the "RAM buffer" approach, which simply rounds memory
> boundaries up to 64M to try to catch space that may decode as RAM and so
> is not suitable for MMIO.
> 
> v2: use read_pci_config for 32 bit reads instead of adding a new one
>     (Chris)
>     add gen6 stolen size function (Chris)
>     use a function pointer (Chris)
>     drop gen2 bits (Daniel)

As a reminder, can you please reorder the entries in the macro to ease
compilation by userspace - c++ doesn't like having .class and so I have
to massage the file with

intel_pciids.h: i915_pciids.h
       sed 's/_I915_PCIIDS/INTEL_PCIIDS/; s/\..*= //' < $^ > $@

to strip out the C99-style struct declarations (as my cpp skills were
obviously not strong enough) but then that requires the member ordering
is correct. Alternatively, if we discard the clean C99 code, both the
kernel struct pci_device_id and libpciaccess's struct pci_match_data are
the same - and I can just use i915_pciids.h directly. My perference is
to keep using C99 in the kernel as it makes the header much more
readable.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2013-07-25 22:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 16:37 Ugly patches for stolen reservation Jesse Barnes
2013-07-25 16:37 ` [PATCH 1/2] drm/i915: split PCI IDs out into i915_drm.h v3 Jesse Barnes
2013-07-25 23:06   ` Chris Wilson
2013-07-25 16:37 ` [PATCH 2/2] x86: add early quirk for reserving Intel graphics stolen memory v3 Jesse Barnes
2013-07-25 22:42   ` Chris Wilson [this message]
2013-07-25 22:59     ` Chris Wilson
2013-07-25 23:18       ` Jesse Barnes
2013-07-26  8:10   ` [Intel-gfx] " Daniel Vetter
2013-07-26 16:58   ` H. Peter Anvin
2013-07-26 17:12     ` Jesse Barnes
2013-07-25 20:05 ` Ugly patches for stolen reservation Ingo Molnar
2013-07-25 20:16   ` Jesse Barnes
2013-07-25 22:10     ` [Intel-gfx] " Daniel Vetter
2013-07-25 22:42   ` H. Peter Anvin
2013-07-25 23:17     ` Jesse Barnes
2013-07-26  0:49       ` H. Peter Anvin
2013-07-26  0:31     ` Linus Torvalds
2013-07-26  0:48       ` H. Peter Anvin
2013-07-26 17:52         ` [Intel-gfx] " Daniel Vetter
2013-07-26 15:51       ` Jesse Barnes

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=20130725224006.GC13295@cantiga.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=hpa@zytor.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®