Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1873642ybn; Thu, 26 Sep 2019 03:33:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1KbzZgrteGc61nvF7v3m91ZLmXSLwuhXAXq6t3Ic59221qE7R/zuBRRx8mSppVBezAmQa X-Received: by 2002:a17:906:c787:: with SMTP id cw7mr2408919ejb.34.1569494032274; Thu, 26 Sep 2019 03:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569494032; cv=none; d=google.com; s=arc-20160816; b=u0IpPpKbPjp8JrEXQEf6bz3RgJ8hvQZdl2EOhkU3Ne7DJWUghakzgizBcTRNlMjTyj +HPoLnvXNBWPqxgVgWhAx1xeTg8ihYeT5RaycMDR2X/rtqNl9CLWqnobKL9b47I/z8+i Rg76Ii4+7VMecRzdGt/qeHQB2H/jLmpd3hSD/R0BjJyux9qjDKfQ0/lve1jW8X3aPh5U ew1VTFndW6VlRwk/e7ScJBVv/5qp5rVs5OigRmmpWC43ecmkQTd/tT55KhdWyeffz/mb XXsasF/Eg5mtblUfRWinRVNn6BM3b8QCyeRMSD3a8xJXl3yoDDe1qd+N9Y0DOVFIL07A fnjg== 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; bh=igPjA35ZmLEPbqljRL7Ddj7a9tyDEasITq8WKXbH8wc=; b=LqvL36kaUg925cqmAsHnwTay8OtPjQQIAB2kncycegmPKf9xjMebcYnE2vJ59N4ol4 hD6oQ47JcuZqBgQ+EQxuzNgtpitCvkfZM0RSE1moxqbPS+ieCOCyF2FI1efJJ5Zzo9PT Nu/EdJ/oKXOfLc4ohMjENs5lvqAvDSGxrgUBf7oSU8QJUd//825BFfRmzdS545ALdI+e 4g8LiZrUOSYdZb5CFJT//ZpE7mguf0PxtwZoIYLP0tFxQpBcdofzQpy20d0gOREYQrTg gghKEGS1hEPBkPMBRo6SoJhJpn/obafMJUUp6LDVGiURG8QwBgsl7dmqbY7KClgs++YL c+Ug== ARC-Authentication-Results: i=1; mx.google.com; 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 c36si1039563ede.323.2019.09.26.03.33.28; Thu, 26 Sep 2019 03:33:52 -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; 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 S1726866AbfIZJ06 (ORCPT + 99 others); Thu, 26 Sep 2019 05:26:58 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:42137 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbfIZJ06 (ORCPT ); Thu, 26 Sep 2019 05:26:58 -0400 Received: by mail-oi1-f194.google.com with SMTP id i185so1462846oif.9; Thu, 26 Sep 2019 02:26:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=igPjA35ZmLEPbqljRL7Ddj7a9tyDEasITq8WKXbH8wc=; b=sKbFvtjcmh02XM4JWty8zTFcdBXal/tQMJaN4DXaeVUEZXlA+JNWi8IzanA4fDHUMk 7mSWb7KvCaXKxc9jJI2OLLqL41YU5xT8vmI0Szozrj5TW9Yo21e6OYS/LuPCXcwhYwuk ZG8KbM+B0SNdh0iv/2Sonw9HrqELVNYjEGX+kXmLY0D+JOOquLPfLjLdDVSj7okFZ3RK r0U3MaHgYnWNdvUvp/Hk+FtwDxY7GrvsBwTlu0OCZ2OWv7j9xEAmzFXxxd6Iw/Mg25Ih CpbI4XEkRPTJ7WY9WYBHscBRdmrv8dYL4DD51NyG6AoI+YhfhNkAM2RQfybhfkyQ4POB 5MbQ== X-Gm-Message-State: APjAAAXSoul7qYgSLEm1SRcqRHy89CefU0TBRMnVBw+ckokB1Jp5bAmU /Sp8e87RPoiAHKwb50C8Jh+L/IKHwidC50NwphU= X-Received: by 2002:aca:dad4:: with SMTP id r203mr1908355oig.102.1569490017367; Thu, 26 Sep 2019 02:26:57 -0700 (PDT) MIME-Version: 1.0 References: <20190830034304.24259-1-yamada.masahiro@socionext.com> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 26 Sep 2019 11:26:46 +0200 Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Masahiro Yamada Cc: Andrew Morton , Ingo Molnar , Borislav Petkov , Linus Torvalds , Nick Desaulniers , Miguel Ojeda , linux-arch , Linux Kernel Mailing List 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 Yamada-san, On Thu, Sep 26, 2019 at 11:03 AM Masahiro Yamada wrote: > On Thu, Sep 26, 2019 at 5:54 PM Geert Uytterhoeven wrote: > > 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. OK, will do. > But you do not need to touch _transp() or comp(). > Only functions that call c2p_unsupported(). However, the inlining of these functions is very performance-sensitive too. So perhaps I should mark all of them __always_inline? > BTW, c2p_unsupported() can be replaced with BUILD_BUG(). > This will break the build earlier in case > it cannot be optimized out. Right. Will do, too. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds