25 Oct, 2020

1 commit

  • Pull ARM SoC-related driver updates from Olof Johansson:
    "Various driver updates for platforms. A bulk of this is smaller fixes
    or cleanups, but some of the new material this time around is:

    - Support for Nvidia Tegra234 SoC

    - Ring accelerator support for TI AM65x

    - PRUSS driver for TI platforms

    - Renesas support for R-Car V3U SoC

    - Reset support for Cortex-M4 processor on i.MX8MQ

    There are also new socinfo entries for a handful of different SoCs and
    platforms"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (131 commits)
    drm/mediatek: reduce clear event
    soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api
    soc: mediatek: cmdq: add jump function
    soc: mediatek: cmdq: add write_s_mask value function
    soc: mediatek: cmdq: add write_s value function
    soc: mediatek: cmdq: add read_s function
    soc: mediatek: cmdq: add write_s_mask function
    soc: mediatek: cmdq: add write_s function
    soc: mediatek: cmdq: add address shift in jump
    soc: mediatek: mtk-infracfg: Fix kerneldoc
    soc: amlogic: pm-domains: use always-on flag
    reset: sti: reset-syscfg: fix struct description warnings
    reset: imx7: add the cm4 reset for i.MX8MQ
    dt-bindings: reset: imx8mq: add m4 reset
    reset: Fix and extend kerneldoc
    reset: reset-zynqmp: Added support for Versal platform
    dt-bindings: reset: Updated binding for Versal reset driver
    reset: imx7: Support module build
    soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk
    soc: fsl: qman: convert to use be32_add_cpu()
    ...

    Linus Torvalds
     

12 Sep, 2020

1 commit


17 Aug, 2020

3 commits


25 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
    Acked-by: Rob Herring
    Signed-off-by: Santosh Shilimkar

    Alexander A. Klimov
     

05 Sep, 2019

1 commit

  • Sysfw provides an option for requesting exclusive access for a
    device using the flags MSG_FLAG_DEVICE_EXCLUSIVE. If this flag is
    not used, the device is meant to be shared across hosts. Once a device
    is requested from a host with this flag set, any request to this
    device from a different host will be nacked by sysfw. Current tisci
    driver enables this flag for every device requests. But this may not
    be true for all the devices. So provide a separate commands in driver
    for exclusive and shared device requests.

    Reviewed-by: Nishanth Menon
    Signed-off-by: Lokesh Vutla
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Arnd Bergmann

    Lokesh Vutla
     

20 Jul, 2019

1 commit

  • Pull ARM SoC-related driver updates from Olof Johansson:
    "Various driver updates for platforms and a couple of the small driver
    subsystems we merge through our tree:

    - A driver for SCU (system control) on NXP i.MX8QXP

    - Qualcomm Always-on Subsystem messaging driver (AOSS QMP)

    - Qualcomm PM support for MSM8998

    - Support for a newer version of DRAM PHY driver for Broadcom (DPFE)

    - Reset controller support for Bitmain BM1880

    - TI SCI (System Control Interface) support for CPU control on AM654
    processors

    - More TI sysc refactoring and rework"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits)
    reset: remove redundant null check on pointer dev
    soc: rockchip: work around clang warning
    dt-bindings: reset: imx7: Fix the spelling of 'indices'
    soc: imx: Add i.MX8MN SoC driver support
    soc: aspeed: lpc-ctrl: Fix probe error handling
    soc: qcom: geni: Add support for ACPI
    firmware: ti_sci: Fix gcc unused-but-set-variable warning
    firmware: ti_sci: Use the correct style for SPDX License Identifier
    soc: imx8: Use existing of_root directly
    soc: imx8: Fix potential kernel dump in error path
    firmware/psci: psci_checker: Park kthreads before stopping them
    memory: move jedec_ddr.h from include/memory to drivers/memory/
    memory: move jedec_ddr_data.c from lib/ to drivers/memory/
    MAINTAINERS: Remove myself as qcom maintainer
    soc: aspeed: lpc-ctrl: make parameter optional
    soc: qcom: apr: Don't use reg for domain id
    soc: qcom: fix QCOM_AOSS_QMP dependency and build errors
    memory: tegra: Fix -Wunused-const-variable
    firmware: tegra: Early resume BPMP
    soc/tegra: Select pinctrl for Tegra194
    ...

    Linus Torvalds
     

25 Jun, 2019

1 commit


19 Jun, 2019

1 commit

  • Fixes gcc '-Wunused-but-set-variable' warning:

    drivers/firmware/ti_sci.c: In function ti_sci_cmd_ring_config:
    drivers/firmware/ti_sci.c:2035:17: warning: variable dev set but not used [-Wunused-but-set-variable]
    drivers/firmware/ti_sci.c: In function ti_sci_cmd_ring_get_config:
    drivers/firmware/ti_sci.c:2104:17: warning: variable dev set but not used [-Wunused-but-set-variable]
    drivers/firmware/ti_sci.c: In function ti_sci_cmd_rm_udmap_tx_ch_cfg:
    drivers/firmware/ti_sci.c:2287:17: warning: variable dev set but not used [-Wunused-but-set-variable]
    drivers/firmware/ti_sci.c: In function ti_sci_cmd_rm_udmap_rx_ch_cfg:
    drivers/firmware/ti_sci.c:2357:17: warning: variable dev set but not used [-Wunused-but-set-variable]

    Use the 'dev' variable instead of info->dev to fix this.

    Acked-by: Suman Anna
    Reported-by: Hulk Robot
    Signed-off-by: YueHaibing
    Signed-off-by: Santosh Shilimkar

    YueHaibing
     

13 Jun, 2019

4 commits

  • Do not fail if any of the requested subtypes are not availabe, but set the
    number of resources to 0 and continue parsing the resource ranges.

    Reviewed-by: Lokesh Vutla
    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Tero Kristo
    Signed-off-by: Santosh Shilimkar

    Peter Ujfalusi
     
  • Texas Instrument's System Control Interface (TI-SCI) Message Protocol
    is used in Texas Instrument's System on Chip (SoC) such as those
    in K3 family AM654 SoC to communicate between various compute
    processors with a central system controller entity.

    The system controller provides various services including the control
    of other compute processors within the SoC. Extend the TI-SCI protocol
    support to add various TI-SCI commands to invoke services associated
    with power and reset control, and boot vector management of the
    various compute processors from the Linux kernel.

    Signed-off-by: Suman Anna
    Signed-off-by: Tero Kristo
    Signed-off-by: Santosh Shilimkar

    Suman Anna
     
  • Configuration of NAVSS resource, like rings, UDMAP channels, flows
    and PSI-L thread management need to be done via TISCI.

    Add the needed structures and functions for NAVSS resource configuration of
    the following:
    Rings from Ring Accelerator
    PSI-L thread management
    UDMAP tchan, rchan and rflow configuration.

    Signed-off-by: Peter Ujfalusi
    Reviewed-by: Lokesh Vutla
    Signed-off-by: Tero Kristo
    Signed-off-by: Santosh Shilimkar

    Peter Ujfalusi
     
  • TI-SCI firmware will only respond to messages when the
    TI_SCI_FLAG_REQ_ACK_ON_PROCESSED flag is set. Most messages already do
    this, set this for the ones that do not.

    This will be enforced in future firmware that better match the TI-SCI
    specifications, this patch will not break users of existing firmware.

    Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
    Signed-off-by: Andrew F. Davis
    Acked-by: Nishanth Menon
    Tested-by: Alejandro Hernandez
    Signed-off-by: Tero Kristo
    Signed-off-by: Santosh Shilimkar

    Andrew F. Davis
     

12 Jun, 2019

1 commit

  • Future SoCs are going to have more than 255 device clocks in certain cases,
    and thus the API must be extended to support this. The support is done in
    backwards compatible extension, in which the new u32 clock identifier
    fields are only used if the existing u8 size clock identifier is set as
    255. In all the other cases, the existing u8 clock identifier is used. As
    the size of the messages sent / received is not verified for existing
    devices / old firmware, increasing the size of the messages from the end
    is also fine. Due to this reason, depending on ABI version isn't necessary
    either.

    Acked-by: Santosh Shilimkar
    Signed-off-by: Tero Kristo

    Tero Kristo
     

01 May, 2019

5 commits

  • Each resource with in the device can be uniquely identified as defined
    by TISCI. Since this is generic across the devices, resource allocation
    also can be made generic instead of each client driver handling the
    resource. So add helper apis to manage the resource.

    Signed-off-by: Lokesh Vutla
    Acked-by: Nishanth Menon
    Signed-off-by: Marc Zyngier

    Lokesh Vutla
     
  • Add the resource mapping table for AM654 SoC as defined in
    http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am6x/resasg_types.html
    Introduce a new compatible for AM654 "ti,am654-sci" for using
    this resource map table.

    Reviewed-by: Rob Herring
    Acked-by: Tony Lindgren
    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Lokesh Vutla
    Acked-by: Nishanth Menon
    Signed-off-by: Marc Zyngier

    Peter Ujfalusi
     
  • TISCI abstracts the handling of IRQ routes where interrupt sources
    are not directly connected to host interrupt controller. Add support
    for the set of TISCI commands for requesting and releasing IRQs.

    Signed-off-by: Lokesh Vutla
    Acked-by: Nishanth Menon
    Signed-off-by: Marc Zyngier

    Lokesh Vutla
     
  • TISCI provides support for getting the resources(IRQ, RING etc..)
    assigned to a specific device. These resources can be handled by
    the client and in turn sends TISCI cmd to configure the resources.

    It is very important that client should keep track on usage of these
    resources.

    Add support for TISCI commands to get resource ranges.

    Signed-off-by: Lokesh Vutla
    Signed-off-by: Peter Ujfalusi
    Acked-by: Nishanth Menon
    Signed-off-by: Marc Zyngier

    Lokesh Vutla
     
  • TISCI has been updated to have support for Resource management(like
    interrupts etc..). And there can be multiple device instances of a
    resource type in a SoC. So every driver corresponding to a resource type
    should get a TISCI handle so that it can make TISCI calls. And each
    DT node corresponding to a device should exist under its corresponding
    bus node as per the SoC architecture.

    But existing apis in TISCI library assumes that all TISCI users are
    child nodes of TISCI. Which is not true in the above case. So introduce
    (devm_)ti_sci_get_by_phandle() apis that can be used by TISCI users
    to get TISCI handle using of phandle property.

    Signed-off-by: Grygorii Strashko
    Signed-off-by: Lokesh Vutla
    Acked-by: Nishanth Menon
    Signed-off-by: Marc Zyngier

    Grygorii Strashko
     

31 Jan, 2019

1 commit


29 Aug, 2018

1 commit

  • Texas Instrument's System Control Interface (TISCI) permits the
    ability for Operating Systems to running in virtual machines to be
    able to independently communicate with the firmware without the need
    going through an hypervisor.

    The "host-id" in effect is the hardware representation of the
    host (example: VMs locked to a core) as identified to the System
    Controller.

    Provide support as an optional parameter implementation and use the
    compatible data as default if one is not provided by device tree.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Santosh Shilimkar

    Nishanth Menon
     

13 Jun, 2018

2 commits

  • Pull more overflow updates from Kees Cook:
    "The rest of the overflow changes for v4.18-rc1.

    This includes the explicit overflow fixes from Silvio, further
    struct_size() conversions from Matthew, and a bug fix from Dan.

    But the bulk of it is the treewide conversions to use either the
    2-factor argument allocators (e.g. kmalloc(a * b, ...) into
    kmalloc_array(a, b, ...) or the array_size() macros (e.g. vmalloc(a *
    b) into vmalloc(array_size(a, b)).

    Coccinelle was fighting me on several fronts, so I've done a bunch of
    manual whitespace updates in the patches as well.

    Summary:

    - Error path bug fix for overflow tests (Dan)

    - Additional struct_size() conversions (Matthew, Kees)

    - Explicitly reported overflow fixes (Silvio, Kees)

    - Add missing kvcalloc() function (Kees)

    - Treewide conversions of allocators to use either 2-factor argument
    variant when available, or array_size() and array3_size() as needed
    (Kees)"

    * tag 'overflow-v4.18-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (26 commits)
    treewide: Use array_size in f2fs_kvzalloc()
    treewide: Use array_size() in f2fs_kzalloc()
    treewide: Use array_size() in f2fs_kmalloc()
    treewide: Use array_size() in sock_kmalloc()
    treewide: Use array_size() in kvzalloc_node()
    treewide: Use array_size() in vzalloc_node()
    treewide: Use array_size() in vzalloc()
    treewide: Use array_size() in vmalloc()
    treewide: devm_kzalloc() -> devm_kcalloc()
    treewide: devm_kmalloc() -> devm_kmalloc_array()
    treewide: kvzalloc() -> kvcalloc()
    treewide: kvmalloc() -> kvmalloc_array()
    treewide: kzalloc_node() -> kcalloc_node()
    treewide: kzalloc() -> kcalloc()
    treewide: kmalloc() -> kmalloc_array()
    mm: Introduce kvcalloc()
    video: uvesafb: Fix integer overflow in allocation
    UBIFS: Fix potential integer overflow in allocation
    leds: Use struct_size() in allocation
    Convert intel uncore to struct_size
    ...

    Linus Torvalds
     
  • The devm_kzalloc() function has a 2-factor argument form, devm_kcalloc().
    This patch replaces cases of:

    devm_kzalloc(handle, a * b, gfp)

    with:
    devm_kcalloc(handle, a * b, gfp)

    as well as handling cases of:

    devm_kzalloc(handle, a * b * c, gfp)

    with:

    devm_kzalloc(handle, array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    devm_kcalloc(handle, array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    devm_kzalloc(handle, 4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    Some manual whitespace fixes were needed in this patch, as Coccinelle
    really liked to write "=devm_kcalloc..." instead of "= devm_kcalloc...".

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    expression HANDLE;
    type TYPE;
    expression THING, E;
    @@

    (
    devm_kzalloc(HANDLE,
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression HANDLE;
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    expression HANDLE;
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    expression HANDLE;
    identifier SIZE, COUNT;
    @@

    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression HANDLE;
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression HANDLE;
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    expression HANDLE;
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    devm_kzalloc(HANDLE,
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression HANDLE;
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression HANDLE;
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    devm_kzalloc(HANDLE, sizeof(THING) * C2, ...)
    |
    devm_kzalloc(HANDLE, sizeof(TYPE) * C2, ...)
    |
    devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
    |
    devm_kzalloc(HANDLE, C1 * C2, ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

05 May, 2018

1 commit


17 Dec, 2017

1 commit


10 Oct, 2017

1 commit

  • Use the %pS printk format for printing symbols from direct addresses.
    This is important for the ia64, ppc64 and parisc64 architectures, while on
    other architectures there is no difference between %pS and %pF.
    Fix it for consistency across the kernel.

    Signed-off-by: Helge Deller
    Acked-by: Nishanth Menon
    Signed-off-by: Santosh Shilimkar

    Helge Deller
     

19 May, 2017

1 commit

  • gcc-7 notices that the length we pass to strncat is wrong:

    drivers/firmware/ti_sci.c: In function 'ti_sci_probe':
    drivers/firmware/ti_sci.c:204:32: error: specified bound 50 equals the size of the destination [-Werror=stringop-overflow=]

    Instead of the total length, we must pass the length of the
    remaining space here.

    Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
    Cc: stable@vger.kernel.org
    Acked-by: Nishanth Menon
    Acked-by: Santosh Shilimkar
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

27 Oct, 2016

4 commits

  • Since system controller now has control over SoC power management, it
    needs to be explicitly requested to reboot the SoC. Add support for
    it.

    In some systems however, SoC needs to toggle a GPIO or send event to an
    external entity (like a PMIC) for a system reboot to take place. To
    facilitate that, we allow for a DT property to determine if the reboot
    handler will be registered and further, the service is also made
    available to other drivers (such as PMIC driver) to sequence the
    additional operation and trigger the SoC reboot as the last step.

    Tested-by: Lokesh Vutla
    Signed-off-by: Nishanth Menon
    Signed-off-by: Tero Kristo

    Nishanth Menon
     
  • Texas Instrument's System Control Interface (TI-SCI) Message Protocol
    is used in Texas Instrument's System on Chip (SoC) such as those
    in keystone family K2G SoC to communicate between various compute
    processors with a central system controller entity.

    TI-SCI message protocol provides support for management of various
    hardware entities within the SoC. Add support driver to allow
    communication with system controller entity within the SoC using the
    mailbox client.

    In general, we expect to function at a device level of abstraction,
    however, for proper operation of hardware blocks, many clocks directly
    supplying the hardware block needs to be queried or configured.

    Introduce support for the set of SCI message protocol support that
    provide us with this capability.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Tero Kristo

    Nishanth Menon
     
  • Texas Instrument's System Control Interface (TI-SCI) Message Protocol
    is used in Texas Instrument's System on Chip (SoC) such as those
    in keystone family K2G SoC to communicate between various compute
    processors with a central system controller entity.

    TI-SCI message protocol provides support for management of various
    hardware entitites within the SoC. Add support driver to allow
    communication with system controller entity within the SoC using the
    mailbox client.

    We introduce the fundamental device management capability support to
    the driver protocol as part of this change.

    [d-gerlach@ti.com: Contributed device reset handling]
    Signed-off-by: Dave Gerlach
    Signed-off-by: Nishanth Menon
    Signed-off-by: Tero Kristo

    Nishanth Menon
     
  • Texas Instrument's System Control Interface (TI-SCI) Message Protocol
    is used in Texas Instrument's System on Chip (SoC) such as those
    in keystone family K2G SoC to communicate between various compute
    processors with a central system controller entity.

    TI-SCI message protocol provides support for management of various
    hardware entities within the SoC. Add support driver to allow
    communication with system controller entity within the SoC using the
    mailbox client.

    We introduce the basic registration and query capability for the
    driver protocol as part of this change. Subsequent patches add in
    functionality specific to the TI-SCI features.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Tero Kristo

    Nishanth Menon