From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Date: Fri, 15 Nov 2019 12:36:57 +0900 Subject: [OpenRISC] [PATCH 00/50] Add log level to show_stack() In-Reply-To: <20191113103922.3dc3e8e9@gandalf.local.home> References: <20191106030542.868541-1-dima@arista.com> <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> <20191108103719.GB175344@google.com> <20191108130447.h3wfgo4efjkto56f@pathway.suse.cz> <20191111012336.GA85185@google.com> <13e72b62-c842-8ed5-5b41-bc1692b28f53@arista.com> <20191112021747.GA68506@google.com> <20191113103922.3dc3e8e9@gandalf.local.home> Message-ID: <20191115033657.GA407@tigerII.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On (19/11/13 10:39), Steven Rostedt wrote: [..] > > void show_stack(struct task_struct *task, unsigned long *sp, int log_level) > > { > > printk_emergency_enter(log_level); > > __show_stack(task, sp); > > printk_emergency_exit(); > > } > > // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // > > > > show_stack() never schedules, disabling preemption around it should > > not change anything. Should it be interrupted, we will handle it via > > preempt count. > > Please no! The whole point of the printk rewrite was to allow for > printk to be preemptible and used in more contexts. The show_stack() can > be all over the place and is not a fast function. Let's not disable > preemption for it. I never said that this code should be used all over the place. What I did say several times was that this code is for quick debugging, when one sits behind a slow serial console and wants to tweak loglevel of all printk-s of a particular context/function only. -ss