From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
linux-arm-kernel
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Xinwei Hu <huxinwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Tianhong Ding
<dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Hanjun Guo <guohanjun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v7 08/14] arm64: numa: Use pr_fmt()
Date: Fri, 26 Aug 2016 13:54:26 +0100 [thread overview]
Message-ID: <20160826125426.GC30302@arm.com> (raw)
In-Reply-To: <1472024693-12912-9-git-send-email-thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On Wed, Aug 24, 2016 at 03:44:47PM +0800, Zhen Lei wrote:
> From: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>
> Use pr_fmt to prefix kernel output, and remove duplicated msg
> of NUMA turned off.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
> arch/arm64/mm/numa.c | 40 ++++++++++++++++++++--------------------
> 1 file changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
> index d97c6e2..7b73808 100644
> --- a/arch/arm64/mm/numa.c
> +++ b/arch/arm64/mm/numa.c
> @@ -17,6 +17,8 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> +#define pr_fmt(fmt) "numa: " fmt
Shouldn't this be uppercase for consistency with the existing code and
the code in places like drivers/of/of_numa.c?
> #include <linux/acpi.h>
> #include <linux/bootmem.h>
> #include <linux/memblock.h>
> @@ -38,10 +40,9 @@ static __init int numa_parse_early_param(char *opt)
> {
> if (!opt)
> return -EINVAL;
> - if (!strncmp(opt, "off", 3)) {
> - pr_info("%s\n", "NUMA turned off");
> + if (!strncmp(opt, "off", 3))
> numa_off = true;
> - }
> +
> return 0;
> }
> early_param("numa", numa_parse_early_param);
> @@ -110,7 +111,7 @@ static void __init setup_node_to_cpumask_map(void)
> set_cpu_numa_node(cpu, NUMA_NO_NODE);
>
> /* cpumask_of_node() will now work */
> - pr_debug("NUMA: Node to cpumask map for %d nodes\n", nr_node_ids);
> + pr_debug("Node to cpumask map for %d nodes\n", nr_node_ids);
> }
>
> /*
> @@ -145,13 +146,13 @@ int __init numa_add_memblk(int nid, u64 start, u64 end)
>
> ret = memblock_set_node(start, (end - start), &memblock.memory, nid);
> if (ret < 0) {
> - pr_err("NUMA: memblock [0x%llx - 0x%llx] failed to add on node %d\n",
> + pr_err("memblock [0x%llx - 0x%llx] failed to add on node %d\n",
> start, (end - 1), nid);
> return ret;
> }
>
> node_set(nid, numa_nodes_parsed);
> - pr_info("NUMA: Adding memblock [0x%llx - 0x%llx] on node %d\n",
> + pr_info("Adding memblock [0x%llx - 0x%llx] on node %d\n",
> start, (end - 1), nid);
> return ret;
> }
> @@ -166,19 +167,18 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
> void *nd;
> int tnid;
>
> - pr_info("NUMA: Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
> - nid, start_pfn << PAGE_SHIFT,
> - (end_pfn << PAGE_SHIFT) - 1);
> + pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
> + nid, start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
>
> nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid);
> nd = __va(nd_pa);
>
> /* report and initialize */
> - pr_info("NUMA: NODE_DATA [mem %#010Lx-%#010Lx]\n",
> + pr_info(" NODE_DATA [mem %#010Lx-%#010Lx]\n",
Why are you adding leading whitespace?
> nd_pa, nd_pa + nd_size - 1);
> tnid = early_pfn_to_nid(nd_pa >> PAGE_SHIFT);
> if (tnid != nid)
> - pr_info("NUMA: NODE_DATA(%d) on node %d\n", nid, tnid);
> + pr_info(" NODE_DATA(%d) on node %d\n", nid, tnid);
Same here.
> node_data[nid] = nd;
> memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
> @@ -235,8 +235,7 @@ static int __init numa_alloc_distance(void)
> numa_distance[i * numa_distance_cnt + j] = i == j ?
> LOCAL_DISTANCE : REMOTE_DISTANCE;
>
> - pr_debug("NUMA: Initialized distance table, cnt=%d\n",
> - numa_distance_cnt);
> + pr_debug("Initialized distance table, cnt=%d\n", numa_distance_cnt);
>
> return 0;
> }
> @@ -257,20 +256,20 @@ static int __init numa_alloc_distance(void)
> void __init numa_set_distance(int from, int to, int distance)
> {
> if (!numa_distance) {
> - pr_warn_once("NUMA: Warning: distance table not allocated yet\n");
> + pr_warn_once("Warning: distance table not allocated yet\n");
> return;
> }
>
> if (from >= numa_distance_cnt || to >= numa_distance_cnt ||
> from < 0 || to < 0) {
> - pr_warn_once("NUMA: Warning: node ids are out of bound, from=%d to=%d distance=%d\n",
> + pr_warn_once("Warning: node ids are out of bound, from=%d to=%d distance=%d\n",
> from, to, distance);
> return;
> }
>
> if ((u8)distance != distance ||
> (from == to && distance != LOCAL_DISTANCE)) {
> - pr_warn_once("NUMA: Warning: invalid distance parameter, from=%d to=%d distance=%d\n",
> + pr_warn_once("Warning: invalid distance parameter, from=%d to=%d distance=%d\n",
> from, to, distance);
> return;
> }
> @@ -297,7 +296,7 @@ static int __init numa_register_nodes(void)
> /* Check that valid nid is set to memblks */
> for_each_memblock(memory, mblk)
> if (mblk->nid == NUMA_NO_NODE || mblk->nid >= MAX_NUMNODES) {
> - pr_warn("NUMA: Warning: invalid memblk node %d [mem %#010Lx-%#010Lx]\n",
> + pr_warn("Warning: invalid memblk node %d [mem %#010Lx-%#010Lx]\n",
> mblk->nid, mblk->base,
> mblk->base + mblk->size - 1);
> return -EINVAL;
> @@ -368,9 +367,10 @@ static int __init dummy_numa_init(void)
> struct memblock_region *mblk;
>
> if (numa_off)
> - pr_info("NUMA disabled\n"); /* Forced off on command line. */
> - pr_info("NUMA: Faking a node at [mem %#018Lx-%#018Lx]\n",
> - 0LLU, PFN_PHYS(max_pfn) - 1);
> + pr_warn("NUMA turned off by user\n"); /* Forced off on command line. */
Why are you changing the string? What's wrong with "NUMA turned off" like
we had before?
Will
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-08-26 12:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 7:44 [PATCH v7 00/14] fix some type infos and bugs for arm64/of numa Zhen Lei
2016-08-24 7:44 ` [PATCH v7 01/14] of/numa: remove a duplicated pr_debug information Zhen Lei
[not found] ` <1472024693-12912-1-git-send-email-thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-24 7:44 ` [PATCH v7 02/14] of/numa: fix a memory@ node can only contains one memory block Zhen Lei
2016-08-24 7:44 ` [PATCH v7 03/14] arm64/numa: add nid check for " Zhen Lei
[not found] ` <1472024693-12912-4-git-send-email-thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-26 12:39 ` Will Deacon
2016-08-27 8:02 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 04/14] of/numa: remove a duplicated warning Zhen Lei
2016-08-24 7:44 ` [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed Zhen Lei
[not found] ` <1472024693-12912-6-git-send-email-thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-26 12:47 ` Will Deacon
[not found] ` <20160826124746.GB30302-5wv7dgnIgG8@public.gmane.org>
2016-08-27 8:54 ` Leizhen (ThunderTown)
[not found] ` <57C15560.6020702-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-30 17:51 ` Will Deacon
[not found] ` <20160830175115.GL24906-5wv7dgnIgG8@public.gmane.org>
2016-08-31 2:29 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 06/14] of_numa: Use of_get_next_parent to simplify code Zhen Lei
2016-08-24 7:44 ` [PATCH v7 07/14] of_numa: Use pr_fmt() Zhen Lei
2016-08-24 7:44 ` [PATCH v7 08/14] arm64: numa: " Zhen Lei
[not found] ` <1472024693-12912-9-git-send-email-thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-26 12:54 ` Will Deacon [this message]
[not found] ` <20160826125426.GC30302-5wv7dgnIgG8@public.gmane.org>
2016-08-27 9:14 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 09/14] arm64/numa: support HAVE_SETUP_PER_CPU_AREA Zhen Lei
[not found] ` <1472024693-12912-10-git-send-email-thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-26 13:28 ` Will Deacon
[not found] ` <20160826132838.GE30302-5wv7dgnIgG8@public.gmane.org>
2016-08-27 10:06 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 10/14] arm64/numa: define numa_distance as array to simplify code Zhen Lei
2016-08-26 15:29 ` Will Deacon
[not found] ` <20160826152915.GH30302-5wv7dgnIgG8@public.gmane.org>
2016-08-27 10:29 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 11/14] arm64/numa: support HAVE_MEMORYLESS_NODES Zhen Lei
2016-08-26 15:43 ` Will Deacon
2016-08-27 11:05 ` Leizhen (ThunderTown)
[not found] ` <57C173ED.60501-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-29 3:15 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 12/14] arm64/numa: remove the limitation that cpu0 must bind to node0 Zhen Lei
2016-08-26 15:49 ` Will Deacon
2016-08-29 6:55 ` Leizhen (ThunderTown)
2016-08-24 7:44 ` [PATCH v7 13/14] of/numa: remove the constraint on the distances of node pairs Zhen Lei
2016-08-24 7:44 ` [PATCH v7 14/14] Documentation: " Zhen Lei
2016-08-26 15:35 ` Will Deacon
2016-08-27 10:44 ` Leizhen (ThunderTown)
[not found] ` <57C16F17.5070609-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-30 17:55 ` Will Deacon
[not found] ` <20160830175517.GM24906-5wv7dgnIgG8@public.gmane.org>
2016-08-31 2:46 ` Leizhen (ThunderTown)
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=20160826125426.GC30302@arm.com \
--to=will.deacon-5wv7dgnigg8@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=guohanjun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=huxinwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.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).