Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6051938imd; Wed, 31 Oct 2018 06:12:40 -0700 (PDT) X-Google-Smtp-Source: AJdET5fHY30Nh2fzaXIA5kzJCLg1m9Ln4IS58PY5afNZA8HcY37ucahj0BByjchDm70eowFEfiUW X-Received: by 2002:a17:902:29e3:: with SMTP id h90-v6mr3424876plb.158.1540991560612; Wed, 31 Oct 2018 06:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540991560; cv=none; d=google.com; s=arc-20160816; b=RJdXgk+w5Q9tRYyJ92JzqFj1XeWZCkh2oPAOYBNG+gEwThPh63Gd/X5SncazThFoPZ PHABygZ1zivzlSNFqHG9IgkFDe7lD7/C4mBynBXlr8sv2ew9kkvfblcXpcAxfNz7CVCw W+7PVJbvVsPj2yQZI+CBzJgqw0AzM/P73X04Ak/DnM2paj/EyEGHlcavritub/Y3g8X0 ZYvYbA4lBuj47nAAHwKtVnFHtlTVNhcpeL4m5HoEA+MhnF0usilZcZHTRWJ89ybk/6fV othA6BCxbtDt8ue42LtlqxkY1SoESt2F1IxvNLXX0cxS1FfykEHnxJKvwqugFydTwZ1u 9zUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4l2DjgZkXSLqL1QWFrZ12/6BysXWyTCGDXE+o5HH3N0=; b=Hl+IyggMiHHHXVM5bsW4fc1XA+ymq2tJlJe7MYn74yeFUQ/kwGAA/rXOmig8pJ4j7r RzLdBbXxRgBgbCUUApWKXFkRr8tnOqGFuBObpqC+oSMo9FTODP59TT2IfSsr29Hs4REP S6T06dJ1YF8tpgWhyXNUu4Gs2BRSkWX0/XXm2Z13ljCz44XFX8db3Fb8NQm8zDn1MMWS lIdXEQnd9bEnXC0bdsrm15WQw+yaKVnj/rg618LkPKN/b8xxCPGIHcmIGjKGP+50eIB2 yPEgVPLa3DguZfWvDhZdmbodSCW1Z0CZgL1lRaMjAxvaCe0ksEMnFrcnROoTJJgBVeKs 9SXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="jK+OO/NI"; 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 x72-v6si9543739pfd.219.2018.10.31.06.12.23; Wed, 31 Oct 2018 06:12:40 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="jK+OO/NI"; 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 S1729301AbeJaWJ1 (ORCPT + 99 others); Wed, 31 Oct 2018 18:09:27 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34522 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729187AbeJaWJ1 (ORCPT ); Wed, 31 Oct 2018 18:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4l2DjgZkXSLqL1QWFrZ12/6BysXWyTCGDXE+o5HH3N0=; b=jK+OO/NIz5pIli96U9FDs7tIr CA9sCtJlMGNcI45TJRDAsv9qj64Rm9y+kYmunW764zXU7MdiBcoFRnpj9lsH8TrLgTR69JJNIdgV+ WgtUVd9nTh1bKZXWuOqmN7ZulIA5OSMmuSYoACkuPD/yiFkdvQ3PBPoeyYyT3NEu6VYgVk/1kOglS uRHCA07ItJ3F+T4l2GXUg+KYW/5aUdMNEv/UclXCQERmFgwO+h1cYVi/TM4cqViKChmfCoUJ8ScDh Ok9JiKmiTttGTXvkHYK5FRW1XV0ue28XPwliWN57k+A8S1LwdPDF7gju6YlyaJdvOIw7ilBEJny9Q LZpuLVh1g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHqHA-0003zJ-Uj; Wed, 31 Oct 2018 13:11:13 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B00EB20297604; Wed, 31 Oct 2018 14:11:10 +0100 (CET) Date: Wed, 31 Oct 2018 14:11:10 +0100 From: Peter Zijlstra To: Borislav Petkov Cc: Segher Boessenkool , Ingo Molnar , Richard Biener , Michael Matz , gcc@gcc.gnu.org, Nadav Amit , Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org, Masahiro Yamada , Sam Ravnborg , Alok Kataria , Christopher Li , Greg Kroah-Hartman , "H. Peter Anvin" , Jan Beulich , Josh Poimboeuf , Juergen Gross , Kate Stewart , Kees Cook , linux-sparse@vger.kernel.org, Philippe Ombredanne , Thomas Gleixner , virtualization@lists.linux-foundation.org, Linus Torvalds , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Andrew Morton Subject: Re: PROPOSAL: Extend inline asm syntax with size spec Message-ID: <20181031131110.GA13257@hirez.programming.kicks-ass.net> References: <20181009145330.GT29268@gate.crashing.org> <20181010072240.GB103159@gmail.com> <20181010080324.GV29268@gate.crashing.org> <20181010081906.GA5533@zn.tnic> <20181010185432.GB29268@gate.crashing.org> <20181010191427.GF5533@zn.tnic> <20181013193335.GD31650@zn.tnic> <20181031125526.GA13219@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181031125526.GA13219@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 31, 2018 at 01:55:26PM +0100, Peter Zijlstra wrote: > On Sat, Oct 13, 2018 at 09:33:35PM +0200, Borislav Petkov wrote: > > Ok, > > > > with Segher's help I've been playing with his patch ontop of bleeding > > edge gcc 9 and here are my observations. Please double-check me for > > booboos so that they can be addressed while there's time. > > > > So here's what I see ontop of 4.19-rc7: > > > > First marked the alternative asm() as inline and undeffed the "inline" > > keyword. I need to do that because of the funky games we do with > > "inline" redefinitions in include/linux/compiler_types.h. > > > > And Segher hinted at either doing: > > > > asm volatile inline(... > > > > or > > > > asm volatile __inline__(... > > > > but both "inline" variants are defined as macros in that file. > > > > Which means we either need to #undef inline before using it in asm() or > > come up with something cleverer. > > # git grep -e "\<__inline__\>" | wc -l > 488 > # git grep -e "\<__inline\>" | wc -l > 56 > # git grep -e "\" | wc -l > 69598 > > And we already have scripts/checkpatch.pl: > > # Check for __inline__ and __inline, prefer inline > > Which suggests we do: > > git grep -l "\<__inline\(\|__\)\>" | while read file > do > sed -i -e 's/\<__inline\(\|__\)\>/inline/g' $file > done > > and get it over with. > > > Anyway, with the below patch, I get: > > text data bss dec hex filename > 17385183 5064780 1953892 24403855 1745f8f defconfig-build/vmlinux > 17385678 5064780 1953892 24404350 174617e defconfig-build/vmlinux 17387603 5065468 1953892 24406963 1746bb3 defconfig-build/vmlinux If I do an additional: git grep -l "asm volatile" | while read file do sed -i -e 's/asm volatile/asm_volatile/g' $file done on the tree... No changes for: -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +#define asm_volatile_goto(x...) do { asm __inline__ goto (x); asm (""); } while (0) I suppose all our goto's are small now (my tree includes Nadav's patch to static_cpu_has).