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: Dave Martin X-Patchwork-Id: 14311 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D531323E92 for ; Mon, 28 Jan 2013 17:34:18 +0000 (UTC) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by fiordland.canonical.com (Postfix) with ESMTP id 8B7F4A1824D for ; Mon, 28 Jan 2013 17:34:18 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id cz10so763763veb.38 for ; Mon, 28 Jan 2013 09:34:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=bkmfWX6OnycLL+9tzsGc3XDeVU+5Tns8DRjVOngaKwo=; b=nLJMS8IDf/8URBeSw19YnPQ8aJjMg/TXuPVcoa5Fh0m+qzS0rKpR8D9op1MpGSFfAM iFOEi4NGE2hwONpxVlAnkJcSUc4Ilbx+Np2SPIbngVbfYXa75BYSc3sOB8USDMiOj/o0 PjhNxnKz9RN+fWHt+IDm4Q28+rsVvDc2iX2E+bpPTYIFpJHv5/90VOdUBxU+G9V9OJYW qz5jhHUe0t6KpfSBt40EIYHQMOOC1GeqtDdr6GggdjyHBMRFABsj8UL/QU5Vt1QTrK5p OOiK4KJQVRD7A8MbBlZQNujgBdWEA5qQiD6b5WWzwQl+kx6FvnRSBByuFWv250SURmgt W3oQ== X-Received: by 10.52.95.144 with SMTP id dk16mr6842651vdb.40.1359394458059; Mon, 28 Jan 2013 09:34:18 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp96008veb; Mon, 28 Jan 2013 09:34:17 -0800 (PST) X-Received: by 10.152.114.42 with SMTP id jd10mr13947929lab.31.1359394456320; Mon, 28 Jan 2013 09:34:16 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx.google.com with ESMTPS id nr8si4990793lab.106.2013.01.28.09.34.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jan 2013 09:34:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.217.172 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=209.85.217.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.217.172 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by mail-lb0-f172.google.com with SMTP id n8so4283028lbj.17 for ; Mon, 28 Jan 2013 09:34:15 -0800 (PST) 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 Cc: patches@linaro.org, Nicolas Pitre , Lorenzo Pieralisi , Drew Richardson 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: ALoCoQm25Ym6UVa5TVv2dhDtLF3qyWZiZPdS/ZPqwvUakC5sYzil7h0FLTL/dNIomRnRSWyMqXpD 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) {