From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0C41A20956082 for ; Thu, 15 Mar 2018 07:38:59 -0700 (PDT) From: David Howells In-Reply-To: <20180315115146.GX4064@hirez.programming.kicks-ass.net> References: <20180315115146.GX4064@hirez.programming.kicks-ass.net> <20180313102056.GJ4043@hirez.programming.kicks-ass.net> <152066488891.40260.14605734226832760468.stgit@dwillia2-desk3.amr.corp.intel.com> <152066493247.40260.10849841915366086021.stgit@dwillia2-desk3.amr.corp.intel.com> <20180311112725.GC4043@hirez.programming.kicks-ass.net> <3396.1521107922@warthog.procyon.org.uk> Subject: Re: [RFC][PATCH] sched/wait_bit: Introduce wait_var_event()/wake_up_var() MIME-Version: 1.0 Content-ID: <18970.1521125120.1@warthog.procyon.org.uk> Date: Thu, 15 Mar 2018 14:45:20 +0000 Message-ID: <18971.1521125120@warthog.procyon.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Peter Zijlstra Cc: linux-xfs , Jan Kara , linux-nvdimm , david , Linux Kernel Mailing List , Ralf Baechle , dhowells@redhat.com, Ingo Molnar , linux-fsdevel , Christoph Hellwig List-ID: Peter Zijlstra wrote: > Does the below address things sufficiently clear? Yep. > +wait_queue_head_t *__var_waitqueue(void *p) > +{ > + if (BITS_PER_LONG == 64) { > + unsigned long q = (unsigned long)p; > + > + return bit_waitqueue((void *)(q & ~1), q & 1); > + } > + return bit_waitqueue(p, 0); > +} You might be better off not using bit_waitqueue() but rather do the calculation directly since you don't actually have a bit number. David _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm