22 Jan, 2021

2 commits


20 Jan, 2021

2 commits

  • The word of a message can arrive in any order and the current driver
    cannot receive more than 4-word message.

    As the message can arrive in any order, the position where they
    should be stored is stored in the sc_chan struct:
    - initialized at the index of the MU slot
    - incremented each time after a new word is stored

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • The implementation was limiting the size of a message which can be
    received to 4 but soem response can be bigger. For example the
    response of the 'sc_seco_secvio_config' API is 6 words.

    This patch removes this limitation relying on the count of word
    received instead of the index of the chan.
    It does so by duplicating imx_scu_call_rpc as imx_scu_call_big_rpc
    in order to cahnge the RX method using imx_scu_big_rx_callback
    instead of imx_scu_rx_callback.

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     

04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

3 commits

  • [ Upstream commit 57efa1fe5957694fa541c9062de0a127f0b9acb0 ]

    Since commit 70e806e4e645 ("mm: Do early cow for pinned pages during
    fork() for ptes") pages under a FOLL_PIN will not be write protected
    during COW for fork. This means that pages returned from
    pin_user_pages(FOLL_WRITE) should not become write protected while the pin
    is active.

    However, there is a small race where get_user_pages_fast(FOLL_PIN) can
    establish a FOLL_PIN at the same time copy_present_page() is write
    protecting it:

    CPU 0 CPU 1
    get_user_pages_fast()
    internal_get_user_pages_fast()
    copy_page_range()
    pte_alloc_map_lock()
    copy_present_page()
    atomic_read(has_pinned) == 0
    page_maybe_dma_pinned() == false
    atomic_set(has_pinned, 1);
    gup_pgd_range()
    gup_pte_range()
    pte_t pte = gup_get_pte(ptep)
    pte_access_permitted(pte)
    try_grab_compound_head()
    pte = pte_wrprotect(pte)
    set_pte_at();
    pte_unmap_unlock()
    // GUP now returns with a write protected page

    The first attempt to resolve this by using the write protect caused
    problems (and was missing a barrrier), see commit f3c64eda3e50 ("mm: avoid
    early COW write protect games during fork()")

    Instead wrap copy_p4d_range() with the write side of a seqcount and check
    the read side around gup_pgd_range(). If there is a collision then
    get_user_pages_fast() fails and falls back to slow GUP.

    Slow GUP is safe against this race because copy_page_range() is only
    called while holding the exclusive side of the mmap_lock on the src
    mm_struct.

    [akpm@linux-foundation.org: coding style fixes]
    Link: https://lore.kernel.org/r/CAHk-=wi=iCnYCARbPGjkVJu9eyYeZ13N64tZYLdOB8CP5Q_PLw@mail.gmail.com

    Link: https://lkml.kernel.org/r/2-v4-908497cf359a+4782-gup_fork_jgg@nvidia.com
    Fixes: f3c64eda3e50 ("mm: avoid early COW write protect games during fork()")
    Signed-off-by: Jason Gunthorpe
    Suggested-by: Linus Torvalds
    Reviewed-by: John Hubbard
    Reviewed-by: Jan Kara
    Reviewed-by: Peter Xu
    Acked-by: "Ahmed S. Darwish" [seqcount_t parts]
    Cc: Andrea Arcangeli
    Cc: "Aneesh Kumar K.V"
    Cc: Christoph Hellwig
    Cc: Hugh Dickins
    Cc: Jann Horn
    Cc: Kirill Shutemov
    Cc: Kirill Tkhai
    Cc: Leon Romanovsky
    Cc: Michal Hocko
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Jason Gunthorpe
     
  • [ Upstream commit 6bbdb46c4b1bd57839c9c0a110bd81b0be0a4046 ]

    destroy_workqueue is required before the return from scmi_notification_init
    in case devm_kcalloc fails to allocate registered_protocols. Fix this by
    simply moving registered_protocols allocation before alloc_workqueue.

    Link: https://lore.kernel.org/r/20201110074221.41235-1-miaoqinglang@huawei.com
    Fixes: bd31b249692e ("firmware: arm_scmi: Add notification dispatch and delivery")
    Suggested-by: Cristian Marussi
    Reviewed-by: Cristian Marussi
    Signed-off-by: Qinglang Miao
    Signed-off-by: Sudeep Holla
    Signed-off-by: Sasha Levin

    Qinglang Miao
     
  • [ Upstream commit 9294996f0be40e9da818ed891c82397ab63c00d0 ]

    The way that bpmp_populate_debugfs_inband() uses strncpy()
    and strncat() makes no sense since the size argument for
    the first is insufficient to contain the trailing '/'
    and the second passes the length of the input rather than
    the output, which triggers a warning:

    In function 'strncat',
    inlined from 'bpmp_populate_debugfs_inband' at ../drivers/firmware/tegra/bpmp-debugfs.c:422:4:
    include/linux/string.h:289:30: warning: '__builtin_strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=]
    289 | #define __underlying_strncat __builtin_strncat
    | ^
    include/linux/string.h:367:10: note: in expansion of macro '__underlying_strncat'
    367 | return __underlying_strncat(p, q, count);
    | ^~~~~~~~~~~~~~~~~~~~
    drivers/firmware/tegra/bpmp-debugfs.c: In function 'bpmp_populate_debugfs_inband':
    include/linux/string.h:288:29: note: length computed here
    288 | #define __underlying_strlen __builtin_strlen
    | ^
    include/linux/string.h:321:10: note: in expansion of macro '__underlying_strlen'
    321 | return __underlying_strlen(p);

    Simplify this to use an snprintf() instead.

    Fixes: 5e37b9c137ee ("firmware: tegra: Add support for in-band debug")
    Signed-off-by: Arnd Bergmann
    Acked-by: Jon Hunter
    Signed-off-by: Thierry Reding
    Signed-off-by: Sasha Levin

    Arnd Bergmann
     

18 Dec, 2020

3 commits

  • * pm/next: (55 commits)
    MLK-24081-01: power: imx: Add hdmi rx power domain
    soc: fsl: enable acpi support in RCPM driver
    soc: fsl: handle RCPM errata A-008646 on SoC LS1021A
    LF-2594-4 imx: scu-pd: remove mlb power domain
    MLK-24833-1 imx: scu-pd: add lpi2c4 power domain for imx8qm
    ...

    BJ DevOps Team
     
  • * firmware/next: (36 commits)
    MLK-24759: fw: imx: scu: rm: Fix name of some structures
    MLK-24759: fw: imx: scu: seco: Fix Align imx sc msg structs to 4
    MLK-24759: fw: imx: scu: rm: Fix Align imx sc msg structs to 4
    MLK-23403-1 Fix fail cat /sys/devices/soc0/soc_uid
    MLK-23346-1 firmware: imx: scu-pd: DXL Add second USB PHY power domain
    ...

    BJ DevOps Team
     
  • * clock/next: (213 commits)
    MLK-24081-02: clk: imx: Add imx8qm hdmi rx lpcg clocks
    LF-632 clk: s32v234: Fix "enetpll_dfs3" position in sdhc_sels
    clk: s32v234: Enable FlexCAN clock
    clk: s32v234: Add definitions for CAN clocks
    clk: s32v234: Initial enet clk support
    ...

    BJ DevOps Team
     

17 Dec, 2020

1 commit


14 Dec, 2020

28 commits