From: Paul Burton <paul.burton@imgtec.com> To: <linux-mips@linux-mips.org> Cc: Paul Burton <paul.burton@imgtec.com>, Ralf Baechle <ralf@linux-mips.org> Subject: [PATCH 4/6] MIPS: Use current_cpu_type() in m4kc_tlbp_war() Date: Fri, 2 Jun 2017 15:38:04 -0700 [thread overview] Message-ID: <20170602223806.5078-5-paul.burton@imgtec.com> (raw) In-Reply-To: <20170602223806.5078-1-paul.burton@imgtec.com> Use current_cpu_type() to check for 4Kc processors instead of checking the PRID directly. This will allow for the 4Kc case to be optimised out of kernels that can't run on 4KC processors, thanks to __get_cpu_type() and its unreachable() call. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org --- arch/mips/mm/tlbex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index e6499209b81c..5aadc69c8ce3 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -153,8 +153,7 @@ static int scratchpad_offset(int i) */ static int m4kc_tlbp_war(void) { - return (current_cpu_data.processor_id & 0xffff00) == - (PRID_COMP_MIPS | PRID_IMP_4KC); + return current_cpu_type() == CPU_4KC; } /* Handle labels (which must be positive integers). */ -- 2.13.0
WARNING: multiple messages have this Message-ID (diff)
From: Paul Burton <paul.burton@imgtec.com> To: linux-mips@linux-mips.org Cc: Paul Burton <paul.burton@imgtec.com>, Ralf Baechle <ralf@linux-mips.org> Subject: [PATCH 4/6] MIPS: Use current_cpu_type() in m4kc_tlbp_war() Date: Fri, 2 Jun 2017 15:38:04 -0700 [thread overview] Message-ID: <20170602223806.5078-5-paul.burton@imgtec.com> (raw) Message-ID: <20170602223804.9nn01eZXlMOWXqO3cvzmsUapjEp_TJPJH1agN10CDZg@z> (raw) In-Reply-To: <20170602223806.5078-1-paul.burton@imgtec.com> Use current_cpu_type() to check for 4Kc processors instead of checking the PRID directly. This will allow for the 4Kc case to be optimised out of kernels that can't run on 4KC processors, thanks to __get_cpu_type() and its unreachable() call. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org --- arch/mips/mm/tlbex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index e6499209b81c..5aadc69c8ce3 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -153,8 +153,7 @@ static int scratchpad_offset(int i) */ static int m4kc_tlbp_war(void) { - return (current_cpu_data.processor_id & 0xffff00) == - (PRID_COMP_MIPS | PRID_IMP_4KC); + return current_cpu_type() == CPU_4KC; } /* Handle labels (which must be positive integers). */ -- 2.13.0
next prev parent reply other threads:[~2017-06-02 22:40 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-06-02 22:38 [PATCH 0/6] MIPS: TLB exception handler fixes & optimisation Paul Burton 2017-06-02 22:38 ` Paul Burton 2017-06-02 22:38 ` [PATCH 1/6] MIPS: Add CPU shared FTLB feature detection Paul Burton 2017-06-02 22:38 ` Paul Burton 2017-06-02 22:38 ` [PATCH 2/6] MIPS: Handle tlbex-tlbp race condition Paul Burton 2017-06-02 22:38 ` Paul Burton 2017-06-02 22:38 ` [PATCH 3/6] MIPS: Allow storing pgd in C0_CONTEXT for MIPSr6 Paul Burton 2017-06-02 22:38 ` Paul Burton 2017-06-02 22:38 ` Paul Burton [this message] 2017-06-02 22:38 ` [PATCH 4/6] MIPS: Use current_cpu_type() in m4kc_tlbp_war() Paul Burton 2017-06-02 22:38 ` [PATCH 5/6] MIPS: tlbex: Use ErrorEPC as scratch when KScratch isn't available Paul Burton 2017-06-02 22:38 ` Paul Burton 2017-06-15 17:27 ` Maciej W. Rozycki 2017-06-15 17:27 ` Maciej W. Rozycki 2017-06-28 15:25 ` Ralf Baechle 2017-06-29 16:39 ` Maciej W. Rozycki 2017-06-29 16:39 ` Maciej W. Rozycki 2017-06-02 22:38 ` [PATCH 6/6] MIPS: tlbex: Remove struct work_registers Paul Burton 2017-06-02 22:38 ` Paul Burton
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=20170602223806.5078-5-paul.burton@imgtec.com \ --to=paul.burton@imgtec.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: linkBe 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.