Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3289685pxk; Mon, 21 Sep 2020 09:48:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSjq6XqpKg81zfBS4D5oEoa/rKJPL/QUmLs3LvLk+6nJpnwg9DC2PIv3DZSoQZST22i56v X-Received: by 2002:aa7:c7c2:: with SMTP id o2mr580830eds.366.1600706899027; Mon, 21 Sep 2020 09:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706899; cv=none; d=google.com; s=arc-20160816; b=1JsdweX4SXxomvW6gMxTGP0m4NP23g5wl1GYrr/+LhEv+uVAmM7txTTP6483Gbo4qB Pi6fyR39HWkun2s3OME70UrMFctQPIjFDzKYj7H9Pva80X6cWbK22jlbfZ3IG/cujga1 f+nKmyU192EeUlRJ9Fy8MeKlmknxMbdDHmV+3oZWDEt85Og0ZVo4hqCrEfJXAdzfVmVa GDvjGV46+IrsZ1iVZuOeVdFnsizGY7FKz0AM4CyZ9x/4qX0QVbPsA82kHR8zBgqkRz1v qDAWJ8gzKiMnYvY7D2rYQ0Ezpl0LeYigqzG4a6kQNkvDFHZXGoh1o8J5AYhjRqPuygT/ f2gA== 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=aJ1ffwj+f8SxnUtTtshSwy5XZAv/Nb3c4Y0+sEFHM9M=; b=xikGyKMMtEP3yePi0Xrr2aY2Z1L26IrkclcxxkuLl0l/pO1XObOAJ8hW63gET9mYE/ Len4K3ED44K5NHveGwKMhK6F/izewQZl+3abE2HatZVxC8lHpubUSIOKFEEHr1JkbwJ3 ua/8G2icLSECyTAC2G/wCh6vrmUIY/QDqehCdbR3x1M7nUtgwDX9aszatuEV0cxYkELy lMWaPbgNjM1Y1ACAUt/4iS+utKJsVNCWkju2jwBem85YsD0Y8vJsUZ2MfXsV7UjciVAf P2gvmK7F86mP5YoRhnD9LImDbOXsNoMh1C506OGwHuN+2ZKxdZm25oOdQSN4xSFUOdub tvuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jRIFqpvg; 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=fail (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 p2si8618857ejw.176.2020.09.21.09.47.55; Mon, 21 Sep 2020 09:48:19 -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=@kernel.org header.s=default header.b=jRIFqpvg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728834AbgIUQo4 (ORCPT + 99 others); Mon, 21 Sep 2020 12:44:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:50280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729466AbgIUQop (ORCPT ); Mon, 21 Sep 2020 12:44:45 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 611ED23998; Mon, 21 Sep 2020 16:44:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706684; bh=R7mR3aLIf2CGGcWqGZaqKCMfrWa7L3YNwpWo4rPGCRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jRIFqpvgohnZdxqesm1/75AEisWee6FAgkhH2lith647BHc4HDqbeBgnAfbcBTi9/ EsvwTjlcN4m4ZlAJbVgUePCNpAcjUKGdNW7KkABtfqxFfNeeO88TU2/w0gYmq7rqFl uQhaRiXMeyYoTpTQQx94jcyvbXHRLa8VApVH7egs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stafford Horne , Sasha Levin Subject: [PATCH 5.8 025/118] openrisc: Fix cache API compile issue when not inlining Date: Mon, 21 Sep 2020 18:27:17 +0200 Message-Id: <20200921162037.477621501@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@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: Stafford Horne [ Upstream commit 3ae90d764093dfcd6ab8ab6875377302892c87d4 ] I found this when compiling a kbuild random config with GCC 11. The config enables CONFIG_DEBUG_SECTION_MISMATCH, which sets CFLAGS -fno-inline-functions-called-once. This causes the call to cache_loop in cache.c to not be inlined causing the below compile error. In file included from arch/openrisc/mm/cache.c:13: arch/openrisc/mm/cache.c: In function 'cache_loop': ./arch/openrisc/include/asm/spr.h:16:27: warning: 'asm' operand 0 probably does not match constraints 16 | #define mtspr(_spr, _val) __asm__ __volatile__ ( \ | ^~~~~~~ arch/openrisc/mm/cache.c:25:3: note: in expansion of macro 'mtspr' 25 | mtspr(reg, line); | ^~~~~ ./arch/openrisc/include/asm/spr.h:16:27: error: impossible constraint in 'asm' 16 | #define mtspr(_spr, _val) __asm__ __volatile__ ( \ | ^~~~~~~ arch/openrisc/mm/cache.c:25:3: note: in expansion of macro 'mtspr' 25 | mtspr(reg, line); | ^~~~~ make[1]: *** [scripts/Makefile.build:283: arch/openrisc/mm/cache.o] Error 1 The asm constraint "K" requires a immediate constant argument to mtspr, however because of no inlining a register argument is passed causing a failure. Fix this by using __always_inline. Link: https://lore.kernel.org/lkml/202008200453.ohnhqkjQ%25lkp@intel.com/ Signed-off-by: Stafford Horne Signed-off-by: Sasha Levin --- arch/openrisc/mm/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/mm/cache.c b/arch/openrisc/mm/cache.c index 08f56af387ac4..534a52ec5e667 100644 --- a/arch/openrisc/mm/cache.c +++ b/arch/openrisc/mm/cache.c @@ -16,7 +16,7 @@ #include #include -static void cache_loop(struct page *page, const unsigned int reg) +static __always_inline void cache_loop(struct page *page, const unsigned int reg) { unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT; unsigned long line = paddr & ~(L1_CACHE_BYTES - 1); -- 2.25.1