sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chris hyser <chris.hyser@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sparc64: Setup sysfs to mark LDOM sockets, cores and threads correctly
Date: Wed, 25 Mar 2015 22:53:28 +0000	[thread overview]
Message-ID: <55133C68.4040905@oracle.com> (raw)
In-Reply-To: <1426795630-135778-1-git-send-email-david.ahern@oracle.com>

Yes. Sorry. You pointed out many of these formatting issues to me in a prior sunvdc patch that I still need to resubmit. 
David took this and added to it not realizing these issues were there. I will work with David on a resubmission.

So other than that, are you happy with the approach?

-chrish

On 3/25/2015 12:44 AM, David Miller wrote:
> From: David Ahern <david.ahern@oracle.com>
> Date: Thu, 19 Mar 2015 16:07:10 -0400
>
>> -static void mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id)
>> +static void __cpuinit find_back_node_value(struct mdesc_handle *hp, u64 node,
>> +	       char *srch_val, void(*func)(struct mdesc_handle *, u64, int),
>> +	       u64 val, int depth)
>>   {
>
> Function arguments on the second and subsequent line shall start
> exactly at the first column after the openning parenthesis of
> the function definition/declaration.  You should use the appropriate
> number of TAB then SPACE characters necessary to do so.
>
> If you are only using TAB characters to indent this kind of thing,
> it's probably not right.
>
>> +	/*since we have estimate of how deep, do recursion sanity check */
>> +	if (depth = 0)
>> +		return;
>
> Please capitalize and properly punctuate this.  Also put
> a space after "/*".
>
>> +	mdesc_for_each_arc(arc, hp, node, MDESC_ARC_TYPE_BACK) {
>> +		u64 n = mdesc_arc_target(hp, arc);
>> +		const char *name = mdesc_node_name(hp, n);
>>
>> -				n_name = mdesc_node_name(hp, n);
>> -				if (strcmp(n_name, "cpu"))
>> -					continue;
>> +	if (!strcmp(srch_val, name))
>> +		(*func)(hp, n, val);
>
> This needs one more TAB of indentation.
>
>> +	find_back_node_value(hp, n, srch_val, func, val, depth-1);
>
> This as well.  This doesn't look strange in your editor?
>
>> +static void __cpuinit __mark_core_id(struct mdesc_handle *hp, u64 node,
>> +		int core_id)
>
> Please fix argument indentation.
>
>> +static void __cpuinit __mark_sock_id(struct mdesc_handle *hp, u64 node,
>> +		int sock_id)
>
> Likewise.
>
>> +static void __cpuinit mark_core_ids(struct mdesc_handle *hp, u64 mp,
>> +		int core_id)
>
> Likewise.
>
>> +static void __cpuinit mark_sock_ids(struct mdesc_handle *hp, u64 mp,
>> +		int sock_id)
>
> Likewise.
>
>> +	/*
>> +	 * identify unique cores by looking for cpus backpointed to by
>> +	 * level 1 instruction caches
>> +	 */
>> +
>
> Please capitalize this sentence and format the comment:
>
> 	/* Like
> 	 * this.
> 	 */
>
>> +	/*
>> +	 * identify unique sockets by looking for cpus backpointed to by
>> +	 * level 3 caches
>> +	 */
>
> Likewise.
>
>> +	/* if machine description exposes sockets data use it.
>> +	 * otherwise fallback to use L3 cache
>> +	 */
>
> Capitalize and properly punctuate.
>
>> +		if (sun4v_chip_type = SUN4V_CHIP_SPARC_M7) {
>> +			pr_warn("Machine description does not contain sockets node. Falling back\n");
>> +			pr_warn("to identifying CPUs to sockets using L3 cache which is known to\n");
>> +			pr_warn("be wrong for M7 processors (e.g, lscpu shows wrong number of sockets).\n");
>> +			pr_warn("Please update the firmware.\n");
>> +		}
>
> If this isn't going to happen on FCS hardware, I wouldn't even bother
> with this warning.
>
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  parent reply	other threads:[~2015-03-25 22:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 20:07 [PATCH] sparc64: Setup sysfs to mark LDOM sockets, cores and threads correctly David Ahern
2015-03-20  1:57 ` David Miller
2015-03-25  4:44 ` David Miller
2015-03-25 22:53 ` chris hyser [this message]
2015-03-26 22:57 ` David Miller

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=55133C68.4040905@oracle.com \
    --to=chris.hyser@oracle.com \
    --cc=sparclinux@vger.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;
as well as URLs for NNTP newsgroup(s).