linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: linuxppc-dev@ozlabs.org, dzu@denx.de, wd@denx.de,
	Ilya Yanok <yanok@emcraft.com>
Subject: Re: [PATCH] powerpc: add support for PAGE_SIZEs greater than 4KB for
Date: Sat, 13 Sep 2008 10:46:50 -0700	[thread overview]
Message-ID: <1221328010.7675.21.camel@pasglop> (raw)
In-Reply-To: <20080912034814.GE22288@yookeroo.seuss>


> [snip]
> > diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
> > index fce2df9..4f802df 100644
> > --- a/arch/powerpc/kernel/head_booke.h
> > +++ b/arch/powerpc/kernel/head_booke.h
> > @@ -20,7 +20,9 @@
> >  	beq	1f;							     \
> >  	mfspr	r1,SPRN_SPRG3;		/* if from user, start at top of   */\
> >  	lwz	r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack   */\
> > -	addi	r1,r1,THREAD_SIZE;					     \
> > +	lis	r11,THREAD_SIZE@h;					     \
> > +	ori	r11,r11,THREAD_SIZE@l;					     \
> > +	add	r1,r1,r11;
> > \
> 
> It would be nice if we could avoid the extra instruction here when the
> page sizes isn't big enough to require it.

As a matter of fact, I don't see why THREAD_SIZE should ever need that,
there is no reason to change the kernel stack size.

> >  1:	subi	r1,r1,INT_FRAME_SIZE;	/* Allocate an exception frame     */\
> >  	mr	r11,r1;							     \
> >  	stw	r10,_CCR(r11);          /* save various registers	   */\
> > @@ -112,7 +114,8 @@
> >  	andi.	r10,r10,MSR_PR;						     \
> >  	mfspr	r11,SPRN_SPRG3;		/* if from user, start at top of   */\
> >  	lwz	r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
> > -	addi	r11,r11,EXC_LVL_FRAME_OVERHEAD;	/* allocate stack frame    */\
> > +	addis	r11,r11,EXC_LVL_FRAME_OVERHEAD@ha; /* allocate stack frame */\
> > +	addi	r11,r11,EXC_LVL_FRAME_OVERHEAD@l;  /* allocate stack frame */\
> 
> And here.

Same comment. That size doesn't need to change and can remain safely
below 32k

Ben.

  reply	other threads:[~2008-09-13 17:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 21:53 [RFC PATCH] Support for big page sizes on 44x Ilya Yanok
2008-09-10 21:53 ` [PATCH] powerpc: add support for PAGE_SIZEs greater than 4KB for Ilya Yanok
2008-09-11 16:57   ` prodyut hazarika
2008-09-11 18:15     ` Re[2]: " Yuri Tikhonov
2008-09-11 20:09       ` Josh Boyer
2008-09-11 23:38         ` Ilya Yanok
2008-09-12  0:47           ` Josh Boyer
2008-09-11 18:28     ` Ilya Yanok
2008-09-11 18:38       ` prodyut hazarika
2008-09-11 22:44         ` Ilya Yanok
2008-09-11 23:52           ` Re[2]: " Yuri Tikhonov
2008-09-11 18:53       ` prodyut hazarika
2008-09-11 21:51         ` Ilya Yanok
2008-09-13 17:49     ` Benjamin Herrenschmidt
2008-09-13 23:37       ` Josh Boyer
2008-09-11 22:37   ` prodyut hazarika
2008-09-11 23:20     ` Re[2]: " Yuri Tikhonov
2008-09-12  3:48   ` David Gibson
2008-09-13 17:46     ` Benjamin Herrenschmidt [this message]
2008-09-26 23:43       ` Ilya Yanok
2008-09-26 23:35     ` Ilya Yanok
2008-09-29  2:58       ` David Gibson
2008-09-10 21:53 ` [PATCH] mm: fix ENTRIES_PER_PAGEPAGE overflow with 256KB pages Ilya Yanok
2008-09-12  3:50   ` David Gibson
2008-09-12  5:29     ` prodyut hazarika

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1221328010.7675.21.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=dzu@denx.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=wd@denx.de \
    --cc=yanok@emcraft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).