From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] console: allow log level threshold adjustments from serial console Date: Tue, 22 Sep 2015 14:35:22 +0100 Message-ID: <5601591A.1030702@citrix.com> References: <5601697302000078000A4546@prv-mh.provo.novell.com> <560154CF.3010000@citrix.com> <560172AB02000078000A4607@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZeNjA-0004bo-Mh for xen-devel@lists.xenproject.org; Tue, 22 Sep 2015 13:35:24 +0000 In-Reply-To: <560172AB02000078000A4607@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Ian Campbell , xen-devel , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 22/09/15 14:24, Jan Beulich wrote: >>>> On 22.09.15 at 15:17, wrote: >> On 22/09/15 13:45, Jan Beulich wrote: >>> +static void do_adj_thresh(unsigned char key) >>> +{ >>> + if ( *upper_thresh_adj < *lower_thresh_adj ) >>> + *upper_thresh_adj = *lower_thresh_adj; >>> + printk("'%c' pressed -> %s log level: %s (rate limited %s)\n", >>> + key, thresh_adj, loglvl_str(*lower_thresh_adj), >>> + loglvl_str(*upper_thresh_adj)); >> It might be useful for this printk() to indicate whether it was the >> standard or the guest log level which was adjusted. > It does, by printing the string thresh_adj currently points to. Ah - so it does. Sorry for the noise. > >>> +static struct keyhandler inc_thresh_keyhandler = { >>> + .irq_callback = 1, >>> + .u.irq_fn = do_inc_thresh, >>> + .desc = "increase log level threshold" >>> +}; >>> +static struct keyhandler dec_thresh_keyhandler = { >>> + .irq_callback = 1, >>> + .u.irq_fn = do_dec_thresh, >>> + .desc = "decrease log level threshold" >>> +}; >>> +static struct keyhandler toggle_guest_keyhandler = { >>> + .irq_callback = 1, >>> + .u.irq_fn = do_toggle_guest, >>> + .desc = "toggle host/guest log level adjustment" >>> +}; >>> + >> I am guessing from the looks of these that I should augment my >> keyhandler cleanup to also be able to register irq handlers from outside >> of common/keyhandler.c > Yeah, I was actually surprised you got away without (i.e. that all of > them lived in this one file so far). It surprised me as well, but I didn't fancy adding it simply for the sake of adding it. ~Andrew