DTB stores all values as 32-bit big-endian integers.
Add a macro to convert such values to native CPU endianness, to reduce
duplication.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
(cherry picked from commit 0557ac83fd)
Bug: 178411248
Change-Id: I0807f36352dbfd5f5808959e358a7469dc9753bb
Signed-off-by: Eric Biggers <ebiggers@google.com>
Patch series "kfence: optimize timer scheduling", v2.
We have observed that mostly-idle systems with KFENCE enabled wake up
otherwise idle CPUs, preventing such to enter a lower power state.
Debugging revealed that KFENCE spends too much active time in
toggle_allocation_gate().
While the first version of KFENCE was using all the right bits to be
scheduling optimal, and thus power efficient, by simply using wait_event()
+ wake_up(), that code was unfortunately removed.
As KFENCE was exposed to various different configs and tests, the
scheduling optimal code slowly disappeared. First because of hung task
warnings, and finally because of deadlocks when an allocation is made by
timer code with debug objects enabled. Clearly, the "fixes" were not too
friendly for devices that want to be power efficient.
Therefore, let's try a little harder to fix the hung task and deadlock
problems that we have with wait_event() + wake_up(), while remaining as
scheduling friendly and power efficient as possible.
Crucially, we need to defer the wake_up() to an irq_work, avoiding any
potential for deadlock.
The result with this series is that on the devices where we observed a
power regression, power usage returns back to baseline levels.
This patch (of 3):
On mostly-idle systems, we have observed that toggle_allocation_gate() is
a cause of frequent wake-ups, preventing an otherwise idle CPU to go into
a lower power state.
A late change in KFENCE's development, due to a potential deadlock [1],
required changing the scheduling-friendly wait_event_timeout() and
wake_up() to an open-coded wait-loop using schedule_timeout(). [1]
https://lkml.kernel.org/r/000000000000c0645805b7f982e4@google.com
To avoid unnecessary wake-ups, switch to using wait_event_timeout().
Unfortunately, we still cannot use a version with direct wake_up() in
__kfence_alloc() due to the same potential for deadlock as in [1].
Instead, add a level of indirection via an irq_work that is scheduled if
we determine that the kfence_timer requires a wake_up().
Link: https://lkml.kernel.org/r/20210421105132.3965998-1-elver@google.com
Link: https://lkml.kernel.org/r/20210421105132.3965998-2-elver@google.com
Fixes: 0ce20dd840 ("mm: add Kernel Electric-Fence infrastructure")
Signed-off-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Jann Horn <jannh@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Hillf Danton <hdanton@sina.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Bug: 172317151
Bug: 185280916
Test: power team confirmed there's no regression
(cherry picked from commit 0ac66fbbadde5547db190e9d87ff2e77d245f9a2
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Idba39683f0b76eb3f70df1113e43d94845fab5bf
Because memblock allocations are registered with kmemleak, the KFENCE
pool was seen by kmemleak as one large object. Later allocations
through kfence_alloc() that were registered with kmemleak via
slab_post_alloc_hook() would then overlap and trigger a warning.
Therefore, once the pool is initialized, we can remove (free) it from
kmemleak again, since it should be treated as allocator-internal and be
seen as "free memory".
The second problem is that kmemleak is passed the rounded size, and not
the originally requested size, which is also the size of KFENCE objects.
To avoid kmemleak scanning past the end of an object and trigger a
KFENCE out-of-bounds error, fix the size if it is a KFENCE object.
For simplicity, to avoid a call to kfence_ksize() in
slab_post_alloc_hook() (and avoid new IS_ENABLED(CONFIG_DEBUG_KMEMLEAK)
guard), just call kfence_ksize() in mm/kmemleak.c:create_object().
Link: https://lkml.kernel.org/r/20210317084740.3099921-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Reported-by: Luis Henriques <lhenriques@suse.de>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Luis Henriques <lhenriques@suse.de>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 172317151
Test: build and run on an ARM64 device
(cherry picked from commit 9551158069)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ida4d747d3b81b5e8a6f1047b864da89e8e110e61
Allow disabling symbol trimming on the command line when running
build.sh. This allows us to make GKI builds without trimming and without
modifying the build config. The main use case is when we want to update
the symbol list in a mixed build system.
Bug: 186549137
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I16d1c348270b4dbb378f009857286acd7b6d8aa3
Prior change
ANDROID: Incremental fs: stat should return actual used blocks
adds blocks to getattr. Unfortunately the code always looks for the
backing file, and pseudo files don't have backing files, so getattr
fails for pseudo files.
Bug: 186567511
Test: incfs_test passes, can do incremental installs on test device
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ia3df87f3683e095d05c822b69747515963c95f1c
(cherry picked from commit 9d00e67d8b)
Currently, the sched code checks if the rq clock has been
updated after its lock has been held when CONFIG_SCHED_DEBUG
is enabled. It tracks this by clearing the RQCF_UPDATED bit
when a lock is acquired and setting it upon a subsequent
update_rq_clock() call. It warns if rq clock is read without
RQCF_UPDATED flag indicating the code path missed updating
the clock.
When migrate_tasks() is called during a pause_cpus() event,
the local variable orf is updated with the contents of *rf,
prior to the call to update_rq_clock(). As a result, when
migrate_tasks() restores *rf from the local variable the
RQCF_UPDATED flag is lost. This clearing out of the
RQCF_UPDATED flag leads to a warning when the next task
is being pushed out.
For example in migrate_tasks()
orf = rf; // save flags, RQCF_UPDATE cleared
update_rq_clock() // set RQCF_UPDATE
for()
...
__migrate_task(dead_rq, new_cpu)
...
--> if migration, restore dead_rq's flags with orf.
--> We loose RQCF_UPDATE
rq_relock(dead_rq, orf)
This leaves the current cpu's rq clock_update_flags with the
RQCF_UPDATED flag cleared, an error condition with
CONFIG_SCHED_DEBUG enabled.
Fix the issue for by ensuring that the local variable orf
has the RQCF_UPDATED flag set, allowing the current
CPU's rq to have the flag set and leaving it in a good state
for future usage.
pause_cpus() is currently Android specific. As cpu_pause does
not rely on stop_machine_cpuslocked() like the regular
hotunplug path does, there's a risk for another CPU to
read the rq_clock, after we cleared RQCF_UPDATE, when using
pause_cpus(). This change will have little or no impact outside
of Android currently. If pause_cpus() or drain_rq_cpu_stop()
are merged upstream this change should be merged as well.
Bug: 186222712
Change-Id: Id241122e1449cdd4dcd15f94eb68735b40e3d6f5
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Transparent huge pages are supported for read-only non-shmem files,
but are only used for vmas with VM_DENYWRITE. This condition ensures that
file THPs are protected from writes while an application is running
(ETXTBSY). Any existing file THPs are then dropped from the page cache
when a file is opened for write in do_dentry_open(). Since sys_mmap
ignores MAP_DENYWRITE, this constrains the use of file THPs to vmas
produced by execve().
Systems that make heavy use of shared libraries (e.g. Android) are unable
to apply VM_DENYWRITE through the dynamic linker, preventing them from
benefiting from the resultant reduced contention on the TLB.
This patch reduces the constraint on file THPs allowing use with any
executable mapping from a file not opened for write (see
inode_is_open_for_write()). It also introduces additional conditions to
ensure that files opened for write will never be backed by file THPs.
Restricting the use of THPs to executable mappings eliminates the risk that
a read-only file later opened for write would encounter significant
latencies due to page cache truncation.
The ld linker flag '-z max-page-size=(hugepage size)' can be used to
produce executables with the necessary layout. The dynamic linker must
map these file's segments at a hugepage size aligned vma for the mapping to
be backed with THPs.
Comparison of the performance characteristics of 4KB and 2MB-backed
libraries follows; the Android dex2oat tool was used to AOT compile an
example application on a single ARM core.
4KB Pages:
==========
count event_name # count / runtime
598,995,035,942 cpu-cycles # 1.800861 GHz
81,195,620,851 raw-stall-frontend # 244.112 M/sec
347,754,466,597 iTLB-loads # 1.046 G/sec
2,970,248,900 iTLB-load-misses # 0.854122% miss rate
Total test time: 332.854998 seconds.
2MB Pages:
==========
count event_name # count / runtime
592,872,663,047 cpu-cycles # 1.800358 GHz
76,485,624,143 raw-stall-frontend # 232.261 M/sec
350,478,413,710 iTLB-loads # 1.064 G/sec
803,233,322 iTLB-load-misses # 0.229182% miss rate
Total test time: 329.826087 seconds
A check of /proc/$(pidof dex2oat64)/smaps shows THPs in use:
/apex/com.android.art/lib64/libart.so
FilePmdMapped: 4096 kB
/apex/com.android.art/lib64/libart-compiler.so
FilePmdMapped: 2048 kB
Bug: 158135888
Link: https://lore.kernel.org/patchwork/patch/1408266/
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Collin Fijalkovich <cfijalkovich@google.com>
Change-Id: I75c693a4b4e7526d374ef2c010bde3094233eef2
This reverts commit 327402e1e9.
Reason for revert: This patch causes us to hit the SCHED_WARN_ON in
uclamp_rq_dec_id. Revert until this is fixed appropriately.
Bug: 186415778
Change-Id: I5be50723b4058008ed24daa7ca303792ba81b567
Signed-off-by: J. Avila <elavila@google.com>
The new ARM BLAKE2s code doesn't work correctly (fails the self-tests)
in big endian kernel builds because it doesn't swap the endianness of
the message words when loading them. Fix this.
Fixes: 5172d322d3 ("crypto: arm/blake2s - add ARM scalar optimized BLAKE2s")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit d2f2516a38)
Bug: 178411248
Change-Id: Iff419963407eeb0435b9550ef126db4bf137a8a1
Signed-off-by: Eric Biggers <ebiggers@google.com>
Neither crypto_unregister_shashes() nor the module_exit function return
a value, so the explicit 'return' is unnecessary.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6131e97077)
Bug: 178411248
Change-Id: I2b15c03f1d0379effdf3a2f1d16e79a5ada84362
Signed-off-by: Eric Biggers <ebiggers@google.com>
This change adds KASAN-KUnit tests support for the async HW_TAGS mode.
In async mode, tag fault aren't being generated synchronously when a
bad access happens, but are instead explicitly checked for by the kernel.
As each KASAN-KUnit test expect a fault to happen before the test is over,
check for faults as a part of the test handler.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-10-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit e80a76aa1a
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I45a6bc351bce937797b1b08e9220a137225f9d55
When MTE async mode is enabled TFSR_EL1 contains the accumulative
asynchronous tag check faults for EL1 and EL0.
During the suspend/resume operations the firmware might perform some
operations that could change the state of the register resulting in
a spurious tag check fault report.
Report asynchronous tag faults before suspend and clear the TFSR_EL1
register after resume to prevent this to happen.
Cc: Will Deacon <will@kernel.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-9-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit eab0e6e17d
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I16efc3a886e57ac2f0a4f8a1bc70afcf17a86f26
MTE provides a mode that asynchronously updates the TFSR_EL1 register
when a tag check exception is detected.
To take advantage of this mode the kernel has to verify the status of
the register at:
1. Context switching
2. Return to user/EL0 (Not required in entry from EL0 since the kernel
did not run)
3. Kernel entry from EL1
4. Kernel exit to EL1
If the register is non-zero a trace is reported.
Add the required features for EL1 detection and reporting.
Note: ITFSB bit is set in the SCTLR_EL1 register hence it guaranties that
the indirect writes to TFSR_EL1 are synchronized at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
The dsb(nsh) in mte_check_tfsr_exit() is provisional pending
confirmation by the architects.
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-8-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit 65812c6921
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ia3e8df665b1fd88a50c649a6eda6ee790e28a7d4
Add vendor hook for selinux_state, so we can know
if the selinux_state is initialized
Bug: 186363840
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Change-Id: Ideed051a1d53ed1bce7d7915e38366264a7d77eb
load_unaligned_zeropad() and __get/put_kernel_nofault() functions can
read past some buffer limits which may include some MTE granule with a
different tag.
When MTE async mode is enabled, the load operation crosses the boundaries
and the next granule has a different tag the PE sets the TFSR_EL1.TF1 bit
as if an asynchronous tag fault is happened.
Enable Tag Check Override (TCO) in these functions before the load and
disable it afterwards to prevent this to happen.
Note: The same condition can be hit in MTE sync mode but we deal with it
through the exception handling.
In the current implementation, mte_async_mode flag is set only at boot
time but in future kasan might acquire some runtime features that
that change the mode dynamically, hence we disable it when sync mode is
selected for future proof.
Cc: Will Deacon <will@kernel.org>
Reported-by: Branislav Rankov <Branislav.Rankov@arm.com>
Tested-by: Branislav Rankov <Branislav.Rankov@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-6-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit e60beb95c0
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Id1bf44c5f41bd6de4b2ddf286939cd35712f2299
Add vh before and after __update_load_avg_se
in order to collect load change of tasks.
Bug: 185557444
Change-Id: I210973f7e388164b68ed766074d1420cdf9d4c32
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
The extract_symbols script has also been updated to make sure
__traceiter*() symbols are added to the list automatically in subsequent
updates.
Bug: 185777726
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I63789145dcfb0ab9d8411b236d797dc35a36b287
The extract_symbols script has also been updated to make sure
__traceiter*() symbols are added to the list automatically in subsequent
updates.
Bug: 185777726
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I616df9b718f50a7ab261de9d9b1186aaee1b17fa
The extract_symbols script has also been updated to make sure
__traceiter*() symbols are added to the list automatically in subsequent
updates.
Bug: 185777726
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Id7efe0cee50d3969182b965ed51b8c1803c4b41a
The extract_symbols script has also been updated to make sure
__traceiter*() symbols are added to the list automatically in subsequent
updates.
Bug: 185777726
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Id7f96b205c9daf9f4a1507a670cf351442bc5815
The extract_symbols script has also been updated to make sure
__traceiter*() symbols are added to the list automatically in subsequent
updates.
Bug: 185777726
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I9fabda88f22c364e4a6963638f2cb01d3e70e5ff
The extract_symbols script has also been updated to make sure
__traceiter*() symbols are added to the list automatically in subsequent
updates.
Bug: 185777726
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I7481aec17bfa7c85f3f8f626d5c9baba472d251b
Architectures supported by KASAN_HW_TAGS can provide a sync or async mode
of execution. On an MTE enabled arm64 hw for example this can be identified
with the synchronous or asynchronous tagging mode of execution.
In synchronous mode, an exception is triggered if a tag check fault occurs.
In asynchronous mode, if a tag check fault occurs, the TFSR_EL1 register is
updated asynchronously. The kernel checks the corresponding bits
periodically.
KASAN requires a specific kernel command line parameter to make use of this
hw features.
Add KASAN HW execution mode kernel command line parameter.
Note: This patch adds the kasan.mode kernel parameter and the
sync/async kernel command line options to enable the described features.
[ Add a new var instead of exposing kasan_arg_mode to be consistent with
flags for other command line arguments. ]
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://lore.kernel.org/r/20210315132019.33202-3-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit 2603f8a78d
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I193e9eb0c016abc525ef69a1b9b2bb7254856162
MTE provides an asynchronous mode for detecting tag exceptions. In
particular instead of triggering a fault the arm64 core updates a
register which is checked by the kernel after the asynchronous tag
check fault has occurred.
Add support for MTE asynchronous mode.
The exception handling mechanism will be added with a future patch.
Note: KASAN HW activates async mode via kasan.mode kernel parameter.
The default mode is set to synchronous.
The code that verifies the status of TFSR_EL1 will be added with a
future patch.
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-2-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit f3b7deef8d
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I5a2778bbb03595c24eb6cddb6c2b2dcb383b7907
Update ABI description in prperation for 4/23 KMI update
Leaf changes summary: 3103 artifacts changed
Changed leaf types summary: 15 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 3030 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 58 Changed, 0 Added variable
3030 functions with some sub-type change:
[C] 'function int dev_pm_genpd_set_next_wakeup(device*, ktime_t)' at domain.c:441:1 has some sub-type changes:
CRC (modversions) changed from 0x5f5fcb7c to 0xf61e0895
return type changed:
type name changed from 'int' to 'void'
type size changed from 32 to 0 (in bits)
[C] 'function void* PDE_DATA(const inode*)' at generic.c:799:1 has some sub-type changes:
CRC (modversions) changed from 0x44ca679 to 0xcab3cd66
[C] 'function void __ClearPageMovable(page*)' at compaction.c:138:1 has some sub-type changes:
CRC (modversions) changed from 0x44484f05 to 0x9fa7085b
[C] 'function void __SetPageMovable(page*, address_space*)' at compaction.c:130:1 has some sub-type changes:
CRC (modversions) changed from 0x8978c2df to 0x41b1ba1a
... 3026 omitted; 3029 symbols have only CRC changes
58 Changed variables:
[C] 'static_key_false cpu_hwcap_keys[61]' was changed to 'static_key_false cpu_hwcap_keys[76]' at cpufeature.c:150:1:
size of symbol changed from 976 to 1216
CRC (modversions) changed from 0x4c98d79b to 0xec2fc692
type of variable changed:
type name changed from 'static_key_false[61]' to 'static_key_false[76]'
array type size changed from 7808 to 9728
array type subrange 1 changed length from 61 to 76
[C] 'unsigned long int cpu_hwcaps[1]' was changed to 'unsigned long int cpu_hwcaps[2]' at cpufeature.c:100:1:
size of symbol changed from 8 to 16
CRC (modversions) changed from 0xaebd1b18 to 0x8b9f70c7
type of variable changed:
type name changed from 'unsigned long int[1]' to 'unsigned long int[2]'
array type size changed from 64 to 128
array type subrange 1 changed length from 1 to 2
[C] 'const vm_operations_struct drm_gem_cma_vm_ops' was changed at drm_gem_cma_helper.c:263:1:
size of symbol changed from 136 to 144
CRC (modversions) changed from 0xafd38045 to 0xc092767b
type of variable changed:
[C] 'net init_net' was changed at net_namespace.c:47:1:
CRC (modversions) changed from 0x75836cf9 to 0x8c00edd2
type of variable changed:
type size hasn't changed
there are data member changes:
type 'struct netns_xfrm' of 'net::xfrm' changed:
type size hasn't changed
1 data member insertion:
'seqcount_t xfrm_state_hash_generation', at offset 6176 (in bits) at xfrm.h:76:1
there are data member changes:
'spinlock_t xfrm_policy_lock' offset changed (by +32 bits)
'mutex xfrm_cfg_mutex' offset changed (by +64 bits)
3361 impacted interfaces
3361 impacted interfaces
[C] 'rq runqueues' was changed at core.c:49:1:
size of symbol changed from 4160 to 4416
CRC (modversions) changed from 0xfbaeea47 to 0x5137fc66
type of variable changed:
type size changed from 33280 to 35328 (in bits)
there are data member changes:
'uclamp_rq uclamp[2]' size changed from 768 to 2688 (in bits) (by +1920 bits)
'unsigned int uclamp_flags' offset changed (by +1920 bits)
61 ('cfs_rq cfs' .. 'u64 android_kabi_reserved4') offsets changed (by +2048 bits)
3361 impacted interfaces
[C] 'const vm_operations_struct vb2_common_vm_ops' was changed at videobuf2-memops.c:122:1:
size of symbol changed from 136 to 144
CRC (modversions) changed from 0x18a6cc01 to 0xfde2ba08
type of variable changed:
[C] 'vm_event_state vm_event_states' was changed at vmstat.c:108:1:
size of symbol changed from 720 to 728
CRC (modversions) changed from 0x85d767b0 to 0x62cac127
type of variable changed:
type size changed from 5760 to 5824 (in bits)
there are data member changes:
type 'unsigned long int[90]' of 'vm_event_state::event' changed:
type name changed from 'unsigned long int[90]' to 'unsigned long int[91]'
array type size changed from 5760 to 5824
array type subrange 1 changed length from 90 to 91
one impacted interface
[C] 'bus_type amba_bustype' was changed at bus.c:215:1:
CRC (modversions) changed from 0xbbb1e519 to 0x84856996
[C] 'const address_space_operations balloon_aops' was changed at balloon_compaction.c:253:1:
CRC (modversions) changed from 0x7769d265 to 0x807e3fab
[C] 'const clk_ops clk_fixed_factor_ops' was changed at clk-fixed-factor.c:60:1:
CRC (modversions) changed from 0x8a6ece13 to 0x26b088f0
... 48 omitted; 51 symbols have only CRC changes
'struct dma_buf at dma-buf.h:397:1' changed (indirectly):
type size changed from 3328 to 3392 (in bits)
there are data member changes:
type 'struct vm_operations_struct' of 'dma_buf::vm_ops' changed:
type size changed from 1088 to 1152 (in bits)
1 data member insertion:
'typedef bool ()* allow_speculation', at offset 832 (in bits) at mm.h:651:1
there are data member changes:
4 ('u64 android_kabi_reserved1' .. 'u64 android_kabi_reserved4') offsets changed (by +64 bits)
3361 impacted interfaces
421 impacted interfaces
'struct dma_slave_config at dmaengine.h:434:1' changed:
type size changed from 448 to 576 (in bits)
2 data member insertions:
'void* peripheral_config', at offset 448 (in bits) at dmaengine.h:449:1
'size_t peripheral_size', at offset 512 (in bits) at dmaengine.h:450:1
33 impacted interfaces
'struct dwc3 at core.h:1079:1' changed:
type size hasn't changed
1 data member insertion:
'unsigned int usb2_gadget_lpm_disable', at offset 16 (in bits) at core.h:1250:1
there are data member changes:
21 ('unsigned int dis_tx_ipgap_linecheck_quirk' .. 'unsigned int dis_u2_freeclk_exists_quirk') offsets changed (by +1 bits)
'unsigned int dis_del_phy_power_chg_quirk' offset changed (by -31 bits)
2 impacted interfaces
'struct net at net_namespace.h:56:1' changed (indirectly):
details were reported earlier
'struct netns_xfrm at xfrm.h:32:1' changed:
details were reported earlier
'struct rq at sched.h:907:1' changed (indirectly):
details were reported earlier
'struct snd_soc_component_driver at soc-component.h:67:1' changed:
type size changed from 2752 to 2816 (in bits)
1 data member insertion:
'int (snd_soc_component*, snd_pcm_substream*)* ack', at offset 2304 (in bits) at soc-component.h:149:1
there are data member changes:
8 ('const snd_compress_ops* compress_ops' .. 'int be_pcm_base') offsets changed (by +64 bits)
65 impacted interfaces
'struct snd_soc_dai_link at soc.h:749:1' changed:
type size changed from 1088 to 1600 (in bits)
1 data member insertion:
'snd_soc_dobj dobj', at offset 1088 (in bits) at soc.h:847:1
65 impacted interfaces
'struct soc_enum at soc.h:1257:1' changed:
type size changed from 320 to 832 (in bits)
1 data member insertion:
'snd_soc_dobj dobj', at offset 320 (in bits) at soc.h:1267:1
one impacted interface
'struct tcpm_port at tcpm.c:297:1' changed:
type size hasn't changed
1 data member insertion:
'bool slow_charger_loop', at offset 32080 (in bits) at tcpm.c:471:1
13 impacted interfaces
'struct uclamp_rq at sched.h:892:1' changed:
type size changed from 384 to 1344 (in bits)
there are data member changes:
type 'uclamp_bucket[5]' of 'uclamp_rq::bucket' changed:
type name changed from 'uclamp_bucket[5]' to 'uclamp_bucket[20]'
array type size changed from 320 to 1280
array type subrange 1 changed length from 5 to 20
3361 impacted interfaces
'struct uclamp_se at sched.h:623:1' changed (indirectly):
type size hasn't changed
there are data member changes:
2 ('unsigned int active' .. 'unsigned int user_defined') offsets changed (by +2 bits)
3361 impacted interfaces
'struct user_struct at user.h:13:1' changed:
type size changed from 960 to 1088 (in bits)
1 data member insertion:
'u64 android_oem_data1[2]', at offset 960 (in bits) at user.h:45:1
3361 impacted interfaces
'struct vm_event_state at vmstat.h:54:1' changed:
details were reported earlier
'struct vm_operations_struct at mm.h:589:1' changed:
details were reported earlier
Bug: 186241007
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I9725b5164da30547176b67b96cb1cef66ef2bfdc
When cdev_add is called after device_add has been called there is no
way for the userspace to know about the addition of a cdev as cdev_add
itself doesn't trigger a uevent notification, or for the kernel to
know about the change to devt. This results in two problems:
- mknod is never called for the cdev and hence no cdev appears on
devtmpfs.
- sysfs links to the new cdev are not established.
Based on how cdev_device_add[1] is written, it appears that the correct
way to use these APIs is to call cdev_add before device_add is called.
Since the cdev is an optional feature for remoteproc we cannot directly
use the existing API. Hence moving rproc_char_device_add() before
device_add() in rproc_add().
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/char_dev.c#n537
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Bug: 185924092
Change-Id: Iad8a45f564996d73cd3f33ed124427cb73497dad
Link: https://lore.kernel.org/linux-remoteproc/1618946805-26970-1-git-send-email-sidgup@codeaurora.org/
Signed-off-by: Siddharth Gupta <quic_sidgup@quicinc.com>
Right now only anonymous page faults are speculatively handled,
thus leaving out a large percentage of faults still requiring to
take mmap_sem. These were left out since there can be fault
handlers mainly in the fs layer which may use vma in unknown ways.
This patch enables speculative fault for ext4, f2fs and shmem. The
feature is disabled by default and enabled via allow_file_spec_access
kernel param.
Bug: 171954515
Change-Id: I0d23ebf299000e4ac5e2c71bc0b7fc9006e98da9
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
add vendor hooks to compute new cpu freq for oem feature.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I232d2e1ae885d6736eca9e4709870f4272b4873d
This reverts commit 1aff922933 as we are
free to update the ABI at this point in time.
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iba293953586fd78503ef5f47db40ccdc03b098f5
When a PD charger advertising Rp-3.0 is connected to a sink port, the
sink port current limit would 3A, during SNK_DISCOVERY, till power
negotiation starts. Once the negotiation starts the power limit needs
to drop down to pSnkStby(500mA @ 5V) and to negotiated current limit
once the explicit contract is in place. Not all charging loops can ramp
up to 3A and drop down to 500mA within tSnkStdby which is 15ms. The port
partner might hard reset if tSnkStdby is not met.
To solve this problem, this patch introduces slow-charger-loop which
when set makes the port request PD_P_SNK_STDBY_MW upon entering
SNK_DISCOVERY(instead of 3A or the 1.5A during SNK_DISCOVERY) and the
actual currrent limit after RX of PD_CTRL_PSRDY for PD link or during
SNK_READY for non-pd link.
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20210414024000.4175263-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1373fefc62https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I811b7f9ec732da0cab715837737ea09ea4a5bbbf