linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tony Breeds <tony@bakeyournoodle.com>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH 3/3] Initial cut to add __read_mostly support for powerpc.
Date: Wed, 04 Jul 2007 14:04:31 +1000	[thread overview]
Message-ID: <20070704040431.1ED7832C46E@thor> (raw)
In-Reply-To: <1183521871.36329.499255149967.qpush@thor>

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
This didn't get musch feedback the first time I posted it, so it's either
perfect ;P or it got missed.

 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 */

      parent reply	other threads:[~2007-07-04  4:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04  4:04 [PATCH 0/3] Patches for consideration for 2.6.23 Tony Breeds
2007-07-04  4:04 ` [PATCH 2/3] Modify sched_clock() to make CONFIG_PRINTK_TIME more sane Tony Breeds
2007-07-04  4:27   ` Michael Ellerman
2007-07-04  4:40     ` Tony Breeds
2007-07-04  4:04 ` [PATCH 1/3] Create a dummy zImage if no valid platform has been selected Tony Breeds
2007-07-04  4:04 ` Tony Breeds [this message]

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=20070704040431.1ED7832C46E@thor \
    --to=tony@bakeyournoodle.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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).