[Intel-gfx] [PATCH v8 2/9] x86/early-quirks: export the stolen region as a resource
Chris Wilson
chris at chris-wilson.co.uk
Mon Dec 11 15:40:48 UTC 2017
Quoting Matthew Auld (2017-12-11 15:18:15)
> We duplicate the stolen discovery code in early-quirks and in i915,
> however if we just export the region as a resource from early-quirks we
> can nuke the duplication.
>
> 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
> ---
> arch/x86/kernel/early-quirks.c | 11 +++++++++--
> include/drm/i915_drm.h | 3 +++
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index a18de5fb9e68..6c1624889011 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -532,6 +532,9 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
> INTEL_CNL_IDS(&gen9_early_ops),
> };
>
> +struct resource intel_graphics_stolen_res __ro_after_init = DEFINE_RES_MEM(0, 0);
> +EXPORT_SYMBOL(intel_graphics_stolen_res);
> +
> static void __init
> intel_graphics_stolen(int num, int slot, int func,
> const struct intel_early_ops *early_ops)
> @@ -546,8 +549,12 @@ intel_graphics_stolen(int num, int slot, int func,
> return;
>
> end = base + size - 1;
> - printk(KERN_INFO "Reserving Intel graphics memory at %pa-%pa\n",
> - &base, &end);
> +
> + intel_graphics_stolen_res.start = base;
> + intel_graphics_stolen_res.end = end;
> +
> + printk(KERN_INFO "Reserving Intel graphics memory at %pR\n",
> + &intel_graphics_stolen_res);
Fwiw, it seems like new early-quirks.c has transitioned to pr_info().
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list