From: "H. Peter Anvin" <hpa@zytor.com>
To: Vivek Goyal <vgoyal@redhat.com>, Andi Kleen <ak@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, Junjie Mao <eternal.n08@gmail.com>
Subject: Re: [PATCH] x86, boot: add hex output for debugging
Date: Fri, 31 Oct 2014 13:15:06 -0700 [thread overview]
Message-ID: <5453EDCA.6040406@zytor.com> (raw)
In-Reply-To: <20141031201156.GJ2851@redhat.com>
On 10/31/2014 01:11 PM, Vivek Goyal wrote:
> On Fri, Oct 31, 2014 at 10:42:51AM -0700, Andi Kleen wrote:
>>>> +void __puthex(unsigned long value)
>>>> +{
>>>> + char alpha[2] = "0";
>>>> + int bits;
>>>> + unsigned char byte;
>>>
>>> what is 'byte' for? (unused)
>>
>> Well the whole function is unused. We don't normally add unused functions
>> to the code because they bitrot too easily.
>
> I think this is useful. I had to write similar code for printing out
> values during early boot.
>
> May be we can print some values if CONFIG_X86_VERBOSE_BOOTUP=y.
> That way it will not be an unused code and others can reuse it easily
> to print additional data during debugging.
>
The various addresses involved in decompression (load address, relocated
address, etc.) might be good ideas.
-hpa
next prev parent reply other threads:[~2014-10-31 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 16:20 [PATCH] x86, boot: add hex output for debugging Kees Cook
2014-10-31 17:19 ` Randy Dunlap
2014-10-31 17:42 ` Andi Kleen
2014-10-31 20:11 ` Vivek Goyal
2014-10-31 20:15 ` H. Peter Anvin [this message]
2014-10-31 20:33 ` josh
2014-10-31 20:55 ` Kees Cook
2014-10-31 23:56 ` Josh Triplett
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=5453EDCA.6040406@zytor.com \
--to=hpa@zytor.com \
--cc=ak@linux.intel.com \
--cc=eternal.n08@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox