From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227ZsOv5GD8cwnqjT6br81qG4i9rR5wDTOJz615yTjw9JK+7k1rTMyr3F01xxQBD5gen1I20 ARC-Seal: i=1; a=rsa-sha256; t=1516721585; cv=none; d=google.com; s=arc-20160816; b=lH8Fh5Y/6xBefhOlAJeOJoUmO931QyMGdiJbvStw2uDFCB/wnHX/cTTC9n9m+OY2tU eXgARDckuuwEGlVS5WI5pbWS2n/iOSGVWKVtTyolSOiWqYNkBpSFcTFduY1EKaCIHL1I mxdb5ppZNvahGIzp1QxKgaTfhyy1FCI0SCwqmu5BsxowQnPe7BeXB2PrOeY+9Up/Dmw6 kt+Hhq4MH3wCykKyXR68Hm7SeWTbZrDouI5qc9siaFHU5bNnjpCKjqQ0OFD7z7iCETaQ X8qU2cuoMJK6tVzBOTkPHAGm5d8v1f1w1bUa9rzSNpDUiNppBIlTs7ZamAn26FbV8ulD d9Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature:arc-authentication-results; bh=1Q02d8alkcxwKRT6oetIN7MikbBRXWQMe86lQEzPWTQ=; b=GIvE9hVhSGMxlRpS7TVgIktvLuBKyLa817DSDxWP2ZgYOyXZQqcE9bAWxqQnUSSCaH paS9sOLSeRnjqqBxyRRxuIlBj0VstAR2Jk/X8YbdXofUVmtFudcseTWi0Q0wprzqsXcY YTWUE5I7oPJwWM0dSDYSQDYCAmjNtIq5njdpZHelx7J/kjmCKWR9WhNKKOxfz/eRQEql 84caqIsl1k3M0Ghw1qMMMriX1QqP0BcNBsx7LNnfraFJP9r6UTIjHetGO2eeh8gT8xt3 /1i0osVoKtf3JKW/Tjol4cqcms3elkXoKt0nilvKUcNp3CkL3WbFFEQS7yAAuzXJjRji muMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=S4RIn+Ne; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 205.233.59.134 as permitted sender) smtp.mailfrom=peterz@infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=S4RIn+Ne; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 205.233.59.134 as permitted sender) smtp.mailfrom=peterz@infradead.org Message-Id: <20180123152638.639418660@infradead.org> User-Agent: quilt/0.63-1 Date: Tue, 23 Jan 2018 16:25:50 +0100 From: Peter Zijlstra To: David Woodhouse , Thomas Gleixner , Josh Poimboeuf Cc: linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Jason Baron , Peter Zijlstra , Borislav Petkov Subject: [PATCH 11/24] x86: Reindent _static_cpu_has References: <20180123152539.374360046@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-fix-static_cpu_has.patch X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590397853460517704?= X-GMAIL-MSGID: =?utf-8?q?1590397853460517704?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: Because its daft.. Cc: Josh Poimboeuf Cc: Thomas Gleixner Reviewed-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/cpufeature.h | 78 +++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -145,45 +145,45 @@ extern void clear_cpu_cap(struct cpuinfo */ static __always_inline __pure bool _static_cpu_has(u16 bit) { - asm_volatile_goto("1: jmp 6f\n" - "2:\n" - ".skip -(((5f-4f) - (2b-1b)) > 0) * " - "((5f-4f) - (2b-1b)),0x90\n" - "3:\n" - ".section .altinstructions,\"a\"\n" - " .long 1b - .\n" /* src offset */ - " .long 4f - .\n" /* repl offset */ - " .word %P1\n" /* always replace */ - " .byte 3b - 1b\n" /* src len */ - " .byte 5f - 4f\n" /* repl len */ - " .byte 3b - 2b\n" /* pad len */ - ".previous\n" - ".section .altinstr_replacement,\"ax\"\n" - "4: jmp %l[t_no]\n" - "5:\n" - ".previous\n" - ".section .altinstructions,\"a\"\n" - " .long 1b - .\n" /* src offset */ - " .long 0\n" /* no replacement */ - " .word %P0\n" /* feature bit */ - " .byte 3b - 1b\n" /* src len */ - " .byte 0\n" /* repl len */ - " .byte 0\n" /* pad len */ - ".previous\n" - ".section .altinstr_aux,\"ax\"\n" - "6:\n" - " testb %[bitnum],%[cap_byte]\n" - " jnz %l[t_yes]\n" - " jmp %l[t_no]\n" - ".previous\n" - : : "i" (bit), "i" (X86_FEATURE_ALWAYS), - [bitnum] "i" (1 << (bit & 7)), - [cap_byte] "m" (((const char *)boot_cpu_data.x86_capability)[bit >> 3]) - : : t_yes, t_no); - t_yes: - return true; - t_no: - return false; + asm_volatile_goto("1: jmp 6f\n" + "2:\n" + ".skip -(((5f-4f) - (2b-1b)) > 0) * " + "((5f-4f) - (2b-1b)),0x90\n" + "3:\n" + ".section .altinstructions,\"a\"\n" + " .long 1b - .\n" /* src offset */ + " .long 4f - .\n" /* repl offset */ + " .word %P1\n" /* always replace */ + " .byte 3b - 1b\n" /* src len */ + " .byte 5f - 4f\n" /* repl len */ + " .byte 3b - 2b\n" /* pad len */ + ".previous\n" + ".section .altinstr_replacement,\"ax\"\n" + "4: jmp %l[t_no]\n" + "5:\n" + ".previous\n" + ".section .altinstructions,\"a\"\n" + " .long 1b - .\n" /* src offset */ + " .long 0\n" /* no replacement */ + " .word %P0\n" /* feature bit */ + " .byte 3b - 1b\n" /* src len */ + " .byte 0\n" /* repl len */ + " .byte 0\n" /* pad len */ + ".previous\n" + ".section .altinstr_aux,\"ax\"\n" + "6:\n" + " testb %[bitnum],%[cap_byte]\n" + " jnz %l[t_yes]\n" + " jmp %l[t_no]\n" + ".previous\n" + : : "i" (bit), "i" (X86_FEATURE_ALWAYS), + [bitnum] "i" (1 << (bit & 7)), + [cap_byte] "m" (((const char *)boot_cpu_data.x86_capability)[bit >> 3]) + : : t_yes, t_no); +t_yes: + return true; +t_no: + return false; } #define static_cpu_has(bit) \