Re: [PATCH 1/9] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> > 
> > 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@xxxxxxxxxxxxxxx>
> > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > Cc: H. Peter Anvin <hpa@xxxxxxxxx>
> > Cc: x86@xxxxxxxxxx
> > Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> #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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux