CAF's new fuel gauge drivers report POWER_SUPPLY_TYPE_BMS (Battery
Monitor System) instead of POWER_SUPPLY_TYPE_BATTERY (battery), and
rightfully so because it describes their purpose more accurately.
Update the power_supply_is_system_supplied function to recognize BMS
power supplies as batteries to prevent it from attempting to query the
POWER_SUPPLY_PROP_ONLINE property on our fuel gauge drivers.
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: dreamisbaka <jolinux.g@gmail.com>
The transaction logging (and especially strcmp call) is unnecessary for
us and adds measurably significant overhead. Kill it entirely.
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: dreamisbaka <jolinux.g@gmail.com>
While Android userspace (e.g. storaged) does use iostats via
/proc/diskstats, init will explicitly enable iostats for the devices on
which it is primarily used - sda and sdf. Avoid the 0.5-1% overhead for
block devices that do not need it.
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
[@0ctobot: Adapted for msm-4.19]
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: dreamisbaka <jolinux.g@gmail.com>
cpuidle was disabled while entering suspend as part of commit
8651f97bd9 in order to work around some
ACPI bugs. However, there's no reason to do this on modern
platforms. Leaving cpuidle enabled can result in improved power
consumption if dpm_resume_noirq runs for a significant time.
Change-Id: Ie182785b176f448698c0264eba554d1e315e8a06
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: dreamisbaka <jolinux.g@gmail.com>
Currently, ktime_us_delta() is invoked unconditionally to compute the
idle residency of the CPU, but it only makes sense to do that if a
valid idle state has been entered, so move the ktime_us_delta()
invocation after the entered_state >= 0 check.
While at it, merge two comment blocks in there into one and drop
a space between type casting of diff.
This patch has no functional changes.
Signed-off-by: Fieah Lim <kw@fieahl.im>
[ rjw: Changelog cleanup, comment format fix ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: dreamisbaka <jolinux.g@gmail.com>
Auditing comes with a lot of overhead due to string assembly via
vsnprintf. It isn't actually needed to make SELinux work, so remove
SELinux's artificial dependency on it to make it possible to use SELinux
without the unneeded overhead.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: I26a7fc519a36b18defdbc05f74bdbefc57d04d1e
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
There's plenty of room on the stack for a few more inlined bytes here
and there. The measured stack usage at runtime is still safe without
this, and performance is surely improved at a microscopic level, so
remove it.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: Ifb7e9ee35b7f9f3d9bc6c38db763b0b0e749905e
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
This kernel isn't going to be compiled for any other architecture...
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: I50401dec0201b2db1ea299828002552bcbe990d2
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
GCC supports the use of pipes for intermediate compilation steps (e.g.
passing the generated assembly code to the assembler) as a replacement for
temporary files. This bypasses VFS and other layers which can introduce
substantial amounts of overhead and instead redirects data directly
between processes.
The final product and generated code are unaffected. Memory usage while
compiling is slightly higher.
Tests showed a substantial reduction in build time when using GCC to
compile an x86 4.19 kernel:
Using temporary files in tmpfs: 2m41s
Using pipes: 2m36s
Similar benefits were observed with an Android arm64 4.9 kernel:
Using tmpfs: 5m34s
Using pipes: 4m33s
Enable the feature when possible (i.e. when the compiler supports it) to
speed up builds at effectively no cost for many setups, particularly
those with weaker CPUs.
Test: kernel compiles and boots
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Carlos Jimenez (JavaShin-X) <javashin1986@gmail.com>
Change-Id: Id7860154edd5547dc686e1320a25892e8c4906a6
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
* Poorly made kernel trees often use trace_printk() without
properly guarding them in a #ifdef macro.
* Such usage of trace_printk() causes a warning at
boot and additional memory allocation.
This option serves to disable those all at once with ease.
Change-Id: I3edd80bdc0cc6763c7184017f8c0a15de06952bb
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
Inspired by "828e0b45 yueyao@ build device tree overlay partition
image", integrating the same feature into floral kernel. The difference
is all build-time generated *.dtbo are packed into dtbo.img instead of
packing only the dtbos specified by the dtboimg.cfg.
dtbo.img is built only when CONFIG_BUILD_ARM64_DT_OVERLAY is set.
Change-Id: Ic0ed97fe699ee56e7272001064abb584690aa40a
Signed-off-by: Woody Lin <woodylin@google.com>
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Signed-off-by: Carlos Jimenez (JavaShin-X) <javashin1986@gmail.com>
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I1f98410528de75bb7c87b12ae7666769945e9ad9
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I8331b7e35c3d5a3de88a701474ae4041e618cfcb
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I510248ced8c6f61613354ae8ca5e27a2a316e88a
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I4ea389bd7c99dbf54640c1a5ee7c537da62e7876
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I49d5a4689a2bb6ef3e1617dc026d7d787d6afe5e
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I117e1bc42b15585916d32d37d9606a76952cc61c
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I600f33042000a76d3bdc650e0edc502cd6e94cb1
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: Ia2001ca505672ac514dc9d2ab50706f6b1f3ed10
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I222b198a08e8829cee49ad7f0b4ef0d0bf734c2c
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: Ic71e57ada95e72a742c794e32cad07396f75ecb4
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I2d074674b2b77c49f35b7a2825da63d160d644fb
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: If634c6c637e786f19904e861333d12609f01d276
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I7916a85c8915434e5190839dac666f27a2ce9db6
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: Ib9d15104771f7f8b5ba7b7e55353387231cc5ea9
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: Idf14324d4e6a7509e37a80f386cd37f2c93d1bb3
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
Change-Id: I8ba48eaeb1f92aa3f8822a922493b6b25f16b2f4
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0
The kernel config file used is lime-perf_defconfig and citrus-perf_defconfig
Change-Id: If794bbe62f285a1b561760c8e764851d82e2e72e
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
Fixes : "WARNING: EXPORT symbol "gsi_is_channel_empty" [vmlinux]
version generation failed, symbol will not be versioned."
Change-Id: I22e77bfea1fc6affc1dd76289e647f7dd94f4367
Signed-off-by: celtare21 <celtare21@gmail.com>
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
There are hundreds of these and I am not going to fix them all.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Change-Id: I430ff6966509b79f6d54cf63dc33570659f4fc6a
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
Pull in SPDX tag conversion from upstream dtc. This will replace the
conversion done in the kernel tree copy in v5.2-rc2.
This adds the following commits from upstream:
702c1b6c0e73 README.license: Update to reflect SPDX tag usage
4097bbffcf1d dtc: Add GPLv2 SPDX tags to files missing license text
94f87cd5b7c5 libfdt: Add dual GPL/BSD SPDX tags to files missing license text
c4ffc05574b1 tests: Replace license boilerplate with SPDX tags
a5ac29baacd2 pylibfdt: Replace dual GPLv2/BSD license boilerplate with SPDX tags
7fb0f4db2eb7 libfdt: Replace GPL/BSD boilerplate/reference with SPDX tags
acfe84f2c47e dtc: Replace GPLv2 boilerplate/reference with SPDX tags
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Id717ecf21203a908306ce22f07c0c55d055b9bd6
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
This adds the following commits from upstream:
87963ee20693 livetree: add missing type markers in generated overlay properties
825146d13dc0 Fix typos in various documentation and source files
25bb080c18d1 Update the GPL2 text to the latest revision
243176c4ce84 Fix bogus error on rebuild
ce01b21098a4 libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speed
fbb62754ce45 libfdt: Introduce fdt_create_with_flags()
228a44cce857 libfdt: Ensure fdt_add_property frees allocated name string on failure
8f695676227b Avoid assertion in check_interrupts_property()
5c3513f68921 Link tools and tests against libfdt shared library
00f9febf9c16 tests: Rename tests.sh to testutils.sh
c5d45188f923 Clean up LDLIBS handling
6ef8fcd05b74 Rebuild libfdt shared object if versioning linker script changes
26ee65a16c38 Use Python3 by default
cca6546244cb libfdt: Make fdt_get_max_phandle() an inline
730875016a6a libfdt: Add phandle generation helper
7dfb61ba96b1 libfdt: Use fdt_find_max_phandle()
2bc5b66d7f6c libfdt: Add new maximum phandle lookup function
7fcf8208b8a9 libfdt: add fdt_append_addrrange()
ae795b2db7a4 checks: Do not omit nodes with labels if symbol generation is requested
eac2ad495b29 Update version.lds again
f67b47135523 Revert "libfdt: Add phandle generation helper"
54ea41c22415 libfdt: Add phandle generation helper
4762ad051ee0 checks: Fix spelling in check_graph_endpoint
d37f6b20107e Bump version to v1.5.0
a4b1a307ff3a pylibfdt:tests: Extend the way how to find a Python module
625dd8aaf20f pylibfdt: Change how passing tests are recognized
364631626bb7 pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling
cb0f454f73cc pylibfdt: check_err accepts only integer as a first argument.
4b68c6b3605a pylibfdt: Proper handling of bytes/unicode strings and octal literals
78e113e81c9d Use PRIxPTR for printing uintptr_t values
ea7a8f6dad67 libfdt: Fix FDT_ERR_NOTFOUND typos in documentation
5aafd7ca43e0 libfdt: Fix fdt_getprop_by_offset() parameter name in documentation
7cbc550f903b checks: Add unit address check if node is enabled
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Id685b72d84ef280697cde78f62a166d1554b2924
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
This adds the following commits from upstream:
f267e674d145 checks: Fix crash with multiple source annotations
3616b9a811b6 checks: Use source position information for check failures
2bdbd07a1223 checks: Make each message output atomic
a1eff70c02cf util: Add xa{v}sprintf_append functions
82a52ce4573b libfdt: Add a test for fdt_getprop_by_offset()
607b8586b383 PEP8 / Flake8 cleanups for setup.py
f9c0a425b648 Remove broken objdir / srcdir support
5182b5e6f28c pylibfdt: Use common PREFIX variable
d45bf1f5f2a6 Refine make tests_clean target
99284c4db9cb Refine pylibfdt_clean target
a4629cfaedfb Refine libfdt_clean target
08380fc43aa2 tests: Use modern octal literals for Python
8113c00b99d3 pylibfdt: Allow switch to Python 3 via environment variable PYTHON
11738cf01f15 libfdt: Don't use memcpy to handle unaligned reads on ARM
86a288a73670 checks: Restructure check_msg to decrease indentation
5667e7ef9a9a annotations: add the annotation functionality
8e20ccf52f90 annotations: add positions
ca930e20bb54 tests: Don't lose errors from make checkm
43366bb4eeee tests: Property count valgrind errors in wrapped tests
5062516fb8cb srcpos: Remove srcpos_empty
a3143fafbf83 Revert "annotations: add positions"
403cc79f06a1 checks: Update SPI bus check for 'spi-slave'
baa1d2cf7894 annotations: add positions
ff2ad38f6a5a Merge remote-tracking branch 'origin/pr/18'
aa7254d9cb17 libfdt: return correct value if #size-cells property is not present
49903aed7783 use ptrdiff_t modifier for printing pointer differences
da2b691ccf68 treesource: Fix dts output for phandles in middle of a sequence of ints
8f8b77a0d62d tests: Wrap check_align() calls with base_run_test()
522d81d572f2 Fix dts output with a REF_PATH marker
e45198c98359 Added test cases for target references
0fcffda15e9f Merge nodes with local target label references
1e4a0928f3b3 pylibfdt: Don't have setup.py depend on where it's invoked from
ca399b14956f pylibfdt: Eliminate run_setup make function
98972f1b3e33 pylibfdt: Improved version extraction
7ba2be6cda5f pylibfdt: Don't silence setup.py when V=1
7691f9d39301 pylibfdt: Make SETUP make variable
855b9963def9 pylibfdt: Simpler CFLAGS handling
47cafbeeb977 pylibfdt: Link extension module with libfdt rather than rebuilding
dd695d6afb19 pylibfdt: Correctly set build output directory
59327523d0d8 pylibfdt: We don't need include files from the base directory
e84742aa7b93 checks: fix simple-bus compatible matching
8c59a97ce096 Fix missing labels when emitting dts format
d448f9a5fd94 Revert dts output formatting changes of spaces around brackets
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Id7935f03185090a80031512f6d59d0eb0b4b50a0
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
Major changes are I2C and SPI bus checks, YAML output format (for
future validation), some new libfdt functions, and more libfdt
validation of dtbs.
The YAML addition adds an optional dependency on libyaml. pkg-config is
used to test for it and pkg-config became a kconfig dependency in 4.18.
This adds the following commits from upstream:
c86da84d30e4 Add support for YAML encoded output
361b5e7d8067 Make type_marker_length helper public
bfbfab047e45 pylibfdt: Add a means to add and delete notes
9005f4108e7c pylibfdt: Allow delprop() to return errors
b94c056b137e Make valgrind optional
fd06c54d4711 tests: Better testing of dtc -I fs mode
c3f50c9a86d9 tests: Allow dtbs_equal_unordered to ignore mem reserves
0ac9fdee37c7 dtc: trivial '-I fs -O dts' test
0fd1c8c783f3 pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values
04853cad18f4 pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap
9619c8619c37 Kill bogus TYPE_BLOB marker type
ac68ff92ae20 parser: add TYPE_STRING marker to path references
90a190eb04d9 checks: add SPI bus checks
53a1bd546905 checks: add I2C bus checks
88f18909db73 dtc: Bump version to v1.4.7
85bce8b2f06d tests: Correction to vg_prepare_blob()
57f7f9e7bc7c tests: Don't call memcmp() with NULL arguments
c12b2b0c20eb libfdt: fdt_address_cells() and fdt_size_cells()
3fe0eeda0b7f livetree: Set phandle properties type to uint32
853649acceba pylibfdt: Support the sequential-write interface
9b0e4fe26093 tests: Improve fdt_resize() tests
1087504bb3e8 libfdt: Add necessary header padding in fdt_create()
c72fa777e613 libfdt: Copy the struct region in fdt_resize()
32b9c6130762 Preserve datatype markers when emitting dts format
6dcb8ba408ec libfdt: Add helpers for accessing unaligned words
42607f21d43e tests: Fix incorrect check name 'prop_name_chars'
9d78c33bf8a1 tests: fix grep for checks error messages
b770f3d1c13f pylibfdt: Support setting the name of a node
2f0d07e678e0 pylibfdt: Add functions to set and get properties as strings
354d3dc55939 pylibfdt: Update the bytearray size with pack()
3c374d46acce pylibfdt: Allow reading integer values from properties
49d32ce40bb4 pylibfdt: Use an unsigned type for fdt32_t
481246a0c13a pylibfdt: Avoid accessing the internal _fdt member in tests
9aafa33d99ed pylibfdt: Add functions to update properties
5a598671fdbf pylibfdt: Support device-tree creation/expansion
483e170625e1 pylibfdt: Add support for reading the memory reserve map
29bb05aa4200 pylibfdt: Add support for the rest of the header functions
582a7159a5d0 pylibfdt: Add support for fdt_next_node()
f0f8c9169819 pylibfdt: Reorder functions to match libfdt.h
64a69d123935 pylibfdt: Return string instead of bytearray from getprop()
4d09a83420df fdtput: Add documentation
e617cbe1bd67 fdtget: Add documentation
180a93924014 Use <inttypes.h> format specifiers in a bunch of places we should
b9af3b396576 scripts/dtc: Fixed format mismatch in fprintf
4b8fcc3d015c libfdt: Add fdt_check_full() function
c14223fb2292 tests: Use valgrind client requests for better checking
5b67d2b955a3 tests: Better handling of valgrind errors saving blobs
e2556aaeb506 tests: Remove unused #define
fb9c6abddaa8 Use size_t for blob lengths in utilfdt_read*
0112fda03bf6 libfdt: Add fdt_header_size()
6473a21d8bfe Consolidate utilfdt_read_len() variants
d5db5382c5e5 libfdt: Safer access to memory reservations
719d582e98ec libfdt: Propagate name errors in fdt_getprop_by_offset()
70166d62a27f libfdt: Safer access to strings section
eb890c0f77dc libfdt: Make fdt_check_header() more thorough
899d6fad93f3 libfdt: Improve sequential write state checking
04b5b4062ccd libfdt: Clean up header checking functions
44d3efedc816 Preserve datatype information when parsing dts
f0be81bd8de0 Make Property a subclass of bytearray
24b1f3f064d4 pylibfdt: Add a method to access the device tree directly
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Icfc7ef3c73c54201a267c2597fe9a0748f01380f
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
dtc has a new source file, yamltree.c, that needs to be copied when
syncing dtc sources.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: I11ba1b3bf0fe8f3de220e7dceda4806006fbf6d1
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>