Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp630633pxb; Tue, 2 Feb 2021 13:45:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9oSYYFW5aztP/XC5z35rr2y2rIR8hwQatxZ2DpY1iL2T2MWypqloysvzxmSfOXWgEU6E+ X-Received: by 2002:a17:906:a453:: with SMTP id cb19mr4824ejb.459.1612302335413; Tue, 02 Feb 2021 13:45:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612302335; cv=none; d=google.com; s=arc-20160816; b=IO4MoMrA2mD+WzCDqWLrZTjmK9pf8ShTo4xkGzv3UFo68BaQNlVAOhRWgtLrtAFt9J Ik0Yk9E8g2xOa7PGYrl4vzu7GNlvWoRqzO/+dGzoB7wHKMgg8S0F46gxgMEF0JfqI0m3 YtdcDTmKP1fak75Nzib2Lzbm4U3UTbPg6J+2OmpyPLpc3oeYUPXayUF7+VInPv+dCkBW Oi+EOEiqWKaRZcrNF6LdHAPkq7Jl859iGa+w6j8wALF3ArpodtuSosqF1EunPlXz3gfv xZJhDTHuxdgAZu0cC45VOVvw/qvfFFHgXJ25HjrlReoukMZleFgwHwJIoIZ4WJ7jTteI 2N/w== 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=lwIpS3urNRyfu7lRBaGvZrL2eM1WM18FqcKUKocphig=; b=Nj4teqkG7HMTwjT0ubcxTwkANqdfgr7FI1SmlsIBGv7xLMTN7OBShQMRQEEKZJwTbP 2YIHLBN3HBEqefACX49aXleyIcm541U+e6HpWINZ5PdG/YacU4wRBSpO1mCHoyr/dAt8 PYzsS1f4I+yjJiPu4gvMGEKMk6mtHcs0PrlHMn7ZZwsdYVB9V2/iZlju1NHTiLgd1fLU DHFOLzU+wPcG16EvauCsxD8mXUwwJ+eTCShibAkjPYfmsMlVR0058wWDEiiCmj4T/lq/ jNREQYupYnX1Ln0/0hkJrxiDzFsB2NXDloqZbbyEgmA/FmXBlEQDxozE2yvr7T7w2OxA xuUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gMFQucVg; 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 u5si42651ejz.642.2021.02.02.13.45.10; Tue, 02 Feb 2021 13:45:35 -0800 (PST) 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=gMFQucVg; 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 S232896AbhBBNuQ (ORCPT + 99 others); Tue, 2 Feb 2021 08:50:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:36436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232901AbhBBNpR (ORCPT ); Tue, 2 Feb 2021 08:45:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 356DF64F82; Tue, 2 Feb 2021 13:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273261; bh=Dvsl/32IFynrdpNXOB9tFdLLblMnLI4/AWVR4cM7Ojk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gMFQucVgYpV8mTeGxhiVYqRe11Xx3nOkxhFl/Umu4QsCV52jxU6wj/LOOdd1LIiYX ipgYMsdSgPlqIY/smS0szOYiC1+4ytmOSbCdyXW9Pnub5Dlc4+5rp/YpZWjj/8AnU1 DqC2Tj+kXk+tQJqviJAKhNc9c8NCs0Ro19w/P2X8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller , kernel test robot Subject: [PATCH 5.10 009/142] parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES Date: Tue, 2 Feb 2021 14:36:12 +0100 Message-Id: <20210202132958.084717417@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@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: Helge Deller commit 00e35f2b0e8acb88d4e1aa96ff0490e3bfe46580 upstream. When building a kernel without module support, the CONFIG_MLONGCALL option needs to be enabled in order to reach symbols which are outside of a 22-bit branch. This patch changes the autodetection in the Kconfig script to always enable CONFIG_MLONGCALL when modules are disabled and uses a far call to preempt_schedule_irq() in intr_do_preempt() to reach the symbol in all cases. Signed-off-by: Helge Deller Reported-by: kernel test robot Cc: stable@vger.kernel.org # v5.6+ Signed-off-by: Greg Kroah-Hartman --- arch/parisc/Kconfig | 5 ++--- arch/parisc/kernel/entry.S | 13 ++++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -202,9 +202,8 @@ config PREFETCH depends on PA8X00 || PA7200 config MLONGCALLS - bool "Enable the -mlong-calls compiler option for big kernels" - default y if !MODULES || UBSAN || FTRACE - default n + def_bool y if !MODULES || UBSAN || FTRACE + bool "Enable the -mlong-calls compiler option for big kernels" if MODULES && !UBSAN && !FTRACE depends on PA8X00 help If you configure the kernel to include many drivers built-in instead --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -997,10 +997,17 @@ intr_do_preempt: bb,<,n %r20, 31 - PSW_SM_I, intr_restore nop + /* ssm PSW_SM_I done later in intr_restore */ +#ifdef CONFIG_MLONGCALLS + ldil L%intr_restore, %r2 + load32 preempt_schedule_irq, %r1 + bv %r0(%r1) + ldo R%intr_restore(%r2), %r2 +#else + ldil L%intr_restore, %r1 BL preempt_schedule_irq, %r2 - nop - - b,n intr_restore /* ssm PSW_SM_I done by intr_restore */ + ldo R%intr_restore(%r1), %r2 +#endif #endif /* CONFIG_PREEMPTION */ /*