From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek Date: Mon, 30 Nov 2015 14:25:45 +0000 Subject: Re: [PATCH v2 1/5] printk/nmi: Generic solution for safe printk in NMI Message-Id: <20151130142545.GB8047@pathway.suse.cz> List-Id: References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-2-git-send-email-pmladek@suse.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On Fri 2015-11-27 17:26:16, Max Filippov wrote: Hi Max, > > Another exception is Xtensa architecture that uses just a > > fake NMI. > > It's called fake because it's actually maskable, but sometimes > it is safe to use it as NMI (when there are no other IRQs at the > same priority level and that level equals EXCM level). That > condition is checked in arch/xtensa/include/asm/processor.h > So 'fake' here is to avoid confusion with real NMI that exists > on xtensa (and is not currently used in linux), otherwise code > that runs in fake NMI must follow the NMI rules. > > To make xtensa compatible with your change we can add a > choice whether fake NMI should be used to kconfig. It can > then set HAVE_NMI accordingly. I'll post a patch for xtensa. Thanks a lot for explanation. I'll wait for the destiny of the patch adding CONFIG_XTENSA_FAKE_NMI. It is not easy for me to review. Anyway, we could select HAVE_NMI for Xtensa anytime later if this patchset goes in earlier. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754256AbbK3OZx (ORCPT ); Mon, 30 Nov 2015 09:25:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:36327 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752720AbbK3OZu (ORCPT ); Mon, 30 Nov 2015 09:25:50 -0500 Date: Mon, 30 Nov 2015 15:25:45 +0100 From: Petr Mladek To: Max Filippov Cc: Andrew Morton , Peter Zijlstra , Steven Rostedt , Russell King , Daniel Thompson , Jiri Kosina , Ingo Molnar , Thomas Gleixner , LKML , "maintainer:X86 ARCHITECTURE..." , "linux-arm-kernel@lists.infradead.org" , "moderated list:BLACKFIN ARCHITEC..." , "open list:CRIS PORT" , Linux/MIPS Mailing List , linuxppc-dev@lists.ozlabs.org, linux-s390 , "open list:SUPERH" , "open list:SPARC + UltraSPAR..." Subject: Re: [PATCH v2 1/5] printk/nmi: Generic solution for safe printk in NMI Message-ID: <20151130142545.GB8047@pathway.suse.cz> References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-2-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2015-11-27 17:26:16, Max Filippov wrote: Hi Max, > > Another exception is Xtensa architecture that uses just a > > fake NMI. > > It's called fake because it's actually maskable, but sometimes > it is safe to use it as NMI (when there are no other IRQs at the > same priority level and that level equals EXCM level). That > condition is checked in arch/xtensa/include/asm/processor.h > So 'fake' here is to avoid confusion with real NMI that exists > on xtensa (and is not currently used in linux), otherwise code > that runs in fake NMI must follow the NMI rules. > > To make xtensa compatible with your change we can add a > choice whether fake NMI should be used to kconfig. It can > then set HAVE_NMI accordingly. I'll post a patch for xtensa. Thanks a lot for explanation. I'll wait for the destiny of the patch adding CONFIG_XTENSA_FAKE_NMI. It is not easy for me to review. Anyway, we could select HAVE_NMI for Xtensa anytime later if this patchset goes in earlier. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx2.suse.de ([195.135.220.15]:36298 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27006999AbbK3OZsnsz2S (ORCPT ); Mon, 30 Nov 2015 15:25:48 +0100 Date: Mon, 30 Nov 2015 15:25:45 +0100 From: Petr Mladek Subject: Re: [PATCH v2 1/5] printk/nmi: Generic solution for safe printk in NMI Message-ID: <20151130142545.GB8047@pathway.suse.cz> References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-2-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Max Filippov Cc: Andrew Morton , Peter Zijlstra , Steven Rostedt , Russell King , Daniel Thompson , Jiri Kosina , Ingo Molnar , Thomas Gleixner , LKML , "maintainer:X86 ARCHITECTURE..." , "linux-arm-kernel@lists.infradead.org" , "moderated list:BLACKFIN ARCHITEC..." , "open list:CRIS PORT" , Linux/MIPS Mailing List , linuxppc-dev@lists.ozlabs.org, linux-s390 , "open list:SUPERH" , "open list:SPARC + UltraSPAR..." Message-ID: <20151130142545.-w4MmDelm64rq1YgXWg5L9D9jrILb91DEkDwz7Br6kM@z> On Fri 2015-11-27 17:26:16, Max Filippov wrote: Hi Max, > > Another exception is Xtensa architecture that uses just a > > fake NMI. > > It's called fake because it's actually maskable, but sometimes > it is safe to use it as NMI (when there are no other IRQs at the > same priority level and that level equals EXCM level). That > condition is checked in arch/xtensa/include/asm/processor.h > So 'fake' here is to avoid confusion with real NMI that exists > on xtensa (and is not currently used in linux), otherwise code > that runs in fake NMI must follow the NMI rules. > > To make xtensa compatible with your change we can add a > choice whether fake NMI should be used to kconfig. It can > then set HAVE_NMI accordingly. I'll post a patch for xtensa. Thanks a lot for explanation. I'll wait for the destiny of the patch adding CONFIG_XTENSA_FAKE_NMI. It is not easy for me to review. Anyway, we could select HAVE_NMI for Xtensa anytime later if this patchset goes in earlier. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmladek@suse.com (Petr Mladek) Date: Mon, 30 Nov 2015 15:25:45 +0100 Subject: [PATCH v2 1/5] printk/nmi: Generic solution for safe printk in NMI In-Reply-To: References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-2-git-send-email-pmladek@suse.com> Message-ID: <20151130142545.GB8047@pathway.suse.cz> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri 2015-11-27 17:26:16, Max Filippov wrote: Hi Max, > > Another exception is Xtensa architecture that uses just a > > fake NMI. > > It's called fake because it's actually maskable, but sometimes > it is safe to use it as NMI (when there are no other IRQs at the > same priority level and that level equals EXCM level). That > condition is checked in arch/xtensa/include/asm/processor.h > So 'fake' here is to avoid confusion with real NMI that exists > on xtensa (and is not currently used in linux), otherwise code > that runs in fake NMI must follow the NMI rules. > > To make xtensa compatible with your change we can add a > choice whether fake NMI should be used to kconfig. It can > then set HAVE_NMI accordingly. I'll post a patch for xtensa. Thanks a lot for explanation. I'll wait for the destiny of the patch adding CONFIG_XTENSA_FAKE_NMI. It is not easy for me to review. Anyway, we could select HAVE_NMI for Xtensa anytime later if this patchset goes in earlier. Best Regards, Petr