From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502AbcKIJjv (ORCPT ); Wed, 9 Nov 2016 04:39:51 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:57229 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbcKIJjs (ORCPT ); Wed, 9 Nov 2016 04:39:48 -0500 Date: Wed, 9 Nov 2016 10:37:11 +0100 (CET) From: Thomas Gleixner To: Lu Baolu cc: Greg Kroah-Hartman , Mathias Nyman , Ingo Molnar , linux-usb@vger.kernel.org, x86@kernel.org, LKML , Peter Zijlstra Subject: Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability In-Reply-To: <1477976354-13291-2-git-send-email-baolu.lu@linux.intel.com> Message-ID: References: <1477976354-13291-1-git-send-email-baolu.lu@linux.intel.com> <1477976354-13291-2-git-send-email-baolu.lu@linux.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Nov 2016, Lu Baolu wrote: > +static void early_xdbc_write(struct console *con, const char *str, u32 n) > +{ > + int chunk, ret; > + static char buf[XDBC_MAX_PACKET]; > + int use_cr = 0; > + > + if (!xdbc.xdbc_reg) > + return; > + memset(buf, 0, XDBC_MAX_PACKET); How is that dealing with reentrancy? early_printk() does not protect against it. Peter has a patch to prevent concurrent access from different cpus, but it cannot and will never prevent reentrancy on the same cpu (interrupt, nmi). Thanks, tglx