From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755164AbcE0O5z (ORCPT ); Fri, 27 May 2016 10:57:55 -0400 Received: from science.sciencehorizons.net ([71.41.210.147]:40319 "HELO ns.sciencehorizons.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with SMTP id S1752237AbcE0O5y (ORCPT ); Fri, 27 May 2016 10:57:54 -0400 Date: 26 May 2016 13:09:58 -0400 Message-ID: <20160526170958.23840.qmail@ns.sciencehorizons.net> From: "George Spelvin" To: linux-kernel@vger.kernel.org Subject: [PATCH v2 00/10] String hash improvements Cc: alistair.francis@xilinx.com, bfields@fieldses.org, geert@linux-m68k.org, gerg@linux-m68k.org, linux-m68k@vger.kernel.org, michal.simek@xilinx.com, phdm@macq.eu, schwab@linux-m68k.org, uclinux-h8-devel@lists.sourceforge.jp, ysato@users.sourceforge.jp Reply-To: linux@sciencehorizons.net In-Reply-To: <20160525072027.5107.qmail@ns.sciencehorizons.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is just the arch-specific part, updated as per requests. * Fix the stupidly overcomplex m68k conditionals (per Geert Uytterhoeven) * Renamed the arch file to (per Geert Uytterhoeven) * Improved the comments on the progress of shift-and-add (Philippe De Muyter) * Added a self-test (per Michal Simek) Things I did *not* do, because I thought the concerns were withdrawn after discussion: (If I misintrepreted silence, please correct me!) * Use unconditional inclusion with an fallback. * Change the multi-line asm() formatting (Philippe De Muyter) * Move reference about algorithm credit (Philippe De Muyter) The big change is the addition of a self-test in lib/test_hash.c. That had to be written and the various tests validated by introducing deliberate bugs into . Handling the fact that architectures are allowed to change the computed function (even though none of the ones written so far have used that freedom) added some complexity. I ended up using the value of the HAVE_ARCH_* macro. If it's 1, that means it's expected to be a clone of the generic versions, and it's compared against them. If it's 0, it's its own magic thing. The big question is, should these go through the arch trees, or may I just include them in the series to Linus? The latter is simpler for me, but obviously not okay without permission.