Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1871053ybn; Thu, 26 Sep 2019 03:31:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiZTDJsCXuxXERkfLXSOh4vSjcXalMDC2EJV3MK2MK7jnciaZE8ofVGznVqFiGeUFqGNij X-Received: by 2002:a17:906:1310:: with SMTP id w16mr2319607ejb.73.1569493890889; Thu, 26 Sep 2019 03:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569493890; cv=none; d=google.com; s=arc-20160816; b=e0v1uWIVI3zfpvh3vQKt7gu+EeXyKc5fsoQqzHBK+p9ctoiRvIQegs4u5fl2C526Qd cpzV61MGRPRWnnAPg3mWybs2z7h+IyIYcAm36y2u65e0asdBRECFcVgwzh8Fgyk19Z4p SFC0HOANDQr5ud2PaoEHVSxeSLEXJwoz0PNpjyTgXG5eUelkhzMB1s3v4tvvIhXO2Vu+ 4O6oKFDmMA41Lka0LXeso3873fpVb0ZR5vprFZozubt775giCBAaqPxHF5s0PatGn7MG HPXtCqk3JthaCIrTobIBS6ZeSDhdHVTHq6KNNTg3sK7LlF6OjIImYpcHpsW9uQm/UGeK iEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=RPMMLIKhdvSN9Rtma03dGx5Z7enfjavMewQMgMSrVlI=; b=z6AgfHnyw78L9TTn4WFl3kMVRW//vBwVn6nlHeuNO7NARRN97OBRfYcnWZieJ1ADcU 3PfgfdZXvpFJ6aoV3Rh5Tubc64E7gl2QaXnqKrE1Sa++4TJYSQdcA0KtTFhWHkRKIguB uTpO3vwqtMrraI5PzmVmM8jW7Oh9TlVQCJViXytrF5SSjs4zNCkgL5iN3gGy1gmH5Lka 86kRM/QquuNSqvoTKHSXWGDofgqsYUNrEpvQGlp3FXUVNNwdieiMgYuaG6fl8YTdWaEh q+dgEr+2oQdjoqPhtFQBjgYexGEisZqtNDu3xFHZgkJzHh+ppZX2z8yOhCXBhWD4AzEO eeFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=uDsSL2xT; 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 b19si799540ejj.83.2019.09.26.03.31.07; Thu, 26 Sep 2019 03:31:30 -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=@nifty.com header.s=dec2015msa header.b=uDsSL2xT; 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 S1729145AbfIZJDF (ORCPT + 99 others); Thu, 26 Sep 2019 05:03:05 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:16644 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbfIZJDF (ORCPT ); Thu, 26 Sep 2019 05:03:05 -0400 Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x8Q92r8Z002357; Thu, 26 Sep 2019 18:02:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x8Q92r8Z002357 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1569488574; bh=RPMMLIKhdvSN9Rtma03dGx5Z7enfjavMewQMgMSrVlI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uDsSL2xTh9ZRIJgTmBe7HeabKc3vA6j0D4+zJoERBMKAUMBD5S1xn2VnKCOc5N5QB pIanmIt8O6o6o0L6kPNHQCiQqOw5KQ/BYvopCQ2BjsFj4Rgkg7aOmd8IheFZDIR5GK KAFaRtOMXLloTM603aQAltsX33Hm8bigv0SYt1P5GSkGVCbsf3f1mbFOP1sHw7EA90 2QzBwVvRKmcTvFepNB9XVyuHgk7CXzM9IgCwNAmrFgJgqQCinpgiuAJgZaCf5IKqhF Wcl56BmZXMMBjfKuSln9cRhkwIELELirtifCFpCXJnil49TdwrFnuVE2GgblbAiF3Z Lb25tDlWOxCKQ== X-Nifty-SrcIP: [209.85.217.51] Received: by mail-vs1-f51.google.com with SMTP id p13so1114661vso.0; Thu, 26 Sep 2019 02:02:53 -0700 (PDT) X-Gm-Message-State: APjAAAVTNvYpAwHhQEEDDXbZ3zgDCJ6qAFF/QMQCq0o8hOytU2jTJyXL mNbYNwrrcwIEURhY1p7ItN4OxlANH6qSELlBakA= X-Received: by 2002:a67:ec09:: with SMTP id d9mr1095111vso.215.1569488572806; Thu, 26 Sep 2019 02:02:52 -0700 (PDT) MIME-Version: 1.0 References: <20190830034304.24259-1-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Thu, 26 Sep 2019 18:02:16 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Geert Uytterhoeven Cc: Andrew Morton , Ingo Molnar , Borislav Petkov , Linus Torvalds , Nick Desaulniers , Miguel Ojeda , linux-arch , Linux Kernel Mailing List , noreply@ellerman.id.au Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Thu, Sep 26, 2019 at 5:54 PM Geert Uytterhoeven wrote: > > Hi Yamada-san, > > On Fri, Aug 30, 2019 at 5:44 AM Masahiro Yamada > wrote: > > Commit 9012d011660e ("compiler: allow all arches to enable > > CONFIG_OPTIMIZE_INLINING") allowed all architectures to enable > > this option. A couple of build errors were reported by randconfig, > > but all of them have been ironed out. > > > > Towards the goal of removing CONFIG_OPTIMIZE_INLINING entirely > > (and it will simplify the 'inline' macro in compiler_types.h), > > this commit changes it to always-on option. Going forward, the > > compiler will always be allowed to not inline functions marked > > 'inline'. > > > > This is not a problem for x86 since it has been long used by > > arch/x86/configs/{x86_64,i386}_defconfig. > > > > I am keeping the config option just in case any problem crops up for > > other architectures. > > > > The code clean-up will be done after confirming this is solid. > > > > Signed-off-by: Masahiro Yamada > > This breaks compiling drivers/video/fbdev/c2p*, as the functions in > drivers/video/fbdev/c2p_core.h are no longer inlined, leading to calls > to the non-existent function c2p_unsupported(), as reported by KISSKB: > > On Thu, Sep 26, 2019 at 5:02 AM wrote: > > FAILED linux-next/m68k-defconfig/m68k Thu Sep 26, 12:58 > > > > http://kisskb.ellerman.id.au/kisskb/buildresult/13973194/ > > > > Commit: Add linux-next specific files for 20190925 > > d47175169c28eedd2cc2ab8c01f38764cb0269cc > > Compiler: m68k-linux-gcc (GCC) 4.6.3 / GNU ld (GNU Binutils) 2.22 > > > > Possible errors > > --------------- > > > > c2p_planar.c:(.text+0xd6): undefined reference to `c2p_unsupported' > > c2p_planar.c:(.text+0x1dc): undefined reference to `c2p_unsupported' > > c2p_iplan2.c:(.text+0xc4): undefined reference to `c2p_unsupported' > > c2p_iplan2.c:(.text+0x150): undefined reference to `c2p_unsupported' > > make[1]: *** [Makefile:1074: vmlinux] Error 1 > > make: *** [Makefile:179: sub-make] Error 2 > > I managed to reproduce this with gcc version 8.3.0 (Ubuntu > 8.3.0-6ubuntu1~18.04.1) , and bisected the failure to commit > 025f072e5823947c ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") . > > Marking the functions __always_inline instead of inline fixes that. > Shall I send a patch to do that? Yes, please. But you do not need to touch _transp() or comp(). Only functions that call c2p_unsupported(). BTW, c2p_unsupported() can be replaced with BUILD_BUG(). This will break the build earlier in case it cannot be optimized out. -- Best Regards Masahiro Yamada