Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <james.hogan@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	Leonid Yegoshin <leonid.yegoshin@imgtec.com>,
	Felix Fietkau <nbd@nbd.name>,
	David Daney <david.daney@cavium.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Hongliang Tao <taohl@lemote.com>, Huacai Chen <chenhc@lemote.com>,
	Hua Yan <yanh@lemote.com>,
	Jayachandran C. <jchandra@broadcom.com>,
	Kevin Cernekee <cernekee@gmail.com>, <linux-mips@linux-mips.org>
Subject: [PATCH 00/13] MIPS: c-r4k: SMP cache management fixes
Date: Wed, 13 Jul 2016 14:12:43 +0100	[thread overview]
Message-ID: <1468415576-12600-1-git-send-email-james.hogan@imgtec.com> (raw)

These patches collect together various SMP cache management fixes &
refactorings, particularly to fix the missing SMP calls for indexed
cache ops on MIPS Coherence Manager (CM) based SMP systems since commit
cccf34e9411c ("MIPS: c-r4k: Fix cache flushing for MT cores").

Patches 1-6 fix various issues in the SMP code and cache management code
(all in relation to cache management).

Patches 7-12 then prepare r4k_on_each_cpu() and its various
callers/callees to distinguish hit/index cache ops so SMP calls can be
avoided.

Finally patch 13 makes the change for CM so that indexed cache ops are
performed on each core via SMP calls.

Patch 9 should also work around the SMP 34Kc regression Felix saw
recently, but __flush_anon_page() and r4k_flush_data_cache_page()
definitely still need looking at too.

All feedback & testing gratefully received.

James Hogan (13):
  MIPS: SMP: Clear ASID without confusing has_valid_asid()
  MIPS: SMP: Update cpu_foreign_map on CPU disable
  MIPS: SMP: Drop stop_this_cpu() cpu_foreign_map hack
  MIPS: c-r4k: Fix protected_writeback_scache_line for EVA
  MIPS: c-r4k: Fix sigtramp SMP call to use kmap
  MIPS: c-r4k: Avoid dcache flush for sigtramps

  MIPS: c-r4k: Add r4k_on_each_cpu cache op type arg
  MIPS: c-r4k: Fix valid ASID optimisation
  MIPS: c-r4k: Exclude sibling CPUs in SMP calls
  MIPS: c-r4k: Split r4k_flush_kernel_vmap_range()
  MIPS: c-r4k: Local flush_icache_range cache op override
  MIPS: c-r4k: Avoid small flush_icache_range SMP calls

  MIPS: c-r4k: Use SMP calls for CM indexed cache ops

 arch/mips/cavium-octeon/smp.c         |   1 +
 arch/mips/include/asm/r4kcache.h      |   4 +
 arch/mips/include/asm/smp.h           |   4 +-
 arch/mips/kernel/smp-bmips.c          |   1 +
 arch/mips/kernel/smp-cps.c            |   1 +
 arch/mips/kernel/smp.c                |  34 +++--
 arch/mips/loongson64/loongson-3/smp.c |   1 +
 arch/mips/mm/c-r4k.c                  | 274 ++++++++++++++++++++++++++++------
 8 files changed, 257 insertions(+), 63 deletions(-)

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: David Daney <david.daney@cavium.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Hongliang Tao <taohl@lemote.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Hua Yan <yanh@lemote.com>
Cc: Jayachandran C. <jchandra@broadcom.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
-- 
2.4.10

WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <james.hogan@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	Leonid Yegoshin <leonid.yegoshin@imgtec.com>,
	Felix Fietkau <nbd@nbd.name>,
	David Daney <david.daney@cavium.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Hongliang Tao <taohl@lemote.com>, Huacai Chen <chenhc@lemote.com>,
	Hua Yan <yanh@lemote.com>,
	"Jayachandran C." <jchandra@broadcom.com>,
	Kevin Cernekee <cernekee@gmail.com>,
	linux-mips@linux-mips.org
Subject: [PATCH 00/13] MIPS: c-r4k: SMP cache management fixes
Date: Wed, 13 Jul 2016 14:12:43 +0100	[thread overview]
Message-ID: <1468415576-12600-1-git-send-email-james.hogan@imgtec.com> (raw)
Message-ID: <20160713131243.Zd22j7WEWKcdQiXIv2vHx8837rXD38tlNvZGDnVsTMw@z> (raw)

These patches collect together various SMP cache management fixes &
refactorings, particularly to fix the missing SMP calls for indexed
cache ops on MIPS Coherence Manager (CM) based SMP systems since commit
cccf34e9411c ("MIPS: c-r4k: Fix cache flushing for MT cores").

Patches 1-6 fix various issues in the SMP code and cache management code
(all in relation to cache management).

Patches 7-12 then prepare r4k_on_each_cpu() and its various
callers/callees to distinguish hit/index cache ops so SMP calls can be
avoided.

Finally patch 13 makes the change for CM so that indexed cache ops are
performed on each core via SMP calls.

Patch 9 should also work around the SMP 34Kc regression Felix saw
recently, but __flush_anon_page() and r4k_flush_data_cache_page()
definitely still need looking at too.

All feedback & testing gratefully received.

James Hogan (13):
  MIPS: SMP: Clear ASID without confusing has_valid_asid()
  MIPS: SMP: Update cpu_foreign_map on CPU disable
  MIPS: SMP: Drop stop_this_cpu() cpu_foreign_map hack
  MIPS: c-r4k: Fix protected_writeback_scache_line for EVA
  MIPS: c-r4k: Fix sigtramp SMP call to use kmap
  MIPS: c-r4k: Avoid dcache flush for sigtramps

  MIPS: c-r4k: Add r4k_on_each_cpu cache op type arg
  MIPS: c-r4k: Fix valid ASID optimisation
  MIPS: c-r4k: Exclude sibling CPUs in SMP calls
  MIPS: c-r4k: Split r4k_flush_kernel_vmap_range()
  MIPS: c-r4k: Local flush_icache_range cache op override
  MIPS: c-r4k: Avoid small flush_icache_range SMP calls

  MIPS: c-r4k: Use SMP calls for CM indexed cache ops

 arch/mips/cavium-octeon/smp.c         |   1 +
 arch/mips/include/asm/r4kcache.h      |   4 +
 arch/mips/include/asm/smp.h           |   4 +-
 arch/mips/kernel/smp-bmips.c          |   1 +
 arch/mips/kernel/smp-cps.c            |   1 +
 arch/mips/kernel/smp.c                |  34 +++--
 arch/mips/loongson64/loongson-3/smp.c |   1 +
 arch/mips/mm/c-r4k.c                  | 274 ++++++++++++++++++++++++++++------
 8 files changed, 257 insertions(+), 63 deletions(-)

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: David Daney <david.daney@cavium.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Hongliang Tao <taohl@lemote.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Hua Yan <yanh@lemote.com>
Cc: Jayachandran C. <jchandra@broadcom.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
-- 
2.4.10

             reply	other threads:[~2016-07-13 13:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 13:12 James Hogan [this message]
2016-07-13 13:12 ` [PATCH 00/13] MIPS: c-r4k: SMP cache management fixes James Hogan
2016-07-13 13:12 ` [PATCH 01/13] MIPS: SMP: Clear ASID without confusing has_valid_asid() James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 02/13] MIPS: SMP: Update cpu_foreign_map on CPU disable James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 03/13] MIPS: SMP: Drop stop_this_cpu() cpu_foreign_map hack James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 04/13] MIPS: c-r4k: Fix protected_writeback_scache_line for EVA James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 05/13] MIPS: c-r4k: Fix sigtramp SMP call to use kmap James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 06/13] MIPS: c-r4k: Avoid dcache flush for sigtramps James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 07/13] MIPS: c-r4k: Add r4k_on_each_cpu cache op type arg James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 08/13] MIPS: c-r4k: Fix valid ASID optimisation James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 09/13] MIPS: c-r4k: Exclude sibling CPUs in SMP calls James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 10/13] MIPS: c-r4k: Split r4k_flush_kernel_vmap_range() James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 11/13] MIPS: c-r4k: Local flush_icache_range cache op override James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 12/13] MIPS: c-r4k: Avoid small flush_icache_range SMP calls James Hogan
2016-07-13 13:12   ` James Hogan
2016-07-13 13:12 ` [PATCH 13/13] MIPS: c-r4k: Use SMP calls for CM indexed cache ops James Hogan
2016-07-13 13:12   ` James Hogan

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=1468415576-12600-1-git-send-email-james.hogan@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=cernekee@gmail.com \
    --cc=chenhc@lemote.com \
    --cc=david.daney@cavium.com \
    --cc=f.fainelli@gmail.com \
    --cc=jchandra@broadcom.com \
    --cc=leonid.yegoshin@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=nbd@nbd.name \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    --cc=taohl@lemote.com \
    --cc=yanh@lemote.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