Graf commitů

25 Commity

Autor SHA1 Zpráva Datum
Tiger Yu
532a58ac1c qcacmn: Increase SPINLOCK_IRQ max hold time for Hypervisor system
In hypervisor system, lock may hold too long due to context switches
and system calls at host which is leading to stolen time. Sometimes
this delay will be larger than 100 ms.

To address this issue, it needs to increase irq save spin lock detection
threshold to 100+ ms for hypervisor system.

Change-Id: I6ea11b96e786c7f45bc84b29e0315e690552569f
CRs-Fixed: 3125904
2022-07-14 18:23:41 -07:00
Ananya Gupta
f3f153cba2 qcacmn: Update qdf wrappers for Runtime PM module
With restructured internal hif runtime pm. Modules using the
runtime pm module need to get registered with runtime pm modules
with their static IDs. QDF wrappers for allowing and preventing
runtime pm suspend are depreciated.
This change introduces ID for various modules and new qdf
wrappers, qdf_runtime_pm_get and qdf_runtime_pm_put are
introduced.

Change-Id: I111efe4aa980a26dbd7da30f031b8daba1c870f2
CRs-Fixed: 3169417
2022-06-18 23:11:31 -07:00
Jingxiang Ge
3200bacc98 qcacmn: check wrap around in BEFORE_UNLOCK
1 Add protection for wrap around of jiffies.
2 fix assign issue from uint32_t to uint64_t.

Change-Id: Idbd3604d0cb985d08aa82e3b1d7f32fa6be8c3ef
CRs-Fixed: 2864737
2021-01-29 14:41:25 -08:00
Yu Tian
cee4dbb1c5 qcacmn: Implement a light weight get_timestamp routine
For some 3rd party platforms, get_timestamp through legacy
kernel API is time costing. For spin_lock/unlock statistics
info, the resolution in ms level is enough. So use another
light weight API to save CPU resource for 3rd party
platforms only.

Change-Id: I9182f00adda0d3081a2c40b222ab37bb1ca9d6a1
CRs-Fixed: 2796263
2020-11-03 13:17:00 -08:00
Jingxiang Ge
759cd74c04 qcacmn: Add wakeup source tracker
Enable debug for wakeup source tracker.

Change-Id: I28983b5b6cbc15e71753264504e28fccba8a79cc
CRs-Fixed: 2760401
2020-08-28 13:03:51 -07:00
Rajeev Kumar
b23bb8b6f2 qcacmn: Increase spin lock bh timeout threshold in defconfig builds
In defconfig build(QDF_LOCK_STATS = 1 for slub debug enabled) increase
spin lock bh max time allowed to 2 seconds to accommodate for cache thrashing
and slow execution because of many debug features getting enabled.

Change-Id: I817d63a264079d25fed8a7ba1dbd9db5391abcdd
CRs-Fixed: 2754993
2020-08-15 18:55:22 -07:00
Tiger Yu
987de79182 qcacmn: Wake up system for early interrupt wakeup during suspending
During system suspending, the target might request wakeup early to the
host. The host will wakeup the system directly to abort current suspend
to avoid mismatching PM state between host & target.

Change-Id: Icf6e58ff24cbe072ef56aa22820432efb2ca1932
CRs-Fixed: 2559306
2019-11-13 06:53:29 -08:00
Dustin Brown
b5b21cac42 qcacmn: Remove qdf_*_outline() APIs
Several qdf_*_outline() APIs exist which are straight aliases to their
regular qdf_*() counterparts. Remove them, and update any callers to use
the regular APIs instead.

Change-Id: Ibe6e9cced521b93061e89690ab817ceafe49a469
CRs-Fixed: 2408267
2019-03-12 13:58:27 -07:00
Rajeev Kumar
f60c3457b4 qcacmn: Use QDF_TRACE to log under spin lock debug feature
Use QDF_TRACE log macro to log spin lock abuse when spin lock
debug feature is defined.

Change-Id: I1e5db79f5e6f5fc343f1be000efff6907c4857e1
CRs-Fixed: 2312614
2018-09-11 18:27:27 -07:00
Aditya Sathish
1c42c27c80 qcacmn: Move prints to QDF framework
Move all qdf_print from printk to qdf_trace_msg so that trace level
management can be carried out at runtime
In addition to the above, change contains removal of newline
escape characters from the format string of the converged
print APIs since qdf_trace_msg appends them by default.

Change-Id: I18cd06400bb9747761bbd86bfb38fe6d06106729
CRs-Fixed: 2243843
2018-08-10 18:11:15 -07:00
Pavankumar Nandeshwar
205aeca91d qcacmn: Add a new qdf API for spin_trylock
This change adds a qdf wrapper api qdf_spin_trylock for spin_trylock.

Change-Id: I3406ed96f7f40df24949bd4e21ceb144d919d58d
2018-07-19 04:29:26 -07:00
Jeff Johnson
1974e07df2 qcacmn: qdf: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Ia920daa3248677b9446f4203c7698cbc37648fbd
CRs-Fixed: 2230684
2018-05-18 02:17:38 -07:00
Prashanth Bhatta
65b0eaa24b qcacmn: Change semantics of Runtime Lock APIs
Runtime PM lock init API right now returns pointer to a context
but this would cause confusion to the caller if feature is not
defined and dummy function return NULL as caller can't find real
failure versus dummy function returning because feature not being
enabled.

Fix declaring a data structure in QDF layer that caller can use
but it hides the internal details of HIF implementation for
Runtime PM locks.

CRs-fixed: 1116509
Change-Id: I4dcba604e803faa0e14fac6403610391895e382e
2017-08-15 13:27:07 -07:00
Srinivas Girigowda
43977f7e6d qcacmn: Fix kernel checkpatch warnings in QDF
Fix kernel checkpatch warnings in QDF.

Change-Id: Id2f54c6c436bde55b040012fbbe9922cb177461e
CRs-Fixed: 2028128
2017-07-12 20:12:49 -07:00
Rajeev Kumar
a86e46fee9 qcacmn: Relax spin lock abuse detection thresholds
Increase irq save spin lock abuse detection threshold to 10 ms
and spin lock bh abuse detection threshold to 1 second such that
very obvious spin lock abuse cases by WLAN driver are detected
and fixed.

Change-Id: I8ca751404dc05e3fc3b6aa5db8538cb98c710260
CRs-Fixed: 2047464
2017-05-30 17:31:21 -07:00
Houston Hoffman
540222c531 qcacmn: Set defaults for QDF_LOCK_STATS features
Allow kbuild to enable/disable these features, but provide
defaults if the kbuild is unaware of these features.

Change-Id: Icd8054b5607749fd385f6664b8e06b31894c56c7
CRs-Fixed: 1111956
2017-01-31 18:53:10 -08:00
Houston Hoffman
8d67f466cc qcacmn: Add acquired by to lock stats
Record the last function to acquire a lock.  Improve
detectability for failure to release spinlocks.

Change-Id: I4c13dfbb2dad322c119914a325ff9edeee60fbf4
CRs-Fixed: 1111956
2017-01-31 18:53:09 -08:00
Houston Hoffman
ea5d86fe25 qcacmn: Add spinlockstats list
Keep all spinlocks on a list for offline debugging.
Also support detection of duplicate destroy calls.
Also support detection of not calling spinlock_destroy.

Change-Id: I75f520bb87c06111eabf0f610d4751e98a932c99
CRs-Fixed: 1111956
2017-01-31 18:53:08 -08:00
Houston Hoffman
805668a63d qcacmn: add stats infrastructure to trylock
Remove false positives for locks acquired with trylock.
Trylock was not recording the timestamp when the lock was
acquired. Therefore an old timestamp was used when releasing
the lock and the infrastructure would report that the lock
was held for longer than it was.

With the infrastructure set to generate a crash when a lock
is held too long, these false positives make the system unstable.

Change-Id: I87989b21daf4a2dfb74c8cfbba09be2af53dd1b2
CRs-Fixed: 1111956
2017-01-31 18:53:07 -08:00
Houston Hoffman
1ced412f80 qcacmn: featurize LOCK_STATS functionality
LOCK_STATS does profiling and catching of instances where
locks are held too long.  Separate out these two concerns
with separate macro flags.

Change-Id: Idb530baa23c5fcde84689bf910988da22e36123d
CRs-Fixed: 1100505
2017-01-31 15:32:48 -08:00
Houston Hoffman
b6cbf5e312 qcacmn: add stats to spinlock & mutexes
Wish to profile spinlock & mutex usage.
Bug on when spinlock is being used to protect
large regions of time.
(1mS for irq disabled, 5mS for bh disabled,
5ms for regular spinlock).

Change-Id: I95190a0d3d407a91a869f9f015e61d75e80830a7
CRs-Fixed: 1100505
2017-01-31 15:32:32 -08:00
Houston Hoffman
7dcbb86c23 qcacmn: Introduce qdf_spin_is_locked
Add a wrapper to check if a spinlock is currently
locked without acquiring it.

Change-Id: I867cfd00a61b1632e9652cdffc896b2654e3c338
CRs-Fixed: 1100505
2017-01-31 13:51:21 -08:00
Anurag Chouhan
61d118eb9b qcacmn: Remove ani_global.h from qca-cmn
Currently ani_global.h is included in qca-cmn,
This change removes ani_global.h and there are
corresponding changes in Driver

Change-Id: I4c1cf70e8eb1f4391a25783a560c02a43c483054
CRs-Fixed: 1012452
2016-09-08 18:22:28 -07:00
Chouhan, Anurag
5776318d19 qcacmn: Add QDF OS abstraction convergence
Converge ADF and CDF API's and move them to
QDF folder. MCL/WIN driver use this QDF converged
module for OS abstraction.

Change-Id: I1d0cdfd8730a5c021aaa50b7dc8549d491d760b3
CRs-Fixed: 981187
2016-03-16 12:18:26 -07:00
Prakash Dhavali
142cee4bf2 Initial host-common file folder cleanup and moves
Initial host-common file folder cleanup and moves
on top of baseline reference of MCL WLAN driver
SU#5.0.0.160.

Move dp, ht comm, hif, wmi and qdf folders one level up

Change-Id: I2120898024b1eafd5d651c48768dbf48bf05995d
2016-03-03 01:02:02 -08:00