Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752699AbdLKOjS (ORCPT ); Mon, 11 Dec 2017 09:39:18 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36475 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbdLKOjO (ORCPT ); Mon, 11 Dec 2017 09:39:14 -0500 X-Google-Smtp-Source: ACJfBotDREpUteUp0fTxAStqJIk8uItAuzdXlw+2KkHiphtd0ojxoshGxvtyGj202+dXod/DQR1Aaw== Date: Mon, 11 Dec 2017 15:39:11 +0100 From: Ingo Molnar To: Matthew Auld Cc: intel-gfx@lists.freedesktop.org, Joonas Lahtinen , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Chris Wilson , Paulo Zanoni , Thomas Gleixner , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/8] x86/early-quirks: replace the magical increment start values Message-ID: <20171211143911.qoina6ruyeawyskz@gmail.com> References: <20171211121427.26205-1-matthew.auld@intel.com> <20171211121427.26205-3-matthew.auld@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171211121427.26205-3-matthew.auld@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1697 Lines: 49 * Matthew Auld wrote: > Replace the magical +2, +9 etc. with +MB, which is far easier to read. > > Suggested-by: Ville Syrj?l? > Signed-off-by: Matthew Auld > Cc: Joonas Lahtinen > Cc: Ville Syrj?l? > Cc: Chris Wilson > Cc: Paulo Zanoni > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Cc: x86@kernel.org > Cc: linux-kernel@vger.kernel.org > Reviewed-by: Ville Syrj?l? > --- > arch/x86/kernel/early-quirks.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c > index 6c1624889011..3cbb2c78a9df 100644 > --- a/arch/x86/kernel/early-quirks.c > +++ b/arch/x86/kernel/early-quirks.c > @@ -428,9 +428,9 @@ static resource_size_t __init chv_stolen_size(int num, int slot, int func) > if (gms < 0x11) > return gms * MB(32); > else if (gms < 0x17) > - return (gms - 0x11 + 2) * MB(4); > + return (gms - 0x11) * MB(4) + MB(8); > else > - return (gms - 0x17 + 9) * MB(4); > + return (gms - 0x17) * MB(4) + MB(36); > } > > static resource_size_t __init gen9_stolen_size(int num, int slot, int func) > @@ -446,7 +446,7 @@ static resource_size_t __init gen9_stolen_size(int num, int slot, int func) > if (gms < 0xf0) > return gms * MB(32); > else > - return (gms - 0xf0 + 1) * MB(4); > + return (gms - 0xf0) * MB(4) + MB(4); Acked-by: Ingo Molnar Thanks, Ingo