From patchwork Mon Jan 28 17:34:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Dave Martin X-Patchwork-Id: 2057081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 271E53FD49 for ; Mon, 28 Jan 2013 17:37:12 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TzsbG-0000Z3-Mh; Mon, 28 Jan 2013 17:34:30 +0000 Received: from la-in-x022f.1e100.net ([2a00:1450:4010:c03::22f] helo=mail-la0-x22f.google.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tzsb4-0000Xv-AB for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2013 17:34:19 +0000 Received: by mail-la0-f47.google.com with SMTP id fj20so978795lab.34 for ; Mon, 28 Jan 2013 09:34:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=bkmfWX6OnycLL+9tzsGc3XDeVU+5Tns8DRjVOngaKwo=; b=CmGTxFM0wgZFuTWdRsmy74Yu1i/lXBiVIGtWznov3XKkqmkPEhXcZ98KUg+Zx5vys+ a9UevfAuyIqgSzo3B2j9gRCs2/g0wOCqgsO2TEGzxn/jsOxhmJ2iSknFgav05PXoEmDd cVkfmAWI98mf/5TLr0XvPX4MDjRlI8wTzz2eiYw8RYP6/o3doQEeiUxFg71d9i4SYYHy 0y/IQ7J86ZYL33XEBbTT3zrk32r6MeqapPRuFNUpHIb282MjA6YtJnrGI6ak92578cSI pVbLNIsNI1mllJeWIvsLTzEdW/qVbkDii+HpdQzM3X/u7uxbyVBi/g0eVBcY1wVfTrkT JFwQ== X-Received: by 10.112.30.104 with SMTP id r8mr2095198lbh.82.1359394455471; Mon, 28 Jan 2013 09:34:15 -0800 (PST) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com. [217.140.96.63]) by mx.google.com with ESMTPS id n7sm4048816lbg.3.2013.01.28.09.34.11 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Jan 2013 09:34:14 -0800 (PST) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH] ARM: Export the CPU logical map to modules Date: Mon, 28 Jan 2013 17:34:04 +0000 Message-Id: <1359394444-16610-1-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkDih9QTi9X67LRF2qGnM0DtvYiJXhee05T0USMpfoll7M+JHgilR85c7/+Yg2Ed0ObEQ0K X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130128_123418_517025_E5408197 X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Nicolas Pitre , Drew Richardson , Lorenzo Pieralisi , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It is reasonable for loadable modules to be CPU topology aware (particular examples include cpufreq and cpuidle drivers). This patch exports __cpu_logical_map, so that modules can use the cpu_logical_map() interface declared in . Signed-off-by: Dave Martin --- If anyone has a strong view on whether this should be EXPORT_SYMBOL_GPL(), I don't have a problem with changing that. I'm not sure of the precise etiquette here. Certainly this does not feel like a very "public" interface. Perhaps we should wrap this in a real function for export to modules, rather than encouraging them to poke the __cpu_logical_map[] array (albeit via a predefined macro). arch/arm/kernel/setup.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 3f6cbb2..1b9e5bf 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -428,6 +428,7 @@ void cpu_init(void) } int __cpu_logical_map[NR_CPUS]; +EXPORT_SYMBOL(__cpu_logical_map); void __init smp_setup_processor_id(void) {