linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sathvika Vasireddy <sv@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: naveen.n.rao@linux.vnet.ibm.com, sv@linux.ibm.com, npiggin@gmail.com
Subject: [RFC PATCH] powerpc/Kconfig: Select FUNCTION_ALIGNMENT_4B
Date: Mon,  6 Mar 2023 13:40:42 +0530	[thread overview]
Message-ID: <20230306081042.299871-1-sv@linux.ibm.com> (raw)

Commit d49a0626216b95 ("arch: Introduce CONFIG_FUNCTION_ALIGNMENT")
introduced a generic function-alignment infrastructure. Move to using
FUNCTION_ALIGNMENT_4B on powerpc, to use the same alignment as that of the
existing _GLOBAL macro.

Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>

Note:
Given that alignment beyond the minimum requirement may be desirable,
should we instead select FUNCTION_ALIGNMENT_16B for ppc64 and select
FUNCTION_ALIGNMENT_4B/8B for ppc32?

From vmlinux (pseries_le_defconfig) symbol offsets, it looks like most of
the ppc64 symbols are being aligned to a 16B boundary, but there are a few
which are not.

Currently, size of vmlinux (built with pseries_le_defconfig) is 47090kB.
With FUNCTION_ALIGNMENT_4B selected, size of vmlinux is 47152kB.
With FUNCTION_ALIGNMENT_16B selected, size of vmlinux is 47152kB.

Currently, size of vmlinux (built with powernv_defconfig) is 42852kB.
With FUNCTION_ALIGNMENT_4B selected, size of vmlinux is 42911kB.
With FUNCTION_ALIGNMENT_16B selected, size of vmlinux is 42977kB.

I am wondering if we should use the same alignment as that of
_GLOBAL macro or have alignment set to a 8B/16B boundary.
Please let me know your thoughts on the same. Thanks!
---
 arch/powerpc/Kconfig               | 1 +
 arch/powerpc/include/asm/linkage.h | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a6c4407d3ec8..ac3f80c0db36 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -174,6 +174,7 @@ config PPC
 	select DYNAMIC_FTRACE			if FUNCTION_TRACER
 	select EDAC_ATOMIC_SCRUB
 	select EDAC_SUPPORT
+	select FUNCTION_ALIGNMENT_4B
 	select GENERIC_ATOMIC64			if PPC32
 	select GENERIC_CLOCKEVENTS_BROADCAST	if SMP
 	select GENERIC_CMOS_UPDATE
diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/asm/linkage.h
index b88d1d2cf304..b71b9582e754 100644
--- a/arch/powerpc/include/asm/linkage.h
+++ b/arch/powerpc/include/asm/linkage.h
@@ -4,9 +4,6 @@
 
 #include <asm/types.h>
 
-#define __ALIGN		.align 2
-#define __ALIGN_STR	".align 2"
-
 #ifdef CONFIG_PPC64_ELF_ABI_V1
 #define cond_syscall(x) \
 	asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n"		\
-- 
2.31.1


                 reply	other threads:[~2023-03-06  8:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230306081042.299871-1-sv@linux.ibm.com \
    --to=sv@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).