From 3e2f285c5f12045e425060b6cbdf7a7cab540594 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 19 Mar 2021 12:53:40 -0700 Subject: nptl: Remove MULTI_PAGE_ALIASING [BZ #23554] MULTI_PAGE_ALIASING was introduced to mitigate an aliasing issue on Pentium 4. It is no longer needed for processors after Pentium 4. --- nptl/allocatestack.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'nptl/allocatestack.c') diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 149b999..00fddbd 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -31,7 +31,6 @@ #include #include #include -#include #ifndef NEED_SEPARATE_REGISTER_STACK @@ -547,15 +546,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, pd = get_cached_stack (&size, &mem); if (pd == NULL) { - /* To avoid aliasing effects on a larger scale than pages we - adjust the allocated stack size if necessary. This way - allocations directly following each other will not have - aliasing problems. */ -#if MULTI_PAGE_ALIASING != 0 - if ((size % MULTI_PAGE_ALIASING) == 0) - size += pagesize_m1 + 1; -#endif - /* If a guard page is required, avoid committing memory by first allocate with PROT_NONE and then reserve with required permission excluding the guard page. */ -- cgit v1.1