Tim Abbott | 1 May 01:51 2009
Picon

[PATCH 1/2] microblaze: use new macro for .data.cacheline_aligned section.

Signed-off-by: Tim Abbott <tabbott <at> mit.edu>
Cc: Michal Simek <monstr <at> monstr.eu>
Cc: microblaze-uclinux <at> itee.uq.edu.au
---
 arch/microblaze/kernel/vmlinux.lds.S |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index 840385e..de25a68 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
 <at>  <at>  -64,9 +64,8  <at>  <at>  SECTIONS {
 	_sdata = . ;
 	.data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */
 		*(.data)
+		CACHELINE_ALIGNED_DATA(32)
 	}
-	. = ALIGN(32);
-	.data.cacheline_aligned : { *(.data.cacheline_aligned) }
 	_edata = . ;

 	/* Reserve some low RAM for r0 based memory references */
--

-- 
1.6.2.1

Tim Abbott | 1 May 01:51 2009
Picon

[PATCH 0/2] section name cleanup for microblaze

This patch series cleans up the section names on the microblaze
architecture.  It requires the architecture-independent macro
definitions from this patch series:

<http://www.spinics.net/lists/mips/msg33499.html>

The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections.  This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:

static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */

Note that these patches have not been boot-tested (aside from testing
the analogous changes on x86), since I don't have access to the
appropriate hardware.

	-Tim Abbott

Tim Abbott (2):
  microblaze: use new macro for .data.cacheline_aligned section.
  microblaze: use new macros for .data.init_task

 arch/microblaze/kernel/init_task.c   |    3 +--
 arch/microblaze/kernel/vmlinux.lds.S |    8 ++------
 2 files changed, 3 insertions(+), 8 deletions(-)

(Continue reading)

Tim Abbott | 1 May 01:51 2009
Picon

[PATCH 2/2] microblaze: use new macros for .data.init_task

.data.init_task should not need a separate output section; this change
moves it into the .data section.

Signed-off-by: Tim Abbott <tabbott <at> mit.edu>
Cc: Michal Simek <monstr <at> monstr.eu>
Cc: microblaze-uclinux <at> itee.uq.edu.au
---
 arch/microblaze/kernel/init_task.c   |    3 +--
 arch/microblaze/kernel/vmlinux.lds.S |    5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c
index 48eb9fb..d765fc1 100644
--- a/arch/microblaze/kernel/init_task.c
+++ b/arch/microblaze/kernel/init_task.c
 <at>  <at>  -21,8 +21,7  <at>  <at>  static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
 struct mm_struct init_mm = INIT_MM(init_mm);
 EXPORT_SYMBOL(init_mm);

-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data =
 { INIT_THREAD_INFO(init_task) };

 struct task_struct init_task = INIT_TASK(init_task);
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index de25a68..dcb2bc1 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
 <at>  <at>  -63,6 +63,7  <at>  <at>  SECTIONS {
(Continue reading)

Sam Ravnborg | 1 May 11:04 2009

Re: [PATCH v2 0/6] macros for section name cleanup

On Thu, Apr 30, 2009 at 03:54:07PM -0400, Tim Abbott wrote:
> (this patch series differs from v1 only in the CC list; some of the
> architecture lists I sent the previous one to are moderated against
> non-members; all replies should go to this version).
> 
> Here are the architecture-independent macro definitions needed for
> to clean up the kernel's section names.  The overall diffstat from
> this section name cleanup project is:
> 
>  96 files changed, 261 insertions(+), 503 deletions(-)
> 
> The decrease results from removing a lot of redundancy in the linker
> scripts.
> 
> The long-term goal here is to add support for building the kernel with
> -ffunction-sections -fdata-sections.  This requires renaming all the
> magic section names in the kernel of the form .text.foo, .data.foo,
> .bss.foo, and .rodata.foo to not have collisions with sections
> generated for code like:
> 
> static int nosave = 0; /* -fdata-sections places in .data.nosave */
> static void head(); /* -ffunction-sections places in .text.head */
> 
> Sam Ravnborg proposed that rather than just renaming all the sections
> outright, we should start by first getting more control over the
> section names used in the kernel so that we can later rename sections
> without touching too many files.  These patch series implement that
> cleanup.  Later, there will be another patch series to actually rename
> the sections.
> 
(Continue reading)

Sam Ravnborg | 1 May 11:18 2009

Re: [PATCH v2 1/6] Add new macros for page-aligned data and bss sections.

On Thu, Apr 30, 2009 at 03:54:08PM -0400, Tim Abbott wrote:
> This patch is preparation for replacing most uses of
> ".bss.page_aligned" and ".data.page_aligned" in the kernel with
> macros, so that the section name can later be changed without having
> to touch a lot of the kernel.
> 
> The long-term goal here is to be able to change the kernel's magic
> section names to those that are compatible with -ffunction-sections
> -fdata-sections.  This requires renaming all magic sections with names
> of the form ".data.foo".
> 
> Signed-off-by: Tim Abbott <tabbott <at> mit.edu>
> Cc: Sam Ravnborg <sam <at> ravnborg.org>
> Acked-by: David Howells <dhowells <at> redhat.com>
> ---
>  include/asm-generic/vmlinux.lds.h |    8 ++++++++
>  include/linux/linkage.h           |    9 +++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 89853bc..3d88c87 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
>  <at>  <at>  -116,6 +116,14  <at>  <at> 
>  	FTRACE_EVENTS()							\
>  	TRACE_SYSCALLS()
>  
> +#define PAGE_ALIGNED_DATA						\
> +	. = ALIGN(PAGE_SIZE);						\
> +	*(.data.page_aligned)
(Continue reading)

Sam Ravnborg | 1 May 11:21 2009

Re: [PATCH v2 2/6] Add new NOSAVE_DATA linker script macro.

On Thu, Apr 30, 2009 at 03:54:09PM -0400, Tim Abbott wrote:
> This patch is preparation for replacing most ".data.nosave" in the
> kernel with macros, so that the section name can later be changed
> without having to touch a lot of the kernel.
> 
> The long-term goal here is to be able to change the kernel's magic
> section names to those that are compatible with -ffunction-sections
> -fdata-sections.  This requires renaming all magic sections with names
> of the form ".data.foo".
> 
> Signed-off-by: Tim Abbott <tabbott <at> mit.edu>
> Cc: Sam Ravnborg <sam <at> ravnborg.org>
> ---
>  include/asm-generic/vmlinux.lds.h |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 3d88c87..f5ebd2b 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
>  <at>  <at>  -124,6 +124,13  <at>  <at> 
>  	. = ALIGN(PAGE_SIZE);						\
>  	*(.bss.page_aligned)
>  
> +#define NOSAVE_DATA							\
> +	. = ALIGN(PAGE_SIZE);						\
> +	__nosave_begin = .;						\
> +	*(.data.nosave)							\
> +	. = ALIGN(PAGE_SIZE);						\
> +	__nosave_end = .;
(Continue reading)

Sam Ravnborg | 1 May 11:44 2009

Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h

On Thu, Apr 30, 2009 at 03:32:36PM -0400, Tim Abbott wrote:
> Signed-off-by: Tim Abbott <tabbott <at> mit.edu>
> ---
>  include/linux/cache.h |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/cache.h b/include/linux/cache.h
> index 97e2488..99d8a6f 100644
> --- a/include/linux/cache.h
> +++ b/include/linux/cache.h
>  <at>  <at>  -13,7 +13,13  <at>  <at> 
>  #endif
>  
>  #ifndef __read_mostly
> +#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
> +#define __read_mostly __attribute__((__section__(".data.read_mostly")))
> +#define __READ_MOSTLY .section ".data.read_mostly", "aw"
> +#else
>  #define __read_mostly
> +#define __READ_MOSTLY
> +#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
>  #endif

Are there any specific reason why we do not support read_mostly on all
architectures?

read_mostly is about grouping rarely written data together
so what is needed is to introduce this section in the remaining
archtectures.

(Continue reading)

Arnd Bergmann | 1 May 15:42 2009
X-Face
Picon

[PATCH] update uClibc for generic headers

I have checked out uClibc from petalinux and updated it to compile
with the generic ABI headers that I posted to lkml. This is the
patch I used, for reference.

The respective kernel tree can be found at
git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git
in the generic-microblaze branch.

Signed-off-by: Arnd Bergmann <arnd@...>

 libc/sysdeps/linux/microblaze/bits/fcntl.h              |   12 -
 libc/sysdeps/linux/microblaze/bits/kernel_stat.h        |   58 -----
 libc/sysdeps/linux/microblaze/bits/kernel_types.h       |   36 ---
 libc/sysdeps/linux/microblaze/bits/mman.h               |    4
 libc/sysdeps/linux/microblaze/bits/poll.h               |   11 -
 libc/sysdeps/linux/microblaze/bits/syscalls.h           |  165 ++++++++++++++++
 libc/sysdeps/linux/microblaze/clinkage.h                |    9
 libc/sysdeps/linux/microblaze/mmap.c                    |   49 ++++
 libc/sysdeps/linux/microblaze/sys/ucontext.h            |    2
 libpthread/linuxthreads/sysdeps/microblaze/pt-machine.h |    2
 10 files changed, 246 insertions(+), 102 deletions(-)

Index: libc/sysdeps/linux/microblaze/bits/kernel_stat.h
===================================================================
--- libc/sysdeps/linux/microblaze/bits/kernel_stat.h	(revision 5238)
+++ libc/sysdeps/linux/microblaze/bits/kernel_stat.h	(working copy)
 <at>  <at>  -3,60 +3,12  <at>  <at> 
 #ifndef _BITS_STAT_STRUCT_H
 #define _BITS_STAT_STRUCT_H

(Continue reading)

Tim Abbott | 1 May 15:54 2009
Picon

Re: [PATCH v2 1/6] Add new macros for page-aligned data and bss sections.

On Fri, 1 May 2009, Sam Ravnborg wrote:

> On Thu, Apr 30, 2009 at 03:54:08PM -0400, Tim Abbott wrote:
> > +#define __PAGE_ALIGNED_DATA	.section ".data.page_aligned", "aw",  <at> progbits
> > +#define __PAGE_ALIGNED_BSS	.section ".bss.page_aligned", "aw",  <at> nobits
> 
> It is my understanding that the linker will automatically
> assume nobits for section names starting with .bss and likewise
> progbits for section names starting with .data - so we can leave them out?

I believe that is correct.

	-Tim Abbott

Sam Ravnborg | 1 May 16:21 2009

Re: [PATCH v2 0/6] macros for section name cleanup

On Thu, Apr 30, 2009 at 03:54:07PM -0400, Tim Abbott wrote:
> (this patch series differs from v1 only in the CC list; some of the
> architecture lists I sent the previous one to are moderated against
> non-members; all replies should go to this version).
> 
> Here are the architecture-independent macro definitions needed for
> to clean up the kernel's section names.  The overall diffstat from
> this section name cleanup project is:
> 
>  96 files changed, 261 insertions(+), 503 deletions(-)
> 
> The decrease results from removing a lot of redundancy in the linker
> scripts.
> 
> The long-term goal here is to add support for building the kernel with
> -ffunction-sections -fdata-sections.  This requires renaming all the
> magic section names in the kernel of the form .text.foo, .data.foo,
> .bss.foo, and .rodata.foo to not have collisions with sections
> generated for code like:
> 
> static int nosave = 0; /* -fdata-sections places in .data.nosave */
> static void head(); /* -ffunction-sections places in .text.head */
> 
> Sam Ravnborg proposed that rather than just renaming all the sections
> outright, we should start by first getting more control over the
> section names used in the kernel so that we can later rename sections
> without touching too many files.  These patch series implement that
> cleanup.  Later, there will be another patch series to actually rename
> the sections.
> 
(Continue reading)


Gmane