diff mbox

Fix PCH on MIPS

Message ID CA+=Sn1mTs-O65tVX6dCT_ySFYnr7b3yOm7JY3h=qdMNFZ=-r2Q@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski Nov. 14, 2011, 11:42 p.m. UTC
On Mon, Nov 14, 2011 at 3:41 PM, Andrew Pinski
<andrew.pinski@caviumnetworks.com> wrote:
> Since Linux 2.6.36, both the heap and mmap are randomized on MIPS like
> other architectures. This breaks PCH because currently
> TRY_EMPTY_VM_SPACE is not defined for MIPS.
> This patch fixes the issue and allows largefile test to pass now.
>
> OK? Bootstraped and tested on mips64-linux-gnu.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for MIPS.
>

Comments

Richard Sandiford Nov. 17, 2011, 12:34 p.m. UTC | #1
Andrew Pinski <andrew.pinski@caviumnetworks.com> writes:
> On Mon, Nov 14, 2011 at 3:41 PM, Andrew Pinski
> <andrew.pinski@caviumnetworks.com> wrote:
>> Since Linux 2.6.36, both the heap and mmap are randomized on MIPS like
>> other architectures. This breaks PCH because currently
>> TRY_EMPTY_VM_SPACE is not defined for MIPS.
>> This patch fixes the issue and allows largefile test to pass now.
>>
>> OK? Bootstraped and tested on mips64-linux-gnu.
>>
>> Thanks,
>> Andrew Pinski
>>
>> ChangeLog:
>> * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for MIPS.
>>
>
> Index: config/host-linux.c
> ===================================================================
> --- config/host-linux.c	(revision 181366)
> +++ config/host-linux.c	(working copy)
> @@ -86,6 +86,10 @@
>  # define TRY_EMPTY_VM_SPACE	0x40000000
>  #elif defined(__ARM_EABI__)
>  # define TRY_EMPTY_VM_SPACE     0x60000000
> +#elif defined(__mips__) && defined(__LP64__)
> +# define TRY_EMPTY_VM_SPACE	0x8000000000
> +#elif defined(__mips__)
> +# define TRY_EMPTY_VM_SPACE	0x60000000
>  #else
>  # define TRY_EMPTY_VM_SPACE	0
>  #endif

OK.

Out of interest, is there any science behind the LP64 value?
(I realise it matches s390x and SPARC.)

Richard
diff mbox

Patch

Index: config/host-linux.c
===================================================================
--- config/host-linux.c	(revision 181366)
+++ config/host-linux.c	(working copy)
@@ -86,6 +86,10 @@ 
 # define TRY_EMPTY_VM_SPACE	0x40000000
 #elif defined(__ARM_EABI__)
 # define TRY_EMPTY_VM_SPACE     0x60000000
+#elif defined(__mips__) && defined(__LP64__)
+# define TRY_EMPTY_VM_SPACE	0x8000000000
+#elif defined(__mips__)
+# define TRY_EMPTY_VM_SPACE	0x60000000
 #else
 # define TRY_EMPTY_VM_SPACE	0
 #endif