linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH V3 0/9] powerpc: Support for ibm,dynamic-memory-v2
Date: Fri, 01 Dec 2017 10:46:25 -0600	[thread overview]
Message-ID: <151214667699.64022.17601877129884655591.stgit@ltcalpine2-lp14.aus.stglabs.ibm.com> (raw)

This patch set provides a series of updates to de-couple the LMB
information provided in the device tree property from the device
tree property format. This eases the ability to support a new
format for the dynamic memory property, ibm,dynamic-memory-v2.

This series of patches consolidates the routines for parsing the
LMB device tree properties into a new file, powerpc/mm/drmem.c,
and provides the ability to retrieve LMB information without having
to know the backing device tree format.

To do this, a set of routines are introduced that will walk the
device tree property and make a call back for each LMB represented
in the device tree. These are to be used by init routines during
boot, currently in prom.c and numa.c.

A late_initcall is used to allocate and initialize a LMB array to
provide a common data structure of per-LMB data. This array provides
a data structure to retrieve LMB information without knowing the
backing tree format. This is used in numa.c and pseries/hotplug-memory.c.

This is a big design change from the first two version of the patch set
that attempted to allocate the LMB array with bootmem very early.
Testing showed that this allocation can fail which pushed the change
to the current design.

To support memory hotplug needing to update the device tree, a
common routine is introduced to create a new copy of the device
tree property in the proper format.

The first three patches update the of_get_assoc_arrays(),
of_get_usable_memory(), and of_drconf_to_nid_single() routines
to do device tree lookups for information they need instead of having
the nodes/properties passed in. These are updates needed for later
changes.

The fourth patch adds the walk_drmem_lmbs_early() routine to provide
parsing of the flattened device tree and make a per-LMB call back,
used in prom.c

The fifth patch provides a walk_drmem_lmbs() routine to parse the
device tree and provide a per-LMB call back, used in numa.c. This
also allocates and initializes the LMB array, and updates numa.c
to use the array.

The sixth patch updates pseries hotplug code new LMB array data 
instead of parsing the device tree directly and introduces the
common routine to create a new device tree property.

The seventh patch moves the of_drconf_cell struct to drmem.h where it
fits better than prom.h

The eighth patch introduces support for the ibm,dynamic-memory-v2
property format by updating the new drmem.c code to be able to parse
and create this new device tree format.

The last patch in the series updates the architecture vector to indicate
support for ibm,dynamic-memory-v2.

-Nathan
---

Nathan Fontenot (9):
      powerpc/numa: Look up device node in of_get_assoc_arrays()
      powerpc/numa: Look up device node in of_get_usable_memory()
      powerpc/numa: Look up associativity array in of_drconf_to_nid_single
      powerpc/mm: Separate ibm,dynamic-memory data from DT format
      powerpc/numa: Update numa code use walk_drmem_lmbs
      powerpc/pseries: Update memory hotplug code to use drmem LMB array
      powerpc: Move of_drconf_cell struct to asm/drmem.h
      powerpc/drmem: Add support for ibm,dynamic-memory-v2 property
      powerpc: Enable support of ibm,dynamic-memory-v2


 arch/powerpc/include/asm/drmem.h                |  100 ++++
 arch/powerpc/include/asm/firmware.h             |    3 
 arch/powerpc/include/asm/prom.h                 |   17 -
 arch/powerpc/kernel/prom.c                      |  114 ++---
 arch/powerpc/kernel/prom_init.c                 |    1 
 arch/powerpc/mm/Makefile                        |    2 
 arch/powerpc/mm/drmem.c                         |  438 +++++++++++++++++++
 arch/powerpc/mm/numa.c                          |  252 +++--------
 arch/powerpc/platforms/pseries/firmware.c       |    1 
 arch/powerpc/platforms/pseries/hotplug-memory.c |  522 +++++++++--------------
 10 files changed, 864 insertions(+), 586 deletions(-)
 create mode 100644 arch/powerpc/include/asm/drmem.h
 create mode 100644 arch/powerpc/mm/drmem.c

             reply	other threads:[~2017-12-01 17:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 16:46 Nathan Fontenot [this message]
2017-12-01 16:46 ` [PATCH V3 1/9] powerpc/numa: Look up device node in of_get_assoc_arrays() Nathan Fontenot
2018-01-17 13:30   ` [V3, " Michael Ellerman
2017-12-01 16:46 ` [PATCH V3 2/9] powerpc/numa: Look up device node in of_get_usable_memory() Nathan Fontenot
2017-12-01 16:46 ` [PATCH V3 3/9] powerpc/numa: Look up associativity array in of_drconf_to_nid_single Nathan Fontenot
2017-12-01 16:47 ` [PATCH V3 4/9] powerpc/mm: Separate ibm, dynamic-memory data from DT format Nathan Fontenot
2017-12-01 16:47 ` [PATCH V3 5/9] powerpc/numa: Update numa code use walk_drmem_lmbs Nathan Fontenot
2017-12-01 16:47 ` [PATCH V3 6/9] powerpc/pseries: Update memory hotplug code to use drmem LMB array Nathan Fontenot
2017-12-01 16:47 ` [PATCH V3 7/9] powerpc: Move of_drconf_cell struct to asm/drmem.h Nathan Fontenot
2017-12-01 16:47 ` [PATCH V3 8/9] powerpc/drmem: Add support for ibm, dynamic-memory-v2 property Nathan Fontenot
2018-01-17 13:30   ` [V3, " Michael Ellerman
2017-12-01 16:48 ` [PATCH V3 9/9] powerpc: Enable support of ibm,dynamic-memory-v2 Nathan Fontenot
2018-01-17 13:30   ` [V3,9/9] " Michael Ellerman
2017-12-04  5:13 ` [PATCH V3 0/9] powerpc: Support for ibm,dynamic-memory-v2 Michael Ellerman
2018-02-14 21:30   ` Tyrel Datwyler
2018-02-14 21:50     ` Nathan Fontenot
2018-02-14 23:21     ` Michael Ellerman

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=151214667699.64022.17601877129884655591.stgit@ltcalpine2-lp14.aus.stglabs.ibm.com \
    --to=nfont@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).