From nobody Sun Feb 8 07:58:32 2026 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 728E3171BA for ; Wed, 13 Mar 2024 07:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316754; cv=none; b=fnQzEi0d4ucyptR/06ZyXh6viOQI6GFA2HQGfi2KPHu/y2n0rYVptDZ+DSsRx+JVy2QycrONWDCXyVNZk/HGVUHfU8JCmhopL/0Y8yrGgMLUf5s7mvQdCh5h6IG64I/uT4OuOFvqz0wjywCIeULM/ZT5fORLr1O7HKYzuLD8Xbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316754; c=relaxed/simple; bh=+7Ej2BP0k7ldBgKJOfpYGxX+nF0FFpOlIi7UHETUd/A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Qd+7F5GfsmHRxL1s9/uUrsJ9y4KQwmxeF7UogDdJ0N06nPU4auxn2EUk4hAetF60Xy6xz/glBA45qWOMLMeB5DrHJoVc/TAnknAOIifU7tHarDUsnwajStehy05GtNsrae90239WMsxc4Ksv7ThEGZkEUnma0Sl+oeKrcGw4R+s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fLzn+NN7; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fLzn+NN7" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5687feeb1feso861757a12.2 for ; Wed, 13 Mar 2024 00:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710316751; x=1710921551; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=peeFPy/uEL81N+OBdVyMrTvmLjgutzLSp/Beb98+4eE=; b=fLzn+NN7xh1YzAeptWwWzXneDeAkSaz7QSoQld9JR4JhtEOFH/gGfEFfUz5lAgEIxb WSlgB3WpOy/o9Cbl2hB7EXF08u0WD6jS5qVQl7/K6+KqY2vcCDpdrTTBzUBqjANjM4ro G/9EKBtAlg0fm4W5GVmBzfRD3qU7eSlRifcLxTKfXSC5Fs9Kv0wKbacm5PtAeekXRVTt SJkfZf08dDaLU4lFwNuvshR1DME4izvSlhK7GDQHemGJnPUzsdWIaPwCmSvmzerawxX6 /Dg9AZx1vYq4ZCTd7iPSMerucFtkrRVXCoFl+tXXtcBZ0e1ySkRct9S26f5YPuABjf4P JFDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710316751; x=1710921551; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=peeFPy/uEL81N+OBdVyMrTvmLjgutzLSp/Beb98+4eE=; b=mUuT+4iJL60hDnU9IcBwMqIioKd6l816xRXyafylVN2/rFREq3Hwl06OqopiEMCzx+ o0NxtxEE6fRb3PDKsDerQ+xwmfIcDjFU9g2uqid0UUh/Xewb5aWrJNEUSurt5595fXKa 8JyCSvSLug08Hhza3s6fWAJLYIGqc9i/XQprQYUyRTpsq/iY1X/tLhZbFTBAVRRS5ulH rmiTl/pp4Gxsq/ttHCznBfjAPn9juDl6kNp9tG066+KyfwLFx0zCAL8eCjh3LWlGJlAp ijFEnxV6b6PE0H5n45O4n9vUJZm9+63/76PKUP5Sy7UI18IaEORZWtfB/LFR0wJM7dY+ Sfuw== X-Forwarded-Encrypted: i=1; AJvYcCVOnTlNWIn2tFUJB93k5HSZtNqegdyai3VbiwHAbvaeZKPQ7VkXEnYWwghJpn7gcjAdEMlsexxIyQPg8OeLbTefxXpjOr5ndCmvRhF2 X-Gm-Message-State: AOJu0Yx85OuvAYGCBDNDU87KYY5ttf+RTTgdsWZOh2021iaYQ9FFGpqw 0kq5q5SBqqO0/C2nM9Knfx8XG2Xd51mkmSHnwwrc378pbbgMm11o X-Google-Smtp-Source: AGHT+IFrI+F/1jOCLg/FBidF9lJM9Z26wDPAnBS207q+xEfJIIZ+RFNjFqulN/jPKtm4IqZTn1Gu6g== X-Received: by 2002:a17:906:fb8a:b0:a46:55ad:cd2f with SMTP id lr10-20020a170906fb8a00b00a4655adcd2fmr751863ejb.23.1710316750735; Wed, 13 Mar 2024 00:59:10 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id gt20-20020a1709072d9400b00a46025483c7sm4327037ejc.72.2024.03.13.00.59.09 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2024 00:59:09 -0700 (PDT) From: Wei Yang To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 1/4] vmlinux.lds.h: fix a typo in comment Date: Wed, 13 Mar 2024 07:58:36 +0000 Message-Id: <20240313075839.8321-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240313075839.8321-1-richard.weiyang@gmail.com> References: <20240313075839.8321-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" One extra 'i' is used. Signed-off-by: Wei Yang --- include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index 5dd3a61d673d..514d3002ad8a 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -3,7 +3,7 @@ * linker scripts. * * A minimal linker scripts has following content: - * [This is a sample, architectures may have special requiriements] + * [This is a sample, architectures may have special requirements] * * OUTPUT_FORMAT(...) * OUTPUT_ARCH(...) --=20 2.34.1 From nobody Sun Feb 8 07:58:32 2026 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04AEF17589 for ; Wed, 13 Mar 2024 07:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316755; cv=none; b=Er0dE7MnUCX43gGJPmxvHSkicMMmiR328tjfr4kxEFPOkn6WsiQ7tPleKPK0to8/4xsMhqMVFVnGNff40HtvTJTUgR4vRbi2dB1z7KV0DsSnsmc12p1uQjfl2bD/AUv4C1ZKIRO+kJog9QLea8UOyWToDnzV/Z9pGuCkeab275w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316755; c=relaxed/simple; bh=5EKNsvHVcpLfe38673V9v/i6xog89qCKvXxKXsLsi1I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=JfzOqr5IMRxl6/WueEKK4OB/LdYFwC6UC9ENLLmA2P7sFlBRIiT2LK3mvHCoLSlw57lvc0lkc3fuSFL2UDWP7MvK/CNQOYoGmIzq6Tn6wUPFSnKOyDLiN9QoIqh6+Fhg1Vhrq8HqJr+GCZenWZ7SynEyFoxBWAhKzOVPia7nZMU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=a8jSqfZa; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a8jSqfZa" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5684ea117a3so5688955a12.0 for ; Wed, 13 Mar 2024 00:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710316752; x=1710921552; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=gvr0OywRqfXlY8J8P6TNVybbliGURKEupVKvqRMCnx0=; b=a8jSqfZaixpbH5KxI6Z4Jo2AHPdUeWB4Sgqm8gvEQhzDQgzlC5H/1M7RC62oEtQI4i VAsY45HKlp3qFEK7/x7IFOJ0Z4yu3WWyQuQfzsKlUbiGxv/LWZ68DxH9Op7urQdI7yfS mLS51mb8uYABgjjYhVpiF8seSXLMMuwZnsk29GVHOPMStNeqlFMeIZCuZvQ72lr0QCE6 d8/xsWE4oG3cHJjD/Xi+4BBaE+TBxfxEzM3pLT2esCvHyfH5uGnuL8OJV47IDCTay/hC auL2QCtd3xz7oHOfzjUeafXdE/LkhCeplaGnXxNNxz07P/DWykFvesGnu4soyDL8xWIJ XqFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710316752; x=1710921552; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gvr0OywRqfXlY8J8P6TNVybbliGURKEupVKvqRMCnx0=; b=P9AUoKe6is3XcDP8FsBBc5Xm+UPxYGbUbYvwPNz9j8d1k0elrjKcPlhOq+R8dOCgbo d9g8U5dSXnL1H1Qk91G3rmpvqlI4cO23bIDn0qKP5iEqyi/t3Rj/nXOfjSUrusD6LTtt YE5qfyVExzYEzbcM1qSXx9Jj3sYp/7AfY1c9ju+irH/SLwvQbwFBOWxqsLDbAaCUyOPo VFOthfXWVoXBNpVAGj4MXv4DCyAdjeh2RHtJyKQQ4Rc7EHR4jKqVCXkCDIklfArH9KN9 AaTkcP/H95vIecI+wJmhvSm/Z02HCnCQyEyvs728CiKhuQOcijSpP2EL3WmUvtRucmf7 MdpA== X-Forwarded-Encrypted: i=1; AJvYcCUrl1Mm6NoRIBwtsSLTO/+5JticlPAH6lLHOaiQwF7kw0+Nlib0sJaDkXKbebaZYlRiXCGmeQz9npb7t16do9SdG3avlhlNmCAE5WH8 X-Gm-Message-State: AOJu0Yyg7WbsbRl//QZHuqQEVNIcA/QlaskPYD68+5Van6ZxYJuQF+H9 uwZcgGfh5HhsgiuRbbTB1n8suPVY75fXWe6n0ZKlnAQJM+I/a8cQ X-Google-Smtp-Source: AGHT+IGGPGs/rU+JEecIR5qdQtkiY1iwvNiaohvrYnd7OyeCWe8dWNXV5knp2zHQaPYwdoseqlHCpg== X-Received: by 2002:a17:906:1150:b0:a46:4851:b8cb with SMTP id i16-20020a170906115000b00a464851b8cbmr1506147eja.15.1710316752093; Wed, 13 Mar 2024 00:59:12 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id la18-20020a170907781200b00a43e8e76825sm4677315ejc.149.2024.03.13.00.59.11 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2024 00:59:11 -0700 (PDT) From: Wei Yang To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 2/4] x86/boot: replace __PHYSICAL_START with LOAD_PHYSICAL_ADDR Date: Wed, 13 Mar 2024 07:58:37 +0000 Message-Id: <20240313075839.8321-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240313075839.8321-1-richard.weiyang@gmail.com> References: <20240313075839.8321-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Both __PHYSICAL_START and LOAD_PHYSICAL_ADDR are defined to get aligned CONFIG_PHYSICAL_START, so we can replace __PHYSICAL_START with LOAD_PHYSICAL_ADDR. And then remove the definition of __PHYSICAL_START, which is only used to define __START_KERNEL. Since includes , which includes , it is fine to move definition from to . Signed-off-by: Wei Yang --- arch/x86/include/asm/boot.h | 5 ----- arch/x86/include/asm/page_types.h | 8 +++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h index a38cc0afc90a..12cbc57d0128 100644 --- a/arch/x86/include/asm/boot.h +++ b/arch/x86/include/asm/boot.h @@ -6,11 +6,6 @@ #include #include =20 -/* Physical address where kernel should be loaded. */ -#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ - + (CONFIG_PHYSICAL_ALIGN - 1)) \ - & ~(CONFIG_PHYSICAL_ALIGN - 1)) - /* Minimum kernel alignment, as a power of two */ #ifdef CONFIG_X86_64 # define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_= types.h index 86bd4311daf8..acc1620fd121 100644 --- a/arch/x86/include/asm/page_types.h +++ b/arch/x86/include/asm/page_types.h @@ -31,10 +31,12 @@ =20 #define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC =20 -#define __PHYSICAL_START ALIGN(CONFIG_PHYSICAL_START, \ - CONFIG_PHYSICAL_ALIGN) +/* Physical address where kernel should be loaded. */ +#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ + + (CONFIG_PHYSICAL_ALIGN - 1)) \ + & ~(CONFIG_PHYSICAL_ALIGN - 1)) =20 -#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) +#define __START_KERNEL (__START_KERNEL_map + LOAD_PHYSICAL_ADDR) =20 #ifdef CONFIG_X86_64 #include --=20 2.34.1 From nobody Sun Feb 8 07:58:32 2026 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CCCA1AAD4 for ; Wed, 13 Mar 2024 07:59:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316757; cv=none; b=sFTM3nZAYc4vSNMOQKpkcPn3tSh87Pf4WxJow+RXUV0uXXMLCQ41fyp0LqzGViHI49Nr94sED5nHTIwD00PYXxqLbeg+hs8vwG/rNwCNNItN45H+erH0D94CNyyjShpgOnN+FrGTb9d9waBvaF41xurAK60yauqaEcLAvehwD0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316757; c=relaxed/simple; bh=obXivfF7E+Qg8Iznsw6G79d73R/MUgaLs32PvM0qVFY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=nXabxbfkWGjC7cvk1W9ruybC1MWVAEeFSmkVqhOH8EpWf3GWMy9KHPsE5vwu9Ko6jAijJlGcHszlFj58NSdoZ3HYBLXEwFk3yPtVylJV0kLUGOzaheMDcjZQkghKyBMDQQEohXPFC2+aE/jc1DlLMg/E4PUt1KSfOAu3RiyOTMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UQQJn8Ig; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UQQJn8Ig" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-56877761303so1697752a12.3 for ; Wed, 13 Mar 2024 00:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710316754; x=1710921554; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=Wrnm8nAMmPhT5umInNW1PAAnG9V/dud8dEQbqU6dbpM=; b=UQQJn8IgVzKySajSjoK1l2ZpmB04brKXJ9nXFjQGse9QpzuRbGreBBmaeZEzy7R20S Bq0BZ9qa2vTxgJc/2u5mzy9O6tWs3RvN0PE3YOvpDxJrLHKuS7yGGZnnx3ihMw7ljU/a Sp+OiW3yMOcBvhfqiyDTnsLXyBO6rI7To+SrR7fNiEWsuKgjraJDcZ6KjW12KS6Q2pcw 9ZArcz+m+F+4F+qxbk/Y139diAQCgJFl3VEi2YIJ373kqs9bE8lc9/+JcZDfVWpDVvXf XnxrG4bGa724C3LsnujxwJ+FJvDGkU9edNa6diWxpXLr2vkLY1T63nNpWfL/KXs9q5dv Rz+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710316754; x=1710921554; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wrnm8nAMmPhT5umInNW1PAAnG9V/dud8dEQbqU6dbpM=; b=k55LyqmJCmWSoDcTCr1LG1pt7s/EPszzNEbwcYvNNK2cjc/Sg1sEB6ogryVDhtr712 /wEXyl+bq57Ix2GkhBT0qDDCYjetWXngUM3p2qFOpXnJjPtBEf3XgZe66XWk8p9Q5Xjz BCMzIX46GsOIJ8/PXfcipuHUbIxoH6p5FeePS1dIy8otGWIB0A8rQn4O/h/WaOiwuaMK PAHGDctFjoVw1S+CEcqacOUJbnSctiHV6hjiJvcTl8k8UOquMHU0d9S27bnVk7ceVMX2 OLqgIWobZgF0ISXST4mn7aPCJp/pJaK5414LbiNjK63+JUe9qqt6dhSfzejWlsQVbY4G EsTw== X-Forwarded-Encrypted: i=1; AJvYcCVeZHu6eGQ9UkT8uFFs1+ZqdNp9qUEV4U1PoAMFZIiNcpFcwn4RtQIIJ/eCVu7mfo3b/1xjwfYMJ8gkQ35DQDdLAct6cJzGpXAhIC35 X-Gm-Message-State: AOJu0YwG+XaXOaJ0C7+P7R8xn11HeLfBYI0szk4AbBe25wN3xROgBf0K 6ISDXc82iTWGSsQELReY+pvT+24i42E2y3JbvKX2cloY0Lx1a7H3 X-Google-Smtp-Source: AGHT+IHfcNH1IR7eAO+6tj1I7o0filQpt97iIoZFKXVns+GITmlG2JVBGhf+s3v7yyuLvy7iFEbQAw== X-Received: by 2002:a50:d71b:0:b0:567:504e:e779 with SMTP id t27-20020a50d71b000000b00567504ee779mr2644679edi.25.1710316753549; Wed, 13 Mar 2024 00:59:13 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id ij12-20020a056402158c00b00562d908daf4sm4703669edb.84.2024.03.13.00.59.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2024 00:59:12 -0700 (PDT) From: Wei Yang To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 3/4] x86/vmlinux.lds.S: remove conditional definition of LOAD_OFFSET Date: Wed, 13 Mar 2024 07:58:38 +0000 Message-Id: <20240313075839.8321-4-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240313075839.8321-1-richard.weiyang@gmail.com> References: <20240313075839.8321-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In vmlinux.lds.S, we define LOAD_OFFSET conditionally to __PAGE_OFFSET or __START_KERNEL_map. While __START_KERNEL_map is already defined to the same value with the same condition. So it is fine to define LOAD_OFFSET to __START_KERNEL_map directly. Signed-off-by: Wei Yang --- arch/x86/kernel/vmlinux.lds.S | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 56451fd2099e..88dcf9366949 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -15,11 +15,7 @@ * put it inside the section definition. */ =20 -#ifdef CONFIG_X86_32 -#define LOAD_OFFSET __PAGE_OFFSET -#else #define LOAD_OFFSET __START_KERNEL_map -#endif =20 #define RUNTIME_DISCARD_EXIT #define EMITS_PT_NOTE --=20 2.34.1 From nobody Sun Feb 8 07:58:32 2026 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB1621BC44 for ; Wed, 13 Mar 2024 07:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316758; cv=none; b=Wa5iScMrKaeN6P3fW+cf+bh707vXJjg662OrgOocfnHydEjM3c1lK32eBmBqX0lUSRL4wQ0y2ognj66siqOfSolQFYr8SV8Bgt6f/uifGpB3ifoSY1gv+c7POsBnIKR9ucxTXkdy4MLugMEiAlMaLdgpMkCkAmHGI/WJJxOiWE8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316758; c=relaxed/simple; bh=1+DXzCnJVRzq9ikXnxmeY9e9axFtJowM0Dq90O4pxOM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=nqnwAM2gV4nK3/zjQJxSdUzUJs6jCvV7qIKF77mLU9wV5reBKlCDzpEEeGM0zJ8D4DDUc8mXC+QhRPp3SsMfNptyXSVBHnWl8MBjs5zLgzLB3YQzwTWyIVefIV0n6LnuVpx4j0yu5fTRl9OBKabtyBRMNJjPd52HoK6iQC95YQ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZmYOzmEO; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZmYOzmEO" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a3122b70439so806499466b.3 for ; Wed, 13 Mar 2024 00:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710316755; x=1710921555; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=lThlzUpTfw33GBSfE7OBF8oobbCjMuUfx5aiF03E7Bo=; b=ZmYOzmEOHvxPB3MC3sC5tPu0qN2vZdrj6ejRqF/tVIDJm8ZXwyZ9sEJT+qydcVnBcG 4zDRtM5V4tCDncAoc7wtK21G1Q7cIIWnDuCdHLd1loMfgRiP5I0oHLlbFqlpg03bOHYb 07QjYtaDttVwFEAvZS0IP1b29g8d8LRb+rf1Sl9L862VaQORltlTht5bxX/mC+/v3l7J qZ0SeCemzoPmLmyfDvruM9bGGcwnvCp3thiMEkUgnJugZAPP+uVhNVHLhDvJBDRtXDc/ F2rdwPmF93yZ/PNV1BnyBYkrdGKEKzzyW9iM/tJbff/Z2MQzLgd0BJ4S81MPp/w16iUM 0F3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710316755; x=1710921555; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lThlzUpTfw33GBSfE7OBF8oobbCjMuUfx5aiF03E7Bo=; b=D0QzkpMdm5iQFedmzFgmklFOSTPCWHRWAO38ue9XVOFZHVblvHSJ56MUf/9tM9tptT 1HRMKuet1N+WK+jh2kytMQqU1RDBL3VL4oUk47Dv0bsxZqlIZKgFvdzqNeYuwYlBgzAQ 0u0UFMRYC8MiyeVD5+IHbWJoSybc6DYGcUyjO2ZY1hV1TCgWy1aeHEqBdvF4cyRmV2i2 tGB7Y4D55ac9QhZgYkVWGna9SLQKG34lJM/G/RYq/xPUVdSZcZ2EBv9BNqV7Mx6PD0GZ 5EqIOW3Hi8TMq+Jw6hpmBgQDedhMngNbhpX0Txejsj2OTzclVKLrWpwzJ2tWJ7jx2Kib RMLQ== X-Forwarded-Encrypted: i=1; AJvYcCUyA24JmsF7enKfAv6r2NoOMZnqk7kEKO8D3pTl8tq+EomntfRazVxZFVq9A5EF78MpxqJZT+jIphapInBWF0jkbsBOvi4DwqcgMcS9 X-Gm-Message-State: AOJu0Yx0WOV8QE/mfvUzi9ub40RUGUk2+n7LRe1VI9cnurT8j2yckqEf +K1RjOfc3l4QbHlUnTKM2j6GuSoee+zS9BisAsI2/KpzYbBvdrrx X-Google-Smtp-Source: AGHT+IEeqKuY3XAEkXPH27B6NIkM/m36h7iNcF1+zcQNV8MpKZ1Mq5IagVQGz+FpzW91L7aa3fy2ng== X-Received: by 2002:a17:907:7f04:b0:a46:50e8:2798 with SMTP id qf4-20020a1709077f0400b00a4650e82798mr1318403ejc.7.1710316755186; Wed, 13 Mar 2024 00:59:15 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id dk16-20020a170907941000b00a4660932864sm207189ejc.147.2024.03.13.00.59.13 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2024 00:59:14 -0700 (PDT) From: Wei Yang To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 4/4] x86/vmlinux.lds.S: take __START_KERNEL out conditional definition Date: Wed, 13 Mar 2024 07:58:39 +0000 Message-Id: <20240313075839.8321-5-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240313075839.8321-1-richard.weiyang@gmail.com> References: <20240313075839.8321-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If CONFIG_X86_32, the section start address is defined to be "LOAD_OFFSET + LOAD_PHYSICAL_ADDR", which is the same as __START_KERNEL_map. Let's take it out to remove the complexity. Signed-off-by: Wei Yang --- arch/x86/kernel/vmlinux.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 88dcf9366949..a20409b0a3f2 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -110,11 +110,10 @@ PHDRS { =20 SECTIONS { + . =3D __START_KERNEL; #ifdef CONFIG_X86_32 - . =3D LOAD_OFFSET + LOAD_PHYSICAL_ADDR; phys_startup_32 =3D ABSOLUTE(startup_32 - LOAD_OFFSET); #else - . =3D __START_KERNEL; phys_startup_64 =3D ABSOLUTE(startup_64 - LOAD_OFFSET); #endif =20 --=20 2.34.1