linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Dave Hansen <haveblue@us.ibm.com>, linux-arch@vger.kernel.org
Subject: Re: [RFC][PATCH] introduce TASK_SIZE_OF() for all arches
Date: Wed, 22 Aug 2007 18:30:44 +0100	[thread overview]
Message-ID: <20070822173044.GA1978@linux-mips.org> (raw)
In-Reply-To: <20070821194309.GD9163@parisc-linux.org>

On Tue, Aug 21, 2007 at 01:43:09PM -0600, Matthew Wilcox wrote:

> On Tue, Aug 21, 2007 at 12:38:35PM -0700, Dave Hansen wrote:
> > I'd like to have that for other architectures.  So, add it
> > for all the architectures that actually use "current" in 
> > their TASK_SIZE.  For the others, just add a quick #define
> > in sched.h to use plain old TASK_SIZE.
> 
> MIPS seems to do things a little differently ... Ralf, what should Dave
> be doing here?
> 
> #define TASK_SIZE32     0x7fff8000UL
> #define TASK_SIZE       0x10000000000UL

Indeed. Below patch should do the trick.

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index 83bc945..0e79e03 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -45,6 +45,8 @@ extern unsigned int vced_count, vcei_count;
  * space during mmap's.
  */
 #define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
+#define TASK_SIZE_OF(tsk)						\
+	(test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
 #endif
 
 #ifdef CONFIG_64BIT
@@ -65,6 +67,8 @@ extern unsigned int vced_count, vcei_count;
 #define TASK_UNMAPPED_BASE						\
 	(test_thread_flag(TIF_32BIT_ADDR) ?				\
 		PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3))
+#define TASK_SIZE_OF(tsk)						\
+	(test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
 #endif
 
 #define NUM_FPU_REGS	32

  reply	other threads:[~2007-08-22 17:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 19:38 [RFC][PATCH] introduce TASK_SIZE_OF() for all arches Dave Hansen
2007-08-21 19:43 ` Matthew Wilcox
2007-08-22 17:30   ` Ralf Baechle [this message]
2007-08-22 23:10     ` Dave Hansen
2007-08-22  9:06 ` David Howells
2007-08-22 22:55   ` Dave Hansen
2007-08-22 23:50     ` Matt Mackall
2007-08-22 23:15   ` Dave Hansen
2007-08-23  9:37   ` David Howells
     [not found] <20070821132038.GA22254@ff.dom.local>
     [not found] ` <20070821093103.3c097d4a.randy.dunlap@oracle.com>
2007-08-21 17:35   ` RFC: drop support for gcc < 4.0 Adrian Bunk
2007-08-21 19:19     ` Andi Kleen
2007-08-21 19:54       ` Adrian Bunk
2007-08-21 20:07         ` [RFC][PATCH] introduce TASK_SIZE_OF() for all arches Matthew Wilcox

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=20070822173044.GA1978@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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).