From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6940B1448D5 for ; Sun, 14 Dec 2025 08:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765700775; cv=none; b=EkHri9QZdJUL9YUU2X4CTEz9OSRfo+b4IEhd2VN+jDYsBn7frf4H/yXzThIjXMOpDfbIfDY8lV+/Ngg5Bq19elqda3tp35rcD8lEzYza5aKvYXf/uoSOMFUr8jL6ZoyrkHMJZ5hPe7i9GVQHl6NT84Cy4sMzTa6v5+Fx5P8Wo68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765700775; c=relaxed/simple; bh=ic79msdqn0N+IeWgdBa3ceE1sdsagkR6VGi9VPRnMug=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C1/YuGQUMEzTsOKaGp7vzOxdFziT4tADYSxDIEjGnPaw17uhTPHislzd7YWnpNUJ6AiWQTA9HFR8ikXqU1C93T/fDJhsDneC7z6NIwzQqOnfNvGrQMlEF5ocbkvO564lwyj09ftnTa2+cVnKMwlBsO3xoy7gaVMfAQf2iCcEi5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MSJHfQCX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MSJHfQCX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E372AC4CEF1; Sun, 14 Dec 2025 08:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765700775; bh=ic79msdqn0N+IeWgdBa3ceE1sdsagkR6VGi9VPRnMug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MSJHfQCXHGQ53cLh2mAWqg0p5Cx6R+obNDCH3LXPcpxS9nNEsh5BGy8RUaAdrvWO/ JgCBo898iodiTo5LE+Z8dkEyu6E2NvVQCcYksgUEFTydTdTDZTh9ztETx0vTuU0ExV OnuzOt6L8L7kL39I+uk84hP/Giqw3ZRPMWIPmEZgS3PuKlFbGKlxp6j2W53UZ/n26D GD5GsJ2R86RhIsF8M3IWa/0CttjP3ep344thqzOvEw7pIdnH+o8iJn2j+H9yW6Wk1d Ixfzae3zmcHWRlgkyjsxibwfLTHKWc/sMPjGlxFcEm8rVoZ6RHPdGowEB9nTR3y8gn WLQNpK6+Q/Csg== Date: Sun, 14 Dec 2025 09:26:09 +0100 From: Ingo Molnar To: Nikolay Borisov Cc: linux-kernel@vger.kernel.org, Andy Shevchenko , Arnd Bergmann , Borislav Petkov , Juergen Gross , "H . Peter Anvin" , Kees Cook , Linus Torvalds , Mike Rapoport , Paul Menzel , Peter Zijlstra , Thomas Gleixner , David Woodhouse Subject: [PATCH 33/32] x86/boot/e820: Use symbols for literals Message-ID: References: <20250515120549.2820541-1-mingo@kernel.org> <20250515120549.2820541-13-mingo@kernel.org> <92a15c2d-055c-4f4e-b232-32030a8e5e54@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92a15c2d-055c-4f4e-b232-32030a8e5e54@suse.com> * Nikolay Borisov wrote: > > +static bool __init e820_device_region(enum e820_type type, struct resource *res) > > { > > - /* this is the legacy bios/dos rom-shadow + mmio region */ > > + /* This is the legacy BIOS/DOS ROM-shadow + MMIO region: */ > > if (res->start < (1ULL<<20)) > > nit: While at it, change this to also use SZ_1M define rather than this > shift. Yeah - I've put these cleanups into a separate patch, see attached. Thanks, Ingo ==================> Subject: [PATCH] x86/boot/e820: Use symbols for literals Use the human-readable SZ_* constants. Suggested-by: Nikolay Borisov Signed-off-by: Ingo Molnar Link: https://patch.msgid.link/92a15c2d-055c-4f4e-b232-32030a8e5e54@suse.com --- arch/x86/kernel/e820.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index d1b1786d006b..97b54bd0f482 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -617,7 +617,7 @@ __init static void e820__update_table_kexec(void) e820__update_table(e820_table_kexec); } -#define MAX_GAP_END 0x100000000ull +#define MAX_GAP_END SZ_4G /* * Search for a gap in the E820 memory space from 0 to MAX_GAP_END (4GB). @@ -696,7 +696,7 @@ __init void e820__setup_pci_gap(void) pr_err("Cannot find an available gap in the 32-bit address range\n"); pr_err("PCI devices with unassigned 32-bit BARs may not work!\n"); #else - max_gap_start = 0x10000000; + max_gap_start = SZ_256M; #endif } @@ -1080,7 +1080,7 @@ __initdata static struct resource *e820_res; __init static bool e820_device_region(enum e820_type type, struct resource *res) { /* This is the legacy BIOS/DOS ROM-shadow + MMIO region: */ - if (res->start < (1ULL<<20)) + if (res->start < SZ_1M) return false; /*