diff mbox

[microblaze] Fix BZ17791 - Remove fixed page size macros and others

Message ID 6D39441BF12EF246A7ABCE6654B0235320F9589C@LEMAIL01.le.imgtec.org
State New
Headers show

Commit Message

Matthew Fortune Jan. 5, 2015, 3:12 p.m. UTC
Microblaze apparently has a variable page size (see thread below) and
should not hard-code any page-size related macros.
Also remove macros that are only used for BFD's trad-core support
which is not relavant for microblaze also according to the thread
starting here:

https://sourceware.org/ml/libc-ports/2013-11/msg00028.html

This patch is neither built nor tested but mirrors a MIPS patch that
fixes the same issue.

Thanks,
Matthew

     * sysdepsysdeps/unix/sysv/linux/microblaze/sys/user.h
     (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, NBPG, UPAGES): Remove.
     (HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Remove.
---
sysdeps/unix/sysv/linux/microblaze/sys/user.h | 8 --------
1 file changed, 8 deletions(-)

Comments

David Holsgrove Jan. 9, 2015, 7:53 a.m. UTC | #1
On 6 January 2015 at 01:12, Matthew Fortune <Matthew.Fortune@imgtec.com> wrote:
> Microblaze apparently has a variable page size (see thread below) and
> should not hard-code any page-size related macros.
> Also remove macros that are only used for BFD's trad-core support
> which is not relavant for microblaze also according to the thread
> starting here:
>
> https://sourceware.org/ml/libc-ports/2013-11/msg00028.html
>
> This patch is neither built nor tested but mirrors a MIPS patch that
> fixes the same issue.
>
> Thanks,
> Matthew
>
>      * sysdepsysdeps/unix/sysv/linux/microblaze/sys/user.h
>      (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, NBPG, UPAGES): Remove.
>      (HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Remove.
> ---
> sysdeps/unix/sysv/linux/microblaze/sys/user.h | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/microblaze/sys/user.h b/sysdeps/unix/sysv/linux/microblaze/sys/user.h
> index e23e05c..a58a5c6 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/sys/user.h
> +++ b/sysdeps/unix/sysv/linux/microblaze/sys/user.h
> @@ -66,12 +66,4 @@ struct user
>    int                     u_debugreg [8];
> };
>
> -# define PAGE_SHIFT       12
> -# define PAGE_SIZE        (1UL << PAGE_SHIFT)
> -# define PAGE_MASK        (~(PAGE_SIZE-1))
> -# define NBPG             PAGE_SIZE
> -# define UPAGES           1
> -# define HOST_TEXT_START_ADDR  (u.start_code)
> -# define HOST_STACK_END_ADDR   (u.start_stack + u.u_ssize * NBPG)
> -
> #endif    /* _SYS_USER_H */
> --
> 2.1.3
>

Committed, thanks Matthew.

David
diff mbox

Patch

diff --git a/sysdeps/unix/sysv/linux/microblaze/sys/user.h b/sysdeps/unix/sysv/linux/microblaze/sys/user.h
index e23e05c..a58a5c6 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sys/user.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sys/user.h
@@ -66,12 +66,4 @@  struct user
   int                     u_debugreg [8];
};

-# define PAGE_SHIFT       12
-# define PAGE_SIZE        (1UL << PAGE_SHIFT)
-# define PAGE_MASK        (~(PAGE_SIZE-1))
-# define NBPG             PAGE_SIZE
-# define UPAGES           1
-# define HOST_TEXT_START_ADDR  (u.start_code)
-# define HOST_STACK_END_ADDR   (u.start_stack + u.u_ssize * NBPG)
-
#endif    /* _SYS_USER_H */