Re: FAILED: patch "[PATCH] of, numa: Return NUMA_NO_NODE from disable of_node_to_nid()" failed to apply to 4.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/01/17 16:16, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> The patch below does not apply to the 4.8-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@xxxxxxxxxxxxxxx>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From b6cc9474e2dd9f0c19b694b40961d81117f1e918 Mon Sep 17 00:00:00 2001
> From: David Daney <david.daney@xxxxxxxxxx>
> Date: Fri, 28 Oct 2016 14:15:02 -0700
> Subject: [PATCH] of, numa: Return NUMA_NO_NODE from disable of_node_to_nid()
>  if nid not possible.
> 
> 
...

Hi everybody,

sorry for the mess, it seems that this patch (b6cc9474e2dd) depends on

9787ed6e5cee7a62320f3014eb5e7b373502c292
[PATCH] of/numa: remove a duplicated warning

by Zhen Lei <thunder.leizhen@xxxxxxxxxx> from 1 Sep 2016 to be applied
for v4.7.10 and v4.8.17. After applying both I get the diff shown
below. With these changes I could boot both v4.7.10 and v4.8.17 with
"numa=off" to userspace on a Gigabyte R270-T60 server.

I apologize for the double send, hopefully now my email client is
properly configured to send plain text only.

Best Regards
Gilbert Netzer

diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 0f2784b..10bcf8f 100644
--- a/drivers/of/of_numa.c
+++ b/drivers/of/of_numa.c
@@ -187,13 +187,13 @@ int of_node_to_nid(struct device_node *device)
                        np->name);
        of_node_put(np);

-       if (!r) {
-               if (nid >= MAX_NUMNODES)
-                       pr_warn("NUMA: Node id %u exceeds maximum value\n",
-                               nid);
-               else
-                       return nid;
-       }
+       /*
+        * If numa=off passed on command line, or with a defective
+        * device tree, the nid may not be in the set of possible
+        * nodes.  Check for this case and return NUMA_NO_NODE.
+        */
+       if (!r && nid < MAX_NUMNODES && node_possible(nid))
+               return nid;

        return NUMA_NO_NODE;
 }

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]