Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753806Ab3GOFTc (ORCPT ); Mon, 15 Jul 2013 01:19:32 -0400 Received: from ozlabs.org ([203.10.76.45]:34736 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752376Ab3GOFTb (ORCPT ); Mon, 15 Jul 2013 01:19:31 -0400 From: Rusty Russell To: Anton Blanchard , Benjamin Herrenschmidt , Paul Mackerras , Neil Horman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] module: ppc64 module CRC relocation fix causes perf issues In-Reply-To: <20130715140450.573aab15@kryten> References: <20130715140450.573aab15@kryten> User-Agent: Notmuch/0.15.2+81~gd2c8818 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Mon, 15 Jul 2013 14:09:49 +0930 Message-ID: <87zjto1lnu.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1699 Lines: 44 Anton Blanchard writes: > Module CRCs are implemented as absolute symbols that get resolved by > a linker script. We build an intermediate .o that contains an > unresolved symbol for each CRC. genksysms parses this .o, calculates > the CRCs and writes a linker script that "resolves" the symbols to > the calculated CRC. > > Unfortunately the ppc64 relocatable kernel sees these CRCs as symbols > that need relocating and relocates them at boot. Commit d4703aef > (module: handle ppc64 relocating kcrctabs when CONFIG_RELOCATABLE=y) > added a hook to reverse the bogus relocations. Part of this patch > created a symbol at 0x0: > > # head -2 /proc/kallsyms > 0000000000000000 T reloc_start > c000000000000000 T .__start > > This reloc_start symbol is causing lots of confusion to perf. It > thinks reloc_start is a massive function that stretches from 0x0 to > 0xc000000000000000 and we get various cryptic errors out of perf, > including: > > problem incrementing symbol count, skipping event > > This patch removes the reloc_start linker script label and instead > defines it as PHYSICAL_START. We also need to wrap it with > CONFIG_PPC64 because the ppc32 kernel can set a non zero > PHYSICAL_START at compile time and we wouldn't want to subtract > it from the CRCs in that case. > > Signed-off-by: Anton Blanchard > Cc: Acked-by: Rusty Russell Ben? Cheers, Rusty. -- 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/