From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: "Zheng, Lv" <lv.zheng@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Jason Wessel <jason.wessel@windriver.com>,
"Tang, Feng" <feng.tang@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH v5 1/2] ACPI: Add early console framework for DBGP/DBG2.
Date: Wed, 10 Oct 2012 10:06:36 -0400 [thread overview]
Message-ID: <20121010140635.GE4005@phenom.dumpdata.com> (raw)
In-Reply-To: <1AE640813FDE7649BE1B193DEA596E88B9C9BE@SHSMSX101.ccr.corp.intel.com>
On Wed, Oct 10, 2012 at 01:31:54AM +0000, Zheng, Lv wrote:
> > > Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> > > Reviewed-by: Len Brown <len.brown@intel.com>
> > > Reviewed-by: Rui Zhang <rui.zhang@intel.com>
> > > Reviewed-by: Ying Huang <ying.huang@intel.com>
> > > Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
> > Please don't include that unless I (or other folks looking at your code) say
> > explicitly 'Acked' or 'Reviewed-by'
>
> ACK.
> I'll remove these names and resend. Thanks.
>
> > > +#define DEBUG
> > That should not be the default case.
>
> RFC.
The title of the patch does not have RFC anymore.. Please put it back
then.
> If we do not add ignore_loglevel to the command line, the acpi earlycon will be mute just as what you want.
> Do you really want this to be:
> #undef DEBUG
> If we do this, all pr_debug invocations in this file will be empty in compilation stage and are there any other means for us to view the output of ACPI earlycon without recompiling?
Correct. By the time you remove the 'RFC' part this should be the
default.
>
> > > +DECLARE_BITMAP(acpi_early_flags, MAX_ACPI_DBG_PORTS);
> > static?
>
> ACK.
> I'll do the modification.
>
> > > +int acpi_early_enabled;
> > __read_mostly and you could also make it a bool.
>
> NAK.
> I think this variable will be read only once and written up to 16 times so __read_mostly is not required.
> I'll check and add __init and __initdata for this patch.
>
> > > + set_bit(port, acpi_early_flags);
> > > + if (keep)
> > > + set_bit(port+MAX_ACPI_DBG_PORTS, acpi_early_flags);
> > Huh? The bitmap is up to MAX_ACPI_DB_PORTS, but here you offset it past
> > that? Why?
>
> ACK.
> It's my mistake. The size of the bitmap should be "MAX_ACPI_DBG_PORTS<<1 or MAX_ACPI_DBG_PORTS*2".
> The reason is:
> I think MAX_ACPI_DBG_PORTS=4 is enough in this case.
> Since the systems running Linux are 32/64 bit architectures, using 2 bitmaps will be waste.
> As the systems are at least 32 bit, the MAX_ACPI_DB_PORTS is defined as 16 to make full use of the bitmap.
>
> > > + if (!acpi_early_console_enabled(info->port_index))
> > > + return 0;
> > Not -ENODEV?
>
> NAK.
> This is to support "MULTIPLE DBG2 debug ports".
>
> ** MULTIPLE DBGP table versions and MULTIPLE DBG2 debug ports support **
> The whole patch takes ENODEV as the semantics of "table not exist or table version not supported" in PROBE/START stage so that we can obtain the ability of probing Microsoft's future tables in the order from DBGn, ..., DBG2, DBGP.
> We should not return here as users may pass the following command line:
> earlyprintk=acpi2,keep
> to let the first 2 debug ports mute, but take the 3rd as a Linux earlycon.
OK? How will this function get called three times then? I thought it
would just get called once?
>
> > > + while (((unsigned long)entry) + sizeof(struct acpi_dbg2_device) <
> > > + tbl_end) {
> > Just make it one line. Ignore the 80 characters limit here.
>
> ACK.
> I'll try to implement this within 80 characters.
Well, you don't have to - not for this.
>
> > > + if (!max_entries || count++ < max_entries) {
> > How about you just make this 'count'
> > > + pr_debug("early: DBG2 PROBE - console %d(%04x:%04x).\n",
> > > + count-1,
> > > + entry->port_type, entry->port_subtype);
> > > + devinfo.port_index = (u8)count-1;
> > Then you don't this 'count -1'
> > and then do
> > count++ here?
>
> ACK.
> It's my mistake, the previous version uses port_index=1 as the first debug port, but this version takes 0 as the first port.
>
> > > + acpi_early_console_start(&devinfo);
> > no check of the return value to see whether you should return immediately?
>
> NAK.
> See " MULTIPLE DBGP tables and MULTIPLE DBG2 debug ports support" above.
>
> > > + acpi_early_console_start(&devinfo);
> > how about 'return acpi_early_console_start(..)'
>
> NAK.
> See " MULTIPLE DBGP tables and MULTIPLE DBG2 debug ports support" above.
>
> > > + if (acpi_table_parse(ACPI_SIG_DBG2, acpi_parse_dbg2) != 0)
> > > + acpi_table_parse(ACPI_SIG_DBGP, acpi_parse_dbgp);
>
> RFC.
> This is to support "MULTIPLE DBGP table versions".
>
>
next prev parent reply other threads:[~2012-10-10 14:06 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1347453194.git.zetalog@gmail.com>
2012-09-27 8:40 ` [PATCH v3 0/2] ACPI: DBGP/DBG2 early console support for LPIA Lv Zheng
2012-09-28 2:39 ` [PATCH v4 " Lv Zheng
2012-09-27 8:41 ` [PATCH v3 1/2] ACPI: Add early console framework for DBGP/DBG2 Lv Zheng
2012-09-28 2:40 ` [PATCH v4 " Lv Zheng
2012-09-28 18:41 ` [PATCH v3 " Konrad Rzeszutek Wilk
2012-10-08 3:24 ` Zheng, Lv
2012-10-09 16:48 ` Konrad Rzeszutek Wilk
2012-09-27 8:41 ` [PATCH v3 2/2] ACPI: Add Intel MID SPI early console support Lv Zheng
2012-09-28 2:40 ` [PATCH v4 " Lv Zheng
2012-09-28 5:24 ` [PATCH v4 0/2] ACPI: DBGP/DBG2 early console support for LPIA Zheng, Lv
2012-09-28 5:37 ` [RESEND PATCH v4 1/2] ACPI: Add early console framework for DBGP/DBG2 Lv Zheng
2012-09-28 5:37 ` Lv Zheng
2012-09-28 5:37 ` [RESEND PATCH v4 2/2] ACPI: Add Intel MID SPI early console support Lv Zheng
2012-09-28 5:37 ` Lv Zheng
2012-09-28 6:36 ` [RESEND PATCH v4 0/2] ACPI: DBGP/DBG2 early console support for LPIA H. Peter Anvin
2012-10-06 18:42 ` Len Brown
2012-10-07 15:41 ` H. Peter Anvin
2012-10-08 0:51 ` Zheng, Lv
2012-10-08 0:51 ` Zheng, Lv
2012-10-10 3:23 ` [PATCH v6 1/2] ACPI: Add early console framework for DBGP/DBG2 Lv Zheng
2012-10-10 3:23 ` Lv Zheng
2012-10-10 14:10 ` Konrad Rzeszutek Wilk
2012-10-10 23:39 ` Zheng, Lv
2012-10-10 17:44 ` Matthew Garrett
2012-10-12 19:24 ` Khalid Aziz
2013-06-04 10:53 ` Grant Likely
2013-06-04 13:23 ` Matthew Garrett
2013-06-04 13:35 ` Grant Likely
2012-10-10 3:23 ` [PATCH v6 2/2] ACPI: Add Intel MID SPI early console support Lv Zheng
2012-10-10 3:23 ` Lv Zheng
2012-09-28 5:36 ` [RESEND PATCH v4 0/2] ACPI: DBGP/DBG2 early console support for LPIA Lv Zheng
2012-09-28 5:36 ` Lv Zheng
2012-10-09 2:36 ` [PATCH v5 1/2] ACPI: Add early console framework for DBGP/DBG2 Lv Zheng
2012-10-09 2:36 ` Lv Zheng
2012-10-09 17:02 ` Konrad Rzeszutek Wilk
2012-10-10 1:31 ` Zheng, Lv
2012-10-10 14:06 ` Konrad Rzeszutek Wilk [this message]
2012-10-10 1:40 ` Zheng, Lv
2012-10-09 2:37 ` [PATCH v5 2/2] ACPI: Add Intel MID SPI early console support Lv Zheng
2012-10-09 2:37 ` Lv Zheng
2012-10-09 17:06 ` Konrad Rzeszutek Wilk
2012-10-10 1:33 ` Zheng, Lv
2012-10-10 3:10 ` Zheng, Lv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121010140635.GE4005@phenom.dumpdata.com \
--to=konrad@kernel.org \
--cc=feng.tang@intel.com \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=mingo@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.