17 Oct, 2020

2 commits

  • Pull documentation updates from Mauro Carvalho Chehab:
    "A series of patches addressing warnings produced by make htmldocs.
    This includes:

    - kernel-doc markup fixes

    - ReST fixes

    - Updates at the build system in order to support newer versions of
    the docs build toolchain (Sphinx)

    After this series, the number of html build warnings should reduce
    significantly, and building with Sphinx 3.1 or later should now be
    supported (although it is still recommended to use Sphinx 2.4.4).

    As agreed with Jon, I should be sending you a late pull request by the
    end of the merge window addressing remaining issues with docs build,
    as there are a number of warning fixes that depends on pull requests
    that should be happening along the merge window.

    The end goal is to have a clean htmldocs build on Kernel 5.10.

    PS. It should be noticed that Sphinx 3.0 is not currently supported,
    as it lacks support for C domain namespaces. Such feature, needed in
    order to document uAPI system calls with Sphinx 3.x, was added only on
    Sphinx 3.1"

    * tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (75 commits)
    PM / devfreq: remove a duplicated kernel-doc markup
    mm/doc: fix a literal block markup
    workqueue: fix a kernel-doc warning
    docs: virt: user_mode_linux_howto_v2.rst: fix a literal block markup
    Input: sparse-keymap: add a description for @sw
    rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu
    nl80211: docs: add a description for s1g_cap parameter
    usb: docs: document altmode register/unregister functions
    kunit: test.h: fix a bad kernel-doc markup
    drivers: core: fix kernel-doc markup for dev_err_probe()
    docs: bio: fix a kerneldoc markup
    kunit: test.h: solve kernel-doc warnings
    block: bio: fix a warning at the kernel-doc markups
    docs: powerpc: syscall64-abi.rst: fix a malformed table
    drivers: net: hamradio: fix document location
    net: appletalk: Kconfig: Fix docs location
    dt-bindings: fix references to files converted to yaml
    memblock: get rid of a :c:type leftover
    math64.h: kernel-docs: Convert some markups into normal comments
    media: uAPI: buffer.rst: remove a left-over documentation
    ...

    Linus Torvalds
     
  • Pull powerpc updates from Michael Ellerman:

    - A series from Nick adding ARCH_WANT_IRQS_OFF_ACTIVATE_MM & selecting
    it for powerpc, as well as a related fix for sparc.

    - Remove support for PowerPC 601.

    - Some fixes for watchpoints & addition of a new ptrace flag for
    detecting ISA v3.1 (Power10) watchpoint features.

    - A fix for kernels using 4K pages and the hash MMU on bare metal
    Power9 systems with > 16TB of RAM, or RAM on the 2nd node.

    - A basic idle driver for shallow stop states on Power10.

    - Tweaks to our sched domains code to better inform the scheduler about
    the hardware topology on Power9/10, where two SMT4 cores can be
    presented by firmware as an SMT8 core.

    - A series doing further reworks & cleanups of our EEH code.

    - Addition of a filter for RTAS (firmware) calls done via sys_rtas(),
    to prevent root from overwriting kernel memory.

    - Other smaller features, fixes & cleanups.

    Thanks to: Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V,
    Athira Rajeev, Biwen Li, Cameron Berkenpas, Cédric Le Goater, Christophe
    Leroy, Christoph Hellwig, Colin Ian King, Daniel Axtens, David Dai, Finn
    Thain, Frederic Barrat, Gautham R. Shenoy, Greg Kurz, Gustavo Romero,
    Ira Weiny, Jason Yan, Joel Stanley, Jordan Niethe, Kajol Jain, Konrad
    Rzeszutek Wilk, Laurent Dufour, Leonardo Bras, Liu Shixin, Luca
    Ceresoli, Madhavan Srinivasan, Mahesh Salgaonkar, Nathan Lynch, Nicholas
    Mc Guire, Nicholas Piggin, Nick Desaulniers, Oliver O'Halloran, Pedro
    Miraglia Franco de Carvalho, Pratik Rajesh Sampat, Qian Cai, Qinglang
    Miao, Ravi Bangoria, Russell Currey, Satheesh Rajendran, Scott Cheloha,
    Segher Boessenkool, Srikar Dronamraju, Stan Johnson, Stephen Kitt,
    Stephen Rothwell, Thiago Jung Bauermann, Tyrel Datwyler, Vaibhav Jain,
    Vaidyanathan Srinivasan, Vasant Hegde, Wang Wensheng, Wolfram Sang, Yang
    Yingliang, zhengbin.

    * tag 'powerpc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (228 commits)
    Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
    selftests/powerpc: Fix eeh-basic.sh exit codes
    cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier
    powerpc/time: Make get_tb() common to PPC32 and PPC64
    powerpc/time: Make get_tbl() common to PPC32 and PPC64
    powerpc/time: Remove get_tbu()
    powerpc/time: Avoid using get_tbl() and get_tbu() internally
    powerpc/time: Make mftb() common to PPC32 and PPC64
    powerpc/time: Rename mftbl() to mftb()
    powerpc/32s: Remove #ifdef CONFIG_PPC_BOOK3S_32 in head_book3s_32.S
    powerpc/32s: Rename head_32.S to head_book3s_32.S
    powerpc/32s: Setup the early hash table at all time.
    powerpc/time: Remove ifdef in get_dec() and set_dec()
    powerpc: Remove get_tb_or_rtc()
    powerpc: Remove __USE_RTC()
    powerpc: Tidy up a bit after removal of PowerPC 601.
    powerpc: Remove support for PowerPC 601
    powerpc: Remove PowerPC 601
    powerpc: Drop SYNC_601() ISYNC_601() and SYNC()
    powerpc: Remove CONFIG_PPC601_SYNC_FIX
    ...

    Linus Torvalds
     

15 Oct, 2020

2 commits

  • As reported:

    Documentation/powerpc/syscall64-abi.rst:53: WARNING: Malformed table.
    Text in column margin in table line 2.

    =========== ============= ========================================
    --- For the sc instruction, differences with the ELF ABI ---
    r0 Volatile (System call number.)

    This table requires a different notation to be valid.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Pull devicetree updates from Rob Herring:

    - Update dtc to upstream version v1.6.0-31-gcbca977ea121

    - dtx_diff help text reformatting

    - Speed-up validation time for binding and dtb checks using json for
    intermediate files

    - Add support for running yamllint on DT schema files

    - Remove old booting-without-of.rst

    - Extend the example schema to address common issues

    - Cleanup handling of additionalProperties/unevaluatedProperties

    - Ensure all DSI controller schemas reference dsi-controller.yaml

    - Vendor prefixes for Zealz, Wandbord/Technexion, Embest RIoT, Rex,
    DFI, and Cisco Meraki

    - Convert at25, SPMI bus, TI hwlock, HiSilicon Hi3660 USB3 PHY, Arm
    SP805 watchdog, Arm SP804, and Samsung 11-pin USB connector to DT
    schema

    - Convert HiSilicon SoC and syscon bindings to DT schema

    - Convert SiFive Risc-V L2 cache, PLIC, PRCI, and PWM to DT schema

    - Convert i.MX bindings for w1, crypto, rng, SIM, PM, DDR, SATA, vf610
    GPIO, and UART to DT schema

    - Add i.MX 8M compatible strings

    - Add LM81 and DS1780 as trivial devices

    - Various missing properties added to fix dtb validation warnings

    * tag 'devicetree-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (111 commits)
    dt-bindings: misc: explicitly add #address-cells for slave mode
    spi: dt-bindings: spi-controller: explicitly require #address-cells= for slave mode
    dt: Remove booting-without-of.rst
    dt-bindings: update usb-c-connector example
    dt-bindings: arm: hisilicon: add missing properties into cpuctrl.yaml
    dt-bindings: arm: hisilicon: add missing properties into sysctrl.yaml
    dt-bindings: pwm: imx: document i.MX compatibles
    scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121
    dt-bindings: Add running yamllint to dt_binding_check
    dt-bindings: powerpc: Add a schema for the 'sleep' property
    dt-bindings: pinctrl: sirf: Fix typo abitrary
    dt-bindings: pinctrl: qcom: Fix typo abitrary
    dt-bindings: Explicitly allow additional properties in common schemas
    dt-bindings: Use 'additionalProperties' instead of 'unevaluatedProperties'
    dt-bindings: Add missing 'unevaluatedProperties'
    Docs: Fixing spelling errors in Documentation/devicetree/bindings/
    dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings to json-schema
    dt-bindings: riscv: convert pwm bindings to json-schema
    dt-bindings: riscv: convert plic bindings to json-schema
    dt-bindings: fu540: prci: convert PRCI bindings to json-schema
    ...

    Linus Torvalds
     

14 Oct, 2020

1 commit

  • booting-without-of.rst is an ancient document that first outlined
    Flattened DeviceTree on PowerPC initially. The DT world has evolved a
    lot in the 15 years since and booting-without-of.rst is pretty stale.
    The name of the document itself is confusing if you don't understand the
    evolution from real 'OpenFirmware'. Most of what booting-without-of.rst
    contains is now in the DT specification (which evolved out of the
    ePAPR). The few things that weren't documented in the DT specification
    are now.

    All that remains is the boot entry details, so let's move these to arch
    specific documents. The exception is arm which already has the same
    details documented.

    Cc: Frank Rowand
    Cc: Mauro Carvalho Chehab
    Cc: Geert Uytterhoeven
    Cc: Michael Ellerman
    Cc: Thomas Bogendoerfer
    Cc: Jonathan Corbet
    Cc: Paul Mackerras
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Borislav Petkov
    Cc: "H. Peter Anvin"
    Cc: x86@kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-mips@vger.kernel.org
    Cc: linux-doc@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Borislav Petkov
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Rob Herring

    Rob Herring
     

15 Sep, 2020

1 commit

  • PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 can be used to determine whether
    we are running on an ISA 3.1 compliant machine. Which is needed to
    determine DAR behaviour, 512 byte boundary limit etc. This was
    requested by Pedro Miraglia Franco de Carvalho for extending
    watchpoint features in gdb. Note that availability of 2nd DAWR is
    independent of this flag and should be checked using
    ppc_debug_info->num_data_bps.

    Signed-off-by: Ravi Bangoria
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20200902042945.129369-8-ravi.bangoria@linux.ibm.com

    Ravi Bangoria
     

14 Sep, 2020

1 commit


08 Sep, 2020

1 commit


27 Aug, 2020

1 commit

  • Fix malformed table warning in powerpc/syscall64-abi.rst by making
    two tables and moving the headings.

    Documentation/powerpc/syscall64-abi.rst:53: WARNING: Malformed table.
    Text in column margin in table line 2.

    =========== ============= ========================================
    --- For the sc instruction, differences with the ELF ABI ---
    r0 Volatile (System call number.)
    r3 Volatile (Parameter 1, and return value.)
    r4-r8 Volatile (Parameters 2-6.)
    cr0 Volatile (cr0.SO is the return error condition.)
    cr1, cr5-7 Nonvolatile
    lr Nonvolatile

    --- For the scv 0 instruction, differences with the ELF ABI ---
    r0 Volatile (System call number.)
    r3 Volatile (Parameter 1, and return value.)
    r4-r8 Volatile (Parameters 2-6.)
    =========== ============= ========================================

    Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions")
    Signed-off-by: Randy Dunlap
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/e06de4d3-a36f-2745-9775-467e125436cc@infradead.org

    Randy Dunlap
     

10 Aug, 2020

1 commit


08 Aug, 2020

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - Add support for (optionally) using queued spinlocks & rwlocks.

    - Support for a new faster system call ABI using the scv instruction on
    Power9 or later.

    - Drop support for the PROT_SAO mmap/mprotect flag as it will be
    unsupported on Power10 and future processors, leaving us with no way
    to implement the functionality it requests. This risks breaking
    userspace, though we believe it is unused in practice.

    - A bug fix for, and then the removal of, our custom stack expansion
    checking. We now allow stack expansion up to the rlimit, like other
    architectures.

    - Remove the remnants of our (previously disabled) topology update
    code, which tried to react to NUMA layout changes on virtualised
    systems, but was prone to crashes and other problems.

    - Add PMU support for Power10 CPUs.

    - A change to our signal trampoline so that we don't unbalance the link
    stack (branch return predictor) in the signal delivery path.

    - Lots of other cleanups, refactorings, smaller features and so on as
    usual.

    Thanks to: Abhishek Goel, Alastair D'Silva, Alexander A. Klimov, Alexey
    Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju
    T Sudhakar, Anton Blanchard, Arnd Bergmann, Athira Rajeev, Balamuruhan
    S, Bharata B Rao, Bill Wendling, Bin Meng, Cédric Le Goater, Chris
    Packham, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Dan
    Williams, David Lamparter, Desnes A. Nunes do Rosario, Erhard F., Finn
    Thain, Frederic Barrat, Ganesh Goudar, Gautham R. Shenoy, Geoff Levand,
    Greg Kurz, Gustavo A. R. Silva, Hari Bathini, Harish, Imre Kaloz, Joel
    Stanley, Joe Perches, John Crispin, Jordan Niethe, Kajol Jain, Kamalesh
    Babulal, Kees Cook, Laurent Dufour, Leonardo Bras, Li RongQing, Madhavan
    Srinivasan, Mahesh Salgaonkar, Mark Cave-Ayland, Michal Suchanek, Milton
    Miller, Mimi Zohar, Murilo Opsfelder Araujo, Nathan Chancellor, Nathan
    Lynch, Naveen N. Rao, Nayna Jain, Nicholas Piggin, Oliver O'Halloran,
    Palmer Dabbelt, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud,
    Pingfan Liu, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Randy
    Dunlap, Ravi Bangoria, Sachin Sant, Sam Bobroff, Sandipan Das, Santosh
    Sivaraj, Satheesh Rajendran, Shirisha Ganta, Sourabh Jain, Srikar
    Dronamraju, Stan Johnson, Stephen Rothwell, Thadeu Lima de Souza
    Cascardo, Thiago Jung Bauermann, Tom Lane, Vaibhav Jain, Vladis Dronov,
    Wei Yongjun, Wen Xiong, YueHaibing.

    * tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (337 commits)
    selftests/powerpc: Fix pkey syscall redefinitions
    powerpc: Fix circular dependency between percpu.h and mmu.h
    powerpc/powernv/sriov: Fix use of uninitialised variable
    selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs
    powerpc/40x: Fix assembler warning about r0
    powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric
    powerpc/papr_scm: Fetch nvdimm performance stats from PHYP
    cpuidle: pseries: Fixup exit latency for CEDE(0)
    cpuidle: pseries: Add function to parse extended CEDE records
    cpuidle: pseries: Set the latency-hint before entering CEDE
    selftests/powerpc: Fix online CPU selection
    powerpc/perf: Consolidate perf_callchain_user_[64|32]()
    powerpc/pseries/hotplug-cpu: Remove double free in error path
    powerpc/pseries/mobility: Add pr_debug() for device tree changes
    powerpc/pseries/mobility: Set pr_fmt()
    powerpc/cacheinfo: Warn if cache object chain becomes unordered
    powerpc/cacheinfo: Improve diagnostics about malformed cache lists
    powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages
    powerpc/cacheinfo: Set pr_fmt()
    powerpc: fix function annotations to avoid section mismatch warnings with gcc-10
    ...

    Linus Torvalds
     

05 Aug, 2020

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "It's been a busy cycle for documentation - hopefully the busiest for a
    while to come. Changes include:

    - Some new Chinese translations

    - Progress on the battle against double words words and non-HTTPS
    URLs

    - Some block-mq documentation

    - More RST conversions from Mauro. At this point, that task is
    essentially complete, so we shouldn't see this kind of churn again
    for a while. Unless we decide to switch to asciidoc or
    something...:)

    - Lots of typo fixes, warning fixes, and more"

    * tag 'docs-5.9' of git://git.lwn.net/linux: (195 commits)
    scripts/kernel-doc: optionally treat warnings as errors
    docs: ia64: correct typo
    mailmap: add entry for
    doc/zh_CN: add cpu-load Chinese version
    Documentation/admin-guide: tainted-kernels: fix spelling mistake
    MAINTAINERS: adjust kprobes.rst entry to new location
    devices.txt: document rfkill allocation
    PCI: correct flag name
    docs: filesystems: vfs: correct flag name
    docs: filesystems: vfs: correct sync_mode flag names
    docs: path-lookup: markup fixes for emphasis
    docs: path-lookup: more markup fixes
    docs: path-lookup: fix HTML entity mojibake
    CREDITS: Replace HTTP links with HTTPS ones
    docs: process: Add an example for creating a fixes tag
    doc/zh_CN: add Chinese translation prefer section
    doc/zh_CN: add clearing-warn-once Chinese version
    doc/zh_CN: add admin-guide index
    doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label
    futex: MAINTAINERS: Re-add selftests directory
    ...

    Linus Torvalds
     

28 Jul, 2020

2 commits

  • The Ultravisor is expected to explicitly call H_SVM_PAGE_IN for all the
    pages of the SVM before calling H_SVM_INIT_DONE. This causes a huge
    delay in tranistioning the VM to SVM. The Ultravisor is only interested
    in the pages that contain the kernel, initrd and other important data
    structures. The rest contain throw-away content.

    However if not all pages are requested by the Ultravisor, the Hypervisor
    continues to consider the GFNs corresponding to the non-requested pages
    as normal GFNs. This can lead to data-corruption and undefined behavior.

    In H_SVM_INIT_DONE handler, move all the PFNs associated with the SVM's
    GFNs to secure-PFNs. Skip the GFNs that are already Paged-in or Shared
    or Paged-in followed by a Paged-out.

    Reviewed-by: Bharata B Rao
    Signed-off-by: Ram Pai
    Signed-off-by: Paul Mackerras

    Ram Pai
     
  • Page-merging of pages in memory-slots associated with a Secure VM
    is disabled in H_SVM_PAGE_IN handler.

    This operation should have been done the much earlier; the moment the VM
    is initiated for secure-transition. Delaying this operation increases
    the probability for those pages to acquire new references, making it
    impossible to migrate those pages in H_SVM_PAGE_IN handler.

    Disable page-migration in H_SVM_INIT_START handling.

    Reviewed-by: Bharata B Rao
    Signed-off-by: Ram Pai
    Signed-off-by: Paul Mackerras

    Ram Pai
     

23 Jul, 2020

1 commit

  • From Nick's cover letter:

    Linux powerpc new system call instruction and ABI

    System Call Vectored (scv) ABI
    ==============================

    The scv instruction is introduced with POWER9 / ISA3, it comes with an
    rfscv counter-part. The benefit of these instructions is
    performance (trading slower SRR0/1 with faster LR/CTR registers, and
    entering the kernel with MSR[EE] and MSR[RI] left enabled, which can
    reduce MSR updates. The scv instruction has 128 levels (not enough to
    cover the Linux system call space).

    Assignment and advertisement
    ----------------------------
    The proposal is to assign scv levels conservatively, and advertise
    them with HWCAP feature bits as we add support for more.

    Linux has not enabled FSCR[SCV] yet, so executing the scv instruction
    will cause the kernel to log a "SCV facility unavilable" message, and
    deliver a SIGILL with ILL_ILLOPC to the process. Linux has defined a
    HWCAP2 bit PPC_FEATURE2_SCV for SCV support, but does not set it.

    This change allocates the zero level ('scv 0'), advertised with
    PPC_FEATURE2_SCV, which will be used to provide normal Linux system
    calls (equivalent to 'sc').

    Attempting to execute scv with other levels will cause a SIGILL to be
    delivered the same as before, but will not log a "SCV facility
    unavailable" message (because the processor facility is enabled).

    Calling convention
    ------------------
    The proposal is for scv 0 to provide the standard Linux system call
    ABI with the following differences from sc convention[1]:

    - LR is to be volatile across scv calls. This is necessary because the
    scv instruction clobbers LR. From previous discussion, this should
    be possible to deal with in GCC clobbers and CFI.

    - cr1 and cr5-cr7 are volatile. This matches the C ABI and would allow
    the kernel system call exit to avoid restoring the volatile cr
    registers (although we probably still would anyway to avoid
    information leaks).

    - Error handling: The consensus among kernel, glibc, and musl is to
    move to using negative return values in r3 rather than CR0[SO]=1 to
    indicate error, which matches most other architectures, and is
    closer to a function call.

    Notes
    -----
    - r0,r4-r8 are documented as volatile in the ABI, but the kernel patch
    as submitted currently preserves them. This is to leave room for
    deciding which way to go with these. Some small benefit was found by
    preserving them[1] but I'm not convinced it's worth deviating from
    the C function call ABI just for this. Release code should follow
    the ABI.

    Previous discussions:
    https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/208691.html
    https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/209268.html

    [1] https://github.com/torvalds/linux/blob/master/Documentation/powerpc/syscall64-abi.rst
    [2] https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/209263.html

    Michael Ellerman
     

22 Jul, 2020

1 commit

  • Add support for the scv instruction on POWER9 and later CPUs.

    For now this implements the zeroth scv vector 'scv 0', as identical to
    'sc' system calls, with the exception that LR is not preserved, nor
    are volatile CR registers, and error is not indicated with CR0[SO],
    but by returning a negative errno.

    rfscv is implemented to return from scv type system calls. It can not
    be used to return from sc system calls because those are defined to
    preserve LR.

    getpid syscall throughput on POWER9 is improved by 26% (428 to 318
    cycles), largely due to reducing mtmsr and mtspr.

    Signed-off-by: Nicholas Piggin
    [mpe: Fix ppc64e build]
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20200611081203.995112-3-npiggin@gmail.com

    Nicholas Piggin
     

21 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20200718103958.5455-1-grandmaster@al2klimov.de

    Alexander A. Klimov
     

18 Jul, 2020

1 commit


15 Jul, 2020

2 commits

  • P9 DD2 NX workbook (Table 4-36) says DMA controller uses CC=5
    internally for translation fault handling. NX reserves CC=250 for
    OS to notify user space when NX encounters address translation
    failure on the request buffer. Not an issue in earlier releases
    as NX does not get faults on kernel addresses.

    This patch defines CSB_CC_FAULT_ADDRESS(250) and updates CSB.CC with
    this proper error code for user space.

    Fixes: c96c4436aba4 ("powerpc/vas: Update CSB and notify process for fault CRBs")
    Signed-off-by: Haren Myneni
    [mpe: Added Fixes tag and fix typo in comment]
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/019fd53e7538c6f8f332d175df74b1815ef5aa8c.camel@linux.ibm.com

    Haren Myneni
     
  • Documentation wrongly tells that book3s/32 CPU have hash MMU.

    603 and e300 core only have software loaded TLB.

    755, 7450 family and e600 core have both hash MMU and software loaded
    TLB. This can be selected by setting a bit in HID2 (755) or
    HID0 (others). At the time being this is not supported by the kernel.

    Make this explicit in the documentation.

    Signed-off-by: Christophe Leroy
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/261923c075d1cb49d02493685e8585d4ea2a5197.1593698951.git.christophe.leroy@csgroup.eu

    Christophe Leroy
     

13 Jul, 2020

1 commit

  • Drop the doubled word "the".

    Signed-off-by: Randy Dunlap
    Cc: Jonathan Corbet
    Cc: linux-doc@vger.kernel.org
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: https://lore.kernel.org/r/20200707180414.10467-16-rdunlap@infradead.org
    Signed-off-by: Jonathan Corbet

    Randy Dunlap
     

27 Jun, 2020

1 commit

  • There are a few issues on this document, when built via the
    building with ``make htmldocs``:

    Documentation/powerpc/vas-api.rst:116: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:116: WARNING: Inline emphasis start-string without end-string.
    Documentation/powerpc/vas-api.rst:117: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:117: WARNING: Inline emphasis start-string without end-string.
    Documentation/powerpc/vas-api.rst:120: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:124: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:133: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:135: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:150: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:151: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:161: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:176: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:253: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:253: WARNING: Inline emphasis start-string without end-string.
    Documentation/powerpc/vas-api.rst:259: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:261: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:266: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:267: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:270: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:271: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:273: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:274: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:277: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:278: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:280: WARNING: Unexpected indentation.
    Documentation/powerpc/vas-api.rst:287: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/powerpc/vas-api.rst:289: WARNING: Block quote ends without a blank line; unexpected unindent.

    Fixes: c12e38b1d52e ("Documentation/powerpc: VAS API")
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/fc1138e563bc3a41a9e59b5dd1fe2f6a4bfad253.1592895969.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

20 Jun, 2020

1 commit

  • - Add a SPDX header;
    - Use standard markup for document title;
    - Adjust identation on lists and add blank lines where
    needed;
    - Add it to the powerpc index.rst file.

    Acked-by: Michael Ellerman # powerpc
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/a88855cc8b3a97b9b918a33e78e9ad000cf64be1.1592203650.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

16 Jun, 2020

1 commit

  • Add documentation to 'papr_hcalls.rst' describing the bitmap flags
    that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM
    specification.

    Signed-off-by: Vaibhav Jain
    Acked-by: Ira Weiny
    Cc: "Aneesh Kumar K . V"
    Cc: Dan Williams
    Cc: Michael Ellerman
    Cc: Ira Weiny
    Link: https://lore.kernel.org/r/20200615124407.32596-2-vaibhav@linux.ibm.com
    Signed-off-by: Dan Williams

    Vaibhav Jain
     

06 Jun, 2020

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - Support for userspace to send requests directly to the on-chip GZIP
    accelerator on Power9.

    - Rework of our lockless page table walking (__find_linux_pte()) to
    make it safe against parallel page table manipulations without
    relying on an IPI for serialisation.

    - A series of fixes & enhancements to make our machine check handling
    more robust.

    - Lots of plumbing to add support for "prefixed" (64-bit) instructions
    on Power10.

    - Support for using huge pages for the linear mapping on 8xx (32-bit).

    - Remove obsolete Xilinx PPC405/PPC440 support, and an associated sound
    driver.

    - Removal of some obsolete 40x platforms and associated cruft.

    - Initial support for booting on Power10.

    - Lots of other small features, cleanups & fixes.

    Thanks to: Alexey Kardashevskiy, Alistair Popple, Andrew Donnellan,
    Andrey Abramov, Aneesh Kumar K.V, Balamuruhan S, Bharata B Rao, Bulent
    Abali, Cédric Le Goater, Chen Zhou, Christian Zigotzky, Christophe
    JAILLET, Christophe Leroy, Dmitry Torokhov, Emmanuel Nicolet, Erhard F.,
    Gautham R. Shenoy, Geoff Levand, George Spelvin, Greg Kurz, Gustavo A.
    R. Silva, Gustavo Walbon, Haren Myneni, Hari Bathini, Joel Stanley,
    Jordan Niethe, Kajol Jain, Kees Cook, Leonardo Bras, Madhavan
    Srinivasan., Mahesh Salgaonkar, Markus Elfring, Michael Neuling, Michal
    Simek, Nathan Chancellor, Nathan Lynch, Naveen N. Rao, Nicholas Piggin,
    Oliver O'Halloran, Paul Mackerras, Pingfan Liu, Qian Cai, Ram Pai,
    Raphael Moreira Zinsly, Ravi Bangoria, Sam Bobroff, Sandipan Das, Segher
    Boessenkool, Stephen Rothwell, Sukadev Bhattiprolu, Tyrel Datwyler,
    Wolfram Sang, Xiongfeng Wang.

    * tag 'powerpc-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (299 commits)
    powerpc/pseries: Make vio and ibmebus initcalls pseries specific
    cxl: Remove dead Kconfig options
    powerpc: Add POWER10 architected mode
    powerpc/dt_cpu_ftrs: Add MMA feature
    powerpc/dt_cpu_ftrs: Enable Prefixed Instructions
    powerpc/dt_cpu_ftrs: Advertise support for ISA v3.1 if selected
    powerpc: Add support for ISA v3.1
    powerpc: Add new HWCAP bits
    powerpc/64s: Don't set FSCR bits in INIT_THREAD
    powerpc/64s: Save FSCR to init_task.thread.fscr after feature init
    powerpc/64s: Don't let DT CPU features set FSCR_DSCR
    powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()
    powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG
    powerpc/module_64: Use special stub for _mcount() with -mprofile-kernel
    powerpc/module_64: Simplify check for -mprofile-kernel ftrace relocations
    powerpc/module_64: Consolidate ftrace code
    powerpc/32: Disable KASAN with pages bigger than 16k
    powerpc/uaccess: Don't set KUEP by default on book3s/32
    powerpc/uaccess: Don't set KUAP by default on book3s/32
    powerpc/8xx: Reduce time spent in allow_user_access() and friends
    ...

    Linus Torvalds
     

28 May, 2020

1 commit

  • The latest Xilinx design tools called ISE and EDK has been released in
    October 2013. New tool doesn't support any PPC405/PPC440 new designs.
    These platforms are no longer supported and tested.

    PowerPC 405/440 port is orphan from 2013 by
    commit cdeb89943bfc ("MAINTAINERS: Fix incorrect status tag") and
    commit 19624236cce1 ("MAINTAINERS: Update Grant's email address and maintainership")
    that's why it is time to remove the support fot these platforms.

    Signed-off-by: Michal Simek
    Signed-off-by: Christophe Leroy
    Acked-by: Arnd Bergmann
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/8c593895e2cb57d232d85ce4d8c3a1aa7f0869cc.1590079968.git.christophe.leroy@csgroup.eu

    Michal Simek
     

20 May, 2020

1 commit

  • The ISA has a quirk that's useful for the Linux implementation.
    Document it here so others are less likely to trip over it.

    Suggested-by: Michael Ellerman
    Signed-off-by: Michael Neuling
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20200325040546.3091563-1-mikey@neuling.org

    Michael Neuling
     

21 Apr, 2020

2 commits


20 Apr, 2020

1 commit

  • Power9 introduced Virtual Accelerator Switchboard (VAS) which allows
    userspace to communicate with Nest Accelerator (NX) directly. But
    kernel has to establish channel to NX for userspace. This document
    describes user space API that application can use to establish
    communication channel.

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Haren Myneni
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/1587114715.2275.1135.camel@hbabu-laptop

    Haren Myneni
     

06 Apr, 2020

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Slightly late as I had to rebase mid-week to insert a bug fix:

    - A large series from Nick for 64-bit to further rework our exception
    vectors, and rewrite portions of the syscall entry/exit and
    interrupt return in C. The result is much easier to follow code
    that is also faster in general.

    - Cleanup of our ptrace code to split various parts out that had
    become badly intertwined with #ifdefs over the years.

    - Changes to our NUMA setup under the PowerVM hypervisor which should
    hopefully avoid non-sensical topologies which can lead to warnings
    from the workqueue code and other problems.

    - MAINTAINERS updates to remove some of our old orphan entries and
    update the status of others.

    - Quite a few other small changes and fixes all over the map.

    Thanks to: Abdul Haleem, afzal mohammed, Alexey Kardashevskiy, Andrew
    Donnellan, Aneesh Kumar K.V, Balamuruhan S, Cédric Le Goater, Chen
    Zhou, Christophe JAILLET, Christophe Leroy, Christoph Hellwig, Clement
    Courbet, Daniel Axtens, David Gibson, Douglas Miller, Fabiano Rosas,
    Fangrui Song, Ganesh Goudar, Gautham R. Shenoy, Greg Kroah-Hartman,
    Greg Kurz, Gustavo Luiz Duarte, Hari Bathini, Ilie Halip, Jan Kara,
    Joe Lawrence, Joe Perches, Kajol Jain, Larry Finger, Laurentiu Tudor,
    Leonardo Bras, Libor Pechacek, Madhavan Srinivasan, Mahesh Salgaonkar,
    Masahiro Yamada, Masami Hiramatsu, Mauricio Faria de Oliveira, Michael
    Neuling, Michal Suchanek, Mike Rapoport, Nageswara R Sastry, Nathan
    Chancellor, Nathan Lynch, Naveen N. Rao, Nicholas Piggin, Nick
    Desaulniers, Oliver O'Halloran, Po-Hsu Lin, Pratik Rajesh Sampat,
    Rasmus Villemoes, Ravi Bangoria, Roman Bolshakov, Sam Bobroff,
    Sandipan Das, Santosh S, Sedat Dilek, Segher Boessenkool, Shilpasri G
    Bhat, Sourabh Jain, Srikar Dronamraju, Stephen Rothwell, Tyrel
    Datwyler, Vaibhav Jain, YueHaibing"

    * tag 'powerpc-5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (158 commits)
    powerpc: Make setjmp/longjmp signature standard
    powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type
    powerpc: Suppress .eh_frame generation
    powerpc: Drop -fno-dwarf2-cfi-asm
    powerpc/32: drop unused ISA_DMA_THRESHOLD
    powerpc/powernv: Add documentation for the opal sensor_groups sysfs interfaces
    selftests/powerpc: Fix try-run when source tree is not writable
    powerpc/vmlinux.lds: Explicitly retain .gnu.hash
    powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c
    powerpc/ptrace: create ppc_gethwdinfo()
    powerpc/ptrace: create ptrace_get_debugreg()
    powerpc/ptrace: split out ADV_DEBUG_REGS related functions.
    powerpc/ptrace: move register viewing functions out of ptrace.c
    powerpc/ptrace: split out TRANSACTIONAL_MEM related functions.
    powerpc/ptrace: split out SPE related functions.
    powerpc/ptrace: split out ALTIVEC related functions.
    powerpc/ptrace: split out VSX related functions.
    powerpc/ptrace: drop PARAMETER_SAVE_AREA_OFFSET
    powerpc/ptrace: drop unnecessary #ifdefs CONFIG_PPC64
    powerpc/ptrace: remove unused header includes
    ...

    Linus Torvalds
     

21 Mar, 2020

1 commit

  • Changeset 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst")
    enabled a new feature at Sphinx: it will now generate index for each
    document title, plus to each chapter inside it.

    There's a drawback, though: one document cannot have two sections
    with the same name anymore.

    A followup patch will change the logic of autosectionlabel to
    avoid most creating references for every single section title,
    but still we need to be able to reference the chapters inside
    a document.

    There are a few places where there are two chapters with the
    same name. This patch renames one of the chapters, in order to
    avoid symbol conflict within the same document.

    PS.: as I don't speach Chinese, I had some help from a friend
    (Wen Liu) at the Chinese translation for "publishing patches"
    for this document:

    Documentation/translations/zh_CN/process/5.Posting.rst

    Fixes: 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst")
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/2bffb91e4a63d41bf5fae1c23e1e8b3bba0b8806.1584716446.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

19 Feb, 2020

3 commits

  • Add a sys interface to allow querying the memory reserved by FADump for
    saving the crash dump.

    Also added Documentation/ABI for the new sysfs file.

    Signed-off-by: Sourabh Jain
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20191211160910.21656-7-sourabhjain@linux.ibm.com

    Sourabh Jain
     
  • Add a deprecation note in FADump sysfs ABI documentation files and
    move them from ABI/testing to ABI/obsolete directory.

    Signed-off-by: Sourabh Jain
    [mpe: Use a proper table to fix errors from the documentation build]
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20191211160910.21656-6-sourabhjain@linux.ibm.com

    Sourabh Jain
     
  • The /sys/firmware/opal/core and /sys/kernel/fadump_release_opalcore
    sysfs files are used to export and release the OPAL memory on PowerNV
    platform. let's organize them into a new kobject under
    /sys/firmware/opal/mpipl/ directory.

    A symlink is added to maintain the backward compatibility for
    /sys/firmware/opal/core sysfs file.

    Signed-off-by: Sourabh Jain
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20191211160910.21656-5-sourabhjain@linux.ibm.com

    Sourabh Jain
     

04 Feb, 2020

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "A pretty small batch for us, and apologies for it being a bit late, I
    wanted to sneak Christophe's user_access_begin() series in.

    Summary:

    - Implement user_access_begin() and friends for our platforms that
    support controlling kernel access to userspace.

    - Enable CONFIG_VMAP_STACK on 32-bit Book3S and 8xx.

    - Some tweaks to our pseries IOMMU code to allow SVMs ("secure"
    virtual machines) to use the IOMMU.

    - Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE to the 32-bit
    VDSO, and some other improvements.

    - A series to use the PCI hotplug framework to control opencapi
    card's so that they can be reset and re-read after flashing a new
    FPGA image.

    As well as other minor fixes and improvements as usual.

    Thanks to: Alastair D'Silva, Alexandre Ghiti, Alexey Kardashevskiy,
    Andrew Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Bai Yingjie, Chen
    Zhou, Christophe Leroy, Frederic Barrat, Greg Kurz, Jason A.
    Donenfeld, Joel Stanley, Jordan Niethe, Julia Lawall, Krzysztof
    Kozlowski, Laurent Dufour, Laurentiu Tudor, Linus Walleij, Michael
    Bringmann, Nathan Chancellor, Nicholas Piggin, Nick Desaulniers,
    Oliver O'Halloran, Peter Ujfalusi, Pingfan Liu, Ram Pai, Randy Dunlap,
    Russell Currey, Sam Bobroff, Sebastian Andrzej Siewior, Shawn
    Anastasio, Stephen Rothwell, Steve Best, Sukadev Bhattiprolu, Thiago
    Jung Bauermann, Tyrel Datwyler, Vaibhav Jain"

    * tag 'powerpc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (131 commits)
    powerpc: configs: Cleanup old Kconfig options
    powerpc/configs/skiroot: Enable some more hardening options
    powerpc/configs/skiroot: Disable xmon default & enable reboot on panic
    powerpc/configs/skiroot: Enable security features
    powerpc/configs/skiroot: Update for symbol movement only
    powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV
    powerpc/configs/skiroot: Drop HID_LOGITECH
    powerpc/configs: Drop NET_VENDOR_HP which moved to staging
    powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE
    powerpc/configs: Drop CONFIG_QLGE which moved to staging
    powerpc: Do not consider weak unresolved symbol relocations as bad
    powerpc/32s: Fix kasan_early_hash_table() for CONFIG_VMAP_STACK
    powerpc: indent to improve Kconfig readability
    powerpc: Provide initial documentation for PAPR hcalls
    powerpc: Implement user_access_save() and user_access_restore()
    powerpc: Implement user_access_begin and friends
    powerpc/32s: Prepare prevent_user_access() for user_access_end()
    powerpc/32s: Drop NULL addr verification
    powerpc/kuap: Fix set direction in allow/prevent_user_access()
    powerpc/32s: Fix bad_kuap_fault()
    ...

    Linus Torvalds
     

29 Jan, 2020

1 commit

  • This doc patch provides an initial description of the hcall op-codes
    that are used by Linux kernel running as a guest (LPAR) on top of
    PowerVM or any other sPAPR compliant hyper-visor (e.g qemu).

    Apart from documenting the hcalls the doc-patch also provides a
    rudimentary overview of how hcall ABI, how they are issued with the
    Linux kernel and how information/control flows between the guest and
    hypervisor.

    Signed-off-by: Vaibhav Jain
    Reviewed-by: Laurent Dufour
    Acked-by: Nicholas Piggin
    [mpe: Add SPDX tag, add it to index.rst]
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20190828082729.16695-1-vaibhav@linux.ibm.com

    Vaibhav Jain
     

17 Jan, 2020

1 commit

  • Implement the H_SVM_INIT_ABORT hcall which the Ultravisor can use to
    abort an SVM after it has issued the H_SVM_INIT_START and before the
    H_SVM_INIT_DONE hcalls. This hcall could be used when Ultravisor
    encounters security violations or other errors when starting an SVM.

    Note that this hcall is different from UV_SVM_TERMINATE ucall which
    is used by HV to terminate/cleanup an VM that has becore secure.

    The H_SVM_INIT_ABORT basically undoes operations that were done
    since the H_SVM_INIT_START hcall - i.e page-out all the VM pages back
    to normal memory, and terminate the SVM.

    (If we do not bring the pages back to normal memory, the text/data
    of the VM would be stuck in secure memory and since the SVM did not
    go secure, its MSR_S bit will be clear and the VM wont be able to
    access its pages even to do a clean exit).

    Based on patches and discussion with Paul Mackerras, Ram Pai and
    Bharata Rao.

    Signed-off-by: Ram Pai
    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Bharata B Rao
    Signed-off-by: Paul Mackerras

    Sukadev Bhattiprolu
     

06 Jan, 2020

1 commit

  • Documentation for IMC (In-Memory Collection Counters) infrastructure
    and trace-mode of IMC.

    Signed-off-by: Anju T Sudhakar
    [mpe: Convert to rst, minor rewording, make PMI example more concise]
    Signed-off-by: Michael Ellerman
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20191028100816.6270-1-mpe@ellerman.id.au

    Anju T Sudhakar
     

13 Nov, 2019

1 commit