Add vendor hook to get the binder message for vendor-specific power and
performance tuning.
Bug: 182496370
Bug: 235925535
Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: Id47e59c4e3ccd07b26eef758ada147b98cd1964e
(cherry picked from commit 301e89472f3e00a2f02f1967d77efd051ada37f5)
Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[ cmllamas: don't export complete private definition struct binder_alloc
in vendor hooks, instead just pass member alloc->free_async_space as
implemented by heshuai1 and squashed here ]
trace_spmi_write_begin() and trace_spmi_read_end() both call
memcpy() with a length of "len + 1". This leads to one extra
byte being read beyond the end of the specified buffer. Fix
this out-of-bound memory access by using a length of "len"
instead.
Here is a KASAN log showing the issue:
BUG: KASAN: stack-out-of-bounds in trace_event_raw_event_spmi_read_end+0x1d0/0x234
Read of size 2 at addr ffffffc0265b7540 by task thermal@2.0-ser/1314
...
Call trace:
dump_backtrace+0x0/0x3e8
show_stack+0x2c/0x3c
dump_stack_lvl+0xdc/0x11c
print_address_description+0x74/0x384
kasan_report+0x188/0x268
kasan_check_range+0x270/0x2b0
memcpy+0x90/0xe8
trace_event_raw_event_spmi_read_end+0x1d0/0x234
spmi_read_cmd+0x294/0x3ac
spmi_ext_register_readl+0x84/0x9c
regmap_spmi_ext_read+0x144/0x1b0 [regmap_spmi]
_regmap_raw_read+0x40c/0x754
regmap_raw_read+0x3a0/0x514
regmap_bulk_read+0x418/0x494
adc5_gen3_poll_wait_hs+0xe8/0x1e0 [qcom_spmi_adc5_gen3]
...
__arm64_sys_read+0x4c/0x60
invoke_syscall+0x80/0x218
el0_svc_common+0xec/0x1c8
...
addr ffffffc0265b7540 is located in stack of task thermal@2.0-ser/1314 at offset 32 in frame:
adc5_gen3_poll_wait_hs+0x0/0x1e0 [qcom_spmi_adc5_gen3]
this frame has 1 object:
[32, 33) 'status'
Memory state around the buggy address:
ffffffc0265b7400: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
ffffffc0265b7480: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffc0265b7500: 00 00 00 00 f1 f1 f1 f1 01 f3 f3 f3 00 00 00 00
^
ffffffc0265b7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffc0265b7600: f1 f1 f1 f1 01 f2 07 f2 f2 f2 01 f3 00 00 00 00
==================================================================
Bug: 238461606
Link: https://lore.kernel.org/lkml/20220627235512.2272783-1-quic_collinsd@quicinc.com/
Fixes: a9fce37481 ("spmi: add command tracepoints for SPMI")
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
Change-Id: Ibd6767db2bd92118e30be27464005dff8aa5467e
When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.
In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.
This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.
Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Li Li <dualli@google.com>
Link: https://lore.kernel.org/r/20220526220018.3334775-2-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 231624308
Test: manually check async binder buffer size of frozen apps
Test: stress test with kernel 4.14/4.19/5.10/5.15
(cherry picked from commit 9864bb4801331daa48514face9d0f4861e4d485b
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
char-misc-next)
Change-Id: I1c4bff1eda1ca15aaaad5bf696c8fc00be743176
Due to some recent kernel updates, and symbol updates, the .xml file has
gotten out of sync such that any symbol update will cause massive churn
in the .xml file.
Resolve this by merely updateing the .xml file to the state of the
current tree, allowing future changes to be much smaller.
Bug: 193384408
Cc: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I063d66fae9e8a1a8cf46b7dd9e66c711252534ce
When many devices share the same iova domain, iommu_dma_init_domain()
may be called at the same time. The checking of iovad->start_pfn will
all get false in iommu_dma_init_domain() and both enter init_iova_domain()
to do iovad initialization.
Fix this by protecting init_iova_domain() with iommu_dma_cookie->mutex.
Exception backtrace:
rb_insert_color(param1=0xFFFFFF80CD2BDB40, param3=1) + 64
init_iova_domain() + 180
iommu_setup_dma_ops() + 260
arch_setup_dma_ops() + 132
of_dma_configure_id() + 468
platform_dma_configure() + 32
really_probe() + 1168
driver_probe_device() + 268
__device_attach_driver() + 524
__device_attach() + 524
bus_probe_device() + 64
deferred_probe_work_func() + 260
process_one_work() + 580
worker_thread() + 1076
kthread() + 332
ret_from_fork() + 16
Signed-off-by: Ning Li <ning.li@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
Link: https://lore.kernel.org/r/20220530120748.31733-1-yf.wang@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Bug: 236922015
(cherry picked from commit ac9a5d522bb80be50ea84965699e1c8257d745ce
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git core)
[Yunfei: Embed iommu_dma_cookie into iommu_dma_cookie_ext to avoid
changing struct iommu_dma_cookie]
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I9b7931bea912837f17d2322713ba68a37122499d
Add support to retrieve EHT capabilities and EHT operation elements
passed by the userspace in the beacon template and store the pointers
in struct cfg80211_ap_settings to be used by the drivers.
Co-developed-by: Vikram Kandukuri <quic_vikram@quicinc.com>
Signed-off-by: Vikram Kandukuri <quic_vikram@quicinc.com>
Co-developed-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Link: https://lore.kernel.org/r/20220523064904.28523-1-quic_alokad@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: If5998e279b39136a6f9b24a9ceedbc0248fe7810
(cherry picked from commit 8bc65d38ee466897a264c9e336fe21058818b1b1)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
The current check only worked for AP mode, but we can do
radar detection in mesh as well (for example). We could
try to check this using wdev_chandef(), but we also don't
really care since the chandef is passed in and we have no
need to use it anymore (since we added the argument in
commit d2859df5e7 ("cfg80211/mac80211: DFS setup chandef
for cac event")).
Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I856e4344d5e64ff4d2eead0b4c53b11f264be9b8
(cherry picked from commit d6f671c8a339d5b655acfacb8be6918c744fbabf)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
In many cases we might get here from driver code that's
not really set up to care about the locking, and for the
non-MLO cases we really don't care so much about it. So
relax the checking here for now, perhaps we should even
remove it completely since we might not really care if
we point to an invalid link's chandef and can require
the caller to check the link validity first.
Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I75a713b503b1c89834c9264360d0002f3f060508
(cherry picked from commit 31177127e067eb73d5ca46ce32a410e41333d42f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
We need to hold the wdev mutex already in order to call
nl80211_parse_tx_bitrate_mask(), so acquire it earlier.
Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I9fad6b8a0efbc388fb59dfc92e5a8daa948bde0d
(cherry picked from commit c2653990d5729a445296d6d04395be5dea8e282e)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
We need wdev_chandef() in this code, which now requires
the wdev mutex due to the per-link nature. Hold it here
to make sure we can access the link.
Reported-by: syzbot+b4e9aa0f32ffd9902442@syzkaller.appspotmail.com
Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I27127159c6b4e35799e111cbee3f01bb5e60231a
(cherry picked from commit 206bbcf76121664e95a42e1c014c3fe168d07a3d)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Prior to commit 7b0a0e3c3a88 ("wifi: cfg80211: do some
rework towards MLO link APIs") the interface type didn't
really matter here, but now we need to handle all of the
possible cases. Add IBSS ("ADHOC") and handle it.
Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Reported-by: syzbot+90d912872157e63589e4@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I0ba10a060de3a9f94719dedc5525373bf38cb93f
(cherry picked from commit 77e7b6ba78edf817bddfa97fadb15a971992b1ee)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
These struct members no longer exist, remove them
from documentation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I36c2f56679916384dbc4252e03d54a83e1d0517e
(cherry picked from commit c8a9415e6ddef98a948f8c30d9ec2e749c0ccd9d)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
There are currently 17 kernel-doc warnings on this file:
include/net/cfg80211.h:391: warning: Function parameter or member 'bw' not described in 'ieee80211_eht_mcs_nss_supp'
include/net/cfg80211.h:437: warning: Function parameter or member 'eht_cap' not described in 'ieee80211_sband_iftype_data'
include/net/cfg80211.h:507: warning: Function parameter or member 's1g' not described in 'ieee80211_sta_s1g_cap'
include/net/cfg80211.h:1390: warning: Function parameter or member 'counter_offset_beacon' not described in 'cfg80211_color_change_settings'
include/net/cfg80211.h:1390: warning: Function parameter or member 'counter_offset_presp' not described in 'cfg80211_color_change_settings'
include/net/cfg80211.h:1430: warning: Enum value 'STATION_PARAM_APPLY_STA_TXPOWER' not described in enum 'station_parameters_apply_mask'
include/net/cfg80211.h:2195: warning: Function parameter or member 'dot11MeshConnectedToAuthServer' not described in 'mesh_config'
include/net/cfg80211.h:2341: warning: Function parameter or member 'short_ssid' not described in 'cfg80211_scan_6ghz_params'
include/net/cfg80211.h:3328: warning: Function parameter or member 'kck_len' not described in 'cfg80211_gtk_rekey_data'
include/net/cfg80211.h:3698: warning: Function parameter or member 'ftm' not described in 'cfg80211_pmsr_result'
include/net/cfg80211.h:3828: warning: Function parameter or member 'global_mcast_stypes' not described in 'mgmt_frame_regs'
include/net/cfg80211.h:4977: warning: Function parameter or member 'ftm' not described in 'cfg80211_pmsr_capabilities'
include/net/cfg80211.h:5742: warning: Function parameter or member 'u' not described in 'wireless_dev'
include/net/cfg80211.h:5742: warning: Function parameter or member 'links' not described in 'wireless_dev'
include/net/cfg80211.h:5742: warning: Function parameter or member 'valid_links' not described in 'wireless_dev'
include/net/cfg80211.h:6076: warning: Function parameter or member 'is_amsdu' not described in 'ieee80211_data_to_8023_exthdr'
include/net/cfg80211.h:6949: warning: Function parameter or member 'sig_dbm' not described in 'cfg80211_notify_new_peer_candidate'
Address them, in order to build a better documentation from this
header.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/f6f522cdc716a01744bb0eae2186f4592976222b.1656409369.git.mchehab@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: Idb23aabf8153a45a553dc32bcb469e4c860e62f0
(cherry picked from commit 2d8b08fef0af23aa2fe7f1a1719ac5b11478042f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
When retrieving scan data, expose not just whether or not the
interface (possibly an MLD) is associated to the BSS or not,
but also on which link ID if it is an MLD.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I1d66e4f10e2e4ac9829bcd1f3349aada78a99a4b
(cherry picked from commit dd374f84baecd76cbd12fc543c763ff78338d4ad)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
When getting/dumping an interface, expose information about
valid links.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I32a34f870e4f8616775f61bf84ea4bd757d9be0b
(cherry picked from commit ce08cd344a0027076b2f46b9e8988d08f6641252)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This accesses the wdev's chandef etc., so cannot safely
be used without holding the lock.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20220506102136.06b7205419e6.I2a87c05fbd8bc5e565e84d190d4cfd2e92695a90@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I767902ba2c7f73a2575816d4b6f501abab50d372
(cherry picked from commit f971e1887fdb3ab500c9bebf4b98f62d49a20655)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Use RCU here to read the regdomain, this will allow us
to remove the RTNL locking from the setter.
Note in nl80211_get_reg_do() we still need the RTNL to
do the wiphy lookup.
Link: https://lore.kernel.org/r/20220214101820.5d4acbcf2a46.Ibfc91980439862125e983d9adeebaba73fe38e2d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I33a5e791848dff6794ff2c53661de0de50447a72
(cherry picked from commit 024fcf5efda73d95394ec7448bc9751e265fb18f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
The element finding functions are safer, so use them
instead of the "find_ie" functions.
Link: https://lore.kernel.org/r/20210930131130.b838f139cc8e.I2b641262d3fc6e0d498719bf343fdc1c0833b845@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 238103864
Change-Id: I94a51200dee470cc329783cf73fd217cecabb543
(cherry picked from commit 153e2a11c99b7382597614ddb995618c22aa1b5f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit brings in delta changes merged in final upstream commits of
backport commits merged with b/233387627.
Update netlink attributes order to be in sync with final changes. Since
the changes are upstream replace corresponding reserved attributes with
actual attributes. Also, add missing changes from upstream commits.
Fixes:
- af34adaa6a ("BACKPORT: FROMLIST: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings")
- d975927513 ("BACKPORT: FROMGIT: wifi: cfg80211: do some rework towards MLO link APIs")
- 3f048cd911 ("BACKPORT: FROMGIT: wifi: nl80211: support MLO in auth/assoc")
- 6abf3c5ef2 ("BACKPORT: FROMLIST: cfg80211: Indicate MLO connection info in connect and roam callbacks")
Corresponding upstream commits:
- ecad3b0b99bf ("wifi: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings")
- 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
- d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
- efbabc116500 ("cfg80211: Indicate MLO connection info in connect and roam callbacks")
Bug: 238103864
Change-Id: I160f11a150cd275105fb7261b4facb468aa04325
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
The error log for inherit_taint() doesn't really help to find the
symbol which violates GPL rules.
For example,
if a module has 300 symbol and includes 50 disallowed symbols,
the log only shows the content below and we have no idea what symbol is.
AAA: module using GPL-only symbols uses symbols from proprietary module BBB.
It's hard for user who doesn't really know how the symbol was parsing.
This patch add symbol name to tell the offending symbols explicitly.
AAA: module using GPL-only symbols uses symbols SSS from proprietary module BBB.
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Bug: 237738770
(cherry picked from commit 8eac910a49347821cbafc770a319e00ccd69d58b)
[lecopzer: change file from kernel/module/main.c to kernel/module.c]
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I9d7f8f68ffaf8670cc47c597404b5a8f0110b42d
Add hook to boost thread when process killed.
Bug: 237749933
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I7cc6f248397021f3a8271433144a0e582ed27cfa
Add alarm_expires_remaining, iio_channel_get,
iio_channel_release and regulator_get_drvdata symbols
to API list
Bug: 237981128
Change-Id: Idbc74019fed82dbb388e38517145491ac240e5de
Signed-off-by: Chetan C R <quic_cchinnad@quicinc.com>
In protected mode, shadow VM structures are created at EL2. They include
shadow vCPUs and their memcache where some pages donated by the host might
be temporarily stored. They need to be freed on VM teardown to not get
lost. Pages found there have not been used for anything by the hypervisor.
Clearing is therefore not necessary.
Bug: 237506543
Change-Id: Ic37d794ac33e9f844fa6ae1b4943febcdad5b033
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
We use ANDROID_VENDOR_DATA to point to our custom data structure, we need to free it by binder_txn_latency_free
Bug: 235773151
Signed-off-by: zhangchuang3 <zhangchuang3@xiaomi.com>
Change-Id: Ib6e9af5e52e13a658555908ac46d4b13904b1d0c
Currently the VBUS/ID detection interrupts are disabled during system
suspend. So the USB cable connect/disconnect event can't wakeup the
system from low power mode. To allow this, we keep these interrupts
enabled and configure them as wakeup capable. This behavior can be
controlled through device wakeup source policy by the user space.
This was tested and verified on a target.
(cherry picked from commit 7afe69ad9221a77dc782b81f49cd7f99987740ed https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
Bug: 234808630
Link: https://lore.kernel.org/r/1653634146-12215-1-git-send-email-quic_prashk@quicinc.com
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I8767f91aa78805984856334821072e0c7986eea0
(cherry picked from commit 564ba930506ef0035eaecfbae96849512ef7eeb1)
trace_android_vh_binder_proc_transaction_entry:
We need change binder thread so that this work can be added in
proc->todo, if we found the binder thread, skip native logic.
trace_android_vh_binder_select_worklist_ilocked:
we need this because we can't change list point in ”trace_android_vh_binder_thread_read“,
otherwise, If a work has beed added in our own defined list before,
current may goto retry and loop again and again.
Bug: 219898723
Change-Id: Ifdb3429c9ddac521bc75c1d21740ee7cc4b8f143
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit acefa91e517b9321295429d3a0e534908e2939c1)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Add hooks to apply oem's optimization of rwsem and mutex
Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
(cherry picked from commit 80b4341d0520dce2ef1e33aef06c6a2bc8ada518)
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I36895c432e5b6d6bff8781b4a7872badb693284c
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: completes the cherry-pick of original commit 80b4341d0520
since commit 0902cc73b7 was only partial]
We want to use this hook to record the sleeping time due to Futex
Bug: 210947226
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I637f889dce42937116d10979e0c40fddf96cd1a2
(cherry picked from commit a7ab784f601a93a78c1c22cd0aacc2af64d8e3c8)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
These hooks will do the following works:
a) record the time of the process in various states
b) Make corresponding optimization strategies in different hooks
Bug: 205938967
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ia3c47bbf0aadd17337ce18fd910343b1b8c3ef93
(cherry picked from commit a61d61bab7c3d221d5d2250eacab2e4e9f59b252)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
add vendor hooks for cpu affinity to support oem's feature.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I3402abec4d9faa08f564409bfb8db8d7902f3aa2
and sched_waking to let module probe them
Get task info about sleep and waking
Bug: 190422437
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I828c93f531f84e6133c2c3a7f8faada51683afcf
(cherry picked from commit 13af062abf9b3586623adf7c3cdc5ced7bb5caed)
We need pointers to proc and t, the current hooks in binder_proc_transaction
are unable to use.
Bug: 208910215
Change-Id: I730964f965a015e5f5a3e237d9b3bd084b5bd0d0
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit cb7e10d31bca4f247c34d6791d6db048edf7e7a8)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Fix error flagged by kernelci for allmodconfig builds. Need
explicit "fallthrough" statement.
see https://linux.kernelci.org/build/id/62ba68b0fdb9daa19ca39bde/logs/
Fixes: 6bcb23254b ("ANDROID: Add vendor hook to skip usb audio suspend in offload mode")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I709ca3ab667cd31f6a9d8c83d48a8223a28dc911
The following commits added support for printing the real address-
65875073ed ("net: use %px to print skb address in trace_netif_receive_skb")
70713dddf3 ("net_sched: introduce tracepoint trace_qdisc_enqueue()")
851f36e409 ("net_sched: use %px to print skb address in trace_qdisc_dequeue()")
However, tracing the packet traversal shows a mix of hashes and real
addresses. Pasting a sample trace for reference-
ping-14249 [002] ..... 3424.046612: netif_rx_entry: dev=lo napi_id=0x3 queue_mapping=0
skbaddr=00000000dcbed83e vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800
ip_summed=0 hash=0x00000000 l4_hash=0 len=84 data_len=0 truesize=768 mac_header_valid=1
mac_header=-14 nr_frags=0 gso_size=0 gso_type=0x0
ping-14249 [002] ..... 3424.046615: netif_rx: dev=lo skbaddr=ffffff888e5d1000 len=84
Switch the trace print formats to %p for all the events to have a
consistent format of printing the hashed addresses in all cases.
Bug: 237280735
(cherry picked from commit 6deb209dc6b0952a460da17ee61223ee3b3429d5
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master)
Change-Id: I94b9b0fb1429389d67b9eaf909e3e9f7d6306bc0
Signed-off-by: Sean Tranchetti <quic_stranche@quicinc.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This change adds vendor hook for gic-v2 resume to allow vendor GIC
enhancement. This is inline with hook present today in irq-gic-v3.c
with one difference that vendor hooks in v2 driver do not pass entire
gic_chip_data struct to vendor module. Instead it passes the required
fields which are irq_domain and the gic dist base to know the wakeup
IRQ reason.
The newly added vendor hook can get invoked by two ways.
1. By registering with syscore ops, .resume method can invoke vendor
hook. This is applicable for cases like suspend-to-ram which
invokes syscore ops.
2. By exporting the gic_v2_resume(), the newly added vendor hook will
get invoked during the first CPU waking up from suspend-to-idle
case.
While at this move android_vh_gic_resume() to gic_v3.h as its specific
to v3 driver.
Bug: 234108369
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Change-Id: I4c857b40f25ad58a6daca491e89adb90e8f6ca93
android_vh_audio_usb_offload_suspend:
To skip pcm suspend in offload mode
We need a vendor hook to skip usb audio suspend in offload mode.
In kernel5.4 the cmd SNDRV_PCM_TRIGGER_SUSPEND and SNDRV_PCM_TRIGGER_STOP are treated differently.
However, they are treated the same in kernel5.15, which will lead to system suspend while music playing in offload mode.
Bug: 237022398
Test: build pass / music playing / recording
Signed-off-by: Wei Chen <wei.chen3@unisoc.com>
Change-Id: Ib6ec0a1419493801aeba2e045b33384f246f43b5