Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754026Ab3J3TMA (ORCPT ); Wed, 30 Oct 2013 15:12:00 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52240 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440Ab3J3TL6 (ORCPT ); Wed, 30 Oct 2013 15:11:58 -0400 Date: Wed, 30 Oct 2013 20:11:41 +0100 From: Peter Zijlstra To: Victor Kaplansky Cc: paulmck@linux.vnet.ibm.com, Anton Blanchard , Benjamin Herrenschmidt , Frederic Weisbecker , LKML , Linux PPC dev , Mathieu Desnoyers , Michael Ellerman , Michael Neuling , Oleg Nesterov Subject: Re: perf events ring buffer memory barrier on powerpc Message-ID: <20131030191141.GR2490@laptop.programming.kicks-ass.net> References: <20131028132634.GO19466@laptop.lan> <20131028163418.GD4126@linux.vnet.ibm.com> <20131028201735.GA15629@redhat.com> <20131030092725.GL4126@linux.vnet.ibm.com> <20131030155116.GO16117@laptop.programming.kicks-ass.net> <20131030182930.GP2490@laptop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131030182930.GP2490@laptop.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 690 Lines: 20 On Wed, Oct 30, 2013 at 07:29:30PM +0100, Peter Zijlstra wrote: > + page_shift = PAGE_SHIFT + page_order(rb); > + > + handle->page = (offset >> page_shift) & (rb->nr_pages - 1); > + > + offset &= page_shift - 1; offset &= (1UL << page_shift) - 1; Weird that it even appeared to work.. /me wonders if he even booted the right kernel. > + > + handle->addr = rb->data_pages[handle->page] + offset; > + handle->size = (1 << page_shift) - offset; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/