~sforshee/+git/ubuntu-yakkety:lp1667081

Last commit made on 2017-03-07
Get this branch:
git clone -b lp1667081 https://git.launchpad.net/~sforshee/+git/ubuntu-yakkety
Only Seth Forshee can upload to this branch. If you are Seth Forshee please log in for upload directions.

Branch merges

Branch information

Name:
lp1667081
Repository:
lp:~sforshee/+git/ubuntu-yakkety

Recent commits

a0f63f9... by Seth Forshee

UBUNTU: [Config] Update CONFIG_MOVABLE_NODE values and annotations

BugLink: http://bugs.launchpad.net/bugs/1667081

CONFIG_MOVABLE_NODE is available for more architectures now than
before. It should be enabled on ppc64el as per the bug, but
disable it for arm64 and powerpc-generic to avoid changes in
those kernels. Also update the annotations and enforce the values
for this option.

Signed-off-by: Seth Forshee <email address hidden>

f200e13... by Reza Arbab <email address hidden>

powerpc/mm: unstub radix__vmemmap_remove_mapping()

BugLink: http://bugs.launchpad.net/bugs/1667081

Use remove_pagetable() and friends for radix vmemmap removal.

We do not require the special-case handling of vmemmap done in the x86
versions of these functions. This is because vmemmap_free() has already
freed the mapped pages, and calls us with an aligned address range.

So, add a few failsafe WARNs, but otherwise the code to remove physical
mappings is already sufficient for vmemmap.

Signed-off-by: Reza Arbab <email address hidden>
Acked-by: Balbir Singh <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 0d0a4bc2a6f7de19cb0256a55891955961d70b1c)
Signed-off-by: Seth Forshee <email address hidden>

8ac7930... by Reza Arbab <email address hidden>

powerpc/mm: add radix__remove_section_mapping()

BugLink: http://bugs.launchpad.net/bugs/1667081

Tear down and free the four-level page tables of physical mappings
during memory hotremove.

Borrow the basic structure of remove_pagetable() and friends from the
identically-named x86 functions. Reduce the frequency of tlb flushes and
page_table_lock spinlocks by only doing them in the outermost function.
There was some question as to whether the locking is needed at all.
Leave it for now, but we could consider dropping it.

Memory must be offline to be removed, thus not in use. So there
shouldn't be the sort of concurrent page walking activity here that
might prompt us to use RCU.

Signed-off-by: Reza Arbab <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 4b5d62ca17a1cd2ffc8399e1d1c3ebbabf16e78f)
Signed-off-by: Seth Forshee <email address hidden>

2d6e88f... by Reza Arbab <email address hidden>

powerpc/mm: add radix__create_section_mapping()

BugLink: http://bugs.launchpad.net/bugs/1667081

Wire up memory hotplug page mapping for radix. Share the mapping
function already used by radix_init_pgtable().

Signed-off-by: Reza Arbab <email address hidden>
Acked-by: Balbir Singh <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 6cc27341b21a81052f36c137bc44cf55f83e46ff)
Signed-off-by: Seth Forshee <email address hidden>

5d2e449... by Reza Arbab <email address hidden>

powerpc/mm: refactor radix physical page mapping

BugLink: http://bugs.launchpad.net/bugs/1667081

Move the page mapping code in radix_init_pgtable() into a separate
function that will also be used for memory hotplug.

The current goto loop progressively decreases its mapping size as it
covers the tail of a range whose end is unaligned. Change this to a for
loop which can do the same for both ends of the range.

Signed-off-by: Reza Arbab <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit b5200ec9edf038459619fce9988842efa751a2c5)
Signed-off-by: Seth Forshee <email address hidden>

63d8572... by Alistair Popple <email address hidden>

powerpc/powernv: Use OPAL call for TCE kill on NVLink2

BugLink: http://bugs.launchpad.net/bugs/1667081

Add detection of NPU2 PHBs. NPU2/NVLink2 has a different register
layout for the TCE kill register therefore TCE invalidation should be
done via the OPAL call rather than using the register directly as it
is for PHB3 and NVLink1. This changes TCE invalidation to use the OPAL
call in the case of a NPU2 PHB model.

Signed-off-by: Alistair Popple <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 616badd2fb499320d3ac3b54462f55dededd0e0f)
Signed-off-by: Seth Forshee <email address hidden>

c07c8f2... by Alistair Popple <email address hidden>

powerpc/powernv: Initialise nest mmu

BugLink: http://bugs.launchpad.net/bugs/1667081

POWER9 contains an off core mmu called the nest mmu (NMMU). This is
used by other hardware units on the chip to translate virtual
addresses into real addresses. The unit attempting an address
translation provides the majority of the context required for the
translation request except for the base address of the partition table
(ie. the PTCR) which needs to be programmed into the NMMU.

This patch adds a call to OPAL to set the PTCR for the nest mmu in
opal_init().

Signed-off-by: Alistair Popple <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 1d0761d2557d1540727723e4f05395d53321d555)
Signed-off-by: Seth Forshee <email address hidden>

5e28a62... by Reza Arbab <email address hidden>

powerpc/mm: Fix memory hotplug BUG() on radix

BugLink: http://bugs.launchpad.net/bugs/1667081

Memory hotplug is leading to hash page table calls, even on radix:

  arch_add_memory
    create_section_mapping
      htab_bolt_mapping
        BUG_ON(!ppc_md.hpte_insert);

To fix, refactor {create,remove}_section_mapping() into hash__ and
radix__ variants. Leave the radix versions stubbed for now.

Reviewed-by: Aneesh Kumar K.V <email address hidden>
Acked-by: Balbir Singh <email address hidden>
Signed-off-by: Reza Arbab <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 32b53c012e0bfe20b2745962a89db0dc72ef3270)
Signed-off-by: Seth Forshee <email address hidden>

a38d4eb... by Reza Arbab <email address hidden>

dt: add documentation of "hotpluggable" memory property

BugLink: http://bugs.launchpad.net/bugs/1667081

Summarize the "hotpluggable" property of dt memory nodes.

Link: http://<email address hidden>
Signed-off-by: Reza Arbab <email address hidden>
Cc: "Aneesh Kumar K.V" <email address hidden>
Cc: "H. Peter Anvin" <email address hidden>
Cc: Alistair Popple <email address hidden>
Cc: Aneesh Kumar K.V <email address hidden>
Cc: Balbir Singh <email address hidden>
Cc: Benjamin Herrenschmidt <email address hidden>
Cc: Bharata B Rao <email address hidden>
Cc: Frank Rowand <email address hidden>
Cc: Ingo Molnar <email address hidden>
Cc: Michael Ellerman <email address hidden>
Cc: Nathan Fontenot <email address hidden>
Cc: Paul Mackerras <email address hidden>
Cc: Rob Herring <email address hidden>
Cc: Stewart Smith <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
(cherry picked from commit c3352cbb1bdf198e81141700eb7003b8e2de1f1a)
Signed-off-by: Seth Forshee <email address hidden>

22affb2... by Reza Arbab <email address hidden>

of/fdt: mark hotpluggable memory

BugLink: http://bugs.launchpad.net/bugs/1667081

When movable nodes are enabled, any node containing only hotpluggable
memory is made movable at boot time.

On x86, hotpluggable memory is discovered by parsing the ACPI SRAT,
making corresponding calls to memblock_mark_hotplug().

If we introduce a dt property to describe memory as hotpluggable,
configs supporting early fdt may then also do this marking and use
movable nodes.

Link: http://<email address hidden>
Signed-off-by: Reza Arbab <email address hidden>
Tested-by: Balbir Singh <email address hidden>
Acked-by: Balbir Singh <email address hidden>
Cc: "Aneesh Kumar K.V" <email address hidden>
Cc: "H. Peter Anvin" <email address hidden>
Cc: Alistair Popple <email address hidden>
Cc: Aneesh Kumar K.V <email address hidden>
Cc: Benjamin Herrenschmidt <email address hidden>
Cc: Bharata B Rao <email address hidden>
Cc: Frank Rowand <email address hidden>
Cc: Ingo Molnar <email address hidden>
Cc: Michael Ellerman <email address hidden>
Cc: Nathan Fontenot <email address hidden>
Cc: Paul Mackerras <email address hidden>
Cc: Rob Herring <email address hidden>
Cc: Stewart Smith <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
(cherry picked from commit 41a9ada3e6b4253f1a3ce42699c6aaeb8584306c)
Signed-off-by: Seth Forshee <email address hidden>