From: tony@bakeyournoodle•com (Tony Breeds)
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom•com>
Cc: LinuxPPC-dev <linuxppc-dev@ozlabs•org>
Subject: Re: [PATCH/RFC] Make certain timekeeping variables __read_mostly
Date: Thu, 21 Jun 2007 14:41:08 +1000 [thread overview]
Message-ID: <20070621044108.GT9768@bakeyournoodle.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0706200940260.27011@pademelon.sonytel.be>
On Wed, Jun 20, 2007 at 09:41:47AM +0200, Geert Uytterhoeven wrote:
Hi Geert,
> There's no __read_mostly support for powerpc yet (is there?), so __read_mostly
> just expands to nothing?
That's true but we may in the future! :)
Perhaps something like the patch below will start discussion.
From: Tony Breeds <tony@bakeyournoodle•com>
Initial cut to add __read_mostly support for powerpc.
Signed-off-by: Tony Breeds <tony@bakeyournoodle•com>
---
arch/powerpc/kernel/vmlinux.lds.S | 6 ++++++
include/asm-powerpc/cache.h | 2 ++
2 files changed, 8 insertions(+)
Index: working/arch/powerpc/kernel/vmlinux.lds.S
===================================================================
--- working.orig/arch/powerpc/kernel/vmlinux.lds.S
+++ working/arch/powerpc/kernel/vmlinux.lds.S
@@ -7,6 +7,7 @@
#define PROVIDE32(x) PROVIDE(x)
#endif
#include <asm-generic/vmlinux.lds.h>
+#include <asm/cache.h>
ENTRY(_stext)
@@ -211,6 +212,11 @@ SECTIONS
*(.data.cacheline_aligned)
}
+ . = ALIGN(L1_CACHE_BYTES);
+ .data.read_mostly : {
+ *(.data.read_mostly)
+ }
+
. = ALIGN(PAGE_SIZE);
__data_nosave : {
__nosave_begin = .;
Index: working/include/asm-powerpc/cache.h
===================================================================
--- working.orig/include/asm-powerpc/cache.h
+++ working/include/asm-powerpc/cache.h
@@ -34,5 +34,9 @@ struct ppc64_caches {
extern struct ppc64_caches ppc64_caches;
#endif /* __powerpc64__ && ! __ASSEMBLY__ */
+#if !defined(__ASSEMBLY__)
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#endif
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_CACHE_H */
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
next prev parent reply other threads:[~2007-06-21 4:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-19 6:35 [PATCH/RFC] Modify sched_clock() to make CONFIG_PRINTK_TIME more sane Tony Breeds
2007-06-19 6:43 ` Segher Boessenkool
2007-06-19 14:53 ` Olof Johansson
2007-06-20 2:02 ` Tony Breeds
2007-06-20 2:27 ` Olof Johansson
2007-06-20 3:13 ` [PATCH/RFC] Make certain timekeeping variables __read_mostly Tony Breeds
2007-06-20 7:41 ` Geert Uytterhoeven
2007-06-21 4:41 ` Tony Breeds [this message]
2007-06-20 7:37 ` [PATCH/RFC] Modify sched_clock() to make CONFIG_PRINTK_TIME more sane Geert Uytterhoeven
2007-06-21 4:29 ` Tony Breeds
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=20070621044108.GT9768@bakeyournoodle.com \
--to=tony@bakeyournoodle$(echo .)com \
--cc=Geert.Uytterhoeven@sonycom$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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