[Intel-gfx] [PATCH 01/10] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 6 18:43:18 UTC 2017


Quoting Matthew Auld (2017-12-06 18:17:21)
> From: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> 
> To give upcoming SKU BIOSes more flexibility in placing the Intel
> graphics stolen memory, make all variables storing the placement or size
> compatible with full 64 bit range. Also by exporting the stolen region
> as a resource, we can then nuke the duplicated stolen discovery in i915.
> 
> v2: export the stolen region as a resource
>     fix u16 << 16 (Chris)
> v3: actually fix u16 << 16
> 
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Ingo Molnar <mingo at kernel.org>
> Cc: H. Peter Anvin <hpa at zytor.com>
> Cc: x86 at kernel.org
> Cc: linux-kernel at vger.kernel.org
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk> #v1
> ---
> +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 (toud * KB(64)) + i845_tseg_size();

Overkill on the brackets.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list