17 Sep, 2019

1 commit

  • The documentation pages for 'elfnote' and 'ultravisor'
    are not included in the powerpc documentation index, this
    generates Sphinx warnings:

    WARNING: document isn't included in any toctree

    Additionally, when one includes these missing doc pages,
    more Sphinx warnings appear. Unused footnote references,
    syntax highlighting and table of content ordering has
    been adjusted.

    Signed-off-by: Adam Zerella
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20190915052905.13431-1-adam.zerella@gmail.com

    Adam Zerella
     

13 Sep, 2019

5 commits


30 Aug, 2019

2 commits

  • Protected Execution Facility (PEF) is an architectural change for
    POWER 9 that enables Secure Virtual Machines (SVMs). When enabled,
    PEF adds a new higher privileged mode, called Ultravisor mode, to POWER
    architecture. Along with the new mode there is new firmware called the
    Protected Execution Ultravisor (or Ultravisor for short).

    POWER 9 DD2.3 chips (PVR=0x004e1203) or greater will be PEF-capable.

    Attached documentation provides an overview of PEF and defines the API
    for various interfaces that must be implemented in the Ultravisor
    firmware as well as in the KVM Hypervisor.

    Based on input from Mike Anderson, Thiago Bauermann, Claudio Carvalho,
    Ben Herrenschmidt, Guerney Hunt, Paul Mackerras.

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Ram Pai
    Signed-off-by: Guerney Hunt
    Reviewed-by: Claudio Carvalho
    Reviewed-by: Michael Anderson
    Reviewed-by: Thiago Bauermann
    Signed-off-by: Claudio Carvalho
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20190822034838.27876-2-cclaudio@linux.ibm.com

    Sukadev Bhattiprolu
     
  • The ELF note documentation describes the types and descriptors to be
    used with the PowerPC namespace.

    Signed-off-by: Maxiwell S. Garcia
    Signed-off-by: Claudio Carvalho
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20190829155021.2915-3-maxiwell@linux.ibm.com

    Maxiwell S. Garcia
     

17 Jul, 2019

1 commit

  • Convert docs to ReST and add them to the arch-specific
    book.

    The conversion here was trivial, as almost every file there
    was already using an elegant format close to ReST standard.

    The changes were mostly to mark literal blocks and add a few
    missing section title identifiers.

    One note with regards to "--": on Sphinx, this can't be used
    to identify a list, as it will format it badly. This can be
    used, however, to identify a long hyphen - and "---" is an
    even longer one.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Andrew Donnellan # cxl

    Mauro Carvalho Chehab
     

15 Jul, 2019

1 commit


14 Jul, 2019

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Notable changes:

    - Removal of the NPU DMA code, used by the out-of-tree Nvidia driver,
    as well as some other functions only used by drivers that haven't
    (yet?) made it upstream.

    - A fix for a bug in our handling of hardware watchpoints (eg. perf
    record -e mem: ...) which could lead to register corruption and
    kernel crashes.

    - Enable HAVE_ARCH_HUGE_VMAP, which allows us to use large pages for
    vmalloc when using the Radix MMU.

    - A large but incremental rewrite of our exception handling code to
    use gas macros rather than multiple levels of nested CPP macros.

    And the usual small fixes, cleanups and improvements.

    Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Andreas Schwab,
    Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann,
    Athira Rajeev, Cédric Le Goater, Christian Lamparter, Christophe
    Leroy, Christophe Lombard, Christoph Hellwig, Daniel Axtens, Denis
    Efremov, Enrico Weigelt, Frederic Barrat, Gautham R. Shenoy, Geert
    Uytterhoeven, Geliang Tang, Gen Zhang, Greg Kroah-Hartman, Greg Kurz,
    Gustavo Romero, Krzysztof Kozlowski, Madhavan Srinivasan, Masahiro
    Yamada, Mathieu Malaterre, Michael Neuling, Nathan Lynch, Naveen N.
    Rao, Nicholas Piggin, Nishad Kamdar, Oliver O'Halloran, Qian Cai, Ravi
    Bangoria, Sachin Sant, Sam Bobroff, Satheesh Rajendran, Segher
    Boessenkool, Shaokun Zhang, Shawn Anastasio, Stewart Smith, Suraj
    Jitindar Singh, Thiago Jung Bauermann, YueHaibing"

    * tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (163 commits)
    powerpc/powernv/idle: Fix restore of SPRN_LDBAR for POWER9 stop state.
    powerpc/eeh: Handle hugepages in ioremap space
    ocxl: Update for AFU descriptor template version 1.1
    powerpc/boot: pass CONFIG options in a simpler and more robust way
    powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h
    powerpc/irq: Don't WARN continuously in arch_local_irq_restore()
    powerpc/module64: Use symbolic instructions names.
    powerpc/module32: Use symbolic instructions names.
    powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h
    powerpc/module64: Fix comment in R_PPC64_ENTRY handling
    powerpc/boot: Add lzo support for uImage
    powerpc/boot: Add lzma support for uImage
    powerpc/boot: don't force gzipped uImage
    powerpc/8xx: Add microcode patch to move SMC parameter RAM.
    powerpc/8xx: Use IO accessors in microcode programming.
    powerpc/8xx: replace #ifdefs by IS_ENABLED() in microcode.c
    powerpc/8xx: refactor programming of microcode CPM params.
    powerpc/8xx: refactor printing of microcode patch name.
    powerpc/8xx: Refactor microcode write
    powerpc/8xx: refactor writing of CPM microcode arrays
    ...

    Linus Torvalds
     

04 Jul, 2019

1 commit


15 Jun, 2019

1 commit

  • Convert kdump documentation to ReST and add it to the
    user faced manual, as the documents are mainly focused on
    sysadmins that would be enabling kdump.

    Note: the vmcoreinfo.rst has one very long title on one of its
    sub-sections:

    PG_lru|PG_private|PG_swapcache|PG_swapbacked|PG_slab|PG_hwpoision|PG_head_mask|PAGE_BUDDY_MAPCOUNT_VALUE(~PG_buddy)|PAGE_OFFLINE_MAPCOUNT_VALUE(~PG_offline)

    I opted to break this one, into two entries with the same content,
    in order to make it easier to display after being parsed in html and PDF.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

09 Jun, 2019

1 commit

  • Sphinx doesn't like orphan documents:

    Documentation/accelerators/ocxl.rst: WARNING: document isn't included in any toctree
    Documentation/arm/stm32/overview.rst: WARNING: document isn't included in any toctree
    Documentation/arm/stm32/stm32f429-overview.rst: WARNING: document isn't included in any toctree
    Documentation/arm/stm32/stm32f746-overview.rst: WARNING: document isn't included in any toctree
    Documentation/arm/stm32/stm32f769-overview.rst: WARNING: document isn't included in any toctree
    Documentation/arm/stm32/stm32h743-overview.rst: WARNING: document isn't included in any toctree
    Documentation/arm/stm32/stm32mp157-overview.rst: WARNING: document isn't included in any toctree
    Documentation/gpu/msm-crash-dump.rst: WARNING: document isn't included in any toctree
    Documentation/interconnect/interconnect.rst: WARNING: document isn't included in any toctree
    Documentation/laptops/lg-laptop.rst: WARNING: document isn't included in any toctree
    Documentation/powerpc/isa-versions.rst: WARNING: document isn't included in any toctree
    Documentation/virtual/kvm/amd-memory-encryption.rst: WARNING: document isn't included in any toctree
    Documentation/virtual/kvm/vcpu-requests.rst: WARNING: document isn't included in any toctree

    So, while they aren't on any toctree, add :orphan: to them, in order
    to silent this warning.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Andrew Donnellan
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

03 May, 2019

1 commit


20 Apr, 2019

1 commit

  • This adds a flag so that the DAWR can be enabled on P9 via:
    echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous

    The DAWR was previously force disabled on POWER9 in:
    9654153158 powerpc: Disable DAWR in the base POWER9 CPU features
    Also see Documentation/powerpc/DAWR-POWER9.txt

    This is a dangerous setting, USE AT YOUR OWN RISK.

    Some users may not care about a bad user crashing their box
    (ie. single user/desktop systems) and really want the DAWR. This
    allows them to force enable DAWR.

    This flag can also be used to disable DAWR access. Once this is
    cleared, all DAWR access should be cleared immediately and your
    machine once again safe from crashing.

    Userspace may get confused by toggling this. If DAWR is force
    enabled/disabled between getting the number of breakpoints (via
    PTRACE_GETHWDBGINFO) and setting the breakpoint, userspace will get an
    inconsistent view of what's available. Similarly for guests.

    For the DAWR to be enabled in a KVM guest, the DAWR needs to be force
    enabled in the host AND the guest. For this reason, this won't work on
    POWERVM as it doesn't allow the HCALL to work. Writes of 'Y' to the
    dawr_enable_dangerous file will fail if the hypervisor doesn't support
    writing the DAWR.

    To double check the DAWR is working, run this kernel selftest:
    tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
    Any errors/failures/skips mean something is wrong.

    Signed-off-by: Michael Neuling
    Signed-off-by: Michael Ellerman

    Michael Neuling
     

21 Dec, 2018

1 commit

  • One of the primary issues with Firmware Assisted Dump (fadump) on Power
    is that it needs a large amount of memory to be reserved. On large
    systems with TeraBytes of memory, this reservation can be quite
    significant.

    In some cases, fadump fails if the memory reserved is insufficient, or
    if the reserved memory was DLPAR hot-removed.

    In the normal case, post reboot, the preserved memory is filtered to
    extract only relevant areas of interest using the makedumpfile tool.
    While the tool provides flexibility to determine what needs to be part
    of the dump and what memory to filter out, all supported distributions
    default this to "Capture only kernel data and nothing else".

    We take advantage of this default and the Linux kernel's Contiguous
    Memory Allocator (CMA) to fundamentally change the memory reservation
    model for fadump.

    Instead of setting aside a significant chunk of memory nobody can use,
    this patch uses CMA instead, to reserve a significant chunk of memory
    that the kernel is prevented from using (due to MIGRATE_CMA), but
    applications are free to use it. With this fadump will still be able
    to capture all of the kernel memory and most of the user space memory
    except the user pages that were present in CMA region.

    Essentially, on a P9 LPAR with 2 cores, 8GB RAM and current upstream:
    [root@zzxx-yy10 ~]# free -m
    total used free shared buff/cache available
    Mem: 7557 193 6822 12 541 6725
    Swap: 4095 0 4095

    With this patch:
    [root@zzxx-yy10 ~]# free -m
    total used free shared buff/cache available
    Mem: 8133 194 7464 12 475 7338
    Swap: 4095 0 4095

    Changes made here are completely transparent to how fadump has
    traditionally worked.

    Thanks to Aneesh Kumar and Anshuman Khandual for helping us understand
    CMA and its usage.

    TODO:
    - Handle case where CMA reservation spans nodes.

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Mahesh Salgaonkar
    Signed-off-by: Hari Bathini
    Signed-off-by: Michael Ellerman

    Mahesh Salgaonkar
     

20 Dec, 2018

1 commit


10 Sep, 2018

1 commit

  • This is a respin with a wider audience (all that get_maintainer returned)
    and I know this spams a *lot* of people. Not sure what would be the correct
    way, so my apologies for ruining your inbox.

    The 00-INDEX files are supposed to give a summary of all files present
    in a directory, but these files are horribly out of date and their
    usefulness is brought into question. Often a simple "ls" would reveal
    the same information as the filenames are generally quite descriptive as
    a short introduction to what the file covers (it should not surprise
    anyone what Documentation/sched/sched-design-CFS.txt covers)

    A few years back it was mentioned that these files were no longer really
    needed, and they have since then grown further out of date, so perhaps
    it is time to just throw them out.

    A short status yields the following _outdated_ 00-INDEX files, first
    counter is files listed in 00-INDEX but missing in the directory, last
    is files present but not listed in 00-INDEX.

    List of outdated 00-INDEX:
    Documentation: (4/10)
    Documentation/sysctl: (0/1)
    Documentation/timers: (1/0)
    Documentation/blockdev: (3/1)
    Documentation/w1/slaves: (0/1)
    Documentation/locking: (0/1)
    Documentation/devicetree: (0/5)
    Documentation/power: (1/1)
    Documentation/powerpc: (0/5)
    Documentation/arm: (1/0)
    Documentation/x86: (0/9)
    Documentation/x86/x86_64: (1/1)
    Documentation/scsi: (4/4)
    Documentation/filesystems: (2/9)
    Documentation/filesystems/nfs: (0/2)
    Documentation/cgroup-v1: (0/2)
    Documentation/kbuild: (0/4)
    Documentation/spi: (1/0)
    Documentation/virtual/kvm: (1/0)
    Documentation/scheduler: (0/2)
    Documentation/fb: (0/1)
    Documentation/block: (0/1)
    Documentation/networking: (6/37)
    Documentation/vm: (1/3)

    Then there are 364 subdirectories in Documentation/ with several files that
    are missing 00-INDEX alltogether (and another 120 with a single file and no
    00-INDEX).

    I don't really have an opinion to whether or not we /should/ have 00-INDEX,
    but the above 00-INDEX should either be removed or be kept up to date. If
    we should keep the files, I can try to keep them updated, but I rather not
    if we just want to delete them anyway.

    As a starting point, remove all index-files and references to 00-INDEX and
    see where the discussion is going.

    Signed-off-by: Henrik Austad
    Acked-by: "Paul E. McKenney"
    Just-do-it-by: Steven Rostedt
    Reviewed-by: Jens Axboe
    Acked-by: Paul Moore
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mark Brown
    Acked-by: Mike Rapoport
    Cc: [Almost everybody else]
    Signed-off-by: Jonathan Corbet

    Henrik Austad
     

02 Jul, 2018

2 commits


08 Jul, 2017

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Highlights include:

    - Support for STRICT_KERNEL_RWX on 64-bit server CPUs.

    - Platform support for FSP2 (476fpe) board

    - Enable ZONE_DEVICE on 64-bit server CPUs.

    - Generic & powerpc spin loop primitives to optimise busy waiting

    - Convert VDSO update function to use new update_vsyscall() interface

    - Optimisations to hypercall/syscall/context-switch paths

    - Improvements to the CPU idle code on Power8 and Power9.

    As well as many other fixes and improvements.

    Thanks to: Akshay Adiga, Andrew Donnellan, Andrew Jeffery, Anshuman
    Khandual, Anton Blanchard, Balbir Singh, Benjamin Herrenschmidt,
    Christophe Leroy, Christophe Lombard, Colin Ian King, Dan Carpenter,
    Gautham R. Shenoy, Hari Bathini, Ian Munsie, Ivan Mikhaylov, Javier
    Martinez Canillas, Madhavan Srinivasan, Masahiro Yamada, Matt Brown,
    Michael Neuling, Michal Suchanek, Murilo Opsfelder Araujo, Naveen N.
    Rao, Nicholas Piggin, Oliver O'Halloran, Paul Mackerras, Pavel Machek,
    Russell Currey, Santosh Sivaraj, Stephen Rothwell, Thiago Jung
    Bauermann, Yang Li"

    * tag 'powerpc-4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (158 commits)
    powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs
    powerpc/mm/radix: Implement STRICT_RWX/mark_rodata_ro() for Radix
    powerpc/mm/hash: Implement mark_rodata_ro() for hash
    powerpc/vmlinux.lds: Align __init_begin to 16M
    powerpc/lib/code-patching: Use alternate map for patch_instruction()
    powerpc/xmon: Add patch_instruction() support for xmon
    powerpc/kprobes/optprobes: Use patch_instruction()
    powerpc/kprobes: Move kprobes over to patch_instruction()
    powerpc/mm/radix: Fix execute permissions for interrupt_vectors
    powerpc/pseries: Fix passing of pp0 in updatepp() and updateboltedpp()
    powerpc/64s: Blacklist rtas entry/exit from kprobes
    powerpc/64s: Blacklist functions invoked on a trap
    powerpc/64s: Un-blacklist system_call() from kprobes
    powerpc/64s: Move system_call() symbol to just after setting MSR_EE
    powerpc/64s: Blacklist system_call() and system_call_common() from kprobes
    powerpc/64s: Convert .L__replay_interrupt_return to a local label
    powerpc64/elfv1: Only dereference function descriptor for non-text symbols
    cxl: Export library to support IBM XSL
    powerpc/dts: Use #include "..." to include local DT
    powerpc/perf/hv-24x7: Aggregate result elements on POWER9 SMT8
    ...

    Linus Torvalds
     

27 Jun, 2017

4 commits

  • Adopt the SISLite AFU debug capability to allow future CXL Flash
    adapters the ability to better debug AFU issues. Update the SISLite
    header with the changes necessary to support AFU debug operations
    and create a host ioctl interface for user debug software. Also
    update the cxlflash documentation to describe this new host ioctl.

    Signed-off-by: Matthew R. Ochs
    Signed-off-by: Uma Krishnan
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     
  • Adopt the SISLite AFU LUN provisioning capability to allow future CXL
    Flash adapters the ability to better manage storage. Update the SISLite
    header with the changes necessary to support LUN provision operations
    and create a host ioctl interface for user LUN management software. Also
    update the cxlflash documentation to describe this new host ioctl.

    Signed-off-by: Matthew R. Ochs
    Signed-off-by: Uma Krishnan
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     
  • As staging for supporting various host management functions, add a host
    ioctl infrastructure to filter ioctl commands and perform operations that
    are common for all host ioctls. Also update the cxlflash documentation to
    create a new section for documenting host ioctls.

    Signed-off-by: Matthew R. Ochs
    Signed-off-by: Uma Krishnan
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     
  • AFU sync operations are not currently evaluated for failure. This is
    acceptable for paths where there is not a dependency on the AFU being
    consistent with the host. Examples include link reset events and LUN
    cleanup operations. On paths where there is a dependency, such as a LUN
    open, a sync failure should be acted upon.

    In the event of AFU sync failures, either log or cleanup as appropriate for
    operations that are dependent on a successful sync completion.

    Update documentation to reflect behavior in the event of an AFU sync
    failure.

    Signed-off-by: Uma Krishnan
    Acked-by: Matthew R. Ochs
    Signed-off-by: Martin K. Petersen

    Uma Krishnan
     

02 Jun, 2017

1 commit


09 May, 2017

1 commit

  • As we are reusing crashkernel parameter instead of fadump_reserve_mem
    parameter to specify the memory to reserve for fadump's crash kernel,
    update the documentation accordingly.

    Link: http://lkml.kernel.org/r/149035347559.6881.14224829694291758581.stgit@hbathini.in.ibm.com
    Signed-off-by: Hari Bathini
    Acked-by: Michael Ellerman
    Cc: Fenghua Yu
    Cc: Tony Luck
    Cc: Dave Young
    Cc: Eric Biederman
    Cc: Mahesh Salgaonkar
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hari Bathini
     

06 May, 2017

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Highlights include:

    - Larger virtual address space on 64-bit server CPUs. By default we
    use a 128TB virtual address space, but a process can request access
    to the full 512TB by passing a hint to mmap().

    - Support for the new Power9 "XIVE" interrupt controller.

    - TLB flushing optimisations for the radix MMU on Power9.

    - Support for CAPI cards on Power9, using the "Coherent Accelerator
    Interface Architecture 2.0".

    - The ability to configure the mmap randomisation limits at build and
    runtime.

    - Several small fixes and cleanups to the kprobes code, as well as
    support for KPROBES_ON_FTRACE.

    - Major improvements to handling of system reset interrupts,
    correctly treating them as NMIs, giving them a dedicated stack and
    using a new hypervisor call to trigger them, all of which should
    aid debugging and robustness.

    - Many fixes and other minor enhancements.

    Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Alistair Popple,
    Andrew Donnellan, Aneesh Kumar K.V, Anshuman Khandual, Anton
    Blanchard, Balbir Singh, Ben Hutchings, Benjamin Herrenschmidt,
    Bhupesh Sharma, Chris Packham, Christian Zigotzky, Christophe Leroy,
    Christophe Lombard, Daniel Axtens, David Gibson, Gautham R. Shenoy,
    Gavin Shan, Geert Uytterhoeven, Guilherme G. Piccoli, Hamish Martin,
    Hari Bathini, Kees Cook, Laurent Dufour, Madhavan Srinivasan, Mahesh J
    Salgaonkar, Mahesh Salgaonkar, Masami Hiramatsu, Matt Brown, Matthew
    R. Ochs, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Oliver
    O'Halloran, Pan Xinhui, Paul Mackerras, Rashmica Gupta, Russell
    Currey, Sukadev Bhattiprolu, Thadeu Lima de Souza Cascardo, Tobin C.
    Harding, Tyrel Datwyler, Uma Krishnan, Vaibhav Jain, Vipin K Parashar,
    Yang Shi"

    * tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits)
    powerpc/64s: Power9 has no LPCR[VRMASD] field so don't set it
    powerpc/powernv: Fix TCE kill on NVLink2
    powerpc/mm/radix: Drop support for CPUs without lockless tlbie
    powerpc/book3s/mce: Move add_taint() later in virtual mode
    powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body
    powerpc/smp: Document irq enable/disable after migrating IRQs
    powerpc/mpc52xx: Don't select user-visible RTAS_PROC
    powerpc/powernv: Document cxl dependency on special case in pnv_eeh_reset()
    powerpc/eeh: Clean up and document event handling functions
    powerpc/eeh: Avoid use after free in eeh_handle_special_event()
    cxl: Mask slice error interrupts after first occurrence
    cxl: Route eeh events to all drivers in cxl_pci_error_detected()
    cxl: Force context lock during EEH flow
    powerpc/64: Allow CONFIG_RELOCATABLE if COMPILE_TEST
    powerpc/xmon: Teach xmon oops about radix vectors
    powerpc/mm/hash: Fix off-by-one in comment about kernel contexts ids
    powerpc/pseries: Enable VFIO
    powerpc/powernv: Fix iommu table size calculation hook for small tables
    powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc
    powerpc: Add arch/powerpc/tools directory
    ...

    Linus Torvalds
     

14 Apr, 2017

1 commit

  • At present, the cxlflash driver only supports hardware with two FC ports. The
    code was initially designed with this assumption and is dependent on having
    two FC ports - adding more ports will break logic within the driver.

    To mitigate this issue, remove the existing port assumptions and transition
    the code to support more than two ports. As a side effect, clarify the
    interpretation of the DK_CXLFLASH_ALL_PORTS_ACTIVE flag.

    Signed-off-by: Matthew R. Ochs
    Signed-off-by: Uma Krishnan
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     

13 Apr, 2017

1 commit

  • The new Coherent Accelerator Interface Architecture, level 2, for the
    IBM POWER9 brings new content and features:
    - POWER9 Service Layer
    - Registers
    - Radix mode
    - Process element entry
    - Dedicated-Shared Process Programming Model
    - Translation Fault Handling
    - CAPP
    - Memory Context ID
    If a valid mm_struct is found the memory context id is used for each
    transaction associated with the process handle. The PSL uses the
    context ID to find the corresponding process element.

    Signed-off-by: Christophe Lombard
    Acked-by: Frederic Barrat
    [mpe: Fixup comment formatting, unsplit long strings]
    Signed-off-by: Michael Ellerman

    Christophe Lombard
     

31 Mar, 2017

1 commit


08 Oct, 2016

2 commits

  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - Major rework of Book3S 64-bit exception vectors (Nicholas Piggin)
    - Use gas sections for arranging exception vectors et. al.
    - Large set of TM cleanups and selftests (Cyril Bur)
    - Enable transactional memory (TM) lazily for userspace (Cyril Bur)
    - Support for XZ compression in the zImage wrapper (Oliver
    O'Halloran)
    - Add support for bpf constant blinding (Naveen N. Rao)
    - Beginnings of upstream support for PA Semi Nemo motherboards
    (Darren Stevens)

    Fixes:
    - Ensure .mem(init|exit).text are within _stext/_etext (Michael
    Ellerman)
    - xmon: Don't use ld on 32-bit (Michael Ellerman)
    - vdso64: Use double word compare on pointers (Anton Blanchard)
    - powerpc/nvram: Fix an incorrect partition merge (Pan Xinhui)
    - powerpc: Fix usage of _PAGE_RO in hugepage (Christophe Leroy)
    - powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K
    (Aneesh Kumar K.V)
    - Fix memory leak in queue_hotplug_event() error path (Andrew
    Donnellan)
    - Replay hypervisor maintenance interrupt first (Nicholas Piggin)

    Various performance optimisations (Anton Blanchard):
    - Align hot loops of memset() and backwards_memcpy()
    - During context switch, check before setting mm_cpumask
    - Remove static branch prediction in atomic{, 64}_add_unless
    - Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little
    endian
    - Set default CPU type to POWER8 for little endian builds

    Cleanups & features:
    - Sparse fixes/cleanups (Daniel Axtens)
    - Preserve CFAR value on SLB miss caused by access to bogus address
    (Paul Mackerras)
    - Radix MMU fixups for POWER9 (Aneesh Kumar K.V)
    - Support for setting used_(vsr|vr|spe) in sigreturn path (for CRIU)
    (Simon Guo)
    - Optimise syscall entry for virtual, relocatable case (Nicholas
    Piggin)
    - Optimise MSR handling in exception handling (Nicholas Piggin)
    - Support for kexec with Radix MMU (Benjamin Herrenschmidt)
    - powernv EEH fixes (Russell Currey)
    - Suprise PCI hotplug support for powernv (Gavin Shan)
    - Endian/sparse fixes for powernv PCI (Gavin Shan)
    - Defconfig updates (Anton Blanchard)
    - KVM: PPC: Book3S HV: Migrate pinned pages out of CMA (Balbir Singh)
    - cxl: Flush PSL cache before resetting the adapter (Frederic Barrat)
    - cxl: replace loop with for_each_child_of_node(), remove unneeded
    of_node_put() (Andrew Donnellan)
    - Fix HV facility unavailable to use correct handler (Nicholas
    Piggin)
    - Remove unnecessary syscall trampoline (Nicholas Piggin)
    - fadump: Fix build break when CONFIG_PROC_VMCORE=n (Michael
    Ellerman)
    - Quieten EEH message when no adapters are found (Anton Blanchard)
    - powernv: Add PHB register dump debugfs handle (Russell Currey)
    - Use kprobe blacklist for exception handlers & asm functions
    (Nicholas Piggin)
    - Document the syscall ABI (Nicholas Piggin)
    - MAINTAINERS: Update cxl maintainers (Michael Neuling)
    - powerpc: Remove all usages of NO_IRQ (Michael Ellerman)

    Minor cleanups:
    - Andrew Donnellan, Christophe Leroy, Colin Ian King, Cyril Bur,
    Frederic Barrat, Pan Xinhui, PrasannaKumar Muralidharan, Rui Teng,
    Simon Guo"

    * tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits)
    powerpc/bpf: Add support for bpf constant blinding
    powerpc/bpf: Implement support for tail calls
    powerpc/bpf: Introduce accessors for using the tmp local stack space
    powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n
    powerpc: tm: Enable transactional memory (TM) lazily for userspace
    powerpc/tm: Add TM Unavailable Exception
    powerpc: Remove do_load_up_transact_{fpu,altivec}
    powerpc: tm: Rename transct_(*) to ck(\1)_state
    powerpc: tm: Always use fp_state and vr_state to store live registers
    selftests/powerpc: Add checks for transactional VSXs in signal contexts
    selftests/powerpc: Add checks for transactional VMXs in signal contexts
    selftests/powerpc: Add checks for transactional FPUs in signal contexts
    selftests/powerpc: Add checks for transactional GPRs in signal contexts
    selftests/powerpc: Check that signals always get delivered
    selftests/powerpc: Add TM tcheck helpers in C
    selftests/powerpc: Allow tests to extend their kill timeout
    selftests/powerpc: Introduce GPR asm helper header file
    selftests/powerpc: Move VMX stack frame macros to header file
    selftests/powerpc: Rework FPU stack placement macros and move to header file
    selftests/powerpc: Check for VSX preservation across userspace preemption
    ...

    Linus Torvalds
     
  • Pull SCSI updates from James Bottomley:
    "This update includes the usual round of major driver updates (hpsa,
    be2iscsi, hisi_sas, zfcp, cxlflash). There's a new incarnation of hpsa
    called smartpqi for which a driver is added, there's some cleanup work
    of the ibm vscsi target and updates to libfc, plus a whole host of
    minor fixes and updates and finally the removal of several ISA drivers
    which seem not to have been used for years"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (173 commits)
    scsi: mvsas: Mark symbols static where possible
    scsi: pm8001: Mark symbols static where possible
    scsi: arcmsr: Simplify user_len checking
    scsi: fcoe: fix off by one in eth2fc_speed()
    scsi: dtc: remove from tree
    scsi: t128: remove from tree
    scsi: pas16: remove from tree
    scsi: u14-34f: remove from tree
    scsi: ultrastor: remove from tree
    scsi: in2000: remove from tree
    scsi: wd7000: remove from tree
    scsi: scsi_dh_alua: Fix memory leak in alua_rtpg()
    scsi: lpfc: Mark symbols static where possible
    scsi: hpsa: correct call to hpsa_do_reset
    scsi: ufs: Get a TM service response from the correct offset
    scsi: ibmvfc: Fix I/O hang when port is not mapped
    scsi: megaraid_sas: clean function declarations in megaraid_sas_base.c up
    scsi: ipr: Remove redundant messages at adapter init time
    scsi: ipr: Don't log unnecessary 9084 error details
    scsi: smartpqi: raid bypass lba calculation fix
    ...

    Linus Torvalds
     

20 Sep, 2016

1 commit

  • Add some documentation for the 64-bit syscall ABI, which doesn't seem
    to be documented elsewhere.

    This attempts to document existing practice. The only small discrepancy
    is glibc clobbers not quite matching the kernel (e.g., xer, some
    vsyscalls trash cr1 whereas glibc only clobbers cr0). These will be
    resolved after this document is merged.

    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michael Ellerman

    Nicholas Piggin
     

29 Aug, 2016

1 commit

  • Userspace can begin and suspend a transaction within the signal
    handler which means they might enter sys_rt_sigreturn() with the
    processor in suspended state.

    sys_rt_sigreturn() wants to restore process context (which may have
    been in a transaction before signal delivery). To do this it must
    restore TM SPRS. To achieve this, any transaction initiated within the
    signal frame must be discarded in order to be able to restore TM SPRs
    as TM SPRs can only be manipulated non-transactionally..
    >From the PowerPC ISA:
    TM Bad Thing Exception [Category: Transactional Memory]
    An attempt is made to execute a mtspr targeting a TM register in
    other than Non-transactional state.

    Not doing so results in a TM Bad Thing:
    [12045.221359] Kernel BUG at c000000000050a40 [verbose debug info unavailable]
    [12045.221470] Unexpected TM Bad Thing exception at c000000000050a40 (msr 0x201033)
    [12045.221540] Oops: Unrecoverable exception, sig: 6 [#1]
    [12045.221586] SMP NR_CPUS=2048 NUMA PowerNV
    [12045.221634] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE
    nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4
    xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ebtable_filter
    ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables kvm_hv kvm
    uio_pdrv_genirq ipmi_powernv uio powernv_rng ipmi_msghandler autofs4 ses enclosure
    scsi_transport_sas bnx2x ipr mdio libcrc32c
    [12045.222167] CPU: 68 PID: 6178 Comm: sigreturnpanic Not tainted 4.7.0 #34
    [12045.222224] task: c0000000fce38600 ti: c0000000fceb4000 task.ti: c0000000fceb4000
    [12045.222293] NIP: c000000000050a40 LR: c0000000000163bc CTR: 0000000000000000
    [12045.222361] REGS: c0000000fceb7ac0 TRAP: 0700 Not tainted (4.7.0)
    [12045.222418] MSR: 9000000300201033 CR: 28444280 XER: 20000000
    [12045.222625] CFAR: c0000000000163b8 SOFTE: 0 PACATMSCRATCH: 900000014280f033
    GPR00: 01100000b8000001 c0000000fceb7d40 c00000000139c100 c0000000fce390d0
    GPR04: 900000034280f033 0000000000000000 0000000000000000 0000000000000000
    GPR08: 0000000000000000 b000000000001033 0000000000000001 0000000000000000
    GPR12: 0000000000000000 c000000002926400 0000000000000000 0000000000000000
    GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
    GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
    GPR24: 0000000000000000 00003ffff98cadd0 00003ffff98cb470 0000000000000000
    GPR28: 900000034280f033 c0000000fceb7ea0 0000000000000001 c0000000fce390d0
    [12045.223535] NIP [c000000000050a40] tm_restore_sprs+0xc/0x1c
    [12045.223584] LR [c0000000000163bc] tm_recheckpoint+0x5c/0xa0
    [12045.223630] Call Trace:
    [12045.223655] [c0000000fceb7d80] [c000000000026e74] sys_rt_sigreturn+0x494/0x6c0
    [12045.223738] [c0000000fceb7e30] [c0000000000092e0] system_call+0x38/0x108
    [12045.223806] Instruction dump:
    [12045.223841] 7c800164 4e800020 7c0022a6 f80304a8 7c0222a6 f80304b0 7c0122a6 f80304b8
    [12045.223955] 4e800020 e80304a8 7c0023a6 e80304b0 e80304b8 7c0123a6 4e800020
    [12045.224074] ---[ end trace cb8002ee240bae76 ]---

    It isn't clear exactly if there is really a use case for userspace
    returning with a suspended transaction, however, doing so doesn't (on
    its own) constitute a bad frame. As such, this patch simply discards
    the transactional state of the context calling the sigreturn and
    continues.

    Reported-by: Laurent Dufour
    Signed-off-by: Cyril Bur
    Tested-by: Laurent Dufour
    Reviewed-by: Laurent Dufour
    Acked-by: Simon Guo
    Signed-off-by: Benjamin Herrenschmidt

    Cyril Bur
     

24 Aug, 2016

2 commits

  • Update the block library link in the API documentation.

    Signed-off-by: Matthew R. Ochs
    Acked-by: Manoj N. Kumar
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     
  • Caching the adapter file descriptor and performing a close on behalf of
    an application is a poor design. This is due to the fact that once a
    file descriptor in installed, it is free to be altered without the
    knowledge of the cxlflash driver. This can lead to inconsistencies
    between the application and kernel. Furthermore, the nature of the
    former design is more exploitable and thus should be abandoned.

    To support applications performing a close on the adapter file that is
    associated with a context, a new flag is introduced to the user API to
    indicate to applications that they are responsible for the close
    following the cleanup (detach) of a context. The documentation is also
    updated to reflect this change in behavior.

    Inspired-by: Al Viro
    Signed-off-by: Matthew R. Ochs
    Acked-by: Manoj N. Kumar
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     

11 Apr, 2016

1 commit

  • IBM online documentation for EEH uses "extended error handling" and
    "enhanced error handling" to refer to the same thing, in different
    places. The only place mentioning it as "enhanced error handling" in the
    kernel is the MAINTAINERS file, and it's "extended" in some documentation.

    IBM originally defined EEH as "enhanced error handling", so standardise
    all mentions of EEH to use that term.

    Signed-off-by: Russell Currey
    Acked-by: Gavin Shan
    Signed-off-by: Michael Ellerman

    Russell Currey
     

09 Mar, 2016

1 commit

  • The new flash.c file contains the logic to flash a new image on the
    adapter, through a hcall. It is an iterative process, with chunks of
    data of 1M at a time. There are also 2 phases: write and verify. The
    flash operation itself is driven from a user-land tool.
    Once flashing is successful, an rtas call is made to update the device
    tree with the new properties values for the adapter and the AFU(s)

    Add a new char device for the adapter, so that the flash tool can
    access the card, even if there is no valid AFU on it.

    Co-authored-by: Frederic Barrat
    Signed-off-by: Frederic Barrat
    Signed-off-by: Christophe Lombard
    Reviewed-by: Manoj Kumar
    Acked-by: Ian Munsie
    Signed-off-by: Michael Ellerman

    Christophe Lombard