Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3768235imm; Thu, 17 May 2018 14:30:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpfwz3riyDx0vjgzQa5rsGZ+1FcrAmn7GabxzvjySfm59W0uz5WMO5FbJMDW0tbxALYIj2u X-Received: by 2002:a65:558c:: with SMTP id j12-v6mr5423730pgs.262.1526592655306; Thu, 17 May 2018 14:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526592655; cv=none; d=google.com; s=arc-20160816; b=I4XlFPqH/2A/4lQiF0OCTn5SqohKniL48i/ifyarX3/BPcelBsORm76vCSas4jiBjQ kYPknDZJ2dVmTS8qwIqqSRoyp000iX+7MMZWpbpssI/r6lbLCTE2RnpTb+jTFGFW6LsH SRJxPbZQxa0eEA8m/Bu897HHEl44LDLQ3BQ3jeQHg622SUzqGrKPDJMJsnmj1Fsf0dKL TPf6t7DdE+8yokioFEit+cXxljQkrfHbUKTM+7VFKZOXm9dPhwGiZL4vWVKXrHnFClYR ifGIBnVM+W4jNOHItD7uyGDJLXKnSPuBVqFF5/07NZe6kuvTRiyJx+fXeqixbJMY1Gv4 E8rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=aDvp5RvcXhhWYEphqqa+NvvOTaWzoXx7X1EjLETsg6U=; b=rzBC6UmSZOrtFYYwTFD242ePp9+YsAbw0Nfc3gZxiVuGvIE6BUygpcXeOxVSET82Uf bN/Ng8yv/Juj7df6KRuT+5fCIjl8xDQqydHJxDLvLi/qjqd211H+txa0rH78Uz6vIu6u t1XWdV1ekkbiV1RZJfyKu24B+dg7k5ChXqlPBMf4S64DRYq5o6NOO71/gOHs5VgIDnz2 6XNIH72DH5Tbo5hC3DiiUvG9c+i2t/YSnvEDlDnjaa1AmhkxmW4S/WkYyGDtDnZ5ZK+v wjC0pZEvHJ9Evqu9p0iF6dR/5Ov0vJBRuQjiAcq1Jh7XQlggD4PoQqMV0gMp44vNk1mr Np7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZQCHWZ9p; 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 o8-v6si4492004pgp.628.2018.05.17.14.30.40; Thu, 17 May 2018 14:30:55 -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=ZQCHWZ9p; 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 S1751907AbeEQVaG (ORCPT + 99 others); Thu, 17 May 2018 17:30:06 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36994 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750924AbeEQVaF (ORCPT ); Thu, 17 May 2018 17:30:05 -0400 Received: by mail-wm0-f43.google.com with SMTP id l1-v6so11587370wmb.2 for ; Thu, 17 May 2018 14:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=aDvp5RvcXhhWYEphqqa+NvvOTaWzoXx7X1EjLETsg6U=; b=ZQCHWZ9ph6HgZ6roGub7I09va6b/13BwR3g459EIWuZhqAvdJHMMU+0mwTa8q+dlFm hAadBDd8IQYyAO7XYD2+FNvDvxvBqWgFqAjE+YmQNm08KvxY8II2vm5ruodqzNkLaROL B/tSB/sgjrAqsDwJKM3GJXD6n2qHbNusrJqWREGS69fZHe7zX3kBfySUE0YuTgLmu7mU UKBz1hXPA0tzFXqJLuZd0agQZlCddDxMy4DjFF8t5h7HnDuROrDDiOXVNB9LnLOsDqAJ uvJ2RvkBvEJHVL3/3vTG7LCr26RNuAOR8eEgBgnoEcL4juJwPUwITDCYslRSt/uMo6By 1i0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=aDvp5RvcXhhWYEphqqa+NvvOTaWzoXx7X1EjLETsg6U=; b=Y+mPEDJSB+v1+sJ3HCVA85NFfFCVUAOhf0efUqvhu0Dve7EXyM++DoBlRDzZajt4i2 vcfJqKn18zAeG0LmJc1V6gpYDNTbzsn4Pe40NxtIOlglHYeREWrp+hukvpwdgJBqfpb5 s1kjaJ8wNsG0E1z6/UEWSqdQZ45iQJC2DqPky4k8ijX1bvsc2IrvRr6RYIHiSTnufCy/ NMrCjBgdq19ak+66GH9nycnL8AccZOCDKY4z8EJVcn6Lco1Me+inZ1nHxhruavJoGTm7 +bwFLhX+goM9oQbI6FiliBEn0z5fsSXYxq/ClEB+IN7DBstSnrq9MgoCDUjdf1SIfwaC l+/A== X-Gm-Message-State: ALKqPwd67X9nD87NQjcuH1rPfm3Khi0i1Ay3Hs18W8gEH9gcSLB00w6g oqHLWDxdReX7vKdjJTp5bA== X-Received: by 2002:a1c:cb88:: with SMTP id b130-v6mr2919264wmg.78.1526592604386; Thu, 17 May 2018 14:30:04 -0700 (PDT) Received: from avx2 (nat4-minsk-pool-46-53-177-92.telecom.by. [46.53.177.92]) by smtp.gmail.com with ESMTPSA id 2-v6sm11956026wrb.22.2018.05.17.14.30.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 14:30:03 -0700 (PDT) Date: Fri, 18 May 2018 00:30:01 +0300 From: Alexey Dobriyan To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Cc: x86@kernel, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] x86: verify_cpu: use 32-bit arithmetic Message-ID: <20180517213001.GA4047@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 32-bit instructions are 1 byte shorter than 16-bit instructions. Signed-off-by: Alexey Dobriyan --- arch/x86/kernel/verify_cpu.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/arch/x86/kernel/verify_cpu.S +++ b/arch/x86/kernel/verify_cpu.S @@ -56,14 +56,14 @@ ENTRY(verify_cpu) cmpl $0x1,%eax jb .Lverify_cpu_no_longmode # no cpuid 1 - xor %di,%di + xor %edi, %edi cmpl $0x68747541,%ebx # AuthenticAMD jnz .Lverify_cpu_noamd cmpl $0x69746e65,%edx jnz .Lverify_cpu_noamd cmpl $0x444d4163,%ecx jnz .Lverify_cpu_noamd - mov $1,%di # cpu is from AMD + mov $1, %edi # cpu is from AMD jmp .Lverify_cpu_check .Lverify_cpu_noamd: @@ -122,13 +122,13 @@ ENTRY(verify_cpu) andl $SSE_MASK,%edx cmpl $SSE_MASK,%edx je .Lverify_cpu_sse_ok - test %di,%di + test %edi, %edi jz .Lverify_cpu_no_longmode # only try to force SSE on AMD movl $MSR_K7_HWCR,%ecx rdmsr btr $15,%eax # enable SSE wrmsr - xor %di,%di # don't loop + xor %edi, %edi # don't loop jmp .Lverify_cpu_sse_test # try again .Lverify_cpu_no_longmode: