Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3053986ybi; Tue, 2 Jul 2019 01:13:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8Sh7mRzHO1yUTUhrAsDFzcKZ4Bz7eX80Mc9e5hT3NsNosDKJQw+kIQcQ3de/KNDe2POSE X-Received: by 2002:a17:902:8548:: with SMTP id d8mr25558492plo.100.1562055216601; Tue, 02 Jul 2019 01:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562055216; cv=none; d=google.com; s=arc-20160816; b=YrVM3igz4CWhjZwo/91p+5DXc9uafhA9G5rYf/YhahwAdjaba5aa2hBiiYp2kgBe2R OA7E02JeQQhUa9uYp4LgqDIGx1BMW+kchiOUyKvwtUio21mlupQbEc6DSoN4CrsIfZuF 2DrrgcYlss6EO/7Dm9bjKz0gr9vOdyRP4Rbn2xWuO3Nhe+0ZHJQJ2UwRONT9KNBqgRsh NALpU2DJbAS1M5POxt4kIrfTFeD6KbNfo5G2r9D2Gz0REcPeH0A3ha2tWY596zTHsGuR J79AtZNeNmWiCSzx8S+jpM0hV0KVxz+s1+vjebSBQoiJNFJQvndCAx9lTU1LKW93AhNh 3piA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CNVhyQlQcq/yyPgJGez5rLQQsOGMjHYAZgZlOBEdUVk=; b=XCZC4kaONscGERt0DzMriG/Hqd6XNO4W2ANg90dMko6cf34B+2GY0MnAwxxmVtp8DI c/VyPcwBgJCon2yAxWQHXWQEoI6ozbleTULT9RI5So7Kpw96SKXRXmgNe2Whz9zcAiOM aPbdCrHCsmlUYcyx4aDffoX4rCv9oAe5HKt/1zaZYYoiw7Rj0pLKvwYzYUyF3ZC2+2yf 6xdMe/lCwzHW539xJQu0aRUlbdMzwSJhnaw2hvHhhe8NXrxFn4xYd3SQXn5BQ0s6MwvO abXiEV0ZDqIMZi3yycJ7VP2knpCDCsZY3ey9/1ImSFZq52P2KCkbpsS0r9usMStYgY8S xr+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aOQv3b1a; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78si13639060pfz.268.2019.07.02.01.13.22; Tue, 02 Jul 2019 01:13:36 -0700 (PDT) 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=@kernel.org header.s=default header.b=aOQv3b1a; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727997AbfGBIJI (ORCPT + 99 others); Tue, 2 Jul 2019 04:09:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:56886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728584AbfGBIJH (ORCPT ); Tue, 2 Jul 2019 04:09:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 E3DEE21841; Tue, 2 Jul 2019 08:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562054946; bh=Gogcx/1vaGK690MCbJwyIJqczVI5Jlg8frPHqYOFL+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aOQv3b1ak8JqYzJwuD5ySLbNylA7avLZudWtXMA4b81j+PoAIXaJfmO30pS84WRB7 OUpqYB+LcapMICp8Y9xeo4mJYCXLnuEd05f8yeZc5y1jBaFcLaBVAx264T9PVLppLW jDsggG/PSMHJ8CBF4uPppmcoMSOY9zcZ7EeYervM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Sasha Levin , Tony Battersby Subject: [PATCH 4.14 15/43] Revert "compiler.h: update definition of unreachable()" Date: Tue, 2 Jul 2019 10:01:55 +0200 Message-Id: <20190702080124.581588183@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190702080123.904399496@linuxfoundation.org> References: <20190702080123.904399496@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 82017e26e51596ee577171a33f357377ec6513b5, which is upstream commit fe0640eb30b7da261ae84d252ed9ed3c7e68dfd8. On Fri, Jun 28, 2019 at 8:53 AM Tony Battersby wrote: > > Old versions of gcc cannot compile 4.14 since 4.14.113: > > ./include/asm-generic/fixmap.h:37: error: implicit declaration of function ‘__builtin_unreachable’ > > The stable commit that caused the problem is 82017e26e515 ("compiler.h: > update definition of unreachable()") (upstream commit fe0640eb30b7). > Reverting the commit fixes the problem. > > Kernel 4.17 dropped support for older versions of gcc in upstream commit > cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). This > was not backported to 4.14 since that would go against the stable kernel > rules. > > Upstream commit 815f0ddb346c ("include/linux/compiler*.h: make > compiler-*.h mutually exclusive") was a fix for cafa0010cd51. This was > not backported to 4.14. > > Upstream commit fe0640eb30b7 ("compiler.h: update definition of > unreachable()") was a fix for 815f0ddb346c. This is the commit that was > backported to 4.14. But it only fixed a problem introduced in the other > commits, and without those commits, it ends up introducing a problem > instead of fixing one. So I recommend reverting that patch in 4.14, > which will enable old gcc to compile 4.14 again. If I understand > correctly, I believe that clang will still be able to compile 4.14 with > the patch reverted, although I haven't tried to compile with clang. > > The problematic commit is not present in 4.9.x, 4.4.x, 3.18.x, or 3.16.x. CC: Nick Desaulniers CC: Tony Battersby , Signed-off-by: Sasha Levin --- include/linux/compiler.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 67c3934fb9ed..a704d032713b 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -119,10 +119,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, # define ASM_UNREACHABLE #endif #ifndef unreachable -# define unreachable() do { \ - annotate_unreachable(); \ - __builtin_unreachable(); \ -} while (0) +# define unreachable() do { annotate_reachable(); do { } while (1); } while (0) #endif /* -- 2.20.1