Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1651478pxy; Mon, 2 Aug 2021 07:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2PMVOcljuURRe8oW6YPlmMs+vlzapLZYFAZv0pLsX+RS1q3fqv0dL5NsR2myT1kbfOeqN X-Received: by 2002:aa7:c0d1:: with SMTP id j17mr19336429edp.217.1627913193211; Mon, 02 Aug 2021 07:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627913193; cv=none; d=google.com; s=arc-20160816; b=Ns/YZapct8dKkT5CIFxOvO+6bgVl58HlKwSJebTR5d4SBmY8iluzGKZWt5RvspUoTM luc2QohmoWq/LpC7z8xSeTJKfJTcwS4hOt9rgabokd4aKYpoDNAUHu4amaR6GQM8YT3C giZEDApPmu7QfSq7ptTL/KFkrF6ET3GPhvjsqCUl3gt0QS0/W92yEiYn9lTTsrhmPvoz g7Wc6nJKLDb+ChjIclQ8eSmqEWTYNdoqviXY2JWpXogUkj9sGE1VqSV2+h2ABvKC7m9E ifeLED0DJzRFsEVsv2tcahhQ8/nifSgGi1k06e3abRXLDDOdDT/ZOi1c7/67Pxr7IsXf RMBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T1DYErc8+HfMlgf/qlHpkJsXAeZBeTejY5ddL+bdI3s=; b=dxweCU37GZeL1qXxo4pXFIEXmvCvsbseXUJ1FVvZ74Z1a2ouDippdtfnne62uO6q37 /3tSwLU2Qtu4AaANtBNlQ8gDPpLN0nrRf338BOeGmuknmXgogPwzcK/bSeJaZ+6fXj9L aXXYvTKRHqWeMsIFfCyZjvSSI4BlRwB/K8u/QmHji02PXbi4NrX5B8odpe/qaDdhuNM+ LqSMOl2KnIqIs2/FCwc1pV2YlqUbn+TVqNfhXi3jCMilTmQ81tmOT5f+SR27aNZJaGec VFqyrMCwCLFoPVVHQ6gDn+fGBvltNpvemSGDrUJa8rVHfWNuzzEOxbUvFTj8r5tpGRCP 8jjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0vt515A0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o20si10124616ejm.682.2021.08.02.07.06.08; Mon, 02 Aug 2021 07:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0vt515A0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234285AbhHBOEI (ORCPT + 99 others); Mon, 2 Aug 2021 10:04:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:40902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235786AbhHBN4D (ORCPT ); Mon, 2 Aug 2021 09:56:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42B5F60F6D; Mon, 2 Aug 2021 13:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912465; bh=fvodgirbJz/RQvpMeDVfNe4kWcq9jASI9+NFQyIHmVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0vt515A05/lR6tmOO50ZGiFmyhbTR/p39aDPYqfNPwoUwwrUZ2d0x4yNP7HoE3kO2 fsSz/eS8S4w+7WUU7QeYFL1M2tTJuyWXXgudEbWpffRK+NsYr1PvLHOWfvaGX+5Cwi Gel9xlkoamwON60+iT+43idmRNK1rueMZxqYSx78= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, marc.c.dionne@gmail.com, Srikar Dronamraju , Michael Ellerman Subject: [PATCH 5.10 64/67] powerpc/pseries: Fix regression while building external modules Date: Mon, 2 Aug 2021 15:45:27 +0200 Message-Id: <20210802134341.236286250@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srikar Dronamraju commit 333cf507465fbebb3727f5b53e77538467df312a upstream. With commit c9f3401313a5 ("powerpc: Always enable queued spinlocks for 64s, disable for others") CONFIG_PPC_QUEUED_SPINLOCKS is always enabled on ppc64le, external modules that use spinlock APIs are failing. ERROR: modpost: GPL-incompatible module XXX.ko uses GPL-only symbol 'shared_processor' Before the above commit, modules were able to build without any issues. Also this problem is not seen on other architectures. This problem can be workaround if CONFIG_UNINLINE_SPIN_UNLOCK is enabled in the config. However CONFIG_UNINLINE_SPIN_UNLOCK is not enabled by default and only enabled in certain conditions like CONFIG_DEBUG_SPINLOCKS is set in the kernel config. #include spinlock_t spLock; static int __init spinlock_test_init(void) { spin_lock_init(&spLock); spin_lock(&spLock); spin_unlock(&spLock); return 0; } static void __exit spinlock_test_exit(void) { printk("spinlock_test unloaded\n"); } module_init(spinlock_test_init); module_exit(spinlock_test_exit); MODULE_DESCRIPTION ("spinlock_test"); MODULE_LICENSE ("non-GPL"); MODULE_AUTHOR ("Srikar Dronamraju"); Given that spin locks are one of the basic facilities for module code, this effectively makes it impossible to build/load almost any non GPL modules on ppc64le. This was first reported at https://github.com/openzfs/zfs/issues/11172 Currently shared_processor is exported as GPL only symbol. Fix this for parity with other architectures by exposing shared_processor to non-GPL modules too. Fixes: 14c73bd344da ("powerpc/vcpu: Assume dedicated processors as non-preempt") Cc: stable@vger.kernel.org # v5.5+ Reported-by: marc.c.dionne@gmail.com Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210729060449.292780-1-srikar@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/pseries/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -76,7 +76,7 @@ #include "../../../../drivers/pci/pci.h" DEFINE_STATIC_KEY_FALSE(shared_processor); -EXPORT_SYMBOL_GPL(shared_processor); +EXPORT_SYMBOL(shared_processor); int CMO_PrPSP = -1; int CMO_SecPSP = -1;