Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp326025ybn; Tue, 1 Oct 2019 21:53:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjquOg2rjj7ltRPVG6UZJn39CU6hbaD3fu0NsVBunj94CDNbss+x8EEUf8wvorssct5iZ3 X-Received: by 2002:a17:906:6805:: with SMTP id k5mr1423222ejr.50.1569992013388; Tue, 01 Oct 2019 21:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569992013; cv=none; d=google.com; s=arc-20160816; b=HEjGGqNL/dQte/gWvuviaHBUBHCTWoiIVW6CCDCWjTxPDP9LVRl5Ez/gNE3IR75v2i Q/yJMTt8CeyYHXnzp5DIANrAy9xdrMW9xIAcCOn4uExvDFU0+sQI8wYKvf1I9jmq7ttJ YB4Ib1yo5EhNVRuMm+CrRo5padla+nsEzNT+ESwwoaCn0L3ucFOVgcIlqa6zGTHVAF8k qo1RWGVDCDlmnNla2jZILeBsp7XeNgbij/26jO4+tGBkzy/N6P1YHd6HbUMSaBIpW84u JKeFDQRlICcOqNnSQDhYnCSqSQrFjV1DpGq0bjLtcm43xy0KHnbqoKGH0j6JjhCjty0z /7Eg== 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; bh=m9L27m8MsIoj3QMvk1OHmCkQODcTde/pPqDz59ZpNOo=; b=0yYM9ngNMDflwLxhnnqD9bnjWL6kB3MraIrZCVxce8riSwci+/oDy5T08jvF1EA7ZW Q0Z3JGNs6iya1pRCDLShycuV9Bg1W7gVxl1JGZb33In1k/RZz3LsHeJW1kE8on4i0xaV omwxMIe0ithkaMKmIkAiyu2d5oNLWlp3paqsk+2cV6IGq4NVlWv4q2wmNTbI9Pwt1fuY fjbf6HUZxtc+14nEweDnW4CZ+AMHPukJKpnQTKujDc4nBbRKpkLQ+RkdQZNINZjR89/g yodDH0iDWCAuoH2GztmUMnWijtIU7+jlzJozMEIBZRmLvrTOgx9KwVWvXXQPETkQleTj 2bgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YXMTzPqY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si10206181edo.172.2019.10.01.21.53.09; Tue, 01 Oct 2019 21:53:33 -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=@gmail.com header.s=20161025 header.b=YXMTzPqY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727510AbfJAVGc (ORCPT + 99 others); Tue, 1 Oct 2019 17:06:32 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42552 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726097AbfJAVGc (ORCPT ); Tue, 1 Oct 2019 17:06:32 -0400 Received: by mail-lj1-f193.google.com with SMTP id y23so14855047lje.9; Tue, 01 Oct 2019 14:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m9L27m8MsIoj3QMvk1OHmCkQODcTde/pPqDz59ZpNOo=; b=YXMTzPqYi2F6GPiJPok4ntRFtf+wtxTRc+vx2Q5VpFju2r4XEHLeQEUXt2wp5Bx8jr NUDD/P3jnTe/vkgNwsf0EeLEvfy7bAo+W6cQAuwuB/+xTUyH//f8tfEx5Z8D0CrDR4tJ LLyjpQoCF2v+bQwcVG06RtUrDYqUTkkji6A2ikG11BnsfvXQ6usFBQEqs3enMbTT+/8V o/ick0nxVayCnmbd0DDXZL3sbNG7hX1IkC4EGwDuZIFg2as7HRMxLLsj5ile6bs4vRDJ MqCSZhBkYmIjh67N4pAvZIr5HJkRJTtVi6mRQ+hR7tMDBJU/08/MhyyEOIVP8iWmhVFG iWUg== 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=m9L27m8MsIoj3QMvk1OHmCkQODcTde/pPqDz59ZpNOo=; b=MQJBjnVqvQvKpJWO9L1E5QGsoF3qqrXrhgH7/Uh8dF2edliNzPIV5JBvLIKCcCCw/U XJjDMB5nTgGFUH+PmmJki7udEnD190vJR3DNLFq2QpUlIbkD9ala0KcASEih6vhUSfaF ugIFcK6E54lqpImmUymr2+5xjom0igkuroLRNiVyzmpPhzhm0UXcVJymmfZWznpeYgwT ahgKsn4qpNm3r1GnJnai/XTrUgZMBTWM5/4iomcgAlUm7qNcnVvGTl04gXtCQOIXYIpC mWz5G2C8Nz5hQ48P6lQqhlE/FtVcAD9UOqOAwyR4Vm7fk3nqFz5PfK5agm08fjlpzdF6 Tr5w== X-Gm-Message-State: APjAAAWDaTnJMTMb/m5XKFzJHEBXoD3J6Cz3FSsyw9jv98IrqpK++9iX l8J7pKhjashiBkh1k9tD9ecb2gelIK9SQ1XfIjE= X-Received: by 2002:a2e:4704:: with SMTP id u4mr16942430lja.203.1569963989972; Tue, 01 Oct 2019 14:06:29 -0700 (PDT) MIME-Version: 1.0 References: <20190930112636.vx2qxo4hdysvxibl@willie-the-truck> <20190930121803.n34i63scet2ec7ll@willie-the-truck> <20191001092823.z4zhlbwvtwnlotwc@willie-the-truck> <20191001170142.x66orounxuln7zs3@willie-the-truck> <20191001175512.GK25745@shell.armlinux.org.uk> <20191001181438.GL25745@shell.armlinux.org.uk> In-Reply-To: From: Miguel Ojeda Date: Tue, 1 Oct 2019 23:06:18 +0200 Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Arnd Bergmann Cc: Nick Desaulniers , Russell King - ARM Linux admin , Will Deacon , Masahiro Yamada , Linus Torvalds , Nicolas Saenz Julienne , Andrew Morton , Ingo Molnar , Borislav Petkov , linux-arch , LKML , Catalin Marinas , Stefan Wahren , Kees Cook , clang-built-linux 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 On Tue, Oct 1, 2019 at 10:53 PM Arnd Bergmann wrote: > > 1. is clearly the most common case, but there is also > > 4. Some compiler version (possibly long gone, possibly still current) > makes bad inlining decisions that result in horrible but functionally > correct object code for a particular function, and forcing a function to > be inlined results in what we had expected the compiler to do already. There is also 5. code that does not even compile without it, e.g. _static_cpu_has() in x86_64 which requires __attribute__((always_inline)), at least on GCC 9.2. For x64_64 it is the only one case I found, though. If you disable __always_inline everything else compiles and links (in a defconfig). Cheers, Miguel