53109 Commits

Author SHA1 Message Date
Tashfin Shakeer Rhythm
a9566ccc56 msm-4.14: Make macros no-op using ((void)0)
Do not solely rely on compiler optimizations to get the workaround
of having macros do nothing using an empty do-while loop. It's
inefficient.

Use ((void)0) to which the standard assert macro expands when NDEBUG
is defined.

No functional change intended.

[mcdofrenchfreis]:
Implement this patch to tree using the command:
git grep -l "do {} while (0)" | xargs sed -i "s/do {} while (0)/((void)0)/g"

Change-Id: I9615c62c46670e31ed8d0d89d195144541baa3e6
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: mcdofrenchfreis <xyzevan@androidist.net>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2025-01-17 00:51:10 -03:00
Ard Biesheuvel
c3f5ee8d43 lib/xor: Make xor prototypes more friendly to compiler vectorization
Modern compilers are perfectly capable of extracting parallelism from
the XOR routines, provided that the prototypes reflect the nature of the
input accurately, in particular, the fact that the input vectors are
expected not to overlap. This is not documented explicitly, but is
implied by the interchangeability of the various C routines, some of
which use temporary variables while others don't: this means that these
routines only behave identically for non-overlapping inputs.

So let's decorate these input vectors with the __restrict modifier,
which informs the compiler that there is no overlap. While at it, make
the input-only vectors pointer-to-const as well.

Link: https://github.com/ClangBuiltLinux/linux/issues/563
Change-Id: I5bf93880b158aa01f2b5155e7a9f6cd7b9088fc6
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:44 -03:00
Richard Raya
96c0eee27a Revert "cpuidle: lpm-levels: Remove idle prediction feature"
This reverts commit c980eae303b3d4f6c7ecc89c3ac6440b8935c4b0.

Change-Id: I324f1ded32ad960978ce2684bbd50f04f7f16f0d
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-07 04:16:16 -03:00
Richard Raya
f15dbc5435 This is the 4.14.352 OpenELA-Extended LTS stable release
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEERFwmR4yFob14UDOYC8702P6YulgFAmbMN2wZHHZlZ2FyZC5u
 b3NzdW1Ab3JhY2xlLmNvbQAKCRALzvTY/pi6WI/OD/0df1vNkreJiEgYmrzoT5rG
 FekNwYxJLpnN2cIk5qZv5SUSrZDfqPEMzhz4tuv0kVMv8gb+k8tXpBGr6rfZlYEw
 UoDAZzAN0Ns0JwxtPoIIJrjfD1a0xq8teSGhbphUDLA/fH/M66pTPtJrDjia/99E
 0Ymhc+8pv77UljmaxjEoQ8a0hXoe/TxoxwJpUdklwhcXZ+u4+FwJfxxHd4webnGs
 XiC1rrq4fYOX5MaomrGhKQBFv/iQAM+U9VHn4m1yLqDXYXn3j7stOa8dPY5g6EJw
 kzPsure193EXj9Tp5Y+sC+aExLGfaO7MB+hlXR0El/cHboTFJshafVuIhHp93zlI
 4NVExnDe3Xmrb7U4hCJd2L2z3Vgq8jSH0R1FwZqfZruOo+B1zG9/SIiM96pD5YR1
 ugk2P9XAXEpDUoMv4XPCNlpMetT7HBdUWIJCZQDCTl1axiGWnqs1MpGVHfavoTLz
 CKuoluR/0vL5lVX7vrc1Pb6+7APaY0U9ehVDlMbumS2PmpkLsoaTbTLlJsnVBrmg
 fkN4sjja0mszL4f5zzPCZ/9G8opf63+LLiheUNdnB4yWn7VoK4+kH3v3dW3e2gzJ
 t5IYygJ8Ys8pCLAueuiRb3pce59HrEq8mFtoF+MXlLN4fVHFwKbTtJWiEvEl5x3E
 Ks8j03Ywad/Zcl5GiwnnEw==
 =AZG+
 -----END PGP SIGNATURE-----

Merge tag 'v4.14.352-openela' of https://github.com/openela/kernel-lts

This is the 4.14.352 OpenELA-Extended LTS stable release

* tag 'v4.14.352-openela' of https://github.com/openela/kernel-lts: (32 commits)
  LTS: Update to 4.14.352
  filelock: Fix fcntl/close race recovery compat path
  jfs: don't walk off the end of ealist
  ocfs2: add bounds checking to ocfs2_check_dir_entry()
  net: relax socket state check at accept time.
  ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
  ARM: 9324/1: fix get_user() broken with veneer
  filelock: Remove locks reliably when fcntl/close race is detected
  hfsplus: fix uninit-value in copy_name
  selftests/vDSO: fix clang build errors and warnings
  spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
  fs: better handle deep ancestor chains in is_subdir()
  Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
  net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
  net: usb: qmi_wwan: add Telit FN912 compositions
  ALSA: dmaengine_pcm: terminate dmaengine before synchronize
  s390/sclp: Fix sclp_init() cleanup on failure
  Input: elantech - fix touchpad state on resume for Lenovo N24
  wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
  mei: demote client disconnect warning on suspend to debug
  ...

Change-Id: I4cbdfa0321bf83d62ac62f386eb77d21c5785dec
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-26 18:30:32 -03:00
Richard Raya
59448bba68 This is the 4.14.351 OpenELA-Extended LTS stable release
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEERFwmR4yFob14UDOYC8702P6YulgFAmbJhFAZHHZlZ2FyZC5u
 b3NzdW1Ab3JhY2xlLmNvbQAKCRALzvTY/pi6WM9AD/9T4mE7CXds1QYHF3wzFinF
 t4oHyXvOiY4Mrsdy20A4FIvYfrYi5PyZ39E7G38e2FH2jG7qwHTyHXOjh94cL9gV
 5zlU7+jxWQenDKTl6LV3veYP/QNp9Yh9iQn0sgwC3HTUeq+zNd8rxvBjcAfDNiIM
 taC98s63QjtjZtQPzAaS461LH/U14dKFChuPEC36dei/M4T2UDTHZqvRdFBWB8h2
 fC/dJgtuohXTFexpGgk8p6GKNpFjyE62hBI3Xc+/k24j88r0cFqLLp6NhgF6JIpc
 6L6zGUKeyLXaIR/xoshK3MdgJ/XbocqKlRexJOFxCYmAEreAnQelS8v7QG3j6j33
 8AiUasZfpDPFNEH1CNJC0BiNs76NByFCJny+QUYlq0O9ZjfYQt+PvZZXSCx8jIn6
 A75ryAXLERNlXvh5XuEXlNJsOrN3enWnhgeJXMJOfKxtOfn7CRLmfSvpiS2/SfT3
 sxU4aNQNenbYoWwPQRPLXfNO4UvkmLfk6I6+AqRiHdykYQswhZRnpWxsPRSUwrhI
 6mErDGIXmryid/p+P/eMuviH3AO+KEpjoDzLFMFJWMpLQouTDl5qCwGu3QwVjybS
 /MOlfhi5z1so1e5qBIUmY498jZfVbZ5VMC76bOdhtC2USmvotcBSu611x5JtPaZo
 Cv3jKYl+/S0DVIZdEMPA8g==
 =wFNA
 -----END PGP SIGNATURE-----

Merge tag 'v4.14.351-openela' of https://github.com/openela/kernel-lts

This is the 4.14.351 OpenELA-Extended LTS stable release

* tag 'v4.14.351-openela' of https://github.com/openela/kernel-lts: (58 commits)
  LTS: Update to 4.14.351
  i2c: rcar: bring hardware to known state when probing
  nilfs2: fix kernel bug on rename operation of broken directory
  tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
  libceph: fix race between delayed_work() and ceph_monc_stop()
  hpet: Support 32-bit userspace
  USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
  usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
  USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
  USB: serial: option: add Rolling RW350-GL variants
  USB: serial: option: add Netprisma LCUK54 series modules
  USB: serial: option: add support for Foxconn T99W651
  USB: serial: option: add Fibocom FM350-GL
  USB: serial: option: add Telit FN912 rmnet compositions
  USB: serial: option: add Telit generic core-dump composition
  ARM: davinci: Convert comma to semicolon
  ppp: reject claimed-as-LCP but actually malformed packets
  net: ethernet: lantiq_etop: fix double free in detach
  net: lantiq_etop: add blank line after declaration
  tcp: fix incorrect undo caused by DSACK of TLP retransmit
  ...

Change-Id: I8bb6496007a068b83dd95a991e2f3afb0e18da82
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-25 23:41:30 -03:00
Masahiro Yamada
a650c33ed9 ARM: 9324/1: fix get_user() broken with veneer
commit 24d3ba0a7b44c1617c27f5045eecc4f34752ab03 upstream.

The 32-bit ARM kernel stops working if the kernel grows to the point
where veneers for __get_user_* are created.

AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a
scratch register between a routine and any subroutine it calls. It
can also be used within a routine to hold intermediate values between
subroutine calls."

However, bl instructions buried within the inline asm are unpredictable
for compilers; hence, "ip" must be added to the clobber list.

This becomes critical when veneers for __get_user_* are created because
veneers use the ip register since commit 02e541db0540 ("ARM: 8323/1:
force linker to use PIC veneers").

[1]: https://github.com/ARM-software/abi-aa/blob/2023Q1/aapcs32/aapcs32.rst

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Cc: John Stultz <jstultz@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 41a5c1717bf4ad1b6084e8682de64b178eabc059)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-08-24 08:37:06 +00:00
Chen Ni
4e59153924 ARM: davinci: Convert comma to semicolon
[ Upstream commit acc3815db1a02d654fbc19726ceaadca0d7dd81c ]

Replace a comma between expression statements by a semicolon.

Fixes: efc1bb8a6fd5 ("davinci: add power management support")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit f9ace6a3278a613d22abbd7d69e13d481b800622)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:50:06 +00:00
Richard Raya
15a5216c8c Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (133 commits)
  LTS: Update to 4.14.350
  SUNRPC: Fix RPC client cleaned up the freed pipefs dentries
  arm64: dts: rockchip: Add sound-dai-cells for RK3368
  tcp: Fix data races around icsk->icsk_af_ops.
  ipv6: Fix data races around sk->sk_prot.
  ipv6: annotate some data-races around sk->sk_prot
  pwm: stm32: Refuse too small period requests
  ftruncate: pass a signed offset
  batman-adv: Don't accept TT entries for out-of-spec VIDs
  batman-adv: include gfp.h for GFP_* defines
  drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
  drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
  hexagon: fix fadvise64_64 calling conventions
  tty: mcf: MCF54418 has 10 UARTS
  usb: atm: cxacru: fix endpoint checking in cxacru_bind()
  usb: musb: da8xx: fix a resource leak in probe()
  usb: gadget: printer: SS+ support
  net: usb: ax88179_178a: improve link status logs
  iio: adc: ad7266: Fix variable checking bug
  mmc: sdhci-pci: Convert PCIBIOS_* return codes to errnos
  ...

Change-Id: I0ab862e0932a48f13c64657e5456f3034b766445
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-16 22:07:21 -03:00
Krzysztof Kozlowski
d350b585ee ARM: dts: samsung: smdk4412: fix keypad no-autorepeat
[ Upstream commit 4ac4c1d794e7ff454d191bbdab7585ed8dbf3758 ]

Although the Samsung SoC keypad binding defined
linux,keypad-no-autorepeat property, Linux driver never implemented it
and always used linux,input-no-autorepeat.  Correct the DTS to use
property actually implemented.

This also fixes dtbs_check errors like:

  exynos4412-smdk4412.dtb: keypad@100a0000: 'key-A', 'key-B', 'key-C', 'key-D', 'key-E', 'linux,keypad-no-autorepeat' do not match any of the regexes: '^key-[0-9a-z]+$', 'pinctrl-[0-9]+'

Cc: <stable@vger.kernel.org>
Fixes: c9b92dd70107 ("ARM: dts: Add keypad entries to SMDK4412")
Link: https://lore.kernel.org/r/20240312183105.715735-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 4c70a7576ae14f804196ae0089f9deb6cbd77e1f)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-08 15:52:19 +00:00
Krzysztof Kozlowski
9b2697403d ARM: dts: samsung: exynos4412-origen: fix keypad no-autorepeat
[ Upstream commit 88208d3cd79821117fd3fb80d9bcab618467d37b ]

Although the Samsung SoC keypad binding defined
linux,keypad-no-autorepeat property, Linux driver never implemented it
and always used linux,input-no-autorepeat.  Correct the DTS to use
property actually implemented.

This also fixes dtbs_check errors like:

  exynos4412-origen.dtb: keypad@100a0000: 'linux,keypad-no-autorepeat' does not match any of the regexes: '^key-[0-9a-z]+$', 'pinctrl-[0-9]+'

Cc: <stable@vger.kernel.org>
Fixes: bd08f6277e44 ("ARM: dts: Add keypad entries to Exynos4412 based Origen")
Link: https://lore.kernel.org/r/20240312183105.715735-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 77951f880a4b9e7f76460364ec0b931d1a59c9fb)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-08 15:52:19 +00:00
Krzysztof Kozlowski
5566df875a ARM: dts: samsung: smdkv310: fix keypad no-autorepeat
[ Upstream commit 87d8e522d6f5a004f0aa06c0def302df65aff296 ]

Although the Samsung SoC keypad binding defined
linux,keypad-no-autorepeat property, Linux driver never implemented it
and always used linux,input-no-autorepeat.  Correct the DTS to use
property actually implemented.

This also fixes dtbs_check errors like:

  exynos4210-smdkv310.dtb: keypad@100a0000: 'linux,keypad-no-autorepeat' does not match any of the regexes: '^key-[0-9a-z]+$', 'pinctrl-[0-9]+'

Cc: <stable@vger.kernel.org>
Fixes: 0561ceabd0f1 ("ARM: dts: Add intial dts file for EXYNOS4210 SoC, SMDKV310 and ORIGEN")
Link: https://lore.kernel.org/r/20240312183105.715735-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 1d1838ca012952f4914af6f6619bbdea6251039c)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-08 15:52:19 +00:00
Richard Raya
80d6c11591 Merge tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.14
"LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.14:
  msm: adsprpc: use-after-free (UAF) in global maps
  msm: npu v2: Fix OOB issue in IPC between driver and firmware
  msm: npu v1: Fix OOB issue in IPC between driver and firmware
  rpmsg: bgcom: out of bound read from process_cmd
  defconfig: Disable SLUB_DEBUG SCHED_DEBUG and DEBUG_PREEMPT in perf build
  msm: vidc: Release cvp buffer lock in invalid buffer case
  msm: vidc: Fix possible UAF during buffer unregister call
  msm: camera: sensor: Handling race condition in util api
  msm: kgsl: Update the protect register list
  msm: kgsl: sensor: Proper handling of race condition in util api

Change-Id: I9b335937bd7c56f7bf1512bb81a3da0243a10987
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-23 18:06:42 -03:00
Sultan Alsawaf
c980eae303 cpuidle: lpm-levels: Remove idle prediction feature
There is a lot of CPU time spent in hrtimer_try_to_cancel() when exiting
idle according to perf. This is due to the idle prediction feature
constantly arming and canceling a timer that it uses to track prediction
accuracy. Idle prediction itself is used to try and select shallower
idle states when an incoming wake-up is predicted in order to improve
performance, but performance is actually better without idle prediction,
presumably thanks to eliminating the hrtimer_try_to_cancel() overhead.

The code for idle prediction is removed wholesale because the toggle
doesn't cover everything, and it's easier to just nuke the whole feature
than it is to try and cover everything with a toggle.

[dereference23: Forward port to 4.14]

Change-Id: I0a1d53cddd15dd6f0cb81dff75918ba94e3537c2
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-02 11:42:59 -03:00
Linux Build Service Account
1f4ab35cc9 Merge 74658de3a26d9b250b56c02d2701ed186722b50a on remote branch
Change-Id: I0318747a923492cfd39cd52575d70be9812b4372
2024-06-18 07:57:53 -07:00
Richard Raya
3143685e95 Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (278 commits)
  LTS: Update to 4.14.348
  docs: kernel_include.py: Cope with docutils 0.21
  serial: kgdboc: Fix NMI-safety problems from keyboard reset code
  btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
  dm: limit the number of targets and parameter size area
  Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems"
  LTS: Update to 4.14.347
  rds: Fix build regression.
  RDS: IB: Use DEFINE_PER_CPU_SHARED_ALIGNED for rds_ib_stats
  af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().
  net: fix out-of-bounds access in ops_init
  drm/vmwgfx: Fix invalid reads in fence signaled events
  dyndbg: fix old BUG_ON in >control parser
  tipc: fix UAF in error path
  usb: gadget: f_fs: Fix a race condition when processing setup packets.
  usb: gadget: composite: fix OS descriptors w_value logic
  firewire: nosy: ensure user_length is taken into account when fetching packet contents
  af_unix: Fix garbage collector racing against connect()
  af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
  ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
  ...

Change-Id: If329d39dd4e95e14045bb7c58494c197d1352d60
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-04 16:33:29 -03:00
Duje Mihanović
59bd54acd4 arm: dts: marvell: Fix maxium->maxim typo in brownstone dts
[ Upstream commit 831e0cd4f9ee15a4f02ae10b67e7fdc10eb2b4fc ]

Fix an obvious spelling error in the PMIC compatible in the MMP2
Brownstone DTS file.

Fixes: 58f1193e6210 ("mfd: max8925: Add dts")
Cc: <stable@vger.kernel.org>
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Reported-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Closes: https://lore.kernel.org/linux-devicetree/1410884282-18041-1-git-send-email-k.kozlowski@samsung.com/
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240125-brownstone-typo-fix-v2-1-45bc48a0c81c@skole.hr
[krzysztof: Just 10 years to take a patch, not bad! Rephrased commit
 msg]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit d2285ff966088aa5e6ff1a85d40b23ea7b4d2cf9)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 08:58:49 +00:00
Lubomir Rintel
15e5a3ae7f ARM: dts: mmp2-brownstone: Don't redeclare phandle references
[ Upstream commit 5a56cf3e8738f5d31d8c024d0c62a4c2bfe76fb2 ]

Extend the nodes by their phandle references instead of recreating the
tree and declaring references of the same names.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200320174107.29406-5-lkundrak@v3.sk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 831e0cd4f9ee ("arm: dts: marvell: Fix maxium->maxim typo in brownstone dts")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit b8dd364515493630ea3a6ece252ba79533e00354)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 08:58:49 +00:00
Richard Raya
813bba44d9 Revert "cpuidle: lpm-levels: Remove idle prediction feature"
This reverts commit b084e3b2a074975926188986ea6e08371bf752bf.

Change-Id: I4cf3c18da01841d6d4d1ff9ca8e411f6c2471c30
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-29 22:12:33 -03:00
Sultan Alsawaf
b084e3b2a0 cpuidle: lpm-levels: Remove idle prediction feature
There is a lot of CPU time spent in hrtimer_try_to_cancel() when exiting
idle according to perf. This is due to the idle prediction feature
constantly arming and canceling a timer that it uses to track prediction
accuracy. Idle prediction itself is used to try and select shallower
idle states when an incoming wake-up is predicted in order to improve
performance, but performance is actually better without idle prediction,
presumably thanks to eliminating the hrtimer_try_to_cancel() overhead.

The code for idle prediction is removed wholesale because the toggle
doesn't cover everything, and it's easier to just nuke the whole feature
than it is to try and cover everything with a toggle.

Change-Id: I906ed0d5943f1049201ffb7c31001f5e19a10157
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[dereference23: Forward port to 4.14]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-26 16:20:53 -03:00
Richard Raya
f056697397 msm-4.14: Revert WFI only cpuidle
Change-Id: I517d390b3dfdf5095744bd1dc1fd68315530ef48
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-26 14:43:12 -03:00
Sultan Alsawaf
1b7b871f8a cpuidle: lpm-levels: Remove idle prediction feature
There is a lot of CPU time spent in hrtimer_try_to_cancel() when exiting
idle according to perf. This is due to the idle prediction feature
constantly arming and canceling a timer that it uses to track prediction
accuracy. Idle prediction itself is used to try and select shallower
idle states when an incoming wake-up is predicted in order to improve
performance, but performance is actually better without idle prediction,
presumably thanks to eliminating the hrtimer_try_to_cancel() overhead.

The code for idle prediction is removed wholesale because the toggle
doesn't cover everything, and it's easier to just nuke the whole feature
than it is to try and cover everything with a toggle.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[dereference23: Forward port to 4.14]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: I7a152fdc9d308ff7e079e42cac1c71f298677372
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-10 15:48:36 -03:00
imallik
3b792504f1 defconfig: Disable SLUB_DEBUG SCHED_DEBUG and DEBUG_PREEMPT in perf build
Disabled Debug SLUB, SCHED and PREEMPT drivers in perf
build for MDM9607 target. Wlan Throughput is impacted
if these debug drivers are not disabled.

Change-Id: If02c0cd6735d1e97e3959b53ec166d0a00e1f3ad
Signed-off-by: imallik <quic_imallik@quicinc.com>
2024-05-08 22:52:04 -07:00
Richard Raya
59c72f3544 Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (186 commits)
  LTS: Update to 4.14.344
  binder: signal epoll threads of self-work
  ANDROID: binder: Add thread->process_todo flag.
  scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
  scsi: bnx2fc: Remove set but not used variable 'oxid'
  net: check dev->gso_max_size in gso_features_check()
  driver: staging: count ashmem_range into SLAB_RECLAIMBLE
  net: warn if gso_type isn't set for a GSO SKB
  staging: android: ashmem: Remove use of unlikely()
  ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
  ALSA: hda/realtek: Enable headset onLenovo M70/M90
  ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
  ALSA: hda/realtek - ALC897 headset MIC no sound
  ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform
  ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
  ALSA: hda/realtek - The front Mic on a HP machine doesn't work
  ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662
  ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662
  ALSA: hda/realtek - Add Headset Mic supported for HP cPC
  ALSA: hda/realtek - More constifications
  ...

Change-Id: I3d093c0e457ab7e7e7b98b46eb44e82b6f4636f9
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-08 19:24:35 -03:00
Rafał Miłecki
73b5bae64a ARM: dts: BCM53573: Drop nonexistent #usb-cells
[ Upstream commit 05d2c3d552b8c92fc397377d9d1112fc58e2cd59 ]

Such property simply doesn't exist (is not documented or used anywhere).

This fixes:
arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dtb: usb@d000: Unevaluated properties are not allowed ('#usb-cells' was unexpected)
        From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230707114004.2740-2-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:39 +00:00
Serge Semin
07da16c6e5 ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name
[ Upstream commit 74abbfe99f43eb7466d26d9e48fbeb46b8f3d804 ]

In accordance with the Generic EHCI/OHCI bindings the corresponding node
name is suppose to comply with the Generic USB HCD DT schema, which
requires the USB nodes to have the name acceptable by the regexp:
"^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible
nodes are correctly named.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Stable-dep-of: 05d2c3d552b8 ("ARM: dts: BCM53573: Drop nonexistent #usb-cells")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:39 +00:00
Arnd Bergmann
b6367d5902 ARM: 9303/1: kprobes: avoid missing-declaration warnings
[ Upstream commit 1b9c3ddcec6a55e15d3e38e7405e2d078db02020 ]

checker_stack_use_t32strd() and kprobe_handler() can be made static since
they are not used from other files, while coverage_start_registers()
and __kprobes_test_case() are used from assembler code, and just need
a declaration to avoid a warning with the global definition.

arch/arm/probes/kprobes/checkers-common.c:43:18: error: no previous prototype for 'checker_stack_use_t32strd'
arch/arm/probes/kprobes/core.c:236:16: error: no previous prototype for 'kprobe_handler'
arch/arm/probes/kprobes/test-core.c:723:10: error: no previous prototype for 'coverage_start_registers'
arch/arm/probes/kprobes/test-core.c:918:14: error: no previous prototype for '__kprobes_test_case_start'
arch/arm/probes/kprobes/test-core.c:952:14: error: no previous prototype for '__kprobes_test_case_end_16'
arch/arm/probes/kprobes/test-core.c:967:14: error: no previous prototype for '__kprobes_test_case_end_32'

Fixes: 6624cf651f1a ("ARM: kprobes: collects stack consumption for store instructions")
Fixes: 454f3e132d05 ("ARM/kprobes: Remove jprobe arm implementation")
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 13:55:23 +00:00
Richard Raya
d5b9f06c4e Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (176 commits)
  LTS: Update to 4.14.343
  crypto: af_alg - Work around empty control messages without MSG_MORE
  crypto: af_alg - Fix regression on empty requests
  spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
  net/bnx2x: Prevent access to a freed page in page_pool
  hsr: Handle failures in module init
  rds: introduce acquire/release ordering in acquire/release_in_xmit()
  hsr: Fix uninit-value access in hsr_get_node()
  net: hsr: fix placement of logical operator in a multi-line statement
  usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
  staging: greybus: fix get_channel_from_mode() failure path
  serial: 8250_exar: Don't remove GPIO device on suspend
  rtc: mt6397: select IRQ_DOMAIN instead of depending on it
  rtc: mediatek: enhance the description for MediaTek PMIC based RTC
  tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
  serial: max310x: fix syntax error in IRQ error message
  clk: qcom: gdsc: Add support to update GDSC transition delay
  NFS: Fix an off by one in root_nfs_cat()
  net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()
  scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn
  ...

Change-Id: Ib9b7d4f4fbb66b54b4fc2d35e945418da4c02331
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-04-18 09:46:38 -03:00
Arnd Bergmann
0147d403e1 crypto: arm/sha - fix function cast warnings
[ Upstream commit 53cc9baeb9bc2a187eb9c9790d30995148852b12 ]

clang-16 warns about casting between incompatible function types:

arch/arm/crypto/sha256_glue.c:37:5: error: cast from 'void (*)(u32 *, const void *, unsigned int)' (aka 'void (*)(unsigned int *, const void *, unsigned int)') to 'sha256_block_fn *' (aka 'void (*)(struct sha256_state *, const unsigned char *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   37 |                                 (sha256_block_fn *)sha256_block_data_order);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/crypto/sha512-glue.c:34:3: error: cast from 'void (*)(u64 *, const u8 *, int)' (aka 'void (*)(unsigned long long *, const unsigned char *, int)') to 'sha512_block_fn *' (aka 'void (*)(struct sha512_state *, const unsigned char *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   34 |                 (sha512_block_fn *)sha512_block_data_order);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix the prototypes for the assembler functions to match the typedef.
The code already relies on the digest being the first part of the
state structure, so there is no change in behavior.

Fixes: c80ae7ca3726 ("crypto: arm/sha512 - accelerated SHA-512 using ARM generic ASM and NEON")
Fixes: b59e2ae3690c ("crypto: arm/sha256 - move SHA-224/256 ASM/NEON implementation to base layer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 8d27d1b155c26bae2bd76b0c3e78cc4f1f1e21c5)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-04-16 10:30:33 +00:00
Hans de Goede
7fc8137190 crypto: arm - Rename functions to avoid conflict with crypto/sha256.h
[ Upstream commit e4dcc1be15268b6d34de3968f906577591521bd5 ]

Rename static / file-local functions so that they do not conflict with
the functions declared in crypto/sha256.h.

This is a preparation patch for folding crypto/sha256.h into crypto/sha.h.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: 53cc9baeb9bc ("crypto: arm/sha - fix function cast warnings")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit bdb1db7115d9b2a9d10c101dfc67386485fad00d)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-04-16 10:30:33 +00:00
Geert Uytterhoeven
a8674f8f32 ARM: dts: arm: realview: Fix development chip ROM compatible value
[ Upstream commit 3baa4c5143d65ebab2de0d99a395e5f4f1f46608 ]

When the development chip ROM was added, the "direct-mapped" compatible
value was already obsolete.  In addition, the device node lacked the
accompanying "probe-type" property, causing the old physmap_of_core
driver to fall back to trying all available probe types.
Unfortunately this fallback was lost when the DT and pdata cases were
merged.

Fix this by using the modern "mtd-rom" compatible value instead.

Fixes: 5c3f5edbe0a1dff3 ("ARM: realview: add flash devices to the PB1176 DTS")
Fixes: 642b1e8dbed7bbbf ("mtd: maps: Merge physmap_of.c into physmap-core.c")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit d6a0ddacb07986dbd08d97b8c8b0928778e318b4)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-04-16 10:30:29 +00:00
Richard Raya
a9e2d194be Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (350 commits)
  LTS: Update to 4.14.340
  fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
  KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
  PCI/MSI: Prevent MSI hardware interrupt number truncation
  s390: use the correct count for __iowrite64_copy()
  packet: move from strlcpy with unused retval to strscpy
  ipv6: sr: fix possible use-after-free and null-ptr-deref
  nouveau: fix function cast warnings
  scsi: jazz_esp: Only build if SCSI core is builtin
  RDMA/srpt: fix function pointer cast warnings
  RDMA/srpt: Support specifying the srpt_service_guid parameter
  IB/hfi1: Fix a memleak in init_credit_return
  usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
  l2tp: pass correct message length to ip6_append_data
  gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
  dm-crypt: don't modify the data when using authenticated encryption
  mm: memcontrol: switch to rcu protection in drain_all_stock()
  s390/qeth: Fix potential loss of L3-IP@ in case of network issues
  virtio-blk: Ensure no requests in virtqueues before deleting vqs.
  firewire: core: send bus reset promptly on gap count error
  ...

Change-Id: Ieafdd459ee41343bf15ed781b3e45adc2be29cc1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-26 00:15:05 -03:00
Richard Raya
669eb74484 Merge branch 'deprecated/android-4.14-stable' of https://android.googlesource.com/kernel/common into HEAD
* 'deprecated/android-4.14-stable' of https://android.googlesource.com/kernel/common: (101 commits)
  Linux 4.14.336
  mmc: core: Cancel delayed work before releasing host
  mmc: rpmb: fixes pause retune on all RPMB partitions.
  firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards
  i40e: fix use-after-free in i40e_aqc_add_filters()
  net: bcmgenet: Fix FCS generation for fragmented skbuffs
  net: sched: em_text: fix possible memory leak in em_text_destroy()
  nfc: llcp_core: Hold a ref to llcp_local->dev when holding a ref to llcp_local
  UPSTREAM: drm: Fix doc warning in drm_connector_attach_edid_property()
  BACKPORT: lib/vsprintf: Hash legacy clock addresses
  UPSTREAM: xfrm: fix gro_cells leak when remove virtual xfrm interfaces
  UPSTREAM: xfrm: Make function xfrmi_get_link_net() static
  UPSTREAM: cpuidle: menu: Retain tick when shallow state is selected
  UPSTREAM: bpf: fix rcu annotations in compute_effective_progs()
  UPSTREAM: bpf: bpf_prog_array_alloc() should return a generic non-rcu pointer
  UPSTREAM: sched/util_est: Fix util_est_dequeue() for throttled cfs_rq
  UPSTREAM: softirq: Reorder trace_softirqs_on to prevent lockdep splat
  UPSTREAM: l2tp: fix refcount leakage on PPPoL2TP sockets
  UPSTREAM: HID: steam: select CONFIG_POWER_SUPPLY
  BACKPORT: mac80211_hwsim: fix a possible memory leak in hwsim_new_radio_nl()
  ...

Change-Id: I1c98fbb0918986a06bee16b0c11fe8bee003fd3f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-25 23:54:05 -03:00
Fabio Estevam
7e7a432ac9 ARM: dts: imx23/28: Fix the DMA controller node name
[ Upstream commit 858d83ca4b50bbc8693d95cc94310e6d791fb2e6 ]

Per fsl,mxs-dma.yaml, the node name should be 'dma-controller'.

Change it to fix the following dt-schema warning.

imx28-apf28.dtb: dma-apbx@80024000: $nodename:0: 'dma-apbx@80024000' does not match '^dma-controller(@.*)?$'
	from schema $id: http://devicetree.org/schemas/dma/fsl,mxs-dma.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 3d8e8afe1de475ab4d9470c6d731a1c0cf29deee)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Fabio Estevam
c462fbab07 ARM: dts: imx23-sansa: Use preferred i2c-gpios properties
[ Upstream commit e3aa1a82fb20ee97597022f6528823a8ab82bde6 ]

The 'gpios' property to describe the SDA and SCL GPIOs is considered
deprecated according to i2c-gpio.yaml.

Switch to the preferred 'sda-gpios' and 'scl-gpios' properties.

This fixes the following schema warnings:

imx23-sansa.dtb: i2c-0: 'sda-gpios' is a required property
	from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
imx23-sansa.dtb: i2c-0: 'scl-gpios' is a required property
	from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit cf146a95be04e40b317c38b116b2efd4b043c3dd)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Fabio Estevam
a85363dccc ARM: dts: imx27-apf27dev: Fix LED name
[ Upstream commit dc35e253d032b959d92e12f081db5b00db26ae64 ]

Per leds-gpio.yaml, the led names should start with 'led'.

Change it to fix the following dt-schema warning:

imx27-apf27dev.dtb: leds: 'user' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/leds/leds-gpio.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 6296b2c41f0bca9e1308d4d7a85800245b486ad9)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Fabio Estevam
9fc574b8c1 ARM: dts: imx1: Fix sram node
[ Upstream commit c248e535973088ba7071ff6f26ab7951143450af ]

Per sram.yaml, address-cells, size-cells and ranges are mandatory.

The node name should be sram.

Change the node name and pass the required properties to fix the
following dt-schema warnings:

imx1-apf9328.dtb: esram@300000: $nodename:0: 'esram@300000' does not match '^sram(@.*)?'
	from schema $id: http://devicetree.org/schemas/sram/sram.yaml#
imx1-apf9328.dtb: esram@300000: '#address-cells' is a required property
	from schema $id: http://devicetree.org/schemas/sram/sram.yaml#
imx1-apf9328.dtb: esram@300000: '#size-cells' is a required property
	from schema $id: http://devicetree.org/schemas/sram/sram.yaml#
imx1-apf9328.dtb: esram@300000: 'ranges' is a required property
	from schema $id: http://devicetree.org/schemas/sram/sram.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 9d3aeecaac3030a1d95ed0483ecbf16c89e403f0)
[vegard: fix trivial conflict due to missing commit
 8dccafaa281aa1d240a58bbcdff338aec114a021 ("arm: dts: fix unit-address
 leading 0s")]
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Fabio Estevam
f6bc8318f8 ARM: dts: imx27: Fix sram node
[ Upstream commit 2fb7b2a2f06bb3f8321cf26c33e4e820c5b238b6 ]

Per sram.yaml, address-cells, size-cells and ranges are mandatory.

Pass them to fix the following dt-schema warnings:

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 0ab77b773ebcc5aa5087fdd18deb851a7ed6a3a6)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Fabio Estevam
7c4c3abbd8 ARM: dts: imx: Use flash@0,0 pattern
[ Upstream commit 1e1d7cc478fb16816de09740e3c323c0c188d58f ]

Per mtd-physmap.yaml, 'nor@0,0' is not a valid node pattern.

Change it to 'flash@0,0' to fix the following dt-schema warning:

imx1-ads.dtb: nor@0,0: $nodename:0: 'nor@0,0' does not match '^(flash|.*sram|nand)(@.*)?$'
	from schema $id: http://devicetree.org/schemas/mtd/mtd-physmap.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 9c5dc6b0e2d37b8e718cf3ef66c4a2f771dee20e)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Fabio Estevam
131b53e398 ARM: dts: imx25/27-eukrea: Fix RTC node name
[ Upstream commit 68c711b882c262e36895547cddea2c2d56ce611d ]

Node names should be generic. Use 'rtc' as node name to fix
the following dt-schema warning:

imx25-eukrea-mbimxsd25-baseboard.dtb: pcf8563@51: $nodename:0: 'pcf8563@51' does not match '^rtc(@.*|-([0-9]|[1-9][0-9]+))?$'
	from schema $id: http://devicetree.org/schemas/rtc/nxp,pcf8563.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 26633c330ad956bf3878057f88395a5aae89240f)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:32 +00:00
Johan Jonker
2bcbb1bff8 ARM: dts: rockchip: fix rk3036 hdmi ports node
[ Upstream commit 27ded76ef0fcfcf939914532aae575cf23c221b4 ]

Fix hdmi ports node so that it matches the
rockchip,inno-hdmi.yaml binding.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/9a2afac1-ed5c-382d-02b0-b2f5f1af3abb@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 281c16796d60e713cb86c08e09200d290232c6d3)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:31 +00:00
Alexander Stein
647e450642 ARM: dts: imx7s: Fix nand-controller #size-cells
[ Upstream commit 4aadb841ed49bada1415c48c44d21f5b69e01299 ]

nand-controller.yaml bindings says #size-cells shall be set to 0.
Fixes the dtbs_check warning:
arch/arm/boot/dts/nxp/imx/imx7s-mba7.dtb: nand-controller@33002000:
 #size-cells:0:0: 0 was expected
  from schema $id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml#

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit b90391b6bfd67d81e6126a4d07bf29da7af36eb4)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:31 +00:00
Alexander Stein
0ac0f96f90 ARM: dts: imx7s: Fix lcdif compatible
[ Upstream commit 5f55da4cc37051cda600ea870ce8cf29f1297715 ]

imx7d-lcdif is compatible to imx6sx-lcdif. MXSFB_V6 supports overlay
by using LCDC_AS_CTRL register. This registers used by overlay plane:
* LCDC_AS_CTRL
* LCDC_AS_BUF
* LCDC_AS_NEXT_BUF
are listed in i.MX7D RM as well.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 27e147bd10bdca40b504644b536561fdb46f42e0)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:31 +00:00
Greg Kroah-Hartman
11c40e9fe9 This is the 4.14.335 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWbzYYACgkQONu9yGCS
 aT5yuA//cfIIRarmgTer4zke1a3IvizQR8mIR8dELEimi0Zcws6ZrLa3Dr6CXhEc
 olKM5OtMypYU/VjlAb4j8PMLoGzHoUxZo1sbBwQ3JhmPU0JpKPM5R/W+GE1+++Se
 1Wgqv1r5/DXsPEI6Tmn1a0W2B/oTe7hLdCWoCpQUmgYeIBF63Ayh5c4a1jyCJHuv
 zb4JJR2WteUiZ3A7E3UvjSNR1ydwKXH3Prb3zuhqtwo5AWy7Xzot3U34IXEUYNkL
 D1I+5JwGullBJUqHS86Fn6geAo51+H+faO9u8C8HwusnxXxpX6YymhuW49yX+DVI
 B+cEBh0itKZJPeIRYk3Gr4kJ2qP9xn3pxvF1xHYiBrQtcp5feVuth0lqyo7n1YPp
 Uca7Ap6GzLKalZA6sK3ZpJLUFSA4yj84VJzp9b3wC0QztRuSGkVeAEXSAdF/kVDM
 YCjWjIXlLj1A/vQ1HQC5wOKcrn6P04so4uRMVN7LukSdJFn9yuk4v6ZxMoKCPBJc
 Z8U0dF1hGgWjwe3ggdWOnfqOKti2EJ6+OmSsJkPoWS0zk9q3pSknQ56XgB+ejIBQ
 OLl93RKrkojO4xR1U7rPl2Qhbat2Q0NY4mj0ZxLGTX/Nxo0SyKuX+d9t+cDRbRzP
 lGNjjQlfeP2IXHLluqxNea+2sc86m7ce9gyJ3D/6SEcnE2plWi8=
 =Y9Wv
 -----END PGP SIGNATURE-----

Merge 4.14.335 into android-4.14-stable

Changes in 4.14.335
	ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
	s390/vx: fix save/restore of fpu kernel context
	wifi: mac80211: mesh_plink: fix matches_local logic
	net: sched: ife: fix potential use-after-free
	ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
	iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
	Input: ipaq-micro-keys - add error handling for devm_kmemdup
	iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
	wifi: cfg80211: Add my certificate
	wifi: cfg80211: fix certs build to not depend on file order
	USB: serial: ftdi_sio: update Actisense PIDs constant names
	USB: serial: option: add Quectel EG912Y module support
	USB: serial: option: add Foxconn T99W265 with new baseline
	USB: serial: option: add Quectel RM500Q R13 firmware support
	Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
	net: 9p: avoid freeing uninit memory in p9pdu_vreadf
	net: rfkill: gpio: set GPIO direction
	dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
	block: Don't invalidate pagecache for invalid falloc modes
	Linux 4.14.335

Change-Id: I27a09c889fddbb96c9312d6a2483272318aa678c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-01-08 16:04:59 +00:00
Kunwu Chan
27db23931d ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
[ Upstream commit c72b9c33ef9695ad7ce7a6eb39a9df8a01b70796 ]

kasprintf() returns a pointer to dynamically allocated memory which can
be NULL upon failure. When 'soc_dev_attr->family' is NULL,it'll trigger
the null pointer dereference issue, such as in 'soc_info_show'.

And when 'soc_device_register' fails, it's necessary to release
'soc_dev_attr->family' to avoid memory leaks.

Fixes: 6770b2114325 ("ARM: OMAP2+: Export SoC information to userspace")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Message-ID: <20231123145237.609442-1-chentao@kylinos.cn>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-08 11:25:02 +01:00
Richard Raya
b5b21c729b Merge branch 'android-4.14-stable' of https://android.googlesource.com/kernel/common
* 'android-4.14-stable' of https://android.googlesource.com/kernel/common: (31 commits)
  Linux 4.14.332
  driver core: Release all resources during unbind before updating device links
  net: ravb: Start TX queues after HW initialization succeeded
  ravb: Fix races between ravb_tx_timeout_work() and net related ops
  ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
  btrfs: send: ensure send_fd is writable
  btrfs: fix off-by-one when checking chunk map includes logical address
  powerpc: Don't clobber f0/vs0 during fp|altivec register save
  dm verity: don't perform FEC for failed readahead IO
  dm-verity: align struct dm_verity_fec_io properly
  firewire: core: fix possible memory leak in create_units()
  pinctrl: avoid reload of p state in list iteration
  usb: dwc3: set the dma max_seg_size
  USB: serial: option: don't claim interface 4 for ZTE MF290
  USB: serial: option: fix FM101R-GL defines
  USB: serial: option: add Fibocom L7xx modules
  bcache: prevent potential division by zero error
  bcache: check return value from btree_node_alloc_replacement()
  USB: serial: option: add Luat Air72*U series products
  s390/dasd: protect device queue against concurrent access
  ...

Change-Id: I4952e24f22e6450a5ddf2dd61a649a32b8fbcda3
2023-12-12 00:12:26 -03:00
Greg Kroah-Hartman
fc26a9488d This is the 4.14.332 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVyyNgACgkQONu9yGCS
 aT790w//TNkuLD8tIgoZOECmfmCHtNIFd2EnQpgNjGWzsKowTywVZxoc2jtuQoia
 MtAyzIEqWxKlL1GRUlGAdZk/lzvLCpXACJNhSnA4mlWbsg1xuLarFQY4DF0BwyBF
 kTPSIiW/1RytgFOsTo+wNLbzDpkt1isGtexsiDtwaCIXNA/UNqJY/kTX9oyFbHko
 SjxkSWvn3+5Mxdqh08OmaKK74saAU6A90VeM47zS+5YG7bMNpu2+hQhd7GE+2tsf
 CPf+mLWg++h/Q3OZo936gekvskC5C/tO/yLp/Rbk/02NdBc0+fV4FZ8bvgxdV5Zh
 /4SVNwdRGIydaN37b+CryL3uUeIWDQkOX032E9SXEjzN+GexTWIG45THS/lQ+3tx
 sL4A/wKJYn9YLOroVhOeRfQuh3dWxR4z/w22O9X2d82MKRVhLs748IoIK2mlZN0F
 hp5Y/mr6QDONhljzLbV+9R/y/JH5qGoGZPgku1ZGyFbA91QyuUj4vqtxecJ7OpsQ
 3cs/Q9aSBxh1+HAJv0fwlX69qd4VJRQ2T3A+mHuuL0QuhMUzvRxqlOkmmBvVKXkA
 lvTiOFdGyd2LQB0fl1N7jJDzH4OKLHW6cpj5NlvSdzwqjy4nWZ1blVqNDbA8/krV
 gpavDAdkpYY40svz6TkwRlMxQn3MLZ3PrwWcyBc7qwyQndKiw+Q=
 =80xi
 -----END PGP SIGNATURE-----

Merge 4.14.332 into android-4.14-stable

Changes in 4.14.332
	RDMA/irdma: Prevent zero-length STAG registration
	drm/panel: simple: Fix Innolux G101ICE-L01 timings
	ata: pata_isapnp: Add missing error check for devm_ioport_map()
	drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
	ipv4: Correct/silence an endian warning in __ip_do_redirect
	net: usb: ax88179_178a: fix failed operations during ax88179_reset
	arm/xen: fix xen_vcpu_info allocation alignment
	amd-xgbe: handle corner-case during sfp hotplug
	amd-xgbe: propagate the correct speed and duplex status
	net: axienet: Fix check for partial TX checksum
	mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips
	s390/dasd: protect device queue against concurrent access
	USB: serial: option: add Luat Air72*U series products
	bcache: check return value from btree_node_alloc_replacement()
	bcache: prevent potential division by zero error
	USB: serial: option: add Fibocom L7xx modules
	USB: serial: option: fix FM101R-GL defines
	USB: serial: option: don't claim interface 4 for ZTE MF290
	usb: dwc3: set the dma max_seg_size
	pinctrl: avoid reload of p state in list iteration
	firewire: core: fix possible memory leak in create_units()
	dm-verity: align struct dm_verity_fec_io properly
	dm verity: don't perform FEC for failed readahead IO
	powerpc: Don't clobber f0/vs0 during fp|altivec register save
	btrfs: fix off-by-one when checking chunk map includes logical address
	btrfs: send: ensure send_fd is writable
	ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
	ravb: Fix races between ravb_tx_timeout_work() and net related ops
	net: ravb: Start TX queues after HW initialization succeeded
	driver core: Release all resources during unbind before updating device links
	Linux 4.14.332

Change-Id: Ia04d4ea54ddcce3f8ba06d6a28b26e1021e5b56f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-08 09:23:10 +00:00
Stefano Stabellini
b9268dc263 arm/xen: fix xen_vcpu_info allocation alignment
[ Upstream commit 7bf9a6b46549852a37e6d07e52c601c3c706b562 ]

xen_vcpu_info is a percpu area than needs to be mapped by Xen.
Currently, it could cross a page boundary resulting in Xen being unable
to map it:

[    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
[    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP

Fix the issue by using __alloc_percpu and requesting alignment for the
memory allocation.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>

Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2311221501340.2053963@ubuntu-linux-20-04-desktop
Fixes: 24d5373dda7c ("arm/xen: Use alloc_percpu rather than __alloc_percpu")
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-08 08:41:59 +01:00
Richard Raya
9cdc78c354 Merge branch 'android-4.14-stable' of https://android.googlesource.com/kernel/common
* 'android-4.14-stable' of https://android.googlesource.com/kernel/common: (2966 commits)
  Linux 4.14.331
  net: sched: fix race condition in qdisc_graft()
  scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
  ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
  ext4: correct return value of ext4_convert_meta_bg
  ext4: correct offset of gdb backup in non meta_bg group to update_backups
  ext4: apply umask if ACL support is disabled
  media: venus: hfi: fix the check to handle session buffer requirement
  media: sharp: fix sharp encoding
  i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
  net: dsa: lan9303: consequently nested-lock physical MDIO
  ALSA: info: Fix potential deadlock at disconnection
  parisc/pgtable: Do not drop upper 5 address bits of physical address
  parisc: Prevent booting 64-bit kernels on PA1.x machines
  mcb: fix error handling for different scenarios when parsing
  jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
  genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
  mmc: meson-gx: Remove setting of CMD_CFG_ERROR
  PM: hibernate: Clean up sync_read handling in snapshot_write_next()
  PM: hibernate: Use __get_safe_page() rather than touching the list
  ...

Change-Id: I755d2aa7c525ace28adc4aee433572b3110ea39b
2023-12-07 20:15:44 -03:00
Richard Raya
79840c9d70 Merge tag 'LA.UM.9.1.r1-14600-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.14
"LA.UM.9.1.r1-14600-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-14600-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.14: (103 commits)
  msm: npu: Fix use after free issue
  iommu: Fix missing return check of arm_lpae_init_pte
  msm: kgsl: Prevent wrap around during user address mapping
  iommu: Fix missing return check of arm_lpae_init_pte
  UPSTREAM: security: selinux: allow per-file labeling for bpffs
  UPSTREAM: security: selinux: allow per-file labeling for bpffs
  arm: configs: Enable QCOM_SHOW_RESUME_IRQ module for mdm9607
  Revert "irqchip/gic-v2: implement suspend and resume"
  exec: Force single empty string when argv is empty
  bus: mhi: misc: Add check for dev_rp if it is iommu range or not
  BACKPORT: FROMLIST: mm: protect free_pgtables with mmap_lock write lock in exit_mmap
  bus: mhi: misc: Add check for dev_rp if it is iommu range or not
  mdm: dataipa: increase the size of prefetch buffer
  msm: ais: core: validation of session/device/link handle
  soc: qcom: minidump: check the size parameter passed to qcom_smem_get()
  msm: camera: core: validation of session/device/link handle
  qcedev: vote for crypto clocks during module close
  msm: ais: smmu: Use get_file to increase ref count
  pinctrl: qcom: Using readl_relaxed/writel_relaxed APIs
  net: qrtr: Add bounds check in rx path
  ...

Change-Id: Ia2603d18afb240a1fcdce609944dd4038c988dbf
2023-12-07 20:11:49 -03:00
Greg Kroah-Hartman
57e87fab19 This is the 4.14.330 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVbJo4ACgkQONu9yGCS
 aT6MuRAArWZBUJLWHjzUgtfMQqOwp04MpBkNaYHMo+GStPLpYWPF4g/clm6rnV70
 Wiu/bEhrEzGnQj8KjexsoQee08ZEEEQiadISwUNhN3+Wue1/DYku6I5dOO2SI1Xv
 dOEggfV9HhFkfKCnP04JN02Fj5Ffr5051XFIearFuyNMe+C1Wc7C24QVC4KqkVBD
 2jZ8P1e1dZJw6kFCjqt0WXGb35rKvbo15xeACqAb5kPGhx/EV+uBCvdRKg1W/QpA
 n1Ofw6ItmIyimA6+p7QOMLmkrCeoVO3R3cRps4TCMDAUrAkOcAdekD69ql+eBwXm
 8cbK8iVs19XrTgsBaPBZxADf1nBgcG/3jYakZjkJ9b61Zin3kPsEkFMzhCPVY8VN
 uUeU7rDnoLfRE2FtK+msaX72v+39WCgLRBDTRwLtclqzfmPYTVGFyY7764/+8avn
 j/ZX/yD71if7A3lMMd7+JtR5cT4qlaA5Juk0KeiGceYEi+Th7xtS6k5NGf5oOBWB
 JFNf+51iQ/L7DbZ4Qm/CDNnfYG3bGolgLp7PYj2S2nCh+cNITClHZDjXWsRaVol9
 Yq/javUI3hB2vz8p9Cu7fNMyPCOEjTcOqkx3dNFNf5for7rJa1WfixR5RZx8vfr+
 /SzZCdNpCYTVCtQKS9yA4BEb6Iin1OlXV9wZ1yEucHsdkvAlTpA=
 =IEGn
 -----END PGP SIGNATURE-----

Merge 4.14.330 into android-4.14-stable

Changes in 4.14.330
	i40e: fix potential memory leaks in i40e_remove()
	tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics()
	tcp_metrics: do not create an entry from tcp_init_metrics()
	wifi: rtlwifi: fix EDCA limit set by BT coexistence
	thermal: core: prevent potential string overflow
	ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()
	ipv6: avoid atomic fragment on GSO packets
	clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies
	clk: keystone: pll: fix a couple NULL vs IS_ERR() checks
	clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data
	clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
	platform/x86: wmi: Fix probe failure when failing to register WMI devices
	drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
	drm/radeon: possible buffer overflow
	drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
	ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator
	firmware: ti_sci: Mark driver as non removable
	hwrng: geode - fix accessing registers
	ARM: 9321/1: memset: cast the constant byte to unsigned char
	ext4: move 'ix' sanity check to corrent position
	RDMA/hfi1: Workaround truncation compilation error
	sh: bios: Revive earlyprintk support
	ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
	mfd: dln2: Fix double put in dln2_probe
	tty: tty_jobctrl: fix pid memleak in disassociate_ctty()
	usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency
	dmaengine: ti: edma: handle irq_of_parse_and_map() errors
	misc: st_core: Do not call kfree_skb() under spin_lock_irqsave()
	USB: usbip: fix stub_dev hub disconnect
	dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
	pcmcia: cs: fix possible hung task and memory leak pccardd()
	pcmcia: ds: fix refcount leak in pcmcia_device_add()
	pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()
	media: s3c-camif: Avoid inappropriate kfree()
	media: dvb-usb-v2: af9035: fix missing unlock
	pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
	llc: verify mac len before reading mac header
	tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING
	dccp: Call security_inet_conn_request() after setting IPv4 addresses.
	dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
	tg3: power down device only on SYSTEM_POWER_OFF
	netfilter: xt_recent: fix (increase) ipv6 literal buffer length
	fbdev: fsl-diu-fb: mark wr_reg_wa() static
	Revert "mmc: core: Capture correct oemid-bits for eMMC cards"
	btrfs: use u64 for buffer sizes in the tree search ioctls
	Linux 4.14.330

Change-Id: I2bb580dc3744e11c39a496a65530feaaf5fdb08a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-25 18:04:59 +00:00