linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christian Zigotzky <chzigotzky@xenosoft.de>
To: Scott Wood <oss@buserror.net>,
	LEROY Christophe <christophe.leroy@c-s.fr>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: NXP P50XX/e5500: SMP doesn't work anymore with the latest Git kernel
Date: Tue, 30 Oct 2018 02:42:11 +0100	[thread overview]
Message-ID: <7595e349-d925-9d03-c234-5070873e48d3@xenosoft.de> (raw)
In-Reply-To: <d13090a2-902e-e18c-c97f-79cddb277454@xenosoft.de>

OF patch for the latest Git kernel: http://www.xenosoft.de/of_v2.patch

----------------------------- of_v2.patch -----------------------------

diff -rupN a/drivers/of/base.c b/drivers/of/base.c
--- a/drivers/of/base.c    2018-10-30 02:19:30.827089495 +0100
+++ b/drivers/of/base.c    2018-10-30 02:18:51.666856715 +0100
@@ -395,7 +395,7 @@ struct device_node *of_get_cpu_node(int
  {
      struct device_node *cpun;

-    for_each_of_cpu_node(cpun) {
+    for_each_node_by_type(cpun, "cpu") {
          if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
              return cpun;
      }
@@ -750,45 +750,6 @@ struct device_node *of_get_next_availabl
  EXPORT_SYMBOL(of_get_next_available_child);

  /**
- *    of_get_next_cpu_node - Iterate on cpu nodes
- *    @prev:    previous child of the /cpus node, or NULL to get first
- *
- *    Returns a cpu node pointer with refcount incremented, use 
of_node_put()
- *    on it when done. Returns NULL when prev is the last child. Decrements
- *    the refcount of prev.
- */
-struct device_node *of_get_next_cpu_node(struct device_node *prev)
-{
-    struct device_node *next = NULL;
-    unsigned long flags;
-    struct device_node *node;
-
-    if (!prev)
-        node = of_find_node_by_path("/cpus");
-
-    raw_spin_lock_irqsave(&devtree_lock, flags);
-    if (prev)
-        next = prev->sibling;
-    else if (node) {
-        next = node->child;
-        of_node_put(node);
-    }
-    for (; next; next = next->sibling) {
-        if (!(of_node_name_eq(next, "cpu") ||
-              (next->type && !of_node_cmp(next->type, "cpu"))))
-            continue;
-        if (!__of_device_is_available(next))
-            continue;
-        if (of_node_get(next))
-            break;
-    }
-    of_node_put(prev);
-    raw_spin_unlock_irqrestore(&devtree_lock, flags);
-    return next;
-}
-EXPORT_SYMBOL(of_get_next_cpu_node);
-
-/**
   * of_get_compatible_child - Find compatible child node
   * @parent:    parent node
   * @compatible:    compatible string
diff -rupN a/include/linux/of.h b/include/linux/of.h
--- a/include/linux/of.h    2018-10-30 02:19:32.047096634 +0100
+++ b/include/linux/of.h    2018-10-30 02:18:51.666856715 +0100
@@ -347,7 +347,6 @@ extern const void *of_get_property(const
                  const char *name,
                  int *lenp);
  extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
-extern struct device_node *of_get_next_cpu_node(struct device_node *prev);

  #define for_each_property_of_node(dn, pp) \
      for (pp = dn->properties; pp != NULL; pp = pp->next)
@@ -757,11 +756,6 @@ static inline struct device_node *of_get
      return NULL;
  }

-static inline struct device_node *of_get_next_cpu_node(struct 
device_node *prev)
-{
-    return NULL;
-}
-
  static inline int of_n_addr_cells(struct device_node *np)
  {
      return 0;
@@ -1239,10 +1233,6 @@ static inline int of_property_read_s32(c
      for (child = of_get_next_available_child(parent, NULL); child != 
NULL; \
           child = of_get_next_available_child(parent, child))

-#define for_each_of_cpu_node(cpu) \
-    for (cpu = of_get_next_cpu_node(NULL); cpu != NULL; \
-         cpu = of_get_next_cpu_node(cpu))
-
  #define for_each_node_with_property(dn, prop_name) \
      for (dn = of_find_node_with_property(NULL, prop_name); dn; \
           dn = of_find_node_with_property(dn, prop_name))

  reply	other threads:[~2018-10-30  1:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-28 16:35 NXP P50XX/e5500: SMP doesn't work anymore with the latest Git kernel Christian Zigotzky
2018-10-29  9:56 ` Christian Zigotzky
2018-10-29 10:22   ` arch/powerpc/kvm/trace.h:9:0: error: "TRACE_INCLUDE_PATH" redefined Christian Zigotzky
2018-10-31 10:09     ` Christian Zigotzky
2018-11-05  7:09       ` Christian Zigotzky
2018-10-29 17:00   ` NXP P50XX/e5500: SMP doesn't work anymore with the latest Git kernel Christian Zigotzky
2018-10-29 18:13     ` LEROY Christophe
2018-10-29 20:12       ` Christian Zigotzky
2018-10-29 23:04         ` Scott Wood
2018-10-30  0:41           ` Christian Zigotzky
2018-10-30  1:42             ` Christian Zigotzky [this message]
2018-10-30  1:59               ` Benjamin Herrenschmidt
2018-10-30  7:27                 ` Christian Zigotzky
2018-10-30 15:05                   ` Christian Zigotzky
2018-10-29 22:24     ` Christian Zigotzky
2018-10-31 13:20       ` Michael Ellerman
2018-10-31 13:38         ` Christian Zigotzky
2018-11-07  2:11 ` Scott Wood
2018-11-07  6:46   ` Christian Zigotzky

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=7595e349-d925-9d03-c234-5070873e48d3@xenosoft.de \
    --to=chzigotzky@xenosoft.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oss@buserror.net \
    /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).