Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3295467pxk; Mon, 21 Sep 2020 09:56:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT7R+PxP8ezitNzY1TxS2A7o7jH8GDk1wwdZyrnplskWXEm1WSVrSNp2VPtG9KQauWoJC5 X-Received: by 2002:a17:906:d182:: with SMTP id c2mr382023ejz.378.1600707404827; Mon, 21 Sep 2020 09:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707404; cv=none; d=google.com; s=arc-20160816; b=LfbFpZPss3s/8MXBQLn7G+v9m6JdY04ZnqXWEIXxLb1JwIQQGs7i1MGNTCNKVVE3yk HcKoT/vFdXXfGmzE7fvMEg4XA9X3tRkTM01aGdSWR7a4m0L9ymL2XqFPeh3NlAIoZaWG 9hxUEzCiPIdi75SA0l8JMA9Gv1nGIMMsj0wL5+L0HRTqq29PDHkLNGF0kCqEQ/3rMvv6 clQRKVipx0QAfDg3aZSwqVM+Xo7sXZ/00Gf9AGtyhjC8wGijG/Jd3czAPCFAoZiFJZuw TgVX75zx9X1OKFYY84WmDHCIakjyrqGLNm30IvLL1OhKlA+3Uhy9nfnLpjpi1ibYpwmT QgpA== 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=eXOarG6cYLCeYo9CxqlbPdzKuv/Ql2Z/hWRVTT80HzeW6ScbS2Aa2Oj8VKzf0ClZH/ QNn2SsAHE+sHuRVo7++7Ri5UQleu8/cUuNAHpmEKR7tfsgkAesoSNFPuI7TDBwpAh6ur lF6Z6YcS1FWR+Np5WWC4LjwLFNksHQaCY8CZhK7aYI8iUZPAmOl4BHWKK43YHgEvkPvf nL9tvLhtY/azfZyRgT1vtJ717XNUyLIu5HBGI7anUlKhobGvyHjlf1Ie1NHuQcEuRNLI Pybqk+T/OOOKR27QlyILePW8odWpY8C9IBRyeqG9TpYelM5QlVNmlkDr+tGCshgUhqeH l/Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="iTN3x/5m"; 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 p25si8273150ejw.682.2020.09.21.09.56.20; Mon, 21 Sep 2020 09:56:44 -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="iTN3x/5m"; 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 S1730150AbgIUQxX (ORCPT + 99 others); Mon, 21 Sep 2020 12:53:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:55580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729821AbgIUQsO (ORCPT ); Mon, 21 Sep 2020 12:48:14 -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 7584120874; Mon, 21 Sep 2020 16:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706893; bh=R7mR3aLIf2CGGcWqGZaqKCMfrWa7L3YNwpWo4rPGCRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTN3x/5mnkkiBLJZNO22+HD1G6G5FyQ7gCl06uOk7YO9RCwpS4Hzo60L+V5yFSKuq ihyCNA1zmuhlhixGBHgSI5ioXrBLy0cha/eHBYLkO1hSCfDZUzq8qewg1XUnaWPYBI wICgryI23NnvvthgmJ/oxHoizI3oD/fBibfcevcQ= 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.4 18/72] openrisc: Fix cache API compile issue when not inlining Date: Mon, 21 Sep 2020 18:30:57 +0200 Message-Id: <20200921163122.740158534@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921163121.870386357@linuxfoundation.org> References: <20200921163121.870386357@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