Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1086965ybx; Thu, 7 Nov 2019 07:06:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxChySDos1E7Wo94vJkQrvE5doq6FpbBcAp0f/jNnnMsQf/Hx6OYUNN0WkUSIILmJLSPAJ9 X-Received: by 2002:aa7:c4c8:: with SMTP id p8mr4058379edr.121.1573139167898; Thu, 07 Nov 2019 07:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573139167; cv=none; d=google.com; s=arc-20160816; b=e7L2DuUzMlFXUtmfjIC8HbdFOPb3aEG+h9ShAjZkFr/paBbVQtsXxMK08Ax6DIYa86 dPOvtVxA6viDpagItXMc7NAShRBow90zpyIaKAKbu9uhQgRJHnRmpyNGTkp86IoP/qts 9kQghV+fLD9bdZHHXj61pdQ/qkVIjh0xRMzfAjyjISbQVtO+0j8bO5Dv1zTJaYpe1Crx FVqHWMB//MlWKxPp18P5ewujjq6h5g0RIvLA4JrtJ2uBDkmqRC1SSFDBiuORl6IbjRzx M90Nahg/JCJS/081QKrqEtD9ypIwYwyvIbHCdRWeQZluWsNbBKpbU9W4qvU8sDn6LSi2 h+Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jgAkr102LqQKPAr3pGJYhPDK4e/SFK30Vkoy1JW8C9s=; b=OcByz7m/pwHTd718fcPfanU1Fs2x3rHOuRNcWmr7WpxLKU51IvC0T7JLw8I2PfTL9Z 5tDiP6ftbTh0R9IlBL5EsYwZaYdY9JAIluLv4UOaiNOB4bypvGNQKb4LUU2r1PYPIbY4 XWq/wGR60Yd0ax3gKBMkVAG40VH5X47l4s6IVfNKBQ/aZwhz+Qntpefu7HpwBM3T4xxv z2GsB4zJFfeiWepGsfJyoRD/rv9Ahh9GVy77Ez8iN9IvLhjPRKTGVEm5hlEDfwWjsUFl SVrHwKuaKpKf96VAP14FRRrDv7ljJ2SkvxYZbVAGoqMhG5y20AIB+VV1a45b7m2wQWVF A9kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K6FTWVC1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si1759313edl.128.2019.11.07.07.05.43; Thu, 07 Nov 2019 07:06:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K6FTWVC1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388539AbfKGPBu (ORCPT + 99 others); Thu, 7 Nov 2019 10:01:50 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:47018 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbfKGPBu (ORCPT ); Thu, 7 Nov 2019 10:01:50 -0500 Received: by mail-lj1-f194.google.com with SMTP id e9so2599235ljp.13 for ; Thu, 07 Nov 2019 07:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jgAkr102LqQKPAr3pGJYhPDK4e/SFK30Vkoy1JW8C9s=; b=K6FTWVC18/HyP+n8tnIdWBbmpg4P7IxBIGjTfd3smZOdNgDhapmaHf1IhT8kb2LSeg Jp07yGotkBOcA6+pRceCmh3VjtNawsLwxSifx2YACvzh9JDUgrSG5pHHU6YW2cq3V8qi wbXClCy8b0xtcYKRt6csHAPi5UH1fVW1AlSaTW87EJcyy26oAX/KQxunAyTCdCbMLQao hmwkxLx/5OQRsiBShbFCZRZq+qwSxwx5ReOVAbsv2fE+fKibsPIEhdksbqEEnkH6QekX NqQzaZNv//tuRz+X9s5Fgxa3pRbvJVbZDYBy4Ju2n+OYbhL2uB9GnNoF66wM6k4KJ3B1 J1vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jgAkr102LqQKPAr3pGJYhPDK4e/SFK30Vkoy1JW8C9s=; b=jJj7I21X1cv9kqj6i46peH6+lrWi5bGAMUo3znVSX2eyQvphxXQuiHa3FLKS/ZAfqq 9qw57CYOTnhCc35droZQlQ56BNsnnJ1I/DQQ6IxW3kAHVI2hxdtN5PHHGBUZVSQJmfgV 3UMwAB6HVr8b7viz8yPBepMo0hJ5QAGQbXZoeWZTk4nT7nuv31YnzGKp7yAZ52U01cyN +mpng6/QLdK0gR9EgHh47R4BCDK44KCHT2XS1rEcewTQ7Asn+Tst35bWwirBCaFCwRCT hl2dXaI8l/AZQ5U/yhK8B/UDrTKzl3dVGH1lL/0v2NqaJfTP7bMgiXFYFhHm4fihTkPV Tb1w== X-Gm-Message-State: APjAAAXZ6Iv7EG/3kXJyB7JdCFPfKeyRzoMajxAQCGzVQ4qfZqrHMtur kla9jpm4NaJCVW/6QIbb+0H7MbFK4VsCknbu0SuHZA== X-Received: by 2002:a2e:90b:: with SMTP id 11mr2740565ljj.233.1573138907121; Thu, 07 Nov 2019 07:01:47 -0800 (PST) MIME-Version: 1.0 References: <20191107103540.21088-1-jonathanh@nvidia.com> In-Reply-To: <20191107103540.21088-1-jonathanh@nvidia.com> From: Linus Walleij Date: Thu, 7 Nov 2019 16:01:35 +0100 Message-ID: Subject: Re: [PATCH] gpio: xgs-iproc: Fix crash when driver is built as a module To: Jon Hunter Cc: Chris Packham , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , linux-tegra@vger.kernel.org, Ray Jui , Scott Branden Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 7, 2019 at 11:35 AM Jon Hunter wrote: > Commit 6a41b6c5fc20 ("gpio: Add xgs-iproc driver") introduced a new > GPIO driver for the Broadcom GPIO controller. When this driver is built > as a module the following warning is observed because the > bcm_iproc_gpio_of_match structure is defined with the __initconst > attribute ... > > MODPOST vmlinux.o > WARNING: vmlinux.o(.data+0x834d0): Section mismatch in reference from > the variable bcm_iproc_gpio_driver to the variable > .init.rodata:bcm_iproc_gpio_of_match > The variable bcm_iproc_gpio_driver references > the variable __initconst bcm_iproc_gpio_of_match > > This then causes a translation fault on boot which and results in a > system crash. Fix this by dropping the __initconst attribute from the > bcm_iproc_gpio_of_match structure. > > Signed-off-by: Jon Hunter Incidentally Mark Brown already sent an identical patch. Thanks anyway! Yours, Linus Walleij