Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933846AbXHVVpx (ORCPT ); Wed, 22 Aug 2007 17:45:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933409AbXHVVph (ORCPT ); Wed, 22 Aug 2007 17:45:37 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:54137 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933343AbXHVVpg (ORCPT ); Wed, 22 Aug 2007 17:45:36 -0400 Date: Thu, 23 Aug 2007 03:28:24 +0530 (IST) From: Satyam Sharma X-X-Sender: satyam@enigma.security.iitk.ac.in To: Andrew Morton cc: Sam Ravnborg , Randy Dunlap , wbrana@gmail.com, Linux Kernel Mailing List Subject: Re: [PATCH][bugzilla #8679] therm_throt.c: Fix section mismatch In-Reply-To: Message-ID: References: <20070820220328.438e8a4d.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1002 Lines: 20 On Thu, 23 Aug 2007, Satyam Sharma wrote: > > I must say, this is an amazingly cunning idea. Only things I can think of > against this would be: the dropping of unneeded code is not guaranteed, > but depends on compiler. And we saw from the "static inline {return 0;}" > testcase that gcc can sometimes be not-so-smart. Oh, wait. I just stumbled upon arch/i386/kernel/cpu/intel_cacheinfo.c that references the callback function from generic CPU-initialization startup code that must get executed even when HOTPLUG_CPU=n. The leave-it- upto-toolchain method would see this reference, and preserve the function even after initcalls stage for HOTPLUG_CPU=n. So the explicit __cpuinit method scores here, admittedly only because of weird taste of said code. - 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/