When compressed and pcm session is started the buffer pull will
Be from the DSP, in mmap mode for the scenario Hardware pointer
Is same as application pointer implies application has not filled the
Buffer to be send to DSP, and platform driver has to break and restart
The de queue process when the application has sufficient buffers.
When hardware pointer is same as application pointer it is an under run
Scenario where the ALSA framework has to trigger the under run and in HAL
The session has to re-prepare and re-triggered. based on the stop
Threshold, but in our system the stop threshold is INT_MAX which
Indicates that under run is not triggered in practical cases.
We have a brodcast usecase in which the mentioned under run case
Is hit mulitple times, and every time re-prepare and re-trigger will be
Expensive
Update the ASoC core framework to restart de queue process stopped
By platform Driver when the under run is hit, based on the available
Buffer and render flag, so the System will recover from the hang state.
To restart de queue process the ASoC core will be calling the restart
Callback registered by platform driver and this callback will be running in
Atomic context.
Test: build
Bug: 151372815
Change-Id: Ic9ea05a0dc6246346e9913493232882e2f5447d1
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit ddbe60b879175f7260a910e77fc8e9e9369de84f)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
This is required to resolve ABI diff for struct snd_pcm_ops.
Test: build
Bug: 151372815
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Change-Id: I380c4ddaa7aa8e5c606dd8db0a9d0c73ad1f7724
(cherry picked from commit ddbe60b879175f7260a910e77fc8e9e9369de84f)
[hridya: amended commit to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
These are required to resolve the ABI diffs
for these structs.
Test: make
Bug: 151372815
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Change-Id: Ic83229850787aaa07b5e1d0b22f3192afdd6e434
(cherry picked from commit 9206459050ce19be76c2e4d9a57c158fbcb2a5e4)
[hridya: commit amended to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
This is required to resolve the ABI diff.
Test: build
Bug: 151372815
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Change-Id: I4757f9609bd14bd904bd1c90bd41986c2f7a4a64
(cherry picked from commit d5768539ede687a69ad8a4a51cfcbb3f13143548)
[hridya: amended commit to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Modify create_subdir API, so that it can create a subdir
under a given parent directory and then register the info
entry. Also rename and export the API so that it can be
used to expose ID and version related information.
Test: build
Bug: 151372815
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit 454c5b5c345ab299b054b093ae6bb95e939a48b0)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: I8876b7ab22594766c9ec08c7289d8f38de7f00fa
This API is used to issue stop endpoint command on
requested endpoint in order to retire all active TRBs
in the transfer ring.
Test: build
Bug: 153446435
Change-Id: I312772367a2cd293982a66ea8b75e04a8b1f2fd0
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 106c645a79ec0ba4695b1c2ca6055664cdbaa750)
[hridya: resolved minor conflicts, EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL,
added some null pointer checks]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
These changes build upon the existing Android kernel wakeup reason code
to:
* improve the positioning of suspend abort logging calls in suspend flow
* add logging of abnormal wakeup reasons like unexpected HW IRQs and
IRQs configured as both wake-enabled and no-suspend
* add support for capturing deferred-processing threaded nested IRQs as
wakeup reasons rather than their synchronously-processed parents
Bug: 150970830
Bug: 140217217
Signed-off-by: Kelly Rossmoyer <krossmo@google.com>
Change-Id: I903b811a0fe11a605a25815c3a341668a23de700
These symbols are used by these modules. Export them so that these
modules can be loaded.
Bug: 149258398
Test: compile
Change-Id: Ie29c2811c07944b5a01dbc47b7a60dd56fe2aa5b
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from commit 9d5b6d29f017e1ae5df2dac53694382b24393f5f)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Enable for both arm64 and x86.
Change-Id: I091241994ac5199d6b4e8131cff2affb11569ade
Bug: 153583123
Test: compile
Signed-off-by: Will McVicker <willmcvicker@google.com>
Since cpu_hwcaps and cpu_hwcap_keys are exported symbols, reserve
space in them for any future cpu capabilities or erratas.
Bug: 151154716
Bug: 153490586
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I35930dd52d98817831d812f35560a2605804a553
(cherry picked from commit 9c406803119f6f1a86fe2d693e5dbe1e849c9d42)
Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: updated ARM64_NCAPS value to patch current range]
Unable to handle kernel paging request at virtual address
[<ffffff849b434d88>] scan_block+0x88/0x170
[<ffffff849b435070>] scan_gray_list+0x18c/0x1c0
[<ffffff849b4352ac>] kmemleak_scan+0x208/0x4b0
[<ffffff849b4359ec>] kmemleak_write+0x338/0x378
[<ffffff849b571068>] full_proxy_write+0x80/0xe4
[<ffffff849b43fe7c>] vfs_write+0xb4/0x1d0
early_init_dt_alloc_reserved_memory_arch() calls memblock_alloc_base(),
which will create a kmemleak entry. Ensure this entry is ignored if
the no-map property is set. This will prevent kmemleak from scanning
the object if there is no kernel mapping for it.
Bug: 153490586
Test: compile, verify MODVERSIONS CRC
Change-Id: I45f35600ae2aacf0f10f8bcbc956d019b666e4a7
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
(cherry picked from commit cf512e1d2cae0d957674b5442a653ae5efb0a249)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Add a per mm rss counter to hold the unreclaimable
pages. This can include the pages allocated by a
task and shared with hardware for DMA etc.
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit ade7f1cd6f26780890cab9ae67f0033f1de432a7)
Bug: 148872640
Change-Id: Iec77d69eca0a4f8f6e23f866c80c0143620fcaf2
Add new bus token to describe domains that are wakeup capable.
Bug: 150638107
Change-Id: Ic1c0f0d2882a20a28aabc100835ac249c7bb4eef
Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit bb8e854f5cac71db3bb603b6caf58d8228b55bd6)
Allow for vendor components or modules to override
"TLB conflict abort" handler,
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: Verified with scripts/gki/device_snapshot
Test: No impact on /sys/ (except new module files) and /dev/
Test: All devices probed as before
Bug: 141888626
Change-Id: I7d0a4d7440412f2ffc611fe597d5d39d18a2a03a
(cherry picked from commit 75c07a4fbd301fbff1522e66996bad91617cd06f)
Bug: 149990629
QoS request for CPU_DMA_LATENCY can be better optimized if the request
can be set only for the required cpus and not all cpus. This helps save
power on other cores, while still gauranteeing the quality of service.
Enhance the QoS constraints data structures to support target value for
each core. Requests specify if the QoS is applicable to all cores
(default) or to a selective subset of the cores or to a core(s), that the
IRQ is affine to.
QoS requests that need to track an IRQ can be set to apply only on the
cpus to which the IRQ's smp_affinity attribute is set to. The QoS
framework will automatically track IRQ migration between the cores. The
QoS is updated to be applied only to the core(s) that the IRQ has been
migrated to.
Idle and interested drivers can request a PM QoS value for a constraint
across all cpus, or a specific cpu or a set of cpus. Separate APIs have
been added to request for individual cpu or a cpumask. The default
behaviour of PM QoS is maintained i.e, requests that do not specify a
type of the request will continue to be effected on all cores. Requests
that want to specify an affinity of cpu(s) or an irq, can modify the PM
QoS request data structures by specifying the type of the request and
either the mask of the cpus or the IRQ number depending on the type.
Updating the request does not reset the type of the request.
The userspace sysfs interface does not support CPU/IRQ affinity.
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
(cherry picked from commit 16cafdb44fb3a66a7d06936d775efe483ad62b7d)
Bug: 153463922
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1aad836a985fd303f2254fe607bb909a6b720dd5
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
'struct devfreq at devfreq.h:148:1' changed:
type size changed from 13824 to 14144 (in bits)
2 data member insertions:
'mutex devfreq::event_lock', at offset 384 (in bits) at devfreq.h:152:1
'bool devfreq::dev_suspended', at offset 14080 (in bits) at devfreq.h:178:1
there are data member changes:
'device devfreq::dev' offset changed from 384 to 640 (in bits) (by +256 bits)
'devfreq_dev_profile* devfreq::profile' offset changed from 6656 to 6912 (in bits) (by +256 bits)
'const devfreq_governor* devfreq::governor' offset changed from 6720 to 6976 (in bits) (by +256 bits)
'char devfreq::governor_name[16]' offset changed from 6784 to 7040 (in bits) (by +256 bits)
'notifier_block devfreq::nb' offset changed from 6912 to 7168 (in bits) (by +256 bits)
'delayed_work devfreq::work' offset changed from 7104 to 7360 (in bits) (by +256 bits)
'unsigned long int devfreq::previous_freq' offset changed from 7808 to 8064 (in bits) (by +256 bits)
'devfreq_dev_status devfreq::last_status' offset changed from 7872 to 8128 (in bits) (by +256 bits)
'void* devfreq::data' offset changed from 8128 to 8384 (in bits) (by +256 bits)
'unsigned long int devfreq::min_freq' offset changed from 8192 to 8448 (in bits) (by +256 bits)
'unsigned long int devfreq::max_freq' offset changed from 8256 to 8512 (in bits) (by +256 bits)
'unsigned long int devfreq::scaling_min_freq' offset changed from 8320 to 8576 (in bits) (by +256 bits)
'unsigned long int devfreq::scaling_max_freq' offset changed from 8384 to 8640 (in bits) (by +256 bits)
'bool devfreq::stop_polling' offset changed from 8448 to 8704 (in bits) (by +256 bits)
'unsigned int devfreq::total_trans' offset changed from 8480 to 8736 (in bits) (by +256 bits)
'unsigned int* devfreq::trans_table' offset changed from 8512 to 8768 (in bits) (by +256 bits)
'unsigned long int* devfreq::time_in_state' offset changed from 8576 to 8832 (in bits) (by +256 bits)
'unsigned long int devfreq::last_stat_updated' offset changed from 8640 to 8896 (in bits) (by +256 bits)
'srcu_notifier_head devfreq::transition_notifier_list' offset changed from 8704 to 8960 (in bits) (by +256 bits)
20 impacted interfaces:
function devfreq* devfreq_add_device(device*, devfreq_dev_profile*, const char*, void*)
function int devfreq_add_governor(devfreq_governor*)
function void devfreq_interval_update(devfreq*, unsigned int*)
function void devfreq_monitor_resume(devfreq*)
function void devfreq_monitor_start(devfreq*)
function void devfreq_monitor_stop(devfreq*)
function void devfreq_monitor_suspend(devfreq*)
function int devfreq_remove_device(devfreq*)
function int devfreq_remove_governor(devfreq_governor*)
function int devfreq_resume_device(devfreq*)
function int devfreq_suspend_device(devfreq*)
function devfreq* devm_devfreq_add_device(device*, devfreq_dev_profile*, const char*, void*)
function thermal_cooling_device* of_devfreq_cooling_register(device_node*, devfreq*)
function int ufshcd_dme_get_attr(ufs_hba*, u32, u32*, u8)
function int ufshcd_dme_set_attr(ufs_hba*, u32, u8, u32, u8)
function u32 ufshcd_get_local_unipro_ver(ufs_hba*)
function int ufshcd_hold(ufs_hba*, bool)
function void ufshcd_release(ufs_hba*)
function void ufshcd_remove(ufs_hba*)
function int update_devfreq(devfreq*)
'struct regmap_irq_chip at regmap.h:1138:1' changed:
type size hasn't changed
1 data member insertion:
'unsigned int regmap_irq_chip::clear_ack', at offset 288 (in bits) at regmap.h:1148:1
there are data member changes:
'bool regmap_irq_chip::type_invert' offset changed from 288 to 320 (in bits) (by +32 bits)
'int regmap_irq_chip::num_regs' offset changed from 320 to 352 (in bits) (by +32 bits)
3 impacted interfaces:
function int devm_regmap_add_irq_chip(device*, regmap*, int, int, int, const regmap_irq_chip*, regmap_irq_chip_data**)
function void devm_regmap_del_irq_chip(device*, int, regmap_irq_chip_data*)
function int regmap_irq_get_virq(regmap_irq_chip_data*, int)
Bug: 149430094
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I1ce004bc7d52ef153ef54be9feb7f32cd031288e
There is a possibility to switch the governors from sysfs even when the
device is in suspended state. This can cause a NOC error at times when
trying to access the device's monitor registers in a suspended state. This
change fixes this issue. Introduce a variable dev_suspended to know if
the device is in suspended state or not. Check if the device is suspended
before switching the governor from sysfs.
Change-Id: I15055aa51daa35272be4667e5bafb8ccd7933098
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Bug: 152343889
(cherry picked from commit 9c41437c072048a9487353b85a452114c4031659)
Signed-off-by: Saravana Kannan <saravanak@google.com>
There is a race condition when the event governor_store is being executed
from sysfs and the device issues a suspend. The devfreq data structures
would become stale when the suspend tries to access them in the middle
of the governor_store operation. Fix this issue by taking a lock around
suspend and resume operations so that these operations are not concurrent
with the other events from sysfs.
Also rename the sysfs_lock as event_lock since the same lock is used
for non sysfs operations like suspend and resume as well.
Change-Id: Ifa0e93915a920cec3e0429966328a1128d61098b
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Bug: 152343889
(cherry picked from commit 8bf200e7136a6896e429e9bfab116238c1d99be6)
Signed-off-by: Saravana Kannan <saravanak@google.com>
Currently, concurrent writes to sysfs entries leave the possibility
for race conditions within the devfreq framework. For example,
concurrently executing max_freq_store and governor_store can result
in attempting to perform an update_devfreq() before the new governor's
start handler can be executed.
A more concrete case is a race between polling_interval_store and
governor_store. Because no lock is used after calling into the event
handler of the old governor and there's nothing preventing work from
being queued after the monitor is stopped, it's possible to
accidentally cause delayed work to be queued on the governor being
switched to. This can be seen if you create two threads, one which
changes a device's governor between simple_ondemand and performance,
and one which changes its polling interval between 45 and 50.
All of these races can be addressed with the introduction of a lock
that prevents sysfs operations from interleaving in this fashion.
Change-Id: Ia6887dcb2d69dc2576837a6c09fed55a28943abc
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Bug: 152343889
(cherry picked from commit 78fdd25c1abb1f23f43243f09c3d81cccaa844bc)
[saravanak Fixed some conflicts]
Signed-off-by: Saravana Kannan <saravanak@google.com>
WCD codec requires clear registers to be written '1' and
'0' for clearing interrupts. Add this support in regmap irq
to clear ack registers.
Change-Id: I399592fc0ee7f3a01a32267684a9be340076ffb1
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Bug: 153500481
[saravanak Minor edit to commit text]
(cherry picked from commit 25401ed921044cafdf588efb2e6ba19e8454f14a)
Signed-off-by: Saravana Kannan <saravanak@google.com>
This feature is undesirable and not required by Android.
Bug: 153460450
Change-Id: I548bb44b9fecc90ba2589fb74b4e4693e639a8c9
Signed-off-by: Alistair Delva <adelva@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
GENKSYMS shouldn't care about the __must_check compiler flag. So strip
it out for GENKSYMS.
Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153478475
Test: compile, check crc
Change-Id: I512639a4f719037728ffbfa48e7b766510c7d726
Adds members set/get_min_state() to struct
thermal_cooling_device_ops.
Also adds the field min_state_throttle to struct thermal_governor.
Test: build
Bug: 149945768
Change-Id: I085feb9d3b818dcf9754f0f624166c360593bce6
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked from commit 8a12149c264c7b871932ad90f76e5981452bb4bb)
[hridya: cherry-picked only the ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Drivers may need to use the ASoC core function to
find out whether a particular component is already
registered with ALSA core or not.
Export the function so that drivers can use it outside
of the file.
Bug: 151372815
Test: build
Change-Id: I13e4a053de085974b0b53c392a9453e46f1aa66d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
(cherry picked from commit fbcf71fe2dadcfbfe6b60f49534dd0312fd3b9d6)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Modify enum thermal_trip_type to add configurable thermal
trip points of THERMAL_TRIP_CONFIGURABLE_HI,
THERMAL_TRIP_CONFIGURABLE_LOW, and THERMAL_TRIP_CRITICAL_LOW.
Bug: 149945768
Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
(cherry picked from commit 3f67fe6c0a924f23ba19033a0f55b7d82e268926)
[hridya: commit amended to only include ABI diff].
Signed-off-by: Hridya Valsaraju <hridya@google.com>
When the filesystem is mounted with '-o inlinecrypt', make fscrypt fall
back to filesystem-layer crypto when inline crypto won't work, e.g. due
to the hardware not supporting the encryption algorithm.
When blk-crypto-fallback is disabled, this fixes '-o inlinecrypt' to not
break any fscrypt policies that would otherwise work.
This is needed for VtsKernelEncryptionTest to pass on some devices.
Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
inline crypto patches backported, and also on Cuttlefish.
Change-Id: I3e730df4608efb12d7126d1a85faddcccb566764
Signed-off-by: Eric Biggers <ebiggers@google.com>
We need a way to tell which type of keys the inline crypto hardware
supports (standard, wrapped, or both), so that fallbacks can be used
when needed (either blk-crypto-fallback, or fscrypt fs-layer crypto).
We can't simply assume that
keyslot_mgmt_ll_ops::derive_raw_secret == NULL
means only standard keys are supported and that
keyslot_mgmt_ll_ops::derive_raw_secret != NULL
means that only wrapped keys are supported, because device-mapper
devices always implement this method. Also, hardware might support both
types of keys.
Therefore, add a field keyslot_manager::features which contains a
bitmask of flags which indicate the supported types of keys. Drivers
will need to fill this in. This patch makes the UFS standard crypto
code set BLK_CRYPTO_FEATURE_STANDARD_KEYS, but UFS variant drivers may
need to set BLK_CRYPTO_FEATURE_WRAPPED_KEYS instead.
Then, make keyslot_manager_crypto_mode_supported() take the key type
into account.
Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
inline crypto patches backported, and also on Cuttlefish.
Change-Id: Ied846c2767c1fd2f438792dcfd3649157e68b005
Signed-off-by: Eric Biggers <ebiggers@google.com>
If blk-crypto-fallback is needed but is disabled by kconfig, make
blk_crypto_start_using_mode() return an error rather than succeeding.
Use ENOPKG, which matches the error code used by fscrypt when crypto API
support is missing with fs-layer encryption.
Also, if blk-crypto-fallback is needed but the algorithm is missing from
the kernel's crypto API, change the error code from ENOENT to ENOPKG.
This is needed for VtsKernelEncryptionTest to pass on some devices.
Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
inline crypto patches backported, and also on Cuttlefish.
Change-Id: Iedf00ca8e48c74a5d4c40b12712f38738a04ef11
Signed-off-by: Eric Biggers <ebiggers@google.com>
Build error results in excess arguments provided from
commit 7c4bd0cdf4eff0dd6774183435fc8139743cd6e4
("power_supply: support for CHARGE_DISABLE")
Change introduced in partial cherry pick of the above in
commit 2d02a30a0b896e6ab970837cf54477550c34c31a
("ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CHARGE_DISABLE")
Removed excess unused argument.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Cc: AleX Pelosi <apelosi@google.com>
Cc: Jack Wu <wjack@google.com>
Bug: 150789066
Change-Id: I5be743eecffa0be7b8ec4969963f0a283f5684c5
The following members are added to struct backlight_device:
struct thermal_cooling_device *cdev;
int thermal_brightness_limit;
int usr_brightness_req;
Change-Id: I1405ddd6c3cfff99cd84842d3773851168dcfe78
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked from commit 6cd31b3ff45ab44f3624e9139a0602e3a1a6f9ea)
[connoro: commit amended to include only ABI diff]
Bug: 153189857
Signed-off-by: Connor O'Brien <connoro@google.com>
Implement APIs to dynamically allocate and free secondary
event rings based upon interrupter number. Also add exported
APIs in usb core layer which allows secondary event ring
management via remote processor entity.
Change-Id: I5ee7d44d6cad8e35e22d3c1a027a1eec5d208585
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit 8d48fb820fb849cee2474354f75ef5a78044bd19)
[connoro: squashed the following commits:
a44f0d73af95 usb: xhci: Clear event handler busy flag upon
event ring cleanup
a1504b40da0e usb: xhci: Acknowledge pending events in
secondary event ring
a7e7dd8a3499 usb: host: xhci: Fix bound check for
interrupter number
c4d9817a3cc6 usb: core: Allow secondary event ring clean
upon disconnect
576c1e1fe65b usb: host: xhci: Fix secondary event ring
setup]
Bug: 151258428
Signed-off-by: Connor O'Brien <connoro@google.com>
Unique usb core id is used to differentiate between
different usb controllers.
[jackp@codeaurora.org: squashed with usb: host: Fix passing of
core-id property to xhci-plat]
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 4c874ac2de1e09d148aeb47362e89f60b2743280)
[connoro: commit amended to include only the ABI diff]
Signed-off-by: Connor O'Brien <connoro@google.com>
Bug: 151258428
Change-Id: I736d5a99f51820e562311c988ea9fd09b3e7117b
set CONFIG_USB_HCI_HCD=y for arm64 and x86 gki defconfigs
Bug: 151258428
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I74e9a1fbc5efbbfacbe5046c1604afc05fad6bf9
Set CONFIG_BRIDGE=y for arm64 and x86 gki defconfigs
Bug: 151683251
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Ifa34d56b2b8e497d3d696f8c80e137ffc4a93280
On modules with no executable code, LLVM generates a __cfi_check stub,
but won't align it to page size as expected. This change ensures the
function is at the beginning of the .text section and correctly aligned
for the CFI shadow.
Bug: 148458318
Change-Id: I85ea31fa851bc23988f649b021b3ac7e9d9dcb38
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
It's long been possible to disable kernel module autoloading completely
(while still allowing manual module insertion) by setting
/proc/sys/kernel/modprobe to the empty string. This can be preferable
to setting it to a nonexistent file since it avoids the overhead of an
attempted execve(), avoids potential deadlocks, and avoids the call to
security_kernel_module_request() and thus on SELinux-based systems
eliminates the need to write SELinux rules to dontaudit module_request.
However, when module autoloading is disabled in this way,
request_module() returns 0. This is broken because callers expect 0 to
mean that the module was successfully loaded.
Apparently this was never noticed because this method of disabling
module autoloading isn't used much, and also most callers don't use the
return value of request_module() since it's always necessary to check
whether the module registered its functionality or not anyway. But
improperly returning 0 can indeed confuse a few callers, for example
get_fs_type() in fs/filesystems.c where it causes a WARNING to be hit:
if (!fs && (request_module("fs-%.*s", len, name) == 0)) {
fs = __get_fs_type(name, len);
WARN_ONCE(!fs, "request_module fs-%.*s succeeded, but still no fs?\n", len, name);
}
This is easily reproduced with:
echo > /proc/sys/kernel/modprobe
mount -t NONEXISTENT none /
It causes:
request_module fs-NONEXISTENT succeeded, but still no fs?
WARNING: CPU: 1 PID: 1106 at fs/filesystems.c:275 get_fs_type+0xd6/0xf0
[...]
This should actually use pr_warn_once() rather than WARN_ONCE(), since
it's also user-reachable if userspace immediately unloads the module.
Regardless, request_module() should correctly return an error when it
fails. So let's make it return -ENOENT, which matches the error when
the modprobe binary doesn't exist.
I've also sent patches to document and test this case.
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Jessica Yu <jeyu@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: NeilBrown <neilb@suse.com>
Link: https://lore.kernel.org/r/20200318230515.171692-2-ebiggers@kernel.org
Bug: 151589316
Change-Id: I5e04f85e12a4f85da23e53bc11da1ade565abcd6
Signed-off-by: Eric Biggers <ebiggers@google.com>
Currently ASoC core creates a static route b/w
playback/capture widgets of cpu and codec dai
if they are part of the same dai-link. However
this will cause codec path to get powered up
followed by the backend dai start during device
switch use-case where the front-end is not closed,
leading to audio playback failure if either bit-width
or sample rate is different.
Test: build
Bug: 151372815
Change-Id: Icd17677a73fdc4bd30e0918fcaa7e7f394245685
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
(cherry picked from commit 85a57fb9237c4021150e3a3ba9a274a7b78b79a5)
Signed-off-by: Hridya Valsaraju <hridya@google.com>