From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.emlix.com (mx1.emlix.com [178.63.209.131]) (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 DB1C819CD01 for ; Wed, 18 Dec 2024 12:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.63.209.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734524497; cv=none; b=VOW6OeO38D3pI44VlpyJVXDliFAMBa7gkAE+wYr0/YChyVPsI7azJBWr7LYdto8Sh4hxzmojcoWjV5tXVY8Mlfi4RAn23NmoKdjg0eZvsy06als+Jg9lKhTpKw2Zo4x3WIKU7//wvu2vacx2wac3ZI2MjtnAP7U0fbgtFlaiU2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734524497; c=relaxed/simple; bh=lkiOeI5IvLfXkp76zU5DIoQA9eG2sg1oDJ2b32zqhwU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JIVHqN1CANz0cdB8loKBcxdzE0dfyNIRQXEdZF9CKQM0gSj02aVYTMJKUvTFPWIHmVG1+XqJNLsZA+Ghc79gZG45eqtbgdNK1bliB3Zs4s1NC0BMbkb5riX/CNhEZV+3wjZSSCcNSZUkWZsvial1J2xwRgwDu1s4YenlJiB+Zpw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=emlix.com; spf=pass smtp.mailfrom=emlix.com; arc=none smtp.client-ip=178.63.209.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=emlix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=emlix.com Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 4E4775F880; Wed, 18 Dec 2024 13:13:30 +0100 (CET) From: Rolf Eike Beer To: Russell King , Arnd Bergmann , Yuntao Liu , Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm32: simplify ARM_MMU_KEEP usage Date: Wed, 18 Dec 2024 13:13:24 +0100 Message-ID: <1811814.VLH7GnMWUR@devpool47.emlix.com> Organization: emlix GmbH In-Reply-To: <2200295.irdbgypaU6@devpool47.emlix.com> References: <2200295.irdbgypaU6@devpool47.emlix.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8505703.NyiUUSuA9g"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart8505703.NyiUUSuA9g Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Rolf Eike Beer Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm32: simplify ARM_MMU_KEEP usage Date: Wed, 18 Dec 2024 13:13:24 +0100 Message-ID: <1811814.VLH7GnMWUR@devpool47.emlix.com> Organization: emlix GmbH In-Reply-To: <2200295.irdbgypaU6@devpool47.emlix.com> References: <2200295.irdbgypaU6@devpool47.emlix.com> MIME-Version: 1.0 On Montag, 7. Oktober 2024 15:11:40 Mitteleurop=C3=A4ische Normalzeit Rolf = Eike=20 Beer wrote: > All current users need to add a KEEP() around the argument so the value is > actually kept, which doesn't feel very natural and is prone to upcoming b= ugs > as the name suggests that this macro alone already keeps things. Move that > directly into the definition. >=20 > Signed-off-by: Rolf Eike Beer > --- Ping? > I'm unsure if ARM_MMU_DISCARD() needs the same treatment for the non-MMU > case. I suspect noone has tried dead code elimination for non-MMU? >=20 > arch/arm/include/asm/vmlinux.lds.h | 2 +- > arch/arm/kernel/vmlinux-xip.lds.S | 2 +- > arch/arm/kernel/vmlinux.lds.S | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/arch/arm/include/asm/vmlinux.lds.h > b/arch/arm/include/asm/vmlinux.lds.h index d60f6e83a9f7..89697f204715 > 100644 > --- a/arch/arm/include/asm/vmlinux.lds.h > +++ b/arch/arm/include/asm/vmlinux.lds.h > @@ -19,7 +19,7 @@ > #endif >=20 > #ifdef CONFIG_MMU > -#define ARM_MMU_KEEP(x) x > +#define ARM_MMU_KEEP(x) KEEP(x) > #define ARM_MMU_DISCARD(x) > #else > #define ARM_MMU_KEEP(x) > diff --git a/arch/arm/kernel/vmlinux-xip.lds.S > b/arch/arm/kernel/vmlinux-xip.lds.S index 5eddb75a7174..f2e8d4fac068 1006= 44 > --- a/arch/arm/kernel/vmlinux-xip.lds.S > +++ b/arch/arm/kernel/vmlinux-xip.lds.S > @@ -63,7 +63,7 @@ SECTIONS > . =3D ALIGN(4); > __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { > __start___ex_table =3D .; > - ARM_MMU_KEEP(KEEP(*(__ex_table))) > + ARM_MMU_KEEP(*(__ex_table)) > __stop___ex_table =3D .; > } >=20 > diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S > index de373c6c2ae8..d592a203f9c6 100644 > --- a/arch/arm/kernel/vmlinux.lds.S > +++ b/arch/arm/kernel/vmlinux.lds.S > @@ -74,7 +74,7 @@ SECTIONS > . =3D ALIGN(4); > __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { > __start___ex_table =3D .; > - ARM_MMU_KEEP(KEEP(*(__ex_table))) > + ARM_MMU_KEEP(*(__ex_table)) > __stop___ex_table =3D .; > } =2D-=20 Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 G=C3=B6ttingen, Germany Phone +49 (0)551 30664-0, e-mail info@emlix.com District Court of G=C3=B6ttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner --nextPart8505703.NyiUUSuA9g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iLMEAAEIAB0WIQQ/Uctzh31xzAxFCLur5FH7Xu2t/AUCZ2K8ZAAKCRCr5FH7Xu2t /C2sA/9d/fi2sag/ehnfFHwsc4nyqPB3fPGdD5SR6HRX5f93NDDY3LEaq64kt+bO SQykRBiWQ/tEaNjKMTrOPDFKfmHNTO2EuTybBOuh87g01+4RLNOHZ2rG8Q2hx+4g 4/iLQNvFE4JjTgjGTUy8QiVCdY5NI6L9c/ffFp+zAmTIq59MNg== =WNkR -----END PGP SIGNATURE----- --nextPart8505703.NyiUUSuA9g--