Commit Graph

1055136 Commits

Author SHA1 Message Date
Todd Kjos
1a0ea2faa8 ANDROID: turn off KMI enforcement
Turn off KMI enforcement for new android14-5.15 branch

Bug: 231591327
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I7ec08cd5e9a28c4689b25ca015b5c41c98359c02
2022-05-17 21:16:20 +00:00
Wenchao Chen
d8d29c85d8 ANDROID: ABI: Update symbols to unisoc whitelist for the 2st
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function void mmc_cqe_post_req(mmc_host*, mmc_request*)'
  [A] 'function int mmc_wait_for_cmd(mmc_host*, mmc_command*, int)'

Bug: 232880341
Change-Id: Iec39f094d14846e4b05c490d335e1aef23423898
Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
2022-05-17 13:40:06 +00:00
Keir Fraser
e8b3f31d7a ANDROID: arm64: Fix MMIO guard ioremap when called before slab_is_available().
The ioremap hook can be called before slab is initialised, at which time
calling into kmalloc() is not allowed.

Signed-off-by: Keir Fraser <keirf@google.com>
Bug: 232894028
Fixes: 078e81b0c1 ("ANDROID: arm64: Implement ioremap/iounmap hooks calling into KVM's MMIO guard")
Change-Id: Ieaf5adbdacdb196e37f4629998164a015e15c6d8
2022-05-17 08:01:37 +00:00
Prasad Sodagudi
525d77310a ANDROID: pstore/ram: Add backward compatibility for ramoops reserved region
Some of the platforms might be still expecting dedicated memory region
for ramoops node. So add logic to detect the start and size of the
ramoops memory region by looking up reserved memory region with
of_reserved_mem_lookup() when platform_get_resource() failed.

Bug: 191636717
Change-Id: Idc479b45fb3f637f7235efd6eabac62059d5e92b
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
(cherry picked from commit 9b136eab76)
2022-05-16 22:30:25 +00:00
Isaac J. Manjarres
317045867f FROMLIST: pstore/ram: Rework logic for detecting ramoops reserved memory region
The reserved memory region for ramoops is assumed to be at a fixed
and known location when read from the devicetree. This is not desirable
in environments where it is preferred for the region to be dynamically
allocated at runtime, as opposed to it being fixed at compile time.

Change the logic for detecting the start and size of the ramoops
memory region by looking up the reserved memory region instead of
using platform_get_resource(), which assumes that the location
of the memory is known ahead of time.

Bug: 191636717
Link: https://lore.kernel.org/patchwork/patch/1451704/
Change-Id: I24066de9f4fe1f1575cb1bbb1687c37a2b1938a4
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
(cherry picked from commit bd2ca0ba5b)
2022-05-16 22:30:15 +00:00
Visweswara Tanuku
065d546615 ANDROID: tty: serial: msm: geni: configure pinctrl when console is disabled
When console is disabled we are returning in probe
leaving the gpio pinctrl configuration untouched.
Since the pinctrl configuration is active(default)
while returning in probe, its leading to 1.8V pad
leakage during system suspend later.

Configure the pinctrl configuration to sleep state
when console is disabled to avoid leakage.

Bug: 232769754
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
Change-Id: Icc56d40f72d368bb0b80b348aa5d19ba4c4278a6
2022-05-16 11:16:14 -07:00
Shaleen Agrawal
41a4dab305 ANDROID: Disable CFI on trace hooks
Disable CFI on trace hooks, as this improves some lmbench
microbenchmarks by as much as 12%.

Bug: 200542217
Change-Id: I6ad1d12047c4e69743ff94cf0ea8f70f5023c7da
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2022-05-16 15:28:14 +00:00
Quentin Perret
d6a300eb7a ANDROID: Disable CFI on restricted vendor hooks
CFI has additional overhead on indirect branches to modules as the
target is not known at kernel compile-time. This has been demonstrated
to cause problematic performance regressions on benchmarks using GKI
together with modularized scheduler callbacks attached to restricted
vendor hooks.

To restore some of the performance back, let's disable CFI around the
restricted hook call sites and issue a raw indirect call in fast paths.

We should be able to drop this patch when/if the arm64 static_call
port lands upstream [1] as this would make tracepoints circumvent some
of the CFI checks using text patching, but that still remain to be
proven.

[1] https://lore.kernel.org/linux-arm-kernel/20201028184114.6834-1-ardb@kernel.org/

Bug: 168521642
Change-Id: I7cd59f582b12fed15be64059f08122f96786e650
Signed-off-by: Quentin Perret <qperret@google.com>
2022-05-16 15:28:06 +00:00
Fuad Tabba
e88313ab7c ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu
If a different vcpu from the same vm is loaded on the same
physical CPU, we must flush the CPU context.

This patch ensures that by tracking the vcpu that was last loaded
on this CPU, and flushes if that changes. This could lead to
over-invalidation, which could affect performance but not
correctness.

Bug: 228810735
Signed-off-by: Fuad Tabba <tabba@google.com>
Change-Id: I70976007165ca3b8d293089dbf9c2111b01ca2f7
2022-05-16 10:15:01 +00:00
Fuad Tabba
10bb2d3f93 ANDROID: KVM: arm64: Remove stale shadow_handle field
This field is stale and not being used. Remove it.

Bug: 228810735
Signed-off-by: Fuad Tabba <tabba@google.com>
Change-Id: I5a734c22f246186b81ffd7bc73b46e0b60518306
2022-05-16 08:41:30 +00:00
Mayank Rana
95044ba1f6 FROMLIST: usb: dwc3: Fix ep0 handling when getting reset while doing control transfer
According to the databook ep0 should be in setup phase during reset.
If host issues reset between control transfers, ep0 will be  in an
invalid state. Fix this by issuing stall and restart on ep0 if it
is not in setup phase.

Also SW needs to complete pending control transfer and setup core for
next setup stage as per data book. Hence check ep0 state during reset
interrupt handling and make sure active transfers on ep0 out/in
endpoint are stopped by queuing ENDXFER command for that endpoint and
restart ep0 out again to receive next setup packet.

Link: https://lore.kernel.org/lkml/1651693001-29891-1-git-send-email-quic_mrana@quicinc.com/
Bug: 232209416
Change-Id: I921e36e2f81e0b0854d59531d8537a1b6118f26c
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-05-15 15:09:10 +00:00
Xuewen Yan
9599549d68 ANDROID: ABI: Update symbols to unisoc whitelist for the 7st
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly.

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function int __traceiter_android_rvh_is_cpu_allowed(void*, task_struct*, int, bool*)'
  [A] 'function int __traceiter_cpu_frequency_limits(void*, cpufreq_policy*)'

Bug: 231529176
Change-Id: I6d1a282ff82be26f22b022bb02d864e8c5c380fe
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
2022-05-14 20:15:45 +08:00
Lecopzer Chen
a46280457e FROMLIST: media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y
A case that CONFIG_MEDIA_SUPPORT is y but we need DVB_CORE=m, and
this doesn't work since DVB_CORE is default MEDIA_DIGITAL_TV_SUPPORT
and then follows MEDIA_SUPPORT.

Link: https://lore.kernel.org/lkml/20220513173036.10807-1-lecopzer.chen@mediatek.com/
Bug: 232495768
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: Ie8e6bfe55f304812a97afeba59bce129e4d62f47
2022-05-14 04:46:09 +00:00
Stephen Dickey
b1d4f24555 ANDROID: abi_gki_aarch64_qcom: Update symbol list
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 3 Added variables

3 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_account_irq_end'
  [A] 'tracepoint __tracepoint_android_rvh_account_irq_start'
  [A] 'tracepoint __tracepoint_android_rvh_sched_getaffinity'

Bug: 229133948
Bug: 231341763
Change-Id: Ied29ff2186e3d5d3a78b3b8aaff74fad82af88d8
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-05-14 00:40:36 +00:00
Prasad Sodagudi
87abd99c7f ANDROID: firmware_loader: Fix warning with firmware_param_path_set
Compile time warning is observed with firmware_param_path_set()
for using the __setup() macro when firmware_loader enabled as module.

drivers/base/firmware_loader/main.c:428:19: warning: 'firmware_param_path_set'
defined but not used [-Wunused-function]

Fix the above warning by using the module_param_cb instead of __setup for
firmware_class.path commandline.

Bug: 202192667
Fixes: d551647f3b ("ANDROID: firmware_loader: Add support for customer firmware paths")
Change-Id: I73cdee9815e84a507ac886e6e181d4a489fd2e5f
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-13 15:06:34 -07:00
Will Deacon
bb8c831668 Revert "ANDROID: KVM: arm64: pkvm: Ensure that TLBs and I-cache are private to each vcpu"
This reverts commit 92a6dd3865.

Reason for revert: Suspected cause of hyp panic when running suite/user/pkvm_test

Bug: 232390891
Change-Id: Ie644c5484d8f1dde9630b9510a80988446ebbcdd
Signed-off-by: Will Deacon <willdeacon@google.com>
2022-05-13 21:25:42 +00:00
Wei-Chung Hsu
435891a607 ANDROID: GCE: To build kernel image for gce cloud android.
command: BUILD_CONFIG=common/build.config.gce.x86_64 build/build.sh -j32

Bug: 195791462
Test: presubmit
Signed-off-by: Wei-Chung Hsu <weihsu@google.com>
Change-Id: Iec825a85de3028026b9df308a8c10aa45a5755c1
2022-05-13 20:31:12 +00:00
Yifan Hong
0af43f935e ANDROID: enable db845c kleaf build.
Kleaf replaces build.sh. Define db845c target in Bazel
so it may be built with the following command.

Kleaf requires the list of in-tree kernel modules to be
listed explicitly.

Test: tools/bazel run //common:db845c_dist

Bug: 232284531

Signed-off-by: Yifan Hong <elsk@google.com>
Change-Id: I6ffd111574ffa012fa4d4c8241e06af08a5887e1
2022-05-13 19:31:32 +00:00
Steve Muckle
23ef56f65c Revert "ANDROID: Make file-backed vma teardown synchronous"
This reverts commit fe25fc5375.

Reason for revert: test regressions
Bug: 232427425
Bug: 232421416
Change-Id: If7006fe6c3f1a55361099ef24927d4bc7c821b9c
Signed-off-by: Steve Muckle <smuckle@google.com>
2022-05-13 15:42:24 +00:00
Wei-Chung Hsu
d1d3f4a801 ANDROID: GCE: To build kernel image for gce cloud android.
command: BUILD_CONFIG=common/build.config.gce.x86_64 build/build.sh -j32

Bug: 195791462
Test: presubmit
Change-Id: I59560d9c32d1d08d9e03e7275b4f49df8486710b
Signed-off-by: Wei-Chung Hsu <weihsu@google.com>
2022-05-13 15:02:53 +00:00
Visweswara Tanuku
0c427d1154 FROMLIST: serial: qcom_geni_serial: Disable MMIO tracing for geni serial
Disable MMIO tracing for geni serial driver to prevent excessive
logging. Any access over serial console would involve a lot of
TX and RX register accesses (and few others), so these MMIO
read/write trace events in these drivers cause a lot of unwanted
noise because of the high frequency of such operations and it is
not very useful tracing these events for such drivers.
Given we want to enable these trace events on development devices
(maybe not production devices) where performance also really matters
so that we don't regress other components by wasting CPU cycles and
memory collecting these traces, it makes more sense to disable these
traces from such drivers.

Also another reason to disable these traces would be to prevent
recursive tracing when we display the trace buffer containing
these MMIO trace events since writing onto serial console would
further record MMIO traces.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>

Bug: 229834709
Link: https://lore.kernel.org/lkml/282f2d8fb795e8b1961693ed4184b8136c3520db.1651663123.git.quic_saipraka@quicinc.com/
Change-Id: Ifac104dceae688b83b15e6a6fd0a0c55eb7b43e5
Signed-off-by: Visweswara Tanuku <quic_vtanuku@quicinc.com>
2022-05-13 15:01:13 +00:00
chunhui.li
a04009eea6 ANDROID: kernel: fix debug_kinfo set twice crash issue
If write string to /sys/module/debug_kinfo/parameters/build_info
twice, kernel will crash. fix by removing vunmap in build_info_set.

Bug: 213120696
Signed-off-by: Chunhui Li <chunhui.li@mediatek.com>
Change-Id: I683859067a31068de0006be8490efa4b0107044f
(cherry picked from commit bdc772adbd)
2022-05-13 16:57:46 +08:00
Dillon Min
12a5d3ae52 UPSTREAM: media: v4l2-ctrls: Add RGB color effects control
Add V4L2_COLORFX_SET_RGB color effects control, V4L2_CID_COLORFX_RGB
for RGB color setting.

with two mirror changes:
- change 0xFFFFFF to 0xffffff
- fix comments 2^24 to 2^24 - 1

[hverkuil: dropped spaces around + with V4L2_CID_BASE for consistency]

Bug: 232332132
(cherry picked from commit ef9f18a9e3a04126cf017216193166abe03dedef)
Signed-off-by: Dillon Min <dillon.minfei@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I68151757540cff896ff5a727412e1ed9aa95d9da
2022-05-12 15:34:49 +00:00
Rahul Sharma
53cb94b104 ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function drm_bridge* devm_drm_panel_bridge_add(device*, drm_panel*)'
  [A] 'function bool drm_edid_is_valid(edid*)'
  [A] 'function s32 i2c_smbus_read_i2c_block_data(const i2c_client*, u8, u8, u8*)'

Bug: 231996603
Change-Id: Ic41befec6dfc2460ea1ba13bfef7c394c86b09c1
Signed-off-by: Rahul Sharma <quic_rahsha@quicinc.com>
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2022-05-12 15:15:23 +00:00
fengmingli
5f20a6414e ANDROID: usb: export tracepoint for dwc3_complete_trb
Export dwc3_complete_trb tracepoint so that
vendor modules can use it.

Bug: 189130101

Change-Id: I1efeaf2a29267ee647fda83d5f18b7a5fae16b96
Signed-off-by: fengmingli <mingli.feng@vivo.com>
(cherry picked from commit e3e4ee0e9f)
2022-05-12 06:21:31 +00:00
Shaleen Agrawal
aec40de3d7 ANDROID: cputime: seprate irq entry and exit tracehooks
Currently the code has single hook for tracking irqs. However
modules need to deduce start and end of the irq.

Create separate hooks for irq start and end since the
cputime has already figured it out.

Bug: 231341763
Change-Id: Ie0dd503b283d83f69d01171ebd1cd6127c3bafd0
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2022-05-12 10:02:42 +05:30
Will McVicker
3eebd9f7e4 ANDROID: ABI: Update pixel symbol list and ABI xml
Leaf changes summary: 9 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 7 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

7 Added functions:

  [A] 'function void __drm_printfn_debug(drm_printer*, va_format*)'
  [A] 'function unsigned int __kfifo_out_peek(__kfifo*, void*, unsigned int)'
  [A] 'function int __traceiter_android_vh_sysrq_crash(void*, void*)'
  [A] 'function void ktime_get_snapshot(system_time_snapshot*)'
  [A] 'function void pps_event(pps_device*, pps_event_time*, int, void*)'
  [A] 'function pps_device* pps_register_source(pps_source_info*, int)'
  [A] 'function void pps_unregister_source(pps_device*)'

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_sysrq_crash'
  [A] 'int console_set_on_cmdline'

Bug: 226206537
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I6468e76f0d287416bab5ad7958a952f97b1a56df
2022-05-11 21:36:36 +00:00
Mayank Rana
614e8febec ANDROID: abi_gki_aarch64_qcom: Update symbol list
CONFIG_USB_EHSET_TEST_FIXTURE enables ehset misc class driver
which is needed for running USB IF electrical compliance. Below
is seen compilation error when enabling this config to compile
as module:

MODPOST modules-only.symvers
ERROR: modpost: "usb_control_msg_recv" [drivers/usb/misc/ehset.ko] undefined!
ERROR: modpost: "usb_control_msg_send" [drivers/usb/misc/ehset.ko] undefined

Fix above compilation with add required symbols.
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed,
2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed,
0 Added variable

2 Added functions:
[A] 'function int usb_control_msg_recv(usb_device*, __u8, __u8,
__u8, __u16, __u16, void*, __u16, int, gfp_t)'
[A] 'function int usb_control_msg_send(usb_device*, __u8, __u8,
__u8, __u16, __u16, void*, __u16, int, gfp_t)'

Bug: 232128297
Change-Id: If15df15fc3f315447b53fe04b56f70267afd14c0
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-05-11 21:34:56 +00:00
Suren Baghdasaryan
fe25fc5375 ANDROID: Make file-backed vma teardown synchronous
When a file-backed vma is being released, the userspace can have an
expectation that the vma and the file it's pinning will be released
synchronously. This does not happen when SPF is enabled because vma
and associated file are released asynchronously after RCU grace
period. This is done to prevent pagefault handler from stepping on
a deleted object. Fix this issue by synchronously waiting for RCU
grace period during file-backed vma tear-down.

Fixes: 48e35d053f "FROMLIST: mm: rcu safe vma->vm_file freeing"
Bug: 231394031
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I9f672d5bd947763c7d180a8c1b1f964600d407f3
2022-05-11 17:08:16 +00:00
Vivek Aknurwar
cc81da9a8e ANDROID: abi_gki_aarch64_qcom: Add icc_sync_state
icc_sync_state symbol is required for interconnect providers so they can
make use of framework icc_sync_state. Add it to the symbol list.

Bug: 231996551
Change-Id: I5b79601f8d8b7993efe9741e2a7be54fd33883ec
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-05-11 16:09:15 +00:00
Jian Gong
f7684ebb37 ANDROID: ABI: Update symbols to unisoc whitelist for the 6th
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly.

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function int __traceiter_android_vh_psci_cpu_suspend(void*, u32, bool*)'
  [A] 'function int __traceiter_android_vh_psci_tos_resident_on(void*, int, bool*)'

Bug: 2321959946
Change-Id: Icd7d5336516a9678c438699f869d6c060534445d
Signed-off-by: Jian Gong <Jian.Gong@unisoc.com>
2022-05-11 15:39:08 +00:00
Chun-Hung Wu
2c13c0def9 ANDROID: Update symbol list for mtk
Leaf changes summary: 12 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 11 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

11 Added functions:

  [A] 'function int __traceiter_xhci_urb_giveback(void*, urb*)'
  [A] 'function int _raw_spin_trylock_bh(raw_spinlock_t*)'
  [A] 'function void clk_unregister_gate(clk*)'
  [A] 'function void clkdev_add(clk_lookup*)'
  [A] 'function void clkdev_drop(clk_lookup*)'
  [A] 'function void frame_vector_to_pfns(frame_vector*)'
  [A] 'function void* gen_pool_dma_zalloc(gen_pool*, size_t, dma_addr_t*)'
  [A] 'function void gen_pool_for_each_chunk(gen_pool*, void (gen_pool*, gen_pool_chunk*, void*)*, void*)'
  [A] 'function int snd_soc_add_component(snd_soc_component*, snd_soc_dai_driver*, int)'
  [A] 'function int snd_soc_component_initialize(snd_soc_component*, const snd_soc_component_driver*, device*)'
  [A] 'function regmap* syscon_regmap_lookup_by_phandle_optional(device_node*, const char*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_xhci_urb_giveback'

Bug: 228415386
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Change-Id: I1917e8f4048c53cd80fed3b1588165766bbf0ad4
2022-05-11 15:37:47 +00:00
Elliot Berman
1e927b098a ANDROID: abi_gki_aarch64_qcom: Update symbol list.
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function unsigned int cfg80211_vendor_cmd_get_sender(wiphy*)'

Bug: 211744078
Change-Id: Iae1315253a7f72c6c7977e47fe14e6cf311d7734
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-11 15:34:55 +00:00
Petr Mladek
a327e05923 UPSTREAM: printk: ringbuffer: Improve prb_next_seq() performance
prb_next_seq() always iterates from the first known sequence number.
In the worst case, it might loop 8k times for 256kB buffer,
15k times for 512kB buffer, and 64k times for 2MB buffer.

It was reported that polling and reading using syslog interface
might occupy 50% of CPU.

Speedup the search by storing @id of the last finalized descriptor.

The loop is still needed because the @id is stored and read in the best
effort way. An atomic variable is used to keep the @id consistent.
But the stores and reads are not serialized against each other.
The descriptor could get reused in the meantime. The related sequence
number will be used only when it is still valid.

An invalid value should be read _only_ when there is a flood of messages
and the ringbuffer is rapidly reused. The performance is the least
problem in this case.

Bug: 216238044
(cherry picked from commit ef244b4dc53e520d4570b2610436aba0593ce6f55)
Reported-by: Chunlei Wang <chunlei.wang@mediatek.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/1642770388-17327-1-git-send-email-quic_mojha@quicinc.com
Link: https://lore.kernel.org/lkml/YXlddJxLh77DKfIO@alley/T/#m43062e8b2a17f8dbc8c6ccdb8851fb0dbaabbb14
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>

Change-Id: Ie6b1276eca791a891e42d5635ca1f116ae7cadef
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-10 23:41:39 +00:00
Prasad Sodagudi
d551647f3b ANDROID: firmware_loader: Add support for customer firmware paths
Currently firmware_class.patch commandline can take a single path for
loading firmwares on custom paths. SoC vendors and oems can have
firmwares in multiple file system paths. So add support for paassing
multiple paths through command line for firmware loader.

For example - firmware_class.path="/vendor,/vendor/firmware_mnt,
/oem/firmware". firmware_class.path can take upto 10 file system
paths with ',' separation.

Bug: 202192667
Change-Id: I31d1470d7dd0255c7aefd856f3c129bdb4b7f2e8
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-10 23:39:30 +00:00
Mukesh Ojha
d7024276b3 FROMLIST: remoteproc: Use unbounded workqueue for recovery work
There could be a scenario where there is too much load on a core
(n number of tasks which is affined) or in a case when multiple
rproc subsystem is going for a recovery and they queued recovery
work to one core so even though subsystem are independent there
recovery will be delayed if one of the subsystem recovery work
is taking more time in completing.

If we make this queue unbounded, the recovery work could be picked
on any cpu. This patch try to address this.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Bug: 228429683
Change-Id: If18b39db6c0861989a6a3b36d9efde5f488b9b73
Link: https://lore.kernel.org/lkml/1649313998-1086-1-git-send-email-quic_mojha@quicinc.com/
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
(cherry picked from commit 9608dc38a0d051efad3932ed5e9d604a70917be3)
2022-05-10 22:03:09 +00:00
Elliot Berman
f69ae9910d ANDROID: kbuild: mod: Move $(obj) prefix inside awk
When compiling modules with a large number of object files,

  echo $(addprefix $(obj)/, /* the member .o's of module */)

may result in an a command line which is too long. To help alleviate
this problem, echo the members intermediate objects and add $(obj)/
prefix within AWK itself.

An equivalent of this patch will land in this larger series refactoring
LTO: https://lore.kernel.org/linux-kbuild/20220424190811.1678416-1-masahiroy@kernel.org/

Bug: 175420575
Change-Id: I02f1ea49d1a8aa29b76c69cadcb5e84dd2ae4aa3
Link: https://lore.kernel.org/all/CAK7LNAStLCBCur3QnfMnBrOUkixYbJK+C6TZVKYcGX9R3M=ANQ@mail.gmail.com/
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:42 +00:00
Elliot Berman
b72ece4853 FROMGIT: kbuild: read *.mod to get objects passed to $(LD) or $(AR)
ld and ar support @file, which command-line options are read from.

Now that *.mod lists the member objects in the correct order, without
duplication, it is ready to be passed to ld and ar.

By using the @file syntax, people will not be worried about the pitfall
described in the NOTE.

Bug: 175420575
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
(cherry picked from commit 9170b27757d21460755254045bad4933cb631776
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
[eberman: Fix conflicts with commit 557054d]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: Id5bbd99ce940dc5eb40e2f9e75182a50a2eeff47
2022-05-10 21:47:36 +00:00
Masahiro Yamada
2c3a1d577c FROMGIT: kbuild: make *.mod not depend on *.o
The dependency

    $(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o

... exists because *.mod files previously contained undefined symbols,
which are computed from *.o files when CONFIG_TRIM_UNUSED_KSYMS=y.

Now that the undefined symbols are put into separate *.usyms files,
there is no reason to make *.mod depend on *.o files.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 175420575
(cherry picked from commit 21b526ad634448369bbadc2f112ed2c716805e63
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: I7f0e7872ccb54467a33c951d0551fe49be9a36fd
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:28 +00:00
Masahiro Yamada
3fd0696927 FROMGIT: kbuild: get rid of duplication in *.mod files
It is allowed to add the same objects multiple times to obj-y / obj-m:

  obj-y += foo.o foo.o foo.o
  obj-m += bar.o bar.o bar.o

It is also allowed to add the same objects multiple times to a composite
module:

  obj-m += foo.o
  foo-y := foo1.o foo2.o foo2.o foo1.o

This flexibility is useful because the same object might be selected by
different CONFIG options, like this:

  obj-m               += foo.o
  foo-y               := foo1.o
  foo-$(CONFIG_FOO_X) += foo2.o
  foo-$(CONFIG_FOO_Y) += foo2.o

The duplicated objects are omitted at link time. It works naturally in
Makefiles because GNU Make removes duplication in $^ without changing
the order.

It is working well, almost...

A small flaw I notice is, *.mod contains duplication in such a case.

This is probably not a big deal. As far as I know, the only small
problem is scripts/mod/sumversion.c parses the same file multiple
times.

I am fixing this because I plan to reuse *.mod for other purposes,
where the duplication can be problematic.

The code change is quite simple. We already use awk to drop duplicated
lines in modules.order (see cmd_modules_order in the same file).
I copied the code, but changed RS to use spaces as record separators.

I also changed the file format to list one object per line.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 175420575
(cherry picked from commit 62d88fd6ef3e52c355ec82e1aef530e72cf690e5
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: Icd83764f7064c7abf4f8bcf9cf784c8c25c52192
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:22 +00:00
Masahiro Yamada
0e5851bf31 FROMGIT: kbuild: split the second line of *.mod into *.usyms
The *.mod files have two lines; the first line lists the member objects
of the module, and the second line, if CONFIG_TRIM_UNUSED_KSYMS=y, lists
the undefined symbols.

Currently, we generate *.mod after constructing composite modules,
otherwise, we cannot compute the second line. No prerequisite is
required to print the first line.

They are orthogonal. Splitting them into separate commands will ease
further cleanups.

This commit splits the list of undefined symbols out to *.usyms files.

Previously, the list of undefined symbols ended up with a very long
line, but now it has one symbol per line.

Use sed like we did before commit 7d32358be8 ("kbuild: avoid split
lines in .mod files").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

Bug: 175420575
(cherry picked from commit 2f6b64906adf99b4c5ea9356df793766d290cfb4
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: Ic801d2bf085aff6e50d15d196c43da4df3aa88c8
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:47:00 +00:00
Masahiro Yamada
fe25d38e6a FROMGIT: kbuild: reuse real-search to simplify cmd_mod
The first command in cmd_mod is similar to the real-search macro.
Reuse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Bug: 175420575
(cherry picked from commit e90ac718fd861b3329b7a981dca016871b283f01
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: Ibcc1a9e29f6c8a1be268f48da473f429e7590749
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:46:54 +00:00
Masahiro Yamada
64f77a8297 FROMGIT: kbuild: make multi_depend work with targets in subdirectory
Precisely speaking, when you get the stem of the path, you should use
$(patsubst $(obj)/%,%,...) instead of $(notdir ...).

I do not see this usecase, but if you create a composite object in a
subdirectory, the Makefile should look like this:

   obj-$(CONFIG_FOO) += dir/foo.o
   dir/foo-objs      := dir/foo1.o dir/foo2.o

The member objects should be assigned to dir/foo-objs instead of
foo-objs.

This syntax is more consistent with commit 54b8ae66ae ("kbuild:
change *FLAGS_<basetarget>.o to take the path relative to $(obj)").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Bug: 175420575
(cherry picked from commit 1fe9c5794b2b57b33c84ffaa0eb56254f310ed54
  https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)

Change-Id: I541fb600d05ae9be847718c869e0b95c0b540ff9
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:46:48 +00:00
Masahiro Yamada
12b13aeab2 FROMGIT: kbuild: reuse suffix-search to refactor multi_depend
The complicated part of multi_depend is the same as suffix-search.

Reuse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Bug: 175420575
(cherry picked from commit db6836b669fb7c4a214e967e3985db05d85f2a24
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Change-Id: I7966897a0151a08d003f53d20adaf3fb40028442
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-05-10 21:46:40 +00:00
Prasad Sodagudi
ff8dd4797e ANDROID: abi_gki_aarch64_qcom: Update symbol list
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function void snd_timer_interrupt(snd_timer*, unsigned long int)'
  [A] 'function const char* v4l2_ctrl_get_name(u32)'
  [A] 'function int v4l2_s_ctrl(v4l2_fh*, v4l2_ctrl_handler*, v4l2_control*)'

Bug: 211744078
Change-Id: I569d0c369dfddf0bb92acfcb83587e537b7ab10e
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-05-10 17:36:11 +00:00
Jian Gong
0897375509 ANDROID: ABI: Update symbols to unisoc whitelist for the 5th
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

Leaf changes summary: 9 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 4 Added variables

5 Added functions:

  [A] 'function int __traceiter_android_vh_printk_caller(void*, char*, size_t, u32, int*)'
  [A] 'function int __traceiter_android_vh_printk_caller_id(void*, u32*)'
  [A] 'function int __traceiter_android_vh_printk_ext_header(void*, char*, size_t, u32, int*)'
  [A] 'function int send_sig_info(int, kernel_siginfo*, task_struct*)'
  [A] 'function unsigned int stack_trace_save_tsk(task_struct*, unsigned long int*, unsigned int, unsigned int)'

4 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_printk_caller'
  [A] 'tracepoint __tracepoint_android_vh_printk_caller_id'
  [A] 'tracepoint __tracepoint_android_vh_printk_ext_header'
  [A] 'nodemask_t node_states[6]'

Bug: 231911933
Change-Id: I12fbabceb411537fb2c4c223f015011bb44781e4
Signed-off-by: Jian Gong <Jian.Gong@unisoc.com>
2022-05-10 16:25:31 +00:00
Wenchao Chen
fe03278e3d ANDROID: ABI: Update symbols to unisoc whitelist for the 1st
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added function:

  [A] 'function int __traceiter_android_vh_mmc_check_status(void*, const blk_mq_queue_data*, int*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_mmc_check_status'

Bug: 232032448
Change-Id: Ib365b35bc308b6aad6066000018902a62b488934
Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
2022-05-10 16:24:14 +00:00
Paul Zhang
da01931c1c BACKPORT: FROMLIST: cfg80211: parse RNR IE about MLD params for MBSSID feature
In order to reconstruct frame for MBSSID feature, per the description of
the Reduced Neighbor Report(RNR) element about MLD parameters subfield in
section 9.4.2.170 of Draft P802.11be_D1.4, the RNR IE is modified:
1\ If the reported AP is affiliated with the same MLD of the reporting AP,
the TBTT information is skipped;
2\ If the reported AP is affiliated with the same MLD of the nontransmitted
BSSID, the TBTT information is copied and the MLD ID is changed to 0.

Signed-off-by: Paul Zhang <quic_paulz@quicinc.com>

Bug: 231937090
Link: https://lore.kernel.org/linux-wireless/1649335871-9173-1-git-send-email-quic_paulz@quicinc.com
Change-Id: I2bae85b813a2351a62d2788f0e76f13407d11645
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-05-10 15:27:08 +00:00
Rajkumar Subbiah
186398845e ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
Function changes summary: 0 Removed, 0 Changed, 1 Added function
Variable changes summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void devm_extcon_dev_unregister(device*, extcon_dev*)'

Bug: 231322691
Change-Id: Icb2525ad690dfc391e5a36141375d298052dae8a
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-05-09 23:59:45 +00:00
Lina Wang
60453867b1 FROMGIT: net: fix wrong network header length
When clatd starts with ebpf offloaing, and NETIF_F_GRO_FRAGLIST is enable,
several skbs are gathered in skb_shinfo(skb)->frag_list. The first skb's
ipv6 header will be changed to ipv4 after bpf_skb_proto_6_to_4,
network_header\transport_header\mac_header have been updated as ipv4 acts,
but other skbs in frag_list didnot update anything, just ipv6 packets.

udp_queue_rcv_skb will call skb_segment_list to traverse other skbs in
frag_list and make sure right udp payload is delivered to user space.
Unfortunately, other skbs in frag_list who are still ipv6 packets are
updated like the first skb and will have wrong transport header length.

e.g.before bpf_skb_proto_6_to_4,the first skb and other skbs in frag_list
has the same network_header(24)& transport_header(64), after
bpf_skb_proto_6_to_4, ipv6 protocol has been changed to ipv4, the first
skb's network_header is 44,transport_header is 64, other skbs in frag_list
didnot change.After skb_segment_list, the other skbs in frag_list has
different network_header(24) and transport_header(44), so there will be 20
bytes different from original,that is difference between ipv6 header and
ipv4 header. Just change transport_header to be the same with original.

Actually, there are two solutions to fix it, one is traversing all skbs
and changing every skb header in bpf_skb_proto_6_to_4, the other is
modifying frag_list skb's header in skb_segment_list. Considering
efficiency, adopt the second one--- when the first skb and other skbs in
frag_list has different network_header length, restore them to make sure
right udp payload is delivered to user space.

Signed-off-by: Lina Wang <lina.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cf3ab8d4a797960b4be20565abb3bcd227b18a68 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master)
Bug: 218157620
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I36f2f329ec1a56bb0742141a7fa482cafa183ad3
2022-05-09 23:38:29 +00:00