All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jayachandran C." <jchandra@broadcom.com>
To: "David Daney" <ddaney.cavm@gmail.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH 2/3] MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT
Date: Wed, 20 Mar 2013 23:31:04 +0530	[thread overview]
Message-ID: <20130320180104.GA8100@jayachandranc.netlogicmicro.com> (raw)
In-Reply-To: <5149E7A4.3040906@gmail.com>

On Wed, Mar 20, 2013 at 09:45:24AM -0700, David Daney wrote:
> On 03/20/2013 09:27 AM, Jayachandran C wrote:
> >Allow usage of scratch register for current pgd even when
> >MIPS_PGD_C0_CONTEXT is not configured.  MIPS_PGD_C0_CONTEXT is set
> >for 64r2 platforms to indicate availability of Xcontext for saving
> >cpuid, thus freeing Context which was used for cpuid to be used for
> >saving PGD. This option was also tied to using a scratch register for
> >storing PGD.
> >
> >This commit will allow usage of scratch register to store the current
> >pgd if one can be allocated for the platform, even when
> >MIPS_PGD_C0_CONTEXT is not set. The cpu id will be kept in the CP0
> >Context register in this case.
> 
> 
> The point of MIPS_PGD_C0_CONTEXT is really to indicate that the PGD
> pointer is stored in a register (or portion thereof) and that
> setting the PGD is done by calling into uasm generated code.
> 
> Perhaps we should rename this Kconfig vairable so that its name
> indicates its function, or remove it altogether if possible, and
> machine generate the setting of the PGD pointer even when it is
> stored in the array in memory.

Removing the MIPS_PGD_C0_CONTEXT Kconfig variable does not look feasible.
The processor id is used by get_saved_sp macro and it needs to know at
compile time whether the processor id is in Context or Xcontext. We could
call it something like MIPS_PROCESSOR_ID_IN_XCONTEXT (if it would not
affect too many config files).

The second part (generating code for setting PGD pointer in pgd_current) is
already in the patch. This generated code also saves PGD to the scratch
register if one was allocated.

JC.

  reply	other threads:[~2013-03-20 17:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 16:27 [PATCH v2 0/3] Use scratch registers on XLR/XLS/XLP Jayachandran C
2013-03-20 16:27 ` [PATCH 1/3] MIPS: Allow platform specific scratch registers Jayachandran C
2013-03-20 16:27 ` [PATCH 2/3] MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT Jayachandran C
2013-03-20 16:45   ` David Daney
2013-03-20 18:01     ` Jayachandran C. [this message]
2013-03-20 16:27 ` [PATCH 3/3] MIPS: Move definition of SMP processor id register to header file Jayachandran C
  -- strict thread matches above, loose matches on Subject: below --
2013-06-23 18:16 [PATCH 0/3] Use scratch registers when MIPS_PGD_C0_CONTEXT is not set Jayachandran C
2013-06-23 18:16 ` [PATCH 2/3] MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT Jayachandran C
2013-01-08 12:56 [RFC PATCH 0/3] Use scratch registers on XLR/XLS/XLP Jayachandran C
2013-01-08 12:56 ` [PATCH 2/3] MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT Jayachandran C

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=20130320180104.GA8100@jayachandranc.netlogicmicro.com \
    --to=jchandra@broadcom.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.