Refrain from waking up an idle CPU if possible since the exit latency
of taking req->cpu out of an idle cstate will likely exceed the
rq->deadline constraint compared to executing the request locally
instead.
Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
These changes were applied but there are no corresponding commits for
them (added in import commit).
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
[ Upstream commit 3c18aa1464f9232d6abac8d7b4540f61b0658d62 ]
Currently dev is dereferenced by the call dev_net(dev) before dev is null
checked. Fix this by null checking dev before the potential null
pointer dereference.
Detected by CoverityScan, CID#1462955 ("Dereference before null check")
Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
The incoming skb needs to be reallocated in case the headroom
is not sufficient to adjust the ethernet header. This allocation
needs to be atomic otherwise it results in this splat
[<600601bb>] ___might_sleep+0x185/0x1a3
[<603f6314>] ? _raw_spin_unlock_irqrestore+0x0/0x27
[<60069bb0>] ? __wake_up_common_lock+0x95/0xd1
[<600602b0>] __might_sleep+0xd7/0xe2
[<60065598>] ? enqueue_task_fair+0x112/0x209
[<600eea13>] __kmalloc_track_caller+0x5d/0x124
[<600ee9b6>] ? __kmalloc_track_caller+0x0/0x124
[<602696d5>] __kmalloc_reserve.isra.34+0x30/0x7e
[<603f629b>] ? _raw_spin_lock_irqsave+0x0/0x3d
[<6026b744>] pskb_expand_head+0xbf/0x310
[<6025ca6a>] rmnet_rx_handler+0x7e/0x16b
[<6025c9ec>] ? rmnet_rx_handler+0x0/0x16b
[<6027ad0c>] __netif_receive_skb_core+0x301/0x96f
[<60033c17>] ? set_signals+0x0/0x40
[<6027bbcb>] __netif_receive_skb+0x24/0x8e
Fixes: 74692caf1b0b ("net: qualcomm: rmnet: Process packets over ethernet")
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
If the RmNet driver needs to transmit a packet marked as needing
prioritization, it should skip uplink aggregation of the packet to avoid
adding additional delay. Additionally, any aggregated packets should be
flushed prior to sending the prioritized packet to avoid any ordering
issues.
Change-Id: Ia3063ec3f0553693a0f66c8eb5bbb88d250f7523
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
The on-stack th_vi_v_vali struct is not fully initialized by
afe_get_sp_th_vi_v_vali_data(), leaving members of the th_vi_v_vali
struct used despite not being initialized. Fix it by zeroing out the
memory in afe_get_sp_th_vi_v_vali_data().
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
The comparison will never be NULL. Fixes an address[Werror=address] error.
Captured by gcc-12.
Change-Id: I2c48526d7f4e16b862bf225d95e72879457aec95
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
Change the argument similarly to thermal_zone_device_register. This will
help register names get from of_property_read_string during probe.
LKML link: https://lkml.org/lkml/2019/5/14/631
Bug: 128625129
Test: Build
Change-Id: I966fbe10ac84705f5dd4d26af4d0a848a2f36b68
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
The lmh_dcvs limits initial value is U32_MAX which is unreasonable high.
Set initial limits value as cluster maximum frequency which is readable.
Bug: 130617766
Test: adb shell cat /sys/bus/platform/drivers/msm_lmh_dcvs/18*/lmh*
Change-Id: I3cff40fa70d51876f66f79c2936a37a02d9cbcf3
Signed-off-by: YiHo Cheng <yihocheng@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
When the thermal_zone property is set to “tracks-low” we should init with
THERMAL_TEMP_INVALID_LOW (274000), not THERMAL_TEMP_INVALID (-274000).
Bug: 111683694
Test: Build and thermal mitigation works properly.
Change-Id: I2824809fdfb47c544d30fde6e4866c3ee4e7b25c
Signed-off-by: davidchao <davidchao@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
It is unnecessary to update disabled thermal zones post suspend and
sometimes leads error/warning in bad behaved thermal drivers.
Bug: 129435616
Change-Id: If5d3bfe84879779ec1ee024c0cf388ea3b4be2ea
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
Whenever BCL interrupt triggers, it notifies thermal framework.
The framework disables the BCL interrupt and initiates a passive
polling to monitor clear threshold. But BCL peripheral interrupts
are lazy IRQ disable in nature by default. Even if BCL has initiated
disable interrupt, there is a chance it may take some time to disable
in hardware. During this time hardware can trigger interrupt again.
But BCL driver assumes it as spurious interrupt and disables the
interrupt again which will cause permanent disablement of that
interrupt.
If BCL interrupt is triggering again post BCL interrupt
disable, just ignore that interrupt to avoid nested interrupt
disablement. From above scenario, BCL is already in polling mode,
ignoring this spurious interrupt doesn't cause any issue.
Bug: 118493676
Change-Id: Ia77fc66eaf66f97bacee96906cc6a5735a6ed158
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
The attribute dynamically allocated should be initialized
with sysfs_attr_init. Otherwise, lockdep slaps us.
Bug: 122096541
Bug: 123720375
Change-Id: I5f8aa327729fb51b955b148b7fb5dc0f85d3fbbb
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Miguel de Dios <migueldedios@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
oneplus did something similar in sched that was killed. There are often migrations occurring upon
interactions.
Signed-off-by: alanndz <alanndz7@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
These get allocated and freed millions of times on this kernel tree.
Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
crc32c is accelerated in arm64 and is faster than jhash.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Change-Id: Ic4040e5ee941dca61fbfa6ac3b0f8d9a5f22a3dc
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
These functions are small and queried extensively, making them inlined
and static should speed up the function
[ghostrider-reborn]: Silence logging while we're at it
Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
Allow these tasks to be preempted in order to reduce latency.
Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
These get allocated and freed millions of times on this kernel tree.
Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
These get allocated and freed millions of times on this kernel tree.
Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
When the rotator is actually used (still an unsolved question in
computer science), these PM QoS requests block some CPUs in the LITTLE
cluster from entering deep idle because the driver assumes that display
rotating work occurs on a hardcoded set of CPUs, which is false. We
already have the IRQ PM QoS machinery for display rendering operations
that actually matter, so this cruft is unneeded.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
When multiple frequency slaves running on a same I2C bus,
then there is a chance of overriding I2C bus frequency
even if another I2C operation is running. This could lead
to CCI timeout at driver level. Updated synchronization logic,
to properly update I2C clock frequency, only when no other
I2C operation running.
CRs-Fixed: 2800250
Change-Id: Ia341d7cda118497bf1acea8ea59f7f03124f31c3
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
This reverts commit b3fd77235fa23e048ca94bd1048876aa9b432030.
So that it can pick up:
8303c7e (CR) Revert "msm: camera: eeprom: Fix OOB read/write in EEPROM"
Change-Id: Ifa8cfe4fe6876420e2cdd2e702dcc2670cd66538
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>