From patchwork Wed Jan 29 19:59:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guy Martin X-Patchwork-Id: 3554391 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7935E9F2E9 for ; Wed, 29 Jan 2014 20:14:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96FC320155 for ; Wed, 29 Jan 2014 20:14:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FA7820131 for ; Wed, 29 Jan 2014 20:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750942AbaA2UOJ (ORCPT ); Wed, 29 Jan 2014 15:14:09 -0500 Received: from venus.vo.lu ([80.90.45.96]:65304 "EHLO venus.vo.lu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbaA2UOI (ORCPT ); Wed, 29 Jan 2014 15:14:08 -0500 X-Greylist: delayed 905 seconds by postgrey-1.27 at vger.kernel.org; Wed, 29 Jan 2014 15:14:07 EST Received: from ibiza.lux.tuxicoman.be (vodsl-8217.vo.lu [85.93.199.25]) by venus.vo.lu with SMTP (version=TLS\Tls cipher=Aes128 bits=128); Wed, 29 Jan 2014 20:58:37 +0100 Received: from [2001:7e8:2221:400:863a:4bff:fe82:d89c] (helo=dellete) by ibiza.lux.tuxicoman.be with esmtpsa (SSL3.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80.1) (envelope-from ) id 1W8bHe-00072Q-DS for linux-parisc@vger.kernel.org; Wed, 29 Jan 2014 20:58:50 +0100 Date: Wed, 29 Jan 2014 20:59:44 +0100 From: Guy Martin To: linux-parisc@vger.kernel.org Subject: Ftrace broken on parisc Message-ID: <20140129205944.4f71ca1c@dellete> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.22; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, It seems that the ftrace subsystem has not been maintained for a few years. So far I have the diff at the bottom that attempts to fix it bug there is still an issue while linking : arch/parisc/kernel/built-in.o: In function `return_to_handler': (.text+0xb2a8): undefined reference to `ftrace_return_to_handler' hppa64-linux-ld: arch/parisc/kernel/built-in.o(.text+0xllx): cannot reach (null) arch/parisc/kernel/built-in.o: In function `return_to_handler': (.text+0xb2a8): relocation truncated to fit: R_PARISC_PCREL17F against undefined symbol `ftrace_return_to_handler' make: *** [vmlinux] Error 1 I'm not sure how this can be fixed, the problems comes from the assembly in entry.S, it uses a 'b' to jump to ftrace_return_to_handler. I guess 'be' needs to be used but not sure how that'd works with the linker. Moreover, there is probably more than this to be fixed. For the background story, I'm trying to fix this to audit irq handlers for my pata_sil680 issue. Adding some printk for irq == 71 in handle_percpu_irq(), I see and odd behavior. The printk at the end of the function is displayed a lot more than the printk at the begining of the function. I know printk isn't the best for irq handlers that's why I was investigating the ftrace way. Any tip/help is very much welcome ! Guy --- -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug index bc989e5..6d23a1a 100644 --- a/arch/parisc/Kconfig.debug +++ b/arch/parisc/Kconfig.debug @@ -1,5 +1,8 @@ menu "Kernel hacking" +config TRACE_IRQFLAGS_SUPPORT + def_bool y + source "lib/Kconfig.debug" config DEBUG_RODATA diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c index 5beb97b..8c9f757 100644 --- a/arch/parisc/kernel/ftrace.c +++ b/arch/parisc/kernel/ftrace.c @@ -156,7 +156,7 @@ void ftrace_function_trampoline(unsigned long parent, return; if (ftrace_trace_function != ftrace_stub) { - ftrace_trace_function(parent, self_addr); + ftrace_trace_function(parent, self_addr, NULL, NULL); return; } #ifdef CONFIG_FUNCTION_GRAPH_TRACER