Add samsung specific changes

This commit is contained in:
2025-08-11 14:29:00 +02:00
parent c66122e619
commit 4d134a1294
2688 changed files with 1127995 additions and 11475 deletions

21
Android.bp Normal file
View File

@@ -0,0 +1,21 @@
cc_binary_host {
name: "unifdef",
srcs: ["scripts/unifdef.c"],
sanitize: {
never: true,
},
}
genrule {
name: "gen-headers_install.sh",
srcs: ["scripts/headers_install.sh"],
tools: ["unifdef"],
out: ["headers_install.sh"],
cmd: "sed 's+scripts/unifdef+$${LOC_UNIFDEF:-$$(dirname $$0)/unifdef}+g' $(in) > $(out)",
}
sh_binary_host {
name: "headers_install.sh",
src: ":gen-headers_install.sh",
required: ["unifdef"],
}

View File

@@ -104,8 +104,6 @@ filegroup(
"android/abi_gki_aarch64_exynosauto",
"android/abi_gki_aarch64_fips140",
"android/abi_gki_aarch64_galaxy",
"android/abi_gki_aarch64_galaxy_grey",
"android/abi_gki_aarch64_galaxy_presubmit",
"android/abi_gki_aarch64_honor",
"android/abi_gki_aarch64_imx",
"android/abi_gki_aarch64_lenovo",
@@ -126,15 +124,6 @@ filegroup(
visibility = ["//visibility:public"],
)
filegroup(
name = "sec_defconfig_fragments",
srcs = [
# keep sorted
"arch/arm64/configs/gki_sec_defconfig",
],
visibility = ["//visibility:public"],
)
define_common_kernels(target_configs = {
"kernel_aarch64": {
"kmi_symbol_list_strict_mode": True,
@@ -144,7 +133,6 @@ define_common_kernels(target_configs = {
"protected_exports_list": "android/abi_gki_protected_exports_aarch64",
"protected_modules_list": "android/gki_aarch64_protected_modules",
"module_implicit_outs": get_gki_modules_list("arm64") + get_kunit_modules_list("arm64"),
"defconfig_fragments": [":sec_defconfig_fragments"],
"make_goals": _GKI_AARCH64_MAKE_GOALS,
"ddk_headers_archive": ":kernel_aarch64_ddk_headers_archive",
"extra_dist": [
@@ -548,6 +536,14 @@ copy_to_dist_dir(
log = "info",
)
load(":consolidate.bzl", "define_consolidate")
define_consolidate()
load(":msm_platforms.bzl", "define_msm_platforms")
define_msm_platforms()
_ROCKPI4_MODULE_OUTS = [
# keep sorted
"drivers/char/hw_random/virtio-rng.ko",
@@ -990,12 +986,16 @@ filegroup(
ddk_headers(
name = "all_headers_unsafe",
hdrs = [
"drivers/devfreq/governor.h",
"drivers/gpu/drm/virtio/virtgpu_trace.h",
"mm/slab.h",
],
# The list of include directories where source files can #include headers
# from. In other words, these are the `-I` option to the C compiler.
# Unsafe include directories are appended to ccflags-y.
includes = [],
includes = [
"drivers/devfreq",
],
visibility = ["//visibility:private"],
)
@@ -2345,12 +2345,6 @@ copy_to_dist_dir(
flat = True,
)
load(":consolidate.bzl", "define_consolidate")
define_consolidate(
defconfig_fragments = [":sec_defconfig_fragments"],
)
_TEST_MAPPINGS = glob(["**/TEST_MAPPING"])
pkg_files(
@@ -2369,14 +2363,3 @@ pkg_zip(
out = "test_mappings.zip",
visibility = ["//visibility:public"],
)
alias(
name = "disable_kdp",
actual = ":ogki_defconfig_fragment",
)
filegroup(
name = "ogki_defconfig_fragment",
srcs = ["ogki_fragment_defconfig"],
visibility = ["//visibility:public"],
)

157
BUILD.dtc Normal file
View File

@@ -0,0 +1,157 @@
cc_library(
name = "libfdt",
copts = [
"-Werror",
"-Wno-macro-redefined",
"-Wno-sign-compare",
],
includes = ["libfdt"],
srcs = glob([
"libfdt/*.h",
"libfdt/*.c",
]),
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
copts = [
"-Wall",
"-Werror",
"-Wno-sign-compare",
"-Wno-missing-field-initializers",
"-Wno-unused-parameter",
]
genrule(
name = "lexer",
srcs = ["dtc-lexer.l"],
outs = ["dtc-lexer.lex.c"],
cmd = "lex -o$@ $(location dtc-lexer.l)"
)
genrule(
name = "parser",
srcs = ["dtc-parser.y"],
outs = ["dtc-parser.tab.c", "dtc-parser.tab.h"],
cmd = """
bison -b dtc-parser -d $(location dtc-parser.y)
cp ./*.tab.c $(location dtc-parser.tab.c)
cp ./*.tab.h $(location dtc-parser.tab.h)
""",
)
cc_library(
name = "dtc_gen",
copts = copts,
srcs = [
":lexer",
":parser",
] + glob(["*.h"]),
includes = ["."],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "dtc",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"checks.c",
"data.c",
"dtc.c",
"flattree.c",
"fstree.c",
"livetree.c",
"srcpos.c",
"treesource.c",
"util.c",
] + glob(["*.h"]),
includes = ["."],
deps = [":libfdt", ":dtc_gen"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtget",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtget.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtput",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtput.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtdump",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtdump.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtoverlay",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtoverlay.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtoverlaymerge",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtoverlaymerge.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
exports_files([
"libfdt/fdt.h",
"libfdt/libfdt.h",
"libfdt/libfdt_env.h",
])

View File

@@ -0,0 +1,361 @@
Introduction
============
This module will be used to log the events by any module/driver which
enables Inter Processor Communication (IPC). Some of the IPC drivers such
as Message Routers, Multiplexers etc. which act as a passive pipe need
some mechanism to log their events. Since all such IPC drivers handle a
large amount of traffic/events, using kernel logs renders kernel logs
unusable by other drivers and also degrades the performance of IPC
drivers. This new module will help in logging such high frequency IPC
driver events while keeping the standard kernel logging mechanism
intact.
Hardware description
====================
This module does not drive any hardware resource and will only use the
kernel memory-space to log the events.
Software description
====================
Design Goals
------------
This module is designed to
* support logging for drivers handling large amount of
traffic/events
* define & differentiate events/logs from different drivers
* support both id-based and stream-based logging
* support extracting the logs from both live target & memory dump
IPC Log Context
----------------
This module will support logging by multiple drivers. To differentiate
between the multiple drivers that are using this logging mechanism, each
driver will be assigned a unique context by this module. Associated with
each context is the logging space, dynamically allocated from the kernel
memory-space, specific to that context so that the events logged using that
context will not interfere with other contexts.
Event Logging
--------------
Every event will be logged as a <Type: Size: Value> combination. Type
field identifies the type of the event that is logged. Size field represents
the size of the log information. Value field represents the actual
information being logged. This approach will support both id-based logging
and stream-based logging. This approach will also support logging sub-events
of an event. This module will provide helper routines to encode/decode the
logs to/from this format.
Encode Context
---------------
Encode context is a temporary storage space that will be used by the client
drivers to log the events in <Type: Size: Value> format. The client drivers
will perform an encode start operation to initialize the encode context
data structure. Then the client drivers will log their events into the
encode context. Upon completion of event logging, the client drivers will
perform an encode end operation to finalize the encode context data
structure to be logged. Then this updated encode context data structure
will be written into the client driver's IPC Log Context. The maximum
event log size will be defined as 256 bytes.
Log Space
----------
Each context (Figure 1) has an associated log space, which is dynamically
allocated from the kernel memory-space. The log space is organized as a list of
1 or more kernel memory pages. Each page (Figure 2) contains header information
which is used to differentiate the log kernel page from the other kernel pages.
0 ---------------------------------
| magic_no = 0x25874452 |
---------------------------------
| nmagic_no = 0x52784425 |
---------------------------------
| version |
---------------------------------
| user_version |
---------------------------------
| log_id |
---------------------------------
| header_size |
---------------------------------
| |
| |
| name [20 chars] |
| |
| |
---------------------------------
| run-time data structures |
---------------------------------
Figure 1 - Log Context Structure
31 0
0 ---------------------------------
| magic_no = 0x52784425 |
---------------------------------
| nmagic_no = 0xAD87BBDA |
---------------------------------
|1| page_num |
---------------------------------
| read_offset | write_offset |
---------------------------------
| log_id |
---------------------------------
| start_time low word |
| start_time high word |
---------------------------------
| end_time low word |
| end_time high word |
---------------------------------
| context offset |
---------------------------------
| run-time data structures |
. . . . .
---------------------------------
| |
| Log Data |
. . .
. . .
| |
--------------------------------- PAGE_SIZE - 1
Figure 2 - Log Page Structure
In addition to extracting logs at runtime through DebugFS, IPC Logging has been
designed to allow extraction of logs from a memory dump. The magic numbers,
timestamps, and context offset are all added to support the memory-dump
extraction use case.
Design
======
Alternate solutions discussed include using kernel & SMEM logs which are
limited in size and hence using them render them unusable by other drivers.
Also kernel logging into serial console is slowing down the performance of
the drivers by multiple times and sometimes lead to APPs watchdog bite.
Power Management
================
Not-Applicable
SMP/multi-core
==============
This module uses spinlocks & mutexes to handle multi-core safety.
Security
========
Not-Applicable
Performance
===========
This logging mechanism, based on experimental data, is not expected to
cause a significant performance degradation. Under worst case, it can
cause 1 - 2 percent degradation in the throughput of the IPC Drivers.
Interface
=========
Exported Data Structures
------------------------
struct encode_context {
struct tsv_header hdr;
char buff[MAX_MSG_SIZE];
int offset;
};
struct decode_context {
int output_format;
char *buff;
int size;
};
Kernel-Space Interface APIs
----------------------------
/*
* ipc_log_context_create: Create a ipc log context
*
* @max_num_pages: Number of pages of logging space required (max. 10)
* @mod_name : Name of the directory entry under DEBUGFS
* @user_version : Version number of user-defined message formats
*
* returns reference to context on success, NULL on failure
*/
void *ipc_log_context_create(int max_num_pages, const char *mod_name,
uint16_t user_version);
/*
* msg_encode_start: Start encoding a log message
*
* @ectxt: Temporary storage to hold the encoded message
* @type: Root event type defined by the module which is logging
*/
void msg_encode_start(struct encode_context *ectxt, uint32_t type);
/*
* msg_encode_end: Complete the message encode process
*
* @ectxt: Temporary storage which holds the encoded message
*/
void msg_encode_end(struct encode_context *ectxt);
/*
* tsv_timestamp_write: Writes the current timestamp count
*
* @ectxt: Context initialized by calling msg_encode_start()
*
* Returns 0 on success, -ve error code on failure
*/
int tsv_timestamp_write(struct encode_context *ectxt);
/*
* tsv_pointer_write: Writes a data pointer
*
* @ectxt: Context initialized by calling msg_encode_start()
* @pointer: Pointer value to write
*
* Returns 0 on success, -ve error code on failure
*/
int tsv_pointer_write(struct encode_context *ectxt, void *pointer);
/*
* tsv_int32_write: Writes a 32-bit integer value
*
* @ectxt: Context initialized by calling msg_encode_start()
* @n: Integer to write
*
* Returns 0 on success, -ve error code on failure
*/
int tsv_int32_write(struct encode_context *ectxt, int32_t n);
/*
* tsv_byte_array_write: Writes a byte array
*
* @ectxt: Context initialized by calling msg_encode_start()
* @data: Location of data
* @data_size: Size of data to be written
*
* Returns 0 on success, -ve error code on failure
*/
int tsv_byte_array_write(struct encode_context *ectxt,
void *data, int data_size);
/*
* ipc_log_write: Write the encoded message into the log space
*
* @ctxt: IPC log context where the message has to be logged into
* @ectxt: Temporary storage containing the encoded message
*/
void ipc_log_write(unsigned long ctxt, struct encode_context *ectxt);
/*
* ipc_log_string: Helper function to log a string
*
* @dlctxt: IPC Log Context created using ipc_log_context_create()
* @fmt: Data specified using format specifiers
*/
int ipc_log_string(unsigned long dlctxt, const char *fmt, ...);
/*
* tsv_timestamp_read: Reads a timestamp
*
* @ectxt: Context retrieved by reading from log space
* @dctxt: Temporary storage to hold the decoded message
* @format: Output format while dumping through DEBUGFS
*/
void tsv_timestamp_read(struct encode_context *ectxt,
struct decode_context *dctxt, const char *format);
/*
* tsv_pointer_read: Reads a data pointer
*
* @ectxt: Context retrieved by reading from log space
* @dctxt: Temporary storage to hold the decoded message
* @format: Output format while dumping through DEBUGFS
*/
void tsv_pointer_read(struct encode_context *ectxt,
struct decode_context *dctxt, const char *format);
/*
* tsv_int32_read: Reads a 32-bit integer value
*
* @ectxt: Context retrieved by reading from log space
* @dctxt: Temporary storage to hold the decoded message
* @format: Output format while dumping through DEBUGFS
*/
void tsv_int32_read(struct encode_context *ectxt,
struct decode_context *dctxt, const char *format);
/*
* tsv_byte_array_read: Reads a byte array/string
*
* @ectxt: Context retrieved by reading from log space
* @dctxt: Temporary storage to hold the decoded message
* @format: Output format while dumping through DEBUGFS
*/
void tsv_byte_array_read(struct encode_context *ectxt,
struct decode_context *dctxt, const char *format);
/*
* add_deserialization_func: Register a deserialization function to
* to unpack the subevents of a main event
*
* @ctxt: IPC log context to which the deserialization function has
* to be registered
* @type: Main/Root event, defined by the module which is logging, to
* which this deserialization function has to be registered.
* @dfune: Deserialization function to be registered
*
* return 0 on success, -ve value on FAILURE
*/
int add_deserialization_func(unsigned long ctxt, int type,
void (*dfunc)(struct encode_context *,
struct decode_context *));
Driver parameters
=================
Not-Applicable
Config options
==============
Not-Applicable
Dependencies
============
This module will partially depend on CONFIG_DEBUGFS, in order to dump the
logs through debugfs. If CONFIG_DEBUGFS is disabled, the above mentioned
helper functions will perform no operation and return appropriate error
code if the return value is non void. Under such circumstances the logs can
only be extracted through the memory dump.
User space utilities
====================
DEBUGFS
Other
=====
Not-Applicable
Known issues
============
None
To do
=====
None

View File

@@ -0,0 +1,468 @@
Introduction
============
The goal of this debug feature is to provide a reliable, responsive,
accurate and secure debug capability to developers interested in
debugging MSM subsystem processor images without the use of a hardware
debugger.
The Debug Agent along with the Remote Debug Driver implements a shared
memory based transport mechanism that allows for a debugger (ex. GDB)
running on a host PC to communicate with a remote stub running on
peripheral subsystems such as the ADSP, MODEM etc.
The diagram below depicts end to end the components involved to
support remote debugging:
: :
: HOST (PC) : MSM
: ,--------, : ,-------,
: | | : | Debug | ,--------,
: |Debugger|<--:-->| Agent | | Remote |
: | | : | App | +----->| Debug |
: `--------` : |-------| ,--------, | | Stub |
: : | Remote| | |<---+ `--------`
: : | Debug |<-->|--------|
: : | Driver| | |<---+ ,--------,
: : `-------` `--------` | | Remote |
: : LA Shared +----->| Debug |
: : Memory | Stub |
: : `--------`
: : Peripheral Subsystems
: : (ADSP, MODEM, ...)
Debugger: Debugger application running on the host PC that
communicates with the remote stub.
Examples: GDB, LLDB
Debug Agent: Software that runs on the Linux Android platform
that provides connectivity from the MSM to the
host PC. This involves two portions:
1) User mode Debug Agent application that discovers
processes running on the subsystems and creates
TCP/IP sockets for the host to connect to. In addition
to this, it creates an info port that
users can connect to discover the various
processes and their corresponding debug ports.
Remote Debug A character based driver that the Debug
Driver: Agent uses to transport the payload received from the
host to the debug stub running on the subsystem
processor over shared memory and vice versa.
Shared Memory: Shared memory from the SMEM pool that is accessible
from the Applications Processor (AP) and the
subsystem processors.
Remote Debug Privileged code that runs in the kernels of the
Stub: subsystem processors that receives debug commands
from the debugger running on the host and
acts on these commands. These commands include reading
and writing to registers and memory belonging to the
subsystem's address space, setting breakpoints,
single stepping etc.
Hardware description
====================
The Remote Debug Driver interfaces with the Remote Debug stubs
running on the subsystem processors and does not drive or
manage any hardware resources.
Software description
====================
The debugger and the remote stubs use Remote Serial Protocol (RSP)
to communicate with each other. This is widely used protocol by both
software and hardware debuggers. RSP is an ASCII based protocol
and used when it is not possible to run GDB server on the target under
debug.
The Debug Agent application along with the Remote Debug Driver
is responsible for establishing a bi-directional connection from
the debugger application running on the host to the remote debug
stub running on a subsystem. The Debug Agent establishes connectivity
to the host PC via TCP/IP sockets.
This feature uses ADB port forwarding to establish connectivity
between the debugger running on the host and the target under debug.
Please note the Debug Agent does not expose HLOS memory to the
remote subsystem processors.
Design
======
Here is the overall flow:
1) When the Debug Agent application starts up, it opens up a shared memory
based transport channel to the various subsystem processor images.
2) The Debug Agent application sends messages across to the remote stubs
to discover the various processes that are running on the subsystem and
creates debug sockets for each of them.
3) Whenever a process running on a subsystem exits, the Debug Agent
is notified by the stub so that the debug port and other resources
can be reclaimed.
4) The Debug Agent uses the services of the Remote Debug Driver to
transport payload from the host debugger to the remote stub and vice versa.
5) Communication between the Remote Debug Driver and the Remote Debug stub
running on the subsystem processor is done over shared memory (see figure).
SMEM services are used to allocate the shared memory that will
be readable and writeable by the AP and the subsystem image under debug.
A separate SMEM allocation takes place for each subsystem processor
involved in remote debugging. The remote stub running on each of the
subsystems allocates a SMEM buffer using a unique identifier so that both
the AP and subsystem get the same physical block of memory. It should be
noted that subsystem images can be restarted at any time.
However, when a subsystem comes back up, its stub uses the same unique
SMEM identifier to allocate the SMEM block. This would not result in a
new allocation rather the same block of memory in the first bootup instance
is provided back to the stub running on the subsystem.
An 8KB chunk of shared memory is allocated and used for communication
per subsystem. For multi-process capable subsystems, 16KB chunk of shared
memory is allocated to allow for simultaneous debugging of more than one
process running on a single subsystem.
The shared memory is used as a circular ring buffer in each direction.
Thus we have a bi-directional shared memory channel between the AP
and a subsystem. We call this SMQ. Each memory channel contains a header,
data and a control mechanism that is used to synchronize read and write
of data between the AP and the remote subsystem.
Overall SMQ memory view:
:
: +------------------------------------------------+
: | SMEM buffer |
: |-----------------------+------------------------|
: |Producer: LA | Producer: Remote |
: |Consumer: Remote | subsystem |
: | subsystem | Consumer: LA |
: | | |
: | Producer| Consumer|
: +-----------------------+------------------------+
: | |
: | |
: | +--------------------------------------+
: | |
: | |
: v v
: +--------------------------------------------------------------+
: | Header | Data | Control |
: +-----------+---+---+---+-----+----+--+--+-----+---+--+--+-----+
: | | b | b | b | | S |n |n | | S |n |n | |
: | Producer | l | l | l | | M |o |o | | M |o |o | |
: | Ver | o | o | o | | Q |d |d | | Q |d |d | |
: |-----------| c | c | c | ... | |e |e | ... | |e |e | ... |
: | | k | k | k | | O | | | | I | | | |
: | Consumer | | | | | u |0 |1 | | n |0 |1 | |
: | Ver | 0 | 1 | 2 | | t | | | | | | | |
: +-----------+---+---+---+-----+----+--+--+-----+---+--+--+-----+
: | |
: + |
: |
: +------------------------+
: |
: v
: +----+----+----+----+
: | SMQ Nodes |
: |----|----|----|----|
: Node # | 0 | 1 | 2 | ...|
: |----|----|----|----|
: Starting Block Index # | 0 | 3 | 8 | ...|
: |----|----|----|----|
: # of blocks | 3 | 5 | 1 | ...|
: +----+----+----+----+
:
Header: Contains version numbers for software compatibility to ensure
that both producers and consumers on the AP and subsystems know how to
read from and write to the queue.
Both the producer and consumer versions are 1.
: +---------+-------------------+
: | Size | Field |
: +---------+-------------------+
: | 1 byte | Producer Version |
: +---------+-------------------+
: | 1 byte | Consumer Version |
: +---------+-------------------+
Data: The data portion contains multiple blocks [0..N] of a fixed size.
The block size SM_BLOCKSIZE is fixed to 128 bytes for header version #1.
Payload sent from the debug agent app is split (if necessary) and placed
in these blocks. The first data block is placed at the next 8 byte aligned
address after the header.
The number of blocks for a given SMEM allocation is derived as follows:
Number of Blocks = ((Total Size - Alignment - Size of Header
- Size of SMQIn - Size of SMQOut)/(SM_BLOCKSIZE))
The producer maintains a private block map of each of these blocks to
determine which of these blocks in the queue is available and which are free.
Control:
The control portion contains a list of nodes [0..N] where N is number
of available data blocks. Each node identifies the data
block indexes that contain a particular debug message to be transferred,
and the number of blocks it took to hold the contents of the message.
Each node has the following structure:
: +---------+-------------------+
: | Size | Field |
: +---------+-------------------+
: | 2 bytes |Staring Block Index|
: +---------+-------------------+
: | 2 bytes |Number of Blocks |
: +---------+-------------------+
The producer and the consumer update different parts of the control channel
(SMQOut / SMQIn) respectively. Each of these control data structures contains
information about the last node that was written / read, and the actual nodes
that were written/read.
SMQOut Structure (R/W by producer, R by consumer):
: +---------+-------------------+
: | Size | Field |
: +---------+-------------------+
: | 4 bytes | Magic Init Number |
: +---------+-------------------+
: | 4 bytes | Reset |
: +---------+-------------------+
: | 4 bytes | Last Sent Index |
: +---------+-------------------+
: | 4 bytes | Index Free Read |
: +---------+-------------------+
SMQIn Structure (R/W by consumer, R by producer):
: +---------+-------------------+
: | Size | Field |
: +---------+-------------------+
: | 4 bytes | Magic Init Number |
: +---------+-------------------+
: | 4 bytes | Reset ACK |
: +---------+-------------------+
: | 4 bytes | Last Read Index |
: +---------+-------------------+
: | 4 bytes | Index Free Write |
: +---------+-------------------+
Magic Init Number:
Both SMQ Out and SMQ In initialize this field with a predefined magic
number so as to make sure that both the consumer and producer blocks
have fully initialized and have valid data in the shared memory control area.
Producer Magic #: 0xFF00FF01
Consumer Magic #: 0xFF00FF02
SMQ Out's Last Sent Index and Index Free Read:
Only a producer can write to these indexes and they are updated whenever
there is new payload to be inserted into the SMQ in order to be sent to a
consumer.
The number of blocks required for the SMQ allocation is determined as:
(payload size + SM_BLOCKSIZE - 1) / SM_BLOCKSIZE
The private block map is searched for a large enough continuous set of blocks
and the user data is copied into the data blocks.
The starting index of the free block(s) is updated in the SMQOut's Last Sent
Index. This update keeps track of which index was last written to and the
producer uses it to determine where the next allocation could be done.
Every allocation, a producer updates the Index Free Read from its
collaborating consumer's Index Free Write field (if they are unequal).
This index value indicates that the consumer has read all blocks associated
with allocation on the SMQ and that the producer can reuse these blocks for
subsquent allocations since this is a circular queue.
At cold boot and restart, these indexes are initialized to zero and all
blocks are marked as available for allocation.
SMQ In's Last Read Index and Index Free Write:
These indexes are written to only by a consumer and are updated whenever
there is new payload to be read from the SMQ. The Last Read Index keeps
track of which index was last read by the consumer and using this, it
determines where the next read should be done.
After completing a read, Last Read Index is incremented to the
next block index. A consumer updates Index Free Write to the starting
index of an allocation whenever it has completed processing the blocks.
This is an optimization that can be used to prevent an additional copy
of data from the queue into a client's data buffer and the data in the queue
itself can be used.
Once Index Free Write is updated, the collaborating producer (on the next
data allocation) reads the updated Index Free Write value and it then
updates its corresponding SMQ Out's Index Free Read and marks the blocks
associated with that index as available for allocation. At cold boot and
restart, these indexes are initialized to zero.
SMQ Out Reset# and SMQ In Reset ACK #:
Since subsystems can restart at anytime, the data blocks and control channel
can be in an inconsistent state when a producer or consumer comes up.
We use Reset and Reset ACK to manage this. At cold boot, the producer
initializes the Reset# to a known number ex. 1. Every other reset that the
producer undergoes, the Reset#1 is simply incremented by 1. All the producer
indexes are reset.
When the producer notifies the consumer of data availability, the consumer
reads the producers Reset # and copies that into its SMQ In Reset ACK#
field when they differ. When that occurs, the consumer resets its
indexes to 0.
6) Asynchronous notifications between a producer and consumer are
done using the SMP2P service which is interrupt based.
Power Management
================
None
SMP/multi-core
==============
The driver uses completion to wake up the Debug Agent client threads.
Security
========
From the perspective of the subsystem, the AP is untrusted. The remote
stubs consult the secure debug fuses to determine whether or not the
remote debugging will be enabled at the subsystem.
If the hardware debug fuses indicate that debugging is disabled, the
remote stubs will not be functional on the subsystem. Writes to the
queue will only be done if the driver sees that the remote stub has been
initialized on the subsystem.
Therefore even if any untrusted software running on the AP requests
the services of the Remote Debug Driver and inject RSP messages
into the shared memory buffer, these RSP messages will be discarded and
an appropriate error code will be sent up to the invoking application.
Performance
===========
During operation, the Remote Debug Driver copies RSP messages
asynchronously sent from the host debugger to the remote stub and vice
versa. The debug messages are ASCII based and relatively short
(<25 bytes) and may once in a while go up to a maximum 700 bytes
depending on the command the user requested. Thus we do not
anticipate any major performance impact. Moreover, in a typical
functional debug scenario performance should not be a concern.
Interface
=========
The Remote Debug Driver is a character based device that manages
a piece of shared memory that is used as a bi-directional
single producer/consumer circular queue using a next fit allocator.
Every subsystem, has its own shared memory buffer that is managed
like a separate device.
The driver distinguishes each subsystem processor's buffer by
registering a node with a different minor number.
For each subsystem that is supported, the driver exposes a user space
interface through the following node:
- /dev/rdbg-<subsystem>
Ex. /dev/rdbg-adsp (for the ADSP subsystem)
The standard open(), close(), read() and write() API set is
implemented.
The open() syscall will fail if a subsystem is not present or supported
by the driver or a shared memory buffer cannot be allocated for the
AP - subsystem communication. It will also fail if the subsytem has
not initialized the queue on its side. Here are the error codes returned
in case a call to open() fails:
ENODEV - memory was not yet allocated for the device
EEXIST - device is already opened
ENOMEM - SMEM allocation failed
ECOMM - Subsytem queue is not yet setup
ENOMEM - Failure to initialize SMQ
read() is a blocking call that will return with the number of bytes written
by the subsystem whenever the subsystem sends it some payload. Here are the
error codes returned in case a call to read() fails:
EINVAL - Invalid input
ENODEV - Device has not been opened yet
ERESTARTSYS - call to wait_for_completion_interruptible is interrupted
ENODATA - call to smq_receive failed
write() attempts to send user mode payload out to the subsystem. It can fail
if the SMQ is full. The number of bytes written is returned back to the user.
Here are the error codes returned in case a call to write() fails:
EINVAL - Invalid input
ECOMM - SMQ send failed
In the close() syscall, the control information state of the SMQ is
initialized to zero thereby preventing any further communication between
the AP and the subsystem. Here is the error code returned in case
a call to close() fails:
ENODEV - device wasn't opened/initialized
The Remote Debug driver uses SMP2P for bi-directional AP to subsystem
notification. Notifications are sent to indicate that there are new
debug messages available for processing. Each subsystem that is
supported will need to add a device tree entry per the usage
specification of SMP2P driver.
In case the remote stub becomes non operational or the security configuration
on the subsystem does not permit debugging, any messages put in the SMQ will
not be responded to. It is the responsibility of the Debug Agent app and the
host debugger application such as GDB to timeout and notify the user of the
non availability of remote debugging.
Driver parameters
=================
None
Config options
==============
The driver is configured with a device tree entry to map an SMP2P entry
to the device. The SMP2P entry name used is "rdbg". Please see
kernel\Documentation\arm\msm\msm_smp2p.txt for information about the
device tree entry required to configure SMP2P.
The driver uses the SMEM allocation type SMEM_LC_DEBUGGER to allocate memory
for the queue that is used to share data with the subsystems.
Dependencies
============
The Debug Agent driver requires services of SMEM to
allocate shared memory buffers.
SMP2P is used as a bi-directional notification
mechanism between the AP and a subsystem processor.
User space utilities
====================
This driver is meant to be used in conjunction with the user mode
Remote Debug Agent application.
Other
=====
None
Known issues
============
For targets with an external subsystem, we cannot use
shared memory for communication and would have to use the prevailing
transport mechanisms that exists between the AP and the external subsystem.
This driver cannot be leveraged for such targets.
To do
=====
None

View File

@@ -33,3 +33,5 @@ source "Documentation/Kconfig"
# ANDROID: Set KCONFIG_EXT_PREFIX to decend into an external project.
source "$(KCONFIG_EXT_PREFIX)Kconfig.ext"
source "kernel/sched/walt/Kconfig"

View File

@@ -1173,6 +1173,61 @@ endif
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)include/uapi
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)arch/$(SRCARCH)/include/uapi
# ---------------------------------------------------------------------------
# Devicetree files
ifeq ($(KBUILD_EXTMOD),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
dtstree := arch/$(SRCARCH)/boot/dts
endif
else # KBUILD_EXTMOD
# Devicetree source should live in $(KBUILD_EXTMOD)/arch/$(SRCARCH)/boot/dts/
# But it may live inside some other folder relative to KBUILD_EXTMOD, as specified
# by KBUILD_EXTMOD_DTS
KBUILD_EXTMOD_DTS = arch/$(SRCARCH)/boot/dts
ifneq ($(wildcard $(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)/ $(srctree)/$(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)/),)
dtstree := $(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)
endif
endif
ifneq ($(dtstree),)
%.dtb: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
PHONY += dtbs dtbs_install dtbs_check
dtbs: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree)
ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
export CHECK_DTBS=y
dtbs: dt_binding_check
endif
dtbs_check: dtbs
dtbs_install:
$(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH)
ifdef CONFIG_OF_EARLY_FLATTREE
all: dtbs
endif
endif
PHONY += scripts_dtc
scripts_dtc: scripts_basic
$(Q)$(MAKE) $(build)=scripts/dtc
ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
export CHECK_DT_BINDING=y
endif
PHONY += dt_binding_check
dt_binding_check: scripts_dtc
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
ifeq ($(KBUILD_EXTMOD),)
build-dir := .
@@ -1242,6 +1297,8 @@ endif
# make sure no implicit rule kicks in
$(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ;
-include $(srctree)/scripts/sec_env.mk
ifeq ($(origin KERNELRELEASE),file)
filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree)
else
@@ -1549,6 +1606,9 @@ vmlinuxclean:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
$(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean)
legoclean:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/lego/kclean.sh $(srctree)/.legofile
clean: archclean vmlinuxclean resolve_btfids_clean
# mrproper - Delete all generated files, including .config

23
allyes_images.bzl Normal file
View File

@@ -0,0 +1,23 @@
load(":avb_boot_img.bzl", "avb_sign_boot_image")
def gen_allyes_files(le_target, target):
""""Build empty vendor_boot/init_boot/ for allyes config."""
rule_name = "{}_dummy_files".format(target)
native.genrule(
name = rule_name,
srcs = [],
outs = ["{}_vendor_boot.img".format(target), "{}_init_boot.img".format(target)],
cmd = """touch $(OUTS)
echo 'empty_file' | tee $(OUTS)""",
)
avb_sign_boot_image(
name = "{}_avb_sign_boot_image".format(target),
artifacts = "{}_images".format(target),
avbtool = "//prebuilts/kernel-build-tools:linux-x86/bin/avbtool",
key = "//tools/mkbootimg:gki/testdata/testkey_rsa4096.pem",
props = [
"com.android.build.boot.os_version:13",
"com.android.build.boot.security_patch:2023-05-05",
],
boot_partition_size = 0x6000000,
)

2
android/ACK_SHA Normal file
View File

@@ -0,0 +1,2 @@
94c1a24cabd5dc987132f98c4d7a7a32f2a38fef
android15-6.6-2024-08_r5

0
android/abi_gki_aarch64.stg Normal file → Executable file
View File

View File

@@ -2386,3 +2386,5 @@ endmenu # "CPU Power Management"
source "drivers/acpi/Kconfig"
source "arch/arm64/kvm/Kconfig"
source "arch/arm64/gunyah/Kconfig"

View File

@@ -251,6 +251,87 @@ config ARCH_QCOM
help
This enables support for the ARMv8 based Qualcomm chipsets.
config ARCH_QTI_VM
bool "Enable Virtual Machines Support for Qualcomm Technologies, Inc."
depends on ARCH_QCOM
help
This enables support for the Qualcomm Technologies, Inc.'s
Virtual Machines. If you wish to build a kernel that doesn't
require VM support or if you are unsure,
say 'N' here.
config ARCH_SDXKOVA
bool "Enable support for Qualcomm Technologies, Inc. SDXKOVA"
depends on ARCH_QCOM
help
This enables support for Qualcomm Technologies, Inc.
SDXKOVA chipset. Say 'Y' for SDXPINN chipset. If you do not
wish to build a kernel that runs on this chipset or if you
are unsure, say 'N' here.
config ARCH_SUN
bool "Enable support for Qualcomm Technologies, Inc. Sun"
depends on ARCH_QCOM
help
This enables support for Qualcomm Technologies, Inc. Sun
chipset. If you do not wish to build a kernel that runs on this
chipset or if you are unsure, say 'N' here.
config ARCH_TUNA
bool "Enable support for Qualcomm Technologies, Inc. Tuna"
depends on ARCH_QCOM
help
This enables support for Qualcomm Technologies, Inc. Tuna
chipset. If you do not wish to build a kernel that runs on this
chipset or if you are unsure, say 'N' here.
config ARCH_KERA
bool "Enable support for Qualcomm Technologies, Inc. Kera"
depends on ARCH_QCOM
help
This enables support for Qualcomm Technologies, Inc. Kera
chipset. If you do not wish to build a kernel that runs on this
chipset or if you are unsure, say 'N' here.
config ARCH_PINEAPPLE
bool "Enable support for Qualcomm Technologies, Inc. Pineapple"
depends on ARCH_QCOM
help
This enables support for Qualcomm Technologies, Inc. Pineapple
chipset. If you do not wish to build a kernel that runs on this
chipset or if you are unsure, say 'N' here.
config ARCH_X1E80100
bool "Enable Support for Qualcomm Technologies, Inc. X1E80100"
depends on ARCH_QCOM
help
This enables support for the Qualcomm Technologies, Inc.'s
X1E80100 chipset. If you do not wish to build a kernel that
runs on this chipset or if you are unsure, say 'N' here.
config ARCH_PARROT
bool "Enable Support for Qualcomm Technologies, Inc. PARROT"
depends on ARCH_QCOM
help
This enables support for the Qualcomm Technologies, Inc.'s
PARROT chipset. If you do not wish to build a kernel that
runs on this chipset or if you are unsure, say 'N' here.
config ARCH_RAVELIN
bool "Enable Support for Qualcomm Technologies, Inc. RAVELIN"
depends on ARCH_QCOM
help
This enables support for the Qualcomm Technologies, Inc.'s
RAVELIN chipset. If you do not wish to build a kernel that
config ARCH_MONACO
bool "Enable Support for Qualcomm Technologies, Inc. MONACO"
depends on ARCH_QCOM
help
This enables support for the Qualcomm Technologies, Inc.'s
MONACO chipset. If you do not wish to build a kernel that
runs on this chipset or if you are unsure, say 'N' here.
config ARCH_REALTEK
bool "Realtek Platforms"
select RESET_CONTROLLER

View File

@@ -33,3 +33,10 @@ subdir-y += tesla
subdir-y += ti
subdir-y += toshiba
subdir-y += xilinx
subdir-y += samsung
dtstree := $(srctree)/$(src)
vendor := $(dtstree)/vendor
ifneq "$(wildcard $(vendor)/Makefile)" ""
subdir-y += vendor
endif

View File

@@ -0,0 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
# COPYRIGHT(C) 2024 Samsung Electronics Co., Ltd. All Right Reserved.
subdir-y += pa

View File

@@ -0,0 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
# COPYRIGHT(C) 2024 Samsung Electronics Co., Ltd. All Right Reserved.
subdir-y += pa3q

View File

@@ -0,0 +1,15 @@
dtb-y += pa3q_eur_openx_w00_r11.dtbo
dtb-y += pa3q_eur_openx_w00_r10.dtbo
dtb-y += pa3q_eur_openx_w00_r08.dtbo
dtb-y += pa3q_eur_openx_w00_r05.dtbo
dtb-y += pa3q_eur_openx_w00_r04.dtbo
dtb-y += pa3q_eur_openx_w00_r03.dtbo
dtb-y += pa3q_eur_openx_w00_r02.dtbo
dtb-y += pa3q_eur_openx_w00_r01.dtbo
# SPDX-License-Identifier: GPL-2.0
# COPYRIGHT(C) 2023 Samsung Electronics Co., Ltd. All Right Reserved.
# TODL: remove the below sub-makefile after lego is enabled.
# ne3q_dir := $(srctree)/$(src)
# include $(ne3q_dir)/without_lego.mk

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
arch/arm64/boot/dts/vendor Symbolic link
View File

@@ -0,0 +1 @@
../../../../../qcom/opensource/devicetree

View File

@@ -4,10 +4,6 @@
# CONFIG_BITS_TEST is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
CONFIG_CMDLINE="console=ttyMSM0,115200n8 kasan.stacktrace=off stack_depot_disable=off page_owner=on no_hash_pointers panic_on_taint=0x20"
# DDAR KeyManagement Test for MDFPP evaluation
CONFIG_DDAR_KEY_DUMP=y
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_DEBUG_IRQFLAGS=y
CONFIG_DEBUG_KMEMLEAK=y

View File

@@ -0,0 +1,170 @@
CONFIG_AUDIT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_PSI=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
# CONFIG_PID_NS is not set
CONFIG_BOOT_CONFIG=y
# CONFIG_EFIVAR_FS is not set
# CONFIG_COMPAT_BRK is not set
CONFIG_DEVTMPFS=y
# CONFIG_SLAB_MERGE_DEFAULT is not set
CONFIG_SLAB_FREELIST_RANDOM=y
CONFIG_SLAB_FREELIST_HARDENED=y
CONFIG_PROFILING=y
CONFIG_ARCH_QCOM=y
CONFIG_RANDOMIZE_BASE=y
# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off cgroup_disable=pressure"
CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=0
CONFIG_PM_DEVFREQ=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_SIG=y
CONFIG_BLK_INLINE_ENCRYPTION=y
CONFIG_IOSCHED_BFQ=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
CONFIG_CMA=y
CONFIG_CMA_AREAS=16
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_RAW=y
CONFIG_IP_NF_SECURITY=y
CONFIG_BRIDGE=y
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_TBF=y
CONFIG_RFKILL=y
CONFIG_PCI=y
# CONFIG_FW_CACHE is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
CONFIG_NETDEVICES=y
CONFIG_TUN=y
CONFIG_PPP=y
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXAR is not set
CONFIG_SERIAL_8250_DW=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_SPRD=y
CONFIG_SERIAL_SPRD_CONSOLE=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_HW_RANDOM=y
# CONFIG_DEVMEM is not set
# CONFIG_DEVPORT is not set
CONFIG_SPI=y
CONFIG_SPMI=y
# CONFIG_SPMI_MSM_PMIC_ARB is not set
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=100
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_HID_CHICONY=y
CONFIG_USB=y
CONFIG_USB_AUTOSUSPEND_DELAY=2
CONFIG_USB_DEFAULT_PERSIST=y
CONFIG_USB_HID=y
CONFIG_USB_NET_DRIVERS=y
CONFIG_USB_OTG=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_USB_ACM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y
CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_USB_CONFIGFS=y
CONFIG_ANDROID_USB_CONFIGFS_UEVENT=y
CONFIG_USB_CONFIGFS_SERIAL=y
CONFIG_USB_CONFIGFS_NCM=y
CONFIG_USB_CONFIGFS_ECM=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_CONFIGFS_EEM=y
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
CONFIG_USB_CONFIGFS_F_FS=y
CONFIG_USB_CONFIGFS_F_HID=y
CONFIG_TYPEC=y
CONFIG_TYPEC_UCSI=y
CONFIG_MMC=y
# CONFIG_PWRSEQ_EMMC is not set
# CONFIG_PWRSEQ_SIMPLE is not set
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_RTC_CLASS=y
CONFIG_UIO=y
CONFIG_STAGING=y
CONFIG_HWSPINLOCK=y
CONFIG_MAILBOX=y
CONFIG_REMOTEPROC=y
CONFIG_REMOTEPROC_CDEV=y
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
CONFIG_DEVFREQ_GOV_USERSPACE=y
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
CONFIG_IIO_TRIGGER=y
CONFIG_PWM=y
CONFIG_INTERCONNECT=y
# CONFIG_DNOTIFY is not set
CONFIG_OVERLAY_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_HARDENED_USERCOPY=y
CONFIG_SECURITY_SELINUX=y
CONFIG_DMA_CMA=y
CONFIG_DMADEVICES=y
CONFIG_PRINTK_TIME=y
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=-1
# CONFIG_RUNTIME_TESTING_MENU is not set
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y

View File

@@ -0,0 +1,144 @@
CONFIG_LOCALVERSION="-mainline"
CONFIG_AUDIT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_SCHED=y
# CONFIG_FAIR_GROUP_SCHED is not set
CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
CONFIG_EXPERT=y
# CONFIG_SYSFS_SYSCALL is not set
# CONFIG_FHANDLE is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_QCOM=y
CONFIG_SCHED_MC=y
CONFIG_NR_CPUS=32
CONFIG_PARAVIRT=y
CONFIG_ARM64_SW_TTBR0_PAN=y
CONFIG_COMPAT=y
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
CONFIG_RANDOMIZE_BASE=y
# CONFIG_EFI is not set
CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=0
# CONFIG_PM_WAKELOCKS_GC is not set
CONFIG_CPU_IDLE=y
CONFIG_ARM_PSCI_CPUIDLE=y
CONFIG_VIRTUALIZATION=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SIG=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_SLAB_MERGE_DEFAULT is not set
CONFIG_SLAB_FREELIST_RANDOM=y
CONFIG_SLAB_FREELIST_HARDENED=y
CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
# CONFIG_COMPAT_BRK is not set
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_CMA=y
CONFIG_CMA_AREAS=16
# CONFIG_ZONE_DMA is not set
# CONFIG_ZONE_DMA32 is not set
CONFIG_NET=y
CONFIG_UNIX=y
CONFIG_NETWORK_SECMARK=y
# CONFIG_WIRELESS is not set
# CONFIG_ETHTOOL_NETLINK is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
# CONFIG_QCOM_EBI2 is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_VIRTIO_BLK=y
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
CONFIG_DM_SNAPSHOT=y
CONFIG_DM_UEVENT=y
CONFIG_DM_VERITY=y
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
CONFIG_DM_VERITY_FEC=y
CONFIG_NETDEVICES=y
# CONFIG_NET_CORE is not set
# CONFIG_ETHERNET is not set
# CONFIG_WLAN is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_DEVMEM is not set
CONFIG_I2C=y
# CONFIG_I2C_COMPAT is not set
# CONFIG_I2C_HELPER_AUTO is not set
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PL031=y
CONFIG_DMADEVICES=y
CONFIG_DMABUF_HEAPS=y
CONFIG_UIO=y
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_MMIO_SWIOTLB=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_DNOTIFY is not set
CONFIG_QUOTA=y
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_HARDENED_USERCOPY=y
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf"
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_CRYPTO_CRC32=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_SWIOTLB_NONLINEAR=y
CONFIG_DMA_CMA=y
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
CONFIG_DEBUG_INFO_DWARF5=y
CONFIG_HEADERS_INSTALL=y
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=-1
CONFIG_SOFTLOCKUP_DETECTOR=y
# CONFIG_DETECT_HUNG_TASK is not set
# CONFIG_FTRACE is not set
# CONFIG_RUNTIME_TESTING_MENU is not set

View File

@@ -504,7 +504,6 @@ CONFIG_HID_PLANTRONICS=y
CONFIG_HID_PLAYSTATION=y
CONFIG_PLAYSTATION_FF=y
CONFIG_HID_ROCCAT=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_SONY_FF=y
CONFIG_HID_STEAM=y
@@ -512,8 +511,6 @@ CONFIG_HID_WACOM=y
CONFIG_HID_WIIMOTE=y
CONFIG_HID_KUNIT_TEST=m
CONFIG_USB_HIDDEV=y
CONFIG_USB_HOST_SAMSUNG_FEATURE=y
CONFIG_USB_DEBUG_DETAILED_LOG=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_OTG=y
CONFIG_USB_MON=m
@@ -587,7 +584,6 @@ CONFIG_VIRTIO_BALLOON=m
CONFIG_VHOST_VSOCK=y
CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_SAMSUNG_FREECESS=y
CONFIG_COMMON_CLK_SCPI=y
# CONFIG_SUNXI_CCU is not set
CONFIG_CLK_KUNIT_TEST=m

View File

@@ -0,0 +1,178 @@
CONFIG_SEC_PANEL_NOTIFIER_V2=m
CONFIG_DRV_SAMSUNG_PMIC=m
CONFIG_REGULATOR_DIO8018=m
CONFIG_USB_VENDOR_HOOK_RECEIVER=m
CONFIG_PRESSURE_FACTORY=y
CONFIG_FLIP_COVER_DETECTOR_FACTORY=y
CONFIG_BACKTAP_FACTORY=y
CONFIG_LIGHT_FACTORY=y
CONFIG_PROX_FACTORY=y
CONFIG_SUPPORT_BRIGHTNESS_NOTIFY_FOR_LIGHT_SENSOR=y
CONFIG_SUPPORT_DDI_COPR_FOR_LIGHT_SENSOR=y
CONFIG_SUPPORT_LIGHT_CALIBRATION=y
CONFIG_SUPPORT_PANEL_STATE_NOTIFY_FOR_LIGHT_SENSOR=y
CONFIG_SUPPORT_PROX_CALIBRATION=y
CONFIG_SEC_SENSORS_RECOVERY=y
CONFIG_LSM6DSV_FACTORY=y
CONFIG_INPUT_SEC_INPUT=m
CONFIG_INPUT_SEC_NOTIFIER=m
CONFIG_SEC_DEBUG_TSP_LOG=m
CONFIG_TOUCHSCREEN_DUMP_MODE=m
CONFIG_SEC_INPUT_HEADER=y
CONFIG_INPUT_SEC_SECURE_TOUCH=m
CONFIG_INPUT_SEC_TRUSTED_TOUCH=m
CONFIG_INPUT_TOUCHSCREEN_TCLMV2=m
# CONFIG_SEC_INPUT_MULTI_DEVICE is not set
CONFIG_SEC_INPUT_RAWDATA=m
CONFIG_VIBRATOR_VIB_INFO=m
CONFIG_SEC_UWB_LOGGER=y
CONFIG_SEC_NFC_LOGGER=y
CONFIG_SDP=m
CONFIG_DEV_RIL_BRIDGE=m
CONFIG_USB_VENDOR_NOTIFY=y
CONFIG_USB_VENDOR_RECEIVER=m
CONFIG_WIRELESS_CHARGER_CPS4038=m
CONFIG_WIRELESS_AUTH=y
CONFIG_WIRELESS_CHARGER_HIGH_VOLTAGE=y
CONFIG_WIRELESS_TX_MODE=y
CONFIG_WIRELESS_FIRMWARE_UPDATE=y
CONFIG_WIRELESS_IC_PARAM=y
CONFIG_TX_GEAR_PHM_VOUT_CTRL=y
CONFIG_WIRELESS_RX_PHM_CTRL=y
CONFIG_MUIC_NOTIFIER=m
CONFIG_HICCUP_CHARGER=y
CONFIG_MUIC_AFC_RETRY=y
CONFIG_MUIC_HV=y
CONFIG_MUIC_SUPPORT_PDIC=y
CONFIG_MUIC_USE_MODULE_PARAM=y
CONFIG_USE_MUIC=y
CONFIG_NGKSM=m
CONFIG_NGKPAD=m
CONFIG_NGKSM_QCOM=y
CONFIG_SEC_STI=y
CONFIG_USB_NOTIFY_LAYER=m
CONFIG_USB_AUDIO_POWER_SAVING=y
CONFIG_USB_DEBUG_DETAILED_LOG=y
CONFIG_USB_EXTERNAL_NOTIFY=y
CONFIG_USB_HMT_SAMSUNG_INPUT=y
CONFIG_USB_HOST_NOTIFY=y
CONFIG_USB_HOST_SAMSUNG_FEATURE=y
CONFIG_USB_HW_PARAM=y
CONFIG_USB_INTERFACE_LPM_LIST=y
CONFIG_USB_NOTIFY_PROC_LOG=y
CONFIG_USB_USING_ADVANCED_USBLOG=y
CONFIG_CIRRUS_FIRMWARE_CL_DSP=m
CONFIG_KPERFMON=y
CONFIG_KPERFMON_BUILD=m
CONFIG_ANDROID_SWITCH=m
# CONFIG_ANDROID_SWITCH_GPIO is not set
CONFIG_HDM=m
CONFIG_HDM_QCOM=y
CONFIG_SEC_VIBRATOR_INPUTFF=m
CONFIG_VIB_STORE_LE_PARAM=y
# CONFIG_SEC_VIB_FOLD_MODEL is not set
CONFIG_VBUS_NOTIFIER=m
CONFIG_USB_TYPEC_MANAGER_NOTIFIER=m
CONFIG_IF_CB_MANAGER=m
CONFIG_SBU_SWITCH_CONTROL=y
CONFIG_SENSORS_FINGERPRINT=m
CONFIG_KZT=m
CONFIG_CHARGER_MAX77775=m
CONFIG_SHIPMODE_BY_VBAT=y
CONFIG_SEC_ABC_SPEC_TYPE1=m
CONFIG_SB_CORE=m
CONFIG_SB_PQUEUE=y
CONFIG_SB_NOTIFY=y
CONFIG_SB_SYSFS=y
CONFIG_SB_VOTE=y
CONFIG_PDIC_NOTIFIER=m
CONFIG_PDIC_USE_MODULE_PARAM=y
CONFIG_SEC_ABC=m
CONFIG_SEC_ABC_HUB=m
CONFIG_SEC_ABC_COMMON=m
CONFIG_SEC_ABC_HUB_CORE=m
CONFIG_SEC_ABC_HUB_BOOTC=m
CONFIG_SEC_ABC_MOTTO=m
CONFIG_USB_NOTIFIER=m
CONFIG_I2C_GPIO=m
CONFIG_SEC_ABC_DETECT_CONN=m
CONFIG_SEC_ABC_HUB_COND=m
CONFIG_QCOM_SEC_ABC_DETECT=m
CONFIG_INPUT_CS40L26_I2C=m
CONFIG_SND_SOC_CS40L26=m
CONFIG_CS40L26_SAMSUNG_FEATURE=y
CONFIG_CS40L26_SAMSUNG_USE_DVL=y
CONFIG_CS40L26_SAMSUNG_USE_MAX_DATA_TX_SIZE=y
CONFIG_REGULATOR_S2MPB02=m
CONFIG_SENSORS_FLICKER_SELF_TEST=m
CONFIG_BATTERY_AUTH_SLE956681=m
CONFIG_CHARGER_MAX77968=m
CONFIG_CHARGER_SM5443=m
CONFIG_BATTERY_AUTH_DS28E30=m
CONFIG_REGULATOR_S2DOS07=m
CONFIG_MFD_MAX77775=m
CONFIG_MAX77775_ABC_IFPMIC_EVENT=y
CONFIG_FUELGAUGE_MAX77775=m
CONFIG_UI_SOC_PROLONGING=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_TOUCHSCREEN_SYNAPTICS_S3916T_SPI=m
CONFIG_SENSORS_STK6D2X=m
# CONFIG_FLICKER_PWM_CALIBRATION is not set
CONFIG_REGULATOR_S2MPB03=m
CONFIG_SEC_PM_THERMISTOR=m
CONFIG_SENSORS_QFS4008=m
CONFIG_SENSORS_FINGERPRINT_MODULE=y
CONFIG_FINGERPRINT_SECURE=y
CONFIG_SENSORS_FINGERPRINT_QCOM=y
CONFIG_CCIC_MAX77775=m
CONFIG_MAX77775_CCIC_ALTERNATE_MODE=y
CONFIG_MAX77775_CCOPEN_AFTER_WATERCABLE=y
CONFIG_MAX77775_GET_UNMASK_VBUS_HWPARAM=y
CONFIG_REGULATOR_TPS62864=m
CONFIG_WIRELESS_CHARGER_STWLC89=m
CONFIG_SAMSUNG_NFC=m
CONFIG_NFC_NXP_COMBINED=y
CONFIG_NFC_SN2XX=y
CONFIG_NFC_SN2XX_ESE_SUPPORT=y
CONFIG_MAKE_NODE_USING_PLATFORM_DEVICE=y
# CONFIG_ESE_USE_TZ_API is not set
CONFIG_SEC_NFC_WAKELOCK_METHOD=0
# CONFIG_CLK_ACPM_INIT is not set
CONFIG_SAMSUNG_UWB=m
CONFIG_UWB_SR200=y
CONFIG_UWB_USE_CLK_REQ=y
CONFIG_SENSORS_VL53L8=m
CONFIG_SENSORS_VL53L8_SUPPORT_UAPI=y
CONFIG_SENSORS_VL53L8_QCOM=y
CONFIG_SEPARATE_IO_CORE_POWER=y
CONFIG_SENSORS_VL53L8_SUPPORT_RESUME_WORK=y
CONFIG_SENSORS_LAF_FAILURE_DEBUG=y
CONFIG_SEC_DISPLAYPORT=m
CONFIG_DIRECT_CHARGING=m
CONFIG_MULTI_DIRECT_CHARGER=y
CONFIG_INPUT_HALL_IC=m
CONFIG_HALL_NOTIFIER=m
CONFIG_HALL_LOGICAL=m
# CONFIG_HALL_DUMP_KEY_MODE is not set
CONFIG_INPUT_WACOM_WEZ02=m
CONFIG_INPUT_DIGITAL_HALL_AKM=m
CONFIG_MFD_S2MPB02=m
CONFIG_STAR_K250A_LEGO=m
CONFIG_SEC_SNVM_PLATFORM_DRV=y
# CONFIG_SEC_SNVM_I2C_CLOCK_CONTROL is not set
CONFIG_SEC_SNVM_WAKELOCK_METHOD=2
# CONFIG_STAR_MEMORY_LEAK is not set
CONFIG_HV_MUIC_MAX77775_AFC=y
CONFIG_MUIC_MAX77775=y
CONFIG_BATTERY_SAMSUNG=m
CONFIG_SEC_PD=m
CONFIG_BATTERY_GKI=y
CONFIG_BATTERY_AGE_FORECAST=y
CONFIG_BATTERY_CISD=y
CONFIG_AFC_CHARGER_MODE=y
CONFIG_BATTERY_LOGGING=y
CONFIG_ENABLE_FULL_BY_SOC=y
CONFIG_STEP_CHARGING=y
CONFIG_SUPPORT_HV_CTRL=y
CONFIG_SUPPORT_SHIP_MODE=y

View File

@@ -0,0 +1,109 @@
# Common
CONFIG_I2C_GPIO=m
CONFIG_SOFT_WATCHDOG=m
# SEC_BSP / SEC_DEBUG
CONFIG_SEC_CLASS=m
CONFIG_SEC_PARAM=m
CONFIG_SEC_KEY_NOTIFIER=m
CONFIG_SEC_BLK_HELPER=m
CONFIG_SEC_QC_PARAM=m
CONFIG_SEC_RELOC_GPIO=m
CONFIG_SEC_DEBUG=m
CONFIG_SEC_BOOT_STAT=m
CONFIG_SEC_LOG_BUF=m
CONFIG_SEC_LOG_BUF_USING_TP_CONSOLE=y
CONFIG_SEC_LOG_BUF_USING_VH_LOGBUF=y
CONFIG_SEC_PMSG=m
CONFIG_SEC_REBOOT_CMD=m
CONFIG_SEC_UPLOAD_CAUSE=m
CONFIG_SEC_CRASHKEY=m
CONFIG_SEC_CRASHKEY_LONG=m
CONFIG_SEC_DEBUG_REGION=m
CONFIG_SEC_RDX_BOOTDEV=m
CONFIG_SEC_ARM64_AP_CONTEXT=m
CONFIG_SEC_ARM64_FSIMD_DEBUG=m
CONFIG_SEC_ARM64_DEBUG=m
CONFIG_SEC_QC_DEBUG=m
CONFIG_SEC_QC_RBCMD=m
CONFIG_SEC_QC_DEBUG_PARTITION=m
CONFIG_SEC_QC_QCOM_REBOOT_REASON=m
CONFIG_SEC_QC_UPLOAD_CAUSE=m
CONFIG_SEC_QC_LOGGER=m
CONFIG_SEC_QC_SOC_ID=m
CONFIG_SEC_QC_SUMMARY=m
CONFIG_SEC_QC_USER_RESET=m
CONFIG_SEC_QC_HW_PARAM=m
CONFIG_SEC_QC_RST_EXINFO=m
CONFIG_SEC_QC_QCOM_WDT_CORE=m
CONFIG_SEC_QC_SMEM=m
#Memory
CONFIG_ZRAM_WRITEBACK=y
#USB
CONFIG_I2C_EUSB2_REPEATER=m
CONFIG_USB_PHY_SETTING_QCOM=y
CONFIG_USB_CONFIGFS_F_CONN_GADGET=m
CONFIG_USB_CONFIGFS_F_SS_MON_GADGET=m
CONFIG_USB_CONFIGFS_F_SS_ACM=m
CONFIG_USB_DUN_SUPPORT=y
CONFIG_USB_EHSET_TEST_FIXTURE=m
CONFIG_USB_LINK_LAYER_TEST=m
#UFS
CONFIG_SEC_UFS_FEATURE=y
# Sensors
CONFIG_ADSP_FACTORY=m
CONFIG_SENSORS=m
CONFIG_LSM6DSO_FACTORY=y
CONFIG_AK09918_FACTORY=y
CONFIG_SUPPORT_LIGHT_SEAMLESS=y
CONFIG_SEC_SENSORS_SSC=y
#Audio
CONFIG_SND_SOC_SAMSUNG_AUDIO=m
#Power
CONFIG_PM=y
CONFIG_SEC_PM=y
CONFIG_SEC_AP_PMIC=m
CONFIG_SEC_GPIO_DUMP=y
CONFIG_CPU_FREQ_LIMIT=m
CONFIG_RTC_AUTO_PWRON=m
CONFIG_SEC_PM_LOG=m
CONFIG_SEC_PM_REGULATOR=m
#Block layer
CONFIG_BLK_SEC_COMMON=m
CONFIG_BLK_SEC_STATS=m
CONFIG_BLK_SEC_WB=m
CONFIG_MQ_IOSCHED_SSG=m
CONFIG_MQ_IOSCHED_SSG_CGROUP=m
CONFIG_MQ_IOSCHED_SSG_WB=m
# PCIE
CONFIG_SEC_PCIE=y
CONFIG_SEC_PCIE_AER=y
CONFIG_SEC_PCIE_L1SS=y
CONFIG_SEC_PCIE_SET_EP_STATUS=y
# Network
CONFIG_INET6_AH=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_RPFILTER=y
CONFIG_IPC_LOGGING_CDEV=m
CONFIG_SEC_IPC_TIANTONG=m
# SQT
CONFIG_SCHED_FLEX_BOOT=y
CONFIG_SAMSUNG_PRODUCT_SHIP=y
# CONFIG_SEC_FACTORY is not set
# CONFIG_SEC_FACTORY_INTERPOSER is not set

View File

@@ -0,0 +1,11 @@
# SEC_BSP / SEC_DEBUG
CONFIG_SEC_FORCE_ERR=y
CONFIG_SEC_RELOC_GPIO_EN=y
CONFIG_SEC_QC_SOC_ID_EN=y
CONFIG_USB_PHY_TUNING_QCOM=y
CONFIG_SEC_PCIE_DEV=y
CONFIG_SEC_GPIO_DVS=m
CONFIG_SEC_CDSP_NO_CRASH_FOR_ENG=y
# Battery driver
CONFIG_ENG_BATTERY_CONCEPT=y

View File

@@ -0,0 +1,8 @@
# SEC_BSP / SEC_DEBUG
CONFIG_SEC_FORCE_ERR=y
CONFIG_SEC_RELOC_GPIO_EN=y
CONFIG_SEC_QC_SOC_ID_EN=y
CONFIG_USB_PHY_TUNING_QCOM=y
# Battery driver
CONFIG_ENG_BATTERY_CONCEPT=y

View File

@@ -0,0 +1,11 @@
CONFIG_ATOMIC64_SELFTEST=m
CONFIG_CMA_DEBUG=y
CONFIG_CORESIGHT_SOURCE_ETM4X=m
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
CONFIG_LKDTM=m
CONFIG_LOCK_TORTURE_TEST=m
CONFIG_RCU_TORTURE_TEST=m
CONFIG_SCHED_WALT_DEBUG=m
CONFIG_TEST_USER_COPY=m
CONFIG_TORTURE_TEST=m

View File

@@ -0,0 +1,232 @@
CONFIG_ARCH_MONACO=y
CONFIG_ARM_QCOM_CPUFREQ_HW=m
CONFIG_ARM_QCOM_CPUFREQ_HW_DEBUG=m
# CONFIG_ARM_QCOM_CPUFREQ_NVMEM is not set
CONFIG_ARM_SMMU=m
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
CONFIG_ARM_SMMU_QCOM=m
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_CFG80211=m
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_COMMON_CLK_QCOM=m
CONFIG_CORESIGHT=m
CONFIG_CORESIGHT_CSR=m
CONFIG_CORESIGHT_CTI=m
CONFIG_CORESIGHT_DUMMY=m
CONFIG_CORESIGHT_LINKS_AND_SINKS=m
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=m
CONFIG_CORESIGHT_QMI=m
CONFIG_CORESIGHT_REMOTE_ETM=m
CONFIG_CORESIGHT_STM=m
CONFIG_CORESIGHT_TGU=m
CONFIG_CORESIGHT_TPDA=m
CONFIG_CORESIGHT_TPDM=m
CONFIG_CPU_IDLE_GOV_QCOM_LPM=m
CONFIG_CRYPTO_DEV_QCOM_RNG=m
CONFIG_QTI_THERMALZONE_CONFIG_DEBUG=m
CONFIG_GENERIC_TRACER=y
CONFIG_HWSPINLOCK_QCOM=m
CONFIG_I2C_MSM_GENI=m
CONFIG_INPUT_QCOM_HV_HAPTICS=m
CONFIG_INPUT_QPNP_POWER_ON=m
CONFIG_INTERCONNECT_QCOM_DEBUG=m
CONFIG_INTERCONNECT_QCOM_MONACO=m
CONFIG_INTERCONNECT_QCOM_QOS_RPM=m
CONFIG_INTERCONNECT_QCOM_RPM=m
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_IPC_LOGGING=m
CONFIG_IPC_LOG_MINIDUMP_BUFFERS=0
CONFIG_LOG_CPU_MAX_BUF_SHIFT=17
# CONFIG_MAC80211 is not set
CONFIG_MEM_SHARE_QMI_SERVICE=m
CONFIG_MFD_I2C_PMIC=m
CONFIG_MFD_SPMI_PMIC=m
# CONFIG_MFD_WCD934X is not set
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_CQHCI=m
CONFIG_MMC_CRYPTO_QTI=m
CONFIG_MMC_SDHCI_MSM=m
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_MPM_LEGACY=m
CONFIG_MSM_BOOT_STATS=m
CONFIG_MSM_GPI_DMA=m
CONFIG_MSM_HSUSB_PHY=m
CONFIG_MSM_RDBG=m
CONFIG_MSM_RPM_SMD=m
CONFIG_MSM_SEB=m
CONFIG_MSM_SEB_RPMSG=m
CONFIG_MSM_SLATECOM=m
CONFIG_MSM_SLATECOM_EVENT=m
CONFIG_MSM_SLATECOM_INTERFACE=m
CONFIG_MSM_SLATECOM_RPMSG=m
CONFIG_MSM_SLATERSB=m
CONFIG_MSM_SLATERSB_RPMSG=m
CONFIG_MSM_SYSSTATS=m
CONFIG_MSM_SYSSTATS_STUB_NONEXPORTED_SYMBOLS=y
CONFIG_NL80211_TESTMODE=y
CONFIG_NOP_USB_XCEIV=m
CONFIG_NVMEM_QCOM_QFPROM=m
CONFIG_NVMEM_SPMI_SDAM=m
CONFIG_PHY_QCOM_UFS=m
CONFIG_PINCTRL_MONACO=m
CONFIG_PINCTRL_MSM=m
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
CONFIG_POWER_RESET_QCOM_PON=m
CONFIG_POWER_RESET_QCOM_REBOOT_REASON=m
# CONFIG_PRISM2_USB is not set
# CONFIG_QCOM_ADSP_SLEEPMON is not set
CONFIG_QCOM_AOSS_QMP=m
CONFIG_QCOM_APCS_IPC=m
CONFIG_QCOM_BAM_DMA=m
CONFIG_QCOM_BWMON=m
CONFIG_QCOM_CLK_SMD_RPM=m
CONFIG_QCOM_CPU_PHYS_LOG_MAP=m
CONFIG_QCOM_CPU_VENDOR_HOOKS=m
CONFIG_QCOM_DCC_V2=m
CONFIG_QCOM_DCVS=m
CONFIG_QCOM_DEBUG_SYMBOL=m
CONFIG_QCOM_DMABUF_HEAPS=m
CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT=y
CONFIG_QCOM_DMABUF_HEAPS_CMA=y
CONFIG_QCOM_DMABUF_HEAPS_PAGE_POOL_REFILL=y
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_MOVABLE is not set
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_SECURE=y
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_UNCACHED=y
# CONFIG_QCOM_DMABUF_HEAPS_UBWCP is not set
CONFIG_QCOM_EUD=m
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GDSC_REGULATOR=m
CONFIG_QCOM_GLINK_PKT=m
CONFIG_QCOM_INLINE_CRYPTO_ENGINE=m
CONFIG_QCOM_IOMMU_DEBUG=m
CONFIG_QCOM_IOMMU_UTIL=m
# CONFIG_QCOM_IPA is not set
CONFIG_QCOM_IRQ_STAT=y
CONFIG_QCOM_LAZY_MAPPING=m
CONFIG_QCOM_LOGBUF_BOOTLOG=m
CONFIG_QCOM_MDT_LOADER=m
CONFIG_QCOM_MEMLAT=m
CONFIG_QCOM_MEMORY_DUMP_V2=m
CONFIG_QCOM_MEM_BUF=m
CONFIG_QCOM_MEM_BUF_DEV=m
CONFIG_QCOM_PANEL_EVENT_NOTIFIER=m
CONFIG_QCOM_PANIC_ON_NOTIF_TIMEOUT=y
CONFIG_QCOM_PDR_HELPERS=m
CONFIG_QCOM_PIL_INFO=m
CONFIG_QCOM_PMU_LIB=m
CONFIG_QCOM_POWER_SUPPLY=y
CONFIG_QCOM_Q6V5_COMMON=m
CONFIG_QCOM_Q6V5_PAS=m
CONFIG_QCOM_QMI_HELPERS=m
CONFIG_QCOM_RAMDUMP=m
CONFIG_QCOM_RPROC_COMMON=m
CONFIG_QCOM_RPROC_SLATE=m
CONFIG_QCOM_SCM=m
CONFIG_QCOM_SECURE_BUFFER=m
CONFIG_QCOM_SHOW_RESUME_IRQ=m
# CONFIG_QCOM_SI_CORE is not set
CONFIG_QCOM_SMEM=m
CONFIG_QCOM_SMP2P=m
# CONFIG_QCOM_SMSM is not set
CONFIG_QCOM_SOCINFO=m
CONFIG_QCOM_SOC_WATCHDOG=m
CONFIG_QCOM_SPMI_ADC5_GEN3=m
CONFIG_QCOM_SPMI_TEMP_ALARM=m
CONFIG_QCOM_SYSMON=m
# CONFIG_QCOM_TSENS is not set
CONFIG_QCOM_VADC_COMMON=m
CONFIG_QCOM_WATCHDOG_BARK_TIME=11000
CONFIG_QCOM_WATCHDOG_IPI_PING=y
CONFIG_QCOM_WATCHDOG_PET_TIME=9360
CONFIG_QCOM_WATCHDOG_WAKEUP_ENABLE=y
CONFIG_QCOM_WCD_USBSS_I2C=m
CONFIG_QCOM_WDT_CORE=m
CONFIG_QPNP_SMB5=m
CONFIG_QPNP_SMBLITE=m
CONFIG_QRTR=m
CONFIG_QRTR_SMD=m
CONFIG_QSEECOM_PROXY=m
CONFIG_QSEE_IPC_IRQ_BRIDGE=m
CONFIG_QTEE_SHM_BRIDGE=y
CONFIG_QTI_BCL_OFF_COOLING_DEVICE=m
CONFIG_QTI_BCL_PMIC5=m
CONFIG_QTI_BCL_SOC_DRIVER=m
CONFIG_QTI_CPUFREQ_CDEV=m
CONFIG_QTI_CPU_HOTPLUG_COOLING_DEVICE=m
CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE=m
CONFIG_QTI_DEVFREQ_CDEV=m
CONFIG_QTI_IOMMU_SUPPORT=m
CONFIG_QTI_LMH_CPU_VDD_COOLING_DEVICE=m
CONFIG_QTI_PMIC_LPM=m
CONFIG_QTI_QBG=m
CONFIG_QTI_QMI_COOLING_DEVICE=m
CONFIG_QTI_QMI_SENSOR=m
# CONFIG_QTI_SYS_PM_VX is not set
CONFIG_QTI_THERMAL_LIMITS_DCVS=m
# CONFIG_R8712U is not set
CONFIG_REBOOT_MODE=m
CONFIG_REGULATOR_COOLING_DEVICE=m
CONFIG_REGULATOR_DEBUG_CONTROL=m
CONFIG_REGULATOR_PROXY_CONSUMER=m
# CONFIG_REGULATOR_PROXY_CONSUMER_LEGACY is not set
CONFIG_REGULATOR_QCOM_AMOLED=m
CONFIG_REGULATOR_QTI_FIXED_VOLTAGE=m
CONFIG_REGULATOR_QTI_OCP_NOTIFIER=m
CONFIG_REGULATOR_RPM_SMD=m
CONFIG_REGULATOR_STUB=m
CONFIG_RPMSG_QCOM_GLINK=m
CONFIG_RPMSG_QCOM_GLINK_RPM=m
CONFIG_RPMSG_QCOM_GLINK_SMEM=m
CONFIG_RPMSG_QCOM_GLINK_SPSS=m
CONFIG_RPMSG_QCOM_SMD=m
CONFIG_RTC_DRV_PM8XXX=m
# CONFIG_RTL8723BS is not set
CONFIG_SCHED_WALT=m
# CONFIG_SCHED_WALT_DEBUG is not set
# CONFIG_SCSI_UFS_QCOM is not set
CONFIG_SDW_DEBUGCC_MONACO=m
CONFIG_SDW_DISPCC_MONACO=m
CONFIG_SDW_GCC_MONACO=m
CONFIG_SDW_GPUCC_MONACO=m
CONFIG_SERIAL_MSM_GENI=m
CONFIG_SHOW_SUSPEND_EPOCH=m
CONFIG_SLIMBUS=m
# CONFIG_SLIM_QCOM_CTRL is not set
CONFIG_SLIM_QCOM_NGD_CTRL=m
# CONFIG_SND_SOC_WCD9335 is not set
CONFIG_SPI_MSM_GENI=m
CONFIG_SPMI_MSM_PMIC_ARB=m
CONFIG_SPS=m
# CONFIG_SPS_SUPPORT_BAMDMA is not set
CONFIG_SPS_SUPPORT_NDP_BAM=y
CONFIG_STM=m
CONFIG_STM_PROTO_OST=m
CONFIG_STM_SOURCE_FTRACE=m
CONFIG_THERMAL_TSENS_LEGACY=m
CONFIG_UIO_MSM_SHAREDMEM=m
CONFIG_USB_CONFIGFS_F_CCID=m
CONFIG_USB_CONFIGFS_F_CDEV=m
CONFIG_USB_CONFIGFS_F_GSI=m
CONFIG_USB_CONFIGFS_F_QDSS=m
CONFIG_USB_DWC3_MSM=m
CONFIG_USB_F_CCID=m
CONFIG_USB_F_CDEV=m
CONFIG_USB_F_FS_IPC_LOGGING=m
CONFIG_USB_F_GSI=m
CONFIG_USB_F_QDSS=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_VIDEO_QCOM_VENUS is not set
# CONFIG_VIRT_WIFI is not set
# CONFIG_WILC1000_SDIO is not set
# CONFIG_WILC1000_SPI is not set

View File

@@ -0,0 +1,23 @@
CONFIG_ARM_SMMU_SELFTEST=y
CONFIG_ATOMIC64_SELFTEST=m
CONFIG_CMA_DEBUG=y
CONFIG_CMA_DEBUGFS=y
CONFIG_CORESIGHT_SOURCE_ETM4X=m
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_LKDTM=m
CONFIG_LOCK_TORTURE_TEST=m
CONFIG_MHI_BUS_DEBUG=y
CONFIG_MSM_GPI_DMA_DEBUG=y
CONFIG_PAGE_OWNER=y
CONFIG_QCOM_DYNAMIC_MEMORY_DUMP=y
CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG=y
CONFIG_RCU_TORTURE_TEST=m
CONFIG_REGMAP_QTI_DEBUGFS_ALLOW_WRITE=y
CONFIG_RUNTIME_TESTING_MENU=y
CONFIG_SCHED_WALT_DEBUG=m
CONFIG_SDHCI_MSM_DBG=y
CONFIG_TEST_USER_COPY=m
CONFIG_UFS_DBG=y

View File

@@ -0,0 +1,327 @@
CONFIG_ARCH_PARROT=y
CONFIG_ARCH_RAVELIN=y
# CONFIG_ARM64_AMU_EXTN is not set
CONFIG_ARM_QCOM_CPUFREQ_HW=m
# CONFIG_ARM_QCOM_CPUFREQ_NVMEM is not set
CONFIG_ARM_SMMU=m
CONFIG_ARM_SMMU_CONTEXT_FAULT_RETRY=y
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
CONFIG_ARM_SMMU_QCOM=m
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_CFG80211=m
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_CHR_DEV_SG=m
CONFIG_COMMON_CLK_QCOM=m
CONFIG_CORESIGHT=m
CONFIG_CORESIGHT_CSR=m
CONFIG_CORESIGHT_CTI=m
CONFIG_CORESIGHT_DUMMY=m
CONFIG_CORESIGHT_LINKS_AND_SINKS=m
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=m
CONFIG_CORESIGHT_QMI=m
CONFIG_CORESIGHT_REMOTE_ETM=m
CONFIG_CORESIGHT_STM=m
CONFIG_CORESIGHT_TGU=m
CONFIG_CORESIGHT_TPDA=m
CONFIG_CORESIGHT_TPDM=m
CONFIG_CPU_IDLE_GOV_QCOM_LPM=m
CONFIG_QTI_THERMALZONE_CONFIG_DEBUG=m
CONFIG_DEVFREQ_GOV_QCOM_ADRENO_TZ=m
CONFIG_DEVFREQ_GOV_QCOM_GPUBW_MON=m
CONFIG_DRM_DISPLAY_DP_HELPER=y
CONFIG_DRM_DISPLAY_HELPER=m
CONFIG_DRM_DP_AUX_BUS=m
CONFIG_DRM_MSM_HELPER=m
CONFIG_GENERIC_TRACER=y
CONFIG_GH_ARM64_DRV=m
CONFIG_GH_CTRL=m
CONFIG_GH_DBL=m
CONFIG_GH_IRQ_LEND=m
CONFIG_GH_MEM_NOTIFIER=m
CONFIG_GH_MSGQ=m
CONFIG_GH_PANIC_NOTIFIER=m
CONFIG_GH_PROXY_SCHED=m
CONFIG_GH_RM_BOOSTER=m
CONFIG_GH_RM_DRV=m
CONFIG_GH_SECURE_VM_LOADER=m
# CONFIG_GH_TLMM_VM_MEM_ACCESS is not set
CONFIG_GH_VIRT_WATCHDOG=m
CONFIG_GIC_INTERRUPT_ROUTING=m
CONFIG_GUNYAH_DRIVERS=y
CONFIG_HVC_GUNYAH=m
CONFIG_HWSPINLOCK_QCOM=m
CONFIG_I2C_MSM_GENI=m
CONFIG_INPUT_PM8941_PWRKEY=m
CONFIG_INPUT_QPNP_POWER_ON=m
CONFIG_INTERCONNECT_QCOM_BCM_VOTER=m
CONFIG_INTERCONNECT_QCOM_DEBUG=m
CONFIG_INTERCONNECT_QCOM_PARROT=m
CONFIG_INTERCONNECT_QCOM_QOS=m
CONFIG_INTERCONNECT_QCOM_RAVELIN=m
CONFIG_INTERCONNECT_QCOM_RPMH=m
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_IPC_LOGGING=m
CONFIG_IPC_LOG_MINIDUMP_BUFFERS=16
CONFIG_LEDS_AW2016=m
CONFIG_LEDS_QPNP_FLASH_V2=m
CONFIG_LEDS_QPNP_VIBRATOR_LDO=m
CONFIG_LEDS_QTI_TRI_LED=m
# CONFIG_MAC80211 is not set
CONFIG_MEM_SHARE_QMI_SERVICE=m
CONFIG_MFD_I2C_PMIC=m
CONFIG_MFD_SPMI_PMIC=m
# CONFIG_MFD_WCD934X is not set
CONFIG_MHI_BUS=m
CONFIG_MHI_BUS_MISC=y
CONFIG_MHI_DTR=m
CONFIG_MHI_UCI=m
CONFIG_MINIDUMP_MAX_ENTRIES=200
CONFIG_MMC_CQHCI=m
CONFIG_MMC_CRYPTO_QTI=m
CONFIG_MMC_SDHCI_MSM=m
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_MSM_BOOT_STATS=m
CONFIG_MSM_GPI_DMA=m
CONFIG_MSM_HSUSB_PHY=m
CONFIG_MSM_PERFORMANCE=m
CONFIG_MSM_QMP=m
CONFIG_MSM_RDBG=m
CONFIG_MSM_SYSSTATS=m
CONFIG_MSM_SYSSTATS_STUB_NONEXPORTED_SYMBOLS=y
CONFIG_MSM_TMECOM_QMP=m
CONFIG_NL80211_TESTMODE=y
CONFIG_NOP_USB_XCEIV=m
CONFIG_NVMEM_QCOM_QFPROM=m
CONFIG_NVMEM_SPMI_SDAM=m
CONFIG_PCI_MSM=m
CONFIG_PDR_INDICATION_NOTIF_TIMEOUT=9000
CONFIG_PHY_QCOM_UFS=m
CONFIG_PHY_QCOM_UFS_QRBTC_SDM845=m
CONFIG_PHY_QCOM_UFS_V4_WAIPIO=m
CONFIG_PINCTRL_MSM=m
CONFIG_PINCTRL_PARROT=m
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
CONFIG_PINCTRL_RAVELIN=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
CONFIG_POWER_RESET_QCOM_PON=m
CONFIG_POWER_RESET_QCOM_REBOOT_REASON=m
# CONFIG_PRISM2_USB is not set
CONFIG_PWM_QTI_LPG=m
# CONFIG_QCOM_ADSP_SLEEPMON is not set
CONFIG_QCOM_AOSS_QMP=m
CONFIG_QCOM_BAM_DMA=m
CONFIG_QCOM_BWMON=m
CONFIG_QCOM_CDSP_RM=m
CONFIG_QCOM_CLK_RPMH=m
CONFIG_QCOM_COMMAND_DB=m
CONFIG_QCOM_CPUCP=m
CONFIG_QCOM_CPUSS_SLEEP_STATS=m
CONFIG_QCOM_CPU_PHYS_LOG_MAP=m
CONFIG_QCOM_CPU_VENDOR_HOOKS=m
CONFIG_QCOM_DCC_V2=m
CONFIG_QCOM_DCVS=m
CONFIG_QCOM_DCVS_FP=m
CONFIG_QCOM_DEBUG_SYMBOL=m
CONFIG_QCOM_DMABUF_HEAPS=m
CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT=y
CONFIG_QCOM_DMABUF_HEAPS_CMA=y
CONFIG_QCOM_DMABUF_HEAPS_PAGE_POOL_REFILL=y
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_MOVABLE is not set
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_SECURE=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_UNCACHED is not set
# CONFIG_QCOM_DMABUF_HEAPS_TVM_CARVEOUT is not set
# CONFIG_QCOM_DMABUF_HEAPS_UBWCP is not set
# CONFIG_QCOM_DYN_MINIDUMP_STACK is not set
CONFIG_QCOM_EUD=m
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_FSA4480_I2C=m
CONFIG_QCOM_GDSC_REGULATOR=m
CONFIG_QCOM_GLINK_PKT=m
CONFIG_QCOM_HUNG_TASK_ENH=m
CONFIG_QCOM_IOMMU_DEBUG=m
CONFIG_QCOM_IOMMU_UTIL=m
CONFIG_QCOM_IPCC=m
CONFIG_QCOM_IRQ_STAT=y
CONFIG_QCOM_LAZY_MAPPING=m
# CONFIG_QCOM_LMH is not set
CONFIG_QCOM_LOGBUF_BOOTLOG=m
CONFIG_QCOM_LOGBUF_VENDOR_HOOKS=m
CONFIG_QCOM_MDT_LOADER=m
CONFIG_QCOM_MEMLAT=m
CONFIG_QCOM_MEMORY_DUMP_V2=m
CONFIG_QCOM_MEM_BUF=m
CONFIG_QCOM_MEM_BUF_DEV=m
CONFIG_QCOM_MEM_BUF_DEV_GH=y
CONFIG_QCOM_MEM_BUF_GH=y
CONFIG_QCOM_MEM_BUF_MSGQ=m
CONFIG_QCOM_MEM_OFFLINE=m
CONFIG_QCOM_MINIDUMP=m
CONFIG_QCOM_MINIDUMP_FTRACE=y
CONFIG_QCOM_MINIDUMP_PANIC_CPUFREQ_INFO=y
CONFIG_QCOM_MINIDUMP_PANIC_DUMP=y
CONFIG_QCOM_MINIDUMP_PANIC_MEMORY_INFO=y
CONFIG_QCOM_MINIDUMP_PSTORE=y
CONFIG_QCOM_PANEL_EVENT_NOTIFIER=m
CONFIG_QCOM_PANIC_ON_NOTIF_TIMEOUT=y
CONFIG_QCOM_PANIC_ON_PDR_NOTIF_TIMEOUT=y
CONFIG_QCOM_PDC=m
CONFIG_QCOM_PDR_HELPERS=m
CONFIG_QCOM_PIL_INFO=m
CONFIG_QCOM_PMU_LIB=m
CONFIG_QCOM_Q6V5_COMMON=m
# CONFIG_QCOM_Q6V5_MSS is not set
CONFIG_QCOM_Q6V5_PAS=m
# CONFIG_QCOM_Q6V5_WCSS is not set
CONFIG_QCOM_QFPROM_SYS=m
CONFIG_QCOM_QMI_HELPERS=m
CONFIG_QCOM_RAMDUMP=m
CONFIG_QCOM_RPMH=m
CONFIG_QCOM_RPROC_BOTH_DUMPS=y
CONFIG_QCOM_RPROC_COMMON=m
CONFIG_QCOM_SCM=m
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
CONFIG_QCOM_SECURE_BUFFER=m
CONFIG_QCOM_SHOW_RESUME_IRQ=m
CONFIG_QCOM_SI_CORE=m
CONFIG_QCOM_SI_CORE_MEM_OBJECT=m
CONFIG_QCOM_SI_CORE_WQ=y
CONFIG_QCOM_SMEM=m
CONFIG_QCOM_SMP2P=m
CONFIG_QCOM_SMP2P_SLEEPSTATE=m
# CONFIG_QCOM_SMSM is not set
CONFIG_QCOM_SOCINFO=m
CONFIG_QCOM_SOC_WATCHDOG=m
CONFIG_QCOM_SPMI_ADC5=m
# CONFIG_QCOM_SPMI_ADC5_GEN3 is not set
CONFIG_QCOM_SPMI_ADC_TM5=m
CONFIG_QCOM_SPMI_TEMP_ALARM=m
CONFIG_QCOM_STATS=m
CONFIG_QCOM_SYSMON=m
CONFIG_QCOM_SYSMON_SUBSYSTEM_STATS=m
CONFIG_QCOM_TSENS=m
CONFIG_QCOM_VADC_COMMON=m
CONFIG_QCOM_VA_MINIDUMP=m
CONFIG_QCOM_VM_ALIVE_LOG_DUMPER=y
CONFIG_QCOM_VM_DMESG_DUMPER=m
CONFIG_QCOM_WATCHDOG_BARK_TIME=11000
CONFIG_QCOM_WATCHDOG_IPI_PING=y
CONFIG_QCOM_WATCHDOG_PET_TIME=9360
# CONFIG_QCOM_WATCHDOG_USERSPACE_PET is not set
CONFIG_QCOM_WATCHDOG_WAKEUP_ENABLE=y
# CONFIG_QCOM_WCNSS_PIL is not set
# CONFIG_QCOM_WDOG_BITE_EARLY_PANIC is not set
CONFIG_QCOM_WDT_CORE=m
CONFIG_QRTR=m
CONFIG_QRTR_GUNYAH=m
CONFIG_QRTR_MHI=m
CONFIG_QRTR_SMD=m
CONFIG_QSEECOM_PROXY=m
CONFIG_QSEE_IPC_IRQ_BRIDGE=m
CONFIG_QTI_ALTMODE_GLINK=m
CONFIG_QTI_BATTERY_CHARGER=m
CONFIG_QTI_BATTERY_GLINK_DEBUG=m
CONFIG_QTI_BCL_PMIC5=m
CONFIG_QTI_BCL_SOC_DRIVER=m
CONFIG_QTI_CHARGER_ULOG_GLINK=m
CONFIG_QTI_CPUCP_LOG=m
CONFIG_QTI_CPUFREQ_CDEV=m
CONFIG_QTI_CPU_HOTPLUG_COOLING_DEVICE=m
CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE=m
CONFIG_QTI_DDR_COOLING_DEVICE=m
CONFIG_QTI_DEVFREQ_CDEV=m
CONFIG_QTI_GLINK_ADC=m
CONFIG_QTI_IOMMU_SUPPORT=m
CONFIG_QTI_PMIC_GLINK=m
CONFIG_QTI_PMIC_GLINK_DEBUG=m
CONFIG_QTI_PMIC_PON_LOG=m
CONFIG_QTI_POLICY_ENGINE_SENSOR=m
CONFIG_QTI_QMI_COOLING_DEVICE=m
CONFIG_QTI_QMI_SENSOR_V2=m
CONFIG_QTI_SDPM_CLOCK_MONITOR=m
CONFIG_QTI_SYS_PM_VX=m
CONFIG_QTI_THERMAL_VENDOR_HOOK=m
CONFIG_QTI_USERSPACE_CDEV=m
# CONFIG_R8712U is not set
CONFIG_REBOOT_MODE=m
CONFIG_REGMAP_QTI_DEBUGFS=m
CONFIG_REGULATOR_DEBUG_CONTROL=m
CONFIG_REGULATOR_PROXY_CONSUMER=m
CONFIG_REGULATOR_QCOM_AMOLED=m
CONFIG_REGULATOR_QCOM_PM8008=m
CONFIG_REGULATOR_QPNP_LCDB=m
CONFIG_REGULATOR_QTI_FIXED_VOLTAGE=m
CONFIG_REGULATOR_QTI_OCP_NOTIFIER=m
CONFIG_REGULATOR_RPMH=m
CONFIG_REGULATOR_STUB=m
CONFIG_RPMSG_QCOM_GLINK=m
CONFIG_RPMSG_QCOM_GLINK_SMEM=m
CONFIG_RPMSG_QCOM_SMD=m
CONFIG_RPROC_SSR_NOTIF_TIMEOUT=20000
CONFIG_RPROC_SYSMON_NOTIF_TIMEOUT=20000
CONFIG_RTC_DRV_PM8XXX=m
# CONFIG_RTL8723BS is not set
CONFIG_SCHED_WALT=m
# CONFIG_SCHED_WALT_DEBUG is not set
CONFIG_SCSI_UFS_CRYPTO_QTI=m
CONFIG_SCSI_UFS_QCOM=m
CONFIG_SERIAL_MSM_GENI=m
CONFIG_SLIMBUS=m
# CONFIG_SLIM_QCOM_CTRL is not set
CONFIG_SLIM_QCOM_NGD_CTRL=m
CONFIG_SM_CAMCC_4450=m
CONFIG_SM_CAMCC_PARROT=m
CONFIG_SM_DEBUGCC_4450=m
CONFIG_SM_DEBUGCC_PARROT=m
CONFIG_SM_DISPCC_4450=m
CONFIG_SM_DISPCC_PARROT=m
CONFIG_SM_GCC_4450=m
CONFIG_SM_GCC_PARROT=m
CONFIG_SM_GPUCC_4450=m
CONFIG_SM_GPUCC_PARROT=m
CONFIG_SM_VIDEOCC_PARROT=m
# CONFIG_SND_SOC_WCD9335 is not set
CONFIG_SND_USB_AUDIO_QMI=m
CONFIG_SPI_MSM_GENI=m
CONFIG_SPMI_MSM_PMIC_ARB=m
CONFIG_SPMI_MSM_PMIC_ARB_DEBUG=m
CONFIG_SPS=m
CONFIG_SPS_SUPPORT_NDP_BAM=y
CONFIG_STM=m
CONFIG_STM_PROTO_BASIC=m
CONFIG_STM_PROTO_OST=m
CONFIG_STM_SOURCE_CONSOLE=m
CONFIG_STM_SOURCE_FTRACE=m
CONFIG_UCSI_QTI_GLINK=m
CONFIG_UIO_MSM_SHAREDMEM=m
CONFIG_USB_CONFIGFS_F_CCID=m
CONFIG_USB_CONFIGFS_F_CDEV=m
CONFIG_USB_CONFIGFS_F_GSI=m
CONFIG_USB_CONFIGFS_F_QDSS=m
# CONFIG_USB_DWC3_HAPS is not set
CONFIG_USB_DWC3_MSM=m
# CONFIG_USB_DWC3_OF_SIMPLE is not set
# CONFIG_USB_DWC3_QCOM is not set
CONFIG_USB_EHSET_TEST_FIXTURE=m
CONFIG_USB_F_CCID=m
CONFIG_USB_F_CDEV=m
CONFIG_USB_F_FS_IPC_LOGGING=m
CONFIG_USB_F_GSI=m
CONFIG_USB_F_QDSS=m
CONFIG_USB_LINK_LAYER_TEST=m
CONFIG_USB_MSM_SSPHY_QMP=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
CONFIG_USB_QCOM_EMU_PHY=m
CONFIG_USB_XHCI_SIDEBAND=m
# CONFIG_VIDEO_QCOM_VENUS is not set
CONFIG_VIRT_DRIVERS=y
# CONFIG_VIRT_WIFI is not set
# CONFIG_WILC1000_SDIO is not set
# CONFIG_WILC1000_SPI is not set

View File

@@ -0,0 +1,291 @@
# CONFIG_ANDROID_KABI_RESERVE is not set
# CONFIG_ANDROID_VENDOR_OEM_DATA is not set
CONFIG_ARCH_PARROT=y
CONFIG_ARCH_QCOM=y
CONFIG_ARCH_QTI_VM=y
CONFIG_ARCH_RAVELIN=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
CONFIG_ARM_SMMU_QCOM=y
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_ASYNC_CORE=y
CONFIG_ASYNC_XOR=y
CONFIG_AUXILIARY_BUS=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_INTEGRITY_T10=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_COMMON_CLK_QCOM=y
CONFIG_CRC64=y
CONFIG_CRC64_ROCKSOFT=y
CONFIG_CRC_T10DIF=y
CONFIG_CRYPTO_CRC64_ROCKSOFT=y
CONFIG_CRYPTO_CRCT10DIF=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_GHASH=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_CRYPTO_LZO=y
CONFIG_DEFAULT_SECURITY_SELINUX=y
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_DEVICE_MIGRATION=y
# CONFIG_DEVICE_PRIVATE is not set
CONFIG_DEV_COREDUMP=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DM_AUDIT=y
CONFIG_DM_INIT=y
CONFIG_DM_INTEGRITY=y
CONFIG_DM_VERITY_SIG_VALUE=y
CONFIG_DRM=y
# CONFIG_DRM_ACCEL is not set
# CONFIG_DRM_ANALOGIX_ANX6345 is not set
# CONFIG_DRM_ANALOGIX_ANX7625 is not set
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_ARCPGU is not set
CONFIG_DRM_BRIDGE=y
# CONFIG_DRM_CDNS_DSI is not set
# CONFIG_DRM_CDNS_MHDP8546 is not set
# CONFIG_DRM_CHIPONE_ICN6211 is not set
# CONFIG_DRM_CHRONTEL_CH7033 is not set
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DISPLAY_CONNECTOR is not set
# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_FBDEV_EMULATION is not set
CONFIG_DRM_GEM_SHMEM_HELPER=y
# CONFIG_DRM_HDLCD is not set
# CONFIG_DRM_HISI_KIRIN is not set
# CONFIG_DRM_I2C_ADV7511 is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_ITE_IT6505 is not set
# CONFIG_DRM_ITE_IT66121 is not set
CONFIG_DRM_KMS_HELPER=y
# CONFIG_DRM_KOMEDA is not set
# CONFIG_DRM_LEGACY is not set
# CONFIG_DRM_LIMA is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_LOGICVC is not set
# CONFIG_DRM_LONTIUM_LT8912B is not set
# CONFIG_DRM_LONTIUM_LT9211 is not set
# CONFIG_DRM_LONTIUM_LT9611 is not set
# CONFIG_DRM_LONTIUM_LT9611UXC is not set
# CONFIG_DRM_LVDS_CODEC is not set
# CONFIG_DRM_MALI_DISPLAY is not set
# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set
CONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_MSM is not set
# CONFIG_DRM_NWL_MIPI_DSI is not set
# CONFIG_DRM_NXP_PTN3460 is not set
CONFIG_DRM_PANEL=y
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set
CONFIG_DRM_PANEL_BRIDGE=y
# CONFIG_DRM_PANEL_DSI_CM is not set
# CONFIG_DRM_PANEL_EBBG_FT8719 is not set
# CONFIG_DRM_PANEL_EDP is not set
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
# CONFIG_DRM_PANEL_JDI_R63452 is not set
# CONFIG_DRM_PANEL_KHADAS_TS050 is not set
# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set
# CONFIG_DRM_PANEL_LVDS is not set
# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set
# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set
# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set
# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set
# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set
# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set
# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set
# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set
# CONFIG_DRM_PANEL_SIMPLE is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
# CONFIG_DRM_PANFROST is not set
# CONFIG_DRM_PARADE_PS8622 is not set
# CONFIG_DRM_PARADE_PS8640 is not set
# CONFIG_DRM_PL111 is not set
# CONFIG_DRM_SAMSUNG_DSIM is not set
# CONFIG_DRM_SII902X is not set
# CONFIG_DRM_SII9234 is not set
# CONFIG_DRM_SIL_SII8620 is not set
# CONFIG_DRM_SIMPLEDRM is not set
# CONFIG_DRM_SIMPLE_BRIDGE is not set
# CONFIG_DRM_SSD130X is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TIDSS is not set
# CONFIG_DRM_TI_DLPC3433 is not set
# CONFIG_DRM_TI_SN65DSI83 is not set
# CONFIG_DRM_TI_SN65DSI86 is not set
# CONFIG_DRM_TI_TFP410 is not set
# CONFIG_DRM_TI_TPD12S015 is not set
# CONFIG_DRM_TOSHIBA_TC358762 is not set
# CONFIG_DRM_TOSHIBA_TC358764 is not set
# CONFIG_DRM_TOSHIBA_TC358767 is not set
# CONFIG_DRM_TOSHIBA_TC358768 is not set
# CONFIG_DRM_TOSHIBA_TC358775 is not set
CONFIG_DRM_TTM=y
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VIRTIO_GPU is not set
# CONFIG_DRM_VKMS is not set
# CONFIG_FS_DAX is not set
CONFIG_GENERIC_PINCONF=y
CONFIG_GH_ARM64_DRV=y
CONFIG_GH_CTRL=y
CONFIG_GH_DBL=y
CONFIG_GH_IRQ_LEND=y
CONFIG_GH_MEM_NOTIFIER=y
CONFIG_GH_MSGQ=y
CONFIG_GH_PANIC_NOTIFIER=y
CONFIG_GH_RM_DRV=y
CONFIG_GH_TLMM_VM_MEM_ACCESS=y
CONFIG_GH_VIRT_WATCHDOG=y
CONFIG_GKI_HIDDEN_DRM_CONFIGS=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GUNYAH=y
CONFIG_GUNYAH_DRIVERS=y
CONFIG_GUNYAH_PLATFORM_HOOKS=y
CONFIG_GUNYAH_QCOM_PLATFORM=y
CONFIG_HDMI=y
CONFIG_HVC_DRIVER=y
CONFIG_HVC_GUNYAH=y
CONFIG_HVC_GUNYAH_CONSOLE=y
CONFIG_I2C_MSM_GENI=y
CONFIG_INET=y
CONFIG_INET_TABLE_PERTURB_ORDER=16
CONFIG_INTERVAL_TREE=y
CONFIG_IOMMU_IO_PGTABLE=y
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
CONFIG_KCMP=y
CONFIG_LOCALVERSION="-perf"
CONFIG_LRU_GEN=y
CONFIG_LRU_GEN_ENABLED=y
# CONFIG_LRU_GEN_STATS is not set
CONFIG_LSM_MMAP_MIN_ADDR=32768
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
CONFIG_MAILBOX=y
CONFIG_MINIDUMP_MAX_ENTRIES=204
CONFIG_MSM_GPI_DMA=y
CONFIG_PID_NS=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MSM=y
CONFIG_PINCTRL_PARROT=y
CONFIG_PINCTRL_RAVELIN=y
CONFIG_PM_AUTOSLEEP=y
CONFIG_PROC_CHILDREN=y
CONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
CONFIG_QCOM_DMABUF_HEAPS=y
# CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT is not set
# CONFIG_QCOM_DMABUF_HEAPS_CMA is not set
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM is not set
CONFIG_QCOM_DMABUF_HEAPS_TVM_CARVEOUT=y
# CONFIG_QCOM_DYN_MINIDUMP_STACK is not set
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GENI_SE=y
CONFIG_QCOM_IOMMU_UTIL=y
CONFIG_QCOM_IPCC=y
CONFIG_QCOM_LAZY_MAPPING=y
CONFIG_QCOM_MEM_BUF=y
CONFIG_QCOM_MEM_BUF_DEV=y
CONFIG_QCOM_MEM_BUF_DEV_GH=y
CONFIG_QCOM_MEM_BUF_GH=y
CONFIG_QCOM_MEM_BUF_IPA_RESERVE=y
CONFIG_QCOM_MEM_BUF_MSGQ=y
CONFIG_QCOM_MINIDUMP=y
# CONFIG_QCOM_MINIDUMP_FTRACE is not set
# CONFIG_QCOM_MINIDUMP_PANIC_DUMP is not set
# CONFIG_QCOM_MINIDUMP_PSTORE is not set
CONFIG_QCOM_PANEL_EVENT_NOTIFIER=y
CONFIG_QCOM_SCM=y
CONFIG_QCOM_SI_CORE=y
CONFIG_QCOM_SI_CORE_MEM_OBJECT=y
CONFIG_QCOM_SI_CORE_WQ=y
CONFIG_QCOM_TLMM_VM_IRQCHIP=y
# CONFIG_QCOM_VA_MINIDUMP is not set
CONFIG_QCOM_VM_ALIVE_LOG_DUMPER=y
CONFIG_QCOM_VM_DMESG_DUMPER=y
CONFIG_QCOM_WDT_CORE=y
CONFIG_QMSGQ=y
CONFIG_QMSGQ_GUNYAH=y
CONFIG_QRTR=y
CONFIG_QRTR_GENPOOL=y
CONFIG_QRTR_GUNYAH=y
CONFIG_QRTR_NODE_ID=20
CONFIG_QRTR_WAKEUP_MS=500
CONFIG_QTI_IOMMU_SUPPORT=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_SELINUX=y
# CONFIG_SECURITY_SELINUX_AVC_STATS is not set
# CONFIG_SECURITY_SELINUX_DEVELOP is not set
CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_MSM_GENI=y
CONFIG_SYNC_FILE=y
CONFIG_SYS_HYPERVISOR=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_USER_NS=y
CONFIG_VIDEOMODE_HELPERS=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
CONFIG_VIRTIO_MEM=y
CONFIG_VIRT_DRIVERS=y
CONFIG_WANT_DEV_COREDUMP=y
CONFIG_XARRAY_MULTI=y
CONFIG_XOR_BLOCKS=y
CONFIG_ZONE_DEVICE=y
CONFIG_ZRAM=y
CONFIG_ZSMALLOC=y

View File

@@ -0,0 +1,23 @@
CONFIG_CMDLINE="no_hash_pointers"
# CONFIG_CMDLINE_FORCE is not set
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_PREEMPT=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FTRACE is not set
CONFIG_FW_CACHE=y
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_COMPRESS is not set
# CONFIG_FW_LOADER_USER_HELPER is not set
CONFIG_GH_VIRTIO_DEBUG=y
# CONFIG_KPROBES is not set
CONFIG_LOCALVERSION="-debug"
CONFIG_MSM_GPI_DMA_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_PM_DEBUG=y
CONFIG_PM_SLEEP_DEBUG=y
# CONFIG_QCOM_VM_ALIVE_LOG_ENCRYPT is not set
CONFIG_SECURITY_SELINUX_DEVELOP=y
# CONFIG_SLUB_DEBUG is not set
CONFIG_VIRTIO_VSOCKETS=y
CONFIG_WQ_WATCHDOG=y

View File

@@ -0,0 +1,17 @@
CONFIG_ATOMIC64_SELFTEST=m
CONFIG_CMA_DEBUG=y
CONFIG_CMA_DEBUGFS=y
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_LKDTM=m
CONFIG_LOCK_TORTURE_TEST=m
CONFIG_MHI_BUS_DEBUG=y
CONFIG_MSM_GPI_DMA_DEBUG=y
CONFIG_PAGE_OWNER=y
CONFIG_QCOM_RPMH_TIMEOUT=5000
CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG=y
CONFIG_RCU_TORTURE_TEST=m
CONFIG_RUNTIME_TESTING_MENU=y
CONFIG_TEST_USER_COPY=m

View File

@@ -0,0 +1,257 @@
CONFIG_ARCH_PINEAPPLE=y
CONFIG_ARM_QCOM_CPUFREQ_HW=m
CONFIG_ARM_SMMU=m
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
CONFIG_ARM_SMMU_QCOM=m
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_CFG80211=m
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
# CONFIG_CFG80211_CRDA_SUPPORT is not set
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_DEFAULT_PS is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
# CONFIG_CFG80211_WEXT is not set
# CONFIG_CHARGER_QCOM_SMBB is not set
CONFIG_COMMON_CLK_QCOM=m
CONFIG_DEVFREQ_GOV_QCOM_ADRENO_TZ=m
CONFIG_DEVFREQ_GOV_QCOM_GPUBW_MON=m
CONFIG_DRM_DISPLAY_DP_HELPER=y
CONFIG_DRM_DISPLAY_HELPER=m
CONFIG_DRM_DP_AUX_BUS=m
CONFIG_DRM_MSM_HELPER=m
# CONFIG_EDAC_QCOM is not set
# CONFIG_FTRACE_STARTUP_TEST is not set
CONFIG_GENERIC_TRACER=y
CONFIG_GH_ARM64_DRV=m
CONFIG_GH_CTRL=m
CONFIG_GH_DBL=m
CONFIG_GH_IRQ_LEND=m
CONFIG_GH_MEM_NOTIFIER=m
CONFIG_GH_MSGQ=m
CONFIG_GH_PROXY_SCHED=m
CONFIG_GH_RM_DRV=m
CONFIG_GH_SECURE_VM_LOADER=m
CONFIG_GH_VIRT_WATCHDOG=m
CONFIG_GUNYAH_DRIVERS=y
CONFIG_HVC_GUNYAH=m
CONFIG_HWSPINLOCK_QCOM=m
CONFIG_I2C_MSM_GENI=m
CONFIG_I3C_MASTER_MSM_GENI=m
CONFIG_INPUT_PM8941_PWRKEY=m
# CONFIG_INPUT_PM8XXX_VIBRATOR is not set
CONFIG_INTERCONNECT_QCOM_BCM_VOTER=m
CONFIG_INTERCONNECT_QCOM_DEBUG=m
CONFIG_INTERCONNECT_QCOM_PINEAPPLE=m
CONFIG_INTERCONNECT_QCOM_QOS=m
CONFIG_INTERCONNECT_QCOM_RPMH=m
CONFIG_INTERCONNECT_QCOM_RPMH_POSSIBLE=m
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_IPC_LOGGING=m
# CONFIG_IPC_LOGGING_CDEV is not set
CONFIG_IPC_LOG_MINIDUMP_BUFFERS=0
CONFIG_LEDS_QCOM_LPG=m
CONFIG_LEDS_QTI_FLASH=m
CONFIG_MAC80211=m
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_MAC80211_LEDS is not set
# CONFIG_MAC80211_MESH is not set
# CONFIG_MAC80211_MESSAGE_TRACING is not set
CONFIG_MAC80211_RC_DEFAULT=""
# CONFIG_MAC80211_RC_MINSTREL is not set
CONFIG_MFD_SPMI_PMIC=m
# CONFIG_MFD_WCD934X is not set
CONFIG_MHI_BUS=m
CONFIG_MHI_BUS_MISC=y
CONFIG_MHI_SATELLITE=m
CONFIG_MHI_UCI=m
CONFIG_MINIDUMP_MAX_ENTRIES=200
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_MSM_GPI_DMA=m
CONFIG_MSM_PERFORMANCE=m
CONFIG_MSM_QMP=m
CONFIG_NL80211_TESTMODE=y
CONFIG_NVMEM_QCOM_QFPROM=m
CONFIG_NVMEM_SPMI_SDAM=m
CONFIG_PCI_MSM=m
CONFIG_PHY_QCOM_UFS=m
CONFIG_PHY_QCOM_UFS_V4=m
CONFIG_PINCTRL_MSM=m
CONFIG_PINCTRL_PINEAPPLE=m
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
# CONFIG_PLFXLC is not set
# CONFIG_PM8916_WATCHDOG is not set
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
CONFIG_POWER_RESET_QCOM_PON=m
CONFIG_POWER_RESET_QCOM_REBOOT_REASON=m
# CONFIG_PRISM2_USB is not set
CONFIG_Q2SPI_MSM_GENI=m
CONFIG_QCOM_AOSS_QMP=m
CONFIG_QCOM_BAM_DMA=m
CONFIG_QCOM_BWMON=m
CONFIG_QCOM_CLK_RPMH=m
# CONFIG_QCOM_COINCELL is not set
CONFIG_QCOM_COMMAND_DB=m
CONFIG_QCOM_CPUCP=m
CONFIG_QCOM_CRM=m
CONFIG_QCOM_DCC_V2=m
CONFIG_QCOM_DCVS=m
CONFIG_QCOM_DCVS_FP=m
CONFIG_QCOM_DEBUG_SYMBOL=m
CONFIG_QCOM_DMABUF_HEAPS=m
CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT=y
CONFIG_QCOM_DMABUF_HEAPS_CMA=y
CONFIG_QCOM_DMABUF_HEAPS_PAGE_POOL_REFILL=y
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_MOVABLE is not set
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_SECURE=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_UNCACHED is not set
# CONFIG_QCOM_DMABUF_HEAPS_TVM_CARVEOUT is not set
# CONFIG_QCOM_DMABUF_HEAPS_UBWCP is not set
# CONFIG_QCOM_DYN_MINIDUMP_STACK is not set
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GDSC_REGULATOR=m
CONFIG_QCOM_GLINK_PKT=m
CONFIG_QCOM_IOMMU_DEBUG=m
CONFIG_QCOM_IOMMU_UTIL=m
# CONFIG_QCOM_IPA is not set
CONFIG_QCOM_IPCC=m
CONFIG_QCOM_LAZY_MAPPING=m
CONFIG_QCOM_LLCC=m
CONFIG_QCOM_LLCC_PMU=m
# CONFIG_QCOM_LMH is not set
CONFIG_QCOM_LOGBUF_BOOTLOG=m
CONFIG_QCOM_LOGBUF_VENDOR_HOOKS=m
CONFIG_QCOM_MDT_LOADER=m
CONFIG_QCOM_MEMLAT=m
CONFIG_QCOM_MEMORY_DUMP_V2=m
CONFIG_QCOM_MEM_BUF=m
CONFIG_QCOM_MEM_BUF_DEV=m
CONFIG_QCOM_MEM_BUF_DEV_GH=y
CONFIG_QCOM_MEM_BUF_GH=y
CONFIG_QCOM_MEM_BUF_MSGQ=m
CONFIG_QCOM_MINIDUMP=m
CONFIG_QCOM_MINIDUMP_FTRACE=y
# CONFIG_QCOM_MINIDUMP_PANIC_DUMP is not set
# CONFIG_QCOM_MINIDUMP_PSTORE is not set
CONFIG_QCOM_PDC=m
CONFIG_QCOM_PDR_HELPERS=m
CONFIG_QCOM_PIL_INFO=m
CONFIG_QCOM_PMU_LIB=m
# CONFIG_QCOM_Q6V5_ADSP is not set
CONFIG_QCOM_Q6V5_COMMON=m
# CONFIG_QCOM_Q6V5_MSS is not set
CONFIG_QCOM_Q6V5_PAS=m
# CONFIG_QCOM_Q6V5_WCSS is not set
CONFIG_QCOM_QMI_HELPERS=m
CONFIG_QCOM_RAMDUMP=m
CONFIG_QCOM_RPMH=m
# CONFIG_QCOM_RPMHPD is not set
CONFIG_QCOM_RPROC_COMMON=m
CONFIG_QCOM_SCM=m
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
CONFIG_QCOM_SECURE_BUFFER=m
CONFIG_QCOM_SMEM=m
CONFIG_QCOM_SMP2P=m
CONFIG_QCOM_SOCINFO=m
# CONFIG_QCOM_SOC_WATCHDOG is not set
# CONFIG_QCOM_SPMI_RRADC is not set
CONFIG_QCOM_SPMI_TEMP_ALARM=m
CONFIG_QCOM_SPSS=m
# CONFIG_QCOM_STATS is not set
CONFIG_QCOM_SYSMON=m
CONFIG_QCOM_VA_MINIDUMP=m
CONFIG_QCOM_WATCHDOG_BARK_TIME=11000
CONFIG_QCOM_WATCHDOG_IPI_PING=y
CONFIG_QCOM_WATCHDOG_PET_TIME=9360
# CONFIG_QCOM_WATCHDOG_USERSPACE_PET is not set
CONFIG_QCOM_WATCHDOG_WAKEUP_ENABLE=y
CONFIG_QCOM_WCD_USBSS_I2C=m
# CONFIG_QCOM_WCNSS_PIL is not set
# CONFIG_QCOM_WDOG_BITE_EARLY_PANIC is not set
CONFIG_QCOM_WDT_CORE=m
CONFIG_QRTR=m
CONFIG_QRTR_MHI=m
CONFIG_QRTR_SMD=m
CONFIG_QRTR_TUN=m
CONFIG_QSEECOM_PROXY=m
CONFIG_QTI_ALTMODE_GLINK=m
CONFIG_QTI_BATTERY_CHARGER=m
CONFIG_QTI_BATTERY_GLINK_DEBUG=m
CONFIG_QTI_C1DCVS_SCMI_V2=m
CONFIG_QTI_CHARGER_ULOG_GLINK=m
CONFIG_QTI_CPUCP_LOG=m
CONFIG_QTI_CPUFREQ_STATS_SCMI_V2=m
CONFIG_QTI_GLINK_ADC=m
CONFIG_QTI_IOMMU_SUPPORT=m
CONFIG_QTI_PMIC_EUSB2_REPEATER=m
CONFIG_QTI_PMIC_GLINK=m
CONFIG_QTI_PMIC_GLINK_DEBUG=m
CONFIG_QTI_QCOM_SCMI_CLIENT=m
# CONFIG_QTI_SCMI_C1DCVS_PROTOCOL is not set
# CONFIG_QTI_SCMI_PLH_PROTOCOL is not set
# CONFIG_QTI_SCMI_PMU_PROTOCOL is not set
CONFIG_QTI_SCMI_VENDOR_PROTOCOL=m
# CONFIG_R8712U is not set
CONFIG_REBOOT_MODE=m
CONFIG_REGULATOR_DEBUG_CONTROL=m
CONFIG_REGULATOR_PROXY_CONSUMER=m
# CONFIG_REGULATOR_PROXY_CONSUMER_LEGACY is not set
# CONFIG_REGULATOR_QCOM_RPMH is not set
CONFIG_REGULATOR_QTI_FIXED_VOLTAGE=m
CONFIG_REGULATOR_RPMH=m
CONFIG_RPMSG_QCOM_GLINK=m
CONFIG_RPMSG_QCOM_GLINK_RPM=m
CONFIG_RPMSG_QCOM_GLINK_SMEM=m
CONFIG_RPMSG_QCOM_GLINK_SPSS=m
CONFIG_RPMSG_QCOM_SMD=m
CONFIG_RTC_DRV_PM8XXX=m
# CONFIG_RTL8723BS is not set
CONFIG_SCHED_WALT=m
# CONFIG_SCHED_WALT_DEBUG is not set
CONFIG_SCSI_UFS_CRYPTO_QTI=m
CONFIG_SCSI_UFS_QCOM=m
CONFIG_SERIAL_MSM_GENI=m
CONFIG_SLIMBUS=m
# CONFIG_SLIM_QCOM_CTRL is not set
CONFIG_SLIM_QCOM_NGD_CTRL=m
CONFIG_SM_CAMCC_PINEAPPLE=m
CONFIG_SM_DISPCC_PINEAPPLE=m
CONFIG_SM_GCC_PINEAPPLE=m
CONFIG_SM_GPUCC_PINEAPPLE=m
CONFIG_SM_TCSRCC_PINEAPPLE=m
CONFIG_SM_VIDEOCC_PINEAPPLE=m
# CONFIG_SND_SOC_WCD9335 is not set
CONFIG_SPI_MSM_GENI=m
CONFIG_SPMI_MSM_PMIC_ARB=m
CONFIG_SPS=m
CONFIG_SPS_SUPPORT_NDP_BAM=y
CONFIG_UCSI_QTI_GLINK=m
CONFIG_UIO_MSM_SHAREDMEM=m
CONFIG_USB_CONFIGFS_F_CCID=m
CONFIG_USB_CONFIGFS_F_CDEV=m
CONFIG_USB_CONFIGFS_F_GSI=m
CONFIG_USB_CONFIGFS_F_QDSS=m
CONFIG_USB_DWC3_MSM=m
CONFIG_USB_F_CCID=m
CONFIG_USB_F_CDEV=m
# CONFIG_USB_F_FS_IPC_LOGGING is not set
CONFIG_USB_F_GSI=m
CONFIG_USB_F_QDSS=m
CONFIG_USB_MSM_EUSB2_PHY=m
CONFIG_USB_MSM_SSPHY_QMP=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
CONFIG_USB_QCOM_EMU_PHY=m
CONFIG_USB_REPEATER=m
# CONFIG_VIDEO_QCOM_VENUS is not set
# CONFIG_VIRT_WIFI is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set
# CONFIG_WFX is not set
# CONFIG_WILC1000_SDIO is not set
# CONFIG_WILC1000_SPI is not set

View File

@@ -0,0 +1,67 @@
CONFIG_ARCH_PINEAPPLE=y
CONFIG_ARCH_QCOM=y
CONFIG_ARCH_QTI_VM=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
CONFIG_ARM_SMMU_QCOM=y
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_AUXILIARY_BUS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_COMMON_CLK_QCOM=y
CONFIG_CRYPTO_LZO=y
CONFIG_DEVICE_MIGRATION=y
# CONFIG_DEVICE_PRIVATE is not set
# CONFIG_FS_DAX is not set
CONFIG_GENERIC_PINCONF=y
CONFIG_GH_ARM64_DRV=y
CONFIG_GH_CTRL=y
CONFIG_GH_DBL=y
CONFIG_GH_IRQ_LEND=y
CONFIG_GH_MEM_NOTIFIER=y
CONFIG_GH_MSGQ=y
CONFIG_GH_RM_DRV=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GUNYAH=y
CONFIG_GUNYAH_DRIVERS=y
CONFIG_GUNYAH_PLATFORM_HOOKS=y
CONFIG_GUNYAH_QCOM_PLATFORM=y
CONFIG_HVC_DRIVER=y
CONFIG_HVC_GUNYAH=y
CONFIG_HVC_GUNYAH_CONSOLE=y
CONFIG_IOMMU_IO_PGTABLE=y
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
CONFIG_LOCALVERSION="-perf"
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
CONFIG_MAILBOX=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MSM=y
CONFIG_QCOM_DMABUF_HEAPS=y
# CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT is not set
# CONFIG_QCOM_DMABUF_HEAPS_CMA is not set
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM is not set
CONFIG_QCOM_DMABUF_HEAPS_TVM_CARVEOUT=y
CONFIG_QCOM_IOMMU_UTIL=y
CONFIG_QCOM_LAZY_MAPPING=y
CONFIG_QCOM_MEM_BUF=y
CONFIG_QCOM_MEM_BUF_DEV=y
CONFIG_QCOM_MEM_BUF_DEV_GH=y
CONFIG_QCOM_MEM_BUF_GH=y
CONFIG_QCOM_MEM_BUF_MSGQ=y
CONFIG_QCOM_SCM=y
CONFIG_QTI_IOMMU_SUPPORT=y
CONFIG_SYS_HYPERVISOR=y
CONFIG_VIRTIO_MEM=y
CONFIG_VIRT_DRIVERS=y
CONFIG_XARRAY_MULTI=y
CONFIG_ZONE_DEVICE=y
CONFIG_ZRAM=y
CONFIG_ZSMALLOC=y

View File

@@ -0,0 +1,21 @@
CONFIG_CMDLINE="no_hash_pointers"
# CONFIG_CMDLINE_FORCE is not set
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_PREEMPT=y
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FTRACE is not set
CONFIG_FUNCTION_ERROR_INJECTION=y
CONFIG_FW_CACHE=y
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_COMPRESS is not set
# CONFIG_FW_LOADER_USER_HELPER is not set
CONFIG_KPROBES=y
CONFIG_KRETPROBES=y
CONFIG_LOCALVERSION="-debug"
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_PM_DEBUG=y
CONFIG_PM_SLEEP_DEBUG=y
CONFIG_WQ_WATCHDOG=y

View File

View File

121
arch/arm64/configs/vendor/sdxkova.config vendored Normal file
View File

@@ -0,0 +1,121 @@
CONFIG_ANDROID_VENDOR_HOOKS=y
CONFIG_ARCH_SDXKOVA=y
CONFIG_ARM_QCOM_CPUFREQ_HW=y
CONFIG_ARM_QCOM_CPUFREQ_HW_DEBUG=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
CONFIG_ARM_SMMU_QCOM=y
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_AUXILIARY_BUS=y
CONFIG_BINARY_PRINTF=y
CONFIG_BRANCH_PROFILE_NONE=y
CONFIG_COMMON_CLK_QCOM=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_DYNAMIC_EVENTS=y
CONFIG_EVENT_TRACING=y
CONFIG_EXTCON=y
CONFIG_FTRACE=y
CONFIG_GENERIC_PINCONF=y
CONFIG_GH_RM_DRV=y
CONFIG_GH_VIRT_WATCHDOG=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GUNYAH=y
CONFIG_GUNYAH_DRIVERS=y
CONFIG_GUNYAH_PLATFORM_HOOKS=y
CONFIG_GUNYAH_QCOM_PLATFORM=y
CONFIG_I2C=y
CONFIG_I2C_MSM_GENI=y
CONFIG_INPUT_PM8941_PWRKEY=y
CONFIG_INTERCONNECT_QCOM=y
CONFIG_INTERCONNECT_QCOM_BCM_VOTER=y
CONFIG_INTERCONNECT_QCOM_DEBUG=y
CONFIG_INTERCONNECT_QCOM_QOS=y
CONFIG_INTERCONNECT_QCOM_RPMH=y
CONFIG_INTERCONNECT_QCOM_RPMH_POSSIBLE=y
CONFIG_INTERCONNECT_QCOM_SDX75=y
CONFIG_IOMMU_IO_PGTABLE=y
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
CONFIG_MFD_I2C_PMIC=y
CONFIG_MFD_SPMI_PMIC=y
CONFIG_MMC_CQHCI=y
CONFIG_MMC_SDHCI_MSM=y
CONFIG_MSM_GPI_DMA=y
CONFIG_NOP_TRACER=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_NVMEM_SPMI_SDAM=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MSM=y
CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
CONFIG_PINCTRL_SDX75=y
CONFIG_PINMUX=y
CONFIG_POWER_RESET_QCOM_PON=y
CONFIG_POWER_RESET_QCOM_REBOOT_REASON=y
CONFIG_PROBE_EVENTS=y
CONFIG_QCOM_CLK_RPMH=y
CONFIG_QCOM_COMMAND_DB=y
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GDSC_REGULATOR=y
CONFIG_QCOM_GENI_SE=y
CONFIG_QCOM_IOMMU_UTIL=y
CONFIG_QCOM_IPCC=y
CONFIG_QCOM_IRQ_STAT=y
CONFIG_QCOM_LLCC=y
CONFIG_QCOM_RPMH=y
CONFIG_QCOM_RPMH_TIMEOUT=5000
CONFIG_QCOM_SCM=y
CONFIG_QCOM_SECURE_BUFFER=y
CONFIG_QCOM_SPMI_ADC5_GEN3=y
CONFIG_QCOM_SPMI_TEMP_ALARM=y
CONFIG_QCOM_VADC_COMMON=y
CONFIG_QCOM_WATCHDOG_BARK_TIME=11000
CONFIG_QCOM_WATCHDOG_IPI_PING=y
CONFIG_QCOM_WATCHDOG_PET_TIME=9360
CONFIG_QCOM_WATCHDOG_WAKEUP_ENABLE=y
CONFIG_QCOM_WDT_CORE=y
CONFIG_QTEE_SHM_BRIDGE=y
CONFIG_QTI_IOMMU_SUPPORT=y
CONFIG_QTI_PMIC_EUSB2_REPEATER=y
CONFIG_QTI_PMIC_PON_LOG=y
CONFIG_REBOOT_MODE=y
CONFIG_REGMAP=y
CONFIG_REGMAP_SPMI=y
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_PROXY_CONSUMER=y
CONFIG_REGULATOR_QTI_FIXED_VOLTAGE=y
CONFIG_REGULATOR_QTI_OCP_NOTIFIER=y
CONFIG_REGULATOR_RPMH=y
CONFIG_REGULATOR_STUB=y
CONFIG_RING_BUFFER=y
CONFIG_RTC_DRV_PM8XXX=y
CONFIG_SDX_DEBUGCC_75=y
CONFIG_SDX_GCC_75=y
CONFIG_SERIAL_MSM_GENI=y
CONFIG_SPI_MSM_GENI=y
CONFIG_SPMI_MSM_PMIC_ARB=y
CONFIG_SPMI_MSM_PMIC_ARB_DEBUG=y
CONFIG_TASKS_RCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_TRACEPOINTS=y
CONFIG_TRACE_CLOCK=y
CONFIG_TRACING=y
CONFIG_UPROBES=y
CONFIG_UPROBE_EVENTS=y
CONFIG_USB_CONFIGFS_F_CDEV=y
CONFIG_USB_CONFIGFS_F_GSI=y
CONFIG_USB_CONFIGFS_F_QDSS=y
CONFIG_USB_DWC3_MSM=y
CONFIG_USB_EHSET_TEST_FIXTURE=y
CONFIG_USB_F_CDEV=y
CONFIG_USB_F_GSI=y
CONFIG_USB_F_QDSS=y
CONFIG_USB_LINK_LAYER_TEST=y
CONFIG_USB_MSM_EUSB2_PHY=y
CONFIG_USB_MSM_SSPHY_QMP=y
CONFIG_USB_PHY=y
CONFIG_USB_REPEATER=y
CONFIG_VIRT_DRIVERS=y

View File

@@ -0,0 +1,15 @@
CONFIG_ARCH_SDXKOVA=y
CONFIG_ARM_SMMU_SELFTEST=y
CONFIG_BLK_DEBUG_FS=y
CONFIG_CMDLINE="stack_depot_disable=off kasan.stacktrace=off cgroup_disable=pressure"
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
CONFIG_LOCALVERSION="-debug"
CONFIG_MSM_GPI_DMA_DEBUG=y
CONFIG_QCOM_IOMMU_DEBUG=y
CONFIG_REGMAP_QTI_DEBUGFS=y
CONFIG_REGMAP_QTI_DEBUGFS_ALLOW_WRITE=y
CONFIG_REGULATOR_DEBUG_CONTROL=y
CONFIG_SDHCI_MSM_DBG=y
CONFIG_SERIAL_QCOM_GENI=y
CONFIG_SERIAL_QCOM_GENI_CONSOLE=y

View File

@@ -0,0 +1,24 @@
CONFIG_ATOMIC64_SELFTEST=m
CONFIG_CMA_DEBUG=y
CONFIG_CMA_DEBUGFS=y
CONFIG_CORESIGHT_SOURCE_ETM4X=m
CONFIG_CPU_IDLE_SIMPLE_GOV_QCOM_LPM=m
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_LKDTM=m
CONFIG_LOCK_TORTURE_TEST=m
CONFIG_MHI_BUS_DEBUG=y
CONFIG_MSM_GPI_DMA_DEBUG=y
CONFIG_PAGE_OWNER=y
CONFIG_QCOM_RPMH_TIMEOUT=5000
#CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG=y
CONFIG_RCU_TORTURE_TEST=m
CONFIG_REGMAP_QTI_DEBUGFS_ALLOW_WRITE=y
CONFIG_RPMSG_QCOM_GLINK_DEBUG=y
CONFIG_RUNTIME_TESTING_MENU=y
CONFIG_SCHED_WALT_DEBUG=m
CONFIG_SDHCI_MSM_DBG=y
CONFIG_TEST_USER_COPY=m
CONFIG_UFS_DBG=y

View File

@@ -0,0 +1,385 @@
CONFIG_ARCH_KERA=y
CONFIG_ARCH_SUN=y
CONFIG_ARCH_TUNA=y
# CONFIG_ARM_QCOM_CPUFREQ_NVMEM is not set
CONFIG_ARM_QCOM_CPUFREQ_THERMAL=m
CONFIG_ARM_SMMU=m
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
CONFIG_ARM_SMMU_QCOM=m
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_CFG80211=m
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
# CONFIG_CFG80211_CRDA_SUPPORT is not set
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_CHR_DEV_SG=m
CONFIG_COMMON_CLK_QCOM=m
CONFIG_COMMON_CLK_SCMI=m
CONFIG_CORESIGHT=m
CONFIG_CORESIGHT_CSR=m
CONFIG_CORESIGHT_CTI=m
CONFIG_CORESIGHT_DUMMY=m
CONFIG_CORESIGHT_LINKS_AND_SINKS=m
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=m
CONFIG_CORESIGHT_QMI=m
CONFIG_CORESIGHT_REMOTE_ETM=m
CONFIG_CORESIGHT_STM=m
CONFIG_CORESIGHT_TGU=m
CONFIG_CORESIGHT_TPDA=m
CONFIG_CORESIGHT_TPDM=m
CONFIG_CORESIGHT_TRACE_NOC=m
CONFIG_CORESIGHT_UETM=m
CONFIG_CPU_IDLE_GOV_QCOM_LPM=m
CONFIG_CRYPTO_DEV_QCOM_RNG=m
CONFIG_QTI_THERMALZONE_CONFIG_DEBUG=m
CONFIG_DEVFREQ_GOV_QCOM_ADRENO_TZ=m
CONFIG_DEVFREQ_GOV_QCOM_GPUBW_MON=m
CONFIG_DRM_DISPLAY_DP_HELPER=y
CONFIG_DRM_DISPLAY_HELPER=m
CONFIG_DRM_DP_AUX_BUS=m
CONFIG_DRM_LT9611UXC=m
CONFIG_DRM_MSM_HELPER=m
CONFIG_EDAC_QCOM=m
CONFIG_GENERIC_TRACER=y
CONFIG_GH_ARM64_DRV=m
CONFIG_GH_CTRL=m
CONFIG_GH_DBL=m
CONFIG_GH_IRQ_LEND=m
CONFIG_GH_MEM_NOTIFIER=m
CONFIG_GH_MSGQ=m
CONFIG_GH_PANIC_NOTIFIER=m
CONFIG_GH_PROXY_SCHED=m
CONFIG_GH_RM_BOOSTER=m
CONFIG_GH_RM_DRV=m
CONFIG_GH_SECURE_VM_LOADER=m
CONFIG_GH_TLMM_VM_MEM_ACCESS=m
CONFIG_GH_VIRT_WATCHDOG=m
CONFIG_GIC_INTERRUPT_ROUTING=m
CONFIG_GUNYAH_DRIVERS=y
CONFIG_HVC_GUNYAH=m
CONFIG_HWMON=m
CONFIG_HWSPINLOCK_QCOM=m
CONFIG_I2C_MSM_GENI=m
CONFIG_I3C_MASTER_MSM_GENI=m
CONFIG_INPUT_PM8941_PWRKEY=m
#CONFIG_INPUT_QCOM_HV_HAPTICS=m
CONFIG_INTERCONNECT_QCOM_BCM_VOTER=m
CONFIG_INTERCONNECT_QCOM_DEBUG=m
CONFIG_INTERCONNECT_QCOM_QOS=m
CONFIG_INTERCONNECT_QCOM_RPMH=m
CONFIG_INTERCONNECT_QCOM_SUN=m
CONFIG_INTERCONNECT_QCOM_TUNA=m
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_IPC_LOGGING=m
CONFIG_IPC_LOG_MINIDUMP_BUFFERS=16
CONFIG_LEDS_QCOM_FLASH=m
CONFIG_LEDS_QCOM_LPG=m
CONFIG_LEDS_QTI_FLASH=m
CONFIG_MAC80211=m
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_MAC80211_LEDS is not set
# CONFIG_MAC80211_MESH is not set
# CONFIG_MAC80211_MESSAGE_TRACING is not set
CONFIG_MAC80211_RC_DEFAULT=""
# CONFIG_MAC80211_RC_MINSTREL is not set
CONFIG_MAX31760_FAN_CONTROLLER=m
CONFIG_MEM_SHARE_QMI_SERVICE=m
CONFIG_MFD_I2C_PMIC=m
CONFIG_MFD_SPMI_PMIC=m
# CONFIG_MFD_WCD934X is not set
CONFIG_MHI_BUS=m
CONFIG_MHI_BUS_MISC=y
CONFIG_MHI_SATELLITE=m
CONFIG_MHI_UCI=m
CONFIG_MINIDUMP_MAX_ENTRIES=200
CONFIG_MMC_SDHCI_MSM=m
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_MSM_BOOT_STATS=m
CONFIG_MSM_GPI_DMA=m
CONFIG_MSM_PERFORMANCE=m
CONFIG_MSM_QMP=m
CONFIG_MSM_RDBG=m
CONFIG_MSM_SYSSTATS=m
CONFIG_MSM_SYSSTATS_STUB_NONEXPORTED_SYMBOLS=y
CONFIG_MSM_TMECOM_QMP=m
CONFIG_NL80211_TESTMODE=y
CONFIG_NOP_USB_XCEIV=m
CONFIG_NVMEM_QCOM_QFPROM=m
CONFIG_NVMEM_SPMI_SDAM=m
CONFIG_PCI_MSM=m
CONFIG_PDR_INDICATION_NOTIF_TIMEOUT=9000
CONFIG_PHY_QCOM_UFS=m
CONFIG_PHY_QCOM_UFS_QRBTC_SDM845=m
CONFIG_PHY_QCOM_UFS_V4_SUN=m
CONFIG_PINCTRL_KERA=m
CONFIG_PINCTRL_MSM=m
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
CONFIG_PINCTRL_SUN=m
CONFIG_PINCTRL_TUNA=m
# CONFIG_PLFXLC is not set
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
CONFIG_POWER_RESET_QCOM_PON=m
CONFIG_POWER_RESET_QCOM_REBOOT_REASON=m
# CONFIG_PRISM2_USB is not set
CONFIG_Q2SPI_MSM_GENI=m
CONFIG_QCOM_ADSP_SLEEPMON=m
CONFIG_QCOM_AOSS_QMP=m
CONFIG_QCOM_BAM_DMA=m
CONFIG_QCOM_BWMON=m
CONFIG_QCOM_CDSP_RM=m
CONFIG_QCOM_CLK_RPMH=m
CONFIG_QCOM_COMMAND_DB=m
CONFIG_QCOM_CPUCP=m
CONFIG_QCOM_CPUCP_FAST=m
CONFIG_QCOM_CPUSS_SLEEP_STATS_V4=m
CONFIG_QCOM_CPU_PHYS_LOG_MAP=m
CONFIG_QCOM_CPU_VENDOR_HOOKS=m
CONFIG_QCOM_CRM_V2=m
CONFIG_QCOM_DCC_V2=m
CONFIG_QCOM_DCVS=m
CONFIG_QCOM_DCVS_FP=m
CONFIG_QCOM_DEBUG_SYMBOL=m
CONFIG_QCOM_DMABUF_HEAPS=m
CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT=y
CONFIG_QCOM_DMABUF_HEAPS_CMA=y
CONFIG_QCOM_DMABUF_HEAPS_PAGE_POOL_REFILL=y
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_MOVABLE is not set
CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_SECURE=y
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM_UNCACHED is not set
# CONFIG_QCOM_DMABUF_HEAPS_TVM_CARVEOUT is not set
# CONFIG_QCOM_DMABUF_HEAPS_UBWCP is not set
CONFIG_QCOM_DYNAMIC_RAMOOPS=m
# CONFIG_QCOM_DYN_MINIDUMP_STACK is not set
CONFIG_QCOM_EUD=m
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GDSC_REGULATOR=m
CONFIG_QCOM_GLINK=m
CONFIG_QCOM_GLINK_PKT=m
CONFIG_QCOM_HUNG_TASK_ENH=m
CONFIG_QCOM_IOMMU_DEBUG=m
CONFIG_QCOM_IOMMU_UTIL=m
# CONFIG_QCOM_IPA is not set
CONFIG_QCOM_IPCC=m
CONFIG_QCOM_IRQ_STAT=y
CONFIG_QCOM_LAZY_MAPPING=m
CONFIG_QCOM_LLCC=m
CONFIG_QCOM_LLCC_HEURISTICS=m
CONFIG_QCOM_LLCC_PERFMON=m
CONFIG_QCOM_LLCC_PMU=m
# CONFIG_QCOM_LMH is not set
# CONFIG_QCOM_LOGBUF_BOOTLOG is not set
# CONFIG_QCOM_LOGBUF_VENDOR_HOOKS is not set
CONFIG_QCOM_MDT_LOADER=m
CONFIG_QCOM_MEMLAT=m
CONFIG_QCOM_MEMORY_DUMP_V2=m
CONFIG_QCOM_DYNAMIC_MEMORY_DUMP=y
CONFIG_QCOM_MEM_BUF=m
CONFIG_QCOM_MEM_BUF_DEV=m
CONFIG_QCOM_MEM_BUF_DEV_GH=y
CONFIG_QCOM_MEM_BUF_GH=y
CONFIG_QCOM_MEM_BUF_MSGQ=m
CONFIG_QCOM_MEM_HOOKS=m
CONFIG_QCOM_MEM_OFFLINE=m
CONFIG_QCOM_MINIDUMP=m
CONFIG_QCOM_MINIDUMP_FTRACE=y
CONFIG_QCOM_MINIDUMP_PANIC_CPUFREQ_INFO=y
CONFIG_QCOM_MINIDUMP_PANIC_CPU_CONTEXT=y
CONFIG_QCOM_MINIDUMP_PANIC_DUMP=y
CONFIG_QCOM_MINIDUMP_PANIC_MEMORY_INFO=y
CONFIG_QCOM_MINIDUMP_PSTORE=y
CONFIG_QCOM_PANEL_EVENT_NOTIFIER=m
CONFIG_QCOM_PANIC_ON_NOTIF_TIMEOUT=y
CONFIG_QCOM_PANIC_ON_PDR_NOTIF_TIMEOUT=y
CONFIG_QCOM_PCIE_PDC=m
CONFIG_QCOM_PDC=m
CONFIG_QCOM_PDR_HELPERS=m
CONFIG_QCOM_PIL_INFO=m
CONFIG_QCOM_PMU_LIB=m
# CONFIG_QCOM_Q6V5_ADSP is not set
CONFIG_QCOM_Q6V5_COMMON=m
# CONFIG_QCOM_Q6V5_MSS is not set
CONFIG_QCOM_Q6V5_PAS=m
# CONFIG_QCOM_Q6V5_WCSS is not set
CONFIG_QCOM_QMI_HELPERS=m
CONFIG_QCOM_RAMDUMP=m
CONFIG_QCOM_RPMH=m
CONFIG_QCOM_RPROC_BOTH_DUMPS=y
CONFIG_QCOM_RPROC_COMMON=m
CONFIG_QCOM_SCM=m
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
CONFIG_QCOM_SECURE_BUFFER=m
CONFIG_QCOM_SHOW_RESUME_IRQ=m
CONFIG_QCOM_SI_CORE=m
CONFIG_QCOM_SI_CORE_MEM_OBJECT=m
CONFIG_QCOM_SI_CORE_WQ=y
CONFIG_QCOM_SMEM=m
CONFIG_QCOM_SMP2P=m
CONFIG_QCOM_SMP2P_SLEEPSTATE=m
# CONFIG_QCOM_SMSM is not set
CONFIG_QCOM_SOCINFO=m
CONFIG_QCOM_SPMI_ADC5_GEN3=m
CONFIG_QCOM_SPMI_TEMP_ALARM=m
CONFIG_QCOM_SPSS=m
CONFIG_QCOM_STATS=m
CONFIG_QCOM_SYSMON=m
CONFIG_QCOM_SYSMON_SUBSYSTEM_STATS=m
CONFIG_QCOM_TSENS=m
CONFIG_QCOM_VADC_COMMON=m
CONFIG_QCOM_VA_MINIDUMP=m
CONFIG_QCOM_VM_ALIVE_LOG_DUMPER=y
CONFIG_QCOM_VM_DMESG_DUMPER=m
CONFIG_QCOM_WATCHDOG_BARK_TIME=11000
CONFIG_QCOM_WATCHDOG_IPI_PING=y
CONFIG_QCOM_WATCHDOG_PET_TIME=9360
# CONFIG_QCOM_WATCHDOG_USERSPACE_PET is not set
CONFIG_QCOM_WATCHDOG_WAKEUP_ENABLE=y
CONFIG_QCOM_WCD_USBSS_I2C=m
# CONFIG_QCOM_WCNSS_PIL is not set
# CONFIG_QCOM_WDOG_BITE_EARLY_PANIC is not set
CONFIG_QCOM_WDT_CORE=m
CONFIG_QRTR=m
CONFIG_QRTR_GUNYAH=m
CONFIG_QRTR_MHI=m
CONFIG_QRTR_SMD=m
CONFIG_QRTR_TUN=m
CONFIG_QSEECOM_PROXY=m
CONFIG_QSEE_IPC_IRQ_BRIDGE=m
#CONFIG_QTI_ALTMODE_GLINK=m
#CONFIG_QTI_BATTERY_CHARGER=m
#CONFIG_QTI_BATTERY_GLINK_DEBUG=m
CONFIG_QTI_BCL_PMIC5=m
CONFIG_QTI_BCL_SOC_DRIVER=m
#CONFIG_QTI_CHARGER_ULOG_GLINK=m
CONFIG_QTI_CPUCP_LOG=m
CONFIG_QTI_CPUFREQ_CDEV=m
CONFIG_QTI_CPUFREQ_STATS_SCMI_V3=m
CONFIG_QTI_CPU_HOTPLUG_COOLING_DEVICE=m
CONFIG_QTI_CPU_MPAM_INTERFACE=m
CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE=m
CONFIG_QTI_DDR_COOLING_DEVICE=m
CONFIG_QTI_DEVFREQ_CDEV=m
CONFIG_QTI_FCTL_SCMI=m
#CONFIG_QTI_GLINK_ADC=m
CONFIG_QTI_GPU_DUMP_SKIP_COOLING_DEVICE=m
CONFIG_QTI_IOMMU_SUPPORT=m
CONFIG_QTI_MPAM=m
CONFIG_QTI_MPAM_MSC=m
CONFIG_QTI_MPAM_MSC_SLC=m
CONFIG_QTI_PLATFORM_MPAM_INTERFACE=m
#CONFIG_QTI_PMIC_EUSB2_REPEATER=m
#CONFIG_QTI_PMIC_GLINK=m
#CONFIG_QTI_PMIC_GLINK_DEBUG=m
CONFIG_QTI_PMIC_PON_LOG=m
CONFIG_QTI_QCOM_SCMI_CLIENT=m
CONFIG_QTI_QMI_COOLING_DEVICE=m
CONFIG_QTI_QMI_SENSOR_V2=m
CONFIG_QTI_SCMI_VENDOR_PROTOCOL=m
CONFIG_QTI_SLC_MPAM_INTERFACE=m
CONFIG_QTI_SYS_PM_VX=m
CONFIG_QTI_THERMAL_VENDOR_HOOK=m
CONFIG_QTI_USERSPACE_CDEV=m
# CONFIG_R8712U is not set
CONFIG_REBOOT_MODE=m
CONFIG_REGMAP_QTI_DEBUGFS=m
CONFIG_REGULATOR_DEBUG_CONTROL=m
CONFIG_REGULATOR_PROXY_CONSUMER=m
#CONFIG_REGULATOR_QCOM_AMOLED=m
CONFIG_REGULATOR_QTI_FIXED_VOLTAGE=m
CONFIG_REGULATOR_QTI_OCP_NOTIFIER=m
CONFIG_REGULATOR_RPMH=m
CONFIG_REGULATOR_STUB=m
CONFIG_RPMSG_QCOM_GLINK=m
CONFIG_RPMSG_QCOM_GLINK_SMEM=m
CONFIG_RPMSG_QCOM_GLINK_SPSS=m
CONFIG_RPMSG_QCOM_SMD=m
CONFIG_RPROC_SSR_NOTIF_TIMEOUT=20000
CONFIG_RPROC_SYSMON_NOTIF_TIMEOUT=20000
CONFIG_RTC_DRV_PM8XXX=m
# CONFIG_RTL8723BS is not set
CONFIG_SCHED_WALT=m
# CONFIG_SCHED_WALT_DEBUG is not set
CONFIG_SCSI_UFS_CRYPTO_QTI=m
CONFIG_SCSI_UFS_QCOM=m
#CONFIG_SENSORS_QTI_AMOLED_ECM=m
CONFIG_SERIAL_MSM_GENI=m
CONFIG_SHOW_SUSPEND_EPOCH=m
CONFIG_SLIMBUS=m
# CONFIG_SLIM_QCOM_CTRL is not set
CONFIG_SLIM_QCOM_NGD_CTRL=m
CONFIG_SM_CAMBISTMCLKCC_SUN=m
CONFIG_SM_CAMBISTMCLKCC_TUNA=m
CONFIG_SM_CAMCC_SUN=m
CONFIG_SM_CAMCC_TUNA=m
CONFIG_SM_DEBUGCC_SUN=m
CONFIG_SM_DISPCC_SUN=m
CONFIG_SM_EVACC_SUN=m
CONFIG_SM_EVACC_TUNA=m
CONFIG_SM_GCC_KERA=m
CONFIG_SM_GCC_SUN=m
CONFIG_SM_GCC_TUNA=m
CONFIG_SM_GPUCC_SUN=m
CONFIG_SM_GPUCC_TUNA=m
CONFIG_SM_TCSRCC_SUN=m
CONFIG_SM_TCSRCC_TUNA=m
CONFIG_SM_VIDEOCC_SUN=m
CONFIG_SM_VIDEOCC_TUNA=m
# CONFIG_SND_SOC_WCD9335 is not set
CONFIG_SND_USB_AUDIO_QMI=m
CONFIG_SPI_MSM_GENI=m
CONFIG_SPMI_MSM_PMIC_ARB=m
CONFIG_SPMI_MSM_PMIC_ARB_DEBUG=m
CONFIG_SPS=m
CONFIG_SPS_SUPPORT_NDP_BAM=y
CONFIG_STM=m
CONFIG_STM_PROTO_OST=m
CONFIG_STM_SOURCE_CONSOLE=m
CONFIG_STM_SOURCE_FTRACE=m
CONFIG_STM_SOURCE_HEARTBEAT=m
#CONFIG_UCSI_QTI_GLINK=m
CONFIG_UIO_MSM_SHAREDMEM=m
CONFIG_USB_CONFIGFS_F_CCID=m
CONFIG_USB_CONFIGFS_F_CDEV=m
CONFIG_USB_CONFIGFS_F_GSI=m
CONFIG_USB_CONFIGFS_F_QDSS=m
CONFIG_USB_DWC3_MSM=m
CONFIG_USB_F_CCID=m
CONFIG_USB_F_CDEV=m
CONFIG_USB_F_FS_IPC_LOGGING=m
CONFIG_USB_F_GSI=m
CONFIG_USB_F_QDSS=m
CONFIG_USB_M31_MSM_EUSB2_PHY=m
CONFIG_USB_MSM_SSPHY_QMP=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
CONFIG_USB_QCOM_EMU_PHY=m
CONFIG_USB_REDRIVER=m
CONFIG_USB_REDRIVER_NB7VPQ904M=m
CONFIG_USB_REPEATER=m
CONFIG_USB_XHCI_SIDEBAND=m
# CONFIG_VIDEO_QCOM_VENUS is not set
CONFIG_VIRT_DRIVERS=y
# CONFIG_VIRT_WIFI is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set
# CONFIG_WFX is not set
# CONFIG_WILC1000_SDIO is not set
# CONFIG_WILC1000_SPI is not set
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_UH=y
CONFIG_RKP=y
CONFIG_KDP=y

View File

@@ -0,0 +1,291 @@
# CONFIG_ANDROID_KABI_RESERVE is not set
# CONFIG_ANDROID_VENDOR_OEM_DATA is not set
CONFIG_ARCH_QCOM=y
CONFIG_ARCH_QTI_VM=y
CONFIG_ARCH_SUN=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
CONFIG_ARM_SMMU_QCOM=y
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
# CONFIG_ARM_SMMU_SELFTEST is not set
CONFIG_ASYNC_CORE=y
CONFIG_ASYNC_XOR=y
CONFIG_AUXILIARY_BUS=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_INTEGRITY_T10=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_COMMON_CLK_QCOM=y
CONFIG_CRC64=y
CONFIG_CRC64_ROCKSOFT=y
CONFIG_CRC_T10DIF=y
CONFIG_CRYPTO_CRC64_ROCKSOFT=y
CONFIG_CRYPTO_CRCT10DIF=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_GHASH=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_CRYPTO_LZO=y
CONFIG_DEFAULT_SECURITY_SELINUX=y
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_DEVICE_MIGRATION=y
# CONFIG_DEVICE_PRIVATE is not set
CONFIG_DEV_COREDUMP=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DM_AUDIT=y
CONFIG_DM_INIT=y
CONFIG_DM_INTEGRITY=y
CONFIG_DM_VERITY_SIG_VALUE=y
CONFIG_DRM=y
# CONFIG_DRM_ACCEL is not set
# CONFIG_DRM_ANALOGIX_ANX6345 is not set
# CONFIG_DRM_ANALOGIX_ANX7625 is not set
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_ARCPGU is not set
CONFIG_DRM_BRIDGE=y
# CONFIG_DRM_CDNS_DSI is not set
# CONFIG_DRM_CDNS_MHDP8546 is not set
# CONFIG_DRM_CHIPONE_ICN6211 is not set
# CONFIG_DRM_CHRONTEL_CH7033 is not set
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DISPLAY_CONNECTOR is not set
# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_FBDEV_EMULATION is not set
CONFIG_DRM_GEM_SHMEM_HELPER=y
# CONFIG_DRM_HDLCD is not set
# CONFIG_DRM_HISI_KIRIN is not set
# CONFIG_DRM_I2C_ADV7511 is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_ITE_IT6505 is not set
# CONFIG_DRM_ITE_IT66121 is not set
CONFIG_DRM_KMS_HELPER=y
# CONFIG_DRM_KOMEDA is not set
# CONFIG_DRM_LEGACY is not set
# CONFIG_DRM_LIMA is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_LOGICVC is not set
# CONFIG_DRM_LONTIUM_LT8912B is not set
# CONFIG_DRM_LONTIUM_LT9211 is not set
# CONFIG_DRM_LONTIUM_LT9611 is not set
# CONFIG_DRM_LONTIUM_LT9611UXC is not set
# CONFIG_DRM_LVDS_CODEC is not set
# CONFIG_DRM_MALI_DISPLAY is not set
# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set
CONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_MSM is not set
# CONFIG_DRM_NWL_MIPI_DSI is not set
# CONFIG_DRM_NXP_PTN3460 is not set
CONFIG_DRM_PANEL=y
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set
CONFIG_DRM_PANEL_BRIDGE=y
# CONFIG_DRM_PANEL_DSI_CM is not set
# CONFIG_DRM_PANEL_EBBG_FT8719 is not set
# CONFIG_DRM_PANEL_EDP is not set
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
# CONFIG_DRM_PANEL_JDI_R63452 is not set
# CONFIG_DRM_PANEL_KHADAS_TS050 is not set
# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set
# CONFIG_DRM_PANEL_LVDS is not set
# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set
# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set
# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set
# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set
# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set
# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set
# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set
# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set
# CONFIG_DRM_PANEL_SIMPLE is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
# CONFIG_DRM_PANFROST is not set
# CONFIG_DRM_PARADE_PS8622 is not set
# CONFIG_DRM_PARADE_PS8640 is not set
# CONFIG_DRM_PL111 is not set
# CONFIG_DRM_SAMSUNG_DSIM is not set
# CONFIG_DRM_SII902X is not set
# CONFIG_DRM_SII9234 is not set
# CONFIG_DRM_SIL_SII8620 is not set
# CONFIG_DRM_SIMPLEDRM is not set
# CONFIG_DRM_SIMPLE_BRIDGE is not set
# CONFIG_DRM_SSD130X is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TIDSS is not set
# CONFIG_DRM_TI_DLPC3433 is not set
# CONFIG_DRM_TI_SN65DSI83 is not set
# CONFIG_DRM_TI_SN65DSI86 is not set
# CONFIG_DRM_TI_TFP410 is not set
# CONFIG_DRM_TI_TPD12S015 is not set
# CONFIG_DRM_TOSHIBA_TC358762 is not set
# CONFIG_DRM_TOSHIBA_TC358764 is not set
# CONFIG_DRM_TOSHIBA_TC358767 is not set
# CONFIG_DRM_TOSHIBA_TC358768 is not set
# CONFIG_DRM_TOSHIBA_TC358775 is not set
CONFIG_DRM_TTM=y
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VIRTIO_GPU is not set
# CONFIG_DRM_VKMS is not set
# CONFIG_FS_DAX is not set
CONFIG_GENERIC_PINCONF=y
CONFIG_GH_ARM64_DRV=y
CONFIG_GH_CTRL=y
CONFIG_GH_DBL=y
CONFIG_GH_GUEST_POPS=y
CONFIG_GH_IRQ_LEND=y
CONFIG_GH_MEM_NOTIFIER=y
CONFIG_GH_MSGQ=y
CONFIG_GH_PANIC_NOTIFIER=y
CONFIG_GH_RM_DRV=y
CONFIG_GH_TLMM_VM_MEM_ACCESS=y
CONFIG_GH_VIRT_WATCHDOG=y
CONFIG_GKI_HIDDEN_DRM_CONFIGS=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GUNYAH=y
CONFIG_GUNYAH_DRIVERS=y
CONFIG_GUNYAH_PLATFORM_HOOKS=y
CONFIG_GUNYAH_QCOM_PLATFORM=y
CONFIG_HDMI=y
CONFIG_HVC_DRIVER=y
CONFIG_HVC_GUNYAH=y
CONFIG_HVC_GUNYAH_CONSOLE=y
CONFIG_I2C_MSM_GENI=y
CONFIG_INET=y
CONFIG_INET_TABLE_PERTURB_ORDER=16
CONFIG_INTERVAL_TREE=y
CONFIG_IOMMU_IO_PGTABLE=y
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
CONFIG_KCMP=y
CONFIG_LOCALVERSION="-perf"
CONFIG_LRU_GEN=y
# CONFIG_LRU_GEN_ENABLED is not set
# CONFIG_LRU_GEN_STATS is not set
CONFIG_LSM_MMAP_MIN_ADDR=32768
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
CONFIG_MAILBOX=y
CONFIG_MINIDUMP_MAX_ENTRIES=204
CONFIG_MSM_GPI_DMA=y
CONFIG_PID_NS=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MSM=y
CONFIG_PINCTRL_SUN=y
CONFIG_PM_AUTOSLEEP=y
CONFIG_PROC_CHILDREN=y
CONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
CONFIG_QCOM_DMABUF_HEAPS=y
# CONFIG_QCOM_DMABUF_HEAPS_CARVEOUT is not set
# CONFIG_QCOM_DMABUF_HEAPS_CMA is not set
# CONFIG_QCOM_DMABUF_HEAPS_SYSTEM is not set
CONFIG_QCOM_DMABUF_HEAPS_TVM_CARVEOUT=y
# CONFIG_QCOM_DYN_MINIDUMP_STACK is not set
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GENI_SE=y
CONFIG_QCOM_IOMMU_UTIL=y
CONFIG_QCOM_IPCC=y
CONFIG_QCOM_LAZY_MAPPING=y
CONFIG_QCOM_MEM_BUF=y
CONFIG_QCOM_MEM_BUF_DEV=y
CONFIG_QCOM_MEM_BUF_DEV_GH=y
CONFIG_QCOM_MEM_BUF_GH=y
CONFIG_QCOM_MEM_BUF_IPA_RESERVE=y
CONFIG_QCOM_MEM_BUF_MSGQ=y
CONFIG_QCOM_MINIDUMP=y
# CONFIG_QCOM_MINIDUMP_FTRACE is not set
# CONFIG_QCOM_MINIDUMP_PANIC_DUMP is not set
# CONFIG_QCOM_MINIDUMP_PSTORE is not set
CONFIG_QCOM_PANEL_EVENT_NOTIFIER=y
CONFIG_QCOM_SCM=y
CONFIG_QCOM_SI_CORE=y
CONFIG_QCOM_SI_CORE_MEM_OBJECT=y
CONFIG_QCOM_SI_CORE_WQ=y
CONFIG_QCOM_TLMM_VM_IRQCHIP=y
# CONFIG_QCOM_VA_MINIDUMP is not set
CONFIG_QCOM_VM_ALIVE_LOG_DUMPER=y
CONFIG_QCOM_VM_DMESG_DUMPER=y
CONFIG_QCOM_WDT_CORE=y
CONFIG_QMSGQ=y
CONFIG_QMSGQ_GUNYAH=y
CONFIG_QRTR=y
CONFIG_QRTR_GENPOOL=y
CONFIG_QRTR_GUNYAH=y
CONFIG_QRTR_NODE_ID=20
CONFIG_QRTR_WAKEUP_MS=500
CONFIG_QTI_IOMMU_SUPPORT=y
CONFIG_QTVM_IOMMU_TRACE_HOOKS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_SELINUX=y
# CONFIG_SECURITY_SELINUX_AVC_STATS is not set
# CONFIG_SECURITY_SELINUX_DEVELOP is not set
CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_MSM_GENI=y
CONFIG_SYNC_FILE=y
CONFIG_SYS_HYPERVISOR=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_USER_NS=y
CONFIG_VIDEOMODE_HELPERS=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
CONFIG_VIRTIO_MEM=y
CONFIG_VIRT_DRIVERS=y
CONFIG_WANT_DEV_COREDUMP=y
CONFIG_XARRAY_MULTI=y
CONFIG_XOR_BLOCKS=y
CONFIG_ZONE_DEVICE=y
CONFIG_ZRAM=y
CONFIG_ZSMALLOC=y

View File

@@ -0,0 +1,48 @@
# CONFIG_BLK_DEBUG_FS is not set
# CONFIG_CMA_DEBUGFS is not set
CONFIG_CMDLINE="no_hash_pointers"
# CONFIG_CMDLINE_FORCE is not set
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FTRACE is not set
CONFIG_FW_CACHE=y
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_COMPRESS is not set
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_GCOV_KERNEL is not set
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
CONFIG_GH_VIRTIO_DEBUG=y
# CONFIG_GUP_TEST is not set
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IPC_LOGGING is not set
# CONFIG_KPROBES is not set
CONFIG_LOCALVERSION="-debug"
# CONFIG_LOCK_EVENT_COUNTS is not set
# CONFIG_MODULE_DEBUG is not set
CONFIG_MSM_GPI_DMA_DEBUG=y
# CONFIG_NETDEVSIM is not set
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_PM_DEBUG=y
CONFIG_PM_SLEEP_DEBUG=y
# CONFIG_PRINTK_INDEX is not set
# CONFIG_PTDUMP_DEBUGFS is not set
# CONFIG_QCOM_CPUSS_SLEEP_STATS is not set
# CONFIG_QCOM_CPUSS_SLEEP_STATS_V4 is not set
# CONFIG_QCOM_IOMMU_DEBUG is not set
# CONFIG_QCOM_VM_ALIVE_LOG_ENCRYPT is not set
# CONFIG_REGMAP_QTI_DEBUGFS is not set
# CONFIG_SCHED_DEBUG is not set
CONFIG_SECURITY_SELINUX_DEVELOP=y
# CONFIG_SHRINKER_DEBUG is not set
# CONFIG_SLUB_DEBUG is not set
# CONFIG_SW_SYNC is not set
CONFIG_VIRTIO_VSOCKETS=y
CONFIG_WQ_WATCHDOG=y
# CONFIG_ZRAM_MEMORY_TRACKING is not set

View File

@@ -0,0 +1 @@
CONFIG_REGMAP_QTI_DEBUGFS_ALLOW_WRITE=y

View File

@@ -0,0 +1,55 @@
CONFIG_ARCH_X1E80100=y
CONFIG_ARM_SMMU=m
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
CONFIG_ARM_SMMU_QCOM=m
CONFIG_COMMON_CLK_QCOM=m
CONFIG_GH_VIRT_WATCHDOG=m
CONFIG_GUNYAH_DRIVERS=y
CONFIG_HWSPINLOCK_QCOM=m
CONFIG_INTERCONNECT_QCOM_DEBUG=m
CONFIG_IPC_LOGGING=m
CONFIG_MFD_SPMI_PMIC=m
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_NOP_USB_XCEIV=m
CONFIG_PHY_QCOM_UFS=m
CONFIG_PHY_QCOM_UFS_QRBTC_SDM845=m
CONFIG_PINCTRL_MSM=m
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
CONFIG_PINCTRL_X1E80100=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
CONFIG_POWER_RESET_QCOM_PON=m
CONFIG_QCOM_AOSS_QMP=m
CONFIG_QCOM_CLK_RPMH=m
CONFIG_QCOM_COMMAND_DB=m
CONFIG_QCOM_CPUCP=m
CONFIG_QCOM_CPU_VENDOR_HOOKS=m
CONFIG_QCOM_DEBUG_SYMBOL=m
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
CONFIG_QCOM_GDSC_REGULATOR=m
CONFIG_QCOM_IOMMU_DEBUG=m
CONFIG_QCOM_IOMMU_UTIL=m
CONFIG_QCOM_IPCC=m
CONFIG_QCOM_LLCC=m
CONFIG_QCOM_PDC=m
CONFIG_QCOM_RPMH=m
CONFIG_QCOM_SCM=m
CONFIG_QCOM_SMEM=m
CONFIG_QCOM_SOCINFO=m
CONFIG_QCOM_WATCHDOG_BARK_TIME=11000
CONFIG_QCOM_WATCHDOG_IPI_PING=y
CONFIG_QCOM_WATCHDOG_PET_TIME=9360
CONFIG_QCOM_WATCHDOG_WAKEUP_ENABLE=y
CONFIG_QCOM_WDT_CORE=m
CONFIG_REGMAP_QTI_DEBUGFS=m
CONFIG_REGULATOR_DEBUG_CONTROL=m
CONFIG_REGULATOR_PROXY_CONSUMER=m
CONFIG_REGULATOR_RPMH=m
CONFIG_REGULATOR_STUB=m
CONFIG_SCHED_WALT=m
CONFIG_SCSI_UFS_QCOM=m
CONFIG_SPMI_MSM_PMIC_ARB=m
CONFIG_SPMI_MSM_PMIC_ARB_DEBUG=m
CONFIG_USB_DWC3_MSM=m
CONFIG_USB_QCOM_EMU_PHY=m
CONFIG_VIRT_DRIVERS=y

13
arch/arm64/gunyah/Kconfig Normal file
View File

@@ -0,0 +1,13 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "Gunyah arm64 drivers"
config GH_ARM64_DRV
tristate "Gunyah arm64 support"
depends on ARM64
help
Gunyah drivers need arch specific support. Add support for
ARM64 features required by Gunyah virtualizaton drivers. All
arm64 specific features like GIC and reset reasons are handled
by drivers under this config.
endmenu

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_GH_ARM64_DRV) += gh_arm_drv.o
gh_arm_drv-y := gh_arm.o irq.o reset.o
obj-$(CONFIG_GUNYAH) += gunyah_hypercall.o

View File

@@ -0,0 +1,22 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
*/
#include <linux/module.h>
static int __init gh_arm_init(void)
{
return 0;
}
module_init(gh_arm_init);
static void __exit gh_arm_exit(void)
{
}
module_exit(gh_arm_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Gunyah ARM64 Driver");

133
arch/arm64/gunyah/irq.c Normal file
View File

@@ -0,0 +1,133 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
*/
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/irqdomain.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <linux/gunyah/gh_rm_drv.h>
#include <asm/gunyah.h>
#define GIC_V3_SPI_MAX 1019
#define GH_RM_NO_IRQ_ALLOC -1
#define IRQ_OFFSET 32
static DEFINE_IDR(gh_rm_free_virq_idr);
/**
* gh_get_irq: Get a Linux IRQ from a Gunyah-compatible vIRQ
* @virq: Gunyah-compatible vIRQ
* @type: IRQ trigger type (IRQ_TYPE_EDGE_RISING)
* @fw_handle: fw node handle
*
* Returns the mapped Linux IRQ# at Gunyah's IRQ domain (i.e. GIC SPI)
*/
int gh_get_irq(u32 virq, u32 type, struct fwnode_handle *fw_handle)
{
struct irq_fwspec fwspec = {};
int ret;
ret = arch_gunyah_fill_irq_fwspec_params(virq, &fwspec);
if (ret) {
pr_err("Failed to translate interrupt: type: %d virq: %d: ret: %d\n",
type, virq, ret);
return ret;
}
fwspec.fwnode = fw_handle;
fwspec.param[2] = type;
return irq_create_fwspec_mapping(&fwspec);
}
EXPORT_SYMBOL_GPL(gh_get_irq);
/**
* gh_get_virq: Allocate a new IRQ if RM-VM hasn't already done already
* @base_virq: The base virtual IRQ number.
* @virq: The virtual IRQ number.
*
* Returns Gunyah compatible vIRQ to bind to.
*/
int gh_get_virq(int base_virq, int virq)
{
int ret;
/* Get the next free vIRQ.
* Subtract IRQ_OFFSET from the base virq to get the base SPI.
*
* Assoiate the address of the idr variable itself as a lookup
* ptr. This will help us to free the virq later.
*/
ret = virq = idr_alloc(&gh_rm_free_virq_idr,
&gh_rm_free_virq_idr,
base_virq - IRQ_OFFSET,
GIC_V3_SPI_MAX, GFP_KERNEL);
if (ret < 0)
return ret;
/* Add IRQ_OFFSET offset to make interrupt as hwirq */
virq += IRQ_OFFSET;
return virq;
}
EXPORT_SYMBOL_GPL(gh_get_virq);
/**
* gh_put_virq: Deallocates a vIRQ.
* @irq: The IRQ number.
*
* Returns 0 on success and EINVAL if no IRQ was found.
*/
int gh_put_virq(int virq)
{
void *idr_ptr;
int virq_num;
virq_num = virq - IRQ_OFFSET;
/* If the idr_find() returns a valid ptr, it means that the
* virq was allocated by the kernel itself and not by hyp.
* Release the IRQ and free the allocation if that's true.
*/
idr_ptr = idr_find(&gh_rm_free_virq_idr, virq_num);
if (idr_ptr) {
idr_remove(&gh_rm_free_virq_idr, virq_num);
return 0;
}
return -EINVAL;
}
EXPORT_SYMBOL_GPL(gh_put_virq);
/**
* gh_put_irq: Deallocate an Linux IRQ.
* @irq: The IRQ number.
*
* Returns 0 on success and EINVAL if no IRQ was found.
*/
int gh_put_irq(int irq)
{
struct irq_data *irq_data;
unsigned long virq;
if (irq <= 0)
return -EINVAL;
irq_data = irq_get_irq_data(irq);
if (!irq_data)
return -EINVAL;
virq = irq_data->hwirq;
irq_dispose_mapping(irq);
return gh_put_virq(virq);
}
EXPORT_SYMBOL_GPL(gh_put_irq);

48
arch/arm64/gunyah/reset.c Normal file
View File

@@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
*/
#include <linux/gunyah/gh_rm_drv.h>
#include "reset.h"
/**
* gh_arch_validate_vm_exited_notif: Validate the arch specific exit
* reason and provide a generic reason for further use.
* @buff_size: Size of the buffer containing the exit reason
* @hdr_size: Size of the header
* @vm_exited_payload: Struct of exit_reason
*
* If the exit reason is not valid or has an incorrect size, -EINVAL is
* returned, 0 otherwise and also provides a generic reason for exit
* which can be used by drivers.
*/
int gh_arch_validate_vm_exited_notif(size_t payload_size,
struct gh_rm_notif_vm_exited_payload *vm_exited_payload)
{
switch (vm_exited_payload->exit_type) {
case GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET2:
if (payload_size !=
sizeof(*vm_exited_payload) + sizeof(struct gh_vm_exit_reason_psci_sys_reset2)) {
pr_err("%s: Invalid size for type PSCI_SYSTEM_RESET2: %lu\n",
__func__, payload_size);
return -EINVAL;
}
vm_exited_payload->exit_type = GH_RM_VM_EXIT_TYPE_SYSTEM_RESET;
fallthrough;
case GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET:
vm_exited_payload->exit_type = GH_RM_VM_EXIT_TYPE_SYSTEM_RESET;
break;
case GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_OFF:
vm_exited_payload->exit_type = GH_RM_VM_EXIT_TYPE_SYSTEM_OFF;
break;
default:
return -EINVAL;
}
return 0;
}
EXPORT_SYMBOL_GPL(gh_arch_validate_vm_exited_notif);

49
arch/arm64/gunyah/reset.h Normal file
View File

@@ -0,0 +1,49 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
*/
#ifndef __RESET_H
#define __RESET_H
#define GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_OFF 1
#define GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET 2
#define GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET2 3
/* GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET2 */
struct gh_vm_exit_reason_psci_sys_reset2 {
u16 exit_flags;
/* GH_PSCI_SYS_RESET2_EXIT_FLAG_* are bit representations.
* It follows similar flags model as that of VM_EXIT, but
* only if the vendor_reset field in the struct is set
*/
#define GH_PSCI_SYS_RESET2_EXIT_FLAG_TYPE 0x1
#define GH_PSCI_SYS_RESET2_POWEROFF 0 /* Value at bit:0 */
#define GH_PSCI_SYS_RESET2_RESTART 1 /* Value at bit:0 */
#define GH_PSCI_SYS_RESET2_EXIT_FLAG_SYSTEM 0x2
#define GH_PSCI_SYS_RESET2_EXIT_FLAG_WARM 0x4
#define GH_PSCI_SYS_RESET2_EXIT_FLAG_DUMP 0x8
u8 exit_code;
/* Exit codes.
* It follows similar flags model as that of VM_EXIT, but
* only if the vendor_reset field in the struct is set
*/
#define GH_PSCI_SYS_RESET2_CODE_NORMAL 0
#define GH_PSCI_SYS_RESET2_SOFTWARE_ERR 1
#define GH_PSCI_SYS_RESET2_BUS_ERR 2
#define GH_PSCI_SYS_RESET2_DEVICE_ERR 3
u8 reserved:7;
/* If the vendor_reset is set, the above flags and codes apply.
* Else, the entire exit_reason struct is 0, which qualifies as
* PSCI_SYSTEM_WARM_RESET. Hence, first check this field before
* checking others.
*/
u8 vendor_reset:1;
} __packed;
#endif

View File

@@ -0,0 +1,65 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef __ASM_GH_HCALL_H
#define __ASM_GH_HCALL_H
#include <linux/types.h>
#include <linux/gunyah/hcall_common.h>
/**
* _gh_hcall: Performs an AArch64-specific call into hypervisor using Gunyah ABI
* @hcall_num: Hypercall function ID to invoke
* @args: Hypercall argument registers
* @resp: Pointer to location to store response
*/
static inline int _gh_hcall(const gh_hcall_fnid_t hcall_num,
const struct gh_hcall_args args,
struct gh_hcall_resp *resp)
{
uint64_t _x18;
register uint64_t _x0 asm("x0") = args.arg0;
register uint64_t _x1 asm("x1") = args.arg1;
register uint64_t _x2 asm("x2") = args.arg2;
register uint64_t _x3 asm("x3") = args.arg3;
register uint64_t _x4 asm("x4") = args.arg4;
register uint64_t _x5 asm("x5") = args.arg5;
register uint64_t _x6 asm("x6") = args.arg6;
register uint64_t _x7 asm("x7") = args.arg7;
asm volatile (
#if IS_ENABLED(CONFIG_SHADOW_CALL_STACK)
"str x18, [%[_x18]]\n"
#endif
"hvc %[num]\n"
#if IS_ENABLED(CONFIG_SHADOW_CALL_STACK)
"ldr x18, [%[_x18]]\n"
"str xzr, [%[_x18]]\n"
#endif
: "+r"(_x0), "+r"(_x1), "+r"(_x2), "+r"(_x3), "+r"(_x4),
"+r"(_x5), "+r"(_x6), "+r"(_x7)
: [num] "i" (hcall_num), [_x18] "r"(&_x18)
: "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17",
#if !IS_ENABLED(CONFIG_SHADOW_CALL_STACK)
"x18",
#endif
"memory"
);
resp->resp0 = _x0;
resp->resp1 = _x1;
resp->resp2 = _x2;
resp->resp3 = _x3;
resp->resp4 = _x4;
resp->resp5 = _x5;
resp->resp6 = _x6;
resp->resp7 = _x7;
return _x0;
}
#endif

View File

@@ -15,9 +15,6 @@
#include <asm/thread_info.h>
#include <asm/unistd.h>
#ifdef CONFIG_SECURITY_DEFEX
#include <linux/defex.h>
#endif
long compat_arm_syscall(struct pt_regs *regs, int scno);
long sys_ni_syscall(void);
@@ -26,11 +23,7 @@ static long do_ni_syscall(struct pt_regs *regs, int scno)
#ifdef CONFIG_COMPAT
long ret;
if (is_compat_task()) {
#ifdef CONFIG_SECURITY_DEFEX
ret = defex_syscall_enter(scno, regs);
if (!ret)
#endif /* CONFIG_SECURITY_DEFEX */
ret = compat_arm_syscall(regs, scno);
ret = compat_arm_syscall(regs, scno);
if (ret != -ENOSYS)
return ret;
}
@@ -55,11 +48,7 @@ static void invoke_syscall(struct pt_regs *regs, unsigned int scno,
if (scno < sc_nr) {
syscall_fn_t syscall_fn;
syscall_fn = syscall_table[array_index_nospec(scno, sc_nr)];
#ifdef CONFIG_SECURITY_DEFEX
ret = defex_syscall_enter(scno, regs);
if (!ret)
#endif /* CONFIG_SECURITY_DEFEX */
ret = __invoke_syscall(regs, syscall_fn);
ret = __invoke_syscall(regs, syscall_fn);
} else {
ret = do_ni_syscall(regs, scno);
}

View File

@@ -1187,7 +1187,11 @@ int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
unsigned long addr, unsigned long next)
{
vmemmap_verify((pte_t *)pmdp, node, addr, next);
#ifdef CONFIG_ARCH_QTI_VM
return pmd_sect(*pmdp);
#else
return 1;
#endif
}
int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,

View File

@@ -42,7 +42,12 @@ config UML_DMA_EMULATION
config NO_IOMEM
bool "disable IOMEM" if EXPERT
depends on !INDIRECT_IOMEM
default y
default y if !KUNIT
config HAS_IOMEM
bool "Turns on fake IOMEM support for KUnit"
depends on KUNIT
select MOCK_IOMEM
config UML_IOMEM_EMULATION
bool
@@ -225,6 +230,11 @@ config UML_TIME_TRAVEL_SUPPORT
It is safe to say Y, but you probably don't need this.
config PLATFORM_MOCK
bool "Enable a mock architecture used for unit testing."
depends on SEC_KUNIT && OF
default y
config KASAN_SHADOW_OFFSET
hex
depends on KASAN

View File

@@ -0,0 +1,63 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_UM_IO_MOCK_SHARED_H
#define _ASM_UM_IO_MOCK_SHARED_H
#define readb readb
u8 readb(const volatile void __iomem *);
#define readw readw
u16 readw(const volatile void __iomem *);
#define readl readl
u32 readl(const volatile void __iomem *);
#ifdef CONFIG_64BIT
#define readq readq
u64 readq(const volatile void __iomem *);
#endif /* CONFIG_64BIT */
#define writeb writeb
void writeb(u8, const volatile void __iomem *);
#define writew writew
void writew(u16, const volatile void __iomem *);
#define writel writel
void writel(u32, const volatile void __iomem *);
#ifdef CONFIG_64BIT
#define writeq writeq
void writeq(u64, const volatile void __iomem *);
#endif /* CONFIG_64BIT */
#define readb_relaxed readb_relaxed
u8 readb_relaxed(const volatile void __iomem *);
#define readw_relaxed readw_relaxed
u16 readw_relaxed(const volatile void __iomem *);
#define readl_relaxed readl_relaxed
u32 readl_relaxed(const volatile void __iomem *);
#ifdef CONFIG_64BIT
#define readq_relaxed readq_relaxed
u64 readq_relaxed(const volatile void __iomem *);
#endif /* CONFIG_64BIT */
#define writeb_relaxed writeb_relaxed
void writeb_relaxed(u8, const volatile void __iomem *);
#define writew_relaxed writew_relaxed
void writew_relaxed(u16, const volatile void __iomem *);
#define writel_relaxed writel_relaxed
void writel_relaxed(u32, const volatile void __iomem *);
#ifdef CONFIG_64BIT
#define writeq_relaxed writeq_relaxed
void writeq_relaxed(u64, const volatile void __iomem *);
#endif /* CONFIG_64BIT */
#endif /* _ASM_UM_IO_MOCK_SHARED_H */

View File

@@ -0,0 +1,74 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Mock IO functions.
*
* Copyright (C) 2018, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#ifndef _ASM_UM_IO_MOCK_H
#define _ASM_UM_IO_MOCK_H
#include <asm/io-mock-shared.h>
#include <kunit/mock.h>
DECLARE_FUNCTION_MOCK(readb,
RETURNS(u8), PARAMS(const volatile void __iomem *));
DECLARE_FUNCTION_MOCK(readw,
RETURNS(u16), PARAMS(const volatile void __iomem *));
DECLARE_FUNCTION_MOCK(readl,
RETURNS(u32), PARAMS(const volatile void __iomem *));
#ifdef CONFIG_64BIT
DECLARE_FUNCTION_MOCK(readq,
RETURNS(u64), PARAMS(const volatile void __iomem *));
#endif /* CONFIG_64BIT */
DECLARE_FUNCTION_MOCK_VOID_RETURN(writeb,
PARAMS(u8, const volatile void __iomem *));
DECLARE_FUNCTION_MOCK_VOID_RETURN(writew,
PARAMS(u16, const volatile void __iomem *));
DECLARE_FUNCTION_MOCK_VOID_RETURN(writel,
PARAMS(u32, const volatile void __iomem *));
#ifdef CONFIG_64BIT
DECLARE_FUNCTION_MOCK_VOID_RETURN(writeq,
PARAMS(u64, const volatile void __iomem *));
#endif /* CONFIG_64BIT */
DECLARE_FUNCTION_MOCK(readb_relaxed,
RETURNS(u8), PARAMS(const volatile void __iomem *));
DECLARE_FUNCTION_MOCK(readw_relaxed,
RETURNS(u16), PARAMS(const volatile void __iomem *));
DECLARE_FUNCTION_MOCK(readl_relaxed,
RETURNS(u32), PARAMS(const volatile void __iomem *));
#ifdef CONFIG_64BIT
DECLARE_FUNCTION_MOCK(readq_relaxed,
RETURNS(u64), PARAMS(const volatile void __iomem *));
#endif /* CONFIG_64BIT */
DECLARE_FUNCTION_MOCK_VOID_RETURN(writeb_relaxed,
PARAMS(u8, const volatile void __iomem *));
DECLARE_FUNCTION_MOCK_VOID_RETURN(writew_relaxed,
PARAMS(u16, const volatile void __iomem *));
DECLARE_FUNCTION_MOCK_VOID_RETURN(writel_relaxed,
PARAMS(u32, const volatile void __iomem *));
#ifdef CONFIG_64BIT
DECLARE_FUNCTION_MOCK_VOID_RETURN(writeq_relaxed,
PARAMS(u64, const volatile void __iomem *));
#endif /* CONFIG_64BIT */
#endif /* _ASM_UM_IO_MOCK_H */

View File

@@ -2,6 +2,11 @@
#ifndef _ASM_UM_IO_H
#define _ASM_UM_IO_H
#include <linux/types.h>
#include <asm/byteorder.h>
#if IS_ENABLED(CONFIG_PLATFORM_MOCK)
#include <asm/io-mock-shared.h>
#endif
/* get emulated iomem (if desired) */
#include <asm-generic/logic_io.h>
@@ -13,6 +18,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
return NULL;
}
#endif /* ioremap */
#define ioremap_nocache ioremap
#ifndef iounmap
#define iounmap iounmap

View File

@@ -26,6 +26,7 @@ obj-$(CONFIG_OF) += dtb.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_GENERIC_PCI_IOMAP) += ioport.o
obj-$(CONFIG_PLATFORM_MOCK) += io-mock.o
USER_OBJS := config.o

40
arch/um/kernel/io-mock.c Normal file
View File

@@ -0,0 +1,40 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Mock IO functions.
*
* Copyright (C) 2018, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <linux/mm.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <kunit/mock.h>
DEFINE_FUNCTION_MOCK(readb,
RETURNS(u8), PARAMS(const volatile void __iomem *));
DEFINE_FUNCTION_MOCK(readw,
RETURNS(u16), PARAMS(const volatile void __iomem *));
DEFINE_FUNCTION_MOCK(readl,
RETURNS(u32), PARAMS(const volatile void __iomem *));
#ifdef CONFIG_64BIT
DEFINE_FUNCTION_MOCK(readq,
RETURNS(u64), PARAMS(const volatile void __iomem *));
#endif /* CONFIG_64BIT */
DEFINE_FUNCTION_MOCK_VOID_RETURN(writeb,
PARAMS(u8, const volatile void __iomem *));
DEFINE_FUNCTION_MOCK_VOID_RETURN(writew,
PARAMS(u16, const volatile void __iomem *));
DEFINE_FUNCTION_MOCK_VOID_RETURN(writel,
PARAMS(u32, const volatile void __iomem *));
#ifdef CONFIG_64BIT
DEFINE_FUNCTION_MOCK_VOID_RETURN(writeq,
PARAMS(u64, const volatile void __iomem *));
#endif /* CONFIG_64BIT */

75
avb_boot_img.bzl Normal file
View File

@@ -0,0 +1,75 @@
def sign_boot_img(ctx):
inputs = []
inputs += ctx.files.artifacts
inputs += ctx.files.avbtool
inputs += ctx.files.key
outputs = ctx.actions.declare_file("{}/boot.img".format(ctx.label.name))
for artifact in ctx.files.artifacts:
if artifact.basename == "boot.img":
boot_img = artifact
break
if not boot_img:
fail("artifacts must include file named \"boot.img\"")
proplist = " ".join(["--prop {}".format(x) for x in ctx.attr.props])
command = """
cp {boot_img} {boot_dir}/{boot_name}
{tool} add_hash_footer --image {boot_dir}/{boot_name} --algorithm SHA256_RSA4096 \
--key {key} --partition_size 100663296 --partition_name boot \
{proplist}
""".format(
boot_img = boot_img.path,
tool = ctx.file.avbtool.path,
key = ctx.file.key.path,
boot_dir = outputs.dirname,
boot_name = outputs.basename,
boot_partition_size = ctx.attr.boot_partition_size,
proplist = proplist,
)
ctx.actions.run_shell(
mnemonic = "SignBootImg",
inputs = inputs,
outputs = [outputs],
command = command,
progress_message = "Signing boot image from artifacts",
)
return [
DefaultInfo(
files = depset([outputs]),
),
]
avb_sign_boot_image = rule(
implementation = sign_boot_img,
doc = "Sign the boot image present in artifacts",
attrs = {
"artifacts": attr.label(
mandatory = True,
allow_files = True,
),
"avbtool": attr.label(
mandatory = True,
allow_single_file = True,
),
"key": attr.label(
mandatory = True,
allow_single_file = True,
),
"boot_partition_size": attr.int(
mandatory = False,
default = 0x6000000, # bytes, = 98304 kb
doc = "Final size of boot.img desired",
),
"props": attr.string_list(
mandatory = True,
allow_empty = False,
doc = "List of key:value pairs",
),
},
)

189
bazel.WORKSPACE Normal file
View File

@@ -0,0 +1,189 @@
# Copyright (C) 2021 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
### build/kernel/kleaf/bazel.WORKSPACE contents ###
load("//build/kernel/kleaf:workspace.bzl", "define_kleaf_workspace")
define_kleaf_workspace()
# Optional epilog for analysis testing.
load("//build/kernel/kleaf:workspace_epilog.bzl", "define_kleaf_workspace_epilog")
define_kleaf_workspace_epilog()
### Qualcomm customizations ###
new_local_repository(
name = "dtc",
path = "external/dtc",
build_file_content = """
cc_library(
name = "libfdt",
copts = [
"-Werror",
"-Wno-macro-redefined",
"-Wno-sign-compare",
],
includes = ["libfdt"],
srcs = glob([
"libfdt/*.h",
"libfdt/*.c",
]),
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
copts = [
"-Wall",
"-Werror",
"-Wno-sign-compare",
"-Wno-missing-field-initializers",
"-Wno-unused-parameter",
]
genrule(
name = "lexer",
srcs = ["dtc-lexer.l"],
outs = ["dtc-lexer.lex.c"],
cmd = "lex -o$@ $(location dtc-lexer.l)"
)
genrule(
name = "parser",
srcs = ["dtc-parser.y"],
outs = ["dtc-parser.tab.c", "dtc-parser.tab.h"],
cmd = \"\"\"
bison -b dtc-parser -d $(location dtc-parser.y)
cp ./*.tab.c $(location dtc-parser.tab.c)
cp ./*.tab.h $(location dtc-parser.tab.h)
\"\"\",
)
cc_library(
name = "dtc_gen",
copts = copts,
srcs = [
":lexer",
":parser",
] + glob(["*.h"]),
includes = ["."],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "dtc",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"checks.c",
"data.c",
"dtc.c",
"flattree.c",
"fstree.c",
"livetree.c",
"srcpos.c",
"treesource.c",
"util.c",
] + glob(["*.h"]),
includes = ["."],
deps = [":libfdt", ":dtc_gen"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtget",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtget.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtput",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtput.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtdump",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtdump.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtoverlay",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtoverlay.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
cc_binary(
name = "fdtoverlaymerge",
copts = copts,
defines = ["NO_YAML"],
srcs = [
"fdtoverlaymerge.c",
"util.c",
"util.h",
"version_non_gen.h",
],
deps = [":libfdt"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
exports_files([
"libfdt/fdt.h",
"libfdt/libfdt.h",
"libfdt/libfdt_env.h",
])
"""
)

View File

@@ -208,6 +208,29 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
by falling back to the kernel crypto API when inline
encryption hardware is not present.
config BLK_SEC_COMMON
tristate "Samsung specific module in block layer"
default n
help
Say Y here if you want to be enable samsung specific module
in block layer.
config BLK_SEC_STATS
tristate "Samsung statistics module in block layer"
default n
select BLK_SEC_COMMON
help
Say Y here if you want to be enable samsung statistics module
in block layer.
config BLK_SEC_WB
tristate "Samsung Write Booster module in block layer"
default n
select BLK_SEC_COMMON
help
Say Y here if you want to be enable samsung write booster module
in block layer.
source "block/partitions/Kconfig"
config BLK_MQ_PCI
@@ -221,11 +244,6 @@ config BLK_MQ_VIRTIO
config BLK_PM
def_bool PM
config BLOCK_SUPPORT_STLOG
bool "Enable storage log"
depends on BLOCK && PROC_STLOG
default y
# do not use in new code
config BLOCK_HOLDER_DEPRECATED
bool

View File

@@ -44,4 +44,25 @@ config BFQ_CGROUP_DEBUG
Enable some debugging help. Currently it exports additional stat
files in a cgroup which can be useful for debugging.
config MQ_IOSCHED_SSG
tristate "SamSung Generic I/O scheduler"
default n
help
SamSung Generic IO scheduler.
config MQ_IOSCHED_SSG_CGROUP
tristate "Control Group for SamSung Generic I/O scheduler"
default n
depends on BLK_CGROUP
depends on MQ_IOSCHED_SSG
help
Control Group for SamSung Generic IO scheduler.
config MQ_IOSCHED_SSG_WB
tristate "Write Booster for SamSung Generic I/O scheduler"
default n
depends on MQ_IOSCHED_SSG
help
Write Booster for SamSung Generic IO scheduler.
endmenu

View File

@@ -25,6 +25,10 @@ obj-$(CONFIG_MQ_IOSCHED_DEADLINE) += mq-deadline.o
obj-$(CONFIG_MQ_IOSCHED_KYBER) += kyber-iosched.o
bfq-y := bfq-iosched.o bfq-wf2q.o bfq-cgroup.o
obj-$(CONFIG_IOSCHED_BFQ) += bfq.o
ssg-$(CONFIG_MQ_IOSCHED_SSG) := ssg-iosched.o ssg-stat.o
ssg-$(CONFIG_MQ_IOSCHED_SSG_CGROUP) += ssg-cgroup.o
ssg-$(CONFIG_MQ_IOSCHED_SSG_WB) += ssg-wb.o
obj-$(CONFIG_MQ_IOSCHED_SSG) += ssg.o
obj-$(CONFIG_BLK_DEV_INTEGRITY) += bio-integrity.o blk-integrity.o
obj-$(CONFIG_BLK_DEV_INTEGRITY_T10) += t10-pi.o
@@ -40,3 +44,7 @@ obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += blk-crypto.o blk-crypto-profile.o \
blk-crypto-sysfs.o
obj-$(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) += blk-crypto-fallback.o
obj-$(CONFIG_BLOCK_HOLDER_DEPRECATED) += holder.o
obj-$(CONFIG_BLK_SEC_COMMON) += blk-sec-common.o
blk-sec-stats-$(CONFIG_BLK_SEC_STATS) := blk-sec-stat.o blk-sec-stat-pio.o blk-sec-stat-traffic.o
obj-$(CONFIG_BLK_SEC_STATS) += blk-sec-stats.o
obj-$(CONFIG_BLK_SEC_WB) += blk-sec-wb.o

View File

@@ -25,10 +25,6 @@
#include "blk-rq-qos.h"
#include "blk-cgroup.h"
#ifdef CONFIG_DDAR
extern int fscrypt_dd_encrypted(struct bio_vec *bv);
#endif
#define ALLOC_CACHE_THRESHOLD 16
#define ALLOC_CACHE_MAX 256
@@ -934,10 +930,6 @@ static bool bvec_try_merge_page(struct bio_vec *bv, struct page *page,
return false;
}
#ifdef CONFIG_DDAR
if ((*same_page == false) && fscrypt_dd_encrypted(bv))
return false;
#endif
bv->bv_len += len;
return true;
}

271
block/blk-sec-common.c Normal file
View File

@@ -0,0 +1,271 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Samsung specific module in block layer
*
* Copyright (C) 2021 Manjong Lee <mj0123.lee@samsung.com>
* Copyright (C) 2021 Junho Kim <junho89.kim@samsung.com>
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
* Copyright (C) 2021 Seunghwan Hyun <seunghwan.hyun@samsung.com>
* Copyright (C) 2021 Tran Xuan Nam <nam.tx2@samsung.com>
*/
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/part_stat.h>
#if IS_ENABLED(CONFIG_DRV_SAMSUNG)
#include <linux/sec_class.h>
#else
static struct class *blk_sec_class;
#endif
#include "blk-sec.h"
#include "../drivers/ufs/host/ufs-sec-feature.h"
struct disk_info {
/* fields related with target device itself */
struct gendisk *gd;
struct request_queue *queue;
};
struct device *blk_sec_dev;
EXPORT_SYMBOL(blk_sec_dev);
struct workqueue_struct *blk_sec_common_wq;
EXPORT_SYMBOL(blk_sec_common_wq);
static struct disk_info internal_disk;
static unsigned int internal_min_size_mb = 10 * 1024; /* 10GB */
static char manual_hcgc_status[32] = "off";
#define SECTORS2MB(x) ((x) / 2 / 1024)
#define SCSI_DISK0_MAJOR 8
#define MMC_BLOCK_MAJOR 179
#define MAJOR8_DEV_NUM 16 /* maximum number of minor devices in scsi disk0 */
#define SCSI_MINORS 16 /* first minor number of scsi disk0 */
#define MMC_TARGET_DEV 16 /* number of mmc devices set of target (maximum 256) */
#define MMC_MINORS 8 /* first minor number of mmc disk */
static bool is_internal_bdev(struct block_device *dev)
{
int size_mb;
if (bdev_is_partition(dev))
return false;
if (dev->bd_disk->flags & GENHD_FL_REMOVABLE)
return false;
size_mb = SECTORS2MB(get_capacity(dev->bd_disk));
if (size_mb >= internal_min_size_mb)
return true;
return false;
}
static struct gendisk *find_internal_disk(void)
{
struct block_device *bdev;
struct gendisk *gd = NULL;
int idx;
dev_t devno = MKDEV(0, 0);
for (idx = 0; idx < MAJOR8_DEV_NUM; idx++) {
devno = MKDEV(SCSI_DISK0_MAJOR, SCSI_MINORS * idx);
bdev = blkdev_get_by_dev(devno, BLK_OPEN_READ, NULL, NULL);
if (IS_ERR(bdev))
continue;
if (bdev->bd_disk && is_internal_bdev(bdev))
gd = bdev->bd_disk;
blkdev_put(bdev, NULL);
if (gd)
return gd;
}
for (idx = 0; idx < MMC_TARGET_DEV; idx++) {
devno = MKDEV(MMC_BLOCK_MAJOR, MMC_MINORS * idx);
bdev = blkdev_get_by_dev(devno, BLK_OPEN_READ, NULL, NULL);
if (IS_ERR(bdev))
continue;
if (bdev->bd_disk && is_internal_bdev(bdev))
gd = bdev->bd_disk;
blkdev_put(bdev, NULL);
if (gd)
return gd;
}
return NULL;
}
static inline int init_internal_disk_info(void)
{
if (!internal_disk.gd) {
internal_disk.gd = find_internal_disk();
if (unlikely(!internal_disk.gd)) {
pr_err("%s: can't find internal disk\n", __func__);
return -ENODEV;
}
internal_disk.queue = internal_disk.gd->queue;
}
return 0;
}
static inline void clear_internal_disk_info(void)
{
internal_disk.gd = NULL;
internal_disk.queue = NULL;
}
struct gendisk *blk_sec_internal_disk(void)
{
if (unlikely(!internal_disk.gd))
init_internal_disk_info();
return internal_disk.gd;
}
EXPORT_SYMBOL(blk_sec_internal_disk);
static int blk_sec_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
return add_uevent_var(env, "DEVNAME=%s", dev->kobj.name);
}
static struct device_type blk_sec_type = {
.uevent = blk_sec_uevent,
};
static ssize_t manual_hcgc_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
return scnprintf(buf, PAGE_SIZE, "%s\n", manual_hcgc_status);
}
static ssize_t manual_hcgc_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{
#define BUF_SIZE 32
char hcgc_str[BUF_SIZE];
char *envp[] = { "NAME=HCGC_BKL_SEC", hcgc_str, NULL, };
if (!ufs_sec_is_hcgc_allowed())
return -EOPNOTSUPP;
if (strncmp(buf, "on", 2) && strncmp(buf, "off", 3) &&
strncmp(buf, "done", 4) && strncmp(buf, "disable", 7) && strncmp(buf, "enable", 6))
return -EINVAL;
if (!strncmp(manual_hcgc_status, "disable", 7) && strncmp(buf, "enable", 6))
return -EINVAL;
memset(manual_hcgc_status, 0, BUF_SIZE);
if (!strncmp(buf, "done", 4)) {
strncpy(manual_hcgc_status, buf, BUF_SIZE - 1);
return count;
}
snprintf(hcgc_str, BUF_SIZE, "MANUAL_HCGC=%s", buf);
kobject_uevent_env(&blk_sec_dev->kobj, KOBJ_CHANGE, envp);
if (!strncmp(buf, "enable", 6))
strncpy(manual_hcgc_status, "off", BUF_SIZE - 1);
else
strncpy(manual_hcgc_status, buf, BUF_SIZE - 1);
return count;
}
static struct kobj_attribute manual_hcgc_attr = __ATTR(manual_hcgc, 0600, manual_hcgc_show, manual_hcgc_store);
static const struct attribute *blk_sec_attrs[] = {
&manual_hcgc_attr.attr,
NULL,
};
static struct kobject *blk_sec_kobj;
static int __init blk_sec_common_init(void)
{
int retval;
#if IS_ENABLED(CONFIG_DRV_SAMSUNG)
blk_sec_dev = sec_device_create(NULL, "blk_sec");
if (IS_ERR(blk_sec_dev)) {
pr_err("%s: Failed to create blk_sec device\n", __func__);
return PTR_ERR(blk_sec_dev);
}
#else
blk_sec_class = class_create("blk_sec");
if (IS_ERR(blk_sec_class)) {
pr_err("%s: couldn't create blk_sec class\n", __func__);
return PTR_ERR(blk_sec_class);
}
blk_sec_dev = device_create(blk_sec_class, NULL, MKDEV(0, 0), NULL, "blk_sec");
if (IS_ERR(blk_sec_dev)) {
pr_err("%s: Failed to create blk_sec device\n", __func__);
class_destroy(blk_sec_class);
return PTR_ERR(blk_sec_dev);
}
#endif
blk_sec_dev->type = &blk_sec_type;
blk_sec_kobj = kobject_create_and_add("blk_sec", kernel_kobj);
if (!blk_sec_kobj)
goto destroy_device;
if (sysfs_create_files(blk_sec_kobj, blk_sec_attrs)) {
kobject_put(blk_sec_kobj);
goto destroy_device;
}
blk_sec_common_wq = create_freezable_workqueue("blk_sec_common");
retval = init_internal_disk_info();
if (retval) {
clear_internal_disk_info();
pr_err("%s: Can't find internal disk info!", __func__);
}
return 0;
destroy_device:
#if IS_ENABLED(CONFIG_DRV_SAMSUNG)
sec_device_destroy(blk_sec_dev->devt);
#else
device_destroy(blk_sec_class, MKDEV(0, 0));
class_destroy(blk_sec_class);
#endif
return -ENOMEM;
}
static void __exit blk_sec_common_exit(void)
{
#if IS_ENABLED(CONFIG_DRV_SAMSUNG)
sec_device_destroy(blk_sec_dev->devt);
#else
device_destroy(blk_sec_class, MKDEV(0, 0));
class_destroy(blk_sec_class);
#endif
sysfs_remove_files(blk_sec_kobj, blk_sec_attrs);
kobject_put(blk_sec_kobj);
clear_internal_disk_info();
}
module_init(blk_sec_common_init);
module_exit(blk_sec_common_exit);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Changheun Lee <nanich.lee@samsung.com>");
MODULE_DESCRIPTION("Samsung specific module in block layer");
MODULE_VERSION("1.0");

354
block/blk-sec-stat-pio.c Normal file
View File

@@ -0,0 +1,354 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Samsung Block Statistics
*
* Copyright (C) 2021 Manjong Lee <mj0123.lee@samsung.com>
* Copyright (C) 2021 Junho Kim <junho89.kim@samsung.com>
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
* Copyright (C) 2021 Seunghwan Hyun <seunghwan.hyun@samsung.com>
* Copyright (C) 2021 Tran Xuan Nam <nam.tx2@samsung.com>
*/
#include <linux/sysfs.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include "blk-sec.h"
#define MAX_PIO_NODE_NUM 10000
#define SORT_PIO_NODE_NUM 100
#define PIO_HASH_SIZE 100
#define MAX_PIO_DURATION_MS 10000
#define GET_HASH_KEY(tgid) ((unsigned int)(tgid) % PIO_HASH_SIZE)
#define RESET_PIO_IO(pio) \
do { \
atomic_set(&(pio)->kb[REQ_OP_READ], 0); \
atomic_set(&(pio)->kb[REQ_OP_WRITE], 0); \
atomic_set(&(pio)->kb[REQ_OP_FLUSH], 0); \
atomic_set(&(pio)->kb[REQ_OP_DISCARD], 0); \
} while (0)
#define GET_PIO_PRIO(pio) \
(atomic_read(&(pio)->kb[REQ_OP_READ]) + \
atomic_read(&(pio)->kb[REQ_OP_WRITE]) * 2)
LIST_HEAD(pio_list);
LIST_HEAD(inflight_pios);
static DEFINE_SPINLOCK(pio_list_lock);
static DEFINE_SPINLOCK(inflight_pios_lock);
static int pio_cnt;
static int pio_enabled;
static unsigned int pio_duration_ms = 5000;
static unsigned long pio_timeout;
static struct kmem_cache *pio_cache;
static struct pio_node *pio_hash[PIO_HASH_SIZE];
static struct pio_node others;
static struct pio_node *add_pio_node(struct request *rq,
struct task_struct *gleader)
{
struct pio_node *pio = NULL;
unsigned int hash_key = 0;
if (pio_cnt >= MAX_PIO_NODE_NUM) {
add_others:
return &others;
}
pio = kmem_cache_alloc(pio_cache, GFP_NOWAIT);
if (!pio)
goto add_others;
INIT_LIST_HEAD(&pio->list);
pio->tgid = task_tgid_nr(gleader);
strncpy(pio->name, gleader->comm, TASK_COMM_LEN - 1);
pio->name[TASK_COMM_LEN - 1] = '\0';
pio->start_time = gleader->start_time;
RESET_PIO_IO(pio);
atomic_set(&pio->ref_count, 1);
hash_key = GET_HASH_KEY(pio->tgid);
spin_lock(&pio_list_lock);
list_add(&pio->list, &pio_list);
pio->h_next = pio_hash[hash_key];
pio_hash[hash_key] = pio;
pio_cnt++;
spin_unlock(&pio_list_lock);
return pio;
}
static struct pio_node *find_pio_node(pid_t tgid, u64 tg_start_time)
{
struct pio_node *pio;
for (pio = pio_hash[GET_HASH_KEY(tgid)]; pio; pio = pio->h_next) {
if (pio->tgid != tgid)
continue;
if (pio->start_time != tg_start_time)
continue;
return pio;
}
return NULL;
}
static void free_pio_nodes(struct list_head *remove_list)
{
struct pio_node *pio;
struct pio_node *pion;
/* move previous inflight pios to remove_list */
spin_lock(&inflight_pios_lock);
list_splice_init(&inflight_pios, remove_list);
spin_unlock(&inflight_pios_lock);
list_for_each_entry_safe(pio, pion, remove_list, list) {
list_del(&pio->list);
if (atomic_read(&pio->ref_count)) {
spin_lock(&inflight_pios_lock);
list_add(&pio->list, &inflight_pios);
spin_unlock(&inflight_pios_lock);
continue;
}
kmem_cache_free(pio_cache, pio);
}
}
struct pio_node *get_pio_node(struct request *rq)
{
struct task_struct *gleader = current->group_leader;
struct pio_node *pio;
if (pio_enabled == 0)
return NULL;
if (time_after(jiffies, pio_timeout))
return NULL;
if (req_op(rq) > REQ_OP_DISCARD)
return NULL;
spin_lock(&pio_list_lock);
pio = find_pio_node(task_tgid_nr(gleader), gleader->start_time);
if (pio) {
atomic_inc(&pio->ref_count);
spin_unlock(&pio_list_lock);
return pio;
}
spin_unlock(&pio_list_lock);
return add_pio_node(rq, gleader);
}
void update_pio_node(struct request *rq,
unsigned int data_size, struct pio_node *pio)
{
if (!pio)
return;
/* transfer bytes to kbytes via '>> 10' */
atomic_add((req_op(rq) == REQ_OP_FLUSH) ? 1 : data_size >> 10,
&pio->kb[req_op(rq)]);
}
void put_pio_node(struct pio_node *pio)
{
if (!pio)
return;
atomic_dec(&pio->ref_count);
}
static void sort_pios(struct list_head *pios)
{
struct pio_node *max_pio = NULL;
struct pio_node *pio;
unsigned long long max = 0;
LIST_HEAD(sorted_list);
int i;
for (i = 0; i < SORT_PIO_NODE_NUM; i++) {
list_for_each_entry(pio, pios, list) {
if (GET_PIO_PRIO(pio) > max) {
max = GET_PIO_PRIO(pio);
max_pio = pio;
}
}
if (max_pio != NULL)
list_move_tail(&max_pio->list, &sorted_list);
max = 0;
max_pio = NULL;
}
list_splice_init(&sorted_list, pios);
}
static ssize_t pio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
LIST_HEAD(curr_pios);
int curr_pio_cnt;
struct pio_node curr_others;
struct pio_node *pio;
int len = 0;
spin_lock(&pio_list_lock);
list_replace_init(&pio_list, &curr_pios);
curr_pio_cnt = pio_cnt;
curr_others = others;
memset(pio_hash, 0x0, sizeof(pio_hash));
pio_cnt = 0;
RESET_PIO_IO(&others);
spin_unlock(&pio_list_lock);
if (curr_pio_cnt > SORT_PIO_NODE_NUM)
sort_pios(&curr_pios);
list_for_each_entry(pio, &curr_pios, list) {
if (PAGE_SIZE - len > 80) {
len += scnprintf(buf + len, PAGE_SIZE - len,
"%d %d %d %s\n",
pio->tgid,
atomic_read(&pio->kb[REQ_OP_READ]),
atomic_read(&pio->kb[REQ_OP_WRITE]),
(pio->name[0]) ? pio->name : "-");
continue;
}
atomic_add(atomic_read(&pio->kb[REQ_OP_READ]),
&curr_others.kb[REQ_OP_READ]);
atomic_add(atomic_read(&pio->kb[REQ_OP_WRITE]),
&curr_others.kb[REQ_OP_WRITE]);
atomic_add(atomic_read(&pio->kb[REQ_OP_FLUSH]),
&curr_others.kb[REQ_OP_FLUSH]);
atomic_add(atomic_read(&pio->kb[REQ_OP_DISCARD]),
&curr_others.kb[REQ_OP_DISCARD]);
}
if (atomic_read(&curr_others.kb[REQ_OP_READ]) +
atomic_read(&curr_others.kb[REQ_OP_WRITE]))
len += scnprintf(buf + len, PAGE_SIZE - len,
"%d %d %d %s\n",
curr_others.tgid,
atomic_read(&curr_others.kb[REQ_OP_READ]),
atomic_read(&curr_others.kb[REQ_OP_WRITE]),
curr_others.name);
free_pio_nodes(&curr_pios);
pio_timeout = jiffies + msecs_to_jiffies(pio_duration_ms);
return len;
}
static ssize_t pio_enabled_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{
LIST_HEAD(curr_pios);
int enable = 0;
int ret;
ret = kstrtoint(buf, 10, &enable);
if (ret)
return ret;
pio_enabled = (enable >= 1) ? 1 : 0;
spin_lock(&pio_list_lock);
list_replace_init(&pio_list, &curr_pios);
memset(pio_hash, 0x0, sizeof(pio_hash));
pio_cnt = 0;
RESET_PIO_IO(&others);
spin_unlock(&pio_list_lock);
free_pio_nodes(&curr_pios);
pio_timeout = jiffies + msecs_to_jiffies(pio_duration_ms);
return count;
}
static ssize_t pio_enabled_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
int len = 0;
len = scnprintf(buf, PAGE_SIZE, "%d\n", pio_enabled);
return len;
}
static ssize_t pio_duration_ms_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{
int ret;
ret = kstrtoint(buf, 10, &pio_duration_ms);
if (ret)
return ret;
if (pio_duration_ms > MAX_PIO_DURATION_MS)
pio_duration_ms = MAX_PIO_DURATION_MS;
return count;
}
static ssize_t pio_duration_ms_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
int len = 0;
len = scnprintf(buf, PAGE_SIZE, "%u\n", pio_duration_ms);
return len;
}
static struct kobj_attribute pios_attr = __ATTR(pios, 0444, pio_show, NULL);
static struct kobj_attribute pios_enable_attr = __ATTR(pios_enable, 0644,
pio_enabled_show, pio_enabled_store);
static struct kobj_attribute pios_duration_ms_attr = __ATTR(pios_duration_ms, 0644,
pio_duration_ms_show, pio_duration_ms_store);
static const struct attribute *blk_sec_stat_pio_attrs[] = {
&pios_attr.attr,
&pios_enable_attr.attr,
&pios_duration_ms_attr.attr,
NULL,
};
int blk_sec_stat_pio_init(struct kobject *kobj)
{
int retval;
if (!kobj)
return -EINVAL;
pio_cache = kmem_cache_create("pio_node", sizeof(struct pio_node), 0, 0, NULL);
if (!pio_cache)
return -ENOMEM;
retval = sysfs_create_files(kobj, blk_sec_stat_pio_attrs);
if (retval) {
kmem_cache_destroy(pio_cache);
return retval;
}
/* init others */
INIT_LIST_HEAD(&others.list);
others.tgid = INT_MAX;
strncpy(others.name, "others", TASK_COMM_LEN - 1);
others.name[TASK_COMM_LEN - 1] = '\0';
others.start_time = 0;
RESET_PIO_IO(&others);
atomic_set(&others.ref_count, 1);
others.h_next = NULL;
return 0;
}
void blk_sec_stat_pio_exit(struct kobject *kobj)
{
if (!kobj)
return;
sysfs_remove_files(kobj, blk_sec_stat_pio_attrs);
kmem_cache_destroy(pio_cache);
}

View File

@@ -0,0 +1,328 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Samsung Block Statistics
*
* Copyright (C) 2021 Manjong Lee <mj0123.lee@samsung.com>
* Copyright (C) 2021 Junho Kim <junho89.kim@samsung.com>
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
* Copyright (C) 2021 Seunghwan Hyun <seunghwan.hyun@samsung.com>
* Copyright (C) 2021 Tran Xuan Nam <nam.tx2@samsung.com>
*/
#include <linux/sysfs.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/cpufreq.h>
#include <linux/log2.h>
#include <linux/pm_qos.h>
#include "blk-sec.h"
struct traffic {
u64 transferred_bytes;
int level;
int io_cpus;
unsigned int timestamp;
struct work_struct update_work;
struct delayed_work notify_work;
};
static DEFINE_PER_CPU(u64, transferred_bytes);
static DEFINE_PER_CPU(struct freq_qos_request, cpufreq_req);
static struct pm_qos_request cpu_pm_req;
static unsigned int interval_ms = 1000;
static unsigned int interval_bytes = 100 * 1024 * 1024;
static struct traffic traffic;
static DEFINE_PER_CPU(u32, cpu_count);
static DEFINE_PER_CPU(u32, prev_cpu_count);
#define TL0_UEVENT_DELAY_MS 2000
#define UPDATE_WORK_TO_TRAFFIC(work) \
container_of(work, struct traffic, update_work)
#define NOTIFY_WORK_TO_TRAFFIC(work) \
container_of(to_delayed_work(work), struct traffic, notify_work)
static u64 get_transferred_bytes(void)
{
u64 bytes = 0;
int cpu;
for_each_possible_cpu(cpu)
bytes += per_cpu(transferred_bytes, cpu);
return bytes;
}
static int get_io_cpus(void)
{
int i, cpus = 0;
u32 count, prev_count;
for_each_possible_cpu(i) {
count = per_cpu(cpu_count, i);
prev_count = per_cpu(prev_cpu_count, i);
cpus = cpus | ((!!(count - prev_count)) << i);
*per_cpu_ptr(&prev_cpu_count, i) = count;
}
return cpus;
}
/*
* Convert throughput to level. Level is defined as below:
* 0: 0 - "< 100" MB/s
* 1: 100 - "< 200" MB/s
* 2: 200 - "< 400" MB/s
* 3: 400 - "< 800" MB/s
* ...so on
*/
static int tp2level(int tput)
{
if (tput < 100)
return 0;
return (int) ilog2(tput / 100) + 1;
}
static void notify_traffic_level(struct traffic *traffic)
{
#define BUF_SIZE 16
char level_str[BUF_SIZE];
char io_cpus_str[BUF_SIZE];
char *envp[] = { "NAME=IO_TRAFFIC", level_str, io_cpus_str, NULL, };
int ret;
if (IS_ERR_OR_NULL(blk_sec_dev))
return;
memset(level_str, 0, BUF_SIZE);
memset(io_cpus_str, 0, BUF_SIZE);
snprintf(level_str, BUF_SIZE, "LEVEL=%d", traffic->level);
snprintf(io_cpus_str, BUF_SIZE, "IO_CPUS=%x", traffic->io_cpus);
ret = kobject_uevent_env(&blk_sec_dev->kobj, KOBJ_CHANGE, envp);
if (ret)
pr_err("%s: couldn't send uevent (%d)", __func__, ret);
}
#define MB(x) ((x) / 1024 / 1024)
static void update_traffic_level(struct work_struct *work)
{
struct traffic *traffic = UPDATE_WORK_TO_TRAFFIC(work);
struct traffic old = *traffic;
unsigned int duration_ms;
u64 amount;
int tput;
int delay = 0;
traffic->transferred_bytes = get_transferred_bytes();
traffic->timestamp = jiffies_to_msecs(jiffies);
traffic->io_cpus |= get_io_cpus();
duration_ms = traffic->timestamp - old.timestamp;
if (unlikely(!duration_ms))
duration_ms = jiffies_to_msecs(1);
amount = traffic->transferred_bytes - old.transferred_bytes;
tput = MB(amount) * 1000 / duration_ms;
traffic->level = tp2level(tput);
if (traffic->level == 0) {
traffic->io_cpus = 0;
delay = msecs_to_jiffies(TL0_UEVENT_DELAY_MS);
}
if (!!traffic->level == !!old.level &&
(traffic->level == 0 || traffic->io_cpus == old.io_cpus))
return;
cancel_delayed_work_sync(&traffic->notify_work);
queue_delayed_work(system_highpri_wq, &traffic->notify_work, delay);
}
static void send_uevent(struct work_struct *work)
{
struct traffic *traffic = NOTIFY_WORK_TO_TRAFFIC(work);
notify_traffic_level(traffic);
}
void blk_sec_stat_traffic_prepare(struct request *rq)
{
this_cpu_inc(cpu_count);
}
void blk_sec_stat_traffic_update(struct request *rq, unsigned int data_size)
{
unsigned int duration_ms;
u64 amount;
if (req_op(rq) > REQ_OP_WRITE)
return;
this_cpu_add(transferred_bytes, data_size);
this_cpu_inc(cpu_count);
duration_ms = jiffies_to_msecs(jiffies) - traffic.timestamp;
amount = get_transferred_bytes() - traffic.transferred_bytes;
if ((duration_ms < interval_ms) && (amount < interval_bytes))
return;
queue_work(system_highpri_wq, &traffic.update_work);
}
static void init_traffic(struct traffic *traffic)
{
traffic->transferred_bytes = 0;
traffic->level = 0;
traffic->io_cpus = 0;
traffic->timestamp = jiffies_to_msecs(jiffies);
INIT_WORK(&traffic->update_work, update_traffic_level);
INIT_DELAYED_WORK(&traffic->notify_work, send_uevent);
}
static void allow_cpu_lpm(bool enable)
{
if (enable)
cpu_latency_qos_update_request(&cpu_pm_req, PM_QOS_DEFAULT_VALUE);
else
cpu_latency_qos_update_request(&cpu_pm_req, 0);
}
static ssize_t transferred_bytes_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return scnprintf(buf, PAGE_SIZE, "%llu\n", get_transferred_bytes());
}
static ssize_t cpufreq_min_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
struct freq_qos_request *req;
int len = 0;
int i;
for_each_possible_cpu(i) {
req = &per_cpu(cpufreq_req, i);
if (IS_ERR_OR_NULL(req->qos))
continue;
len += scnprintf(buf + len, PAGE_SIZE - len, "%d: %d, %d, %d\n",
i,
req->qos->min_freq.target_value,
req->qos->min_freq.default_value,
req->qos->min_freq.no_constraint_value);
}
return len;
}
static ssize_t cpufreq_min_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
struct freq_qos_request *req;
struct cpufreq_policy *policy;
s32 cpufreq_min;
int io_cpus;
int i;
char *sptr = (char *)buf;
char *token;
token = strsep(&sptr, ":");
if (!token || !sptr)
return -EINVAL;
if (kstrtoint(token, 16, &io_cpus))
return -EINVAL;
if (kstrtoint(sptr, 10, &cpufreq_min))
return -EINVAL;
for_each_possible_cpu(i) {
if (!test_bit(i, (unsigned long *)&io_cpus))
continue;
req = &per_cpu(cpufreq_req, i);
if (IS_ERR_OR_NULL(req->qos)) {
policy = cpufreq_cpu_get(i);
if (!policy)
continue;
freq_qos_add_request(&policy->constraints,
req, FREQ_QOS_MIN, cpufreq_min);
cpufreq_cpu_put(policy);
}
freq_qos_update_request(req, cpufreq_min);
}
return count;
}
static ssize_t cpu_lpm_enabled_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
if (IS_ERR_OR_NULL(cpu_pm_req.qos))
return 0;
return scnprintf(buf, PAGE_SIZE, "%d: %d, %d, %d\n",
!!cpu_pm_req.qos->target_value,
cpu_pm_req.qos->target_value,
cpu_pm_req.qos->default_value,
cpu_pm_req.qos->no_constraint_value);
}
static ssize_t cpu_lpm_enabled_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int enable;
int ret;
ret = kstrtoint(buf, 10, &enable);
if (ret)
return ret;
allow_cpu_lpm(!!enable);
return count;
}
static struct kobj_attribute transferred_bytes_attr =
__ATTR(transferred_bytes, 0444, transferred_bytes_show, NULL);
static struct kobj_attribute cpufreq_min_attr =
__ATTR(cpufreq_min, 0600, cpufreq_min_show, cpufreq_min_store);
static struct kobj_attribute cpu_lpm_enable_attr =
__ATTR(cpu_lpm_enable, 0600, cpu_lpm_enabled_show, cpu_lpm_enabled_store);
static const struct attribute *blk_sec_stat_traffic_attrs[] = {
&transferred_bytes_attr.attr,
&cpufreq_min_attr.attr,
&cpu_lpm_enable_attr.attr,
NULL,
};
int blk_sec_stat_traffic_init(struct kobject *kobj)
{
if (!kobj)
return -EINVAL;
init_traffic(&traffic);
cpu_latency_qos_add_request(&cpu_pm_req, PM_QOS_DEFAULT_VALUE);
return sysfs_create_files(kobj, blk_sec_stat_traffic_attrs);
}
void blk_sec_stat_traffic_exit(struct kobject *kobj)
{
if (!kobj)
return;
allow_cpu_lpm(true);
cpu_latency_qos_remove_request(&cpu_pm_req);
cancel_delayed_work_sync(&traffic.notify_work);
sysfs_remove_files(kobj, blk_sec_stat_traffic_attrs);
}

203
block/blk-sec-stat.c Normal file
View File

@@ -0,0 +1,203 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Samsung Block Statistics
*
* Copyright (C) 2021 Manjong Lee <mj0123.lee@samsung.com>
* Copyright (C) 2021 Junho Kim <junho89.kim@samsung.com>
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
* Copyright (C) 2021 Seunghwan Hyun <seunghwan.hyun@samsung.com>
* Copyright (C) 2021 Tran Xuan Nam <nam.tx2@samsung.com>
*/
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/part_stat.h>
#include "blk-sec.h"
struct accumulated_stat {
struct timespec64 uptime;
unsigned long sectors[3]; /* READ, WRITE, DISCARD */
unsigned long ios[3];
unsigned long iot;
};
static struct accumulated_stat old, new;
extern int blk_sec_stat_pio_init(struct kobject *kobj);
extern void blk_sec_stat_pio_exit(struct kobject *kobj);
extern struct pio_node *get_pio_node(struct request *rq);
extern void update_pio_node(struct request *rq,
unsigned int data_size, struct pio_node *pio);
extern void put_pio_node(struct pio_node *pio);
extern int blk_sec_stat_traffic_init(struct kobject *kobj);
extern void blk_sec_stat_traffic_exit(struct kobject *kobj);
extern void blk_sec_stat_traffic_prepare(struct request *rq);
extern void blk_sec_stat_traffic_update(struct request *rq,
unsigned int data_size);
void blk_sec_stat_account_init(struct request_queue *q)
{
if (!blk_sec_internal_disk())
pr_err("%s: Can't find internal disk info!", __func__);
}
EXPORT_SYMBOL(blk_sec_stat_account_init);
void blk_sec_stat_account_exit(struct elevator_queue *eq)
{
}
EXPORT_SYMBOL(blk_sec_stat_account_exit);
#define UNSIGNED_DIFF(n, o) (((n) >= (o)) ? ((n) - (o)) : ((n) + (0 - (o))))
#define SECTORS2KB(x) ((x) / 2)
static inline void get_monotonic_boottime(struct timespec64 *ts)
{
*ts = ktime_to_timespec64(ktime_get_boottime());
}
static ssize_t diskios_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
struct gendisk *gd = blk_sec_internal_disk();
struct block_device *bdev;
long hours;
int ret;
if (unlikely(!gd))
return -EINVAL;
bdev = gd->part0;
new.ios[STAT_READ] = part_stat_read(bdev, ios[STAT_READ]);
new.ios[STAT_WRITE] = part_stat_read(bdev, ios[STAT_WRITE]);
new.ios[STAT_DISCARD] = part_stat_read(bdev, ios[STAT_DISCARD]);
new.sectors[STAT_READ] = part_stat_read(bdev, sectors[STAT_READ]);
new.sectors[STAT_WRITE] = part_stat_read(bdev, sectors[STAT_WRITE]);
new.sectors[STAT_DISCARD] = part_stat_read(bdev, sectors[STAT_DISCARD]);
new.iot = jiffies_to_msecs(part_stat_read(bdev, io_ticks)) / 1000;
get_monotonic_boottime(&(new.uptime));
hours = (new.uptime.tv_sec - old.uptime.tv_sec) / 60;
hours = (hours + 30) / 60;
ret = sprintf(buf, "\"ReadC\":\"%lu\",\"ReadKB\":\"%lu\","
"\"WriteC\":\"%lu\",\"WriteKB\":\"%lu\","
"\"DiscardC\":\"%lu\",\"DiscardKB\":\"%lu\","
"\"IOT\":\"%lu\","
"\"Hours\":\"%ld\"\n",
UNSIGNED_DIFF(new.ios[STAT_READ], old.ios[STAT_READ]),
SECTORS2KB(UNSIGNED_DIFF(new.sectors[STAT_READ], old.sectors[STAT_READ])),
UNSIGNED_DIFF(new.ios[STAT_WRITE], old.ios[STAT_WRITE]),
SECTORS2KB(UNSIGNED_DIFF(new.sectors[STAT_WRITE], old.sectors[STAT_WRITE])),
UNSIGNED_DIFF(new.ios[STAT_DISCARD], old.ios[STAT_DISCARD]),
SECTORS2KB(UNSIGNED_DIFF(new.sectors[STAT_DISCARD], old.sectors[STAT_DISCARD])),
UNSIGNED_DIFF(new.iot, old.iot),
hours);
old.ios[STAT_READ] = new.ios[STAT_READ];
old.ios[STAT_WRITE] = new.ios[STAT_WRITE];
old.ios[STAT_DISCARD] = new.ios[STAT_DISCARD];
old.sectors[STAT_READ] = new.sectors[STAT_READ];
old.sectors[STAT_WRITE] = new.sectors[STAT_WRITE];
old.sectors[STAT_DISCARD] = new.sectors[STAT_DISCARD];
old.uptime = new.uptime;
old.iot = new.iot;
return ret;
}
static inline bool may_account_rq(struct request *rq)
{
struct gendisk *gd = blk_sec_internal_disk();
if (unlikely(!gd))
return false;
if (gd->queue != rq->q)
return false;
return true;
}
void blk_sec_stat_account_io_prepare(struct request *rq, void *ptr_pio)
{
if (unlikely(!may_account_rq(rq)))
return;
blk_sec_stat_traffic_prepare(rq);
*(struct pio_node **)ptr_pio = get_pio_node(rq);
}
EXPORT_SYMBOL(blk_sec_stat_account_io_prepare);
void blk_sec_stat_account_io_complete(struct request *rq,
unsigned int data_size, void *pio)
{
if (unlikely(!may_account_rq(rq)))
return;
blk_sec_stat_traffic_update(rq, data_size);
update_pio_node(rq, data_size, (struct pio_node *)pio);
}
EXPORT_SYMBOL(blk_sec_stat_account_io_complete);
void blk_sec_stat_account_io_finish(struct request *rq, void *ptr_pio)
{
if (unlikely(!may_account_rq(rq)))
return;
put_pio_node(*(struct pio_node **)ptr_pio);
*(struct pio_node **)ptr_pio = NULL;
}
EXPORT_SYMBOL(blk_sec_stat_account_io_finish);
static struct kobj_attribute diskios_attr = __ATTR(diskios, 0444, diskios_show, NULL);
static const struct attribute *blk_sec_stat_attrs[] = {
&diskios_attr.attr,
NULL,
};
static struct kobject *blk_sec_stats_kobj;
static int __init blk_sec_stats_init(void)
{
int retval;
blk_sec_stats_kobj = kobject_create_and_add("blk_sec_stats", kernel_kobj);
if (!blk_sec_stats_kobj)
return -ENOMEM;
retval = sysfs_create_files(blk_sec_stats_kobj, blk_sec_stat_attrs);
if (retval) {
kobject_put(blk_sec_stats_kobj);
return retval;
}
retval = blk_sec_stat_pio_init(blk_sec_stats_kobj);
if (retval)
pr_err("%s: fail to initialize PIO sub module", __func__);
retval = blk_sec_stat_traffic_init(blk_sec_stats_kobj);
if (retval)
pr_err("%s: fail to initialize TRAFFIC sub module", __func__);
return 0;
}
static void __exit blk_sec_stats_exit(void)
{
blk_sec_stat_traffic_exit(blk_sec_stats_kobj);
blk_sec_stat_pio_exit(blk_sec_stats_kobj);
sysfs_remove_files(blk_sec_stats_kobj, blk_sec_stat_attrs);
kobject_put(blk_sec_stats_kobj);
}
module_init(blk_sec_stats_init);
module_exit(blk_sec_stats_exit);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Manjong Lee <mj0123.lee@samsung.com>");
MODULE_DESCRIPTION("Samsung block layer statistics module for various purposes");
MODULE_VERSION("1.0");

241
block/blk-sec-wb.c Normal file
View File

@@ -0,0 +1,241 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Samsung Block Write Booster
*
* Copyright (C) 2023 Jisoo Oh <jisoo2146.oh@samsung.com>
* Copyright (C) 2023 Changheun Lee <nanich.lee@samsung.com>
*/
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/part_stat.h>
#include <linux/timer.h>
#include "blk-sec.h"
#include "../drivers/ufs/host/ufs-sec-feature.h"
#define MIN_ENABLE_MS 100
#define MAX_ENABLE_MS 5000
struct blk_sec_wb {
struct mutex lock;
volatile unsigned long request;
unsigned int state;
struct work_struct ctrl_work;
struct timer_list user_wb_off_timer;
};
static struct blk_sec_wb wb;
static void notify_wb_change(bool enabled)
{
#define BUF_SIZE 16
char buf[BUF_SIZE];
char *envp[] = { "NAME=BLK_SEC_WB", buf, NULL, };
int ret;
if (IS_ERR(blk_sec_dev))
return;
memset(buf, 0, BUF_SIZE);
snprintf(buf, BUF_SIZE, "ENABLED=%d", enabled);
ret = kobject_uevent_env(&blk_sec_dev->kobj, KOBJ_CHANGE, envp);
if (ret)
pr_err("%s: couldn't send uevent (%d)", __func__, ret);
}
/*
* don't call this function in interrupt context,
* it will be sleep when ufs_sec_wb_ctrl() is called
*
* Context: can sleep
*/
static int wb_ctrl(bool enable)
{
int ret = 0;
might_sleep();
mutex_lock(&wb.lock);
if (enable && (wb.state == WB_ON))
goto out;
if (!enable && (wb.state == WB_OFF))
goto out;
ret = ufs_sec_wb_ctrl(enable);
if (ret)
goto out;
if (enable)
wb.state = WB_ON;
else
wb.state = WB_OFF;
notify_wb_change(enable);
out:
mutex_unlock(&wb.lock);
return ret;
}
static void wb_ctrl_work(struct work_struct *work)
{
wb_ctrl(!!wb.request);
}
static void user_wb_off_handler(struct timer_list *timer)
{
clear_bit(WB_REQ_USER, &wb.request);
queue_work(blk_sec_common_wq, &wb.ctrl_work);
}
static void ufs_reset_notify(void)
{
queue_work(blk_sec_common_wq, &wb.ctrl_work);
}
int blk_sec_wb_ctrl(bool enable, int req_type)
{
if (req_type < 0 || req_type >= NR_WB_REQ_TYPE)
return -EINVAL;
if (enable)
set_bit(req_type, &wb.request);
else
clear_bit(req_type, &wb.request);
return wb_ctrl(!!wb.request);
}
EXPORT_SYMBOL(blk_sec_wb_ctrl);
int blk_sec_wb_ctrl_async(bool enable, int req_type)
{
if (req_type < 0 || req_type >= NR_WB_REQ_TYPE)
return -EINVAL;
if (enable)
set_bit(req_type, &wb.request);
else
clear_bit(req_type, &wb.request);
queue_work(blk_sec_common_wq, &wb.ctrl_work);
return 0;
}
EXPORT_SYMBOL(blk_sec_wb_ctrl_async);
bool blk_sec_wb_is_supported(struct gendisk *gd)
{
if (blk_sec_internal_disk() != gd)
return false;
return ufs_sec_is_wb_supported();
}
EXPORT_SYMBOL(blk_sec_wb_is_supported);
static ssize_t request_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return scnprintf(buf, PAGE_SIZE, "%lx\n", wb.request);
}
static ssize_t state_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return scnprintf(buf, PAGE_SIZE, "%u\n", wb.state);
}
static ssize_t enable_ms_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
unsigned long expire_jiffies = wb.user_wb_off_timer.expires;
unsigned long current_jiffies = jiffies;
return scnprintf(buf, PAGE_SIZE, "%u\n",
time_after(expire_jiffies, current_jiffies) ?
jiffies_to_msecs(expire_jiffies - current_jiffies) : 0);
}
static ssize_t enable_ms_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int wb_on_duration = 0;
unsigned long expire_jiffies = 0;
int ret;
ret = kstrtoint(buf, 10, &wb_on_duration);
if (ret)
return ret;
if (wb_on_duration <= 0)
return count;
if (wb_on_duration < MIN_ENABLE_MS)
wb_on_duration = MIN_ENABLE_MS;
if (wb_on_duration > MAX_ENABLE_MS)
wb_on_duration = MAX_ENABLE_MS;
expire_jiffies = jiffies + msecs_to_jiffies(wb_on_duration);
if (time_after(expire_jiffies, wb.user_wb_off_timer.expires))
mod_timer(&wb.user_wb_off_timer, expire_jiffies);
blk_sec_wb_ctrl(true, WB_REQ_USER);
return count;
}
static struct kobj_attribute request_attr = __ATTR_RO(request);
static struct kobj_attribute state_attr = __ATTR_RO(state);
static struct kobj_attribute enable_ms_attr =
__ATTR(enable_ms, 0644, enable_ms_show, enable_ms_store);
static const struct attribute *blk_sec_wb_attrs[] = {
&request_attr.attr,
&state_attr.attr,
&enable_ms_attr.attr,
NULL,
};
static struct kobject *blk_sec_wb_kobj;
static int __init blk_sec_wb_init(void)
{
int retval;
blk_sec_wb_kobj = kobject_create_and_add("blk_sec_wb", kernel_kobj);
if (!blk_sec_wb_kobj)
return -ENOMEM;
retval = sysfs_create_files(blk_sec_wb_kobj, blk_sec_wb_attrs);
if (retval) {
kobject_put(blk_sec_wb_kobj);
return retval;
}
mutex_init(&wb.lock);
wb.state = WB_OFF;
INIT_WORK(&wb.ctrl_work, wb_ctrl_work);
timer_setup(&wb.user_wb_off_timer, user_wb_off_handler, 0);
ufs_sec_wb_register_reset_notify(&ufs_reset_notify);
return 0;
}
static void __exit blk_sec_wb_exit(void)
{
del_timer_sync(&wb.user_wb_off_timer);
sysfs_remove_files(blk_sec_wb_kobj, blk_sec_wb_attrs);
kobject_put(blk_sec_wb_kobj);
}
module_init(blk_sec_wb_init);
module_exit(blk_sec_wb_exit);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jisoo Oh <jisoo2146.oh@samsung.com>");
MODULE_DESCRIPTION("Samsung write booster module in block layer");
MODULE_VERSION("1.0");

92
block/blk-sec.h Normal file
View File

@@ -0,0 +1,92 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef BLK_SEC_H
#define BLK_SEC_H
enum {
WB_REQ_IOSCHED = 0,
WB_REQ_USER,
NR_WB_REQ_TYPE
};
#if IS_ENABLED(CONFIG_BLK_SEC_COMMON)
extern struct device *blk_sec_dev;
extern struct workqueue_struct *blk_sec_common_wq;
extern struct gendisk *blk_sec_internal_disk(void);
#else
static struct gendisk *blk_sec_internal_disk(void)
{
return NULL;
}
#endif
#if IS_ENABLED(CONFIG_BLK_SEC_STATS)
struct pio_node {
struct list_head list;
pid_t tgid;
char name[TASK_COMM_LEN];
u64 start_time;
atomic_t kb[REQ_OP_DISCARD + 1];
atomic_t ref_count;
struct pio_node *h_next; /* next pio_node for hash */
};
extern void blk_sec_stat_account_init(struct request_queue *q);
extern void blk_sec_stat_account_exit(struct elevator_queue *eq);
extern void blk_sec_stat_account_io_prepare(struct request *rq,
void *ptr_pio);
extern void blk_sec_stat_account_io_complete(struct request *rq,
unsigned int data_size, void *pio);
extern void blk_sec_stat_account_io_finish(struct request *rq,
void *ptr_pio);
#else
static inline void blk_sec_stat_account_init(struct request_queue *q)
{
}
static inline void blk_sec_stat_account_exit(struct elevator_queue *eq)
{
}
static inline void blk_sec_stat_account_io_prepare(struct request *rq,
void *ptr_pio)
{
}
static inline void blk_sec_stat_account_io_complete(struct request *rq,
unsigned int data_size, void *pio)
{
}
static inline void blk_sec_stat_account_io_finish(struct request *rq,
void *ptr_pio)
{
}
#endif
#if IS_ENABLED(CONFIG_BLK_SEC_WB)
extern int blk_sec_wb_ctrl(bool enable, int req_type);
extern int blk_sec_wb_ctrl_async(bool enable, int req_type);
extern bool blk_sec_wb_is_supported(struct gendisk *gd);
#else
static inline int blk_sec_wb_ctrl(bool enable, int req_type)
{
return 0;
}
static inline int blk_sec_wb_ctrl_async(bool enable, int req_type)
{
return 0;
}
static inline bool blk_sec_wb_is_supported(struct gendisk *gd)
{
return false;
}
#endif
#endif // BLK_SEC_H

View File

@@ -28,13 +28,6 @@
#include <linux/blktrace_api.h>
#include "blk-throttle.h"
#ifdef CONFIG_BLOCK_SUPPORT_STLOG
#include <linux/fslog.h>
#else
#define ST_LOG(fmt, ...)
#endif
#include "blk.h"
#include "blk-mq-sched.h"
#include "blk-rq-qos.h"
@@ -331,14 +324,6 @@ void disk_uevent(struct gendisk *disk, enum kobject_action action)
struct block_device *part;
unsigned long idx;
#ifdef CONFIG_BLOCK_SUPPORT_STLOG
int major = disk->major;
int first_minor = disk->first_minor;
if (action == KOBJ_ADD)
ST_LOG("<%s> KOBJ_ADD %d:%d", __func__, major, first_minor);
#endif
rcu_read_lock();
xa_for_each(&disk->part_tbl, idx, part) {
if (bdev_is_partition(part) && !bdev_nr_sectors(part))
@@ -348,11 +333,6 @@ void disk_uevent(struct gendisk *disk, enum kobject_action action)
rcu_read_unlock();
kobject_uevent(bdev_kobj(part), action);
if (action == KOBJ_ADD) {
ST_LOG("<%s> KOBJ_ADD %d:%d", __func__, major,
first_minor + part->bd_partno);
}
put_device(&part->bd_device);
rcu_read_lock();
}
@@ -657,9 +637,6 @@ void del_gendisk(struct gendisk *disk)
struct block_device *part;
unsigned long idx;
#ifdef CONFIG_BLOCK_SUPPORT_STLOG
struct device *dev;
#endif
might_sleep();
if (WARN_ON_ONCE(!disk_live(disk) && !(disk->flags & GENHD_FL_HIDDEN)))
@@ -711,11 +688,6 @@ void del_gendisk(struct gendisk *disk)
disk->part0->bd_stamp = 0;
sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk)));
pm_runtime_set_memalloc_noio(disk_to_dev(disk), false);
#ifdef CONFIG_BLOCK_SUPPORT_STLOG
dev = disk_to_dev(disk);
ST_LOG("<%s> KOBJ_REMOVE %d:%d %s", __func__,
MAJOR(dev->devt), MINOR(dev->devt), dev->kobj.name);
#endif
device_del(disk_to_dev(disk));
blk_mq_freeze_queue_wait(q);

View File

@@ -113,10 +113,6 @@ static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode,
if (start + len > bdev_nr_bytes(bdev))
return -EINVAL;
printk(KERN_INFO "DIS %d:%d %llu %llu",
MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev),
(unsigned long long)start, (unsigned long long)len);
filemap_invalidate_lock(inode->i_mapping);
err = truncate_bdev_range(bdev, mode, start, start + len - 1);
if (err)

354
block/ssg-cgroup.c Normal file
View File

@@ -0,0 +1,354 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Control Group of SamSung Generic I/O scheduler
*
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
*/
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include "blk-cgroup.h"
#include "blk-mq.h"
#include "ssg.h"
static struct blkcg_policy ssg_blkcg_policy;
#define CPD_TO_SSG_BLKCG(_cpd) \
container_of((_cpd), struct ssg_blkcg, cpd)
#define BLKCG_TO_SSG_BLKCG(_blkcg) \
CPD_TO_SSG_BLKCG(blkcg_to_cpd((_blkcg), &ssg_blkcg_policy))
#define PD_TO_SSG_BLKG(_pd) \
container_of((_pd), struct ssg_blkg, pd)
#define BLKG_TO_SSG_BLKG(_blkg) \
PD_TO_SSG_BLKG(blkg_to_pd((_blkg), &ssg_blkcg_policy))
#define CSS_TO_SSG_BLKCG(css) BLKCG_TO_SSG_BLKCG(css_to_blkcg(css))
static int boost_reserved_ratio = 0;
#define MIN_AVAILABLE_RATIO 50
#define MAX_AVAILABLE_RATIO 100
static struct blkcg_policy_data *ssg_blkcg_cpd_alloc(gfp_t gfp)
{
struct ssg_blkcg *ssg_blkcg;
ssg_blkcg = kzalloc(sizeof(struct ssg_blkcg), gfp);
if (ZERO_OR_NULL_PTR(ssg_blkcg))
return NULL;
ssg_blkcg->max_available_ratio = MAX_AVAILABLE_RATIO;
ssg_blkcg->boost_on = 0;
return &ssg_blkcg->cpd;
}
static void ssg_blkcg_cpd_free(struct blkcg_policy_data *cpd)
{
struct ssg_blkcg *ssg_blkcg = CPD_TO_SSG_BLKCG(cpd);
if (IS_ERR_OR_NULL(ssg_blkcg))
return;
kfree(ssg_blkcg);
}
static void ssg_blkcg_set_shallow_depth(struct ssg_blkcg *ssg_blkcg,
struct ssg_blkg *ssg_blkg, struct blk_mq_tags *tags)
{
unsigned int depth = tags->bitmap_tags.sb.depth;
unsigned int map_nr = tags->bitmap_tags.sb.map_nr;
ssg_blkcg->max_available_ratio = ssg_blkcg->boost_on ?
MAX_AVAILABLE_RATIO : MAX_AVAILABLE_RATIO - boost_reserved_ratio;
ssg_blkg->max_available_rqs =
depth * ssg_blkcg->max_available_ratio / 100U;
ssg_blkg->shallow_depth =
max_t(unsigned int, 1, ssg_blkg->max_available_rqs / map_nr);
}
static struct blkg_policy_data *ssg_blkcg_pd_alloc(struct gendisk *disk,
struct blkcg *blkcg, gfp_t gfp)
{
struct ssg_blkg *ssg_blkg;
ssg_blkg = kzalloc_node(sizeof(struct ssg_blkg), gfp, disk->node_id);
if (ZERO_OR_NULL_PTR(ssg_blkg))
return NULL;
return &ssg_blkg->pd;
}
static void ssg_blkcg_pd_init(struct blkg_policy_data *pd)
{
struct ssg_blkg *ssg_blkg;
struct ssg_blkcg *ssg_blkcg;
struct blk_mq_hw_ctx *hctx;
unsigned long i;
ssg_blkg = PD_TO_SSG_BLKG(pd);
if (IS_ERR_OR_NULL(ssg_blkg))
return;
ssg_blkcg = BLKCG_TO_SSG_BLKCG(pd->blkg->blkcg);
if (IS_ERR_OR_NULL(ssg_blkcg))
return;
atomic_set(&ssg_blkg->current_rqs, 0);
queue_for_each_hw_ctx(pd->blkg->q, hctx, i)
ssg_blkcg_set_shallow_depth(ssg_blkcg, ssg_blkg,
hctx->sched_tags);
}
static void ssg_blkcg_pd_free(struct blkg_policy_data *pd)
{
struct ssg_blkg *ssg_blkg = PD_TO_SSG_BLKG(pd);
if (IS_ERR_OR_NULL(ssg_blkg))
return;
kfree(ssg_blkg);
}
unsigned int ssg_blkcg_shallow_depth(struct request_queue *q)
{
struct blkcg_gq *blkg;
struct ssg_blkg *ssg_blkg;
rcu_read_lock();
blkg = blkg_lookup(css_to_blkcg(curr_css()), q);
ssg_blkg = BLKG_TO_SSG_BLKG(blkg);
rcu_read_unlock();
if (IS_ERR_OR_NULL(ssg_blkg))
return 0;
if (atomic_read(&ssg_blkg->current_rqs) < ssg_blkg->max_available_rqs)
return 0;
return ssg_blkg->shallow_depth;
}
void ssg_blkcg_depth_updated(struct blk_mq_hw_ctx *hctx)
{
struct request_queue *q = hctx->queue;
struct cgroup_subsys_state *pos_css;
struct blkcg_gq *blkg;
struct ssg_blkg *ssg_blkg;
struct ssg_blkcg *ssg_blkcg;
rcu_read_lock();
blkg_for_each_descendant_pre(blkg, pos_css, q->root_blkg) {
ssg_blkg = BLKG_TO_SSG_BLKG(blkg);
if (IS_ERR_OR_NULL(ssg_blkg))
continue;
ssg_blkcg = BLKCG_TO_SSG_BLKCG(blkg->blkcg);
if (IS_ERR_OR_NULL(ssg_blkcg))
continue;
atomic_set(&ssg_blkg->current_rqs, 0);
ssg_blkcg_set_shallow_depth(ssg_blkcg, ssg_blkg, hctx->sched_tags);
}
rcu_read_unlock();
}
void ssg_blkcg_inc_rq(struct blkcg_gq *blkg)
{
struct ssg_blkg *ssg_blkg = BLKG_TO_SSG_BLKG(blkg);
if (IS_ERR_OR_NULL(ssg_blkg))
return;
atomic_inc(&ssg_blkg->current_rqs);
}
void ssg_blkcg_dec_rq(struct blkcg_gq *blkg)
{
struct ssg_blkg *ssg_blkg = BLKG_TO_SSG_BLKG(blkg);
if (IS_ERR_OR_NULL(ssg_blkg))
return;
atomic_dec(&ssg_blkg->current_rqs);
}
int ssg_blkcg_check_boost(struct blkcg_gq *blkg)
{
struct ssg_blkcg *ssg_blkcg;
if (IS_ERR_OR_NULL(blkg))
return 0;
ssg_blkcg = BLKCG_TO_SSG_BLKCG(blkg->blkcg);
if (IS_ERR_OR_NULL(ssg_blkcg))
return 0;
if (ssg_blkcg->boost_on)
return 1;
return 0;
}
static void __ssg_blkcg_update_shallow_depth(struct blk_mq_hw_ctx *hctx)
{
struct request_queue *q = hctx->queue;
struct cgroup_subsys_state *pos_css;
struct blkcg_gq *blkg;
struct ssg_blkg *ssg_blkg;
struct ssg_blkcg *ssg_blkcg;
rcu_read_lock();
blkg_for_each_descendant_pre(blkg, pos_css, q->root_blkg) {
ssg_blkg = BLKG_TO_SSG_BLKG(blkg);
if (IS_ERR_OR_NULL(ssg_blkg))
continue;
ssg_blkcg = BLKCG_TO_SSG_BLKCG(blkg->blkcg);
if (IS_ERR_OR_NULL(ssg_blkcg))
continue;
ssg_blkcg_set_shallow_depth(ssg_blkcg, ssg_blkg, hctx->sched_tags);
}
rcu_read_unlock();
}
static void ssg_blkcg_update_shallow_depth(struct blkcg *blkcg)
{
struct blkcg_gq *blkg;
struct blk_mq_hw_ctx *hctx;
unsigned long i;
hlist_for_each_entry(blkg, &blkcg->blkg_list, blkcg_node)
queue_for_each_hw_ctx(blkg->q, hctx, i)
__ssg_blkcg_update_shallow_depth(hctx);
}
static int ssg_blkcg_show_max_available_ratio(struct seq_file *sf, void *v)
{
struct ssg_blkcg *ssg_blkcg = CSS_TO_SSG_BLKCG(seq_css(sf));
if (IS_ERR_OR_NULL(ssg_blkcg))
return -EINVAL;
seq_printf(sf, "%d\n", ssg_blkcg->max_available_ratio);
return 0;
}
static int ssg_blkcg_show_boost_on(struct seq_file *sf, void *v)
{
struct ssg_blkcg *ssg_blkcg = CSS_TO_SSG_BLKCG(seq_css(sf));
if (IS_ERR_OR_NULL(ssg_blkcg))
return -EINVAL;
seq_printf(sf, "%d\n", ssg_blkcg->boost_on);
return 0;
}
static int ssg_blkcg_set_boost_on(struct cgroup_subsys_state *css,
struct cftype *cftype, u64 boost_on)
{
struct blkcg *blkcg = css_to_blkcg(css);
struct ssg_blkcg *ssg_blkcg = CSS_TO_SSG_BLKCG(css);
if (IS_ERR_OR_NULL(ssg_blkcg))
return -EINVAL;
if (boost_on > 1)
return -EINVAL;
spin_lock_irq(&blkcg->lock);
ssg_blkcg->boost_on = boost_on;
ssg_blkcg_update_shallow_depth(blkcg);
spin_unlock_irq(&blkcg->lock);
return 0;
}
static int ssg_blkcg_show_boost_reserved_ratio(struct seq_file *sf, void *v)
{
seq_printf(sf, "%d\n", boost_reserved_ratio);
return 0;
}
static int ssg_blkcg_set_boost_reserved_ratio(struct cgroup_subsys_state *css,
struct cftype *cftype, u64 ratio)
{
struct blkcg *blkcg = css_to_blkcg(css);
if (ratio > MIN_AVAILABLE_RATIO)
return -EINVAL;
spin_lock_irq(&blkcg->lock);
boost_reserved_ratio = ratio;
ssg_blkcg_update_shallow_depth(blkcg);
spin_unlock_irq(&blkcg->lock);
return 0;
}
struct cftype ssg_blkg_files[] = {
{
.name = "ssg.max_available_ratio",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = ssg_blkcg_show_max_available_ratio,
},
{
.name = "ssg.boost_on",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = ssg_blkcg_show_boost_on,
.write_u64 = ssg_blkcg_set_boost_on,
},
{
.name = "ssg.boost_reserved_ratio",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = ssg_blkcg_show_boost_reserved_ratio,
.write_u64 = ssg_blkcg_set_boost_reserved_ratio,
},
{} /* terminate */
};
static struct blkcg_policy ssg_blkcg_policy = {
.legacy_cftypes = ssg_blkg_files,
.cpd_alloc_fn = ssg_blkcg_cpd_alloc,
.cpd_free_fn = ssg_blkcg_cpd_free,
.pd_alloc_fn = ssg_blkcg_pd_alloc,
.pd_init_fn = ssg_blkcg_pd_init,
.pd_free_fn = ssg_blkcg_pd_free,
};
int ssg_blkcg_activate(struct request_queue *q)
{
return blkcg_activate_policy(q->disk, &ssg_blkcg_policy);
}
void ssg_blkcg_deactivate(struct request_queue *q)
{
blkcg_deactivate_policy(q->disk, &ssg_blkcg_policy);
}
int ssg_blkcg_init(void)
{
return blkcg_policy_register(&ssg_blkcg_policy);
}
void ssg_blkcg_exit(void)
{
blkcg_policy_unregister(&ssg_blkcg_policy);
}

870
block/ssg-iosched.c Normal file
View File

@@ -0,0 +1,870 @@
// SPDX-License-Identifier: GPL-2.0
/*
* SamSung Generic I/O scheduler
* for the blk-mq scheduling framework
*
* Copyright (C) 2021 Jisoo Oh <jisoo2146.oh@samsung.com>
* Copyright (C) 2021 Manjong Lee <mj0123.lee@samsung.com>
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
*/
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/bio.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/compiler.h>
#include <linux/rbtree.h>
#include <linux/sbitmap.h>
#include <trace/events/block.h>
#include "blk.h"
#include "elevator.h"
#include "blk-mq.h"
#include "blk-mq-debugfs.h"
#include "blk-mq-sched.h"
#include "ssg.h"
#include "blk-sec.h"
#define MAX_ASYNC_WRITE_RQS 8
/* ssg data direction definitions */
#define BOOST 2 /* read 0, write 1 */
static const int read_expire = HZ / 2; /* max time before a read is submitted. */
static const int write_expire = 5 * HZ; /* ditto for writes, these limits are SOFT! */
static const int boost_expire = HZ / 2; /* max time before a boost is submitted. */
static const int max_write_starvation = 2; /* max times reads can starve a write */
static const int max_normal_starvation = 2; /* max times boosts can starve normal reads or writes */
static const int congestion_threshold = 90; /* percentage of congestion threshold */
static const int max_tgroup_io_ratio = 50; /* maximum service ratio for each thread group */
static const int max_async_write_ratio = 25; /* maximum service ratio for async write */
static inline struct ssg_request_info *ssg_rq_info(struct ssg_data *ssg,
struct request *rq)
{
if (unlikely(!ssg->rq_info))
return NULL;
if (unlikely(!rq))
return NULL;
if (unlikely(rq->internal_tag < 0))
return NULL;
if (unlikely(rq->internal_tag >= rq->q->nr_requests))
return NULL;
return &ssg->rq_info[rq->internal_tag];
}
static inline int ssg_rq_data_dir(struct ssg_data *ssg, struct request *rq)
{
struct ssg_request_info *rqi = ssg_rq_info(ssg, rq);
if (likely(rqi) && rqi->blkcg_boost)
return BOOST;
return rq_data_dir(rq);
}
static inline struct rb_root *ssg_rb_root(struct ssg_data *ssg, struct request *rq)
{
return &ssg->sort_list[ssg_rq_data_dir(ssg, rq)];
}
/*
* get the request after `rq' in sector-sorted order
*/
static inline struct request *ssg_latter_request(struct request *rq)
{
struct rb_node *node = rb_next(&rq->rb_node);
if (node)
return rb_entry_rq(node);
return NULL;
}
static void ssg_add_rq_rb(struct ssg_data *ssg, struct request *rq)
{
struct rb_root *root = ssg_rb_root(ssg, rq);
elv_rb_add(root, rq);
}
static inline void ssg_del_rq_rb(struct ssg_data *ssg, struct request *rq)
{
const int data_dir = ssg_rq_data_dir(ssg, rq);
if (ssg->next_rq[data_dir] == rq)
ssg->next_rq[data_dir] = ssg_latter_request(rq);
elv_rb_del(ssg_rb_root(ssg, rq), rq);
}
/*
* remove rq from rbtree and fifo.
*/
static void ssg_remove_request(struct request_queue *q, struct request *rq)
{
struct ssg_data *ssg = q->elevator->elevator_data;
list_del_init(&rq->queuelist);
/*
* We might not be on the rbtree, if we are doing an insert merge
*/
if (!RB_EMPTY_NODE(&rq->rb_node))
ssg_del_rq_rb(ssg, rq);
elv_rqhash_del(q, rq);
if (q->last_merge == rq)
q->last_merge = NULL;
}
static void ssg_request_merged(struct request_queue *q, struct request *req,
enum elv_merge type)
{
struct ssg_data *ssg = q->elevator->elevator_data;
/*
* if the merge was a front merge, we need to reposition request
*/
if (type == ELEVATOR_FRONT_MERGE) {
elv_rb_del(ssg_rb_root(ssg, req), req);
ssg_add_rq_rb(ssg, req);
}
}
static void ssg_merged_requests(struct request_queue *q, struct request *req,
struct request *next)
{
/*
* if next expires before rq, assign its expire time to rq
* and move into next position (next will be deleted) in fifo
*/
if (!list_empty(&req->queuelist) && !list_empty(&next->queuelist)) {
if (time_before((unsigned long)next->fifo_time,
(unsigned long)req->fifo_time)) {
list_move(&req->queuelist, &next->queuelist);
req->fifo_time = next->fifo_time;
}
}
/*
* kill knowledge of next, this one is a goner
*/
ssg_remove_request(q, next);
}
/*
* move an entry to dispatch queue
*/
static void ssg_move_request(struct ssg_data *ssg, struct request *rq)
{
const int data_dir = ssg_rq_data_dir(ssg, rq);
ssg->next_rq[READ] = NULL;
ssg->next_rq[WRITE] = NULL;
ssg->next_rq[BOOST] = NULL;
ssg->next_rq[data_dir] = ssg_latter_request(rq);
/*
* take it off the sort and fifo list
*/
ssg_remove_request(rq->q, rq);
}
/*
* ssg_check_fifo returns 0 if there are no expired requests on the fifo,
* 1 otherwise. Requires !list_empty(&ssg->fifo_list[data_dir])
*/
static inline int ssg_check_fifo(struct ssg_data *ssg, int ddir)
{
struct request *rq = rq_entry_fifo(ssg->fifo_list[ddir].next);
/*
* rq is expired!
*/
if (time_after_eq(jiffies, (unsigned long)rq->fifo_time))
return 1;
return 0;
}
/*
* For the specified data direction, return the next request to
* dispatch using arrival ordered lists.
*/
static struct request *ssg_fifo_request(struct ssg_data *ssg, int data_dir)
{
if (WARN_ON_ONCE(data_dir != READ && data_dir != WRITE && data_dir != BOOST))
return NULL;
if (list_empty(&ssg->fifo_list[data_dir]))
return NULL;
return rq_entry_fifo(ssg->fifo_list[data_dir].next);
}
/*
* For the specified data direction, return the next request to
* dispatch using sector position sorted lists.
*/
static struct request *ssg_next_request(struct ssg_data *ssg, int data_dir)
{
if (WARN_ON_ONCE(data_dir != READ && data_dir != WRITE && data_dir != BOOST))
return NULL;
return ssg->next_rq[data_dir];
}
/*
* ssg_dispatch_requests selects the best request according to
* read/write expire, etc
*/
static struct request *__ssg_dispatch_request(struct ssg_data *ssg)
{
struct request *rq, *next_rq;
bool reads, writes, boosts;
int data_dir;
if (!list_empty(&ssg->dispatch)) {
rq = list_first_entry(&ssg->dispatch, struct request, queuelist);
list_del_init(&rq->queuelist);
goto done;
}
reads = !list_empty(&ssg->fifo_list[READ]);
writes = !list_empty(&ssg->fifo_list[WRITE]);
boosts = !list_empty(&ssg->fifo_list[BOOST]);
if (boosts) {
if ((reads || writes) &&
(ssg->starved_normal++ >= ssg->max_normal_starvation))
goto dispatch_normal;
data_dir = BOOST;
goto dispatch_find_request;
}
dispatch_normal:
/*
* select the appropriate data direction (read / write)
*/
if (reads) {
BUG_ON(RB_EMPTY_ROOT(&ssg->sort_list[READ]));
if (writes &&
(ssg->starved_writes++ >= ssg->max_write_starvation))
goto dispatch_writes;
ssg->starved_normal = 0;
data_dir = READ;
goto dispatch_find_request;
}
/*
* there are either no reads or writes have been starved
*/
if (writes) {
dispatch_writes:
BUG_ON(RB_EMPTY_ROOT(&ssg->sort_list[WRITE]));
ssg->starved_normal = 0;
ssg->starved_writes = 0;
data_dir = WRITE;
goto dispatch_find_request;
}
return NULL;
dispatch_find_request:
/*
* we are not running a batch, find best request for selected data_dir
*/
next_rq = ssg_next_request(ssg, data_dir);
if (ssg_check_fifo(ssg, data_dir) || !next_rq) {
/*
* A deadline has expired, the last request was in the other
* direction, or we have run out of higher-sectored requests.
* Start again from the request with the earliest expiry time.
*/
rq = ssg_fifo_request(ssg, data_dir);
} else {
/*
* The last req was the same dir and we have a next request in
* sort order. No expired requests so continue on from here.
*/
rq = next_rq;
}
if (!rq)
return NULL;
/*
* rq is the selected appropriate request.
*/
ssg_move_request(ssg, rq);
done:
rq->rq_flags |= RQF_STARTED;
return rq;
}
/*
* One confusing aspect here is that we get called for a specific
* hardware queue, but we may return a request that is for a
* different hardware queue. This is because ssg-iosched has shared
* state for all hardware queues, in terms of sorting, FIFOs, etc.
*/
static struct request *ssg_dispatch_request(struct blk_mq_hw_ctx *hctx)
{
struct ssg_data *ssg = hctx->queue->elevator->elevator_data;
struct request *rq;
struct ssg_request_info *rqi;
spin_lock(&ssg->lock);
rq = __ssg_dispatch_request(ssg);
spin_unlock(&ssg->lock);
rqi = ssg_rq_info(ssg, rq);
if (likely(rqi)) {
rqi->sector = blk_rq_pos(rq);
rqi->data_size = blk_rq_bytes(rq);
}
return rq;
}
static void ssg_completed_request(struct request *rq, u64 now)
{
struct ssg_data *ssg = rq->q->elevator->elevator_data;
struct ssg_request_info *rqi;
rqi = ssg_rq_info(ssg, rq);
if (likely(rqi && rqi->sector == blk_rq_pos(rq))) {
ssg_stat_account_io_done(ssg, rq, rqi->data_size, now);
blk_sec_stat_account_io_complete(rq, rqi->data_size, rqi->pio);
}
}
static void ssg_set_shallow_depth(struct ssg_data *ssg, struct blk_mq_tags *tags)
{
unsigned int depth = tags->bitmap_tags.sb.depth;
unsigned int map_nr = tags->bitmap_tags.sb.map_nr;
ssg->max_async_write_rqs =
max_t(int, depth * max_async_write_ratio / 100U, 1);
ssg->max_async_write_rqs =
min_t(int, ssg->max_async_write_rqs, MAX_ASYNC_WRITE_RQS);
ssg->async_write_shallow_depth =
max_t(unsigned int, ssg->max_async_write_rqs / map_nr, 1);
ssg->max_tgroup_rqs =
max_t(int, depth * max_tgroup_io_ratio / 100U, 1);
ssg->tgroup_shallow_depth =
max_t(unsigned int, ssg->max_tgroup_rqs / map_nr, 1);
}
static void ssg_depth_updated(struct blk_mq_hw_ctx *hctx)
{
struct request_queue *q = hctx->queue;
struct ssg_data *ssg = q->elevator->elevator_data;
struct blk_mq_tags *tags = hctx->sched_tags;
unsigned int depth = tags->bitmap_tags.sb.depth;
ssg->congestion_threshold_rqs = depth * congestion_threshold / 100U;
kfree(ssg->rq_info);
ssg->rq_info = kmalloc_array(depth, sizeof(struct ssg_request_info),
GFP_KERNEL | __GFP_ZERO);
if (ZERO_OR_NULL_PTR(ssg->rq_info))
ssg->rq_info = NULL;
ssg_set_shallow_depth(ssg, tags);
sbitmap_queue_min_shallow_depth(&tags->bitmap_tags,
ssg->async_write_shallow_depth);
ssg_blkcg_depth_updated(hctx);
ssg_wb_depth_updated(hctx);
}
static inline bool ssg_op_is_async_write(unsigned int op)
{
return (op & REQ_OP_MASK) == REQ_OP_WRITE && !op_is_sync(op);
}
static unsigned int ssg_async_write_shallow_depth(unsigned int op,
struct blk_mq_alloc_data *data)
{
struct ssg_data *ssg = data->q->elevator->elevator_data;
if (!ssg_op_is_async_write(op))
return 0;
if (atomic_read(&ssg->async_write_rqs) < ssg->max_async_write_rqs)
return 0;
return ssg->async_write_shallow_depth;
}
static unsigned int ssg_tgroup_shallow_depth(struct blk_mq_alloc_data *data)
{
struct ssg_data *ssg = data->q->elevator->elevator_data;
pid_t tgid = task_tgid_nr(current->group_leader);
int nr_requests = data->q->nr_requests;
int tgroup_rqs = 0;
int i;
if (unlikely(!ssg->rq_info))
return 0;
for (i = 0; i < nr_requests; i++)
if (tgid == ssg->rq_info[i].tgid)
tgroup_rqs++;
if (tgroup_rqs < ssg->max_tgroup_rqs)
return 0;
return ssg->tgroup_shallow_depth;
}
static void ssg_limit_depth(unsigned int op, struct blk_mq_alloc_data *data)
{
struct ssg_data *ssg = data->q->elevator->elevator_data;
unsigned int shallow_depth = ssg_blkcg_shallow_depth(data->q);
shallow_depth = min_not_zero(shallow_depth,
ssg_async_write_shallow_depth(op, data));
if (atomic_read(&ssg->allocated_rqs) > ssg->congestion_threshold_rqs)
shallow_depth = min_not_zero(shallow_depth,
ssg_tgroup_shallow_depth(data));
data->shallow_depth = shallow_depth;
}
static int ssg_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
{
struct ssg_data *ssg = hctx->queue->elevator->elevator_data;
struct blk_mq_tags *tags = hctx->sched_tags;
ssg_set_shallow_depth(ssg, tags);
sbitmap_queue_min_shallow_depth(&tags->bitmap_tags,
ssg->async_write_shallow_depth);
return 0;
}
static void ssg_exit_queue(struct elevator_queue *e)
{
struct ssg_data *ssg = e->elevator_data;
ssg_blkcg_deactivate(ssg->queue);
BUG_ON(!list_empty(&ssg->fifo_list[READ]));
BUG_ON(!list_empty(&ssg->fifo_list[WRITE]));
BUG_ON(!list_empty(&ssg->fifo_list[BOOST]));
ssg_stat_exit(ssg);
ssg_wb_exit(ssg);
blk_sec_stat_account_exit(e);
blk_stat_disable_accounting(ssg->queue);
kfree(ssg->rq_info);
kfree(ssg);
}
/*
* initialize elevator private data (ssg_data).
*/
static int ssg_init_queue(struct request_queue *q, struct elevator_type *e)
{
struct ssg_data *ssg;
struct elevator_queue *eq;
if (blk_queue_is_zoned(q))
return -EINVAL;
eq = elevator_alloc(q, e);
if (!eq)
return -ENOMEM;
ssg = kzalloc_node(sizeof(*ssg), GFP_KERNEL, q->node);
if (!ssg) {
kobject_put(&eq->kobj);
return -ENOMEM;
}
eq->elevator_data = ssg;
ssg->queue = q;
INIT_LIST_HEAD(&ssg->fifo_list[READ]);
INIT_LIST_HEAD(&ssg->fifo_list[WRITE]);
INIT_LIST_HEAD(&ssg->fifo_list[BOOST]);
ssg->sort_list[READ] = RB_ROOT;
ssg->sort_list[WRITE] = RB_ROOT;
ssg->sort_list[BOOST] = RB_ROOT;
ssg->fifo_expire[READ] = read_expire;
ssg->fifo_expire[WRITE] = write_expire;
ssg->fifo_expire[BOOST] = boost_expire;
ssg->max_normal_starvation = max_normal_starvation;
ssg->max_write_starvation = max_write_starvation;
ssg->front_merges = 1;
atomic_set(&ssg->allocated_rqs, 0);
atomic_set(&ssg->async_write_rqs, 0);
ssg->congestion_threshold_rqs =
q->nr_requests * congestion_threshold / 100U;
ssg->rq_info = kmalloc_array(q->nr_requests,
sizeof(struct ssg_request_info),
GFP_KERNEL | __GFP_ZERO);
if (ZERO_OR_NULL_PTR(ssg->rq_info))
ssg->rq_info = NULL;
spin_lock_init(&ssg->lock);
INIT_LIST_HEAD(&ssg->dispatch);
ssg_blkcg_activate(q);
q->elevator = eq;
ssg_stat_init(ssg);
blk_stat_enable_accounting(q);
blk_sec_stat_account_init(q);
ssg_wb_init(ssg);
return 0;
}
static int ssg_request_merge(struct request_queue *q, struct request **rq,
struct bio *bio)
{
struct ssg_data *ssg = q->elevator->elevator_data;
sector_t sector = bio_end_sector(bio);
struct request *__rq;
if (!ssg->front_merges)
return ELEVATOR_NO_MERGE;
__rq = elv_rb_find(&ssg->sort_list[bio_data_dir(bio)], sector);
if (__rq) {
BUG_ON(sector != blk_rq_pos(__rq));
if (elv_bio_merge_ok(__rq, bio)) {
*rq = __rq;
return ELEVATOR_FRONT_MERGE;
}
}
return ELEVATOR_NO_MERGE;
}
static bool ssg_bio_merge(struct request_queue *q, struct bio *bio,
unsigned int nr_segs)
{
struct ssg_data *ssg = q->elevator->elevator_data;
struct request *free = NULL;
bool ret;
spin_lock(&ssg->lock);
ret = blk_mq_sched_try_merge(q, bio, nr_segs, &free);
spin_unlock(&ssg->lock);
if (free)
blk_mq_free_request(free);
return ret;
}
/*
* add rq to rbtree and fifo
*/
static void ssg_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
blk_insert_t flags)
{
struct request_queue *q = hctx->queue;
struct ssg_data *ssg = q->elevator->elevator_data;
const int data_dir = ssg_rq_data_dir(ssg, rq);
LIST_HEAD(free);
if (blk_mq_sched_try_insert_merge(q, rq, &free)) {
blk_mq_free_requests(&free);
return;
}
trace_block_rq_insert(rq);
if ((flags & BLK_MQ_INSERT_AT_HEAD) || blk_rq_is_passthrough(rq)) {
if (flags & BLK_MQ_INSERT_AT_HEAD)
list_add(&rq->queuelist, &ssg->dispatch);
else
list_add_tail(&rq->queuelist, &ssg->dispatch);
} else {
ssg_add_rq_rb(ssg, rq);
if (rq_mergeable(rq)) {
elv_rqhash_add(q, rq);
if (!q->last_merge)
q->last_merge = rq;
}
/*
* set expire time and add to fifo list
*/
rq->fifo_time = jiffies + ssg->fifo_expire[data_dir];
list_add_tail(&rq->queuelist, &ssg->fifo_list[data_dir]);
}
}
static void ssg_insert_requests(struct blk_mq_hw_ctx *hctx,
struct list_head *list, blk_insert_t flags)
{
struct request_queue *q = hctx->queue;
struct ssg_data *ssg = q->elevator->elevator_data;
spin_lock(&ssg->lock);
while (!list_empty(list)) {
struct request *rq;
rq = list_first_entry(list, struct request, queuelist);
list_del_init(&rq->queuelist);
ssg_insert_request(hctx, rq, flags);
}
spin_unlock(&ssg->lock);
}
/*
* Nothing to do here. This is defined only to ensure that .finish_request
* method is called upon request completion.
*/
static void ssg_prepare_request(struct request *rq)
{
struct ssg_data *ssg = rq->q->elevator->elevator_data;
struct ssg_request_info *rqi;
atomic_inc(&ssg->allocated_rqs);
ssg_wb_run_ctrl_work(ssg, rq);
rqi = ssg_rq_info(ssg, rq);
if (likely(rqi)) {
rqi->tgid = task_tgid_nr(current->group_leader);
rcu_read_lock();
rqi->blkg = blkg_lookup(css_to_blkcg(curr_css()), rq->q);
ssg_blkcg_inc_rq(rqi->blkg);
if (ssg_blkcg_check_boost(rqi->blkg))
rqi->blkcg_boost = 1;
rcu_read_unlock();
blk_sec_stat_account_io_prepare(rq, &rqi->pio);
}
if (ssg_op_is_async_write(rq->cmd_flags))
atomic_inc(&ssg->async_write_rqs);
}
static void ssg_finish_request(struct request *rq)
{
struct request_queue *q = rq->q;
struct ssg_data *ssg = q->elevator->elevator_data;
struct ssg_request_info *rqi;
if (unlikely(!(rq->rq_flags & RQF_USE_SCHED)))
return;
atomic_dec(&ssg->allocated_rqs);
rqi = ssg_rq_info(ssg, rq);
if (likely(rqi)) {
rqi->tgid = 0;
ssg_blkcg_dec_rq(rqi->blkg);
rqi->blkg = NULL;
rqi->blkcg_boost = 0;
blk_sec_stat_account_io_finish(rq, &rqi->pio);
}
if (ssg_op_is_async_write(rq->cmd_flags))
atomic_dec(&ssg->async_write_rqs);
}
static bool ssg_has_work(struct blk_mq_hw_ctx *hctx)
{
struct ssg_data *ssg = hctx->queue->elevator->elevator_data;
return !list_empty_careful(&ssg->dispatch) ||
!list_empty_careful(&ssg->fifo_list[READ]) ||
!list_empty_careful(&ssg->fifo_list[WRITE]) ||
!list_empty_careful(&ssg->fifo_list[BOOST]);
}
/*
* sysfs parts below
*/
static ssize_t ssg_var_show(int var, char *page)
{
return sprintf(page, "%d\n", var);
}
static void ssg_var_store(int *var, const char *page)
{
long val;
if (!kstrtol(page, 10, &val))
*var = val;
}
#define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \
static ssize_t __FUNC(struct elevator_queue *e, char *page) \
{ \
struct ssg_data *ssg = e->elevator_data; \
int __data = __VAR; \
if (__CONV) \
__data = jiffies_to_msecs(__data); \
return ssg_var_show(__data, (page)); \
}
SHOW_FUNCTION(ssg_read_expire_show, ssg->fifo_expire[READ], 1);
SHOW_FUNCTION(ssg_write_expire_show, ssg->fifo_expire[WRITE], 1);
SHOW_FUNCTION(ssg_max_write_starvation_show, ssg->max_write_starvation, 0);
SHOW_FUNCTION(ssg_front_merges_show, ssg->front_merges, 0);
SHOW_FUNCTION(ssg_max_tgroup_rqs_show, ssg->max_tgroup_rqs, 0);
SHOW_FUNCTION(ssg_max_async_write_rqs_show, ssg->max_async_write_rqs, 0);
SHOW_FUNCTION(ssg_tgroup_shallow_depth_show, ssg->tgroup_shallow_depth, 0);
SHOW_FUNCTION(ssg_async_write_shallow_depth_show, ssg->async_write_shallow_depth, 0);
#undef SHOW_FUNCTION
#define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV) \
static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count) \
{ \
struct ssg_data *ssg = e->elevator_data; \
int __data; \
ssg_var_store(&__data, (page)); \
if (__data < (MIN)) \
__data = (MIN); \
else if (__data > (MAX)) \
__data = (MAX); \
if (__CONV) \
*(__PTR) = msecs_to_jiffies(__data); \
else \
*(__PTR) = __data; \
return count; \
}
STORE_FUNCTION(ssg_read_expire_store, &ssg->fifo_expire[READ], 0, INT_MAX, 1);
STORE_FUNCTION(ssg_write_expire_store, &ssg->fifo_expire[WRITE], 0, INT_MAX, 1);
STORE_FUNCTION(ssg_max_write_starvation_store, &ssg->max_write_starvation, INT_MIN, INT_MAX, 0);
STORE_FUNCTION(ssg_front_merges_store, &ssg->front_merges, 0, 1, 0);
#undef STORE_FUNCTION
#define SSG_ATTR(name) \
__ATTR(name, 0644, ssg_##name##_show, ssg_##name##_store)
#define SSG_ATTR_RO(name) \
__ATTR(name, 0444, ssg_##name##_show, NULL)
#define SSG_STAT_ATTR_RO(name) \
__ATTR(name, 0444, ssg_stat_##name##_show, NULL)
static struct elv_fs_entry ssg_attrs[] = {
SSG_ATTR(read_expire),
SSG_ATTR(write_expire),
SSG_ATTR(max_write_starvation),
SSG_ATTR(front_merges),
SSG_ATTR_RO(max_tgroup_rqs),
SSG_ATTR_RO(max_async_write_rqs),
SSG_ATTR_RO(tgroup_shallow_depth),
SSG_ATTR_RO(async_write_shallow_depth),
SSG_STAT_ATTR_RO(read_latency),
SSG_STAT_ATTR_RO(write_latency),
SSG_STAT_ATTR_RO(flush_latency),
SSG_STAT_ATTR_RO(discard_latency),
SSG_STAT_ATTR_RO(inflight),
SSG_STAT_ATTR_RO(rqs_info),
#if IS_ENABLED(CONFIG_MQ_IOSCHED_SSG_WB)
SSG_ATTR(wb_on_rqs),
SSG_ATTR(wb_off_rqs),
SSG_ATTR(wb_on_dirty_bytes),
SSG_ATTR(wb_off_dirty_bytes),
SSG_ATTR(wb_on_sync_write_bytes),
SSG_ATTR(wb_off_sync_write_bytes),
SSG_ATTR(wb_on_dirty_busy_written_bytes),
SSG_ATTR(wb_on_dirty_busy_msecs),
SSG_ATTR(wb_off_delay_msecs),
SSG_ATTR_RO(wb_triggered),
#endif
__ATTR_NULL
};
static struct elevator_type ssg_iosched = {
.ops = {
.insert_requests = ssg_insert_requests,
.dispatch_request = ssg_dispatch_request,
.completed_request = ssg_completed_request,
.prepare_request = ssg_prepare_request,
.finish_request = ssg_finish_request,
.next_request = elv_rb_latter_request,
.former_request = elv_rb_former_request,
.bio_merge = ssg_bio_merge,
.request_merge = ssg_request_merge,
.requests_merged = ssg_merged_requests,
.request_merged = ssg_request_merged,
.has_work = ssg_has_work,
.limit_depth = ssg_limit_depth,
.depth_updated = ssg_depth_updated,
.init_hctx = ssg_init_hctx,
.init_sched = ssg_init_queue,
.exit_sched = ssg_exit_queue,
},
.elevator_attrs = ssg_attrs,
.elevator_name = "ssg",
.elevator_alias = "ssg",
.elevator_features = ELEVATOR_F_ZBD_SEQ_WRITE,
.elevator_owner = THIS_MODULE,
};
MODULE_ALIAS("ssg");
static int __init ssg_iosched_init(void)
{
int ret;
ret = elv_register(&ssg_iosched);
if (ret)
return ret;
ret = ssg_blkcg_init();
if (ret) {
elv_unregister(&ssg_iosched);
return ret;
}
return ret;
}
static void __exit ssg_iosched_exit(void)
{
ssg_blkcg_exit();
elv_unregister(&ssg_iosched);
}
module_init(ssg_iosched_init);
module_exit(ssg_iosched_exit);
MODULE_AUTHOR("Jisoo Oh");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SSG IO Scheduler");

298
block/ssg-stat.c Normal file
View File

@@ -0,0 +1,298 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Statistics of SamSung Generic I/O scheduler
*
* Copyright (C) 2021 Changheun Lee <nanich.lee@samsung.com>
*/
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/sbitmap.h>
#include "elevator.h"
#include "blk-mq.h"
#include "ssg.h"
#define IO_TYPES (REQ_OP_DISCARD + 1)
static unsigned int byte_table[] = {
4096, // 4KB
32768, // 32KB
65536, // 64KB
131072, // 128KB
524288, // 512KB
1048576, // 1MB
UINT_MAX // should be last in this array
};
#define BYTE_TABLE_SIZE (sizeof(byte_table)/sizeof(unsigned int))
static u64 nsec_table[] = {
500000, // 0.5ms
1000000, // 1ms
2000000, // 2ms
3000000, // 3ms
4000000, // 4ms
5000000, // 5ms
10000000, // 10ms
20000000, // 20ms
ULLONG_MAX // should be last in this array
};
#define NSEC_TABLE_SIZE (sizeof(nsec_table)/sizeof(u64))
struct ssg_stats {
u64 io_latency_cnt[IO_TYPES][BYTE_TABLE_SIZE][NSEC_TABLE_SIZE];
};
struct ssg_bt_tags_iter_data {
struct blk_mq_tags *tags;
void *data;
bool reserved;
};
typedef bool (ssg_tag_iter_fn)(struct sbitmap *, unsigned int, void *);
static unsigned int byte_to_index(unsigned int byte)
{
unsigned int idx;
for (idx = 0; idx < BYTE_TABLE_SIZE; idx++)
if (byte <= byte_table[idx])
return idx;
return BYTE_TABLE_SIZE - 1;
}
static unsigned int nsec_to_index(u64 nsec)
{
unsigned int idx;
for (idx = 0; idx < NSEC_TABLE_SIZE; idx++)
if (nsec <= nsec_table[idx])
return idx;
return NSEC_TABLE_SIZE - 1;
}
static void update_io_latency(struct ssg_data *ssg, struct request *rq,
unsigned int data_size, u64 now)
{
struct ssg_stats *stats;
int type = req_op(rq);
int byte_idx, ns_idx;
if (type > REQ_OP_DISCARD)
return;
if (rq->io_start_time_ns > now)
return;
byte_idx = byte_to_index(data_size);
ns_idx = nsec_to_index(now - rq->io_start_time_ns);
stats = get_cpu_ptr(ssg->stats);
stats->io_latency_cnt[type][byte_idx][ns_idx]++;
put_cpu_ptr(stats);
}
void ssg_stat_account_io_done(struct ssg_data *ssg, struct request *rq,
unsigned int data_size, u64 now)
{
if (unlikely(!ssg->stats))
return;
update_io_latency(ssg, rq, data_size, now);
}
static int print_io_latency(struct ssg_stats __percpu *stats, int io_type,
char *buf, int buf_size)
{
u64 sum[BYTE_TABLE_SIZE][NSEC_TABLE_SIZE] = { 0, };
int cpu;
int len = 0;
int byte_idx, ns_idx;
for_each_possible_cpu(cpu) {
struct ssg_stats *s = per_cpu_ptr(stats, cpu);
for (byte_idx = 0; byte_idx < BYTE_TABLE_SIZE; byte_idx++)
for (ns_idx = 0; ns_idx < NSEC_TABLE_SIZE; ns_idx++)
sum[byte_idx][ns_idx] +=
s->io_latency_cnt[io_type][byte_idx][ns_idx];
}
for (byte_idx = 0; byte_idx < BYTE_TABLE_SIZE; byte_idx++) {
len += snprintf(buf + len, buf_size - len, "%u:",
byte_table[byte_idx] / 1024);
for (ns_idx = 0; ns_idx < NSEC_TABLE_SIZE; ns_idx++)
len += snprintf(buf + len, buf_size - len, " %llu",
sum[byte_idx][ns_idx]);
len += snprintf(buf + len, buf_size - len, "\n");
}
return len;
}
#define IO_LATENCY_SHOW_FUNC(__FUNC, __IO_TYPE) \
ssize_t __FUNC(struct elevator_queue *e, char *page) \
{ \
struct ssg_data *ssg = e->elevator_data; \
if (unlikely(!ssg->stats)) \
return 0; \
return print_io_latency(ssg->stats, \
__IO_TYPE, page, PAGE_SIZE); \
}
IO_LATENCY_SHOW_FUNC(ssg_stat_read_latency_show, REQ_OP_READ);
IO_LATENCY_SHOW_FUNC(ssg_stat_write_latency_show, REQ_OP_WRITE);
IO_LATENCY_SHOW_FUNC(ssg_stat_flush_latency_show, REQ_OP_FLUSH);
IO_LATENCY_SHOW_FUNC(ssg_stat_discard_latency_show, REQ_OP_DISCARD);
static void ssg_all_tag_iter(struct blk_mq_tags *tags, ssg_tag_iter_fn *fn, struct ssg_bt_tags_iter_data *iter_data)
{
iter_data->tags = tags;
if (tags->nr_reserved_tags) {
iter_data->reserved = true;
sbitmap_for_each_set(&tags->breserved_tags.sb, fn, iter_data);
}
iter_data->reserved = false;
sbitmap_for_each_set(&tags->bitmap_tags.sb, fn, iter_data);
}
static bool ssg_count_inflight(struct sbitmap *bitmap, unsigned int bitnr, void *data)
{
struct ssg_bt_tags_iter_data *iter_data = data;
struct blk_mq_tags *tags = iter_data->tags;
unsigned int *inflight = iter_data->data;
bool reserved = iter_data->reserved;
struct request *rq;
if (!reserved)
bitnr += tags->nr_reserved_tags;
rq = tags->static_rqs[bitnr];
if (!rq)
return true;
if (req_op(rq) < IO_TYPES)
inflight[req_op(rq)]++;
return true;
}
static void get_ssg_inflight(struct request_queue *q, unsigned int *inflight)
{
struct blk_mq_hw_ctx *hctx;
unsigned long i;
struct ssg_bt_tags_iter_data iter_data = {
.data = inflight,
};
if (blk_mq_is_shared_tags(q->tag_set->flags)) {
ssg_all_tag_iter(q->sched_shared_tags, ssg_count_inflight, &iter_data);
} else {
queue_for_each_hw_ctx(q, hctx, i) {
/*
* If no software queues are currently mapped to this
* hardware queue, there's nothing to check
*/
if (!blk_mq_hw_queue_mapped(hctx))
continue;
ssg_all_tag_iter(hctx->sched_tags, ssg_count_inflight, &iter_data);
}
}
}
ssize_t ssg_stat_inflight_show(struct elevator_queue *e, char *page)
{
struct ssg_data *ssg = e->elevator_data;
unsigned int inflight[IO_TYPES] = {0, };
if (unlikely(!ssg->stats))
return 0;
get_ssg_inflight(ssg->queue, inflight);
return snprintf(page, PAGE_SIZE, "%u %u %u\n", inflight[REQ_OP_READ],
inflight[REQ_OP_WRITE], inflight[REQ_OP_DISCARD]);
}
static bool print_ssg_rq_info(struct sbitmap *bitmap, unsigned int bitnr, void *data)
{
struct ssg_bt_tags_iter_data *iter_data = data;
struct blk_mq_tags *tags = iter_data->tags;
bool reserved = iter_data->reserved;
char *page = iter_data->data;
struct request *rq;
int len = strlen(page);
if (!reserved)
bitnr += tags->nr_reserved_tags;
rq = tags->static_rqs[bitnr];
if (!rq)
return true;
scnprintf(page + len, PAGE_SIZE - len, "%d %d %x %x %llu %u %llu %d\n",
rq->tag, rq->internal_tag, req_op(rq), rq->rq_flags,
blk_rq_pos(rq), blk_rq_bytes(rq), rq->start_time_ns, rq->state);
return true;
}
static void print_ssg_rqs(struct request_queue *q, char *page)
{
struct blk_mq_hw_ctx *hctx;
unsigned long i;
struct ssg_bt_tags_iter_data iter_data = {
.data = page,
};
if (blk_mq_is_shared_tags(q->tag_set->flags)) {
ssg_all_tag_iter(q->sched_shared_tags, print_ssg_rq_info, &iter_data);
} else {
queue_for_each_hw_ctx(q, hctx, i) {
/*
* If no software queues are currently mapped to this
* hardware queue, there's nothing to check
*/
if (!blk_mq_hw_queue_mapped(hctx))
continue;
ssg_all_tag_iter(hctx->sched_tags, print_ssg_rq_info, &iter_data);
}
}
}
ssize_t ssg_stat_rqs_info_show(struct elevator_queue *e, char *page)
{
struct ssg_data *ssg = e->elevator_data;
if (unlikely(!ssg->stats))
return 0;
print_ssg_rqs(ssg->queue, page);
return strlen(page);
}
int ssg_stat_init(struct ssg_data *ssg)
{
ssg->stats = alloc_percpu_gfp(struct ssg_stats,
GFP_KERNEL | __GFP_ZERO);
if (!ssg->stats)
return -ENOMEM;
return 0;
}
void ssg_stat_exit(struct ssg_data *ssg)
{
if (ssg->stats)
free_percpu(ssg->stats);
}

372
block/ssg-wb.c Normal file
View File

@@ -0,0 +1,372 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Write Booster of SamSung Generic I/O scheduler
*
* Copyright (C) 2022 Jisoo Oh <jisoo2146.oh@samsung.com>
* Copyright (C) 2023 Changheun Lee <nanich.lee@samsung.com>
*/
#include <linux/blkdev.h>
#include <linux/sbitmap.h>
#include <linux/blk-mq.h>
#include "elevator.h"
#include "blk-mq.h"
#include "blk-sec.h"
#include "ssg.h"
struct wb_params {
int on_rqs;
int off_rqs;
int on_dirty_bytes;
int off_dirty_bytes;
int on_sync_write_bytes;
int off_sync_write_bytes;
int on_dirty_busy_written_pages;
int on_dirty_busy_jiffies;
int off_delay_jiffies;
unsigned long dirty_busy_start_jiffies;
unsigned long dirty_busy_start_written_pages;
};
struct ssg_wb_data {
struct wb_params params;
struct request_queue *queue;
struct delayed_work wb_ctrl_work;
struct delayed_work wb_deferred_off_work;
atomic_t wb_triggered;
};
struct io_amount_data {
unsigned int allocated_rqs;
unsigned int sync_write_bytes;
unsigned long dirty_bytes;
};
struct ssg_wb_iter_data {
struct blk_mq_tags *tags;
void *data;
bool reserved;
};
static const int _on_rqs_ratio = 90;
static const int _off_rqs_ratio = 40;
static const int _on_dirty_bytes = 50*1024*1024;
static const int _off_dirty_bytes = 25*1024*1024;
static const int _on_sync_write_bytes = 2*1024*1024;
static const int _off_sync_write_bytes = 1*1024*1024;
static const int _on_dirty_busy_written_bytes = 100*1024*1024;
static const int _on_dirty_busy_msecs = 1000;
static const int _off_delay_msecs = 5000;
#define may_wb_on(io_amount, params) \
((io_amount).allocated_rqs >= params.on_rqs || \
(io_amount).dirty_bytes >= params.on_dirty_bytes || \
(io_amount).sync_write_bytes >= params.on_sync_write_bytes || \
(params.dirty_busy_start_written_pages && \
(global_node_page_state(NR_WRITTEN) - params.dirty_busy_start_written_pages) \
> params.on_dirty_busy_written_pages))
#define may_wb_off(io_amount, params) \
((io_amount).allocated_rqs < params.off_rqs && \
(io_amount).dirty_bytes < params.off_dirty_bytes && \
(io_amount).sync_write_bytes < params.off_sync_write_bytes)
static void trigger_wb_on(struct ssg_wb_data *ssg_wb)
{
cancel_delayed_work_sync(&ssg_wb->wb_deferred_off_work);
blk_sec_wb_ctrl(true, WB_REQ_IOSCHED);
atomic_set(&ssg_wb->wb_triggered, true);
}
static void wb_off_work(struct work_struct *work)
{
blk_sec_wb_ctrl(false, WB_REQ_IOSCHED);
}
static void trigger_wb_off(struct ssg_wb_data *ssg_wb)
{
queue_delayed_work(blk_sec_common_wq,
&ssg_wb->wb_deferred_off_work, ssg_wb->params.off_delay_jiffies);
atomic_set(&ssg_wb->wb_triggered, false);
}
static void init_wb_params(struct ssg_wb_data *ssg_wb)
{
ssg_wb->params.on_rqs = ssg_wb->queue->nr_requests * _on_rqs_ratio / 100U;
ssg_wb->params.off_rqs = ssg_wb->queue->nr_requests * _off_rqs_ratio / 100U;
ssg_wb->params.on_dirty_bytes = _on_dirty_bytes;
ssg_wb->params.off_dirty_bytes = _off_dirty_bytes;
ssg_wb->params.on_sync_write_bytes = _on_sync_write_bytes;
ssg_wb->params.off_sync_write_bytes = _off_sync_write_bytes;
ssg_wb->params.on_dirty_busy_written_pages = _on_dirty_busy_written_bytes / PAGE_SIZE;
ssg_wb->params.on_dirty_busy_jiffies = msecs_to_jiffies(_on_dirty_busy_msecs);
ssg_wb->params.off_delay_jiffies = msecs_to_jiffies(_off_delay_msecs);
ssg_wb->params.dirty_busy_start_written_pages = 0;
ssg_wb->params.dirty_busy_start_jiffies = 0;
}
static bool wb_count_io(struct sbitmap *bitmap, unsigned int bitnr, void *data)
{
struct ssg_wb_iter_data *iter_data = data;
struct blk_mq_tags *tags = iter_data->tags;
struct io_amount_data *io_amount = iter_data->data;
bool reserved = iter_data->reserved;
struct request *rq;
if (!reserved)
bitnr += tags->nr_reserved_tags;
rq = tags->static_rqs[bitnr];
if (!rq)
return true;
io_amount->allocated_rqs++;
if (req_op(rq) == REQ_OP_WRITE && rq->cmd_flags & REQ_SYNC)
io_amount->sync_write_bytes += blk_rq_bytes(rq);
return true;
}
static void wb_all_tag_iter(struct blk_mq_tags *tags, struct io_amount_data *io_amount)
{
struct ssg_wb_iter_data iter_data = {
.data = io_amount,
.tags = tags,
};
if (tags->nr_reserved_tags) {
iter_data.reserved = true;
sbitmap_for_each_set(&tags->breserved_tags.sb, wb_count_io, &iter_data);
}
iter_data.reserved = false;
sbitmap_for_each_set(&tags->bitmap_tags.sb, wb_count_io, &iter_data);
}
static void wb_get_io_amount(struct request_queue *q, struct io_amount_data *io_amount)
{
struct blk_mq_hw_ctx *hctx;
unsigned long i;
if (blk_mq_is_shared_tags(q->tag_set->flags)) {
wb_all_tag_iter(q->sched_shared_tags, io_amount);
} else {
queue_for_each_hw_ctx(q, hctx, i) {
/*
* If no software queues are currently mapped to this
* hardware queue, there's nothing to check
*/
if (!blk_mq_hw_queue_mapped(hctx))
continue;
wb_all_tag_iter(hctx->sched_tags, io_amount);
}
}
io_amount->dirty_bytes = (global_node_page_state(NR_FILE_DIRTY) +
global_node_page_state(NR_WRITEBACK)) * PAGE_SIZE;
}
static void update_dirty_busy_status(struct ssg_wb_data *ssg_wb, struct io_amount_data *io_amount)
{
if (time_after(jiffies, ssg_wb->params.dirty_busy_start_jiffies + ssg_wb->params.on_dirty_busy_jiffies)) {
ssg_wb->params.dirty_busy_start_jiffies = 0;
ssg_wb->params.dirty_busy_start_written_pages = 0;
}
if (!ssg_wb->params.dirty_busy_start_jiffies && io_amount->dirty_bytes >= ssg_wb->params.off_dirty_bytes) {
ssg_wb->params.dirty_busy_start_jiffies = jiffies;
ssg_wb->params.dirty_busy_start_written_pages = global_node_page_state(NR_WRITTEN);
}
}
static void wb_ctrl_work(struct work_struct *work)
{
struct ssg_wb_data *ssg_wb = container_of(to_delayed_work(work),
struct ssg_wb_data, wb_ctrl_work);
struct io_amount_data io_amount = {
.allocated_rqs = 0,
.sync_write_bytes = 0,
};
wb_get_io_amount(ssg_wb->queue, &io_amount);
update_dirty_busy_status(ssg_wb, &io_amount);
if (atomic_read(&ssg_wb->wb_triggered)) {
if (may_wb_off(io_amount, ssg_wb->params))
trigger_wb_off(ssg_wb);
} else {
if (may_wb_on(io_amount, ssg_wb->params))
trigger_wb_on(ssg_wb);
}
if (atomic_read(&ssg_wb->wb_triggered))
queue_delayed_work(blk_sec_common_wq, &ssg_wb->wb_ctrl_work,
ssg_wb->params.off_delay_jiffies);
}
void ssg_wb_run_ctrl_work(struct ssg_data *ssg, struct request *rq)
{
struct ssg_wb_data *ssg_wb = ssg->wb_data;
if (!ssg_wb)
return;
if (atomic_read(&ssg_wb->wb_triggered))
return;
if (((rq->cmd_flags & REQ_OP_MASK) == REQ_OP_READ)
&& atomic_read(&ssg->allocated_rqs) < ssg_wb->params.on_rqs)
return;
if (!work_busy(&ssg_wb->wb_ctrl_work.work))
queue_delayed_work(blk_sec_common_wq, &ssg_wb->wb_ctrl_work, 0);
}
void ssg_wb_depth_updated(struct blk_mq_hw_ctx *hctx)
{
struct request_queue *q = hctx->queue;
struct ssg_data *ssg = q->elevator->elevator_data;
struct ssg_wb_data *ssg_wb = ssg->wb_data;
int nr_rqs;
if (!ssg_wb)
return;
nr_rqs = hctx->sched_tags->bitmap_tags.sb.depth;
ssg_wb->params.on_rqs = nr_rqs * _on_rqs_ratio / 100U;
ssg_wb->params.off_rqs = nr_rqs * _off_rqs_ratio / 100U;
}
void ssg_wb_init(struct ssg_data *ssg)
{
struct ssg_wb_data *ssg_wb;
struct gendisk *gd = ssg->queue->disk;
if (!gd)
return;
if (!blk_sec_wb_is_supported(gd))
return;
ssg_wb = kzalloc(sizeof(*ssg_wb), GFP_KERNEL);
if (!ssg_wb)
return;
ssg_wb->queue = ssg->queue;
INIT_DELAYED_WORK(&ssg_wb->wb_ctrl_work, wb_ctrl_work);
INIT_DELAYED_WORK(&ssg_wb->wb_deferred_off_work, wb_off_work);
init_wb_params(ssg_wb);
atomic_set(&ssg_wb->wb_triggered, false);
ssg->wb_data = ssg_wb;
}
void ssg_wb_exit(struct ssg_data *ssg)
{
struct ssg_wb_data *ssg_wb = ssg->wb_data;
if (!ssg_wb)
return;
cancel_delayed_work_sync(&ssg_wb->wb_ctrl_work);
cancel_delayed_work_sync(&ssg_wb->wb_deferred_off_work);
if (atomic_read(&ssg_wb->wb_triggered))
blk_sec_wb_ctrl(false, WB_REQ_IOSCHED);
ssg->wb_data = NULL;
kfree(ssg_wb);
}
/* sysfs */
#define SHOW_FUNC(__NAME, __VAR, __CONV) \
ssize_t ssg_wb_##__NAME##_show(struct elevator_queue *e, char *page) \
{ \
struct ssg_data *ssg = e->elevator_data; \
struct ssg_wb_data *ssg_wb = ssg->wb_data; \
int val; \
\
if (!ssg_wb) \
return 0; \
\
if (__CONV == 1) \
val = jiffies_to_msecs(__VAR); \
else if (__CONV == 2) \
val = __VAR * PAGE_SIZE; \
else \
val = __VAR; \
\
return snprintf(page, PAGE_SIZE, "%d\n", val); \
}
SHOW_FUNC(on_rqs, ssg_wb->params.on_rqs, 0);
SHOW_FUNC(off_rqs, ssg_wb->params.off_rqs, 0);
SHOW_FUNC(on_dirty_bytes, ssg_wb->params.on_dirty_bytes, 0);
SHOW_FUNC(off_dirty_bytes, ssg_wb->params.off_dirty_bytes, 0);
SHOW_FUNC(on_sync_write_bytes, ssg_wb->params.on_sync_write_bytes, 0);
SHOW_FUNC(off_sync_write_bytes, ssg_wb->params.off_sync_write_bytes, 0);
SHOW_FUNC(on_dirty_busy_written_bytes, ssg_wb->params.on_dirty_busy_written_pages, 2);
SHOW_FUNC(on_dirty_busy_msecs, ssg_wb->params.on_dirty_busy_jiffies, 1);
SHOW_FUNC(off_delay_msecs, ssg_wb->params.off_delay_jiffies, 1);
#undef SHOW_FUNC
#define STORE_FUNC(__NAME, __PTR, __VAR, __COND, __CONV) \
ssize_t ssg_wb_##__NAME##_store(struct elevator_queue *e, \
const char *page, size_t count) \
{ \
struct ssg_data *ssg = e->elevator_data; \
struct ssg_wb_data *ssg_wb = ssg->wb_data; \
int __VAR; \
\
if (!ssg_wb) \
return count; \
\
if (kstrtoint(page, 10, &__VAR)) \
return count; \
\
if (!(__COND)) \
return count; \
\
if (__CONV == 1) \
*(__PTR) = msecs_to_jiffies(__VAR); \
else if (__CONV == 2) \
*(__PTR) = __VAR / PAGE_SIZE; \
else \
*(__PTR) = __VAR; \
\
return count; \
}
STORE_FUNC(on_rqs, &ssg_wb->params.on_rqs, val,
val >= ssg_wb->params.off_rqs, 0);
STORE_FUNC(off_rqs, &ssg_wb->params.off_rqs, val,
val >= 0 && val <= ssg_wb->params.on_rqs, 0);
STORE_FUNC(on_dirty_bytes, &ssg_wb->params.on_dirty_bytes, val,
val >= ssg_wb->params.off_dirty_bytes, 0);
STORE_FUNC(off_dirty_bytes, &ssg_wb->params.off_dirty_bytes, val,
val >= 0 && val <= ssg_wb->params.on_dirty_bytes, 0);
STORE_FUNC(on_sync_write_bytes, &ssg_wb->params.on_sync_write_bytes, val,
val >= ssg_wb->params.off_sync_write_bytes, 0);
STORE_FUNC(off_sync_write_bytes, &ssg_wb->params.off_sync_write_bytes, val,
val >= 0 && val <= ssg_wb->params.on_sync_write_bytes, 0);
STORE_FUNC(on_dirty_busy_written_bytes, &ssg_wb->params.on_dirty_busy_written_pages, val,
val >= 0, 2);
STORE_FUNC(on_dirty_busy_msecs, &ssg_wb->params.on_dirty_busy_jiffies, val,
val >= 0, 1);
STORE_FUNC(off_delay_msecs, &ssg_wb->params.off_delay_jiffies, val, val >= 0, 1);
#undef STORE_FUNC
ssize_t ssg_wb_triggered_show(struct elevator_queue *e, char *page)
{
struct ssg_data *ssg = e->elevator_data;
struct ssg_wb_data *ssg_wb = ssg->wb_data;
if (!ssg_wb)
return 0;
return snprintf(page, PAGE_SIZE, "%d\n", atomic_read(&ssg_wb->wb_triggered));
}

199
block/ssg.h Normal file
View File

@@ -0,0 +1,199 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef SSG_H
#define SSG_H
#include "blk-cgroup.h"
struct ssg_request_info {
pid_t tgid;
sector_t sector;
unsigned int data_size;
unsigned int blkcg_boost;
struct blkcg_gq *blkg;
void *pio;
};
struct ssg_data {
struct request_queue *queue;
/*
* requests are present on both sort_list and fifo_list
*/
struct rb_root sort_list[3];
struct list_head fifo_list[3];
/*
* next in sort order. read, write or both are NULL
*/
struct request *next_rq[3];
unsigned int starved_writes; /* times reads have starved writes */
unsigned int starved_normal; /* times boosts have starved normal reads or writes */
/*
* settings that change how the i/o scheduler behaves
*/
int fifo_expire[3];
int max_write_starvation;
int max_normal_starvation;
int front_merges;
/*
* to control request allocation
*/
atomic_t allocated_rqs;
atomic_t async_write_rqs;
int congestion_threshold_rqs;
int max_tgroup_rqs;
int max_async_write_rqs;
unsigned int tgroup_shallow_depth; /* thread group shallow depth for each tag map */
unsigned int async_write_shallow_depth; /* async write shallow depth for each tag map */
/*
* I/O context information for each request
*/
struct ssg_request_info *rq_info;
/*
* Statistics
*/
void __percpu *stats;
spinlock_t lock;
struct list_head dispatch;
/*
* Write booster
*/
void *wb_data;
};
static inline struct cgroup_subsys_state *curr_css(void)
{
return task_css(current, io_cgrp_id);
}
/* ssg-stat.c */
extern int ssg_stat_init(struct ssg_data *ssg);
extern void ssg_stat_exit(struct ssg_data *ssg);
extern void ssg_stat_account_io_done(struct ssg_data *ssg,
struct request *rq, unsigned int data_size, u64 now);
extern ssize_t ssg_stat_read_latency_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_stat_write_latency_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_stat_flush_latency_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_stat_discard_latency_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_stat_inflight_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_stat_rqs_info_show(struct elevator_queue *e, char *page);
/* ssg-cgroup.c */
#if IS_ENABLED(CONFIG_MQ_IOSCHED_SSG_CGROUP)
struct ssg_blkcg {
struct blkcg_policy_data cpd; /* must be the first member */
int max_available_ratio;
int boost_on;
};
struct ssg_blkg {
struct blkg_policy_data pd; /* must be the first member */
atomic_t current_rqs;
int max_available_rqs;
unsigned int shallow_depth; /* shallow depth for each tag map to get sched tag */
};
extern int ssg_blkcg_init(void);
extern void ssg_blkcg_exit(void);
extern int ssg_blkcg_activate(struct request_queue *q);
extern void ssg_blkcg_deactivate(struct request_queue *q);
extern unsigned int ssg_blkcg_shallow_depth(struct request_queue *q);
extern void ssg_blkcg_depth_updated(struct blk_mq_hw_ctx *hctx);
extern void ssg_blkcg_inc_rq(struct blkcg_gq *blkg);
extern void ssg_blkcg_dec_rq(struct blkcg_gq *blkg);
extern int ssg_blkcg_check_boost(struct blkcg_gq *blkg);
#else
static inline int ssg_blkcg_init(void)
{
return 0;
}
static inline void ssg_blkcg_exit(void)
{
}
static inline int ssg_blkcg_activate(struct request_queue *q)
{
return 0;
}
static inline void ssg_blkcg_deactivate(struct request_queue *q)
{
}
static inline unsigned int ssg_blkcg_shallow_depth(struct request_queue *q)
{
return 0;
}
static inline void ssg_blkcg_depth_updated(struct blk_mq_hw_ctx *hctx)
{
}
static inline void ssg_blkcg_inc_rq(struct blkcg_gq *blkg)
{
}
static inline void ssg_blkcg_dec_rq(struct blkcg_gq *blkg)
{
}
static inline int ssg_blkcg_check_boost(struct blkcg_gq *blkg)
{
return 0;
}
#endif
/* ssg-wb.c */
#if IS_ENABLED(CONFIG_MQ_IOSCHED_SSG_WB)
extern void ssg_wb_run_ctrl_work(struct ssg_data *ssg, struct request *rq);
extern void ssg_wb_depth_updated(struct blk_mq_hw_ctx *hctx);
extern void ssg_wb_init(struct ssg_data *ssg);
extern void ssg_wb_exit(struct ssg_data *ssg);
extern ssize_t ssg_wb_on_rqs_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_on_rqs_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_off_rqs_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_off_rqs_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_on_dirty_bytes_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_on_dirty_bytes_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_off_dirty_bytes_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_off_dirty_bytes_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_on_sync_write_bytes_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_on_sync_write_bytes_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_off_sync_write_bytes_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_off_sync_write_bytes_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_on_dirty_busy_written_bytes_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_on_dirty_busy_written_bytes_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_on_dirty_busy_msecs_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_on_dirty_busy_msecs_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_off_delay_msecs_show(struct elevator_queue *e, char *page);
extern ssize_t ssg_wb_off_delay_msecs_store(struct elevator_queue *e, const char *page, size_t count);
extern ssize_t ssg_wb_triggered_show(struct elevator_queue *e, char *page);
#else
static inline void ssg_wb_run_ctrl_work(struct ssg_data *ssg, struct request *rq)
{
}
static inline void ssg_wb_depth_updated(struct blk_mq_hw_ctx *hctx)
{
}
static inline void ssg_wb_init(struct ssg_data *ssg)
{
}
static inline void ssg_wb_exit(struct ssg_data *ssg)
{
}
#endif
#endif // SSG_H

17
build.config.allyesconfig Normal file
View File

@@ -0,0 +1,17 @@
################################################################################
# Common MSM configuration for building non-GKI-based kernels
DEFCONFIG="gki_defconfig"
# For allyes target, keeping perf config as common for both debug & perf defconfigs.
# This has to be changed when debug variant of allyes target is brought up.
function build_defconfig_fragments() {
if [[ "${VARIANT}" == "perf_defconfig" || "${VARIANT}" == "debug_defconfig" ]]; then
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_perf.config vendor/${MSM_ARCH}-${DEFCONFIG}
fi
}
build_defconfig_fragments
function update_config() {
(cd ${OUT_DIR} && \
make O=${OUT_DIR} $archsubarch CROSS_COMPILE=${CROSS_COMPILE} ${TOOL_ARGS} ${MAKE_ARGS} mod2yesconfig)
}
POST_DEFCONFIG_CMDS="update_config"

View File

@@ -16,6 +16,12 @@ DTC=$(command -v dtc || { echo "WARNING: $BUILD_CONFIG loaded without Kleaf herm
echo "${ROOT_DIR}/${BUILDTOOLS_PREBUILT_BIN}/dtc";
})
if ! "$DTC" -Wno-interrupt_provider --version > /dev/null 2>&1; then
echo "WARNING: $("$DTC" --version) does not support -Wno-interrupt_provider" >&2
DTC="${ROOT_DIR}/${BUILDTOOLS_PREBUILT_BIN}/dtc"
echo "WARNING: Falling back to $DTC" >&2
fi
KCFLAGS="${KCFLAGS} -D__ANDROID_COMMON_KERNEL__"
EXTRA_CMDS=''
STOP_SHIP_TRACEPRINTK=1

7
build.config.lego Normal file
View File

@@ -0,0 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# COPYRIGHT(C) 2023 Samsung Electronics Co., Ltd. All Right Reserved.
function build_defconfig_lego_fragments() {
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/lego.config vendor/${MSM_ARCH}-gki_defconfig
}
build_defconfig_lego_fragments

289
build.config.msm.common Normal file
View File

@@ -0,0 +1,289 @@
# The following additional environment variables are considered when build.config.msm.common is
# included:
#
# DT_OVERLAY_SUPPORT
# If set, then create a dtbo.img
# BUILD_VENDOR_DLKM
# If set, then enables creation of vendor_dlkm.img using all modules
# not part of the first-stage ramdisk
# EXTRA_CONFIGS
# All files in this list are sourced
CONFIG_DIR=arch/${ARCH}/configs
CONFIG_TARGET=msm.${MSM_ARCH}
################################################################################
##
function compile_external_dtc() {
(
# Bazel builds dtc with its own rule, so skip if building with Bazel
if [ -n "$BUILDING_WITH_BAZEL" ]; then
return
fi
OUT_DIR=${COMMON_OUT_DIR}/external/dtc
[ "${SKIP_MRPROPER}" != "1" ] && rm -rf ${OUT_DIR}
cd ${ROOT_DIR}/external/dtc
DTC_MAKE_ARGS=("CC=${HOSTCC}" "AR=${AR}")
DTC_MAKE_ARGS+=("LDFLAGS=${HOSTLDFLAGS} -fuse-ld=${LD##*.} --rtlib=compiler-rt")
DTC_MAKE_ARGS+=("EXTRA_CFLAGS=${HOSTCFLAGS}")
# PKG_CONFIG would pull from host environment to determine if libyaml and libpython are
# available. We want a hermetic build that doesn't rely on host tools, so make dtc build think
# none of these libraries are installed.
DTC_MAKE_ARGS+=("PKG_CONFIG=false")
make all install "${DTC_MAKE_ARGS[@]}" NO_PYTHON=1 PREFIX=${COMMON_OUT_DIR}/host
)
}
append_cmd PRE_DEFCONFIG_CMDS 'compile_external_dtc'
################################################################################
## DTB general support
DTB_DIR=vendor/qcom
DTC_OVERLAY_TEST_EXT=ufdt_apply_overlay
# Force /__symbols__ generation for all DTB[O]s
DTC_FLAGS="-@"
MAKE_GOALS+=" dtbs"
function install_dtbs() {
local INSTALL_DTBS_PATH="${COMMON_OUT_DIR}/dtb_staging"
local dtb_types="${MSM_ARCH}-"
if [ "${DT_OVERLAY_SUPPORT}" -eq "1" ]; then
dtb_types="${dtb_types}overlays-"
fi
# Staging directory required because arch/$ARCH/arm64/boot/dts/**/*.dtb structure copied and
# we want a flat directory with all the DTBs.
rm -rf "${INSTALL_DTBS_PATH}"
(cd ${KERNEL_DIR} && make "${TOOL_ARGS[@]}" O=${OUT_DIR} "${MAKE_ARGS[@]}" INSTALL_DTBS_PATH="${INSTALL_DTBS_PATH}" DTB_TYPES="${dtb_types}" dtbs_install)
cp $(find ${INSTALL_DTBS_PATH} -type f \( -name "*.dtb" -o -name "*.dtbo" \)) ${DIST_DIR}
}
append_cmd DIST_CMDS 'install_dtbs'
ADDITIONAL_HOST_TOOLS+=" install" # for scripts/Makefile.dtbinst
FILES+="
.config
Module.symvers
"
################################################################################
## Variant Selection
if [ -z "${VARIANT}" ] || [ "${VARIANT}" == "default" ]; then
VARIANT="${VARIANTS[0]}"
fi
if ( for v in "${VARIANTS[@]}"; do if [ "${v}" = "${VARIANT}" ]; then exit 1; fi; done; exit 0 ) ; then
echo "Unsupported variant '${VARIANT}'"
exit 1
fi
################################################################################
## defconfigs
# Helper function to let build.config files merge config fragments
# Usage: append_cmd PRE_DEFCONFIG_CMDS 'merge_defconfig_fragment ${DEFCONFIG} ${fragment_config}'
DEFCONFIG_FRAGMENTS=""
function merge_defconfig_fragments() {
if ( [ -z "${DEFCONFIG_FRAGMENTS}" ] ||
[ "${DEFCONFIG_FRAGMENTS}" = "${DEFCONFIG}" ] ); then
echo "No defconfig fragments for ${DEFCONFIG}"
return
fi
local output=$(mktemp)
mkdir -p $(dirname ${OUT_DIR}/arch/${ARCH}/configs/${DEFCONFIG})
KCONFIG_CONFIG=${OUT_DIR}/arch/${ARCH}/configs/${DEFCONFIG} \
${KERNEL_DIR}/scripts/kconfig/merge_config.sh \
-m -r -y ${DEFCONFIG_FRAGMENTS} | tee $output
set +x
if grep -q -E -e "Previous value: [^=]+=[ym]" $output; then
echo "========================================================"
echo "ERROR! Detected overridden config!"
grep -C 1 -E -e "Previous value: [^=]+=[ym]" $output >&2
rm $output
exit 1
fi
local temp_config=$(mktemp)
(cd ${KERNEL_DIR} && KCONFIG_CONFIG=${temp_config} make "${TOOL_ARGS[@]}" O=${OUT_DIR} "${MAKE_ARGS[@]}" ${DEFCONFIG}) 2>&1 | tee $output
if grep -q -e "warning:" $output; then
echo "========================================================"
echo "ERROR! Treating config warnings as errors"
grep -e "warning" $output >&2
rm $output $temp_config
exit 1
fi
rm $output $temp_config
set -x
}
append_cmd PRE_DEFCONFIG_CMDS "merge_defconfig_fragments"
function check_merged_defconfig() {
if ( [ -z "${DEFCONFIG_FRAGMENTS}" ] ||
[ "${DEFCONFIG_FRAGMENTS}" = "${DEFCONFIG}" ] ); then
return
fi
local output=$(mktemp)
${KERNEL_DIR}/scripts/diffconfig "${OUT_DIR}/arch/${ARCH}/configs/${DEFCONFIG}" ${OUT_DIR}/.config > $output
set +x
# Allow CONFIG_CMDLINE changes
if grep -q -v -E -e "^\+" -e "^CMDLINE " $output; then
echo "========================================================"
echo "ERROR! Defconfig fragment did not apply as expected"
grep -v -E -e "^\+" -e "^CMDLINE " $output
rm $output
exit 1
fi
rm $output
set -x
}
append_cmd POST_DEFCONFIG_CMDS "check_merged_defconfig"
# Wrapper function around merge_defconfig_fragment to reduce repeated logic
# Usage: apply_defconfig_fragment ${KERNEL_DIR}/cuttlefish.fragment cuttlefish-gki_defconfig
function apply_defconfig_fragment() {
FRAGMENT_CONFIG=$1
if [ -z "${DEFCONFIG_FRAGMENTS}" ]; then
DEFCONFIG_FRAGMENTS="${KERNEL_DIR}/arch/${ARCH}/configs/${DEFCONFIG}"
fi
DEFCONFIG_FRAGMENTS="${DEFCONFIG_FRAGMENTS} $1"
DEFCONFIG="${2:-${DEFCONFIG}}"
}
################################################################################
## DLKMs
if [ -e "${KERNEL_DIR}/modules.list.${CONFIG_TARGET}" ]; then
MODULES_LIST=${KERNEL_DIR}/modules.list.${CONFIG_TARGET}
fi
if [ -e "${KERNEL_DIR}/modules.blocklist.${CONFIG_TARGET}" ]; then
MODULES_BLOCKLIST="${KERNEL_DIR}/modules.blocklist.${CONFIG_TARGET}"
VENDOR_DLKM_MODULES_BLOCKLIST="${KERNEL_DIR}/modules.blocklist.${CONFIG_TARGET}"
fi
if [ "${BUILD_VENDOR_DLKM}" == "1" ]; then
COMBINED_MODULE_LIST=$(mktemp)
fi
if [[ "${PREPARE_SYSTEM_DLKM}" == "1" && ! -z "${SYSTEM_DLKM_MODULES_LIST}" ]]; then
{
awk -F'/' '{print $NF}' ${SYSTEM_DLKM_MODULES_LIST}
[ -f "${MODULES_LIST}" ] && cat "${MODULES_LIST}"
} | sed -e '/^$/d' > ${COMBINED_MODULE_LIST}
fi
function prepare_vendor_dlkm() {
if [ -z "${VENDOR_DLKM_MODULES_LIST}" ]; then
local module_list_flag=
if [ -s "${COMBINED_MODULE_LIST}" ]; then
module_list_flag="-f ${COMBINED_MODULE_LIST}"
elif [ -e "${MODULES_LIST}" ]; then
module_list_flag="-f ${MODULES_LIST}"
else
module_list_flag="-e ''"
fi
(cd "${MODULES_STAGING_DIR}/lib/modules/" && find -type f -name "*.ko" -printf "%f\n") | \
grep -w -v ${module_list_flag} - > ${MODULES_STAGING_DIR}/vendor_dlkm.modules.load
VENDOR_DLKM_MODULES_LIST="${MODULES_STAGING_DIR}/vendor_dlkm.modules.load"
if [[ ! -s ${VENDOR_DLKM_MODULES_LIST} ]]; then
echo "========================================================"
echo "WARNING: ${VENDOR_DLKM_MODULES_LIST} is empty file!"
fi
fi
SUPER_IMAGE_CONTENTS+=("${DIST_DIR}/vendor_dlkm.img")
rm ${COMBINED_MODULE_LIST}
}
if [ "${BUILD_VENDOR_DLKM}" == "1" ]; then
append_cmd DIST_CMDS 'prepare_vendor_dlkm'
if [ -e "${KERNEL_DIR}/modules.vendor_blocklist.${CONFIG_TARGET}" ]; then
VENDOR_DLKM_MODULES_BLOCKLIST="${KERNEL_DIR}/modules.vendor_blocklist.${CONFIG_TARGET}"
fi
fi
function prepare_system_dlkm() {
if [ "${PREPARE_SYSTEM_DLKM}" == "1" ]; then
if [ -e "${KERNEL_DIR}/modules.systemdlkm_blocklist.${CONFIG_TARGET}" ]; then
SYSTEM_DLKM_MODULES_BLOCKLIST="${KERNEL_DIR}/modules.systemdlkm_blocklist.${CONFIG_TARGET}"
cp $SYSTEM_DLKM_MODULES_BLOCKLIST ${DIST_DIR}/system_dlkm.modules.blocklist
if [ "${APPEND_SYSTEM_DLKM_BLOCKLIST_TO_VENDOR_RAMDISK}" == "1" ]; then
(cd ${DIST_DIR} && find -name system_dlkm.modules.blocklist | cpio -H newc -o) > ${DIST_DIR}/system_dlkm_blocklist.cpio
if [ -n "${TARGET_HAS_SEPARATE_RD}" ]; then
${RAMDISK_COMPRESS} "${DIST_DIR}/system_dlkm_blocklist.cpio" >"${DIST_DIR}/system_dlkm_blocklist.${RAMDISK_EXT}"
cat "${DIST_DIR}/system_dlkm_blocklist.${RAMDISK_EXT}" >>"${VENDOR_RAMDISK_BINARY}"
else
VENDOR_RAMDISK_BINARY+=" ${DIST_DIR}/system_dlkm_blocklist.cpio"
fi
fi
fi
SUPER_IMAGE_CONTENTS+=("${DIST_DIR}/system_dlkm.img")
fi
}
append_cmd DIST_CMDS 'prepare_system_dlkm'
KERNEL_BINARY=Image
################################################################################
## DT Overlay
LIBUFDT_PREBUILTS_BIN=tools/libufdt/utils/src
function make_dtbo_img() {
mkdir -p ${DIST_DIR}/
mkdtboimg create ${DIST_DIR}/dtbo.img --page_size=${PAGE_SIZE} ${DIST_DIR}/*.dtbo
}
if [ ! -z $DT_OVERLAY_SUPPORT ] && [ ! $DT_OVERLAY_SUPPORT -eq "0" ]; then
append_cmd DIST_CMDS 'make_dtbo_img'
fi
################################################################################
## Cating all the DTBs and create a dtb.img
function make_dtb_img() {
mkdir -p ${DIST_DIR}/
mkdtboimg create ${DIST_DIR}/${MSM_ARCH}-dtb.img --page_size=${PAGE_SIZE} ${DIST_DIR}/*.dtb
}
if [ ! -z $DTB_IMG_CREATE ] && [ ! $DTB_IMG_CREATE -eq "0" ]; then
append_cmd DIST_CMDS 'make_dtb_img'
fi
################################################################################
## Cating all the DTBs and create a dtb.img for a virtual machine
function make_vm_dtb_img() {
mkdir -p ${DIST_DIR}/
for i in "${!MKDTIMGDTBS[@]}"; do
mkdtboimg create ${DIST_DIR}/${i}-dtb.img --page_size=${PAGE_SIZE} ${DIST_DIR}/${MKDTIMGDTBS[$i]}*.dtb
done
}
if [ -n "$VM_DTB_IMG_CREATE" ] && [ ! "$VM_DTB_IMG_CREATE" -eq "0" ]; then
append_cmd DIST_CMDS 'make_vm_dtb_img'
fi
################################################################################
## Miscellaneous
if [ -n "${EXTRA_CONFIGS}" ]; then
for extra_config in "${EXTRA_CONFIGS[@]}"
do
. ${extra_config}
done
fi
################################################################################
## Copy prebuilt files to ${COMMON_OUT_DIR}/host/bin to be used by CI tools
DIST_BINS="""
build/android/merge_dtbs.py
build/build-tools/path/linux-x86/ufdt_apply_overlay
"""
function copy_dist_bins() (
set +x
set -e
mkdir -p ${COMMON_OUT_DIR}/host/bin
echo "Copying binaries to host/bin"
for FILE in ${DIST_BINS}; do
if [ -f ${ROOT_DIR}/${FILE} ]; then
echo " $FILE"
cp -p ${ROOT_DIR}/${FILE} ${COMMON_OUT_DIR}/host/bin/
else
echo " $FILE is not a file, skipping"
fi
done
)
append_cmd DIST_CMDS 'copy_dist_bins'

60
build.config.msm.le Normal file
View File

@@ -0,0 +1,60 @@
################################################################################
# Common MSM configuration for building non-GKI-based kernels
DEFCONFIG="generic_le_min_defconfig"
OPENSSL_DIR=${KERNEL_DIR}/../build/build-tools/path/linux-x86
OPENSSL_BIN=${KERNEL_DIR}/../build/build-tools/path/linux-x86/openssl
# Configuration options to build images for MSM targets
# Must be included AFTER build.config.msm.<target>
append_cmd POST_DEFCONFIG_CMDS 'update_signing_keys_config'
function update_signing_keys_config() {
if test -f "${OPENSSL_BIN}"; then
${OPENSSL_BIN} req -new -nodes -utf8 -newkey rsa:1024 -days 36500 \
-batch -x509 -config ${KERNEL_DIR}/certs/qcom_x509.genkey \
-outform PEM -out ${OUT_DIR}/verity_cert.pem -keyout ${OUT_DIR}/verity_key.pem
${OPENSSL_BIN} req -new -nodes -utf8 -sha256 -days 36500 \
-batch -x509 -config ${KERNEL_DIR}/certs/qcom_x509.genkey \
-outform PEM -out ${OUT_DIR}/signing_key.pem -keyout ${OUT_DIR}/signing_key.pem
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
--set-str CONFIG_MODULE_SIG_KEY "${OUT_DIR}/signing_key.pem" \
--set-str CONFIG_SYSTEM_TRUSTED_KEYS "${OUT_DIR}/verity_cert.pem"
(cd ${OUT_DIR} && \
make ${CC_LD_ARG} O=${OUT_DIR} ${MAKE_ARGS} olddefconfig)
fi
}
append_cmd POST_KERNEL_BUILD_CMDS 'move_signing_keys'
function move_signing_keys() {
cp ${OUT_DIR}/signing_key.pem ${OUT_DIR}/certs
cp ${OUT_DIR}/verity_key.pem ${OUT_DIR}/certs
cp ${OUT_DIR}/verity_cert.pem ${OUT_DIR}/certs
}
function build_defconfig_fragments() {
if [[ "${VARIANT}" =~ ^(perf_defconfig|debug_defconfig)$ ]]; then
if [ "${MSM_ARCH}" = sdxbaagha ]; then
config_128m=${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}-128m.config
[ -e "${config_128m}" ] && apply_defconfig_fragment ${config_128m} vendor/${MSM_ARCH}_defconfig
fi
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}.config vendor/${MSM_ARCH}_defconfig
if [ "${VARIANT}" = perf_defconfig ]; then
return
fi
if [ "${MSM_ARCH}" = sdxbaagha ]; then
config_128m_debug=${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}-128m_debug.config
[ -e "${config_128m_debug}" ] && apply_defconfig_fragment ${config_128m_debug} vendor/${MSM_ARCH}_defconfig
fi
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_debug.config vendor/${MSM_ARCH}-debug_defconfig
else
echo "Variant '${VARIANT}' unsupported by mdm"
exit 1
fi
}
build_defconfig_fragments

33
build.config.msm.monaco Normal file
View File

@@ -0,0 +1,33 @@
################################################################################
## Inheriting configs from ACK
. "${ROOT_DIR}"/msm-kernel/build.config.common
. "${ROOT_DIR}"/msm-kernel/build.config.aarch64
################################################################################
## Variant setup
MSM_ARCH=monaco
VARIANTS=(consolidate perf)
[ -z "${VARIANT}" ] && VARIANT=consolidate
ABL_SRC=bootable/bootloader/edk2
BOOT_IMAGE_HEADER_VERSION=4
BASE_ADDRESS=0x80000000
PAGE_SIZE=4096
BUILD_VENDOR_DLKM=1
PREPARE_SYSTEM_DLKM=1
SYSTEM_DLKM_MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules
SUPER_IMAGE_SIZE=0x10000000
TRIM_UNUSED_MODULES=1
BUILD_INIT_BOOT_IMG=1
[ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1
if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then
KERNEL_VENDOR_CMDLINE+='console=ttyMSM0,115200n8 earlycon'
fi
KERNEL_VENDOR_CMDLINE+=' bootconfig '
################################################################################
## Inheriting MSM configs
. "${KERNEL_DIR}"/build.config.msm.common
. "${KERNEL_DIR}"/build.config.msm.perf

33
build.config.msm.parrot Normal file
View File

@@ -0,0 +1,33 @@
################################################################################
## Inheriting configs from ACK
. "${ROOT_DIR}"/msm-kernel/build.config.common
. "${ROOT_DIR}"/msm-kernel/build.config.aarch64
################################################################################
## Variant setup
MSM_ARCH=parrot
VARIANTS=(consolidate perf)
[ -z "${VARIANT}" ] && VARIANT=consolidate
ABL_SRC=bootable/bootloader/edk2
BOOT_IMAGE_HEADER_VERSION=4
BASE_ADDRESS=0x80000000
PAGE_SIZE=4096
BUILD_VENDOR_DLKM=1
PREPARE_SYSTEM_DLKM=1
SYSTEM_DLKM_MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules
SUPER_IMAGE_SIZE=0x10000000
TRIM_UNUSED_MODULES=1
BUILD_INIT_BOOT_IMG=1
[ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1
if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then
KERNEL_VENDOR_CMDLINE+='console=ttyMSM0,115200n8 earlycon'
fi
KERNEL_VENDOR_CMDLINE+=' bootconfig '
################################################################################
## Inheriting MSM configs
. "${KERNEL_DIR}"/build.config.msm.common
. "${KERNEL_DIR}"/build.config.msm.perf

View File

@@ -0,0 +1,9 @@
################################################################################
## Inheriting MSM configs
. "${KERNEL_DIR}"/build.config.msm.parrot.vm
################################################################################
MKDTIMGDTBS=()
MKDTIMGDTBS["parrot_tuivm"]="parrot-vm"
################################################################################

View File

@@ -0,0 +1,39 @@
################################################################################
## Inheriting configs from ACK
. "${ROOT_DIR}"/common/build.config.common
. "${ROOT_DIR}"/common/build.config.aarch64
################################################################################
## Variant setup
MSM_ARCH=PARROT_tuivm
VARIANTS=(defconfig debug_defconfig)
[ -z "${VARIANT}" ] && VARIANT=debug_defconfig
if [ -e "${ROOT_DIR}/msm-kernel" ] && [ "${KERNEL_DIR}" = "common" ]; then
KERNEL_DIR="msm-kernel"
fi
BOOT_IMAGE_HEADER_VERSION=3
BASE_ADDRESS=0x80000000
PAGE_SIZE=4096
VM_DTB_IMG_CREATE=1
PREFERRED_USERSPACE=vm
declare -A MKDTIMGDTBS
################################################################################
## Define TUI VM parameters
TUIVM_KERNEL_OFFSET=0xE0C00000
TUIVM_DTB_OFFSET=0xE2C00000
TUIVM_RAMDISK_OFFSET=0xE2F00000
TUIVM_CMDLINE_CPIO_OFFSET=0x2100000
MKDTIMGDTBS["parrot_tuivm"]="parrot-vm"
################################################################################
## Define OEM VM parameters
################################################################################
## Inheriting MSM configs
. ${KERNEL_DIR}/build.config.msm.common
. ${KERNEL_DIR}/build.config.msm.vm

67
build.config.msm.perf Normal file
View File

@@ -0,0 +1,67 @@
################################################################################
# Common MSM configuration for building GKI-based kernels
DEFCONFIG="gki_defconfig"
# Configuration options to build images for MSM targets
# Must be included AFTER build.config.msm.<target>
# boot image macros
BUILD_BOOT_IMG=1
BUILD_INITRAMFS=1
KMI_SYMBOL_LIST_MODULE_GROUPING=0
KMI_SYMBOL_LIST_ADD_ONLY=1
KMI_ENFORCED=1
MAKE_GOALS="modules dtbs"
GKI_BUILD_CONFIG=common/build.config.gki.aarch64
GKI_SKIP_CP_KERNEL_HDR=1
# "Hacks" to enable symbol trimming on the common kernel from here (msm-kernel). To be removed once
# we get a common kernel with symbol trimming.
GKI_KMI_SYMBOL_LIST=../msm-kernel/android/abi_gki_aarch64_qcom
KMI_SYMBOL_LIST=android/abi_gki_aarch64_qcom
if [ "${VARIANT}" = perf ]; then
GKI_TRIM_NONLISTED_KMI=${TRIM_NONLISTED_KMI:-1}
fi
GKI_KMI_SYMBOL_LIST_STRICT_MODE=1
GKI_KMI_ENFORCED=1
KMI_ENFORCED=1
function sanity_check_abi() {
if [ -z "${GKI_BUILD_CONFIG}" ]; then
# When running build_abi.sh, mixed build is explicitly disabled
# In that case, turn on some options for trimming and strict mode
# which would normally be disabled because they conflict with
# mixed build
PREPARE_SYSTEM_DLKM=0
if [ "${VARIANT}" = perf ]; then
TRIM_NONLISTED_KMI=1
KMI_SYMBOL_LIST_STRICT_MODE=1
fi
return
fi
}
append_cmd POST_DEFCONFIG_CMDS 'sanity_check_abi'
function build_defconfig_fragments() {
if [[ "${VARIANT}" =~ ^(perf|consolidate)$ ]]; then
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_perf.config vendor/${MSM_ARCH}-perf_defconfig
if [ "${VARIANT}" = perf ]; then
return
fi
GKI_BUILD_CONFIG=common/build.config.gki-debug.aarch64
GKI_GKI_BUILD_CONFIG_FRAGMENT=msm-kernel/build.config.gki_consolidate.aarch64
# ABI comparison isn't applicable on consolidate variant
unset ABI_DEFINITION
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/consolidate.fragment consolidate_defconfig
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_consolidate.config vendor/${MSM_ARCH}-consolidate_defconfig
elif [ "${VARIANT}" = gki-ack ]; then
# In gki-only, then using ACK's GKI config directly
. ${KERNEL_DIR}/build.config.gki
else
echo "Variant '${VARIANT}' unsupported by gki"
exit 1
fi
}
build_defconfig_fragments

37
build.config.msm.perf.sec Normal file
View File

@@ -0,0 +1,37 @@
# SPDX-License-Identifier: GPL-2.0
# COPYRIGHT(C) 2024 Samsung Electronics Co., Ltd. All Right Reserved.
if [ -f ${ROOT_DIR}/${KERNEL_DIR}/build.config.sec_env ]; then
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.sec_env
fi
SEC_DEFCONFIG_FILE=${KERNEL_DIR}/arch/${ARCH}/configs/oem/${MSM_ARCH}_sec.config
SEC_VARIANT_DEFCONFIG_FILE=${KERNEL_DIR}/arch/${ARCH}/configs/oem/${MSM_ARCH}_sec_${TARGET_BUILD_VARIANT}.config
function build_defconfig_sec_fragments() {
apply_defconfig_fragment ${SEC_DEFCONFIG_FILE} vendor/${MSM_ARCH}-perf_defconfig
if [ -n "${TARGET_BUILD_VARIANT}" ] && [ "${TARGET_BUILD_VARIANT}" != "user" ]; then
apply_defconfig_fragment ${SEC_VARIANT_DEFCONFIG_FILE} vendor/${MSM_ARCH}-perf_defconfig
fi
}
build_defconfig_sec_fragments
function apply_to_dot_config() {
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config $1 $2
}
function update_out_dir_dot_config() {
if [ ${SEC_FACTORY_BUILD} == "true" ]; then
apply_to_dot_config -e SEC_FACTORY
else
apply_to_dot_config -d SEC_FACTORY
fi
if [ ${SEC_PRODUCT_SHIP} == "true" ]; then
apply_to_dot_config -e SAMSUNG_PRODUCT_SHIP
else
apply_to_dot_config -d SAMSUNG_PRODUCT_SHIP
fi
}
append_cmd POST_DEFCONFIG_CMDS "update_out_dir_dot_config"

View File

@@ -0,0 +1,33 @@
################################################################################
## Inheriting configs from ACK
. ${ROOT_DIR}/msm-kernel/build.config.common
. ${ROOT_DIR}/msm-kernel/build.config.aarch64
################################################################################
## Variant setup
MSM_ARCH=pineapple
VARIANTS=(consolidate perf)
[ -z "${VARIANT}" ] && VARIANT=consolidate
ABL_SRC=bootable/bootloader/edk2
BOOT_IMAGE_HEADER_VERSION=4
BASE_ADDRESS=0x80000000
PAGE_SIZE=4096
BUILD_VENDOR_DLKM=1
PREPARE_SYSTEM_DLKM=1
SYSTEM_DLKM_MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules
SUPER_IMAGE_SIZE=0x10000000
TRIM_UNUSED_MODULES=1
BUILD_INIT_BOOT_IMG=1
[ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1
if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then
KERNEL_VENDOR_CMDLINE+='console=ttyMSM0,115200n8 earlycon'
fi
KERNEL_VENDOR_CMDLINE+=' bootconfig '
################################################################################
## Inheriting MSM configs
. ${KERNEL_DIR}/build.config.msm.common
. ${KERNEL_DIR}/build.config.msm.perf

View File

@@ -0,0 +1,10 @@
################################################################################
## Inheriting MSM configs
. ${KERNEL_DIR}/build.config.msm.pineapple.vm
################################################################################
## Setting parameter to build only OEMVM images
MKDTIMGDTBS=()
MKDTIMGDTBS["pineapple_oemvm"]="pineapple-oemvm"
################################################################################

Some files were not shown because too many files have changed in this diff Show More