From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753436AbcDFKxp (ORCPT ); Wed, 6 Apr 2016 06:53:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:40487 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbcDFKxU (ORCPT ); Wed, 6 Apr 2016 06:53:20 -0400 Date: Wed, 6 Apr 2016 12:53:15 +0200 From: Borislav Petkov To: One Thousand Gnomes 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, Zhaoxiu Zeng Subject: Re: [PATCH v2 10/30] Add x86-specific parity functions Message-ID: <20160406105315.GB13719@pd.tnic> References: <57031D9D.801@gmail.com> <1459934085-7152-1-git-send-email-zengzhaoxiu@163.com> <20160406101300.GA13719@pd.tnic> <20160406113737.0b73bb40@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160406113737.0b73bb40@lxorguk.ukuu.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. :-) -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --