14 Mar, 2019

1 commit

  • [ Upstream commit 89857a8a5c89a406b967ab2be7bd2ccdbe75e73d ]

    By clearing all interrupt sources, not only those that
    already occurred, the existing code may acknowledge by
    mistake interrupts that occurred after the code checks
    for them.

    Signed-off-by: Madalin Bucur
    Signed-off-by: Roy Pledge
    Signed-off-by: Li Yang
    Signed-off-by: Sasha Levin

    Madalin Bucur
     

02 Oct, 2018

1 commit

  • Defer probe of qman portals after qman probing. This fixes the crash
    below, seen on NXP LS1043A SoCs:

    Unable to handle kernel NULL pointer dereference at virtual address
    0000000000000004
    Mem abort info:
    ESR = 0x96000004
    Exception class = DABT (current EL), IL = 32 bits
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    Data abort info:
    ISV = 0, ISS = 0x00000004
    CM = 0, WnR = 0
    [0000000000000004] user address but active_mm is swapper
    Internal error: Oops: 96000004 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted
    4.18.0-rc1-next-20180622-00200-g986f5c179185 #9
    Hardware name: LS1043A RDB Board (DT)
    pstate: 80000005 (Nzcv daif -PAN -UAO)
    pc : qman_set_sdest+0x74/0xa0
    lr : qman_portal_probe+0x22c/0x470
    sp : ffff00000803bbc0
    x29: ffff00000803bbc0 x28: 0000000000000000
    x27: ffff0000090c1b88 x26: ffff00000927cb68
    x25: ffff00000927c000 x24: ffff00000927cb60
    x23: 0000000000000000 x22: 0000000000000000
    x21: ffff0000090e9000 x20: ffff800073b5c810
    x19: ffff800027401298 x18: ffffffffffffffff
    x17: 0000000000000001 x16: 0000000000000000
    x15: ffff0000090e96c8 x14: ffff80002740138a
    x13: ffff0000090f2000 x12: 0000000000000030
    x11: ffff000008f25000 x10: 0000000000000000
    x9 : ffff80007bdfd2c0 x8 : 0000000000004000
    x7 : ffff80007393cc18 x6 : 0040000000000001
    x5 : 0000000000000000 x4 : ffffffffffffffff
    x3 : 0000000000000004 x2 : ffff00000927c900
    x1 : 0000000000000000 x0 : 0000000000000004
    Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____))
    Call trace:
    qman_set_sdest+0x74/0xa0
    platform_drv_probe+0x50/0xa8
    driver_probe_device+0x214/0x2f8
    __driver_attach+0xd8/0xe0
    bus_for_each_dev+0x68/0xc8
    driver_attach+0x20/0x28
    bus_add_driver+0x108/0x228
    driver_register+0x60/0x110
    __platform_driver_register+0x40/0x48
    qman_portal_driver_init+0x20/0x84
    do_one_initcall+0x58/0x168
    kernel_init_freeable+0x184/0x22c
    kernel_init+0x10/0x108
    ret_from_fork+0x10/0x18
    Code: f9400443 11001000 927e4800 8b000063 (b9400063)
    ---[ end trace 4f6d50489ecfb930 ]---
    Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

    Signed-off-by: Laurentiu Tudor
    Signed-off-by: Li Yang

    Laurentiu Tudor
     

28 Sep, 2018

1 commit

  • Add a couple of new APIs to check the probing status of qman and bman:
    'int bman_is_probed()' and 'int qman_is_probed()'.
    They return the following values.
    * 1 if qman/bman were probed correctly
    * 0 if qman/bman were not yet probed
    * -1 if probing of qman/bman failed
    Drivers that use qman/bman driver services are required to use these
    APIs before calling any functions exported by qman or bman drivers
    or otherwise they will crash the kernel.
    The APIs will be used in the following couple of qbman portal patches
    and later in the series in the dpaa1 ethernet driver.

    Signed-off-by: Laurentiu Tudor
    Signed-off-by: Li Yang

    Laurentiu Tudor
     

26 Sep, 2018

2 commits

  • There is a copy and paste bug so we accidentally use the RX_ shift when
    we're in TX_ mode.

    Fixes: bb8b2062aff3 ("fsl/qe: setup clock source for TDM mode")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Zhao Qiang
    Signed-off-by: Li Yang
    (cherry picked from commit 3cb31b634052ed458922e0c8e2b4b093d7fb60b9)
    Signed-off-by: Olof Johansson

    Zhao Qiang
     
  • If the qman driver didn't probe, calling qman_alloc_fqid_range,
    qman_alloc_pool_range or qman_alloc_cgrid_range (as done in dpaa_eth) will
    pass a NULL pointer to gen_pool_alloc, leading to a NULL pointer
    dereference.

    Signed-off-by: Alexandre Belloni
    Reviewed-by: Roy Pledge
    Signed-off-by: Li Yang
    (cherry picked from commit f72487a2788aa70c3aee1d0ebd5470de9bac953a)
    Signed-off-by: Olof Johansson

    Alexandre Belloni
     

25 Jul, 2018

4 commits


13 Jun, 2018

2 commits

  • The vzalloc() function has no 2-factor argument form, so multiplication
    factors need to be wrapped in array_size(). This patch replaces cases of:

    vzalloc(a * b)

    with:
    vzalloc(array_size(a, b))

    as well as handling cases of:

    vzalloc(a * b * c)

    with:

    vzalloc(array3_size(a, b, c))

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

    vzalloc(4 * 1024)

    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.

    The Coccinelle script used for this was:

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

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

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

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

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

    (
    vzalloc(
    - sizeof(TYPE) * (COUNT_ID)
    + array_size(COUNT_ID, sizeof(TYPE))
    , ...)
    |
    vzalloc(
    - sizeof(TYPE) * COUNT_ID
    + array_size(COUNT_ID, sizeof(TYPE))
    , ...)
    |
    vzalloc(
    - sizeof(TYPE) * (COUNT_CONST)
    + array_size(COUNT_CONST, sizeof(TYPE))
    , ...)
    |
    vzalloc(
    - sizeof(TYPE) * COUNT_CONST
    + array_size(COUNT_CONST, sizeof(TYPE))
    , ...)
    |
    vzalloc(
    - sizeof(THING) * (COUNT_ID)
    + array_size(COUNT_ID, sizeof(THING))
    , ...)
    |
    vzalloc(
    - sizeof(THING) * COUNT_ID
    + array_size(COUNT_ID, sizeof(THING))
    , ...)
    |
    vzalloc(
    - sizeof(THING) * (COUNT_CONST)
    + array_size(COUNT_CONST, sizeof(THING))
    , ...)
    |
    vzalloc(
    - sizeof(THING) * COUNT_CONST
    + array_size(COUNT_CONST, sizeof(THING))
    , ...)
    )

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

    vzalloc(
    - SIZE * COUNT
    + array_size(COUNT, SIZE)
    , ...)

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

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

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

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

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

    (
    vzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    vzalloc(
    - 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 E1, E2, E3;
    constant C1, C2, C3;
    @@

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

    // And then all remaining 2 factors products when they're not all constants.
    @@
    expression E1, E2;
    constant C1, C2;
    @@

    (
    vzalloc(C1 * C2, ...)
    |
    vzalloc(
    - E1 * E2
    + array_size(E1, E2)
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     
  • The kmalloc() function has a 2-factor argument form, kmalloc_array(). This
    patch replaces cases of:

    kmalloc(a * b, gfp)

    with:
    kmalloc_array(a * b, gfp)

    as well as handling cases of:

    kmalloc(a * b * c, gfp)

    with:

    kmalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kmalloc_array(array_size(a, b), c, gfp)

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

    kmalloc(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.

    The tools/ directory was manually excluded, since it has its own
    implementation of kmalloc().

    The Coccinelle script used for this was:

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

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

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

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

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

    (
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

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

    - kmalloc
    + kmalloc_array
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

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

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

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

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

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

    (
    kmalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - 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 E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kmalloc(C1 * C2 * C3, ...)
    |
    kmalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kmalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kmalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kmalloc(
    - 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 THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kmalloc(sizeof(THING) * C2, ...)
    |
    kmalloc(sizeof(TYPE) * C2, ...)
    |
    kmalloc(C1 * C2 * C3, ...)
    |
    kmalloc(C1 * C2, ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

15 Mar, 2018

1 commit


23 Jan, 2018

1 commit


09 Dec, 2017

1 commit


17 Nov, 2017

1 commit

  • Pull ARM SoC driver updates from Arnd Bergmann:
    "This branch contains platform-related driver updates for ARM and
    ARM64, these are the areas that bring the changes:

    New drivers:

    - driver support for Renesas R-Car V3M (R8A77970)

    - power management support for Amlogic GX

    - a new driver for the Tegra BPMP thermal sensor

    - a new bus driver for Technologic Systems NBUS

    Changes for subsystems that prefer to merge through arm-soc:

    - the usual updates for reset controller drivers from Philipp Zabel,
    with five added drivers for SoCs in the arc, meson, socfpa,
    uniphier and mediatek families

    - updates to the ARM SCPI and PSCI frameworks, from Sudeep Holla,
    Heiner Kallweit and Lorenzo Pieralisi

    Changes specific to some ARM-based SoC

    - the Freescale/NXP DPAA QBMan drivers from PowerPC can now work on
    ARM as well

    - several changes for power management on Broadcom SoCs

    - various improvements on Qualcomm, Broadcom, Amlogic, Atmel,
    Mediatek

    - minor Cleanups for Samsung, TI OMAP SoCs"

    [ NOTE! This doesn't work without the previous ARM SoC device-tree pull,
    because the R8A77970 driver is missing a header file that came from
    that pull.

    The fact that this got merged afterwards only fixes it at this point,
    and bisection of that driver will fail if/when you walk into the
    history of that driver. - Linus ]

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (96 commits)
    soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader
    bus: add driver for the Technologic Systems NBUS
    memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
    soc: qcom: remove unused label
    soc: amlogic: gx pm domain: add PM and OF dependencies
    drivers/firmware: psci_checker: Add missing destroy_timer_on_stack()
    dt-bindings: power: add amlogic meson power domain bindings
    soc: amlogic: add Meson GX VPU Domains driver
    soc: qcom: Remote filesystem memory driver
    dt-binding: soc: qcom: Add binding for rmtfs memory
    of: reserved_mem: Accessor for acquiring reserved_mem
    of/platform: Generalize /reserved-memory handling
    soc: mediatek: pwrap: fix fatal compiler error
    soc: mediatek: pwrap: fix compiler errors
    arm64: mediatek: cleanup message for platform selection
    soc: Allow test-building of MediaTek drivers
    soc: mediatek: place Kconfig for all SoC drivers under menu
    soc: mediatek: pwrap: add support for MT7622 SoC
    soc: mediatek: pwrap: add common way for setup CS timing extenstion
    soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap
    ..

    Linus Torvalds
     

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
     

23 Sep, 2017

13 commits


17 Aug, 2017

1 commit

  • 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
    Acked-by: Krzysztof Kozlowski
    Reviewed-by: Geert Uytterhoeven
    Acked-by: Matthias Brugger
    Acked-by: Simon Horman
    Cc: Scott Wood
    Cc: Qiang Zhao
    Cc: Magnus Damm
    Cc: Kukjin Kim
    Cc: Javier Martinez Canillas
    Signed-off-by: Arnd Bergmann

    Rob Herring
     

13 May, 2017

1 commit

  • Pull more powerpc updates from Michael Ellerman:
    "The change to the Linux page table geometry was delayed for more
    testing with 16G pages, and there's the new CPU features stuff which
    just needed one more polish before going in. Plus a few changes from
    Scott which came in a bit late. And then various fixes, mostly minor.

    Summary highlights:

    - rework the Linux page table geometry to lower memory usage on
    64-bit Book3S (IBM chips) using the Hash MMU.

    - support for a new device tree binding for discovering CPU features
    on future firmwares.

    - Freescale updates from Scott:
    "Includes a fix for a powerpc/next mm regression on 64e, a fix for
    a kernel hang on 64e when using a debugger inside a relocated
    kernel, a qman fix, and misc qe improvements."

    Thanks to: Christophe Leroy, Gavin Shan, Horia Geantă, LiuHailong,
    Nicholas Piggin, Roy Pledge, Scott Wood, Valentin Longchamp"

    * tag 'powerpc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/64s: Support new device tree binding for discovering CPU features
    powerpc: Don't print cpu_spec->cpu_name if it's NULL
    of/fdt: introduce of_scan_flat_dt_subnodes and of_get_flat_dt_phandle
    powerpc/64s: Fix unnecessary machine check handler relocation branch
    powerpc/mm/book3s/64: Rework page table geometry for lower memory usage
    powerpc: Fix distclean with Makefile.postlink
    powerpc/64e: Don't place the stack beyond TASK_SIZE
    powerpc/powernv: Block PCI config access on BCM5718 during EEH recovery
    powerpc/8xx: Adding support of IRQ in MPC8xx GPIO
    soc/fsl/qbman: Disable IRQs for deferred QBMan work
    soc/fsl/qe: add EXPORT_SYMBOL for the 2 qe_tdm functions
    soc/fsl/qe: only apply QE_General4 workaround on affected SoCs
    soc/fsl/qe: round brg_freq to 1kHz granularity
    soc/fsl/qe: get rid of immrbar_virt_to_phys()
    net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
    powerpc/64e: Fix hang when debugging programs with relocated kernel

    Linus Torvalds
     

10 May, 2017

1 commit

  • Pull IOMMU updates from Joerg Roedel:

    - code optimizations for the Intel VT-d driver

    - ability to switch off a previously enabled Intel IOMMU

    - support for 'struct iommu_device' for OMAP, Rockchip and Mediatek
    IOMMUs

    - header optimizations for IOMMU core code headers and a few fixes that
    became necessary in other parts of the kernel because of that

    - ACPI/IORT updates and fixes

    - Exynos IOMMU optimizations

    - updates for the IOMMU dma-api code to bring it closer to use per-cpu
    iova caches

    - new command-line option to set default domain type allocated by the
    iommu core code

    - another command line option to allow the Intel IOMMU switched off in
    a tboot environment

    - ARM/SMMU: TLB sync optimisations for SMMUv2, Support for using an
    IDENTITY domain in conjunction with DMA ops, Support for SMR masking,
    Support for 16-bit ASIDs (was previously broken)

    - various other small fixes and improvements

    * tag 'iommu-updates-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (63 commits)
    soc/qbman: Move dma-mapping.h include to qman_priv.h
    soc/qbman: Fix implicit header dependency now causing build fails
    iommu: Remove trace-events include from iommu.h
    iommu: Remove pci.h include from trace/events/iommu.h
    arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops()
    ACPI/IORT: Fix CONFIG_IOMMU_API dependency
    iommu/vt-d: Don't print the failure message when booting non-kdump kernel
    iommu: Move report_iommu_fault() to iommu.c
    iommu: Include device.h in iommu.h
    x86, iommu/vt-d: Add an option to disable Intel IOMMU force on
    iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed
    iommu/arm-smmu: Correct sid to mask
    iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
    iommu: Make iommu_bus_notifier return NOTIFY_DONE rather than error code
    omap3isp: Remove iommu_group related code
    iommu/omap: Add iommu-group support
    iommu/omap: Make use of 'struct iommu_device'
    iommu/omap: Store iommu_dev pointer in arch_data
    iommu/omap: Move data structures to omap-iommu.h
    iommu/omap: Drop legacy-style device support
    ...

    Linus Torvalds
     

05 May, 2017

1 commit


03 May, 2017

1 commit

  • In commit 461a6946b1f9 ("iommu: Remove pci.h include from
    trace/events/iommu.h") that header shuffle uncovered an implicit
    include in this driver, manifesting as:

    CC drivers/soc/fsl/qbman/qman_portal.o
    drivers/soc/fsl/qbman/qman_portal.c: In function 'qman_portal_probe':
    drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'dma_set_mask'
    drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'DMA_BIT_MASK'
    if (dma_set_mask(dev, DMA_BIT_MASK(40))) {
    ^

    on the corenet32_smp_defconfig (and 64 bit respectively.) The above
    commit was singled out via git bisect.

    The header it was implictly relying on getting was dma-mapping.h - so
    we explicitly add it here.

    Fixes: 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h")
    Cc: Joerg Roedel
    Cc: Scott Wood
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Joerg Roedel

    Paul Gortmaker
     

30 Apr, 2017

5 commits

  • Work for Congestion State Notifications (CSCN) and Message Ring (MR)
    handling is handled via the workqueue mechanism. This requires the
    driver to disable those IRQs before scheduling the work and re-enabling
    it once the work is completed so that the interrupt doesn't continually
    fire.

    Signed-off-by: Roy Pledge
    Signed-off-by: Scott Wood

    Roy Pledge
     
  • This allows to build the fsl_ucc_hdlc driver as a module.

    Signed-off-by: Valentin Longchamp
    Signed-off-by: Scott Wood

    Valentin Longchamp
     
  • The QE_General4 workaround is only valid for the MPC832x and MPC836x
    SoCs. The other SoCs that embed a QUICC engine are not affected by this
    hardware bug and thus can use the computed divisors (this was
    successfully tested on the T1040).

    Similalry to what was done in commit 8ce795cb0c6b ("i2c: mpc: assign the
    correct prescaler from SVR") in order to avoid changes in
    the device tree nodes of the QE (with maybe a variant of the compatible
    property), the PVR reg is read out to find out if the workaround must be
    applied or not.

    Signed-off-by: Valentin Longchamp
    Signed-off-by: Scott Wood

    Valentin Longchamp
     
  • Because of integer computation rounding in u-boot (that sets the QE
    brg-frequency DTS prop), the clk value is 99999999 Hz even though it is
    100 MHz.

    When setting brg clks that are exact divisors of 100 MHz, this small
    differnce plays a role and can result in lower clks to be output (for
    instance 20 MHz - divide by 5 - results in 16.666 MHz - divide by 6).

    This patch fixes that by "forcing" the brg_clk to the nearest kHz when
    the difference is below 2 integer rounding errors (i.e. 4).

    Signed-off-by: Valentin Longchamp
    Signed-off-by: Scott Wood

    Valentin Longchamp
     
  • immrbar_virt_to_phys() is not used anymore

    Signed-off-by: Christophe Leroy
    Acked-by: Li Yang
    Signed-off-by: Scott Wood

    Christophe Leroy
     

24 Mar, 2017

1 commit