Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6375041yba; Thu, 11 Apr 2019 18:53:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdscDZNRzXoVUglvTqDhVgTODvA6sCYTNPS70iZIE538kVOCIWedIfQ7WIQssia3cgBQl5 X-Received: by 2002:a62:ae13:: with SMTP id q19mr54017919pff.152.1555034014837; Thu, 11 Apr 2019 18:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555034014; cv=none; d=google.com; s=arc-20160816; b=K66ofxKCQGrzKqGtOR80aZ7npzgsKLohubqRuAC+mJAh2iK1tsxVJfh+5an1yVjWxA Y9WFMAx5vMxi15wfKnJ2QXaXVlutIRdgAZUUykJac0VTiG/MlVGiQ31wD8iicthi9of5 uW4qNvKR2B0n3HtNuSFog5obOtR0ZS/SfhVfzhQQ1cFQf71Xf5uJJD4w1V/FrnBeJhtD /b1UCJ0DkPl71sKToy6n8MthnWdPjhfyQixFhK/Shb8CpYl2qd008oXbfJO9WTI/4oMy tqo62LegJ3xlLU0/9MFxEbMcqUP33nww4pvpu+qBYZd77BM7LF8ZvEzvBSLd1rCB3qmc c48Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:cc:subject:date:to:from; bh=ZFaZUoAN5ElQDtRC6Vu6fGuw6T1Hvz9mug5LowrXtqc=; b=Z30jCve6zrGY5mQ3UhrsOgqIiHlni0UR0bLQO9oz9Y7NEqGcB2K39hg8zIZOZVQ7Cg xz5ASon1HTXJ+re98by8OTjV3FMeF7JkxFCZdtn1Bz/djkumBcy3jSuVIHxBxlZLXer7 0NQIfnEhf1qzd+ERyyDkxij7SoU8ftpW40S6LvbpNVdn1aBcSIRTb542H1a49iemCmfG atCnfaCmSApPmixiFsOdSG4WkiLFIFnmVJL+I+h83HPeyl6KJItpGLYzoFcou0aZ/FPE 1kIGqD66uiZGTNcijB8lDSsdHgcCtsT8xPxmMEyGsrFqMnYSNsNbfQyOpPRaR3rLzsW3 TI5w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si34745034pgv.210.2019.04.11.18.53.14; Thu, 11 Apr 2019 18:53:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbfDLBwb (ORCPT + 99 others); Thu, 11 Apr 2019 21:52:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:48834 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726661AbfDLBwb (ORCPT ); Thu, 11 Apr 2019 21:52:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0BD85ACF8; Fri, 12 Apr 2019 01:52:29 +0000 (UTC) From: NeilBrown To: Thomas Graf , Herbert Xu , David Miller Date: Fri, 12 Apr 2019 11:52:07 +1000 Subject: [PATCH 0/5] Fix rhashtable bit-locking for m68k Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Message-ID: <155503371949.17793.8266195008003399968.stgit@noble.brown> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As reported by Guenter Roeck, the new rhashtable bit-locking doesn't work on m68k as it only requires 2-byte alignment, so BIT(1) is addresses is not unused. We current use BIT(0) to identify a NULLS marker, but that is only needed in ->next pointers. The bucket head does not need a NULLS marker, so the lsb there can be used for locking. the first 4 patches make some small improvements and re-arrange some code. The final patch converts to using only BIT(0) for these two different special purposes. I had previously suggested dropping the series until I fix it. Given that this was fairly easy, I retract that I think it best simply to add these patches to fix the code. Thanks, NeilBrown --- NeilBrown (5): rhashtable: fix some __rcu annotation errors rhashtable: reorder some inline functions and macros. rhashtable: move dereference inside rht_ptr() rhashtable: replace rht_ptr_locked() with rht_assign_locked() rhashtable: use BIT(0) for locking. include/linux/rhashtable.h | 226 +++++++++++++++++++++++++------------------- lib/rhashtable.c | 24 ++--- lib/test_rhashtable.c | 2 3 files changed, 142 insertions(+), 110 deletions(-) -- Signature