linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>, <linux-mips@linux-mips.org>
Cc: <linux-kernel@vger.kernel.org>, James Hogan <james.hogan@imgtec.com>
Subject: [PATCH 3/9] MIPS: Remove redundant IPTI==IPPCI logic
Date: Tue, 27 Jan 2015 21:45:49 +0000	[thread overview]
Message-ID: <1422395155-16511-4-git-send-email-james.hogan@imgtec.com> (raw)
In-Reply-To: <1422395155-16511-1-git-send-email-james.hogan@imgtec.com>

The situation where the timer interrupt is on the same line as the
performance counter interrupt is handled in per_cpu_trap_init() by
setting cp0_perfcount_irq to -1, so there is no need to duplicate the
logic conditional upon cp0_perfcount_irq >= 0 in perf
(init_hw_perf_events()) and oprofile (mipsxx_init()).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
 arch/mips/kernel/perf_event_mipsxx.c | 3 +--
 arch/mips/oprofile/op_model_mipsxx.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index 9466184d0039..76bc3bb18c45 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -1615,8 +1615,7 @@ init_hw_perf_events(void)
 
 	if (get_c0_perfcount_int)
 		irq = get_c0_perfcount_int();
-	else if ((cp0_perfcount_irq >= 0) &&
-		 (cp0_compare_irq != cp0_perfcount_irq))
+	else if (cp0_perfcount_irq >= 0)
 		irq = MIPS_CPU_IRQ_BASE + cp0_perfcount_irq;
 	else
 		irq = -1;
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index faf0d4ad0cc2..24729f023d93 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -435,8 +435,7 @@ static int __init mipsxx_init(void)
 
 	if (get_c0_perfcount_int)
 		perfcount_irq = get_c0_perfcount_int();
-	else if ((cp0_perfcount_irq >= 0) &&
-		 (cp0_compare_irq != cp0_perfcount_irq))
+	else if (cp0_perfcount_irq >= 0)
 		perfcount_irq = MIPS_CPU_IRQ_BASE + cp0_perfcount_irq;
 	else
 		perfcount_irq = -1;
-- 
2.0.5


  parent reply	other threads:[~2015-01-27 21:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 21:45 [PATCH 0/9] MIPS: Allow shared IRQ for timer & perf counter James Hogan
2015-01-27 21:45 ` [PATCH 1/9] MIPS: cevt-r4k: Move handle_perf_irq() out of header James Hogan
2015-01-27 21:45 ` [PATCH 2/9] MIPS: Use CAUSEF_TI, CAUSEF_PCI constants James Hogan
2015-01-27 21:45 ` James Hogan [this message]
2015-01-27 21:45 ` [PATCH 4/9] irqchip: mips-gic: Fix typo in comment James Hogan
2015-01-28 10:48   ` Andrew Bresticker
2015-01-27 21:45 ` [PATCH 5/9] irqchip: mips-gic: Add missing definitions for FDC IRQ James Hogan
2015-01-28 10:49   ` Andrew Bresticker
2015-01-27 21:45 ` [PATCH 6/9] MIPS: cevt-r4k: Make interrupt handler shared James Hogan
2015-01-27 21:45 ` [PATCH 7/9] MIPS: perf: Allow sharing IRQ with timer James Hogan
2015-01-27 21:45 ` [PATCH 8/9] MIPS: OProfile: " James Hogan
2015-01-27 21:45 ` [PATCH 9/9] MIPS: Allow shared IRQ for timer & perf counter 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=1422395155-16511-4-git-send-email-james.hogan@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).