intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Matthew Auld <matthew.auld@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Joonas@freedesktop.org
Subject: Re: [PATCH 1/9] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit
Date: Mon, 27 Nov 2017 11:43:30 +0200	[thread overview]
Message-ID: <1511775810.4627.18.camel@linux.intel.com> (raw)
In-Reply-To: <151156112745.9932.10750047028138297828@mail.alporthouse.com>

On Fri, 2017-11-24 at 22:05 +0000, Chris Wilson wrote:
> Quoting Matthew Auld (2017-11-24 21:29:22)
> > From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > 
> > In preparation for upcoming SKUs, allow more freedom in placement
> > of the Intel graphics stolen memory by BIOS to full 64bit range.
> > 
> > v2: export the stolen region as a resource
> >     fix u16 << 16 (Chris)
> > 
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: H. Peter Anvin <hpa@zytor.com>
> > Cc: x86@kernel.org
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #v1
> > ---
> > -static phys_addr_t __init i865_stolen_base(int num, int slot, int func,
> > -                                          size_t stolen_size)
> > +static resource_size_t __init i865_stolen_base(int num, int slot, int func,
> > +                                              resource_size_t stolen_size)
> >  {
> >         u16 toud = 0;
> >  
> >         toud = read_pci_config_16(0, 0, 0, I865_TOUD);
> >  
> > -       return (phys_addr_t)(toud << 16) + i845_tseg_size();
> > +       return (resource_size_t)(toud << 16) + i845_tseg_size();
> 
> We need the cast on toud before the <<.

I was thinking should could convert this into multiplication, while at
it. Does that make sense to you?

	return (toud * KB(64)) + i845_tseg_size();

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-11-27  9:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 21:29 [PATCH 0/9] make stolen resource centric Matthew Auld
2017-11-24 21:29 ` [PATCH 1/9] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit Matthew Auld
2017-11-24 22:05   ` Chris Wilson
2017-11-27  9:43     ` Joonas Lahtinen [this message]
2017-11-24 23:48   ` Thomas Gleixner
2017-11-27  8:11     ` Joonas Lahtinen
2017-11-24 21:29 ` [PATCH 2/9] x86/early-quirks: replace the magical increment start values Matthew Auld
2017-11-24 21:29 ` [PATCH 3/9] x86/early-quirks: reverse the if ladders Matthew Auld
2017-11-24 21:29 ` [PATCH 4/9] drm/i915: nuke the duplicated stolen discovery Matthew Auld
2017-11-24 22:08   ` Chris Wilson
2017-11-24 21:29 ` [PATCH 5/9] drm/i915: s/mappable_end/mappable_size/ Matthew Auld
2017-11-24 22:11   ` Chris Wilson
2017-11-24 21:29 ` [PATCH 6/9] drm/i915: make dsm struct resource centric Matthew Auld
2017-11-24 22:15   ` Chris Wilson
2017-11-24 21:29 ` [PATCH 7/9] drm/i915: make reserved " Matthew Auld
2017-11-24 22:19   ` Chris Wilson
2017-11-24 21:29 ` [PATCH 8/9] drm/i915: make mappable " Matthew Auld
2017-11-24 22:22   ` Chris Wilson
2017-11-24 21:29 ` [PATCH 9/9] drm/i915: prefer resource_size_t for everything stolen Matthew Auld
2017-11-24 22:25   ` Chris Wilson
2017-11-24 21:50 ` ✓ Fi.CI.BAT: success for make stolen resource centric (rev3) Patchwork
2017-11-24 22:45 ` ✗ Fi.CI.IGT: warning " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2017-12-05 21:02 [PATCH 0/9] make stolen resource centric Matthew Auld
2017-12-05 21:02 ` [PATCH 1/9] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit Matthew Auld
2017-12-07 12:28 [PATCH 0/9] make stolen resource centric Matthew Auld
2017-12-07 12:28 ` [PATCH 1/9] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit Matthew Auld
2017-12-08 22:58   ` Thomas Gleixner

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=1511775810.4627.18.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=Joonas@freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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).