Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754836AbcDGDz6 (ORCPT ); Wed, 6 Apr 2016 23:55:58 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36468 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbcDGDz5 (ORCPT ); Wed, 6 Apr 2016 23:55:57 -0400 Subject: Re: [PATCH v2 10/30] Add x86-specific parity functions To: Borislav Petkov , One Thousand Gnomes References: <57031D9D.801@gmail.com> <1459934085-7152-1-git-send-email-zengzhaoxiu@163.com> <20160406101300.GA13719@pd.tnic> <20160406113737.0b73bb40@lxorguk.ukuu.org.uk> <20160406105315.GB13719@pd.tnic> Cc: zengzhaoxiu@163.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, dvlasenk@redhat.com, akpm@linux-foundation.org, dvyukov@google.com, keescook@chromium.org, linux-kernel@vger.kernel.org From: Zeng Zhaoxiu Message-ID: <5705DA47.1060902@gmail.com> Date: Thu, 7 Apr 2016 11:55:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160406105315.GB13719@pd.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 671 Lines: 16 在 2016年04月06日 18:53, Borislav Petkov 写道: > On Wed, Apr 06, 2016 at 11:37:37AM +0100, One Thousand Gnomes wrote: >> Even that would still be wrong for the smaller parity values. The CPU >> supports 8bit parity directly going back to the 8086 so the >> implementation for 8bit and I think 16bit is still wrong. > I was objecting to the unnecessary replication of the hweight/popcnt > glue. > > And yes, one could look up the definition of the parity flag on x86 and > then base the implementation of all those smaller ones on that as the > hardware does it for one practically for free there. > > :-) > SETcc (SETPO etc.) added since 80386, is this a problem?