From patchwork Fri May 19 04:38:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 9735827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D852C6020B for ; Fri, 19 May 2017 04:38:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4008288C4 for ; Fri, 19 May 2017 04:38:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B81DF2861B; Fri, 19 May 2017 04:38:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4B9DD2861B for ; Fri, 19 May 2017 04:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lgLoTHPssZ0Ez76lnv5XZUfH8NejS5kl0gHMrBhhnA8=; b=mTzS+//djRhaA+ c03z/wHCmCq2PcZQi9Q8ea6q5Qrlj74pF1f6xj9dCV3M/9ehQkiF8GyOlWiv40R6EWo6XXwhBmh5G j6troNjsOr/M5jZUVVXJzi3fFAALmyMJK+3uYdOnMYea46jIVtGxC7vgmOvbCzFcpyzo8+5UBF/u/ zFs4OMmVibhHyFAlVJqD0qLJqBGGHFoe7y858dMvDSzfOjj4rCKZGsGvgQ584kvh82EM4Eav8Zsbk MZxU6IwgVM1RCUxS7uWDG5ub8/X29Z9aCpFZAygEvi6XGqD2yUaLL5Ay6zgAfaojiDklsi/9uWq94 EFXQGBYJFnthU0M+zVpg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dBZgU-0004Qz-Qw; Fri, 19 May 2017 04:38:38 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBZgR-0004P8-St for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2017 04:38:37 +0000 Received: by mail-pg0-x243.google.com with SMTP id u187so8330130pgb.1 for ; Thu, 18 May 2017 21:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vAxnKkPh8r7rA9GGTxwJty8hAbrbL498W2GpENgiDUs=; b=Pq+CD1t4l4/Ku3XeOodvFSKNikLn0eTDsKGJG49wHMFAAHLE3Tg2Z8Y/dyaNe5Zldz aujAaMjjy1V1F8K96vLlRE5d7Tkc3rJ3RdazezbEjz3hBzZgROUrA8M6TJQ/cl94OMQi wT3tFSGEsIW9KE5pWtTGBzbRgXPl3EUt4AIJte81w4AxOVKMlLT3GN6IFzmo17mOw++b OZJqdYFHxF4QkoMcIbqaARPgFRzRZh2yQQtid7EMQ+gb0ViFCV9QyEVKMiYtAyUe7x0C aHXmamL4gbL3sTYsbA+081ja+Snu70HX8iN99oQBPpjWTby1SJiVVa1lpTZWmpE+jCbX U43w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vAxnKkPh8r7rA9GGTxwJty8hAbrbL498W2GpENgiDUs=; b=NZO5Lf9FLoeQOWCRwaUyVLSsTPqrW0E9lG1tO4tozu8JNCAvfDDn0NokuYU463DCwk DWkPoCcbSguqzYqZ9wBS7zIPxRhWW4Yf3SKoGQ6iCxqtbb3S+P+6nPxORfSOTkAv9Yb1 pbJQJArY+HCRij3BhPqWbSog1iSB0mgYObBJbCART8FLGdC2yw3VT/zrQLtDoq+mJBnU N64m7etktCl3dFVu4jfuGLJMJ+Q+8sY8M+UMH6v6VPUSJhAwNqJnsavIkOunibkVFHys rSWwIktae6R/iLk4XAFeJ40CTyl33Jyw4uyn7AftAjmp/GQ9sxDxaIe/kQ/XzGnHzbQv L2rg== X-Gm-Message-State: AODbwcCYKjNJ0S63oCx1RCnZotwo1GnTu02CpDCIErYjTdZ1/tPj4pRM uTLmtaqZiGcwGw== X-Received: by 10.84.222.136 with SMTP id x8mr9114657pls.50.1495168693885; Thu, 18 May 2017 21:38:13 -0700 (PDT) Received: from localhost ([39.7.57.182]) by smtp.gmail.com with ESMTPSA id d13sm13106176pfl.12.2017.05.18.21.38.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 May 2017 21:38:13 -0700 (PDT) Date: Fri, 19 May 2017 13:38:15 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Subject: Re: [PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock is available Message-ID: <20170519043815.GB593@jagdpanzerIV.localdomain> References: <1493912763-24873-1-git-send-email-pmladek@suse.com> <20170519025803.GA593@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170519025803.GA593@jagdpanzerIV.localdomain> User-Agent: Mutt/1.8.2 (2017-04-18) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170518_213835_987677_5654598C X-CRM114-Status: GOOD ( 12.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , Daniel Thompson , Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky , Chris Metcalf , Ingo Molnar , Russell King , Andrew Morton , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On (05/19/17 11:58), Sergey Senozhatsky wrote: > > void printk_nmi_exit(void) > > { > > - this_cpu_and(printk_context, ~PRINTK_NMI_CONTEXT_MASK); > > + this_cpu_and(printk_context, > > + ~(PRINTK_NMI_CONTEXT_MASK || > > + PRINTK_NMI_DEFERRED_CONTEXT_MASK)); > > } [..] > the problem is that > > `PRINTK_NMI_CONTEXT_MASK || PRINTK_NMI_DEFERRED_CONTEXT_MASK' is 0x01 d'oh... forgot to copy-paste this... --- --- -ss diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c index 6fec9cfb9a69..b6ff3fe4370a 100644 --- a/kernel/printk/printk_safe.c +++ b/kernel/printk/printk_safe.c @@ -324,7 +324,7 @@ void printk_nmi_enter(void) void printk_nmi_exit(void) { this_cpu_and(printk_context, - ~(PRINTK_NMI_CONTEXT_MASK || + ~(PRINTK_NMI_CONTEXT_MASK | PRINTK_NMI_DEFERRED_CONTEXT_MASK)); }