Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710916

Re: [PATCH 05/14] arm64: clean up THREAD_* definitions

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 05/14] arm64: clean up THREAD_* definitions
Date 2017-08-14 15:20 +0200
Message-ID <uenrJ-4CX-19@gated-at.bofh.it> (permalink)
References <ubV6x-416-3@gated-at.bofh.it> <ubV6y-416-29@gated-at.bofh.it> <uemlX-3Zn-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 14, 2017 at 12:59:59PM +0100, Catalin Marinas wrote:
> On Mon, Aug 07, 2017 at 07:35:56PM +0100, Mark Rutland wrote:
> > Currently we define THREAD_SIZE and THREAD_SIZE order separately, with
> 
> s/THREAD_SIZE order/THREAD_SIZE_ORDER/

Whoops; I'll fix that up now.

> > +#define THREAD_SHIFT		14
> > +
> > +#if THREAD_SHIFT >= PAGE_SHIFT
> > +#define THREAD_SIZE_ORDER	(THREAD_SHIFT - PAGE_SHIFT)
> > +#endif
> > +
> > +#define THREAD_SIZE		(UL(1) << THREAD_SHIFT)
> 
> I haven't tried the series to this patch but it seems to me that
> THREAD_SIZE_ORDER is undefined for a PAGE_SHIFT of 16. 

That is already the case without these patches, as we have:

#ifdef CONFIG_ARM64_4K_PAGES
#define THREAD_SIZE_ORDER       2
#elif defined(CONFIG_ARM64_16K_PAGES)
#define THREAD_SIZE_ORDER       0
#endif

... this is also deliberate, as we'd need an order of -2 with 16K stacks and
64K pages, and this doesn't make sense.

THREAD_SIZE_ORDER only matters if THREAD_SIZE >= PAGE_SIZE (or if we're using a
VMAP'd stack). For 64K pages && VMAP_STACK, we'll use a 64K stack, avoiding the
problem.

Thanks,
Mark.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH 05/14] arm64: clean up THREAD_* definitions Catalin Marinas <catalin.marinas@arm.com> - 2017-08-14 14:10 +0200
  Re: [PATCH 05/14] arm64: clean up THREAD_* definitions Mark Rutland <mark.rutland@arm.com> - 2017-08-14 15:20 +0200

csiph-web