Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1977056ybl; Thu, 29 Aug 2019 01:36:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+L2q6Zo4SSOdePhGHHrsHDIgY535KEpJhoALVCNztIJmhtyIXi4jEeCeFifMzclg1qiKk X-Received: by 2002:a63:194f:: with SMTP id 15mr7413523pgz.382.1567067778546; Thu, 29 Aug 2019 01:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567067778; cv=none; d=google.com; s=arc-20160816; b=MqDUh7Qzwu0x+3B6iFPUICMKLyTzOxLeyrEU0XU1RpfmyBNaAyw4PhQ0eSWgQAQkmj MbbydFbMbFxYSChlmFyofYszn6u4725bVcMxkiMl2UpqK2O+PF4egr1WbUWNV5ohSMgN 9HJ0Kp+tZcdFbrLzM1T70lD6L2fykfG/LQVE1tzOH7TR6Nlwxgo4P9k7cGaoyYzCOhq7 y5+ZcerruqfYpf6yDTOtwZZl8rMO++njAuEIfBZHhusFd3rtSvvdgiyiVzGnvZD4hh6Q DKtjhwhCicKplAOQvRag35imNLY+sGBXTl4voCX+aC9eaHc+trDzfNhJ54YnuH3ndX+M 6Ekw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+tcoOM1w5ijN0RdaUdp5NUc+yqkoT1xSuYtvZ7crxOM=; b=Do3GeXt4P+zKo8o3xkdMQQrATsO+mVWpCjv4EKknT+QXSrXIj0VLORWewsJ3hN92tV gwOFkzcoDxuYatz+DiWvjUtFG+1SXwOKwv7KjZYHhbPHA6cjsU8iaw4Na0tHBquAlWbR 91ImNi35cyQkfo5ouzPQULwBTGVvcpIwYkFTkdbd421OrcEwNXvOYBYk957F45h+9wzj 0Jg65DW50DNA75yJ/If8tIIbi3SKaDJBpGKjJf/BXQJzzOuP6cJ/xR7tmu5y0/6slskn copmZ25fcxkLcCDR15XXarl9vDjO4NkjdkXTa7iCp3o7zV1ysjpvUr8CZvyU0Kqpq+5f Ldwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=E93QWYzb; 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 y3si1355112pgy.230.2019.08.29.01.36.03; Thu, 29 Aug 2019 01:36:18 -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=@rasmusvillemoes.dk header.s=google header.b=E93QWYzb; 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 S1727997AbfH2IeM (ORCPT + 99 others); Thu, 29 Aug 2019 04:34:12 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34488 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727732AbfH2Icx (ORCPT ); Thu, 29 Aug 2019 04:32:53 -0400 Received: by mail-lj1-f194.google.com with SMTP id x18so2208288ljh.1 for ; Thu, 29 Aug 2019 01:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+tcoOM1w5ijN0RdaUdp5NUc+yqkoT1xSuYtvZ7crxOM=; b=E93QWYzboWAlOq+FWQVGJ+m1OydUiOkpgnwjIN4wa7RHlHscY9k3fzfofNTjKvZZqe q4nJyUiRCKRycATjsTO6tvnjJVilUBql1VlOUzKL0i3nTYBkhjdPFiYVurUlEmdOI7fZ iWyXFFAFLj3o3z71Fkjg6RTTJpvndAPKOQjbI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+tcoOM1w5ijN0RdaUdp5NUc+yqkoT1xSuYtvZ7crxOM=; b=jZk122ipJdOAEHZDX9xki6eiuZJ3UNJz6AQ808nm9Vu9HVGLM8J2WiwjinDlZQxsBn 0R6JqkET2BiTDU01bbL4tpmxg20ckdQgdqGgtD28kEg+mrLg80eQTIfWyaIAXAHJhR2Q ET1IqIO0sIycjjCgySGHtAG1zodXII6X6KWfIwnuiAqptLVnkYmD45xzwOvQwq5nCgkk rEL6PB+yDC3dQsCrgR8Y3QHDU5PF2Hx0VuxuZnl9rqhnoofc9mXkSU1JOBzjqMxusx5q cxNFAgkSpaQjqitY/PvzFKrQHSFT3285pIaBaeMPeWoEMPY3RynWCVjMoQzPLkAhHnvh UZpg== X-Gm-Message-State: APjAAAVLTRa7o/PQmfq1a7ckvG5H+t2l2Pst9MeKD88iWz3utVMDsGxs GsZkVSKptB1m8JNSAS16n106oQ== X-Received: by 2002:a2e:a415:: with SMTP id p21mr3094134ljn.111.1567067569251; Thu, 29 Aug 2019 01:32:49 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id o20sm248087ljg.31.2019.08.29.01.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 01:32:48 -0700 (PDT) From: Rasmus Villemoes To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Nadav Amit , Linus Torvalds , Miguel Ojeda , ndesaulniers@google.com, Rasmus Villemoes Subject: [RFC PATCH 0/5] make use of gcc 9's "asm inline()" Date: Thu, 29 Aug 2019 10:32:28 +0200 Message-Id: <20190829083233.24162-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc 9 provides a way to override the otherwise crude heuristic that gcc uses to estimate the size of the code represented by an asm() statement. From the gcc docs If you use 'asm inline' instead of just 'asm', then for inlining purposes the size of the asm is taken as the minimum size, ignoring how many instructions GCC thinks it is. For compatibility with older compilers, we obviously want a #if new enough #define asm_inline asm inline #else #define asm_inline asm #endif But since we #define the identifier inline to attach some attributes, we have to use the alternate spelling __inline__ of that keyword. Unfortunately, we also currently #define that one (to inline), so we first have to get rid of all (mis)uses of __inline__. Hence the huge diffstat. I think patch 1 should be regenerated and applied just before -rc1. There are a few remaining users of __inline__, in particular in uapi headers, which I'm not sure what to do about (kernel-side users of those will get slightly different semantics since we no longer automatically attach the __attribute__((__gnu_inline__)) etc.). So RFC. The two x86 changes cause smaller code gen differences than I'd expect, but I think we do want the asm_inline thing available sooner or later, so this is just to get the ball rolling. Rasmus Villemoes (5): treewide: replace __inline__ by inline compiler_types.h: don't #define __inline__ compiler-gcc.h: add asm_inline definition x86: alternative.h: use asm_inline for all alternative variants x86: bug.h: use asm_inline in _BUG_FLAGS definitions arch/alpha/include/asm/atomic.h | 12 +++--- arch/alpha/include/asm/bitops.h | 6 +-- arch/alpha/include/asm/dma.h | 22 +++++----- arch/alpha/include/asm/floppy.h | 2 +- arch/alpha/include/asm/irq.h | 2 +- arch/alpha/include/asm/local.h | 4 +- arch/alpha/include/asm/smp.h | 2 +- .../arm/mach-iop32x/include/mach/uncompress.h | 2 +- .../arm/mach-iop33x/include/mach/uncompress.h | 2 +- .../arm/mach-ixp4xx/include/mach/uncompress.h | 2 +- arch/ia64/hp/common/sba_iommu.c | 2 +- arch/ia64/hp/sim/simeth.c | 2 +- arch/ia64/include/asm/atomic.h | 8 ++-- arch/ia64/include/asm/bitops.h | 34 ++++++++-------- arch/ia64/include/asm/delay.h | 14 +++---- arch/ia64/include/asm/irq.h | 2 +- arch/ia64/include/asm/page.h | 2 +- arch/ia64/include/asm/sn/leds.h | 2 +- arch/ia64/include/asm/uaccess.h | 4 +- arch/ia64/oprofile/backtrace.c | 4 +- arch/m68k/include/asm/blinken.h | 2 +- arch/m68k/include/asm/checksum.h | 2 +- arch/m68k/include/asm/dma.h | 32 +++++++-------- arch/m68k/include/asm/floppy.h | 8 ++-- arch/m68k/include/asm/nettel.h | 8 ++-- arch/m68k/mac/iop.c | 14 +++---- arch/mips/include/asm/atomic.h | 16 ++++---- arch/mips/include/asm/checksum.h | 2 +- arch/mips/include/asm/dma.h | 20 +++++----- arch/mips/include/asm/jazz.h | 2 +- arch/mips/include/asm/local.h | 4 +- arch/mips/include/asm/string.h | 8 ++-- arch/mips/kernel/binfmt_elfn32.c | 2 +- arch/nds32/include/asm/swab.h | 4 +- arch/parisc/include/asm/atomic.h | 20 +++++----- arch/parisc/include/asm/bitops.h | 18 ++++----- arch/parisc/include/asm/checksum.h | 4 +- arch/parisc/include/asm/compat.h | 2 +- arch/parisc/include/asm/delay.h | 2 +- arch/parisc/include/asm/dma.h | 20 +++++----- arch/parisc/include/asm/ide.h | 8 ++-- arch/parisc/include/asm/irq.h | 2 +- arch/parisc/include/asm/spinlock.h | 12 +++--- arch/powerpc/include/asm/atomic.h | 40 +++++++++---------- arch/powerpc/include/asm/bitops.h | 28 ++++++------- arch/powerpc/include/asm/dma.h | 20 +++++----- arch/powerpc/include/asm/edac.h | 2 +- arch/powerpc/include/asm/irq.h | 2 +- arch/powerpc/include/asm/local.h | 14 +++---- arch/sh/include/asm/pgtable_64.h | 2 +- arch/sh/include/asm/processor_32.h | 4 +- arch/sh/include/cpu-sh3/cpu/dac.h | 6 +-- arch/x86/include/asm/alternative.h | 14 +++---- arch/x86/include/asm/bug.h | 4 +- arch/x86/um/asm/checksum.h | 4 +- arch/x86/um/asm/checksum_32.h | 4 +- arch/xtensa/include/asm/checksum.h | 14 +++---- arch/xtensa/include/asm/cmpxchg.h | 4 +- arch/xtensa/include/asm/irq.h | 2 +- block/partitions/amiga.c | 2 +- drivers/atm/he.c | 6 +-- drivers/atm/idt77252.c | 6 +-- drivers/gpu/drm/mga/mga_drv.h | 2 +- drivers/gpu/drm/mga/mga_state.c | 14 +++---- drivers/gpu/drm/r128/r128_drv.h | 2 +- drivers/gpu/drm/r128/r128_state.c | 14 +++---- drivers/gpu/drm/via/via_irq.c | 2 +- drivers/gpu/drm/via/via_verifier.c | 30 +++++++------- drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +- drivers/net/ethernet/sun/sungem.c | 8 ++-- drivers/net/ethernet/sun/sunhme.c | 6 +-- drivers/net/hamradio/baycom_ser_fdx.c | 2 +- drivers/net/wan/lapbether.c | 2 +- drivers/net/wan/n2.c | 4 +- drivers/parisc/led.c | 4 +- drivers/parisc/sba_iommu.c | 2 +- drivers/parport/parport_gsc.h | 4 +- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 4 +- drivers/scsi/qla2xxx/qla_inline.h | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/tty/amiserial.c | 2 +- drivers/tty/serial/ip22zilog.c | 2 +- drivers/tty/serial/sunsab.c | 4 +- drivers/tty/serial/sunzilog.c | 2 +- drivers/video/fbdev/core/fbcon.c | 20 +++++----- drivers/video/fbdev/ffb.c | 2 +- drivers/video/fbdev/intelfb/intelfbdrv.c | 8 ++-- drivers/video/fbdev/intelfb/intelfbhw.c | 2 +- drivers/w1/masters/matrox_w1.c | 4 +- fs/coda/coda_linux.h | 6 +-- fs/freevxfs/vxfs_inode.c | 2 +- fs/nfsd/nfsfh.h | 4 +- include/acpi/platform/acgcc.h | 2 +- include/asm-generic/ide_iops.h | 8 ++-- include/linux/atalk.h | 4 +- include/linux/compiler-gcc.h | 4 ++ include/linux/compiler_types.h | 5 ++- include/linux/hdlc.h | 4 +- include/linux/inetdevice.h | 6 +-- include/linux/parport.h | 4 +- include/linux/parport_pc.h | 22 +++++----- include/net/ax25.h | 2 +- include/net/checksum.h | 2 +- include/net/dn_nsp.h | 16 ++++---- include/net/ip.h | 2 +- include/net/ip6_checksum.h | 2 +- include/net/ipx.h | 10 ++--- include/net/llc_c_ev.h | 4 +- include/net/llc_conn.h | 4 +- include/net/llc_s_ev.h | 2 +- include/net/netrom.h | 8 ++-- include/net/scm.h | 14 +++---- include/net/udplite.h | 2 +- include/net/x25.h | 8 ++-- include/net/xfrm.h | 18 ++++----- include/video/newport.h | 12 +++--- net/appletalk/atalk_proc.c | 4 +- net/appletalk/ddp.c | 2 +- net/core/neighbour.c | 2 +- net/core/scm.c | 2 +- net/decnet/dn_nsp_in.c | 2 +- net/decnet/dn_nsp_out.c | 2 +- net/decnet/dn_route.c | 2 +- net/decnet/dn_table.c | 4 +- net/ipv6/af_inet6.c | 2 +- net/ipv6/icmp.c | 4 +- net/ipv6/udp.c | 2 +- net/lapb/lapb_iface.c | 4 +- net/llc/llc_input.c | 2 +- sound/sparc/amd7930.c | 6 +-- 131 files changed, 449 insertions(+), 442 deletions(-) -- 2.20.1