From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbcBVSk4 (ORCPT ); Mon, 22 Feb 2016 13:40:56 -0500 Received: from mga11.intel.com ([192.55.52.93]:7831 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbcBVSkz (ORCPT ); Mon, 22 Feb 2016 13:40:55 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,485,1449561600"; d="scan'208";a="921420139" From: Andi Kleen To: Thomas Gleixner Cc: LKML , Peter Zijlstra , x86@kernel.org, Borislav Petkov , Stephane Eranian , Harish Chegondi , Kan Liang , Andi Kleen , Jacob Pan Subject: Re: [patch V2 28/28] x86/perf/intel/rapl: Make it modular References: <20160222110337.198341739@linutronix.de> <20160222110442.602714155@linutronix.de> Date: Mon, 22 Feb 2016 10:40:54 -0800 In-Reply-To: <20160222110442.602714155@linutronix.de> (Thomas Gleixner's message of "Mon, 22 Feb 2016 11:07:03 -0000") Message-ID: <87povopozt.fsf@tassilo.jf.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner writes: > Add the necessary exit functions so it can be built as a module. If you make it a module you also need to add MODULE_DEVICE_TABLE for the PCI IDs and also add x86_cpu_id tables/annotations for the model numbers. Otherwise the module would always need to be loaded manually which would break existing setups. Of course it's a bit of a waste because in many cases the uncore driver will not be needed. One alternative would be to only add some module aliases and then add code in the perf core to probe the alias when that PMU is accessed. That would likely work for most of perf, except for perf list (which does not know what pmu to probe) Other than that it's very useful, it was long overdue to make these drivers modular. -Andi -- ak@linux.intel.com -- Speaking for myself only