20 Sep, 2018

1 commit

  • [ Upstream commit 576d5290d678a651b9f36050fc1717e0573aca13 ]

    Add missing in_8() accessors to init_pmu() and pmu_sr_intr().

    This fixes several sparse warnings:
    drivers/macintosh/via-pmu.c:536:29: warning: dereference of noderef expression
    drivers/macintosh/via-pmu.c:537:33: warning: dereference of noderef expression
    drivers/macintosh/via-pmu.c:1455:17: warning: dereference of noderef expression
    drivers/macintosh/via-pmu.c:1456:69: warning: dereference of noderef expression

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Reviewed-by: Geert Uytterhoeven
    Signed-off-by: Michael Ellerman
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Finn Thain
     

30 May, 2018

1 commit

  • [ Upstream commit e283655b5abe26462d53d5196f186c5e8863af3b ]

    We should zero an array using sizeof instead of number of elements.

    Fixes the following compiler (GCC 7.3.0) warnings:

    drivers/macintosh/rack-meter.c: In function 'rackmeter_do_pause':
    drivers/macintosh/rack-meter.c:157:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
    drivers/macintosh/rack-meter.c:158:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]

    Fixes: 4f7bef7a9f69 ("drivers: macintosh: rack-meter: fix bogus memsets")
    Reported-by: Stephen Rothwell
    Signed-off-by: Aaro Koskinen
    Signed-off-by: Michael Ellerman
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Aaro Koskinen
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Sep, 2017

2 commits

  • The wf_sensor_ops structures are only stored in the ops field of a
    wf_sensor structure, which is declared as const. Thus the
    wf_sensor_ops structures themselves can be const.

    Done with the help of Coccinelle.

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct wf_sensor_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct wf_sensor s;
    position p;
    @@
    s.ops = &i@p

    @ok2@
    identifier r.i;
    struct wf_sat_sensor s;
    position p;
    @@
    s.sens.ops = &i@p

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct wf_sensor_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct wf_sensor_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Michael Ellerman

    Julia Lawall
     
  • Now that we have a custom printf format specifier, convert users of
    full_name to use %pOF instead. This is preparation to remove storing
    of the full path string for each node.

    Signed-off-by: Rob Herring
    [mpe: Also convert the two cases inside #if 0]
    Signed-off-by: Michael Ellerman

    Rob Herring
     

21 Aug, 2017

1 commit

  • of_device_ids are not supposed to change at runtime. All functions
    working with of_device_ids provided by work with const
    of_device_ids. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    407 576 0 983 3d7 drivers/macintosh/rack-meter.o

    File size after constify rackmeter_match.
    text data bss dec hex filename
    807 176 0 983 3d7 drivers/macintosh/rack-meter.o

    Signed-off-by: Arvind Yadav
    Signed-off-by: Michael Ellerman

    Arvind Yadav
     

14 Aug, 2017

1 commit


06 Jul, 2017

1 commit

  • Pull misc user access cleanups from Al Viro:
    "The first pile is assorted getting rid of cargo-culted access_ok(),
    cargo-culted set_fs() and field-by-field copyouts.

    The same description applies to a lot of stuff in other branches -
    this is just the stuff that didn't fit into a more specific topical
    branch"

    * 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    Switch flock copyin/copyout primitives to copy_{from,to}_user()
    fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found
    fs/fcntl: f_setown, avoid undefined behaviour
    fs/fcntl: f_setown, allow returning error
    lpfc debugfs: get rid of pointless access_ok()
    adb: get rid of pointless access_ok()
    isdn: get rid of pointless access_ok()
    compat statfs: switch to copy_to_user()
    fs/locks: don't mess with the address limit in compat_fcntl64
    nfsd_readlink(): switch to vfs_get_link()
    drbd: ->sendpage() never needed set_fs()
    fs/locks: pass kernel struct flock to fcntl_getlk/setlk
    fs: locks: Fix some troubles at kernel-doc comments

    Linus Torvalds
     

09 Jun, 2017

1 commit


05 Jun, 2017

1 commit


06 May, 2017

1 commit

  • Pull DeviceTree updates from Rob Herring:

    - fix sparse warnings in drivers/of/

    - add more overlay unittests

    - update dtc to v1.4.4-8-g756ffc4f52f6. This adds more checks on dts
    files such as unit-address formatting and stricter character sets for
    node and property names

    - add a common DT modalias function

    - move trivial-devices.txt up and out of i2c dir

    - ARM NVIC interrupt controller binding

    - vendor prefixes for Sensirion, Dioo, Nordic, ROHM

    - correct some binding file locations

    * tag 'devicetree-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (24 commits)
    of: fix sparse warnings in fdt, irq, reserved mem, and resolver code
    of: fix sparse warning in of_pci_range_parser_one
    of: fix sparse warnings in of_find_next_cache_node
    of/unittest: Missing unlocks on error
    of: fix uninitialized variable warning for overlay test
    of: fix unittest build without CONFIG_OF_OVERLAY
    of: Add unit tests for applying overlays
    of: per-file dtc compiler flags
    fpga: region: add missing DT documentation for config complete timeout
    of: Add vendor prefix for ROHM Semiconductor
    of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes()
    of: Add vendor prefix for Nordic Semiconductor
    dt-bindings: arm,nvic: Binding for ARM NVIC interrupt controller on Cortex-M
    dtc: update warning settings for new bus and node/property name checks
    scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6
    scripts/dtc: automate getting dtc version and log in update script
    of: Add function for generating a DT modalias with a newline
    of: fix of_device_get_modalias returned length when truncating buffers
    Documentation: devicetree: move trivial-devices out of I2C realm
    dt-bindings: add vendor prefix for Dioo
    ..

    Linus Torvalds
     

24 Mar, 2017

1 commit


23 Mar, 2017

1 commit

  • The modalias sysfs attr is lacking a newline for DT aliases on platform
    devices. The macio and ibmebus correctly add the newline, but open code it.
    Introduce a new function, of_device_modalias(), that fills the buffer with
    the modalias including the newline and update users of the old
    of_device_get_modalias function.

    Signed-off-by: Rob Herring
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Frank Rowand
    Cc: linuxppc-dev@lists.ozlabs.org
    Acked-by: Greg Kroah-Hartman

    Rob Herring
     

10 Mar, 2017

1 commit

  • Commit 5657933dbb6e ("treewide: Move dma_ops from struct dev_archdata
    into struct device") introduced a crash for macio devices, an example
    backtrace being:

    kernel BUG at ./include/linux/dma-mapping.h:465!
    Oops: Exception in kernel mode, sig: 5 [#1]
    ...
    NIP [c031ddb0] dmam_alloc_coherent+0x74/0x140
    LR [c031de70] dmam_alloc_coherent+0x134/0x140
    Call Trace:
    dmam_alloc_coherent+0x134/0x140 (unreliable)
    pata_macio_port_start+0x3c/0x8c
    ata_host_start.part.5+0xfc/0x208
    ata_host_activate+0x128/0x154
    pata_macio_common_init+0x2f0/0x538
    pata_macio_attach+0xd8/0x180
    macio_device_probe+0x5c/0xec
    driver_probe_device+0x21c/0x314
    __driver_attach+0xcc/0xd0
    bus_for_each_dev+0x68/0xb4
    bus_add_driver+0x1dc/0x244
    driver_register+0x88/0x130
    pata_macio_init+0x5c/0x88
    do_one_initcall+0x40/0x170
    kernel_init_freeable+0x134/0x1d0
    kernel_init+0x18/0x110
    ret_from_kernel_thread+0x5c/0x64

    This was caused by the device having NULL dma_ops, triggering the
    BUG_ON(). Previously the device inherited its dma_ops via the assignment
    to dev->ofdev.dev.archdata. However after commit 5657933dbb6e the
    dma_ops are moved into dev->ofdev.dev, and so they need to be explicitly
    copied.

    Fixes: 5657933dbb6e ("treewide: Move dma_ops from struct dev_archdata into struct device")
    Signed-off-by: Larry Finger
    Suggested-by: Benjamin Herrenschmidt
    [mpe: Rewrite change log, add backtrace]
    Signed-off-by: Michael Ellerman

    Larry Finger
     

02 Mar, 2017

1 commit


23 Feb, 2017

2 commits

  • Pull driver core updates from Greg KH:
    "Here is the "small" driver core patches for 4.11-rc1.

    Not much here, some firmware documentation and self-test updates, a
    debugfs code formatting issue, and a new feature for call_usermodehelper
    to make it more robust on systems that want to lock it down in a more
    secure way.

    All of these have been linux-next for a while now with no reported
    issues"

    * tag 'driver-core-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    kernfs: handle null pointers while printing node name and path
    Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper()
    Make static usermode helper binaries constant
    kmod: make usermodehelper path a const string
    firmware: revamp firmware documentation
    selftests: firmware: send expected errors to /dev/null
    selftests: firmware: only modprobe if driver is missing
    platform: Print the resource range if device failed to claim
    kref: prefer atomic_inc_not_zero to atomic_add_unless
    debugfs: improve formatting of debugfs_real_fops()

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

    - Support for direct mapped LPC on POWER9, giving Linux direct access
    to devices that may be on there such as a UART.

    - Memory hotplug support for the Power9 Radix MMU.

    - Add new AUX vectors describing the processor's cache geometry, to
    be used by glibc.

    - The ability for a guest to ask the hypervisor to resize the guest's
    hash table, and in addition support for doing so automatically when
    memory is hotplugged into/out-of the guest. This allows the hash
    table to be sized based on the current memory usage of the guest,
    rather than the maximum possible memory usage.

    - Implementation of optprobes (kprobe optimisation) for powerpc.

    In addition there's the topic branch shared with the KVM tree, which
    includes support for guests to use the Radix MMU on Power9.

    Thanks to:
    Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju T, Anton
    Blanchard, Benjamin Herrenschmidt, Chris Packham, Daniel Axtens,
    Daniel Borkmann, David Gibson, Finn Thain, Gautham R. Shenoy, Gavin
    Shan, Greg Kurz, Joel Stanley, John Allen, Madhavan Srinivasan,
    Mahesh Salgaonkar, Markus Elfring, Michael Neuling, Nathan Fontenot,
    Naveen N. Rao, Nicholas Piggin, Paul Mackerras, Ravi Bangoria, Reza
    Arbab, Shailendra Singh, Vaibhav Jain, Wei Yongjun"

    * tag 'powerpc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (129 commits)
    powerpc/mm/radix: Skip ptesync in pte update helpers
    powerpc/mm/radix: Use ptep_get_and_clear_full when clearing pte for full mm
    powerpc/mm/radix: Update pte update sequence for pte clear case
    powerpc/mm: Update PROTFAULT handling in the page fault path
    powerpc/xmon: Fix data-breakpoint
    powerpc/mm: Fix build break with BOOK3S_64=n and MEMORY_HOTPLUG=y
    powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y
    powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n
    powerpc/pseries: Fix typo in parameter description
    powerpc/kprobes: Remove kprobe_exceptions_notify()
    kprobes: Introduce weak variant of kprobe_exceptions_notify()
    powerpc/ftrace: Fix confusing help text for DISABLE_MPROFILE_KERNEL
    powerpc/powernv: Fix opal_exit tracepoint opcode
    powerpc: Add a prototype for mcount() so it can be versioned
    powerpc: Drop GPL from of_node_to_nid() export to match other arches
    powerpc/kprobes: Optimize kprobe in kretprobe_trampoline()
    powerpc/kprobes: Implement Optprobes
    powerpc/kprobes: Fixes for kprobe_lookup_name() on BE
    powerpc: Add helper to check if offset is within relative branch range
    powerpc/bpf: Introduce __PPC_SH64()
    ...

    Linus Torvalds
     

07 Feb, 2017

10 commits

  • Change the device probe test in the via-cuda.c driver so it will load on
    Egret-based machines too. Remove the now redundant via-maciisi.c driver.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Acked-by: Geert Uytterhoeven
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • The Egret system controller was the predecessor to the Cuda and the
    differences are minor.

    On Cuda, byte acknowledgement requires one transition of the TACK
    signal; on Egret two are needed. On Cuda, TIP is active low; on Egret
    it is active high. And Cuda raises certain interrupts that Egret omits.

    Accomodating these differences complicates the Cuda driver slightly
    but avoids a lot of duplication (see next patch).

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • Initialize data_index where appropriate to improve readability and
    assist debugging. This change doesn't affect driver behaviour.

    I prefer to see
    current_req->data[data_index++]
    in place of
    current_req->data[0]
    or
    current_req->data[1]
    inasmuchas it becomes obvious what the data_index variable does.

    Moreover, the actual value of data_index when examined at any given moment
    tells me something about prior events, which did prove helpful.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • The cuda_start() function uses spinlock_irq_save/restore for mutual
    exclusion. Let's have cuda_poll() do the same when polling the VIA
    interrupt.

    The benefit to disabling local irqs when the interrupt is being polled
    is that the interrupt handler now has the same timing properties
    regardless of whether it is invoked normally or from cuda_poll().

    This driver was written back when local irqs remained enabled during
    execution of interrupt handlers and cuda_poll() was probably trying
    to achieve the same effect by use of enable/disable_irq.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • When a read transaction completes, one of several things will happen:
    a new transfer is started by the driver, a new transfer request
    is raised by the Cuda (i.e. TREQ asserted), or both happen at once.

    When both happen at once, there is a race condition between the TREQ test
    in the read_done state and the same test in cuda_start(). Moreover, the
    former test uses a stale TREQ value.

    Theoretically, this can result in the undesirable outcome that the
    interrupt handler completes with the state machine 'idle' when it should
    instead start the next transaction.

    Avoid this race by calling cuda_start() first and then confirming that it
    succeeded. If not, test the current TREQ value before entering the
    'reading' state.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • When reading_reply is set, reply_ptr points into an adb_request struct.
    Conversely, when reply_ptr instead points into the global cuda_rbuf,
    reading_reply must be false.

    Unfortunately, this rule can be violated because re-initialization
    of reply_ptr and reading_reply presently depends on the TREQ input.

    Fix this by re-initializing reply_ptr and reading_reply as soon as they
    are known to be invalid.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • If the Cuda driver does not enter the 'read_done' state for some
    reason, it may continue in the 'reading' state until the buffer
    overflows. Add a bounds check to prevent this.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • Introduce some helpers for handling the signalling between VIA and
    Cuda. This abstraction will be used to add support for Egret devices,
    which utilize slightly different signalling.

    Don't invert the sense of the Cuda's active-low signals when storing
    them in the 'status' variable. Just assert, negate and test those
    signals using the helpers.

    The state machine does not need to test its own output signals to
    figure out what to do next: the next state depends on the Cuda's TREQ
    output. Just call the TREQ_asserted() helper function to test for that.

    Similarly, there is no need to store pin directions in the 'status'
    variable. That was only useful for debugging messages.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • There is no possibility that current_req can change during execution of
    cuda_start(). This can be confirmed by inspection: cuda_lock is always
    held whenever cuda_start() is called or current_req is modified.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     
  • Add missing log message severity, remove old debug messages and
    replace printk() loop with print_hex_dump() call.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Michael Ellerman

    Finn Thain
     

01 Feb, 2017

2 commits

  • cputime_t is going to be removed and replaced by nsecs units,
    so convert the drivers/macintosh/rack-meter.c use to u64..

    Signed-off-by: Frederic Weisbecker
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Stanislaw Gruszka
    Cc: Wanpeng Li
    Link: http://lkml.kernel.org/r/1485832191-26889-5-git-send-email-fweisbec@gmail.com
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Kernel CPU stats are stored in cputime_t which is an architecture
    defined type, and hence a bit opaque and requiring accessors and mutators
    for any operation.

    Converting them to nsecs simplifies the code and is one step toward
    the removal of cputime_t in the core code.

    Signed-off-by: Frederic Weisbecker
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Stanislaw Gruszka
    Cc: Wanpeng Li
    Link: http://lkml.kernel.org/r/1485832191-26889-4-git-send-email-fweisbec@gmail.com
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

19 Jan, 2017

1 commit

  • There are a number of usermode helper binaries that are "hard coded" in
    the kernel today, so mark them as "const" to make it harder for someone
    to change where the variables point to.

    Cc: Benjamin Herrenschmidt
    Cc: Thomas Sailer
    Cc: "Rafael J. Wysocki"
    Cc: Johan Hovold
    Cc: Alex Elder
    Cc: "J. Bruce Fields"
    Cc: Jeff Layton
    Cc: David Howells
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Dec, 2016

1 commit


14 Nov, 2016

1 commit


20 Sep, 2016

1 commit

  • NO_IRQ has been == 0 on powerpc for just over ten years (since commit
    0ebfff1491ef ("[POWERPC] Add new interrupt mapping core and change
    platforms to use it")). It's also 0 on most other arches.

    Although it's fairly harmless, every now and then it causes confusion
    when a driver is built on powerpc and another arch which doesn't define
    NO_IRQ. There's at least 6 definitions of NO_IRQ in drivers/, at least
    some of which are to work around that problem.

    So we'd like to remove it. This is fairly trivial in the arch code, we
    just convert:

    if (irq == NO_IRQ) to if (!irq)
    if (irq != NO_IRQ) to if (irq)
    irq = NO_IRQ; to irq = 0;
    return NO_IRQ; to return 0;

    And a few other odd cases as well.

    At least for now we keep the #define NO_IRQ, because there is driver
    code that uses NO_IRQ and the fixes to remove those will go via other
    trees.

    Note we also change some occurrences in PPC sound drivers, drivers/ps3,
    and drivers/macintosh.

    Signed-off-by: Michael Ellerman

    Michael Ellerman
     

22 Aug, 2016

1 commit


31 Jul, 2016

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - PowerNV PCI hotplug support.
    - Lots more Power9 support.
    - eBPF JIT support on ppc64le.
    - Lots of cxl updates.
    - Boot code consolidation.

    Bug fixes:
    - Fix spin_unlock_wait() from Boqun Feng
    - Fix stack pointer corruption in __tm_recheckpoint() from Michael
    Neuling
    - Fix multiple bugs in memory_hotplug_max() from Bharata B Rao
    - mm: Ensure "special" zones are empty from Oliver O'Halloran
    - ftrace: Separate the heuristics for checking call sites from
    Michael Ellerman
    - modules: Never restore r2 for a mprofile-kernel style mcount() call
    from Michael Ellerman
    - Fix endianness when reading TCEs from Alexey Kardashevskiy
    - start rtasd before PCI probing from Greg Kurz
    - PCI: rpaphp: Fix slot registration for multiple slots under a PHB
    from Tyrel Datwyler
    - powerpc/mm: Add memory barrier in __hugepte_alloc() from Sukadev
    Bhattiprolu

    Cleanups & fixes:
    - Drop support for MPIC in pseries from Rashmica Gupta
    - Define and use PPC64_ELF_ABI_v2/v1 from Michael Ellerman
    - Remove unused symbols in asm-offsets.c from Rashmica Gupta
    - Fix SRIOV not building without EEH enabled from Russell Currey
    - Remove kretprobe_trampoline_holder from Thiago Jung Bauermann
    - Reduce log level of PCI I/O space warning from Benjamin
    Herrenschmidt
    - Add array bounds checking to crash_shutdown_handlers from Suraj
    Jitindar Singh
    - Avoid -maltivec when using clang integrated assembler from Anton
    Blanchard
    - Fix array overrun in ppc_rtas() syscall from Andrew Donnellan
    - Fix error return value in cmm_mem_going_offline() from Rasmus
    Villemoes
    - export cpu_to_core_id() from Mauricio Faria de Oliveira
    - Remove old symbols from defconfigs from Andrew Donnellan
    - Update obsolete comments in setup_32.c about entry conditions from
    Benjamin Herrenschmidt
    - Add comment explaining the purpose of setup_kdump_trampoline() from
    Benjamin Herrenschmidt
    - Merge the RELOCATABLE config entries for ppc32 and ppc64 from Kevin
    Hao
    - Remove RELOCATABLE_PPC32 from Kevin Hao
    - Fix .long's in tlb-radix.c to more meaningful from Balbir Singh

    Minor cleanups & fixes:
    - Andrew Donnellan, Anna-Maria Gleixner, Anton Blanchard, Benjamin
    Herrenschmidt, Bharata B Rao, Christophe Leroy, Colin Ian King,
    Geliang Tang, Greg Kurz, Madhavan Srinivasan, Michael Ellerman,
    Michael Ellerman, Stephen Rothwell, Stewart Smith.

    Freescale updates from Scott:
    - "Highlights include more 8xx optimizations, device tree updates,
    and MVME7100 support."

    PowerNV PCI hotplug from Gavin Shan:
    - PCI: Add pcibios_setup_bridge()
    - Override pcibios_setup_bridge()
    - Remove PCI_RESET_DELAY_US
    - Move pnv_pci_ioda_setup_opal_tce_kill() around
    - Increase PE# capacity
    - Allocate PE# in reverse order
    - Create PEs in pcibios_setup_bridge()
    - Setup PE for root bus
    - Extend PCI bridge resources
    - Make pnv_ioda_deconfigure_pe() visible
    - Dynamically release PE
    - Update bridge windows on PCI plug
    - Delay populating pdn
    - Support PCI slot ID
    - Use PCI slot reset infrastructure
    - Introduce pnv_pci_get_slot_id()
    - Functions to get/set PCI slot state
    - PCI/hotplug: PowerPC PowerNV PCI hotplug driver
    - Print correct PHB type names

    Power9 idle support from Shreyas B. Prabhu:
    - set power_save func after the idle states are initialized
    - Use PNV_THREAD_WINKLE macro while requesting for winkle
    - make hypervisor state restore a function
    - Rename idle_power7.S to idle_book3s.S
    - Rename reusable idle functions to hardware agnostic names
    - Make pnv_powersave_common more generic
    - abstraction for saving SPRs before entering deep idle states
    - Add platform support for stop instruction
    - cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES
    - cpuidle/powernv: cleanup cpuidle-powernv.c
    - cpuidle/powernv: Add support for POWER ISA v3 idle states
    - Use deepest stop state when cpu is offlined

    Power9 PMU from Madhavan Srinivasan:
    - factor out power8 pmu macros and defines
    - factor out power8 pmu functions
    - factor out power8 __init_pmu code
    - Add power9 event list macros for generic and cache events
    - Power9 PMU support
    - Export Power9 generic and cache events to sysfs

    Power9 preliminary interrupt & PCI support from Benjamin Herrenschmidt:
    - Add XICS emulation APIs
    - Move a few exception common handlers to make room
    - Add support for HV virtualization interrupts
    - Add mechanism to force a replay of interrupts
    - Add ICP OPAL backend
    - Discover IODA3 PHBs
    - pci: Remove obsolete SW invalidate
    - opal: Add real mode call wrappers
    - Rename TCE invalidation calls
    - Remove SWINV constants and obsolete TCE code
    - Rework accessing the TCE invalidate register
    - Fallback to OPAL for TCE invalidations
    - Use the device-tree to get available range of M64's
    - Check status of a PHB before using it
    - pci: Don't try to allocate resources that will be reassigned

    Other Power9:
    - Send SIGBUS on unaligned copy and paste from Chris Smart
    - Large Decrementer support from Oliver O'Halloran
    - Load Monitor Register Support from Jack Miller

    Performance improvements from Anton Blanchard:
    - Avoid load hit store in __giveup_fpu() and __giveup_altivec()
    - Avoid load hit store in setup_sigcontext()
    - Remove assembly versions of strcpy, strcat, strlen and strcmp
    - Align hot loops of some string functions

    eBPF JIT from Naveen N. Rao:
    - Fix/enhance 32-bit Load Immediate implementation
    - Optimize 64-bit Immediate loads
    - Introduce rotate immediate instructions
    - A few cleanups
    - Isolate classic BPF JIT specifics into a separate header
    - Implement JIT compiler for extended BPF

    Operator Panel driver from Suraj Jitindar Singh:
    - devicetree/bindings: Add binding for operator panel on FSP machines
    - Add inline function to get rc from an ASYNC_COMP opal_msg
    - Add driver for operator panel on FSP machines

    Sparse fixes from Daniel Axtens:
    - make some things static
    - Introduce asm-prototypes.h
    - Include headers containing prototypes
    - Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE
    - kvm: Clarify __user annotations
    - Pass endianness to sparse
    - Make ppc_md.{halt, restart} __noreturn

    MM fixes & cleanups from Aneesh Kumar K.V:
    - radix: Update LPCR HR bit as per ISA
    - use _raw variant of page table accessors
    - Compile out radix related functions if RADIX_MMU is disabled
    - Clear top 16 bits of va only on older cpus
    - Print formation regarding the the MMU mode
    - hash: Update SDR1 size encoding as documented in ISA 3.0
    - radix: Update PID switch sequence
    - radix: Update machine call back to support new HCALL.
    - radix: Add LPID based tlb flush helpers
    - radix: Add a kernel command line to disable radix
    - Cleanup LPCR defines

    Boot code consolidation from Benjamin Herrenschmidt:
    - Move epapr_paravirt_early_init() to early_init_devtree()
    - cell: Don't use flat device-tree after boot
    - ge_imp3a: Don't use the flat device-tree after boot
    - mpc85xx_ds: Don't use the flat device-tree after boot
    - mpc85xx_rdb: Don't use the flat device-tree after boot
    - Don't test for machine type in rtas_initialize()
    - Don't test for machine type in smp_setup_cpu_maps()
    - dt: Add of_device_compatible_match()
    - Factor do_feature_fixup calls
    - Move 64-bit feature fixup earlier
    - Move 64-bit memory reserves to setup_arch()
    - Use a cachable DART
    - Move FW feature probing out of pseries probe()
    - Put exception configuration in a common place
    - Remove early allocation of the SMU command buffer
    - Move MMU backend selection out of platform code
    - pasemi: Remove IOBMAP allocation from platform probe()
    - mm/hash: Don't use machine_is() early during boot
    - Don't test for machine type to detect HEA special case
    - pmac: Remove spurrious machine type test
    - Move hash table ops to a separate structure
    - Ensure that ppc_md is empty before probing for machine type
    - Move 64-bit probe_machine() to later in the boot process
    - Move 32-bit probe() machine to later in the boot process
    - Get rid of ppc_md.init_early()
    - Move the boot time info banner to a separate function
    - Move setting of {i,d}cache_bsize to initialize_cache_info()
    - Move the content of setup_system() to setup_arch()
    - Move cache info inits to a separate function
    - Re-order the call to smp_setup_cpu_maps()
    - Re-order setup_panic()
    - Make a few boot functions __init
    - Merge 32-bit and 64-bit setup_arch()

    Other new features:
    - tty/hvc: Use IRQF_SHARED for OPAL hvc consoles from Sam Mendoza-Jonas
    - tty/hvc: Use opal irqchip interface if available from Sam Mendoza-Jonas
    - powerpc: Add module autoloading based on CPU features from Alastair D'Silva
    - crypto: vmx - Convert to CPU feature based module autoloading from Alastair D'Silva
    - Wake up kopald polling thread before waiting for events from Benjamin Herrenschmidt
    - xmon: Dump ISA 2.06 SPRs from Michael Ellerman
    - xmon: Dump ISA 2.07 SPRs from Michael Ellerman
    - Add a parameter to disable 1TB segs from Oliver O'Halloran
    - powerpc/boot: Add OPAL console to epapr wrappers from Oliver O'Halloran
    - Assign fixed PHB number based on device-tree properties from Guilherme G. Piccoli
    - pseries: Add pseries hotplug workqueue from John Allen
    - pseries: Add support for hotplug interrupt source from John Allen
    - pseries: Use kernel hotplug queue for PowerVM hotplug events from John Allen
    - pseries: Move property cloning into its own routine from Nathan Fontenot
    - pseries: Dynamic add entires to associativity lookup array from Nathan Fontenot
    - pseries: Auto-online hotplugged memory from Nathan Fontenot
    - pseries: Remove call to memblock_add() from Nathan Fontenot

    cxl:
    - Add set and get private data to context struct from Michael Neuling
    - make base more explicitly non-modular from Paul Gortmaker
    - Use for_each_compatible_node() macro from Wei Yongjun
    - Frederic Barrat
    - Abstract the differences between the PSL and XSL
    - Make vPHB device node match adapter's
    - Philippe Bergheaud
    - Add mechanism for delivering AFU driver specific events
    - Ignore CAPI adapters misplaced in switched slots
    - Refine slice error debug messages
    - Andrew Donnellan
    - static-ify variables to fix sparse warnings
    - PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl
    - PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state
    - Add cxl_check_and_switch_mode() API to switch bi-modal cards
    - remove dead Kconfig options
    - fix potential NULL dereference in free_adapter()
    - Ian Munsie
    - Update process element after allocating interrupts
    - Add support for CAPP DMA mode
    - Fix allowing bogus AFU descriptors with 0 maximum processes
    - Fix allocating a minimum of 2 pages for the SPA
    - Fix bug where AFU disable operation had no effect
    - Workaround XSL bug that does not clear the RA bit after a reset
    - Fix NULL pointer dereference on kernel contexts with no AFU interrupts
    - powerpc/powernv: Split cxl code out into a separate file
    - Add cxl_slot_is_supported API
    - Enable bus mastering for devices using CAPP DMA mode
    - Move cxl_afu_get / cxl_afu_put to base
    - Allow a default context to be associated with an external pci_dev
    - Do not create vPHB if there are no AFU configuration records
    - powerpc/powernv: Add support for the cxl kernel api on the real phb
    - Add support for using the kernel API with a real PHB
    - Add kernel APIs to get & set the max irqs per context
    - Add preliminary workaround for CX4 interrupt limitation
    - Add support for interrupts on the Mellanox CX4
    - Workaround PE=0 hardware limitation in Mellanox CX4
    - powerpc/powernv: Fix pci-cxl.c build when CONFIG_MODULES=n

    selftests:
    - Test unaligned copy and paste from Chris Smart
    - Load Monitor Register Tests from Jack Miller
    - Cyril Bur
    - exec() with suspended transaction
    - Use signed long to read perf_event_paranoid
    - Fix usage message in context_switch
    - Fix generation of vector instructions/types in context_switch
    - Michael Ellerman
    - Use "Delta" rather than "Error" in normal output
    - Import Anton's mmap & futex micro benchmarks
    - Add a test for PROT_SAO"

    * tag 'powerpc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (263 commits)
    powerpc/mm: Parenthesise IS_ENABLED() in if condition
    tty/hvc: Use opal irqchip interface if available
    tty/hvc: Use IRQF_SHARED for OPAL hvc consoles
    selftests/powerpc: exec() with suspended transaction
    powerpc: Improve comment explaining why we modify VRSAVE
    powerpc/mm: Drop unused externs for hpte_init_beat[_v3]()
    powerpc/mm: Rename hpte_init_lpar() and move the fallback to a header
    powerpc/mm: Fix build break when PPC_NATIVE=n
    crypto: vmx - Convert to CPU feature based module autoloading
    powerpc: Add module autoloading based on CPU features
    powerpc/powernv/ioda: Fix endianness when reading TCEs
    powerpc/mm: Add memory barrier in __hugepte_alloc()
    powerpc/modules: Never restore r2 for a mprofile-kernel style mcount() call
    powerpc/ftrace: Separate the heuristics for checking call sites
    powerpc: Merge 32-bit and 64-bit setup_arch()
    powerpc/64: Make a few boot functions __init
    powerpc: Re-order setup_panic()
    powerpc: Re-order the call to smp_setup_cpu_maps()
    powerpc/32: Move cache info inits to a separate function
    powerpc/64: Move the content of setup_system() to setup_arch()
    ...

    Linus Torvalds
     

21 Jul, 2016

1 commit

  • The SMU command buffer needs to be allocated below 2G using memblock.

    In the past, this had to be done very early from the arch code as
    memblock wasn't available past that point. That is no longer the
    case though, smu_init() is called from setup_arch() when memblock
    is still functional these days. So move the allocation to the
    SMU driver itself.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Michael Ellerman

    Benjamin Herrenschmidt
     

27 Jun, 2016

1 commit


01 May, 2016

1 commit


12 Apr, 2016

2 commits