Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933568AbbENQoL (ORCPT ); Thu, 14 May 2015 12:44:11 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:35755 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933118AbbENQoF (ORCPT ); Thu, 14 May 2015 12:44:05 -0400 From: Rabin Vincent To: jesper.nilsson@axis.com Cc: linux-kernel@vger.kernel.org, linux-cris-kernel@axis.com, Rabin Vincent Subject: [PATCH 1/5] CRISv32: add support for irqflags tracing Date: Thu, 14 May 2015 18:43:11 +0200 Message-Id: <1431621795-25722-1-git-send-email-rabin@rab.in> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1916 Lines: 72 Add support irqflags tracing, which is required for things like lockdep and ftrace. Signed-off-by: Rabin Vincent --- arch/cris/Kconfig | 4 ++++ arch/cris/arch-v32/kernel/entry.S | 11 +++++++++++ arch/cris/kernel/irq.c | 6 +++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 0314e32..efe829e 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -36,6 +36,10 @@ config FORCE_MAX_ZONEORDER int default 6 +config TRACE_IRQFLAGS_SUPPORT + depends on ETRAX_ARCH_V32 + def_bool y + config CRIS bool default y diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index 026a0b2..3591c37 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S @@ -240,6 +240,17 @@ ret_from_sys_call: .type _Rexit,@function _Rexit: +#if defined(CONFIG_TRACE_IRQFLAGS) + addoq +PT_ccs, $sp, $acr + move.d [$acr], $r0 + btstq 15, $r0 ; I1 + bpl 1f + nop + jsr trace_hardirqs_on + nop +1: +#endif + ;; This epilogue MUST match the prologues in multiple_interrupt, irq.h ;; and ptregs.h. addq 4, $sp ; Skip orig_r10. diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index dd0be5d..694850e 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c @@ -45,7 +45,11 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) { unsigned long sp; - struct pt_regs *old_regs = set_irq_regs(regs); + struct pt_regs *old_regs; + + trace_hardirqs_off(); + + old_regs = set_irq_regs(regs); irq_enter(); sp = rdsp(); if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) { -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/