Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Justin Carlson <carlson@sibyte.com>
To: linux-mips@oss.sgi.com
Subject: mips64 pgd_current
Date: Fri, 16 Mar 2001 12:55:18 -0800	[thread overview]
Message-ID: <01031613005000.00780@plugh.sibyte.com> (raw)


Doing some more code trolling here; am looking at the MP 
parts of the TLB refill code in the mips64 tree, and I'm a bit
confused.

It looks to me like pgd_current[] is indexed by CP0_CONTEXT
and the resulting pointer is supposed to be the base of the
page tables for that particular process.  This makes sense.

However, I see this in mmu_context.h:

#define TLBMISS_HANDLER_SETUP_PGD(pgd) \
	pgd_current[smp_processor_id()] = (unsigned long)(pgd)
#define TLBMISS_HANDLER_SETUP() \
	set_context((unsigned long) smp_processor_id() << (23 + 3)); \
	TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
extern unsigned long pgd_current[];

so pgd_current[smp_processor_id()] is hard coded to be set to
swapper_pg_dir, which, insofar as I can tell, is not a per-cpu structure.  

It looks to me like this will end up with pgd_current[] being an
array of NR_CPUS pointers all of which point to the same pgd table.  

I know I must be misunderstanding this code.  Any suggestions as to what I'm
missing?

Thanks,
  Justin

             reply	other threads:[~2001-03-16 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-16 20:55 Justin Carlson [this message]
2001-03-16 22:09 ` mips64 pgd_current Justin Carlson

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=01031613005000.00780@plugh.sibyte.com \
    --to=carlson@sibyte.com \
    --cc=linux-mips@oss.sgi.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