Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp333199ybm; Thu, 28 May 2020 04:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL0NYI+z0x4Zrop+k+EYgENHPBc1nVVVapZqu9LkcTFcsLVWZykFYWR5ACJRuHMWYMVFz9 X-Received: by 2002:a17:906:8748:: with SMTP id hj8mr2625167ejb.335.1590663941255; Thu, 28 May 2020 04:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590663941; cv=none; d=google.com; s=arc-20160816; b=zJD54SrPNCh5iUWD0UjUEegR52NKQO+UxAsQTC3wH0yYLen1/oB1i3+PUHBN4gZKfz GveWACUQvkb0jia10+eVVTLKJJbWd5pk+MVUJBPIzXCXfGi87ja9Z2tqo2Fs4Gu/VXTS L7fk8iY12/KZXJadJ8gZrrLha2nb1KqLxkm8iIKEcUlaOByvG1oBUKiiVORLY1MDhrJm CC8q31GKu3yhL4vw15Fc/sMP2GuBXLDQCKu7A+khgHVlv8P0osF/tZTxDzbuUwAQBpGX sV01I9Ln7joVO1vNiFHeWzxwQkoBQ0hXA3GIScpW7AD/W1ltGGc2MvVlvSrV7JlxBXGj fgIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8YQeuOJDn06o9Kk2yXAQ8S1S/zWUs7/D7wgGQiHSlDo=; b=cmrIByO0UzZbm+EKo9ZpGa2p8p7P9ElZATIWo5vRFGfTgvOuehg+NP2bOl60XDB79J S5dnCCQNBErNMOROQgkZxUnMOncJT0B0/7bM6oQ3SVDbHG25sLoXgAHFLCm9GCpyPLwN 0eOECwVSnzJgmCTu75S6LWOPjyyy7XXeuDsV0iwZz+m7JvxjNqqLiRGc2Jh6eS+Yl1Tm 4Q8kAaqn3XZ9oRh6EaixPEuf/y3GATaZPnoqClCp98oGuOIGezv8S5uQUrVKeEKYbuf0 Zso7u8JIV/38HZu1b8VtSG4Lf1TvKUrqZV4TGk10//wpVHtk7VDFQgrIJQ0L4H/hs2DS wARA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bYqfqbrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d31si3221894edc.462.2020.05.28.04.05.17; Thu, 28 May 2020 04:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bYqfqbrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388131AbgE1LBo (ORCPT + 99 others); Thu, 28 May 2020 07:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388096AbgE1LBe (ORCPT ); Thu, 28 May 2020 07:01:34 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71181C05BD1E for ; Thu, 28 May 2020 04:01:31 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id x14so22028526wrp.2 for ; Thu, 28 May 2020 04:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8YQeuOJDn06o9Kk2yXAQ8S1S/zWUs7/D7wgGQiHSlDo=; b=bYqfqbrkFj1FZHFAzXsoQSlTYLWgrpcMnTB2pBoapXhOlKoLypnBJzKuAQnQ3D8KQ7 4FlIVcc2ATGO0OVErlukatffDWx/NrW9BSpb5EMCPEyJtiZSDAg9Pyig20jMp/BeBURX dFK7oluyit4qnyVmN74vPkDhKJivnHxhcoQiIb5AW4h1v4OrsfbOlse9z/B4JDhXBjHp 98fSCMNYP2RXclElfro2gyR4I9gan/O/UeGKDfRJgtFGtYZNFouaV1u0Go9zvUPZURln /Dsg1bd+sz52nA/2Y0mu+01QgNy2LVh6YAxZFYrYR+2zkxZc2vBwG2a3yWlrzuCz8vG7 UwNg== 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; bh=8YQeuOJDn06o9Kk2yXAQ8S1S/zWUs7/D7wgGQiHSlDo=; b=KPBK/uAB/uBDoocOrxh/xsH4U8GXgJ5Ucr5cpQzCArk0Mk2Xzg+2/n2i6GwrMmJW/C iND1OrCKkdTIqUX0mpAmS48i0ycJY8obo7SQpr1FoyGnbx9Huwgnc5mvmHrpsN45ls4J bU/3nfmKPgREOSTDAibKBTQrM2mXBEkyHbLjlPk58MKmqCHubBan/rY5PPBABPUB/F2R SvGv5/1IARzOZdlpQjqVeNdCCglxipi1UF9deQ+4zqY2SXPSkfOaSRVvuARcp6fDlcm+ 5i5nYkzx+5N9SHW8ROZOSNPN5ZXjUN+PFyPoKroWs8L6FsdVMLC4I5HnpWOUm2ByOIeX MwFw== X-Gm-Message-State: AOAM5322hhmxRuU1Z8QD0mBfzF/4DGd3VAQj7QLjjLckE4TDvgTw3EHt lp00HP3jBIqWSjNuQig/M+lCZA== X-Received: by 2002:a05:6000:120b:: with SMTP id e11mr3008597wrx.107.1590663677449; Thu, 28 May 2020 04:01:17 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id 190sm6423473wmb.23.2020.05.28.04.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 04:01:16 -0700 (PDT) Date: Thu, 28 May 2020 12:01:14 +0100 From: Daniel Thompson To: Wei Li Cc: Doug Anderson , Jason Wessel , Masahiro Yamada , kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [Kgdb-bugreport] [PATCH v3] kdb: Remove the misfeature 'KDBFLAGS' Message-ID: <20200528110114.54qbkclk5demvsmc@holly.lan> References: <20200521072125.21103-1-liwei391@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200521072125.21103-1-liwei391@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 03:21:25PM +0800, Wei Li wrote: > Currently, 'KDBFLAGS' is an internal variable of kdb, it is combined > by 'KDBDEBUG' and state flags. It will be shown only when 'KDBDEBUG' > is set, and the user can define an environment variable named 'KDBFLAGS' > too. These are puzzling indeed. > > After communication with Daniel, it seems that 'KDBFLAGS' is a misfeature. > So let's replace 'KDBFLAGS' with 'KDBDEBUG' to just show the value we > wrote into. After this modification, we can use `md4c1 kdb_flags` instead, > to observe the state flags. > > Suggested-by: Daniel Thompson > Signed-off-by: Wei Li Applied. Thanks. Daniel. > --- > v2 -> v3: > - Change to replace the internal env 'KDBFLAGS' with 'KDBDEBUG'. > v1 -> v2: > - Fix lack of braces. > > kernel/debug/kdb/kdb_main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c > index 4fc43fb17127..392029287083 100644 > --- a/kernel/debug/kdb/kdb_main.c > +++ b/kernel/debug/kdb/kdb_main.c > @@ -418,8 +418,7 @@ int kdb_set(int argc, const char **argv) > argv[2]); > return 0; > } > - kdb_flags = (kdb_flags & > - ~(KDB_DEBUG_FLAG_MASK << KDB_DEBUG_FLAG_SHIFT)) > + kdb_flags = (kdb_flags & ~KDB_DEBUG(MASK)) > | (debugflags << KDB_DEBUG_FLAG_SHIFT); > > return 0; > @@ -2081,7 +2080,8 @@ static int kdb_env(int argc, const char **argv) > } > > if (KDB_DEBUG(MASK)) > - kdb_printf("KDBFLAGS=0x%x\n", kdb_flags); > + kdb_printf("KDBDEBUG=0x%x\n", > + (kdb_flags & KDB_DEBUG(MASK)) >> KDB_DEBUG_FLAG_SHIFT); > > return 0; > } > -- > 2.17.1 > > > > _______________________________________________ > Kgdb-bugreport mailing list > Kgdb-bugreport@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport