From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752310AbdLLOvV (ORCPT ); Tue, 12 Dec 2017 09:51:21 -0500 Received: from merlin.infradead.org ([205.233.59.134]:32822 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbdLLOvS (ORCPT ); Tue, 12 Dec 2017 09:51:18 -0500 Date: Tue, 12 Dec 2017 15:51:05 +0100 From: Peter Zijlstra To: Ilia Mirkin Cc: Ingo Molnar , "linux-kernel@vger.kernel.org" , Pekka Paalanen , Lyude , Steven Rostedt , Thomas Gleixner , Karol Herbst , Linus Torvalds , hpa@zytor.com, linux-tip-commits@vger.kernel.org, Karol Herbst Subject: Re: [tip:x86/urgent] x86/mm/kmmio: Fix mmiotrace for page unaligned addresses Message-ID: <20171212145105.6rfbdbty6e5ajron@hirez.programming.kicks-ass.net> References: <20171127075139.4928-1-kherbst@redhat.com> <20171212134952.2hok6754245qshv3@hirez.programming.kicks-ass.net> <20171212140418.56xld2lxja5rywp7@gmail.com> <20171212144334.slrpfdtptr5nhuhx@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 12, 2017 at 09:47:05AM -0500, Ilia Mirkin wrote: > > So this 'thing' has huge gaping SMP holes in. > > Sure does! Probably why the following happens when mmiotrace is enabled: > > void enable_mmiotrace(void) > { > mutex_lock(&mmiotrace_mutex); > if (is_enabled()) > goto out; > > if (nommiotrace) > pr_info("MMIO tracing disabled.\n"); > kmmio_init(); > enter_uniprocessor(); ^^^^^ Ah! I completely missed that. OK, that makes it much less broken :-) If I don't forget, I'll add some comments to this file to clarify that. Thanks! > spin_lock_irq(&trace_lock); > atomic_inc(&mmiotrace_enabled); > spin_unlock_irq(&trace_lock); > pr_info("enabled.\n"); > out: > mutex_unlock(&mmiotrace_mutex); > }