From patchwork Wed Jun 4 10:53:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 31345 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 65F4E208CF for ; Wed, 4 Jun 2014 10:56:12 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id uo5sf25024163pbc.4 for ; Wed, 04 Jun 2014 03:56:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=4hO9v3T0FmdRt7GXAbjzIWlTWXxpchNXSgaj9RF09Z8=; b=QSUMPMEZfgoCRv7oNjCvcuCF99yZ8CZS/kn32UQOePcHRZTwuGCB2GP78p9aqeJmVJ 1Rn3RMfPeR6b0oDtuPDiSy0aLf0Tm45N+ZSf320xrZOd8/XYtegHHhwZfZQaNeEq5qUr +yTOsavhFSPf58a5V4ZDGMLDFMTGivFXMxH+DvEfU8mfjXCeANA8GjFIzUoU2vqfwaWn 9O/FDmM8vvO/sZ+pG8NaA5Zl87SrDkG1tZcixtpwqUeR5Sf5YvVk0bkfNa3tHKrStB2l gNUOJzYQWLsTgs1oYqKaabOXYKFI+6QxqObn0JA1/3TmqyDDsnFtsLtvT31ZCNgb4cO0 5RCg== X-Gm-Message-State: ALoCoQk+AAjDDflrQqInXRTDxAY7INDwmsHohfE1mGmvMsG/x2ydxTlE0zcQalZK4d7cTdOXHAw8 X-Received: by 10.68.195.9 with SMTP id ia9mr19347957pbc.7.1401879371316; Wed, 04 Jun 2014 03:56:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.225 with SMTP id o88ls2949617qge.88.gmail; Wed, 04 Jun 2014 03:56:11 -0700 (PDT) X-Received: by 10.221.4.66 with SMTP id ob2mr2698764vcb.28.1401879371198; Wed, 04 Jun 2014 03:56:11 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id x1si1245906vep.70.2014.06.04.03.56.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Jun 2014 03:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.170 as permitted sender) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id db11so8588001veb.29 for ; Wed, 04 Jun 2014 03:56:11 -0700 (PDT) X-Received: by 10.58.243.39 with SMTP id wv7mr846566vec.51.1401879371103; Wed, 04 Jun 2014 03:56:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp35227vcb; Wed, 4 Jun 2014 03:56:10 -0700 (PDT) X-Received: by 10.224.19.131 with SMTP id a3mr71649147qab.3.1401879370732; Wed, 04 Jun 2014 03:56:10 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id r10si3078559qad.65.2014.06.04.03.56.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jun 2014 03:56:10 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ws8pR-00019V-3F; Wed, 04 Jun 2014 10:53:57 +0000 Received: from mail-wi0-f180.google.com ([209.85.212.180]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ws8pO-00018j-1o for linux-arm-kernel@lists.infradead.org; Wed, 04 Jun 2014 10:53:54 +0000 Received: by mail-wi0-f180.google.com with SMTP id hi2so1187776wib.7 for ; Wed, 04 Jun 2014 03:53:30 -0700 (PDT) X-Received: by 10.194.91.144 with SMTP id ce16mr69418547wjb.18.1401879210579; Wed, 04 Jun 2014 03:53:30 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id oy4sm3226277wjb.41.2014.06.04.03.53.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jun 2014 03:53:29 -0700 (PDT) From: Linus Walleij To: arm@kernel.org Subject: [PATCH] ARM: integrator: fix section mismatch problem Date: Wed, 4 Jun 2014 12:53:22 +0200 Message-Id: <1401879202-10516-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140604_035354_239137_E1885695 X-CRM114-Status: GOOD ( 19.59 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.180 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Linus Walleij , Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This addresses a section mismatch problem in the IM-PD1 driver in the Integrator/AP. The IM-PD1 contains a VIC interrupt controller and therefore the driver calls vic_init_cascaded() which is marked __init as irqchips are simply not hot-pluggable and specifically the VIC is assumed to initiate only on boot. However the module driver model of the Integrator LM bus assumes that logic tile drivers can be probed at runtime. This is not really the case for IM-PD1: these tiles are detected at boot and they cannot be plugged into a running system. Before this patch it is of course possible to modprobe them later. By first forcing the IM-PD1 to bool we make sure this driver gets compiled into the kernel, and we know it will be probed only at boot time when the tiles are detected, so we can tag its probe function __init_refok as we know it won't be called after boot now, and the section mismatch problem goes away. Cc: Arnd Bergmann Cc: Russell King Signed-off-by: Linus Walleij --- ARM SoC folks: please apply this directly if the solution seems acceptable. --- arch/arm/mach-integrator/Kconfig | 2 +- arch/arm/mach-integrator/impd1.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index ba43321001d8..64f8e2564a37 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig @@ -28,7 +28,7 @@ config ARCH_CINTEGRATOR bool config INTEGRATOR_IMPD1 - tristate "Include support for Integrator/IM-PD1" + bool "Include support for Integrator/IM-PD1" depends on ARCH_INTEGRATOR_AP select ARCH_REQUIRE_GPIOLIB select ARM_VIC diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 0e870ea818c4..05d845cb8758 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c @@ -308,7 +308,12 @@ static struct impd1_device impd1_devs[] = { */ #define IMPD1_VALID_IRQS 0x00000bffU -static int __init impd1_probe(struct lm_device *dev) +/* + * As this module is bool, it is OK to have this as __init_refok() - no + * probe calls will be done after the initial system bootup, as devices + * are discovered as part of the machine startup. + */ +static int __init_refok impd1_probe(struct lm_device *dev) { struct impd1_module *impd1; int irq_base;