All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Use scratch registers on XLR/XLS/XLP
@ 2013-03-20 16:27 Jayachandran C
  2013-03-20 16:27 ` [PATCH 1/3] MIPS: Allow platform specific scratch registers Jayachandran C
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jayachandran C @ 2013-03-20 16:27 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: Jayachandran C

This set of patches enable the use of scratch registers on XLR/XLS and XLP
(cop0 reg 22, sel 0-7) to optimize the generated TLB handlers.

The current code assumes scratch is 31, which is fixed by the first patch.
The second patch enables use of a scratch register when it is available
even on a 32-bit or non-r2 platform. The third patch is a cleanup to 
consolidate all the defines needed into one file, this patch does not
have any change in logic.

In the earlier scheme, if MIPS_PGD_C0_CONTEXT was defined, the Context
register or a scratch register would contain the current PGD, and the
Xcontext would contain the smp_processor_id shifted to index pointers.

In the new scheme, the behavior when MIPS_PGD_C0_CONTEXT is defined
remains the same.  But when it is not defined, we still try to allocate
a scratch register for the current pgd. and the smp processor id remains
in Context.

There is also an additional change is to generate the
tlbmiss_handler_setup_pgd() function even when MIPS_PGD_C0_CONTEXT is not
defined.  This function will save the PGD in pgd_current[] and also in
the scratch register if one has been allocated.

Comments/testing welcome.

Thanks,
JC.

Changes in v2:
* Update macros in thread-info.h, remove __ASSEMBLY__ part
* add ASM_CPUID_MFC0 and UASM_i_CPUID_MFC0 which allows us to remove
  a lot of conditional compilation.
* make c0_kscratch a inline function and remove global variable


Jayachandran C (3):
  MIPS: Allow platform specific scratch registers
  MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT
  MIPS: Move definition of SMP processor id register to header file

 arch/mips/include/asm/mmu_context.h |   26 ++----
 arch/mips/include/asm/stackframe.h  |   26 ++----
 arch/mips/include/asm/thread_info.h |   30 +++++-
 arch/mips/kernel/cpu-probe.c        |    1 +
 arch/mips/mm/tlbex.c                |  176 +++++++++++++++++------------------
 5 files changed, 130 insertions(+), 129 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/3] Use scratch registers when MIPS_PGD_C0_CONTEXT is not set
@ 2013-06-23 18:16 Jayachandran C
  2013-06-23 18:16 ` [PATCH 2/3] MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT Jayachandran C
  0 siblings, 1 reply; 8+ messages in thread
From: Jayachandran C @ 2013-06-23 18:16 UTC (permalink / raw)
  To: ralf, linux-mips; +Cc: Jayachandran C

This is the updated patchset that fixes issues reported during the last
merge to upstream-sfr.

The first patch is a new change that moves the TLB handlers from arrays
in .data to functions defined in tlb-funcs.S to fix the microMIPS issue
reported.
(http://www.linux-mips.org/archives/linux-mips/2013-06/msg00415.html)

The second patch has the changes to use scratch registers when
MIPS_PGD_C0_CONTEXT is not defined - this has not changed.

The third has a fix for the compile error  on IP27 platform.
(http://www.linux-mips.org/archives/linux-mips/2013-06/msg00399.html)

Jonas already has posted http://patchwork.linux-mips.org/patch/5539/ for
the other issue (crash on bcm63xx and mti platforms)

JC.

Jayachandran C (3):
  MIPS: Move generated code to .text for microMIPS
  MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT
  MIPS: Move definition of SMP processor id register to header file

 arch/mips/include/asm/mmu_context.h |   28 ++---
 arch/mips/include/asm/stackframe.h  |   24 +---
 arch/mips/include/asm/thread_info.h |   33 +++++-
 arch/mips/mm/Makefile               |    2 +-
 arch/mips/mm/tlb-funcs.S            |   37 ++++++
 arch/mips/mm/tlbex.c                |  224 ++++++++++++++++-------------------
 6 files changed, 187 insertions(+), 161 deletions(-)
 create mode 100644 arch/mips/mm/tlb-funcs.S

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [RFC PATCH 0/3] Use scratch registers on XLR/XLS/XLP
@ 2013-01-08 12:56 Jayachandran C
  2013-01-08 12:56 ` [PATCH 2/3] MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT Jayachandran C
  0 siblings, 1 reply; 8+ messages in thread
From: Jayachandran C @ 2013-01-08 12:56 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: Jayachandran C

This set of patches enable the use of scratch registers on XLR/XLS and XLP
(cop0 reg 22, sel 0-7) to optimize the genearted TLB handlers.

The current code assumes scratch is 31, which is fixed by the first patch.
The second patch enables use of a scratch register when it is available,
even on a 32-bit or non-r2 platform. The third patch is a cleanup to 
consolidate all the defines needed into one file, this patch does not
have any change in logic.

In the earlier scheme, if MIPS_PGD_C0_CONTEXT was defined, the CP0 CONTEXT
register or a scratch register would contain the current PGD, and the
XCONTEXT would contain the smp_processor_id shifted to index pointers.

In the new scheme, the behavior when MIPS_PGD_C0_CONTEXT is defined
remains the same.  But when it is not defined, we tries to allocate
a scratch register for the current pgd, the smp processor id remains
in CONTEXT.

The additional change is generate tlbmiss_handler_setup_pgd() function
that stores pgd even when MIPS_PGD_C0_CONTEXT is not defined.  This
function will save the PGD in pgd_current[] and also in the scratch
register if one has been allocated.

Comments/testing welcome.

Thanks,
JC.

Jayachandran C (3):
  MIPS: Allow platform specific scratch registers
  MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT
  MIPS: Move definition of SMP processor id register to header file

 arch/mips/include/asm/mmu_context.h |   26 ++---
 arch/mips/include/asm/stackframe.h  |   25 ++---
 arch/mips/include/asm/thread_info.h |   33 +++++-
 arch/mips/kernel/cpu-probe.c        |    1 +
 arch/mips/kernel/genex.S            |    1 -
 arch/mips/mm/tlbex.c                |  188 ++++++++++++++++++-----------------
 6 files changed, 146 insertions(+), 128 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-23 18:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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.
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

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.