811997 Commits

Author SHA1 Message Date
Richard Raya
0341cbb7e1 build.sh: Use trap for KSU defconfig cleanup
Change-Id: I885d13c4121dd04a647591c675026d89fb27d958
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:52:04 -03:00
Richard Raya
65628c9ac7 arm64: lib: Checkout xor-neon from linux-next
320a93d4df48a378ebf923639fa62770676b80db

Change-Id: I79160c38bd4d0f994d0b22d07b332e5a2a7aa54e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:51:34 -03:00
Richard Raya
5932fd03de arm64: lib: Checkout uaccess_flushcache from linux-next
f749448edb9c98bece0aeec5536260a8794af24b

Change-Id: I2478a4f19c81f22a751467a073c5ccbac86ab664
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:51:28 -03:00
Richard Raya
1f4a074ad5 arm64: lib: Checkout tishift from linux-next
3ac0f4526dfb80625f5c2365bccd85be68db93ef

Change-Id: Id4a2bfbda46c12fa682f06975c699dae8a557f30
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
7629570508 arm64: lib: Checkout strrchr from linux-next
3ac0f4526dfb80625f5c2365bccd85be68db93ef

Change-Id: I5f89854931494dad498429441d5bf82f93d78088
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
1dd3c17474 arm64: lib: Checkout strnlen from linux-next
3ac0f4526dfb80625f5c2365bccd85be68db93ef

Change-Id: Ib7f358ca8fc44d0bc6e52bacf86d3153236279f4
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
a690eef275 arm64: lib: Checkout strncmp from linux-next
e33c89256e66ba64ce5190c7f2c2741e619c6321

Change-Id: I6b385eb8b1e321454a944fb8e8174aa43b537c72
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
7a7ff63ab9 arm64: lib: Checkout strlen from linux-next
6b8f648959e5036695f056a60e3444f4753f643e

Change-Id: I2005539ab74c24a9477d25e6607f819a14a60a52
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
a3c564e98d arm64: lib: Checkout strcmp from linux-next
e33c89256e66ba64ce5190c7f2c2741e619c6321

Change-Id: I6639a490496fd0eab9e0f82216ef87429795fb49
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
1c2c587feb arm64: lib: Checkout strchr from linux-next
3ac0f4526dfb80625f5c2365bccd85be68db93ef

Change-Id: I613ccc9ea1c9c5dd23955449a5c367e8927099a1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
18c6e69a53 arm64: lib: Checkout memset from linux-next
ec9d78070de986ecf581ea204fd322af4d2477ec

Change-Id: Ief583e089b37e3659d236df792117b92fda09cf1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
6dd2267bdd arm64: lib: Checkout memmove from linux-next
ec9d78070de986ecf581ea204fd322af4d2477ec

Change-Id: I4dea5594e7650c76d74f3132f37b52f6c54bafa7
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
866c561aa2 arm64: lib: Checkout memcpy from linux-next
ec9d78070de986ecf581ea204fd322af4d2477ec

Change-Id: Ie586b44d9c1e8c8e7b0c005eb706b2932013cb40
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
30fcd84efd arm64: lib: Checkout memcmp from linux-next
6b8f648959e5036695f056a60e3444f4753f643e

Change-Id: I0f5641d1a7cd61e3407169f441d84a96ed128259
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:22 -03:00
Richard Raya
27e042adf3 arm64: lib: Checkout memchr from linux-next
9e51cafd783b22018fb15bfb06d65f69349223a9

Change-Id: I8641c77a99421b4b3b579c8a4bacd2e99f42e9a7
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:21 -03:00
Richard Raya
9ec89a981a arm64: lib: Checkout delay from linux-next
caab277b1de0a22b675c4c95fc7b285ec2eb5bf5

Change-Id: Ia2693321456a15ff85fe160f8472877dfb4866d0
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:20 -03:00
Richard Raya
917b0d3cfb arm64: lib: Checkout crc32 from linux-next
5f2f5eaa3e373c3a07a4f3552fe13d9cde5e23e5

Change-Id: Iffd6cfec4e537f383437467f1c8638eb273eb2d1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:20 -03:00
Richard Raya
188fbbf7d6 arm64: lib: Checkout copy_to_user from linux-next
ada66f1837594f38bc2db4f98c4c6589ecc8a7f6

Change-Id: Ia6621280e58c20f979540416ef025b734a6ee42b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:20 -03:00
Richard Raya
5d56a9ece5 arm64: lib: Checkout copy_template from linux-next
caab277b1de0a22b675c4c95fc7b285ec2eb5bf5

Change-Id: I418303dff4fd26b93d17a812ce27a9f9496c7076
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:20 -03:00
Richard Raya
fc60f2fa40 arm64: lib: Checkout copy_page from linux-next
8d9902055c57548bb342dc3ca78caa21e9643024

Change-Id: Ibd43d032f020ba353876b1100a6a6316970b9796
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:20 -03:00
Richard Raya
3b5e78a685 arm64: lib: Checkout copy_in_user from linux-next
ada66f1837594f38bc2db4f98c4c6589ecc8a7f6

Change-Id: Ib4c6656c6fa35b4f54331a5269e568858e3b2445
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:20 -03:00
Richard Raya
c6cce78e7a arm64: lib: Checkout copy_from_user from linux-next
ada66f1837594f38bc2db4f98c4c6589ecc8a7f6

Change-Id: I177637b86d68a516071f8800c1476b52ec1c0706
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:19 -03:00
Richard Raya
4fc1ee62b4 arm64: lib: Checkout clear_user from linux-next
819771cc289226e392d5d45f1d162b47ace4eff6

Change-Id: I3c9bc30015b138e6facdb8cef51a350980dd9e85
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:19 -03:00
Richard Raya
3b3f79d5c5 arm64: lib: Checkout clear_page from linux-next
f0616abd4e67143b45b04b565839148458857347

Change-Id: Ie3fe00168ed842dea2b704b5ecbcab8fc9e6aa31
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 19:47:18 -03:00
Robin Murphy
6c489a6c4e arm64: asm: Add assembly annotations for weak-PI-alias madness
Add yet another set of assembly symbol annotations, this time for the
borderline-absurd situation of a function aliasing to a weak symbol
which itself also wants a position-independent alias.

Link: https://lore.kernel.org/r/75545b3c4129b20b887474bb58a9cf302bf2132b.1622128527.git.robin.murphy@arm.com
Change-Id: Iada6850e945792279398e54de5c8248bf52d635e
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:56 -03:00
Mark Brown
2a653458b8 arm64: asm: Add new-style position independent function annotations
commit 35e61c77ef386555f3df1bc2057098c6997ca10b upstream.

As part of an effort to make the annotations in assembly code clearer and
more consistent new macros have been introduced, including replacements
for ENTRY() and ENDPROC().

On arm64 we have ENDPIPROC(), a custom version of ENDPROC() which is
used for code that will need to run in position independent environments
like EFI, it creates an alias for the function with the prefix __pi_ and
then emits the standard ENDPROC. Add new-style macros to replace this
which expand to the standard SYM_FUNC_*() and SYM_FUNC_ALIAS_*(),
resulting in the same object code. These are added in linkage.h for
consistency with where the generic assembler code has its macros.

[will: Rename 'WEAK' macro, use ';' instead of ASM_NL, deprecate ENDPIPROC]

Change-Id: I30ea7f45da24be8fb7cd6e177ae65bf9d4c227b9
Cc: Jian Cai <jiancai@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:55 -03:00
Jiri Slaby
bb4d39d207 linkage: Introduce new macros for assembler symbols
commit ffedeeb780dc554eff3d3b16e6a462a26a41d7ec upstream.

Introduce new C macros for annotations of functions and data in
assembly. There is a long-standing mess in macros like ENTRY, END,
ENDPROC and similar. They are used in different manners and sometimes
incorrectly.

So introduce macros with clear use to annotate assembly as follows:

a) Support macros for the ones below
   SYM_T_FUNC -- type used by assembler to mark functions
   SYM_T_OBJECT -- type used by assembler to mark data
   SYM_T_NONE -- type used by assembler to mark entries of unknown type

   They are defined as STT_FUNC, STT_OBJECT, and STT_NOTYPE
   respectively. According to the gas manual, this is the most portable
   way. I am not sure about other assemblers, so this can be switched
   back to %function and %object if this turns into a problem.
   Architectures can also override them by something like ", @function"
   if they need.

   SYM_A_ALIGN, SYM_A_NONE -- align the symbol?
   SYM_L_GLOBAL, SYM_L_WEAK, SYM_L_LOCAL -- linkage of symbols

b) Mostly internal annotations, used by the ones below
   SYM_ENTRY -- use only if you have to (for non-paired symbols)
   SYM_START -- use only if you have to (for paired symbols)
   SYM_END -- use only if you have to (for paired symbols)

c) Annotations for code
   SYM_INNER_LABEL_ALIGN -- only for labels in the middle of code
   SYM_INNER_LABEL -- only for labels in the middle of code

   SYM_FUNC_START_LOCAL_ALIAS -- use where there are two local names for
	one function
   SYM_FUNC_START_ALIAS -- use where there are two global names for one
	function
   SYM_FUNC_END_ALIAS -- the end of LOCAL_ALIASed or ALIASed function

   SYM_FUNC_START -- use for global functions
   SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment
   SYM_FUNC_START_LOCAL -- use for local functions
   SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o
	alignment
   SYM_FUNC_START_WEAK -- use for weak functions
   SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment
   SYM_FUNC_END -- the end of SYM_FUNC_START_LOCAL, SYM_FUNC_START,
	SYM_FUNC_START_WEAK, ...

   For functions with special (non-C) calling conventions:
   SYM_CODE_START -- use for non-C (special) functions
   SYM_CODE_START_NOALIGN -- use for non-C (special) functions, w/o
	alignment
   SYM_CODE_START_LOCAL -- use for local non-C (special) functions
   SYM_CODE_START_LOCAL_NOALIGN -- use for local non-C (special)
	functions, w/o alignment
   SYM_CODE_END -- the end of SYM_CODE_START_LOCAL or SYM_CODE_START

d) For data
   SYM_DATA_START -- global data symbol
   SYM_DATA_START_LOCAL -- local data symbol
   SYM_DATA_END -- the end of the SYM_DATA_START symbol
   SYM_DATA_END_LABEL -- the labeled end of SYM_DATA_START symbol
   SYM_DATA -- start+end wrapper around simple global data
   SYM_DATA_LOCAL -- start+end wrapper around simple local data

==========

The macros allow to pair starts and ends of functions and mark functions
correctly in the output ELF objects.

All users of the old macros in x86 are converted to use these in further
patches.

Link: https://lkml.kernel.org/r/20191011115108.12392-2-jslaby@suse.cz
Change-Id: Ia6a0259a8da7c67cb10eff32093e736fda07e1db
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>
Cc: x86-ml <x86@kernel.org>
Cc: xen-devel@lists.xenproject.org
Cc: Jian Cai <jiancai@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:49 -03:00
Mark Rutland
ce5100f937 linkage: Add generic GLOBAL() macro
Declaring a global symbol in assembly is tedious, error-prone, and
painful to read. While ENTRY() exists, this is supposed to be used for
function entry points, and this affects alignment in a potentially
undesireable manner.

Instead, let's add a generic GLOBAL() macro for this, as x86 added
locally in commit:

  95695547a7db44b8 ("x86: asm linkage - introduce GLOBAL macro")

... thus allowing us to use this more freely in the kernel.

Change-Id: Ic4c0121f56cdfbac8915b45249c446cdf6cbe596
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:47 -03:00
Masahiro Yamada
fe4e4c52f2 linkage: Replace VMLINUX_SYMBOL_STR() with __stringify()
With the special case handling for Blackfin and Metag was removed by
commit 94e58e0ac312 ("export.h: remove code for prefixing symbols with
underscore"), VMLINUX_SYMBOL_STR() is now equivalent to __stringify().

Replace the remaining usages in <linux/linkage.h> to prepare for the
entire removal of VMLINUX_SYMBOL_STR().

Change-Id: I733c49718f29f7d270967b002ec32c267c75369b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:46 -03:00
Ard Biesheuvel
c3f5ee8d43 lib/xor: Make xor prototypes more friendly to compiler vectorization
Modern compilers are perfectly capable of extracting parallelism from
the XOR routines, provided that the prototypes reflect the nature of the
input accurately, in particular, the fact that the input vectors are
expected not to overlap. This is not documented explicitly, but is
implied by the interchangeability of the various C routines, some of
which use temporary variables while others don't: this means that these
routines only behave identically for non-overlapping inputs.

So let's decorate these input vectors with the __restrict modifier,
which informs the compiler that there is no overlap. While at it, make
the input-only vectors pointer-to-const as well.

Link: https://github.com/ClangBuiltLinux/linux/issues/563
Change-Id: I5bf93880b158aa01f2b5155e7a9f6cd7b9088fc6
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 02:57:44 -03:00
Sultan Alsawaf
5500733b43 selinux: Avoid dynamic memory allocation for temporary scontext buffers
Common sizes for the scontext buffers are small enough to fit on the stack,
saving two dynamic memory allocations from this hot path.

Change-Id: I9bace557c9ed55cee5c27a29cde4d2c897242c96
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:44 -03:00
Sultan Alsawaf
5da0bd5621 fscrypt: Avoid dynamic memory allocation during impl selection
When there's only one device, use an on-stack buffer to store the device
pointers in order to avoid dynamic memory allocation from this hot path.

Change-Id: Ib54e0a5de7f0168b6f246a85306a146d1384b39a
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Eric Biggers
3b491a454b fscrypt: Stop pretending that key setup is nofs-safe
fscrypt_get_encryption_info() has never actually been safe to call in a
context that needs GFP_NOFS, since it calls crypto_alloc_skcipher().

crypto_alloc_skcipher() isn't GFP_NOFS-safe, even if called under
memalloc_nofs_save().  This is because it may load kernel modules, and
also because it internally takes crypto_alg_sem.  Other tasks can do
GFP_KERNEL allocations while holding crypto_alg_sem for write.

The use of fscrypt_init_mutex isn't GFP_NOFS-safe either.

So, stop pretending that fscrypt_get_encryption_info() is nofs-safe.
I.e., when it allocates memory, just use GFP_KERNEL instead of GFP_NOFS.

Link: https://lore.kernel.org/r/20200917041136.178600-10-ebiggers@kernel.org
Change-Id: I0530b5580741e77ad50e607225cf2d7d894afd27
Acked-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Alexander Winkowski
411348d539 fscrypt: Fix misleading indentation warning
Change-Id: Iff137b9643843d99367d5b97606c7cd687dc8709
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Park Ju Hyung
e40a3db314 fs: Remove remaining android_fs tracings
Change-Id: I2d2f5a6ef9c3f8929c6342d290f1e9010f97898b
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Park Ju Hyung
ec951d8c2d time: Move frequently used functions to headers and declare them inline
Those function are frequently used in various places and declaring them inline
can reduce overheads.

Change-Id: I4c0845686f758eddeae0bd1a89ea09d551fb332f
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Linus Torvalds
022773be03 dcache: Move the DCACHE_OP_COMPARE case out of the __d_lookup_rcu loop
__d_lookup_rcu() is one of the hottest functions in the kernel on
certain loads, and it is complicated by filesystems that might want to
have their own name compare function.

We can improve code generation by moving the test of DCACHE_OP_COMPARE
outside the loop, which makes the loop itself much simpler, at the cost
of some code duplication.  But both cases end up being simpler, and the
"native" direct case-sensitive compare particularly so.

Change-Id: Ib45cdc9d56c950f472cf2bea34330c18926ba925
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Richard Raya
69d2090cba sdcardfs: Disable debug
Change-Id: I0a2b64d65239dd06b7405896f03fab6004219bdd
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-13 00:13:33 -03:00
Richard Raya
255497bc8d workflows: Improvements
Merge KSU workflow into main script.
Directly use the Telegram API for posting builds.

Change-Id: Iae193d8b38f6a8d1a103708a8ca9570259c80c64
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-12 19:50:09 -03:00
Richard Raya
87051cfa9e fs: Drop debugfs
Change-Id: Icda3dfd8e187958022bcac9f04bae35a9939fcce
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-12 00:01:58 -03:00
Richard Raya
406bb86929 Revert "defconfig: Switch to 250Hz scheduler tick rate"
This reverts commit 1695ed419ba16ae3f039ac303d5baeeaf3caf240.

Change-Id: I0c015cf9ea20dbf67de97a726871ae71c4bbd9e7
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-11 23:21:49 -03:00
Richard Raya
e7152178ee Revert "f2fs: Update congestion timeout for 250Hz"
This reverts commit 2a888d52929ec2345b38b12872b4b14cb7a8afe8.

Change-Id: Id477e99d72436940e812c613f10c9fe7492a596b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-11 23:21:35 -03:00
Richard Raya
42095c444c mm: Protect readahead size from init
Change-Id: I1f105969bcdd756cd68e8692fb3419aa72b07b5e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-08 10:38:30 -03:00
Richard Raya
58d4ee9072 lpm-levels: Remove unused variable
Change-Id: Ib9977c46580c5de7429f89cec6c9d69a6e2e80e2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-08 02:57:41 -03:00
Sultan Alsawaf
87269d67de lpm-levels: Convert sync_lock to raw spin lock
The CPU idle loop runs with IRQs disabled, so a raw spin lock must be used
here.

Change-Id: I980a971afd44e239e34b41c6c558658b8fb95396
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-08 02:55:52 -03:00
Sultan Alsawaf
fd00ba8aeb lpm-levels: Make hrtimers expire in hard IRQ context
The CPU idle driver's hrtimers need to be able to wake CPUs up from their
C-states using a timer interrupt. This doesn't work if the hrtimers are
instead queued into soft IRQ and run from there, so make them expire in
hard IRQ.

Change-Id: I695a8ccaabe6835aa69585d57497dfe82a586bac
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-08 02:55:24 -03:00
Alexander Winkowski
b3468a9521 lpm-levels: Don't stop the tick if it's not beneficial
There is no point in stopping the scheduler tick if the expected
idle duration is shorter than the tick period length.

Change-Id: I3c23a02795066108c973ce7cbb35986becd37984
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-08 02:55:19 -03:00
Kazuki Hashimoto
860887a444 cpuidle: Don't check if a CPU is isolated
Those never get applied here.

Change-Id: Iac3f7e3a5757c0c60b115bf4a7f6dea1dc988335
Signed-off-by: Kazuki Hashimoto <kazukih@tuta.io>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-07 04:17:05 -03:00
Kazuki Hashimoto
dad611bcaf cpuidle: Update IPI history when waking CPUs up with IPIs
For more accurate cpuidle predictions.

[Tashar02]
- Extend visibility of update_ipi_history().

Change-Id: Ie9c91965f89cbceda925bcbe6ef35941f9162d5e
Signed-off-by: Kazuki Hashimoto <kazukih@tuta.io>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-07 04:16:25 -03:00
Kazuki Hashimoto
5a83ba3c75 lpm-levels: Remove unused code used for debugging
Change-Id: I9b790582a947da8929ec1bff54391f2bd680f023
Signed-off-by: Kazuki Hashimoto <kazukih@tuta.io>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-07 04:16:22 -03:00