diff --git a/BUILD.bazel b/BUILD.bazel index e5621f3e899b..0c18efb28df2 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -115,6 +115,7 @@ filegroup( "android/abi_gki_aarch64_mtk", "android/abi_gki_aarch64_nothing", "android/abi_gki_aarch64_oplus", + "android/abi_gki_aarch64_paragon", "android/abi_gki_aarch64_pasa", "android/abi_gki_aarch64_pixel", "android/abi_gki_aarch64_qcom", diff --git a/Documentation/ABI/testing/configfs-usb-gadget-uvc b/Documentation/ABI/testing/configfs-usb-gadget-uvc index c25cc2823fc8..f23c54a590e6 100644 --- a/Documentation/ABI/testing/configfs-usb-gadget-uvc +++ b/Documentation/ABI/testing/configfs-usb-gadget-uvc @@ -295,6 +295,70 @@ Description: Specific uncompressed frame descriptors support ========================= ===================================== +What: /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased +Date: Sept 2024 +KernelVersion: 5.15 +Description: Framebased format descriptors + +What: /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name +Date: Sept 2024 +KernelVersion: 5.15 +Description: Specific framebased format descriptors + + ================== ======================================= + bFormatIndex unique id for this format descriptor; + only defined after parent header is + linked into the streaming class; + read-only + bmaControls this format's data for bmaControls in + the streaming header + bmInterlaceFlags specifies interlace information, + read-only + bAspectRatioY the X dimension of the picture aspect + ratio, read-only + bAspectRatioX the Y dimension of the picture aspect + ratio, read-only + bDefaultFrameIndex optimum frame index for this stream + bBitsPerPixel number of bits per pixel used to + specify color in the decoded video + frame + guidFormat globally unique id used to identify + stream-encoding format + ================== ======================================= + +What: /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name/name +Date: Sept 2024 +KernelVersion: 5.15 +Description: Specific framebased frame descriptors + + ========================= ===================================== + bFrameIndex unique id for this framedescriptor; + only defined after parent format is + linked into the streaming header; + read-only + dwFrameInterval indicates how frame interval can be + programmed; a number of values + separated by newline can be specified + dwDefaultFrameInterval the frame interval the device would + like to use as default + dwBytesPerLine Specifies the number of bytes per line + of video for packed fixed frame size + formats, allowing the receiver to + perform stride alignment of the video. + If the bVariableSize value (above) is + TRUE (1), or if the format does not + permit such alignment, this value shall + be set to zero (0). + dwMaxBitRate the maximum bit rate at the shortest + frame interval in bps + dwMinBitRate the minimum bit rate at the longest + frame interval in bps + wHeight height of decoded bitmap frame in px + wWidth width of decoded bitmam frame in px + bmCapabilities still image support, fixed frame-rate + support + ========================= ===================================== + What: /config/usb-gadget/gadget/functions/uvc.name/streaming/header Date: Dec 2014 KernelVersion: 4.0 diff --git a/Documentation/device-mapper/dm-bow.txt b/Documentation/device-mapper/dm-bow.txt new file mode 100644 index 000000000000..e3fc4d22e0f4 --- /dev/null +++ b/Documentation/device-mapper/dm-bow.txt @@ -0,0 +1,99 @@ +dm_bow (backup on write) +======================== + +dm_bow is a device mapper driver that uses the free space on a device to back up +data that is overwritten. The changes can then be committed by a simple state +change, or rolled back by removing the dm_bow device and running a command line +utility over the underlying device. + +dm_bow has three states, set by writing ‘1’ or ‘2’ to /sys/block/dm-?/bow/state. +It is only possible to go from state 0 (initial state) to state 1, and then from +state 1 to state 2. + +State 0: dm_bow collects all trims to the device and assumes that these mark +free space on the overlying file system that can be safely used. Typically the +mount code would create the dm_bow device, mount the file system, call the +FITRIM ioctl on the file system then switch to state 1. These trims are not +propagated to the underlying device. + +State 1: All writes to the device cause the underlying data to be backed up to +the free (trimmed) area as needed in such a way as they can be restored. +However, the writes, with one exception, then happen exactly as they would +without dm_bow, so the device is always in a good final state. The exception is +that sector 0 is used to keep a log of the latest changes, both to indicate that +we are in this state and to allow rollback. See below for all details. If there +isn't enough free space, writes are failed with -ENOSPC. + +State 2: The transition to state 2 triggers replacing the special sector 0 with +the normal sector 0, and the freeing of all state information. dm_bow then +becomes a pass-through driver, allowing the device to continue to be used with +minimal performance impact. + +Usage +===== +dm-bow takes one command line parameter, the name of the underlying device. + +dm-bow will typically be used in the following way. dm-bow will be loaded with a +suitable underlying device and the resultant device will be mounted. A file +system trim will be issued via the FITRIM ioctl, then the device will be +switched to state 1. The file system will now be used as normal. At some point, +the changes can either be committed by switching to state 2, or rolled back by +unmounting the file system, removing the dm-bow device and running the command +line utility. Note that rebooting the device will be equivalent to unmounting +and removing, but the command line utility must still be run + +Details of operation in state 1 +=============================== + +dm_bow maintains a type for all sectors. A sector can be any of: + +SECTOR0 +SECTOR0_CURRENT +UNCHANGED +FREE +CHANGED +BACKUP + +SECTOR0 is the first sector on the device, and is used to hold the log of +changes. This is the one exception. + +SECTOR0_CURRENT is a sector picked from the FREE sectors, and is where reads and +writes from the true sector zero are redirected to. Note that like any backup +sector, if the sector is written to directly, it must be moved again. + +UNCHANGED means that the sector has not been changed since we entered state 1. +Thus if it is written to or trimmed, the contents must first be backed up. + +FREE means that the sector was trimmed in state 0 and has not yet been written +to or used for backup. On being written to, a FREE sector is changed to CHANGED. + +CHANGED means that the sector has been modified, and can be further modified +without further backup. + +BACKUP means that this is a free sector being used as a backup. On being written +to, the contents must first be backed up again. + +All backup operations are logged to the first sector. The log sector has the +format: +-------------------------------------------------------- +| Magic | Count | Sequence | Log entry | Log entry | … +-------------------------------------------------------- + +Magic is a magic number. Count is the number of log entries. Sequence is 0 +initially. A log entry is + +----------------------------------- +| Source | Dest | Size | Checksum | +----------------------------------- + +When SECTOR0 is full, the log sector is backed up and another empty log sector +created with sequence number one higher. The first entry in any log entry with +sequence > 0 therefore must be the log of the backing up of the previous log +sector. Note that sequence is not strictly needed, but is a useful sanity check +and potentially limits the time spent trying to restore a corrupted snapshot. + +On entering state 1, dm_bow has a list of free sectors. All other sectors are +unchanged. Sector0_current is selected from the free sectors and the contents of +sector 0 are copied there. The sector 0 is backed up, which triggers the first +log entry to be written. + diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml index 993430be355b..3bcca3b2052c 100644 --- a/Documentation/devicetree/bindings/sram/sram.yaml +++ b/Documentation/devicetree/bindings/sram/sram.yaml @@ -100,6 +100,12 @@ patternProperties: IO mem address range, relative to the SRAM range. maxItems: 1 + reg-io-width: + description: + The size (in bytes) of the IO accesses that should be performed on the + SRAM. + enum: [1, 2, 4, 8] + pool: description: Indicates that the particular reserved SRAM area is addressable diff --git a/android/abi_gki_aarch64.stg b/android/abi_gki_aarch64.stg index b3c34e4db03a..110d1680df50 100644 --- a/android/abi_gki_aarch64.stg +++ b/android/abi_gki_aarch64.stg @@ -773,6 +773,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x20e3a5b9 } +pointer_reference { + id: 0x02aa06b1 + kind: POINTER + pointee_type_id: 0x20e8fc5a +} pointer_reference { id: 0x02b3baf5 kind: POINTER @@ -1118,6 +1123,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x3a433e0e } +pointer_reference { + id: 0x04025b72 + kind: POINTER + pointee_type_id: 0x3a498b54 +} pointer_reference { id: 0x0407035c kind: POINTER @@ -2593,6 +2603,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x0fc94b61 } +pointer_reference { + id: 0x0972005b + kind: POINTER + pointee_type_id: 0x0f88e7f2 +} pointer_reference { id: 0x097315c2 kind: POINTER @@ -5633,6 +5648,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x1dbe4538 } +pointer_reference { + id: 0x0e00970a + kind: POINTER + pointee_type_id: 0x1242bab6 +} pointer_reference { id: 0x0e00c9b9 kind: POINTER @@ -6803,6 +6823,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x118d97cb } +pointer_reference { + id: 0x0ef60874 + kind: POINTER + pointee_type_id: 0x1198c74f +} pointer_reference { id: 0x0ef6d218 kind: POINTER @@ -8233,6 +8258,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x6ea91ece } +pointer_reference { + id: 0x113c61bc + kind: POINTER + pointee_type_id: 0x6eb1606d +} pointer_reference { id: 0x1148ae81 kind: POINTER @@ -10058,6 +10088,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x4d998a91 } +pointer_reference { + id: 0x19f68db9 + kind: POINTER + pointee_type_id: 0x4d9ad078 +} pointer_reference { id: 0x19fa9e98 kind: POINTER @@ -10568,6 +10603,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x58502715 } +pointer_reference { + id: 0x1c852ec2 + kind: POINTER + pointee_type_id: 0x58545d97 +} pointer_reference { id: 0x1c8bf9fd kind: POINTER @@ -12593,6 +12633,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0xbe42b117 } +pointer_reference { + id: 0x2502324f + kind: POINTER + pointee_type_id: 0xbe482fa0 +} pointer_reference { id: 0x2511a6f5 kind: POINTER @@ -14098,6 +14143,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x9a5f8c33 } +pointer_reference { + id: 0x2c0815b0 + kind: POINTER + pointee_type_id: 0x9a60b05d +} pointer_reference { id: 0x2c0a55f9 kind: POINTER @@ -15683,6 +15733,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x98573499 } +pointer_reference { + id: 0x2c860b42 + kind: POINTER + pointee_type_id: 0x9858cb96 +} pointer_reference { id: 0x2c87681b kind: POINTER @@ -20958,11 +21013,21 @@ pointer_reference { kind: POINTER pointee_type_id: 0x91ed8ab4 } +pointer_reference { + id: 0x2eeb9e62 + kind: POINTER + pointee_type_id: 0x91ee9f17 +} pointer_reference { id: 0x2eeba30b kind: POINTER pointee_type_id: 0x91ee6ab2 } +pointer_reference { + id: 0x2eeba955 + kind: POINTER + pointee_type_id: 0x91ee43cb +} pointer_reference { id: 0x2eebfa52 kind: POINTER @@ -21073,6 +21138,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x9189dbcd } +pointer_reference { + id: 0x2ef2544f + kind: POINTER + pointee_type_id: 0x9189b7a1 +} pointer_reference { id: 0x2ef36257 kind: POINTER @@ -21088,6 +21158,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x91901b03 } +pointer_reference { + id: 0x2ef46265 + kind: POINTER + pointee_type_id: 0x91916f0a +} pointer_reference { id: 0x2ef52cf8 kind: POINTER @@ -22453,6 +22528,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x957cc422 } +pointer_reference { + id: 0x2fd0c5e3 + kind: POINTER + pointee_type_id: 0x9503f112 +} pointer_reference { id: 0x2fd17240 kind: POINTER @@ -22468,6 +22548,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0x95132e54 } +pointer_reference { + id: 0x2fd50f6e + kind: POINTER + pointee_type_id: 0x9514db26 +} pointer_reference { id: 0x2fd86c98 kind: POINTER @@ -23598,6 +23683,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0xedb84b9b } +pointer_reference { + id: 0x32049d01 + kind: POINTER + pointee_type_id: 0xe2529298 +} pointer_reference { id: 0x320871e3 kind: POINTER @@ -25663,6 +25753,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0xf2f112a6 } +pointer_reference { + id: 0x36311c57 + kind: POINTER + pointee_type_id: 0xf28497c1 +} pointer_reference { id: 0x3632646e kind: POINTER @@ -26083,6 +26178,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0xf6697fa6 } +pointer_reference { + id: 0x370a73b0 + kind: POINTER + pointee_type_id: 0xf669285f +} pointer_reference { id: 0x370b11b2 kind: POINTER @@ -28738,6 +28838,11 @@ pointer_reference { kind: POINTER pointee_type_id: 0xd9065242 } +pointer_reference { + id: 0x3cd2755a + kind: POINTER + pointee_type_id: 0xd90933f7 +} pointer_reference { id: 0x3cd81844 kind: POINTER @@ -33813,6 +33918,11 @@ qualified { qualifier: CONST qualified_type_id: 0x13b5a562 } +qualified { + id: 0xd90933f7 + qualifier: CONST + qualified_type_id: 0x14637955 +} qualified { id: 0xd93664b2 qualifier: CONST @@ -34403,6 +34513,11 @@ qualified { qualifier: CONST qualified_type_id: 0xf865cc2f } +qualified { + id: 0xe2529298 + qualifier: CONST + qualified_type_id: 0xf90dfce8 +} qualified { id: 0xe28bb7e5 qualifier: CONST @@ -35293,6 +35408,11 @@ qualified { qualifier: CONST qualified_type_id: 0xb995416c } +qualified { + id: 0xf28497c1 + qualifier: CONST + qualified_type_id: 0xba55e98d +} qualified { id: 0xf2dcbe16 qualifier: CONST @@ -35478,6 +35598,11 @@ qualified { qualifier: CONST qualified_type_id: 0xa90d2a4f } +qualified { + id: 0xf669285f + qualifier: CONST + qualified_type_id: 0xa9e317f6 +} qualified { id: 0xf6a40fd8 qualifier: CONST @@ -44224,6 +44349,12 @@ member { type_id: 0x6720d32f offset: 192 } +member { + id: 0xc03b90e5 + name: "action" + type_id: 0x6da3b656 + offset: 256 +} member { id: 0xc046b22b name: "action" @@ -104144,6 +104275,12 @@ member { type_id: 0x39450091 offset: 384 } +member { + id: 0x34fdb7d9 + name: "hugetlb_entry" + type_id: 0x2eeb9e62 + offset: 384 +} member { id: 0x864648d5 name: "hva_node" @@ -130114,6 +130251,12 @@ member { type_id: 0x2953a412 offset: 192 } +member { + id: 0x3025d10a + name: "mm" + type_id: 0x1b36c7a2 + offset: 64 +} member { id: 0x3025d29c name: "mm" @@ -137599,6 +137742,12 @@ member { offset: 22123 bitsize: 1 } +member { + id: 0x4d629a4b + name: "no_vma" + type_id: 0x6d7f5ff6 + offset: 288 +} member { id: 0xad3b1533 name: "no_vpd_size" @@ -144870,6 +145019,11 @@ member { type_id: 0x37e8a64c offset: 64 } +member { + id: 0xafbd31bf + name: "ops" + type_id: 0x36311c57 +} member { id: 0xafbdad0b name: "ops" @@ -146544,6 +146698,12 @@ member { name: "p4d" type_id: 0x58545d97 } +member { + id: 0x65cd7390 + name: "p4d_entry" + type_id: 0x2c0815b0 + offset: 64 +} member { id: 0xb065acb9 name: "p_area" @@ -150679,6 +150839,12 @@ member { type_id: 0x4585663f offset: 1184 } +member { + id: 0x332a4795 + name: "pgd" + type_id: 0x2154832c + offset: 128 +} member { id: 0x332a4920 name: "pgd" @@ -150695,6 +150861,11 @@ member { name: "pgd" type_id: 0xe381831a } +member { + id: 0x941e6cf7 + name: "pgd_entry" + type_id: 0x2fd50f6e +} member { id: 0x2d272759 name: "pgdat" @@ -152569,6 +152740,12 @@ member { name: "pmd" type_id: 0xde7f96df } +member { + id: 0x041686f0 + name: "pmd_entry" + type_id: 0x2fd0c5e3 + offset: 192 +} member { id: 0xccf925b5 name: "pmd_huge_pte" @@ -154278,6 +154455,12 @@ member { type_id: 0x4585663f offset: 32 } +member { + id: 0xe30315e8 + name: "post_vma" + type_id: 0x0ef60874 + offset: 576 +} member { id: 0xda447de8 name: "postclose" @@ -154994,6 +155177,12 @@ member { name: "pre_vectors" type_id: 0x4585663f } +member { + id: 0x366a3be8 + name: "pre_vma" + type_id: 0x2ef46265 + offset: 512 +} member { id: 0x750eca39 name: "prealloc" @@ -158820,6 +159009,18 @@ member { name: "pte" type_id: 0xc32dc55c } +member { + id: 0x682d16d4 + name: "pte_entry" + type_id: 0x2eeba955 + offset: 256 +} +member { + id: 0x11d2ee71 + name: "pte_hole" + type_id: 0x2ef2544f + offset: 320 +} member { id: 0xce4422cd name: "ptl" @@ -159064,6 +159265,12 @@ member { type_id: 0x1464c1ed offset: 448 } +member { + id: 0x45ac0417 + name: "pud_entry" + type_id: 0x2c860b42 + offset: 128 +} member { id: 0x6978f8c1 name: "pull_down" @@ -193949,6 +194156,12 @@ member { type_id: 0x6d7f5ff6 offset: 296 } +member { + id: 0x3420bbf7 + name: "test_walk" + type_id: 0x2ef46265 + offset: 448 +} member { id: 0x6ca576c7 name: "testinfo_len" @@ -198412,6 +198625,11 @@ member { type_id: 0xe62ebf07 offset: 128 } +member { + id: 0x59ba4787 + name: "tv_sec" + type_id: 0xdd6eef0a +} member { id: 0x59dcca01 name: "tv_sec" @@ -198452,6 +198670,12 @@ member { type_id: 0x68035002 offset: 64 } +member { + id: 0x5fd9c8cb + name: "tv_usec" + type_id: 0xdd6eef0a + offset: 64 +} member { id: 0x5fe2819a name: "tv_usec" @@ -209396,6 +209620,12 @@ member { type_id: 0x0e3794b2 offset: 768 } +member { + id: 0x3dc4a866 + name: "walk_lock" + type_id: 0x42167328 + offset: 640 +} member { id: 0xf5e4c1c4 name: "walker" @@ -220549,6 +220779,16 @@ struct_union { member_id: 0x5f6ca574 } } +struct_union { + id: 0x1242bab6 + kind: STRUCT + name: "__kernel_sock_timeval" + definition { + bytesize: 16 + member_id: 0x59ba4787 + member_id: 0x5fd9c8cb + } +} struct_union { id: 0xed09a540 kind: STRUCT @@ -246343,6 +246583,40 @@ struct_union { member_id: 0x1e7e63bb } } +struct_union { + id: 0x3a498b54 + kind: STRUCT + name: "mm_walk" + definition { + bytesize: 48 + member_id: 0xafbd31bf + member_id: 0x3025d10a + member_id: 0x332a4795 + member_id: 0x239192da + member_id: 0xc03b90e5 + member_id: 0x4d629a4b + member_id: 0x91796174 + } +} +struct_union { + id: 0xba55e98d + kind: STRUCT + name: "mm_walk_ops" + definition { + bytesize: 88 + member_id: 0x941e6cf7 + member_id: 0x65cd7390 + member_id: 0x45ac0417 + member_id: 0x041686f0 + member_id: 0x682d16d4 + member_id: 0x11d2ee71 + member_id: 0x34fdb7d9 + member_id: 0x3420bbf7 + member_id: 0x366a3be8 + member_id: 0xe30315e8 + member_id: 0x3dc4a866 + } +} struct_union { id: 0x9b209e15 kind: STRUCT @@ -287377,6 +287651,42 @@ enumeration { } } } +enumeration { + id: 0x6da3b656 + name: "page_walk_action" + definition { + underlying_type_id: 0x4585663f + enumerator { + name: "ACTION_SUBTREE" + } + enumerator { + name: "ACTION_CONTINUE" + value: 1 + } + enumerator { + name: "ACTION_AGAIN" + value: 2 + } + } +} +enumeration { + id: 0x42167328 + name: "page_walk_lock" + definition { + underlying_type_id: 0x4585663f + enumerator { + name: "PGWALK_RDLOCK" + } + enumerator { + name: "PGWALK_WRLOCK" + value: 1 + } + enumerator { + name: "PGWALK_WRLOCK_VERIFY" + value: 2 + } + } +} enumeration { id: 0x791165e9 name: "pci_barno" @@ -293906,6 +294216,11 @@ function { parameter_id: 0x64f641d4 parameter_id: 0x10193e4a } +function { + id: 0x09fe2e07 + return_type_id: 0x33f8b54b + parameter_id: 0x6720d32f +} function { id: 0x0a34c3a2 return_type_id: 0x3829c378 @@ -294036,6 +294351,16 @@ function { return_type_id: 0x343ebce3 parameter_id: 0x343ebce3 } +function { + id: 0x0c53867f + return_type_id: 0x33756485 + parameter_id: 0xf1a6dfed + parameter_id: 0x6720d32f + parameter_id: 0x2fb2b385 + parameter_id: 0x6720d32f + parameter_id: 0x3e6239e1 + parameter_id: 0x0b30ee00 +} function { id: 0x0c5cd477 return_type_id: 0x0bb0c019 @@ -294198,6 +294523,12 @@ function { parameter_id: 0x0258f96e parameter_id: 0x03caf08d } +function { + id: 0x100359c8 + return_type_id: 0x48b5725f + parameter_id: 0x0092c032 + parameter_id: 0x2fee15d8 +} function { id: 0x10035ee9 return_type_id: 0x48b5725f @@ -294718,6 +295049,13 @@ function { return_type_id: 0x48b5725f parameter_id: 0x03ce74cd } +function { + id: 0x106c0ac9 + return_type_id: 0x48b5725f + parameter_id: 0x0f88e7f2 + parameter_id: 0xc9082b19 + parameter_id: 0xc9082b19 +} function { id: 0x106c9a5c return_type_id: 0x48b5725f @@ -295156,6 +295494,14 @@ function { return_type_id: 0x48b5725f parameter_id: 0x01c5a749 } +function { + id: 0x10e9600e + return_type_id: 0x48b5725f + parameter_id: 0x01de2d7a + parameter_id: 0x01de2d7a + parameter_id: 0x01de2d7a + parameter_id: 0x6d7f5ff6 +} function { id: 0x10e9afeb return_type_id: 0x48b5725f @@ -295190,6 +295536,11 @@ function { parameter_id: 0x0258f96e parameter_id: 0x38514bfb } +function { + id: 0x10efdacd + return_type_id: 0x48b5725f + parameter_id: 0x01de2d7a +} function { id: 0x10f0f603 return_type_id: 0x48b5725f @@ -295669,6 +296020,11 @@ function { return_type_id: 0x48b5725f parameter_id: 0x043ecddb } +function { + id: 0x1198c74f + return_type_id: 0x48b5725f + parameter_id: 0x04025b72 +} function { id: 0x119baefc return_type_id: 0x48b5725f @@ -296000,6 +296356,12 @@ function { parameter_id: 0x3104c07e parameter_id: 0x4585663f } +function { + id: 0x11deb671 + return_type_id: 0x48b5725f + parameter_id: 0x054f691a + parameter_id: 0x054f691a +} function { id: 0x11e015cb return_type_id: 0x48b5725f @@ -297189,6 +297551,11 @@ function { parameter_id: 0x2eab5b8a parameter_id: 0x87463428 } +function { + id: 0x137a686f + return_type_id: 0x48b5725f + parameter_id: 0x0f88e7f2 +} function { id: 0x137d1ffc return_type_id: 0x48b5725f @@ -298063,6 +298430,12 @@ function { parameter_id: 0x10134e31 parameter_id: 0x0a22a423 } +function { + id: 0x14b5bc68 + return_type_id: 0x48b5725f + parameter_id: 0x113c61bc + parameter_id: 0x18bd6530 +} function { id: 0x14b6bb25 return_type_id: 0x48b5725f @@ -298582,6 +298955,13 @@ function { return_type_id: 0x48b5725f parameter_id: 0x17a37c1c } +function { + id: 0x1570f9ad + return_type_id: 0x48b5725f + parameter_id: 0x1bfb2a60 + parameter_id: 0xc9082b19 + parameter_id: 0xc9082b19 +} function { id: 0x1572ad94 return_type_id: 0x9519135f @@ -299837,6 +300217,12 @@ function { parameter_id: 0x3bfbd7cf parameter_id: 0x0f626ee5 } +function { + id: 0x1728395d + return_type_id: 0x48b5725f + parameter_id: 0x1977e57b + parameter_id: 0x7b64642a +} function { id: 0x172842ec return_type_id: 0x48b5725f @@ -300382,6 +300768,13 @@ function { return_type_id: 0x48b5725f parameter_id: 0x1dce0fdd } +function { + id: 0x17ed8cca + return_type_id: 0x48b5725f + parameter_id: 0x1b8590a8 + parameter_id: 0x6720d32f + parameter_id: 0x20e8fc5a +} function { id: 0x17ee95ba return_type_id: 0x48b5725f @@ -300861,6 +301254,11 @@ function { return_type_id: 0x48b5725f parameter_id: 0x21069feb } +function { + id: 0x18da5b6c + return_type_id: 0x48b5725f + parameter_id: 0x21082bfc +} function { id: 0x18daa769 return_type_id: 0x48b5725f @@ -301320,6 +301718,11 @@ function { return_type_id: 0x48b5725f parameter_id: 0x25520d15 } +function { + id: 0x19d8dd00 + return_type_id: 0x48b5725f + parameter_id: 0x2502324f +} function { id: 0x19d93429 return_type_id: 0x48b5725f @@ -302113,6 +302516,13 @@ function { parameter_id: 0x2cac4c27 parameter_id: 0x391f15ea } +function { + id: 0x1b5a8722 + return_type_id: 0x48b5725f + parameter_id: 0x2fee15d8 + parameter_id: 0x0ebf01c0 + parameter_id: 0x0ebf01c0 +} function { id: 0x1b5c7355 return_type_id: 0x48b5725f @@ -302520,6 +302930,12 @@ function { parameter_id: 0x2e8d5f05 parameter_id: 0x33756485 } +function { + id: 0x1bf7dc2c + return_type_id: 0x48b5725f + parameter_id: 0x2fee15d8 + parameter_id: 0x2502324f +} function { id: 0x1bfe630d return_type_id: 0x48b5725f @@ -305397,6 +305813,13 @@ function { parameter_id: 0x3e6396e0 parameter_id: 0x6720d32f } +function { + id: 0x1f4d44f1 + return_type_id: 0x48b5725f + parameter_id: 0x3df8f8c1 + parameter_id: 0x2e8d5f05 + parameter_id: 0x4478ba6b +} function { id: 0x1f4f6ba0 return_type_id: 0x48b5725f @@ -306991,6 +307414,11 @@ function { parameter_id: 0x92233392 parameter_id: 0x2110e8dc } +function { + id: 0x34a5a0a0 + return_type_id: 0x0092c032 + parameter_id: 0x2502324f +} function { id: 0x34b8504b return_type_id: 0x48b5725f @@ -308879,6 +309307,12 @@ function { return_type_id: 0x18bd6530 parameter_id: 0x0356cddf } +function { + id: 0x564ae602 + return_type_id: 0x18bd6530 + parameter_id: 0x0258f96e + parameter_id: 0x129a6a0a +} function { id: 0x5659e8fb return_type_id: 0x18bd6530 @@ -309282,6 +309716,11 @@ function { parameter_id: 0xf435685e parameter_id: 0x18bd6530 } +function { + id: 0x59e4d513 + return_type_id: 0x1977e57b + parameter_id: 0xf1a6dfed +} function { id: 0x59eb2668 return_type_id: 0x2170d06d @@ -310064,6 +310503,13 @@ function { parameter_id: 0x3b19594b parameter_id: 0x3fd547b8 } +function { + id: 0x65d54b6e + return_type_id: 0x1977e57b + parameter_id: 0x0c2e195c + parameter_id: 0xd0b3a203 + parameter_id: 0x4585663f +} function { id: 0x65d68df5 return_type_id: 0x1977e57b @@ -310463,6 +310909,11 @@ function { return_type_id: 0x15677165 parameter_id: 0x32a623d7 } +function { + id: 0x6eb1606d + return_type_id: 0x054f691a + parameter_id: 0x18bd6530 +} function { id: 0x6ecc6402 return_type_id: 0x1d44326e @@ -310894,6 +311345,13 @@ function { return_type_id: 0x356691bc parameter_id: 0xc9082b19 } +function { + id: 0x78c7e392 + return_type_id: 0x20e8fc5a + parameter_id: 0x0fabaf3b + parameter_id: 0x391f15ea + parameter_id: 0xf435685e +} function { id: 0x78cb3e97 return_type_id: 0x347303b4 @@ -311343,6 +311801,11 @@ function { return_type_id: 0x3e10b518 parameter_id: 0x4296745b } +function { + id: 0x83085622 + return_type_id: 0x19f68db9 + parameter_id: 0x18ea6ae3 +} function { id: 0x832143d7 return_type_id: 0x11e6864c @@ -311664,6 +312127,12 @@ function { parameter_id: 0x0258f96e parameter_id: 0x3e10b518 } +function { + id: 0x8556f056 + return_type_id: 0x3654c061 + parameter_id: 0x21082bfc + parameter_id: 0x0a134144 +} function { id: 0x85695d91 return_type_id: 0x6720d32f @@ -311683,6 +312152,14 @@ function { parameter_id: 0x11cffa09 parameter_id: 0x4585663f } +function { + id: 0x85cda6bc + return_type_id: 0x6720d32f + parameter_id: 0x6720d32f + parameter_id: 0x6720d32f + parameter_id: 0x6720d32f + parameter_id: 0x0e8833d6 +} function { id: 0x85d454a8 return_type_id: 0x6720d32f @@ -312263,6 +312740,11 @@ function { parameter_id: 0x4585663f parameter_id: 0x4585663f } +function { + id: 0x8e7232d9 + return_type_id: 0x0d956bfc + parameter_id: 0x0a134144 +} function { id: 0x8e8c9c93 return_type_id: 0x11e6864c @@ -312422,6 +312904,11 @@ function { parameter_id: 0x0483e6f8 parameter_id: 0xf435685e } +function { + id: 0x9015d337 + return_type_id: 0x6720d32f + parameter_id: 0x3654c061 +} function { id: 0x90166130 return_type_id: 0x6720d32f @@ -312917,6 +313404,12 @@ function { parameter_id: 0x37c0c175 parameter_id: 0x0258f96e } +function { + id: 0x907a6c53 + return_type_id: 0x6720d32f + parameter_id: 0x370a73b0 + parameter_id: 0x0e04e400 +} function { id: 0x908495c3 return_type_id: 0x6720d32f @@ -313949,6 +314442,12 @@ function { parameter_id: 0x315b7e01 parameter_id: 0x21003da7 } +function { + id: 0x91548c51 + return_type_id: 0x6720d32f + parameter_id: 0x3054f2d7 + parameter_id: 0x3054f2d7 +} function { id: 0x9155593a return_type_id: 0x6720d32f @@ -314242,6 +314741,14 @@ function { parameter_id: 0xc9082b19 parameter_id: 0x6720d32f } +function { + id: 0x9189b7a1 + return_type_id: 0x6720d32f + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x6720d32f + parameter_id: 0x04025b72 +} function { id: 0x9189dbcd return_type_id: 0x6720d32f @@ -314285,6 +314792,13 @@ function { parameter_id: 0x33756485 parameter_id: 0x33756485 } +function { + id: 0x91916f0a + return_type_id: 0x6720d32f + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x91935bd4 return_type_id: 0x6720d32f @@ -315095,12 +315609,29 @@ function { return_type_id: 0x6720d32f parameter_id: 0x31b5a66f } +function { + id: 0x91ee43cb + return_type_id: 0x6720d32f + parameter_id: 0x32bee099 + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x91ee6ab2 return_type_id: 0x6720d32f parameter_id: 0x32a623d7 parameter_id: 0x31c05a21 } +function { + id: 0x91ee9f17 + return_type_id: 0x6720d32f + parameter_id: 0x32bee099 + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x91ef0fd5 return_type_id: 0x6720d32f @@ -316340,6 +316871,11 @@ function { return_type_id: 0x6720d32f parameter_id: 0x3cbd250a } +function { + id: 0x92b47e79 + return_type_id: 0x6720d32f + parameter_id: 0x3cd2755a +} function { id: 0x92b5578e return_type_id: 0x6720d32f @@ -316521,6 +317057,13 @@ function { parameter_id: 0x4585663f parameter_id: 0x4585663f } +function { + id: 0x92d34d4e + return_type_id: 0x6720d32f + parameter_id: 0x32049d01 + parameter_id: 0xf435685e + parameter_id: 0x0972005b +} function { id: 0x92d3b873 return_type_id: 0x6720d32f @@ -318819,11 +319362,26 @@ function { parameter_id: 0x0d7ce7cc parameter_id: 0x4efa90bb } +function { + id: 0x94fa90ba + return_type_id: 0x6720d32f + parameter_id: 0x2668e644 + parameter_id: 0x3ada60b4 + parameter_id: 0x2c8e1aaa +} function { id: 0x9502ce9c return_type_id: 0x1dc3d428 parameter_id: 0x6720d32f } +function { + id: 0x9503f112 + return_type_id: 0x6720d32f + parameter_id: 0x21082bfc + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x95052f9e return_type_id: 0x6720d32f @@ -318866,6 +319424,14 @@ function { parameter_id: 0x18ea6ae3 parameter_id: 0x3ebcd127 } +function { + id: 0x9514db26 + return_type_id: 0x6720d32f + parameter_id: 0x2154832c + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x952154fc return_type_id: 0x6720d32f @@ -319146,6 +319712,12 @@ function { parameter_id: 0x2259084f parameter_id: 0x1bf16028 } +function { + id: 0x957b3cbb + return_type_id: 0x6720d32f + parameter_id: 0x21003da7 + parameter_id: 0x2ef43f67 +} function { id: 0x957cc422 return_type_id: 0x6720d32f @@ -321437,6 +322009,14 @@ function { parameter_id: 0x156a41de parameter_id: 0x2351f077 } +function { + id: 0x9858cb96 + return_type_id: 0x6720d32f + parameter_id: 0x1464c1ed + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x985d3db9 return_type_id: 0x6720d32f @@ -323757,6 +324337,14 @@ function { parameter_id: 0x1dc3d428 parameter_id: 0x34a05394 } +function { + id: 0x9a234e63 + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x6720d32f + parameter_id: 0x4585663f + parameter_id: 0x4585663f +} function { id: 0x9a235f02 return_type_id: 0x6720d32f @@ -324254,6 +324842,14 @@ function { parameter_id: 0x2cdbb77a parameter_id: 0xf435685e } +function { + id: 0x9a60b05d + return_type_id: 0x6720d32f + parameter_id: 0x1c852ec2 + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x04025b72 +} function { id: 0x9a66b93e return_type_id: 0x6720d32f @@ -325962,6 +326558,12 @@ function { parameter_id: 0x3a62e69e parameter_id: 0x3e6239e1 } +function { + id: 0x9b4a4e61 + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x397d00ab +} function { id: 0x9b4a7bac return_type_id: 0x6720d32f @@ -326574,6 +327176,13 @@ function { parameter_id: 0x3ccb45cc parameter_id: 0x6720d32f } +function { + id: 0x9b69d0a5 + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x33756485 + parameter_id: 0x2efd5036 +} function { id: 0x9b6a60e1 return_type_id: 0x6720d32f @@ -326646,6 +327255,13 @@ function { parameter_id: 0x33d0e528 parameter_id: 0xc9082b19 } +function { + id: 0x9b6e1777 + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x36194830 + parameter_id: 0x6720d32f +} function { id: 0x9b6e1aa4 return_type_id: 0x6720d32f @@ -327181,6 +327797,15 @@ function { parameter_id: 0x0a85fcb6 parameter_id: 0x395e9ae2 } +function { + id: 0x9b8c84e7 + return_type_id: 0x6720d32f + parameter_id: 0x1b36c7a2 + parameter_id: 0x33756485 + parameter_id: 0x33756485 + parameter_id: 0x36311c57 + parameter_id: 0x18bd6530 +} function { id: 0x9b8e2bf2 return_type_id: 0x6720d32f @@ -327723,6 +328348,14 @@ function { parameter_id: 0x18bd6530 parameter_id: 0x01222f7d } +function { + id: 0x9bab985c + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x0258f96e + parameter_id: 0x33756485 + parameter_id: 0x6720d32f +} function { id: 0x9bad311a return_type_id: 0x6720d32f @@ -328189,6 +328822,14 @@ function { parameter_id: 0x6d7f5ff6 parameter_id: 0x1f8dbf97 } +function { + id: 0x9bc1295b + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x18bd6530 + parameter_id: 0x33756485 + parameter_id: 0x2efd5036 +} function { id: 0x9bc160f2 return_type_id: 0x6720d32f @@ -329347,6 +329988,16 @@ function { parameter_id: 0x18bd6530 parameter_id: 0x11b57133 } +function { + id: 0x9be9dd69 + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x1582ab06 + parameter_id: 0x4585663f + parameter_id: 0x4585663f + parameter_id: 0x6d7f5ff6 + parameter_id: 0x6d7f5ff6 +} function { id: 0x9beaa8bf return_type_id: 0x6720d32f @@ -330215,6 +330866,14 @@ function { parameter_id: 0x078316ff parameter_id: 0x064d6086 } +function { + id: 0x9c7925e6 + return_type_id: 0x6720d32f + parameter_id: 0x06835e9c + parameter_id: 0x1582ab06 + parameter_id: 0x33756485 + parameter_id: 0xf1a6dfed +} function { id: 0x9c7b6f16 return_type_id: 0x6720d32f @@ -332130,6 +332789,14 @@ function { parameter_id: 0x18bd6530 parameter_id: 0x2dcd339f } +function { + id: 0x9d80c6bb + return_type_id: 0x6720d32f + parameter_id: 0x0e00970a + parameter_id: 0xe61f67ea + parameter_id: 0x6720d32f + parameter_id: 0x6d7f5ff6 +} function { id: 0x9d80e32f return_type_id: 0x6720d32f @@ -332320,6 +332987,11 @@ function { parameter_id: 0xc700b957 parameter_id: 0x07dcdbe1 } +function { + id: 0x9da45323 + return_type_id: 0x6720d32f + parameter_id: 0x0092c032 +} function { id: 0x9da46876 return_type_id: 0x6720d32f @@ -334196,6 +334868,20 @@ function { parameter_id: 0x33b77109 parameter_id: 0x3283ded6 } +function { + id: 0x9eb3dea3 + return_type_id: 0x6720d32f + parameter_id: 0x0fabaf3b + parameter_id: 0x370a73b0 + parameter_id: 0x18bd6530 + parameter_id: 0xf435685e +} +function { + id: 0x9eb6212f + return_type_id: 0x6720d32f + parameter_id: 0x0fabaf3b + parameter_id: 0x370a73b0 +} function { id: 0x9eb724d7 return_type_id: 0x6720d32f @@ -334510,6 +335196,13 @@ function { parameter_id: 0x6d9cce5f parameter_id: 0x11cfee5a } +function { + id: 0x9eef78c5 + return_type_id: 0x6720d32f + parameter_id: 0x02aa06b1 + parameter_id: 0xf1a6dfed + parameter_id: 0x0e04e400 +} function { id: 0x9ef0369c return_type_id: 0x6720d32f @@ -336097,6 +336790,13 @@ function { parameter_id: 0x07f9a52e parameter_id: 0x6720d32f } +function { + id: 0xa2face03 + return_type_id: 0x6720d32f + parameter_id: 0xfc0e1dbd + parameter_id: 0x18bd6530 + parameter_id: 0x6d7f5ff6 +} function { id: 0xa355db3b return_type_id: 0x257d12af @@ -336738,6 +337438,13 @@ function { return_type_id: 0x0a193bb7 parameter_id: 0x1d19a9d5 } +function { + id: 0xac365a8e + return_type_id: 0x6720d32f + parameter_id: 0xc714b5b1 + parameter_id: 0x18bd6530 + parameter_id: 0x4585663f +} function { id: 0xac45ce43 return_type_id: 0x6720d32f @@ -337497,6 +338204,13 @@ function { parameter_id: 0x0a134144 parameter_id: 0x33756485 } +function { + id: 0xbfe9db9a + return_type_id: 0x06835e9c + parameter_id: 0x0a134144 + parameter_id: 0x33756485 + parameter_id: 0xe0bb64fa +} function { id: 0xc032f3e5 return_type_id: 0x4585663f @@ -337931,6 +338645,11 @@ function { return_type_id: 0x02c35f57 parameter_id: 0x02c35f57 } +function { + id: 0xc85f6a93 + return_type_id: 0x4585663f + parameter_id: 0x1a1051a0 +} function { id: 0xc867c639 return_type_id: 0x2b16c036 @@ -339341,6 +340060,12 @@ function { parameter_id: 0x4585663f parameter_id: 0x4585663f } +function { + id: 0xef356aa2 + return_type_id: 0x2e8d5f05 + parameter_id: 0x1a7122b5 + parameter_id: 0x2e8d5f05 +} function { id: 0xef54849c return_type_id: 0x6d7f5ff6 @@ -339584,6 +340309,12 @@ function { return_type_id: 0x1b36c7a2 parameter_id: 0x1d19a9d5 } +function { + id: 0xf1638f87 + return_type_id: 0x6d7f5ff6 + parameter_id: 0x3cd2755a + parameter_id: 0x3cd2755a +} function { id: 0xf16f4d10 return_type_id: 0x32a623d7 @@ -339600,6 +340331,11 @@ function { return_type_id: 0x1344d43c parameter_id: 0x31829648 } +function { + id: 0xf190c652 + return_type_id: 0x6d7f5ff6 + parameter_id: 0x3cd2755a +} function { id: 0xf1a27a59 return_type_id: 0x6d7f5ff6 @@ -341301,6 +342037,15 @@ elf_symbol { type_id: 0x80fe241d full_name: "__alloc_pages" } +elf_symbol { + id: 0xab5055dd + name: "__alloc_pages_bulk" + is_defined: true + symbol_type: FUNCTION + crc: 0x6df6789d + type_id: 0x0c53867f + full_name: "__alloc_pages_bulk" +} elf_symbol { id: 0x9fa51b33 name: "__alloc_percpu" @@ -341802,6 +342547,15 @@ elf_symbol { type_id: 0xb94f7fed full_name: "__cma_alloc" } +elf_symbol { + id: 0xd8451029 + name: "__cond_resched_lock" + is_defined: true + symbol_type: FUNCTION + crc: 0xa02aa74a + type_id: 0x9015d337 + full_name: "__cond_resched_lock" +} elf_symbol { id: 0xac1ff1ce name: "__const_udelay" @@ -342594,6 +343348,15 @@ elf_symbol { type_id: 0x1464781e full_name: "__filemap_set_wb_err" } +elf_symbol { + id: 0x699b402f + name: "__find_get_block" + is_defined: true + symbol_type: FUNCTION + crc: 0xac0572b8 + type_id: 0x65d54b6e + full_name: "__find_get_block" +} elf_symbol { id: 0xaf8ee687 name: "__find_nth_bit" @@ -343918,6 +344681,24 @@ elf_symbol { type_id: 0x10229585 full_name: "__pm_stay_awake" } +elf_symbol { + id: 0x20416c93 + name: "__pmd_trans_huge_lock" + is_defined: true + symbol_type: FUNCTION + crc: 0x186b5a67 + type_id: 0x8556f056 + full_name: "__pmd_trans_huge_lock" +} +elf_symbol { + id: 0x55c8f83c + name: "__posix_acl_create" + is_defined: true + symbol_type: FUNCTION + crc: 0x803ddbb6 + type_id: 0x9eef78c5 + full_name: "__posix_acl_create" +} elf_symbol { id: 0xc37b6db0 name: "__printk_ratelimit" @@ -345106,6 +345887,15 @@ elf_symbol { type_id: 0x9b8eabb4 full_name: "__traceiter_android_rvh_gic_v3_set_affinity" } +elf_symbol { + id: 0xf24e6a40 + name: "__traceiter_android_rvh_hw_protection_shutdown" + is_defined: true + symbol_type: FUNCTION + crc: 0xec769cdc + type_id: 0x9b57f8b7 + full_name: "__traceiter_android_rvh_hw_protection_shutdown" +} elf_symbol { id: 0x0b1353da name: "__traceiter_android_rvh_iommu_alloc_insert_iova" @@ -345952,6 +346742,24 @@ elf_symbol { type_id: 0x9b6e66f6 full_name: "__traceiter_android_rvh_util_fits_cpu" } +elf_symbol { + id: 0x915194c4 + name: "__traceiter_android_rvh_vmscan_kswapd_done" + is_defined: true + symbol_type: FUNCTION + crc: 0x64294f11 + type_id: 0x9a235f02 + full_name: "__traceiter_android_rvh_vmscan_kswapd_done" +} +elf_symbol { + id: 0xdb6d278a + name: "__traceiter_android_rvh_vmscan_kswapd_wake" + is_defined: true + symbol_type: FUNCTION + crc: 0x1bd1ee68 + type_id: 0x9a234e63 + full_name: "__traceiter_android_rvh_vmscan_kswapd_wake" +} elf_symbol { id: 0xebcd0234 name: "__traceiter_android_rvh_wake_up_new_task" @@ -347320,6 +348128,15 @@ elf_symbol { type_id: 0x9bcd4ff7 full_name: "__traceiter_android_vh_init_aes_encrypt" } +elf_symbol { + id: 0x67c7aa4f + name: "__traceiter_android_vh_io_statistics" + is_defined: true + symbol_type: FUNCTION + crc: 0xccc02e75 + type_id: 0x9be9dd69 + full_name: "__traceiter_android_vh_io_statistics" +} elf_symbol { id: 0x4b67a5dc name: "__traceiter_android_vh_iommu_iovad_alloc_iova" @@ -347599,6 +348416,15 @@ elf_symbol { type_id: 0x9b8b2a3f full_name: "__traceiter_android_vh_mmap_region" } +elf_symbol { + id: 0xb6126b05 + name: "__traceiter_android_vh_mmc_attach_sd" + is_defined: true + symbol_type: FUNCTION + crc: 0x1e99068f + type_id: 0x9b6e1777 + full_name: "__traceiter_android_vh_mmc_attach_sd" +} elf_symbol { id: 0x0c9da1aa name: "__traceiter_android_vh_mmc_blk_mq_rw_recovery" @@ -347608,6 +348434,24 @@ elf_symbol { type_id: 0x9ba62ef4 full_name: "__traceiter_android_vh_mmc_blk_mq_rw_recovery" } +elf_symbol { + id: 0x6ac4216b + name: "__traceiter_android_vh_mmc_blk_reset" + is_defined: true + symbol_type: FUNCTION + crc: 0xdfe3cadf + type_id: 0x9b6e1777 + full_name: "__traceiter_android_vh_mmc_blk_reset" +} +elf_symbol { + id: 0xabd010ba + name: "__traceiter_android_vh_mmc_gpio_cd_irqt" + is_defined: true + symbol_type: FUNCTION + crc: 0x4020fa69 + type_id: 0x9b77df43 + full_name: "__traceiter_android_vh_mmc_gpio_cd_irqt" +} elf_symbol { id: 0xc168df93 name: "__traceiter_android_vh_mmc_update_mmc_queue" @@ -348283,6 +349127,15 @@ elf_symbol { type_id: 0x9ba62ef4 full_name: "__traceiter_android_vh_sd_update_bus_speed_mode" } +elf_symbol { + id: 0xf302c041 + name: "__traceiter_android_vh_sdhci_get_cd" + is_defined: true + symbol_type: FUNCTION + crc: 0x0ea66add + type_id: 0x9b4a4e61 + full_name: "__traceiter_android_vh_sdhci_get_cd" +} elf_symbol { id: 0x0b48ad7a name: "__traceiter_android_vh_set_task_comm" @@ -348454,6 +349307,15 @@ elf_symbol { type_id: 0x9be885da full_name: "__traceiter_android_vh_skip_swap_map_write" } +elf_symbol { + id: 0x37177d11 + name: "__traceiter_android_vh_slab_alloc_node" + is_defined: true + symbol_type: FUNCTION + crc: 0x5de80fdf + type_id: 0x9bc1295b + full_name: "__traceiter_android_vh_slab_alloc_node" +} elf_symbol { id: 0x0562cb47 name: "__traceiter_android_vh_slab_folio_alloced" @@ -348463,6 +349325,15 @@ elf_symbol { type_id: 0x9a85c64c full_name: "__traceiter_android_vh_slab_folio_alloced" } +elf_symbol { + id: 0xcc89dffc + name: "__traceiter_android_vh_slab_free" + is_defined: true + symbol_type: FUNCTION + crc: 0x90320227 + type_id: 0x9b69d0a5 + full_name: "__traceiter_android_vh_slab_free" +} elf_symbol { id: 0x08f4cbb0 name: "__traceiter_android_vh_smaps_pte_entry" @@ -349318,6 +350189,42 @@ elf_symbol { type_id: 0x9b8f15f1 full_name: "__traceiter_pelt_se_tp" } +elf_symbol { + id: 0x147cc848 + name: "__traceiter_rpm_idle" + is_defined: true + symbol_type: FUNCTION + crc: 0xfeaa6dcf + type_id: 0x9bbf11b2 + full_name: "__traceiter_rpm_idle" +} +elf_symbol { + id: 0x189202e9 + name: "__traceiter_rpm_resume" + is_defined: true + symbol_type: FUNCTION + crc: 0xf3ad73cf + type_id: 0x9bbf11b2 + full_name: "__traceiter_rpm_resume" +} +elf_symbol { + id: 0x04c5b642 + name: "__traceiter_rpm_return_int" + is_defined: true + symbol_type: FUNCTION + crc: 0xd3a8ae4e + type_id: 0x9bab985c + full_name: "__traceiter_rpm_return_int" +} +elf_symbol { + id: 0x88744d70 + name: "__traceiter_rpm_suspend" + is_defined: true + symbol_type: FUNCTION + crc: 0x8dc0427a + type_id: 0x9bbf11b2 + full_name: "__traceiter_rpm_suspend" +} elf_symbol { id: 0x2c11fea4 name: "__traceiter_rwmmio_post_read" @@ -349993,6 +350900,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_rvh_gic_v3_set_affinity" } +elf_symbol { + id: 0x1bf33aee + name: "__tracepoint_android_rvh_hw_protection_shutdown" + is_defined: true + symbol_type: OBJECT + crc: 0xcd7a933d + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_rvh_hw_protection_shutdown" +} elf_symbol { id: 0x58127eb8 name: "__tracepoint_android_rvh_iommu_alloc_insert_iova" @@ -350839,6 +351755,24 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_rvh_util_fits_cpu" } +elf_symbol { + id: 0xd1be5d26 + name: "__tracepoint_android_rvh_vmscan_kswapd_done" + is_defined: true + symbol_type: OBJECT + crc: 0xc29b3260 + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_rvh_vmscan_kswapd_done" +} +elf_symbol { + id: 0xe1b78c30 + name: "__tracepoint_android_rvh_vmscan_kswapd_wake" + is_defined: true + symbol_type: OBJECT + crc: 0x03cf6aea + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_rvh_vmscan_kswapd_wake" +} elf_symbol { id: 0xdcf22716 name: "__tracepoint_android_rvh_wake_up_new_task" @@ -352207,6 +353141,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_init_aes_encrypt" } +elf_symbol { + id: 0x1975aef5 + name: "__tracepoint_android_vh_io_statistics" + is_defined: true + symbol_type: OBJECT + crc: 0xa74ba06e + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_io_statistics" +} elf_symbol { id: 0xbbfc3b7e name: "__tracepoint_android_vh_iommu_iovad_alloc_iova" @@ -352486,6 +353429,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_mmap_region" } +elf_symbol { + id: 0xa1c3d037 + name: "__tracepoint_android_vh_mmc_attach_sd" + is_defined: true + symbol_type: OBJECT + crc: 0x9398abcc + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_mmc_attach_sd" +} elf_symbol { id: 0x1daf6454 name: "__tracepoint_android_vh_mmc_blk_mq_rw_recovery" @@ -352495,6 +353447,24 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_mmc_blk_mq_rw_recovery" } +elf_symbol { + id: 0xb9d48f4d + name: "__tracepoint_android_vh_mmc_blk_reset" + is_defined: true + symbol_type: OBJECT + crc: 0x248c70ab + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_mmc_blk_reset" +} +elf_symbol { + id: 0x9e78b2f8 + name: "__tracepoint_android_vh_mmc_gpio_cd_irqt" + is_defined: true + symbol_type: OBJECT + crc: 0x2b404ecd + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_mmc_gpio_cd_irqt" +} elf_symbol { id: 0x3c1c2029 name: "__tracepoint_android_vh_mmc_update_mmc_queue" @@ -353170,6 +354140,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_sd_update_bus_speed_mode" } +elf_symbol { + id: 0x5f4d0d53 + name: "__tracepoint_android_vh_sdhci_get_cd" + is_defined: true + symbol_type: OBJECT + crc: 0x2c3d8d01 + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_sdhci_get_cd" +} elf_symbol { id: 0x1f07c260 name: "__tracepoint_android_vh_set_task_comm" @@ -353341,6 +354320,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_skip_swap_map_write" } +elf_symbol { + id: 0x65c6ad4b + name: "__tracepoint_android_vh_slab_alloc_node" + is_defined: true + symbol_type: OBJECT + crc: 0x9e44f99c + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_slab_alloc_node" +} elf_symbol { id: 0x4a999b29 name: "__tracepoint_android_vh_slab_folio_alloced" @@ -353350,6 +354338,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_slab_folio_alloced" } +elf_symbol { + id: 0xab9ebde6 + name: "__tracepoint_android_vh_slab_free" + is_defined: true + symbol_type: OBJECT + crc: 0x40f461e2 + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_slab_free" +} elf_symbol { id: 0x547e3912 name: "__tracepoint_android_vh_smaps_pte_entry" @@ -354205,6 +355202,42 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_pelt_se_tp" } +elf_symbol { + id: 0x36579996 + name: "__tracepoint_rpm_idle" + is_defined: true + symbol_type: OBJECT + crc: 0x98c59274 + type_id: 0x18ccbd2c + full_name: "__tracepoint_rpm_idle" +} +elf_symbol { + id: 0xfbd9814b + name: "__tracepoint_rpm_resume" + is_defined: true + symbol_type: OBJECT + crc: 0x53012944 + type_id: 0x18ccbd2c + full_name: "__tracepoint_rpm_resume" +} +elf_symbol { + id: 0x7c591834 + name: "__tracepoint_rpm_return_int" + is_defined: true + symbol_type: OBJECT + crc: 0x793f98bc + type_id: 0x18ccbd2c + full_name: "__tracepoint_rpm_return_int" +} +elf_symbol { + id: 0x636e234e + name: "__tracepoint_rpm_suspend" + is_defined: true + symbol_type: OBJECT + crc: 0xa6ee15ca + type_id: 0x18ccbd2c + full_name: "__tracepoint_rpm_suspend" +} elf_symbol { id: 0x009c40ce name: "__tracepoint_rwmmio_post_read" @@ -355393,6 +356426,15 @@ elf_symbol { type_id: 0x1e89523e full_name: "add_timer_on" } +elf_symbol { + id: 0x52066ae4 + name: "add_to_page_cache_lru" + is_defined: true + symbol_type: FUNCTION + crc: 0x725b436d + type_id: 0x9c7925e6 + full_name: "add_to_page_cache_lru" +} elf_symbol { id: 0xdee25d92 name: "add_uevent_var" @@ -355582,6 +356624,15 @@ elf_symbol { type_id: 0x12d6b73d full_name: "alloc_anon_inode" } +elf_symbol { + id: 0x7cb7f1ff + name: "alloc_buffer_head" + is_defined: true + symbol_type: FUNCTION + crc: 0x70bfff34 + type_id: 0x59e4d513 + full_name: "alloc_buffer_head" +} elf_symbol { id: 0xc0fb25e9 name: "alloc_can_err_skb" @@ -355827,6 +356878,15 @@ elf_symbol { type_id: 0x4eca3251 full_name: "anon_inode_getfile" } +elf_symbol { + id: 0x91e99542 + name: "anon_vma_name" + is_defined: true + symbol_type: FUNCTION + crc: 0x00fce23a + type_id: 0x8e7232d9 + full_name: "anon_vma_name" +} elf_symbol { id: 0x520c1997 name: "arc4_crypt" @@ -355872,6 +356932,16 @@ elf_symbol { type_id: 0x1f66cd75 full_name: "arch_timer_read_counter" } +elf_symbol { + id: 0x1198e2f6 + name: "arch_vma_name" + is_defined: true + symbol_type: FUNCTION + binding: WEAK + crc: 0x85c1c7bf + type_id: 0x90c0c7f2 + full_name: "arch_vma_name" +} elf_symbol { id: 0xc6d0ad0a name: "argv_free" @@ -362259,6 +363329,15 @@ elf_symbol { type_id: 0x30964cd5 full_name: "d_path" } +elf_symbol { + id: 0x0c4bc6c3 + name: "d_rehash" + is_defined: true + symbol_type: FUNCTION + crc: 0x7428dcf0 + type_id: 0x141901a7 + full_name: "d_rehash" +} elf_symbol { id: 0xb96af991 name: "d_splice_alias" @@ -362628,6 +363707,15 @@ elf_symbol { type_id: 0x2d64ae3e full_name: "default_llseek" } +elf_symbol { + id: 0xaf548a8c + name: "default_qdisc_ops" + is_defined: true + symbol_type: OBJECT + crc: 0x517b3de3 + type_id: 0x30cae1c6 + full_name: "default_qdisc_ops" +} elf_symbol { id: 0x44b5caf9 name: "default_wake_function" @@ -362718,6 +363806,15 @@ elf_symbol { type_id: 0x14667c52 full_name: "destroy_workqueue" } +elf_symbol { + id: 0x7fc68fdb + name: "dev_activate" + is_defined: true + symbol_type: FUNCTION + crc: 0x1eb25b0b + type_id: 0x1c31d966 + full_name: "dev_activate" +} elf_symbol { id: 0x31d27334 name: "dev_add_pack" @@ -362799,6 +363896,15 @@ elf_symbol { type_id: 0x1052519d full_name: "dev_coredumpv" } +elf_symbol { + id: 0x10de32c8 + name: "dev_deactivate" + is_defined: true + symbol_type: FUNCTION + crc: 0xfd64c80d + type_id: 0x1c31d966 + full_name: "dev_deactivate" +} elf_symbol { id: 0x641371dc name: "dev_driver_string" @@ -362934,6 +364040,15 @@ elf_symbol { type_id: 0xfc7fe8d8 full_name: "dev_getfirstbyhwtype" } +elf_symbol { + id: 0xc7ab95e4 + name: "dev_graft_qdisc" + is_defined: true + symbol_type: FUNCTION + crc: 0x4d904fac + type_id: 0xef356aa2 + full_name: "dev_graft_qdisc" +} elf_symbol { id: 0x33035bf6 name: "dev_load" @@ -365337,6 +366452,15 @@ elf_symbol { type_id: 0x5468daf3 full_name: "devm_memremap" } +elf_symbol { + id: 0xa21e8009 + name: "devm_memremap_pages" + is_defined: true + symbol_type: FUNCTION + crc: 0x8748c39e + type_id: 0x564ae602 + full_name: "devm_memremap_pages" +} elf_symbol { id: 0x86c1623f name: "devm_memunmap" @@ -367814,6 +368938,24 @@ elf_symbol { type_id: 0x950581be full_name: "drm_atomic_add_affected_planes" } +elf_symbol { + id: 0xe0cc985d + name: "drm_atomic_add_encoder_bridges" + is_defined: true + symbol_type: FUNCTION + crc: 0x43791087 + type_id: 0x957b3cbb + full_name: "drm_atomic_add_encoder_bridges" +} +elf_symbol { + id: 0x6420a3e8 + name: "drm_atomic_bridge_chain_check" + is_defined: true + symbol_type: FUNCTION + crc: 0xdb77b07b + type_id: 0x94fa90ba + full_name: "drm_atomic_bridge_chain_check" +} elf_symbol { id: 0x27bb2715 name: "drm_atomic_bridge_chain_disable" @@ -367859,6 +369001,15 @@ elf_symbol { type_id: 0x95c0ec46 full_name: "drm_atomic_commit" } +elf_symbol { + id: 0x25c01835 + name: "drm_atomic_get_bridge_state" + is_defined: true + symbol_type: FUNCTION + crc: 0x19a515fb + type_id: 0x289916da + full_name: "drm_atomic_get_bridge_state" +} elf_symbol { id: 0xc98da8e7 name: "drm_atomic_get_connector_state" @@ -372998,6 +374149,15 @@ elf_symbol { type_id: 0x98773f07 full_name: "filemap_fdatawrite_range" } +elf_symbol { + id: 0x9d5c7f2b + name: "filemap_fdatawrite_wbc" + is_defined: true + symbol_type: FUNCTION + crc: 0x0c86acd7 + type_id: 0x9860482f + full_name: "filemap_fdatawrite_wbc" +} elf_symbol { id: 0x7c937fc2 name: "filemap_flush" @@ -373520,6 +374680,15 @@ elf_symbol { type_id: 0x10e42ea8 full_name: "frame_vector_to_pfns" } +elf_symbol { + id: 0x7514c08f + name: "free_buffer_head" + is_defined: true + symbol_type: FUNCTION + crc: 0x95aac32f + type_id: 0x16c5a8cd + full_name: "free_buffer_head" +} elf_symbol { id: 0x1b00ff86 name: "free_candev" @@ -375647,6 +376816,15 @@ elf_symbol { type_id: 0xf1d83496 full_name: "glob_match" } +elf_symbol { + id: 0xb096071e + name: "gnet_stats_add_basic" + is_defined: true + symbol_type: FUNCTION + crc: 0x8d5cd9f4 + type_id: 0x10e9600e + full_name: "gnet_stats_add_basic" +} elf_symbol { id: 0x7990bc50 name: "gnet_stats_add_queue" @@ -375656,6 +376834,15 @@ elf_symbol { type_id: 0x13072e26 full_name: "gnet_stats_add_queue" } +elf_symbol { + id: 0xa9715193 + name: "gnet_stats_basic_sync_init" + is_defined: true + symbol_type: FUNCTION + crc: 0x866a62b2 + type_id: 0x10efdacd + full_name: "gnet_stats_basic_sync_init" +} elf_symbol { id: 0x8a6e138f name: "gnet_stats_copy_basic" @@ -376457,6 +377644,15 @@ elf_symbol { type_id: 0x9b91c1d8 full_name: "hci_cmd_sync_queue" } +elf_symbol { + id: 0x9a246c61 + name: "hci_cmd_sync_status" + is_defined: true + symbol_type: FUNCTION + crc: 0x98da48cb + type_id: 0x9887b4ee + full_name: "hci_cmd_sync_status" +} elf_symbol { id: 0xed4f6979 name: "hci_conn_check_secure" @@ -381732,6 +382928,78 @@ elf_symbol { type_id: 0x92233392 full_name: "kimage_voffset" } +elf_symbol { + id: 0x499f7ca5 + name: "klist_add_head" + is_defined: true + symbol_type: FUNCTION + crc: 0xe6f52443 + type_id: 0x100359c8 + full_name: "klist_add_head" +} +elf_symbol { + id: 0xcfc9f455 + name: "klist_add_tail" + is_defined: true + symbol_type: FUNCTION + crc: 0x611cfa85 + type_id: 0x100359c8 + full_name: "klist_add_tail" +} +elf_symbol { + id: 0x8ce1e69a + name: "klist_init" + is_defined: true + symbol_type: FUNCTION + crc: 0xd24e9e8c + type_id: 0x1b5a8722 + full_name: "klist_init" +} +elf_symbol { + id: 0x6128fc8c + name: "klist_iter_exit" + is_defined: true + symbol_type: FUNCTION + crc: 0x819d72cb + type_id: 0x19d8dd00 + full_name: "klist_iter_exit" +} +elf_symbol { + id: 0x9e89161e + name: "klist_iter_init" + is_defined: true + symbol_type: FUNCTION + crc: 0xe3cd5fae + type_id: 0x1bf7dc2c + full_name: "klist_iter_init" +} +elf_symbol { + id: 0x023e1288 + name: "klist_next" + is_defined: true + symbol_type: FUNCTION + crc: 0x355bc89a + type_id: 0x34a5a0a0 + full_name: "klist_next" +} +elf_symbol { + id: 0x9240ba00 + name: "klist_node_attached" + is_defined: true + symbol_type: FUNCTION + crc: 0x2864abc9 + type_id: 0x9da45323 + full_name: "klist_node_attached" +} +elf_symbol { + id: 0x55b3b820 + name: "klist_remove" + is_defined: true + symbol_type: FUNCTION + crc: 0xc82c721f + type_id: 0x10bce19f + full_name: "klist_remove" +} elf_symbol { id: 0xbc2dc163 name: "kmalloc_caches" @@ -385553,6 +386821,15 @@ elf_symbol { type_id: 0x986b6304 full_name: "mpage_writepages" } +elf_symbol { + id: 0x80a63ee1 + name: "mq_change_real_num_tx" + is_defined: true + symbol_type: FUNCTION + crc: 0x708fa4f4 + type_id: 0x1a2d13ca + full_name: "mq_change_real_num_tx" +} elf_symbol { id: 0xbedab58b name: "msi_first_desc" @@ -386120,6 +387397,15 @@ elf_symbol { type_id: 0x1c31d966 full_name: "netdev_state_change" } +elf_symbol { + id: 0x64f1f9ef + name: "netdev_txq_to_tc" + is_defined: true + symbol_type: FUNCTION + crc: 0xf33fe638 + type_id: 0x903f7e42 + full_name: "netdev_txq_to_tc" +} elf_symbol { id: 0x88a6525c name: "netdev_update_features" @@ -390776,6 +392062,15 @@ elf_symbol { type_id: 0x1732fd5e full_name: "perf_trace_run_bpf_submit" } +elf_symbol { + id: 0x018498a2 + name: "pfifo_fast_ops" + is_defined: true + symbol_type: OBJECT + crc: 0x28dd786d + type_id: 0xd5ea309d + full_name: "pfifo_fast_ops" +} elf_symbol { id: 0x1e700c22 name: "pfifo_qdisc_ops" @@ -392918,6 +394213,15 @@ elf_symbol { type_id: 0x11032587 full_name: "pm_wakeup_dev_event" } +elf_symbol { + id: 0x914856be + name: "pm_wakeup_irq" + is_defined: true + symbol_type: FUNCTION + crc: 0xe1321db2 + type_id: 0xcedb7efb + full_name: "pm_wakeup_irq" +} elf_symbol { id: 0x58b605c8 name: "pm_wakeup_ws_event" @@ -392936,6 +394240,15 @@ elf_symbol { type_id: 0x13f8b706 full_name: "pm_wq" } +elf_symbol { + id: 0xe1d2f463 + name: "pmd_clear_bad" + is_defined: true + symbol_type: FUNCTION + crc: 0xef7dddc5 + type_id: 0x18da5b6c + full_name: "pmd_clear_bad" +} elf_symbol { id: 0x3020cd17 name: "policy_has_boost_freq" @@ -392972,6 +394285,42 @@ elf_symbol { type_id: 0x9e008a7e full_name: "posix_acl_chmod" } +elf_symbol { + id: 0x38d4e8d6 + name: "posix_acl_equiv_mode" + is_defined: true + symbol_type: FUNCTION + crc: 0x00b4e615 + type_id: 0x907a6c53 + full_name: "posix_acl_equiv_mode" +} +elf_symbol { + id: 0xacb83eb1 + name: "posix_acl_from_xattr" + is_defined: true + symbol_type: FUNCTION + crc: 0x0a8eb727 + type_id: 0x78c7e392 + full_name: "posix_acl_from_xattr" +} +elf_symbol { + id: 0xa3b2084d + name: "posix_acl_to_xattr" + is_defined: true + symbol_type: FUNCTION + crc: 0x4c49a680 + type_id: 0x9eb3dea3 + full_name: "posix_acl_to_xattr" +} +elf_symbol { + id: 0xc6106a7d + name: "posix_acl_valid" + is_defined: true + symbol_type: FUNCTION + crc: 0xf9dc150b + type_id: 0x9eb6212f + full_name: "posix_acl_valid" +} elf_symbol { id: 0x48573a01 name: "posix_lock_file" @@ -394259,6 +395608,15 @@ elf_symbol { type_id: 0x1f5c5adf full_name: "qdisc_watchdog_init" } +elf_symbol { + id: 0x508d9501 + name: "qdisc_watchdog_init_clockid" + is_defined: true + symbol_type: FUNCTION + crc: 0x2ecf602d + type_id: 0x1f4d44f1 + full_name: "qdisc_watchdog_init_clockid" +} elf_symbol { id: 0x7d9c9dda name: "qdisc_watchdog_schedule_range_ns" @@ -397076,6 +398434,15 @@ elf_symbol { type_id: 0x97f16301 full_name: "rproc_del" } +elf_symbol { + id: 0xede9cf60 + name: "rproc_detach" + is_defined: true + symbol_type: FUNCTION + crc: 0xb927eafd + type_id: 0x97f16301 + full_name: "rproc_detach" +} elf_symbol { id: 0x4f3dccb0 name: "rproc_elf_find_loaded_rsc_table" @@ -397418,6 +398785,15 @@ elf_symbol { type_id: 0x9d80e32f full_name: "rtnl_is_locked" } +elf_symbol { + id: 0x730105d4 + name: "rtnl_kfree_skbs" + is_defined: true + symbol_type: FUNCTION + crc: 0xcb403c72 + type_id: 0x11deb671 + full_name: "rtnl_kfree_skbs" +} elf_symbol { id: 0x8c0dd14a name: "rtnl_link_register" @@ -399236,6 +400612,15 @@ elf_symbol { type_id: 0x1e70c9ff full_name: "serdev_device_write_wakeup" } +elf_symbol { + id: 0x0746da0a + name: "serial8250_clear_and_reinit_fifos" + is_defined: true + symbol_type: FUNCTION + crc: 0xcb533d4d + type_id: 0x17abf19b + full_name: "serial8250_clear_and_reinit_fifos" +} elf_symbol { id: 0x98b882af name: "serial8250_do_pm" @@ -399245,6 +400630,24 @@ elf_symbol { type_id: 0x11b2c04d full_name: "serial8250_do_pm" } +elf_symbol { + id: 0x45ffec2b + name: "serial8250_do_set_divisor" + is_defined: true + symbol_type: FUNCTION + crc: 0x726dc873 + type_id: 0x11b3d658 + full_name: "serial8250_do_set_divisor" +} +elf_symbol { + id: 0x5b9376b0 + name: "serial8250_do_set_ldisc" + is_defined: true + symbol_type: FUNCTION + crc: 0x20ab23ea + type_id: 0x1043ff6b + full_name: "serial8250_do_set_ldisc" +} elf_symbol { id: 0x2bb7ad6a name: "serial8250_do_set_termios" @@ -399272,6 +400675,42 @@ elf_symbol { type_id: 0x9dad0630 full_name: "serial8250_do_startup" } +elf_symbol { + id: 0xec4fe037 + name: "serial8250_em485_config" + is_defined: true + symbol_type: FUNCTION + crc: 0x73907d61 + type_id: 0x9d5ada98 + full_name: "serial8250_em485_config" +} +elf_symbol { + id: 0xb90d3326 + name: "serial8250_em485_start_tx" + is_defined: true + symbol_type: FUNCTION + crc: 0x566a89b6 + type_id: 0x17abf19b + full_name: "serial8250_em485_start_tx" +} +elf_symbol { + id: 0xb09b6acb + name: "serial8250_em485_stop_tx" + is_defined: true + symbol_type: FUNCTION + crc: 0xbb8bc3ff + type_id: 0x17abf19b + full_name: "serial8250_em485_stop_tx" +} +elf_symbol { + id: 0xcc28e994 + name: "serial8250_em485_supported" + is_defined: true + symbol_type: OBJECT + crc: 0xf2ff4bc2 + type_id: 0x33341885 + full_name: "serial8250_em485_supported" +} elf_symbol { id: 0x3e462ca5 name: "serial8250_get_port" @@ -399344,6 +400783,15 @@ elf_symbol { type_id: 0x09506558 full_name: "serial8250_unregister_port" } +elf_symbol { + id: 0xfa4a7632 + name: "serial8250_update_uartclk" + is_defined: true + symbol_type: FUNCTION + crc: 0x577d8145 + type_id: 0x11a3a114 + full_name: "serial8250_update_uartclk" +} elf_symbol { id: 0x4e412a59 name: "serio_close" @@ -399443,6 +400891,15 @@ elf_symbol { type_id: 0x9f17e634 full_name: "set_blocksize" } +elf_symbol { + id: 0x013afad5 + name: "set_cached_acl" + is_defined: true + symbol_type: FUNCTION + crc: 0x1e6d8cd7 + type_id: 0x17ed8cca + full_name: "set_cached_acl" +} elf_symbol { id: 0x2c6a64fa name: "set_capacity" @@ -399920,6 +401377,15 @@ elf_symbol { type_id: 0x10d0da4c full_name: "show_regs" } +elf_symbol { + id: 0x2912067f + name: "shrink_dcache_sb" + is_defined: true + symbol_type: FUNCTION + crc: 0x86beb281 + type_id: 0x1923cb99 + full_name: "shrink_dcache_sb" +} elf_symbol { id: 0x59a21b13 name: "shrink_slab" @@ -400884,6 +402350,15 @@ elf_symbol { type_id: 0x9c85ef5b full_name: "snd_card_new" } +elf_symbol { + id: 0xb698b8ae + name: "snd_card_ref" + is_defined: true + symbol_type: FUNCTION + crc: 0x4b8146bd + type_id: 0x09fe2e07 + full_name: "snd_card_ref" +} elf_symbol { id: 0xba68a39f name: "snd_card_register" @@ -401289,6 +402764,15 @@ elf_symbol { type_id: 0xac45ce43 full_name: "snd_pcm_format_physical_width" } +elf_symbol { + id: 0xb132031d + name: "snd_pcm_format_set_silence" + is_defined: true + symbol_type: FUNCTION + crc: 0x5e7f4920 + type_id: 0xac365a8e + full_name: "snd_pcm_format_set_silence" +} elf_symbol { id: 0xaec05601 name: "snd_pcm_format_size" @@ -402945,6 +404429,24 @@ elf_symbol { type_id: 0x981e2b3a full_name: "sock_common_setsockopt" } +elf_symbol { + id: 0x021ff112 + name: "sock_copy_user_timeval" + is_defined: true + symbol_type: FUNCTION + crc: 0xa0339ba1 + type_id: 0x9d80c6bb + full_name: "sock_copy_user_timeval" +} +elf_symbol { + id: 0x13ae25c6 + name: "sock_create" + is_defined: true + symbol_type: FUNCTION + crc: 0xd6353378 + type_id: 0x85cda6bc + full_name: "sock_create" +} elf_symbol { id: 0x7be16ce2 name: "sock_create_kern" @@ -403017,6 +404519,15 @@ elf_symbol { type_id: 0x17c95d08 full_name: "sock_gen_put" } +elf_symbol { + id: 0x6c3e2f7c + name: "sock_get_timeout" + is_defined: true + symbol_type: FUNCTION + crc: 0xedd17b31 + type_id: 0xa2face03 + full_name: "sock_get_timeout" +} elf_symbol { id: 0x284bec0f name: "sock_gettstamp" @@ -403161,6 +404672,15 @@ elf_symbol { type_id: 0x99d969f9 full_name: "sock_no_socketpair" } +elf_symbol { + id: 0x96e969d8 + name: "sock_queue_err_skb" + is_defined: true + symbol_type: FUNCTION + crc: 0x24fd1c0a + type_id: 0x9ac4d210 + full_name: "sock_queue_err_skb" +} elf_symbol { id: 0xc4ac81a3 name: "sock_queue_rcv_skb_reason" @@ -404370,6 +405890,15 @@ elf_symbol { type_id: 0x9afd0449 full_name: "sync_inode_metadata" } +elf_symbol { + id: 0x2bbd1e19 + name: "sync_inodes_sb" + is_defined: true + symbol_type: FUNCTION + crc: 0x2b53cc2a + type_id: 0x1923cb99 + full_name: "sync_inodes_sb" +} elf_symbol { id: 0x3a16ef08 name: "sync_mapping_buffers" @@ -405279,6 +406808,15 @@ elf_symbol { type_id: 0x98511587 full_name: "tcf_unregister_action" } +elf_symbol { + id: 0x11c1cd7f + name: "tcp_cong_avoid_ai" + is_defined: true + symbol_type: FUNCTION + crc: 0x5b79826a + type_id: 0x1570f9ad + full_name: "tcp_cong_avoid_ai" +} elf_symbol { id: 0xb4592621 name: "tcp_done" @@ -406827,6 +408365,15 @@ elf_symbol { type_id: 0x9a98740b full_name: "tty_buffer_set_limit" } +elf_symbol { + id: 0x5d10efc1 + name: "tty_buffer_space_avail" + is_defined: true + symbol_type: FUNCTION + crc: 0x9fb6be5e + type_id: 0xc85f6a93 + full_name: "tty_buffer_space_avail" +} elf_symbol { id: 0x0b4dd20d name: "tty_chars_in_buffer" @@ -407250,6 +408797,15 @@ elf_symbol { type_id: 0x1d825cc4 full_name: "tty_termios_encode_baud_rate" } +elf_symbol { + id: 0xacb09a3e + name: "tty_termios_hw_change" + is_defined: true + symbol_type: FUNCTION + crc: 0x6c257ac0 + type_id: 0x91548c51 + full_name: "tty_termios_hw_change" +} elf_symbol { id: 0xfd34f897 name: "tty_unlock" @@ -407322,6 +408878,33 @@ elf_symbol { type_id: 0xc564dee2 full_name: "tty_write_room" } +elf_symbol { + id: 0xa46589d6 + name: "tun_get_socket" + is_defined: true + symbol_type: FUNCTION + crc: 0x6776ec47 + type_id: 0x229f1818 + full_name: "tun_get_socket" +} +elf_symbol { + id: 0x3d3dcefb + name: "tun_get_tx_ring" + is_defined: true + symbol_type: FUNCTION + crc: 0x40825473 + type_id: 0x83085622 + full_name: "tun_get_tx_ring" +} +elf_symbol { + id: 0x7219254d + name: "tun_ptr_free" + is_defined: true + symbol_type: FUNCTION + crc: 0x4099f919 + type_id: 0x16b708df + full_name: "tun_ptr_free" +} elf_symbol { id: 0xfb5efe2e name: "typec_altmode_attention" @@ -413802,6 +415385,15 @@ elf_symbol { type_id: 0xfc37fa4b full_name: "vm_node_stat" } +elf_symbol { + id: 0x2570ceae + name: "vm_normal_page" + is_defined: true + symbol_type: FUNCTION + crc: 0x16cca06d + type_id: 0xbfe9db9a + full_name: "vm_normal_page" +} elf_symbol { id: 0xacc76406 name: "vm_unmap_aliases" @@ -414027,6 +415619,60 @@ elf_symbol { type_id: 0x9f7cdc88 full_name: "vsnprintf" } +elf_symbol { + id: 0x24b72fe8 + name: "vsock_addr_bound" + is_defined: true + symbol_type: FUNCTION + crc: 0x4b99648c + type_id: 0xf190c652 + full_name: "vsock_addr_bound" +} +elf_symbol { + id: 0x74552293 + name: "vsock_addr_cast" + is_defined: true + symbol_type: FUNCTION + crc: 0x77c14317 + type_id: 0x92d34d4e + full_name: "vsock_addr_cast" +} +elf_symbol { + id: 0x79291ebd + name: "vsock_addr_equals_addr" + is_defined: true + symbol_type: FUNCTION + crc: 0xaf2674b5 + type_id: 0xf1638f87 + full_name: "vsock_addr_equals_addr" +} +elf_symbol { + id: 0x6ea68f58 + name: "vsock_addr_init" + is_defined: true + symbol_type: FUNCTION + crc: 0x3d4b0fca + type_id: 0x106c0ac9 + full_name: "vsock_addr_init" +} +elf_symbol { + id: 0xbf744c76 + name: "vsock_addr_unbind" + is_defined: true + symbol_type: FUNCTION + crc: 0x0e9bc9b6 + type_id: 0x137a686f + full_name: "vsock_addr_unbind" +} +elf_symbol { + id: 0x3bb16099 + name: "vsock_addr_validate" + is_defined: true + symbol_type: FUNCTION + crc: 0xec96eadf + type_id: 0x92b47e79 + full_name: "vsock_addr_validate" +} elf_symbol { id: 0xc46cf30e name: "vsock_core_register" @@ -414045,6 +415691,15 @@ elf_symbol { type_id: 0x1f9a1d61 full_name: "vsock_core_unregister" } +elf_symbol { + id: 0x5af22a06 + name: "vsock_deliver_tap" + is_defined: true + symbol_type: FUNCTION + crc: 0x090a9c1c + type_id: 0x14b5bc68 + full_name: "vsock_deliver_tap" +} elf_symbol { id: 0x3d09e223 name: "vsock_for_each_connected_socket" @@ -414126,6 +415781,15 @@ elf_symbol { type_id: 0xa6b55f52 full_name: "wait_for_completion_interruptible_timeout" } +elf_symbol { + id: 0xb09d980f + name: "wait_for_completion_io" + is_defined: true + symbol_type: FUNCTION + crc: 0x392b1fea + type_id: 0x11c0e0ca + full_name: "wait_for_completion_io" +} elf_symbol { id: 0xd0367f5d name: "wait_for_completion_io_timeout" @@ -414342,6 +416006,15 @@ elf_symbol { type_id: 0xd6c91a51 full_name: "wakeup_sources_walk_start" } +elf_symbol { + id: 0x5942369c + name: "walk_page_range" + is_defined: true + symbol_type: FUNCTION + crc: 0xc5259982 + type_id: 0x9b8c84e7 + full_name: "walk_page_range" +} elf_symbol { id: 0xb3aa5e28 name: "watchdog_init_timeout" @@ -414486,6 +416159,15 @@ elf_symbol { type_id: 0x126f3be6 full_name: "wq_worker_comm" } +elf_symbol { + id: 0x73a49190 + name: "write_dirty_buffer" + is_defined: true + symbol_type: FUNCTION + crc: 0xb1670595 + type_id: 0x1728395d + full_name: "write_dirty_buffer" +} elf_symbol { id: 0xa643ac3f name: "write_inode_now" @@ -415323,6 +417005,15 @@ elf_symbol { type_id: 0x1e818bd6 full_name: "xt_unregister_targets" } +elf_symbol { + id: 0x2407d2bf + name: "yield" + is_defined: true + symbol_type: FUNCTION + crc: 0x760a0f4f + type_id: 0x10985193 + full_name: "yield" +} elf_symbol { id: 0x0fc8c78d name: "zap_vma_ptes" @@ -415534,6 +417225,7 @@ interface { symbol_id: 0x98179c82 symbol_id: 0xfa979d99 symbol_id: 0x6e1bc82e + symbol_id: 0xab5055dd symbol_id: 0x9fa51b33 symbol_id: 0x228f3ab6 symbol_id: 0x9be8e89f @@ -415591,6 +417283,7 @@ interface { symbol_id: 0x021741b4 symbol_id: 0x9339caba symbol_id: 0xc7d06fb9 + symbol_id: 0xd8451029 symbol_id: 0xac1ff1ce symbol_id: 0xba429af2 symbol_id: 0xe495eb53 @@ -415679,6 +417372,7 @@ interface { symbol_id: 0x5298aa39 symbol_id: 0x68fbcad4 symbol_id: 0x6036d483 + symbol_id: 0x699b402f symbol_id: 0xaf8ee687 symbol_id: 0x746a66fc symbol_id: 0x6a92cb2d @@ -415826,6 +417520,8 @@ interface { symbol_id: 0x3a80078d symbol_id: 0x4e3336f3 symbol_id: 0x085ad43c + symbol_id: 0x20416c93 + symbol_id: 0x55c8f83c symbol_id: 0xc37b6db0 symbol_id: 0xa676022e symbol_id: 0x577da3d6 @@ -415958,6 +417654,7 @@ interface { symbol_id: 0xede4c5f2 symbol_id: 0xa23fdad4 symbol_id: 0x41d29e07 + symbol_id: 0xf24e6a40 symbol_id: 0x0b1353da symbol_id: 0x7edcea8d symbol_id: 0x72c43156 @@ -416052,6 +417749,8 @@ interface { symbol_id: 0x09b5cc40 symbol_id: 0x13c17b96 symbol_id: 0x88b6e481 + symbol_id: 0x915194c4 + symbol_id: 0xdb6d278a symbol_id: 0xebcd0234 symbol_id: 0xa3af7947 symbol_id: 0x86527a4e @@ -416204,6 +417903,7 @@ interface { symbol_id: 0x1ba2e410 symbol_id: 0xdb6662e8 symbol_id: 0x64c2fe7a + symbol_id: 0x67c7aa4f symbol_id: 0x4b67a5dc symbol_id: 0x3684a257 symbol_id: 0x7ee652cd @@ -416235,7 +417935,10 @@ interface { symbol_id: 0xf928bf8a symbol_id: 0x6f5c8275 symbol_id: 0xe44dacb1 + symbol_id: 0xb6126b05 symbol_id: 0x0c9da1aa + symbol_id: 0x6ac4216b + symbol_id: 0xabd010ba symbol_id: 0xc168df93 symbol_id: 0x5612c9d1 symbol_id: 0xa77effd1 @@ -416311,6 +418014,7 @@ interface { symbol_id: 0xedb34a44 symbol_id: 0xb841c45e symbol_id: 0xe4ec133d + symbol_id: 0xf302c041 symbol_id: 0x0b48ad7a symbol_id: 0x874fcdb2 symbol_id: 0xaa3f6a65 @@ -416330,7 +418034,9 @@ interface { symbol_id: 0x69c3749b symbol_id: 0x3d0fc76c symbol_id: 0x8f7ad177 + symbol_id: 0x37177d11 symbol_id: 0x0562cb47 + symbol_id: 0xcc89dffc symbol_id: 0x08f4cbb0 symbol_id: 0xbc7bbb37 symbol_id: 0x445e3749 @@ -416426,6 +418132,10 @@ interface { symbol_id: 0xbdceccc2 symbol_id: 0x3e69b303 symbol_id: 0x7f1a363f + symbol_id: 0x147cc848 + symbol_id: 0x189202e9 + symbol_id: 0x04c5b642 + symbol_id: 0x88744d70 symbol_id: 0x2c11fea4 symbol_id: 0x45e62871 symbol_id: 0x85a11e58 @@ -416501,6 +418211,7 @@ interface { symbol_id: 0xb894fcfc symbol_id: 0x555d2f3e symbol_id: 0x47c27595 + symbol_id: 0x1bf33aee symbol_id: 0x58127eb8 symbol_id: 0x0991fcbf symbol_id: 0x693af5b0 @@ -416595,6 +418306,8 @@ interface { symbol_id: 0xbe0b79ae symbol_id: 0xa68c0f10 symbol_id: 0xabb656f7 + symbol_id: 0xd1be5d26 + symbol_id: 0xe1b78c30 symbol_id: 0xdcf22716 symbol_id: 0x4f980315 symbol_id: 0xe1489e0c @@ -416747,6 +418460,7 @@ interface { symbol_id: 0xc62a97aa symbol_id: 0xf68497fa symbol_id: 0xb6603d58 + symbol_id: 0x1975aef5 symbol_id: 0xbbfc3b7e symbol_id: 0xdb161c79 symbol_id: 0x1d442b97 @@ -416778,7 +418492,10 @@ interface { symbol_id: 0x72c79d80 symbol_id: 0x0f593caf symbol_id: 0xb6da564f + symbol_id: 0xa1c3d037 symbol_id: 0x1daf6454 + symbol_id: 0xb9d48f4d + symbol_id: 0x9e78b2f8 symbol_id: 0x3c1c2029 symbol_id: 0x41c8d09b symbol_id: 0xe2ad11db @@ -416854,6 +418571,7 @@ interface { symbol_id: 0xaaf6a826 symbol_id: 0xff2bccb8 symbol_id: 0xcfab6e83 + symbol_id: 0x5f4d0d53 symbol_id: 0x1f07c260 symbol_id: 0xb6de2d88 symbol_id: 0xd7ceb15f @@ -416873,7 +418591,9 @@ interface { symbol_id: 0xc8a7ac69 symbol_id: 0x5ef059ce symbol_id: 0x3204c8e5 + symbol_id: 0x65c6ad4b symbol_id: 0x4a999b29 + symbol_id: 0xab9ebde6 symbol_id: 0x547e3912 symbol_id: 0x4ed55b15 symbol_id: 0x052557d7 @@ -416969,6 +418689,10 @@ interface { symbol_id: 0x67e2af24 symbol_id: 0xf3cb5921 symbol_id: 0xcb194ec9 + symbol_id: 0x36579996 + symbol_id: 0xfbd9814b + symbol_id: 0x7c591834 + symbol_id: 0x636e234e symbol_id: 0x009c40ce symbol_id: 0x02473ce7 symbol_id: 0x65f99dde @@ -417101,6 +418825,7 @@ interface { symbol_id: 0xa5dcf915 symbol_id: 0xf2768ed7 symbol_id: 0xfbeae533 + symbol_id: 0x52066ae4 symbol_id: 0xdee25d92 symbol_id: 0xe251c99f symbol_id: 0xac3dec68 @@ -417122,6 +418847,7 @@ interface { symbol_id: 0x5aa4c3e8 symbol_id: 0xbd7c5367 symbol_id: 0x7a0cc0b9 + symbol_id: 0x7cb7f1ff symbol_id: 0xc0fb25e9 symbol_id: 0x0fc80d91 symbol_id: 0xc453a761 @@ -417149,11 +418875,13 @@ interface { symbol_id: 0xd8dbec6e symbol_id: 0x95eaf556 symbol_id: 0xf2d017ff + symbol_id: 0x91e99542 symbol_id: 0x520c1997 symbol_id: 0x2d3715da symbol_id: 0x7ff45ec2 symbol_id: 0x97ee5cc4 symbol_id: 0xc447be59 + symbol_id: 0x1198e2f6 symbol_id: 0xc6d0ad0a symbol_id: 0x9403cfad symbol_id: 0x1cf86989 @@ -417865,6 +419593,7 @@ interface { symbol_id: 0x03fd2deb symbol_id: 0x8d5ab7b4 symbol_id: 0xccc25fc1 + symbol_id: 0x0c4bc6c3 symbol_id: 0xb96af991 symbol_id: 0xb771d13e symbol_id: 0x53d11a8d @@ -417906,6 +419635,7 @@ interface { symbol_id: 0x01ff0af3 symbol_id: 0x8ce0927a symbol_id: 0x35ab75ba + symbol_id: 0xaf548a8c symbol_id: 0x44b5caf9 symbol_id: 0x7f1735ac symbol_id: 0x4ba4968c @@ -417916,6 +419646,7 @@ interface { symbol_id: 0x1ef313dc symbol_id: 0x67daf3cf symbol_id: 0xe5161e20 + symbol_id: 0x7fc68fdb symbol_id: 0x31d27334 symbol_id: 0x2f800ec5 symbol_id: 0xd5cd30b1 @@ -417925,6 +419656,7 @@ interface { symbol_id: 0x094eac4e symbol_id: 0xb4062816 symbol_id: 0xeac49112 + symbol_id: 0x10de32c8 symbol_id: 0x641371dc symbol_id: 0x5a345cb5 symbol_id: 0x1df78429 @@ -417940,6 +419672,7 @@ interface { symbol_id: 0x34feac51 symbol_id: 0x87df61b4 symbol_id: 0x8abf96ef + symbol_id: 0xc7ab95e4 symbol_id: 0x33035bf6 symbol_id: 0x9a2dbfca symbol_id: 0xafae816a @@ -418207,6 +419940,7 @@ interface { symbol_id: 0x57498e16 symbol_id: 0x407c1985 symbol_id: 0x888f691d + symbol_id: 0xa21e8009 symbol_id: 0x86c1623f symbol_id: 0x36e39cf6 symbol_id: 0x6e37c2ad @@ -418480,11 +420214,14 @@ interface { symbol_id: 0x588ab3fd symbol_id: 0x1389094c symbol_id: 0x098d4189 + symbol_id: 0xe0cc985d + symbol_id: 0x6420a3e8 symbol_id: 0x27bb2715 symbol_id: 0xa7187ebf symbol_id: 0xff22568f symbol_id: 0xe21486eb symbol_id: 0x4fa53f59 + symbol_id: 0x25c01835 symbol_id: 0xc98da8e7 symbol_id: 0xd5466b6c symbol_id: 0x1d9e3d52 @@ -419056,6 +420793,7 @@ interface { symbol_id: 0xef606c3f symbol_id: 0x3289d59f symbol_id: 0x82b19820 + symbol_id: 0x9d5c7f2b symbol_id: 0x7c937fc2 symbol_id: 0xa6f98003 symbol_id: 0x70cbb212 @@ -419114,6 +420852,7 @@ interface { symbol_id: 0xf650f97e symbol_id: 0x942400d1 symbol_id: 0x0513219e + symbol_id: 0x7514c08f symbol_id: 0x1b00ff86 symbol_id: 0x557c88ae symbol_id: 0x9b815cdc @@ -419350,7 +421089,9 @@ interface { symbol_id: 0x390427e4 symbol_id: 0x53ba530f symbol_id: 0x365c2930 + symbol_id: 0xb096071e symbol_id: 0x7990bc50 + symbol_id: 0xa9715193 symbol_id: 0x8a6e138f symbol_id: 0x0ace9404 symbol_id: 0x64b49555 @@ -419440,6 +421181,7 @@ interface { symbol_id: 0x3906c0f6 symbol_id: 0xc2efad35 symbol_id: 0xced6b01d + symbol_id: 0x9a246c61 symbol_id: 0xed4f6979 symbol_id: 0x1a89058a symbol_id: 0x7bbdca15 @@ -420026,6 +421768,14 @@ interface { symbol_id: 0x95c81f5f symbol_id: 0x053e25cb symbol_id: 0x567c8a8a + symbol_id: 0x499f7ca5 + symbol_id: 0xcfc9f455 + symbol_id: 0x8ce1e69a + symbol_id: 0x6128fc8c + symbol_id: 0x9e89161e + symbol_id: 0x023e1288 + symbol_id: 0x9240ba00 + symbol_id: 0x55b3b820 symbol_id: 0xbc2dc163 symbol_id: 0x98b2ed59 symbol_id: 0x158dfa03 @@ -420451,6 +422201,7 @@ interface { symbol_id: 0x1405e8c0 symbol_id: 0x84babda3 symbol_id: 0xeb5e01d3 + symbol_id: 0x80a63ee1 symbol_id: 0xbedab58b symbol_id: 0x603dd7ca symbol_id: 0xc30a6d76 @@ -420514,6 +422265,7 @@ interface { symbol_id: 0xd0f388bf symbol_id: 0xc32be078 symbol_id: 0x13d32ab6 + symbol_id: 0x64f1f9ef symbol_id: 0x88a6525c symbol_id: 0xa9b870ab symbol_id: 0x07d0c0e2 @@ -421031,6 +422783,7 @@ interface { symbol_id: 0xc2bb86d6 symbol_id: 0x1dad348b symbol_id: 0xd50beffc + symbol_id: 0x018498a2 symbol_id: 0x1e700c22 symbol_id: 0xba681a1a symbol_id: 0xaefcb61a @@ -421269,12 +423022,18 @@ interface { symbol_id: 0x2e13b831 symbol_id: 0x57ba6430 symbol_id: 0x131272a2 + symbol_id: 0x914856be symbol_id: 0x58b605c8 symbol_id: 0xf06ef566 + symbol_id: 0xe1d2f463 symbol_id: 0x3020cd17 symbol_id: 0x25c6452e symbol_id: 0x324d8228 symbol_id: 0x3e0dea4e + symbol_id: 0x38d4e8d6 + symbol_id: 0xacb83eb1 + symbol_id: 0xa3b2084d + symbol_id: 0xc6106a7d symbol_id: 0x48573a01 symbol_id: 0x4d2108fd symbol_id: 0x7bf7b7b1 @@ -421418,6 +423177,7 @@ interface { symbol_id: 0x788eb5c1 symbol_id: 0xdc29efa5 symbol_id: 0x9928a695 + symbol_id: 0x508d9501 symbol_id: 0x7d9c9dda symbol_id: 0x2721b297 symbol_id: 0xf60ed3ec @@ -421731,6 +423491,7 @@ interface { symbol_id: 0x4f384161 symbol_id: 0x79536269 symbol_id: 0xb55db035 + symbol_id: 0xede9cf60 symbol_id: 0x4f3dccb0 symbol_id: 0xa341b4f5 symbol_id: 0x7450c7fb @@ -421769,6 +423530,7 @@ interface { symbol_id: 0x19b7aeab symbol_id: 0xfccc22f4 symbol_id: 0x50b92bc4 + symbol_id: 0x730105d4 symbol_id: 0x8c0dd14a symbol_id: 0x3480e8df symbol_id: 0x0bf91812 @@ -421971,10 +423733,17 @@ interface { symbol_id: 0x6e10178a symbol_id: 0x5d6a93ff symbol_id: 0x826ffe72 + symbol_id: 0x0746da0a symbol_id: 0x98b882af + symbol_id: 0x45ffec2b + symbol_id: 0x5b9376b0 symbol_id: 0x2bb7ad6a symbol_id: 0x4bb58367 symbol_id: 0x63762e51 + symbol_id: 0xec4fe037 + symbol_id: 0xb90d3326 + symbol_id: 0xb09b6acb + symbol_id: 0xcc28e994 symbol_id: 0x3e462ca5 symbol_id: 0x53281d0f symbol_id: 0x970aca32 @@ -421983,6 +423752,7 @@ interface { symbol_id: 0xf8889a4c symbol_id: 0x89ed643c symbol_id: 0x620f0859 + symbol_id: 0xfa4a7632 symbol_id: 0x4e412a59 symbol_id: 0xaf2bd97c symbol_id: 0x5b1dd2cc @@ -421994,6 +423764,7 @@ interface { symbol_id: 0xa2d400c7 symbol_id: 0x334adb18 symbol_id: 0xdfe1cb53 + symbol_id: 0x013afad5 symbol_id: 0x2c6a64fa symbol_id: 0x689737cf symbol_id: 0x7b6738b5 @@ -422047,6 +423818,7 @@ interface { symbol_id: 0x96bd64f2 symbol_id: 0x064eb0d1 symbol_id: 0xbf6056e5 + symbol_id: 0x2912067f symbol_id: 0x59a21b13 symbol_id: 0xaba9754d symbol_id: 0x6a9fad39 @@ -422154,6 +423926,7 @@ interface { symbol_id: 0x35280a80 symbol_id: 0x03fd01bd symbol_id: 0x7df62009 + symbol_id: 0xb698b8ae symbol_id: 0xba68a39f symbol_id: 0x62b259b4 symbol_id: 0xa511d0ea @@ -422199,6 +423972,7 @@ interface { symbol_id: 0x68c67cd0 symbol_id: 0xc10b3ddb symbol_id: 0xcd9887e8 + symbol_id: 0xb132031d symbol_id: 0xaec05601 symbol_id: 0x9ebdc6d8 symbol_id: 0x4974f847 @@ -422383,6 +424157,8 @@ interface { symbol_id: 0x6974548c symbol_id: 0xe0ea15f1 symbol_id: 0xa829435f + symbol_id: 0x021ff112 + symbol_id: 0x13ae25c6 symbol_id: 0x7be16ce2 symbol_id: 0x0967d0a1 symbol_id: 0x33edf503 @@ -422391,6 +424167,7 @@ interface { symbol_id: 0x83497546 symbol_id: 0xd661cceb symbol_id: 0x4ece0732 + symbol_id: 0x6c3e2f7c symbol_id: 0x284bec0f symbol_id: 0xb2cef8e2 symbol_id: 0xed806c73 @@ -422407,6 +424184,7 @@ interface { symbol_id: 0xf7ca54f0 symbol_id: 0xcfa933b0 symbol_id: 0xc7bb50ac + symbol_id: 0x96e969d8 symbol_id: 0xc4ac81a3 symbol_id: 0xde3137d4 symbol_id: 0x3728c158 @@ -422542,6 +424320,7 @@ interface { symbol_id: 0xf3c91dcd symbol_id: 0xfb2634da symbol_id: 0xe7caa0b7 + symbol_id: 0x2bbd1e19 symbol_id: 0x3a16ef08 symbol_id: 0x3da4fd63 symbol_id: 0xc49e9f39 @@ -422643,6 +424422,7 @@ interface { symbol_id: 0xcc386657 symbol_id: 0x529a9e72 symbol_id: 0x99d5bf98 + symbol_id: 0x11c1cd7f symbol_id: 0xb4592621 symbol_id: 0xeb0e3e9b symbol_id: 0x5f96413a @@ -422815,6 +424595,7 @@ interface { symbol_id: 0xcbabaff3 symbol_id: 0x01afa7bb symbol_id: 0x3ffae0cf + symbol_id: 0x5d10efc1 symbol_id: 0x0b4dd20d symbol_id: 0xae3ac3f6 symbol_id: 0xa7c71d5a @@ -422862,6 +424643,7 @@ interface { symbol_id: 0x40ef0583 symbol_id: 0x66974d1b symbol_id: 0x4cc18d95 + symbol_id: 0xacb09a3e symbol_id: 0xfd34f897 symbol_id: 0x6eee841a symbol_id: 0x0c2de3ab @@ -422870,6 +424652,9 @@ interface { symbol_id: 0x6590f3a5 symbol_id: 0x8e95f895 symbol_id: 0x30438a62 + symbol_id: 0xa46589d6 + symbol_id: 0x3d3dcefb + symbol_id: 0x7219254d symbol_id: 0xfb5efe2e symbol_id: 0x58687602 symbol_id: 0xe7fb597f @@ -423590,6 +425375,7 @@ interface { symbol_id: 0xdc09fb10 symbol_id: 0x5849ff8e symbol_id: 0xaf85c216 + symbol_id: 0x2570ceae symbol_id: 0xacc76406 symbol_id: 0xef2c49d1 symbol_id: 0xbbf42090 @@ -423615,8 +425401,15 @@ interface { symbol_id: 0xea7fc751 symbol_id: 0xd574e01b symbol_id: 0x9af4ba91 + symbol_id: 0x24b72fe8 + symbol_id: 0x74552293 + symbol_id: 0x79291ebd + symbol_id: 0x6ea68f58 + symbol_id: 0xbf744c76 + symbol_id: 0x3bb16099 symbol_id: 0xc46cf30e symbol_id: 0x584cd956 + symbol_id: 0x5af22a06 symbol_id: 0x3d09e223 symbol_id: 0x0db9531c symbol_id: 0xf29d7680 @@ -423626,6 +425419,7 @@ interface { symbol_id: 0x5b9410e0 symbol_id: 0x929bcf22 symbol_id: 0xdd20bb49 + symbol_id: 0xb09d980f symbol_id: 0xd0367f5d symbol_id: 0xacccfc76 symbol_id: 0x8b18825a @@ -423650,6 +425444,7 @@ interface { symbol_id: 0xaa56f7fa symbol_id: 0x36d0e118 symbol_id: 0x96e52cc0 + symbol_id: 0x5942369c symbol_id: 0xb3aa5e28 symbol_id: 0x610289ba symbol_id: 0x39d70409 @@ -423666,6 +425461,7 @@ interface { symbol_id: 0x4e8c6206 symbol_id: 0x887e1dde symbol_id: 0x180eeaeb + symbol_id: 0x73a49190 symbol_id: 0xa643ac3f symbol_id: 0x61731bd0 symbol_id: 0x6f9f10f2 @@ -423759,6 +425555,7 @@ interface { symbol_id: 0x807b9318 symbol_id: 0x15f1eb71 symbol_id: 0x7c598ee8 + symbol_id: 0x2407d2bf symbol_id: 0x0fc8c78d symbol_id: 0xe8e0ea6a symbol_id: 0xa5d58813 diff --git a/android/abi_gki_aarch64.stg.allowed_breaks b/android/abi_gki_aarch64.stg.allowed_breaks new file mode 100644 index 000000000000..2079519f0a0f --- /dev/null +++ b/android/abi_gki_aarch64.stg.allowed_breaks @@ -0,0 +1,139 @@ +# How to use this file: http://go/approve-abi-break +# ABI freeze commit: 35fe0d393f80627879e12d457ca44d0112703a68 + +type 'struct kvm_cpu_context' changed + member changed from 'struct kvm_vcpu* __hyp_running_vcpu' to 'void* __hyp_running_vcpu' + type changed from 'struct kvm_vcpu*' to 'void*' + pointed-to type changed from 'struct kvm_vcpu' to 'void' + +type 'struct xhci_hcd' changed + member 'u64 android_kabi_reserved1' was removed + member 'union { struct xhci_vendor_ops* vendor_ops; struct { u64 android_kabi_reserved1; }; union { }; }' was added + +type 'struct size_class' changed + byte size changed from 136 to 128 + member 'spinlock_t lock' was removed + 6 members ('struct list_head fullness_list[4]' .. 'struct zs_size_stat stats') changed + offset changed by -64 + +type 'struct zs_pool' changed + member 'rwlock_t migrate_lock' was removed + member 'spinlock_t lock' was added + member 'atomic_t compaction_in_progress' was added + +type 'struct zs_pool' changed + member 'atomic_t compaction_in_progress' was added + +type 'struct task_struct' changed + member 'u64 android_kabi_reserved1' was removed + member 'union { unsigned int saved_state; struct { u64 android_kabi_reserved1; }; union { }; }' was added + +type 'struct hid_device' changed + member 'u64 android_kabi_reserved1' was removed + member 'union { struct { __s32 battery_charge_status; u32 padding; }; struct { u64 android_kabi_reserved1; }; union { }; }' was added + +type 'struct trace_buffer' changed + byte size changed from 224 to 216 + member 'atomic_t resizing' was added + 2 members ('bool time_stamp_abs' .. 'struct ring_buffer_ext_cb* ext_cb') changed + offset changed by -64 + +type 'struct fscrypt_policy_v2' changed + member '__u8 log2_data_unit_size' was added + member changed from '__u8 __reserved[4]' to '__u8 __reserved[3]' + offset changed from 32 to 40 + type changed from '__u8[4]' to '__u8[3]' + number of elements changed from 4 to 3 + +type 'struct fscrypt_info' changed + member 'u8 ci_data_unit_bits' was added + member 'u8 ci_data_units_per_block_bits' was added + +type 'struct pkvm_module_ops' changed + member 'u64 android_kabi_reserved1' was removed + member 'union { int(* host_stage2_mod_prot_range)(u64, enum kvm_pgtable_prot, u64); struct { u64 android_kabi_reserved1; }; union { }; }' was added + +type 'struct perf_event' changed + member 'unsigned int group_generation' was added + +type 'struct tcpm_port' changed + byte size changed from 12536 to 12552 + member 'struct usb_power_delivery* pd' was removed + member 'struct usb_power_delivery** pds' was added + member 'struct pd_data** pd_list' was added + 5 members ('struct usb_power_delivery_capabilities* port_source_caps' .. 'struct usb_power_delivery_capabilities* partner_sink_caps') changed + offset changed by 64 + member 'struct usb_power_delivery* selected_pd' was added + 5 members ('u32 sink_request' .. 'unsigned int nr_sink_caps') changed + offset changed by 128 + member 'unsigned int pd_count' was added + 14 members ('u32 src_pdo[7]' .. 'u32 supply_voltage') changed + offset changed by 160 + 32 members ('struct power_supply* psy' .. 'u8* logbuffer[1024]') changed + offset changed by 128 + +type 'struct ipv6_devconf' changed + member 'u64 android_kabi_reserved1' was removed + member 'union { struct { __s32 accept_ra_min_lft; u32 padding; }; struct { u64 android_kabi_reserved1; }; union { }; }' was added + +1 variable symbol(s) removed + 'struct tracepoint __tracepoint_android_vh_binder_detect_low_async_space_locked' + +1 function symbol(s) removed + 'int __traceiter_android_vh_binder_detect_low_async_space_locked(void*, int, size_t*, int, bool*)' + +type 'struct queue_limits' changed + member 'bool sub_page_limits' was added + +type 'struct prefix_info' changed + member '__u8 reserved:6' was removed + member '__u8 autoconf:1' was removed + member '__u8 onlink:1' was removed + member 'union { __u8 flags; struct { __u8 reserved:6; __u8 autoconf:1; __u8 onlink:1; }; }' was added + +type 'struct userfaultfd_ctx' changed + byte size changed from 128 to 208 + member 'struct rw_semaphore map_changing_lock' was added + member 'atomic_t mmap_changing' changed + offset changed by 544 + member 'struct mm_struct* mm' changed + offset changed by 576 + member 'u64 android_kabi_reserved1' was added + +type 'struct rb_irq_work' changed + byte size changed from 96 to 88 + member 'long wait_index' was removed + 3 members ('bool waiters_pending' .. 'bool wakeup_full') changed + offset changed by -64 + +type 'struct ring_buffer_per_cpu' changed + byte size changed from 496 to 488 + +type 'struct trace_buffer' changed + byte size changed from 224 to 216 + 2 members ('bool time_stamp_abs' .. 'struct ring_buffer_ext_cb* ext_cb') changed + offset changed by -64 + +type 'struct sk_buff' changed + member 'union { struct sock* sk; int ip_defrag_offset; }' was removed + member 'struct sock* sk' was added + +type 'struct ufs_clk_scaling' changed + member 'bool suspend_on_no_request' was added + +type 'struct clk_core' changed + byte size changed from 248 to 264 + member 'struct hlist_node rpm_node' was added + 30 members ('struct device_node* of_node' .. 'struct kref ref') changed + offset changed by 128 + +type 'enum binder_work_type' changed + enumerator 'BINDER_WORK_FROZEN_BINDER' (9) was added + ... 1 other enumerator(s) added + +type 'struct geni_wrapper' changed + byte size changed from 48 to 56 + member 'struct clk_bulk_data ahb_clks[2]' was removed + member 'struct clk_bulk_data clks[2]' was added + member 'unsigned int num_clks' was added + diff --git a/android/abi_gki_aarch64_bcmstb b/android/abi_gki_aarch64_bcmstb index eeebe6121c52..1bc099ecff84 100644 --- a/android/abi_gki_aarch64_bcmstb +++ b/android/abi_gki_aarch64_bcmstb @@ -1760,6 +1760,7 @@ # required by nexusmem.ko restore_online_page_callback + __alloc_pages_bulk # required by nexus.ko recalc_sigpending diff --git a/android/abi_gki_aarch64_galaxy b/android/abi_gki_aarch64_galaxy index 4dfd51b49f67..041e1433b520 100644 --- a/android/abi_gki_aarch64_galaxy +++ b/android/abi_gki_aarch64_galaxy @@ -288,6 +288,7 @@ skb_copy_ubufs smpboot_register_percpu_thread smpboot_unregister_percpu_thread + snd_card_ref snd_soc_add_card_controls snd_soc_find_dai snd_soc_info_volsw_sx diff --git a/android/abi_gki_aarch64_honor b/android/abi_gki_aarch64_honor index 9b51d92c1c1b..c0bb4f2b0064 100644 --- a/android/abi_gki_aarch64_honor +++ b/android/abi_gki_aarch64_honor @@ -11,6 +11,7 @@ __tracepoint_android_vh_should_continue_reclaim __tracepoint_android_vh_tune_fault_around_bytes __tracepoint_android_vh_should_memcg_bypass + __tracepoint_android_vh_io_statistics __traceiter_android_vh_get_page_wmark __traceiter_android_vh_page_add_new_anon_rmap __traceiter_android_vh_do_shrink_slab @@ -27,12 +28,27 @@ __traceiter_android_vh_should_continue_reclaim __traceiter_android_vh_tune_fault_around_bytes __traceiter_android_vh_should_memcg_bypass + __traceiter_android_vh_io_statistics + __traceiter_rpm_idle + __tracepoint_rpm_idle + __traceiter_rpm_suspend + __tracepoint_rpm_suspend + __traceiter_rpm_resume + __tracepoint_rpm_resume + __traceiter_rpm_return_int + __tracepoint_rpm_return_int binder_alloc_copy_from_buffer kfree __kmalloc mod_node_page_state page_cache_sync_ra proc_create + arch_vma_name + __pmd_trans_huge_lock + anon_vma_name + vm_normal_page + walk_page_range + pmd_clear_bad profile_event_register profile_event_unregister drop_super @@ -48,7 +64,14 @@ udp4_lib_lookup udp6_lib_lookup next_arg + pm_wakeup_irq __tracepoint_android_vh_dc_send_copy __traceiter_android_vh_dc_send_copy __tracepoint_android_vh_dc_receive __traceiter_android_vh_dc_receive + __tracepoint_android_vh_slab_alloc_node + __traceiter_android_vh_slab_alloc_node + __tracepoint_android_vh_slab_free + __traceiter_android_vh_slab_free + __traceiter_android_rvh_hw_protection_shutdown + __tracepoint_android_rvh_hw_protection_shutdown diff --git a/android/abi_gki_aarch64_mtk b/android/abi_gki_aarch64_mtk index 1f73ea577295..d4be95cc43af 100644 --- a/android/abi_gki_aarch64_mtk +++ b/android/abi_gki_aarch64_mtk @@ -20,6 +20,7 @@ alloc_contig_range alloc_etherdev_mqs alloc_io_pgtable_ops + alloc_iova_fast alloc_netdev_mqs __alloc_pages alloc_pages_exact @@ -83,6 +84,7 @@ bitmap_release_region __bitmap_set __bitmap_subset + bitmap_to_arr32 __bitmap_weight __bitmap_xor bitmap_zalloc @@ -103,6 +105,10 @@ blocking_notifier_call_chain blocking_notifier_chain_register blocking_notifier_chain_unregister + bpf_dispatcher_xdp_func + bpf_master_redirect_enabled_key + bpf_prog_put + bpf_stats_enabled_key bpf_trace_run1 bpf_trace_run10 bpf_trace_run11 @@ -115,6 +121,7 @@ bpf_trace_run7 bpf_trace_run8 bpf_trace_run9 + bpf_warn_invalid_xdp_action build_skb bus_find_device bus_for_each_dev @@ -414,6 +421,7 @@ device_get_child_node_count device_get_match_data device_get_next_child_node + device_get_phy_mode device_initialize device_link_add device_link_remove @@ -483,6 +491,9 @@ devm_devfreq_remove_device devm_devfreq_unregister_notifier devm_devfreq_unregister_opp_notifier + devm_drm_bridge_add + devm_drm_of_get_bridge + devm_drm_panel_bridge_add devm_extcon_dev_allocate devm_extcon_dev_register devm_extcon_register_notifier @@ -516,6 +527,7 @@ devm_mbox_controller_register devm_mdiobus_alloc_size devm_memremap + devm_memremap_pages devm_mfd_add_devices devm_nvmem_cell_get devm_nvmem_device_get @@ -570,6 +582,7 @@ devm_watchdog_register_device dev_nit_active _dev_notice + dev_open dev_pm_clear_wake_irq dev_pm_domain_attach_by_id dev_pm_domain_attach_by_name @@ -631,6 +644,7 @@ dma_async_tx_descriptor_init dma_buf_attach dma_buf_begin_cpu_access + dma_buf_begin_cpu_access_partial dma_buf_detach dma_buf_end_cpu_access dma_buf_end_cpu_access_partial @@ -639,13 +653,16 @@ dma_buf_get dma_buf_get_each dma_buf_map_attachment + dma_buf_map_attachment_unlocked dma_buf_mmap dmabuf_page_pool_alloc dmabuf_page_pool_create dmabuf_page_pool_destroy dmabuf_page_pool_free + dmabuf_page_pool_get_size dma_buf_put dma_buf_unmap_attachment + dma_buf_unmap_attachment_unlocked dma_buf_vmap dma_buf_vunmap dma_contiguous_default_area @@ -719,6 +736,8 @@ down_write_killable d_path dput + dql_completed + dql_reset drain_workqueue driver_attach driver_create_file @@ -729,11 +748,16 @@ drm_add_edid_modes drm_add_modes_noedid drm_atomic_add_affected_connectors + drm_atomic_bridge_chain_post_disable + drm_atomic_bridge_chain_pre_enable drm_atomic_get_connector_state drm_atomic_get_crtc_state drm_atomic_get_new_private_obj_state drm_atomic_get_old_private_obj_state drm_atomic_get_private_obj_state + drm_atomic_helper_bridge_destroy_state + drm_atomic_helper_bridge_duplicate_state + drm_atomic_helper_bridge_reset drm_atomic_helper_check drm_atomic_helper_check_plane_state drm_atomic_helper_cleanup_planes @@ -769,7 +793,10 @@ drm_atomic_state_default_release __drm_atomic_state_free drm_atomic_state_init + drm_bridge_add drm_bridge_attach + drm_bridge_connector_init + drm_bridge_remove drm_calc_timestamping_constants drm_compat_ioctl drm_connector_attach_encoder @@ -783,6 +810,7 @@ drm_crtc_cleanup __drm_crtc_commit_free drm_crtc_commit_wait + drm_crtc_from_index drm_crtc_handle_vblank drm_crtc_init_with_planes drm_crtc_send_vblank_event @@ -800,7 +828,9 @@ drm_dev_put drm_dev_register drm_dev_unregister + drm_display_info_set_bus_formats drm_display_mode_from_cea_vic + drm_display_mode_from_videomode drm_display_mode_to_videomode drm_edid_duplicate drm_edid_get_monitor_name @@ -846,6 +876,7 @@ drm_mode_config_cleanup drm_mode_config_reset drm_mode_copy + drm_mode_create drm_mode_crtc_set_gamma_size drm_mode_duplicate drm_mode_equal @@ -860,6 +891,7 @@ drm_mode_vrefresh drm_object_attach_property drm_object_property_set_value + drm_of_find_panel_or_bridge drm_open drm_panel_add drm_panel_disable @@ -884,6 +916,7 @@ drm_property_lookup_blob drm_read drm_release + drm_simple_encoder_init drm_universal_plane_init drm_vblank_init drm_writeback_connector_init @@ -949,6 +982,11 @@ firmware_request_nowarn fixed_phy_register fixed_phy_unregister + flow_block_cb_setup_simple + flow_rule_match_basic + flow_rule_match_ipv4_addrs + flow_rule_match_ports + flow_rule_match_vlan flush_dcache_page flush_delayed_fput flush_delayed_work @@ -970,6 +1008,7 @@ frame_vector_to_pfns free_contig_range free_io_pgtable_ops + free_iova_fast free_irq free_netdev __free_pages @@ -992,7 +1031,9 @@ fsg_config_from_params fwnode_device_is_available fwnode_get_name + fwnode_get_named_child_node fwnode_get_next_available_child_node + fwnode_get_phy_node fwnode_graph_get_next_endpoint fwnode_graph_get_port_parent fwnode_graph_get_remote_endpoint @@ -1047,6 +1088,7 @@ get_cpu_idle_time_us get_cpu_iowait_time_us get_device + get_device_system_crosststamp __get_free_pages get_governor_parent_kobj get_kernel_pages @@ -1109,6 +1151,7 @@ handle_simple_irq handle_sysrq have_governor_per_policy + hci_cmd_sync_status hex2bin hex_asc hex_asc_upper @@ -1221,8 +1264,10 @@ init_uts_ns init_wait_entry __init_waitqueue_head + input_alloc_absinfo input_allocate_device input_close_device + input_copy_abs input_event input_free_device input_mt_destroy_slots @@ -1491,12 +1536,15 @@ mdiobus_alloc_size mdiobus_free mdiobus_get_phy + mdiobus_modify_changed __mdiobus_read mdiobus_read __mdiobus_register mdiobus_unregister __mdiobus_write mdiobus_write + mdio_device_create + mdio_device_free media_create_ancillary_link media_create_intf_link media_create_pad_link @@ -1522,6 +1570,7 @@ memchr_inv memcmp memcpy + memcpy_and_pad __memcpy_fromio __memcpy_toio memdup_user @@ -1583,6 +1632,7 @@ mmc_send_tuning mmc_set_data_timeout mmc_switch + mmc_wait_for_cmd mmc_wait_for_req __mmdrop mmput @@ -1620,13 +1670,16 @@ nd_tbl neigh_destroy neigh_lookup + netdev_alert __netdev_alloc_frag_align __netdev_alloc_skb netdev_err netdev_info netdev_name_in_use netdev_notice + netdev_pick_tx netdev_printk + netdev_rss_key_fill netdev_set_default_ethtool_ops netdev_update_features netdev_upper_dev_link @@ -1642,6 +1695,9 @@ netif_receive_skb netif_receive_skb_list netif_rx + netif_schedule_queue + netif_set_real_num_rx_queues + netif_set_real_num_tx_queues netif_set_tso_max_size netif_stacked_transfer_operstate netif_tx_lock @@ -1737,6 +1793,7 @@ __of_get_address of_get_child_by_name of_get_cpu_node + of_get_display_timing of_get_mac_address of_get_named_gpio_flags of_get_next_available_child @@ -1744,6 +1801,7 @@ of_get_next_parent of_get_parent of_get_pci_domain_nr + of_get_phy_mode of_get_property of_get_regulator_init_data of_graph_get_next_endpoint @@ -1767,7 +1825,9 @@ of_pci_get_max_link_speed of_phandle_iterator_init of_phandle_iterator_next + of_phy_find_device of_phy_get_and_connect + of_phy_is_fixed_link of_phy_simple_xlate of_platform_depopulate of_platform_device_create @@ -1804,6 +1864,7 @@ page_pool_create page_pool_destroy page_pool_put_defragged_page + page_pool_release_page panic panic_notifier_list param_array_ops @@ -1899,6 +1960,7 @@ perf_trace_run_bpf_submit pfn_is_map_memory phy_attached_info + phy_configure phy_connect phy_connect_direct phy_create_lookup @@ -1918,6 +1980,7 @@ phy_ethtool_set_wol phy_exit phy_find_first + phy_gbit_features phy_get phy_get_c45_ids phy_get_pause @@ -1928,10 +1991,25 @@ phylink_create phylink_destroy phylink_disconnect_phy + phylink_ethtool_get_eee phylink_ethtool_get_pauseparam + phylink_ethtool_get_wol + phylink_ethtool_ksettings_get + phylink_ethtool_ksettings_set + phylink_ethtool_nway_reset + phylink_ethtool_set_eee phylink_ethtool_set_pauseparam + phylink_ethtool_set_wol + phylink_expects_phy + phylink_fwnode_phy_connect phylink_generic_validate + phylink_get_eee_err + phylink_mii_c22_pcs_decode_state + phylink_mii_c22_pcs_encode_advertisement + phylink_mii_ioctl phylink_resume + phylink_speed_down + phylink_speed_up phylink_start phylink_stop phylink_suspend @@ -1943,6 +2021,7 @@ phy_read_mmd phy_register_fixup_for_uid phy_remove_link_mode + phy_reset phy_restore_page phy_save_page phy_set_mode_ext @@ -2183,6 +2262,7 @@ regmap_bulk_write regmap_field_read regmap_field_update_bits_base + regmap_get_val_bytes regmap_irq_get_domain regmap_multi_reg_write regmap_raw_read @@ -2284,6 +2364,7 @@ rproc_alloc rproc_boot rproc_del + rproc_detach rproc_free rproc_get_by_phandle rproc_put @@ -2434,6 +2515,7 @@ simple_attr_write simple_open simple_read_from_buffer + simple_strtoul simple_write_to_buffer single_open single_open_size @@ -2488,6 +2570,7 @@ snd_ctl_boolean_mono_info snd_jack_set_key snd_pcm_format_physical_width + snd_pcm_format_set_silence snd_pcm_format_width snd_pcm_hw_constraint_integer snd_pcm_hw_constraint_minmax @@ -2513,6 +2596,7 @@ snd_soc_dapm_add_routes snd_soc_dapm_disable_pin snd_soc_dapm_enable_pin + snd_soc_dapm_force_enable_pin snd_soc_dapm_get_enum_double snd_soc_dapm_get_pin_switch snd_soc_dapm_get_volsw @@ -2552,6 +2636,7 @@ sock_common_getsockopt sock_common_recvmsg sock_common_setsockopt + sock_copy_user_timeval __sock_create sock_create_kern sock_diag_register @@ -2559,6 +2644,7 @@ sock_diag_unregister sock_efree sockfd_lookup + sock_get_timeout sock_gettstamp sock_i_ino sock_init_data @@ -2592,15 +2678,18 @@ spi_add_device __spi_alloc_controller spi_alloc_device + spi_async spi_bus_type spi_controller_resume spi_controller_suspend spi_delay_to_ns spi_finalize_current_transfer + spi_get_device_id spi_mem_default_supports_op __spi_register_driver spi_setup spi_sync + spi_write_then_read split_page spmi_controller_add spmi_controller_alloc @@ -2619,6 +2708,7 @@ __stack_chk_fail stack_trace_print stack_trace_save + stack_trace_save_tsk static_key_slow_dec static_key_slow_inc stop_one_cpu @@ -2672,6 +2762,7 @@ sysfs_create_group sysfs_create_link sysfs_emit + __sysfs_match_string sysfs_merge_group sysfs_notify sysfs_remove_bin_file @@ -2686,6 +2777,7 @@ system_highpri_wq system_long_wq system_power_efficient_wq + system_state system_unbound_wq system_wq sys_tz @@ -2710,6 +2802,7 @@ thread_group_cputime_adjusted tick_nohz_get_sleep_length time64_to_tm + timecounter_cyc2time timecounter_init timecounter_read timer_of_init @@ -2718,6 +2811,8 @@ topology_clear_scale_freq_source topology_update_thermal_pressure _totalram_pages + touchscreen_parse_properties + touchscreen_report_pos _trace_android_vh_record_pcpu_rwsem_starttime _trace_android_vh_record_pcpu_rwsem_time_early __trace_bprintk @@ -2834,6 +2929,7 @@ __traceiter_pelt_se_tp __traceiter_sched_update_nr_running_tp __traceiter_task_newtask + __traceiter_xdp_exception trace_output_call __tracepoint_android_rvh_after_dequeue_task __tracepoint_android_rvh_after_enqueue_task @@ -2946,6 +3042,7 @@ __tracepoint_sched_update_nr_running_tp tracepoint_srcu __tracepoint_task_newtask + __tracepoint_xdp_exception trace_print_array_seq trace_print_flags_seq trace_print_hex_seq @@ -2960,6 +3057,7 @@ try_module_get try_wait_for_completion __tty_alloc_driver + tty_buffer_space_avail tty_chars_in_buffer tty_driver_flush_buffer tty_driver_kref_put @@ -3000,6 +3098,9 @@ tty_vhangup tty_wakeup tty_write_room + tun_get_socket + tun_get_tx_ring + tun_ptr_free typec_get_drvdata typec_mux_get_drvdata typec_mux_put @@ -3211,6 +3312,7 @@ usb_role_switch_unregister usb_root_hub_lost_power usb_scuttle_anchored_urbs + usb_set_configuration usb_set_interface usb_show_dynids usb_speed_string @@ -3351,6 +3453,7 @@ video_device_release video_device_release_empty video_ioctl2 + videomode_from_timing __video_register_device video_unregister_device virtqueue_add_inbuf @@ -3368,6 +3471,7 @@ vlan_uses_dev vlan_vid_add vlan_vid_del + __vmalloc vmalloc vmalloc_to_page vmalloc_to_pfn @@ -3386,6 +3490,16 @@ vring_new_virtqueue vscnprintf vsnprintf + vsock_addr_bound + vsock_addr_cast + vsock_addr_equals_addr + vsock_addr_init + vsock_addr_unbind + vsock_addr_validate + vsock_core_register + vsock_core_unregister + vsock_deliver_tap + vsock_for_each_connected_socket vsprintf vunmap vzalloc @@ -3427,6 +3541,34 @@ ww_mutex_unlock __xa_alloc xa_erase + xdp_convert_zc_to_xdp_frame + xdp_do_flush + xdp_do_redirect + xdp_master_redirect + xdp_return_frame + xdp_return_frame_rx_napi + xdp_rxq_info_is_reg + __xdp_rxq_info_reg + xdp_rxq_info_reg_mem_model + xdp_rxq_info_unreg + xdp_rxq_info_unreg_mem_model + xdp_warn + xp_alloc + xp_dma_map + xp_dma_sync_for_cpu_slow + xp_dma_sync_for_device_slow + xp_dma_unmap + xp_free + xp_raw_get_dma + xp_set_rxq_info + xsk_clear_rx_need_wakeup + xsk_get_pool_from_qid + xsk_set_rx_need_wakeup + xsk_set_tx_need_wakeup + xsk_tx_completed + xsk_tx_peek_desc + xsk_tx_release + xsk_uses_need_wakeup zlib_deflate zlib_deflateEnd zlib_deflateInit2 diff --git a/android/abi_gki_aarch64_oplus b/android/abi_gki_aarch64_oplus index 7d87ba364e9f..655013a615d1 100644 --- a/android/abi_gki_aarch64_oplus +++ b/android/abi_gki_aarch64_oplus @@ -126,6 +126,7 @@ tcf_exts_dump_stats tcf_exts_validate tcf_queue_work + tcp_cong_avoid_ai __traceiter_android_rvh_post_init_entity_util_avg __traceiter_android_rvh_rtmutex_force_update __traceiter_android_vh_account_process_tick_gran diff --git a/android/abi_gki_aarch64_paragon b/android/abi_gki_aarch64_paragon new file mode 100644 index 000000000000..bd864ede00ac --- /dev/null +++ b/android/abi_gki_aarch64_paragon @@ -0,0 +1,21 @@ +[abi_symbol_list] + add_to_page_cache_lru + alloc_buffer_head + blkdev_issue_zeroout + __cond_resched_lock + d_rehash + filemap_fdatawrite_wbc + __find_get_block + free_buffer_head + __posix_acl_create + posix_acl_equiv_mode + posix_acl_from_xattr + posix_acl_to_xattr + posix_acl_valid + set_cached_acl + shrink_dcache_sb + sync_inodes_sb + try_to_free_buffers + wait_for_completion_io + write_dirty_buffer + yield diff --git a/android/abi_gki_aarch64_pixel b/android/abi_gki_aarch64_pixel index 3b32e905b1b2..3e87a62e12b5 100644 --- a/android/abi_gki_aarch64_pixel +++ b/android/abi_gki_aarch64_pixel @@ -1253,6 +1253,14 @@ kfree_skb_reason kill_fasync kimage_voffset + klist_add_head + klist_add_tail + klist_init + klist_iter_exit + klist_iter_init + klist_next + klist_node_attached + klist_remove __kmalloc kmalloc_caches kmalloc_large @@ -1595,6 +1603,7 @@ param_set_copystring param_set_int param_set_uint + param_set_uint_minmax pci_alloc_irq_vectors_affinity pci_assign_resource pci_clear_master @@ -1894,6 +1903,7 @@ regulator_set_load regulator_set_voltage regulator_set_voltage_sel_regmap + regulator_sync_voltage regulator_unregister release_firmware __release_region @@ -2387,8 +2397,11 @@ __traceiter_android_rvh_usb_dev_suspend __traceiter_android_rvh_util_est_update __traceiter_android_rvh_util_fits_cpu + __traceiter_android_rvh_vmscan_kswapd_done + __traceiter_android_rvh_vmscan_kswapd_wake __traceiter_android_vh_arch_set_freq_scale __traceiter_android_vh_audio_usb_offload_connect + __traceiter_android_vh_binder_proc_transaction_finish __traceiter_android_vh_binder_restore_priority __traceiter_android_vh_binder_set_priority __traceiter_android_vh_cpu_idle_enter @@ -2415,6 +2428,7 @@ __traceiter_android_vh_sound_usb_support_cpu_suspend __traceiter_android_vh_sysrq_crash __traceiter_android_vh_timerfd_create + __traceiter_android_vh_tune_swappiness __traceiter_android_vh_typec_store_partner_src_caps __traceiter_android_vh_typec_tcpci_override_toggling __traceiter_android_vh_typec_tcpm_get_timer @@ -2522,8 +2536,11 @@ __tracepoint_android_rvh_usb_dev_suspend __tracepoint_android_rvh_util_est_update __tracepoint_android_rvh_util_fits_cpu + __tracepoint_android_rvh_vmscan_kswapd_done + __tracepoint_android_rvh_vmscan_kswapd_wake __tracepoint_android_vh_arch_set_freq_scale __tracepoint_android_vh_audio_usb_offload_connect + __tracepoint_android_vh_binder_proc_transaction_finish __tracepoint_android_vh_binder_restore_priority __tracepoint_android_vh_binder_set_priority __tracepoint_android_vh_cpu_idle_enter @@ -2550,6 +2567,7 @@ __tracepoint_android_vh_sound_usb_support_cpu_suspend __tracepoint_android_vh_sysrq_crash __tracepoint_android_vh_timerfd_create + __tracepoint_android_vh_tune_swappiness __tracepoint_android_vh_typec_store_partner_src_caps __tracepoint_android_vh_typec_tcpci_override_toggling __tracepoint_android_vh_typec_tcpm_get_timer diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index b8abc36484cf..f20ef27ff873 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -72,6 +72,8 @@ bdev_end_io_acct bdev_start_io_acct bin2hex + bio_associate_blkg + bio_chain bio_endio bio_end_io_acct_remapped bio_split @@ -82,6 +84,7 @@ __bitmap_clear __bitmap_complement __bitmap_equal + bitmap_find_free_region bitmap_find_next_zero_area_off bitmap_free __bitmap_intersects @@ -495,6 +498,7 @@ dec_node_page_state dec_zone_page_state default_llseek + default_qdisc_ops default_wake_function deferred_free delayed_work_timer_fn @@ -503,6 +507,7 @@ del_timer_sync desc_to_gpio destroy_workqueue + dev_activate dev_add_pack dev_addr_mod dev_alloc_name @@ -513,6 +518,7 @@ dev_coredumpm dev_coredumpv _dev_crit + dev_deactivate dev_driver_string _dev_err dev_err_probe @@ -538,6 +544,7 @@ dev_get_regmap dev_get_stats dev_get_tstats64 + dev_graft_qdisc device_add device_add_disk device_add_groups @@ -609,6 +616,7 @@ devm_gpiochip_add_data_with_key devm_gpiod_get devm_gpiod_get_optional + devm_gpiod_put devm_gpio_request_one devm_hwspin_lock_register devm_i2c_new_dummy_device @@ -629,6 +637,7 @@ devm_led_classdev_flash_register_ext devm_led_classdev_register_ext devm_mbox_controller_register + devm_memremap devm_mipi_dsi_attach devm_mipi_dsi_device_register_full devm_nvmem_cell_get @@ -1175,6 +1184,7 @@ freq_qos_add_request freq_qos_remove_request freq_qos_update_request + fs_bio_set fsync_bdev ftrace_dump fwnode_find_reference @@ -1219,13 +1229,16 @@ genphy_check_and_restart_aneg __genphy_config_aneg genphy_read_abilities + genphy_read_lpa genphy_read_mmd_unsupported genphy_read_status genphy_read_status_fixed genphy_restart_aneg genphy_resume + genphy_setup_forced genphy_soft_reset genphy_suspend + genphy_update_link genphy_write_mmd_unsupported gen_pool_add_owner gen_pool_alloc_algo_owner @@ -1282,6 +1295,11 @@ gic_v3_cpu_init gic_v3_dist_init gic_v3_dist_wait_for_rwp + gnet_stats_add_basic + gnet_stats_add_queue + gnet_stats_basic_sync_init + gnet_stats_copy_basic + gnet_stats_copy_queue gov_attr_set_init gov_attr_set_put governor_sysfs_ops @@ -1572,6 +1590,7 @@ iommu_device_register iommu_device_sysfs_add iommu_device_sysfs_remove + iommu_device_unlink iommu_device_unregister iommu_dma_get_resv_regions iommu_domain_alloc @@ -1995,6 +2014,7 @@ module_layout module_put __module_put_and_kthread_exit + mq_change_real_num_tx __msecs_to_jiffies msi_first_desc msi_get_virq @@ -2042,6 +2062,7 @@ netdev_rx_handler_register netdev_rx_handler_unregister netdev_set_default_ethtool_ops + netdev_txq_to_tc netdev_update_features netdev_upper_dev_link netdev_upper_dev_unlink @@ -2117,6 +2138,7 @@ __nlmsg_put nonseekable_open noop_llseek + noop_qdisc nr_cpu_ids nr_ipi_get nr_irqs @@ -2139,6 +2161,7 @@ of_clk_add_hw_provider of_clk_add_provider of_clk_del_provider + of_clk_get of_clk_get_from_provider of_clk_get_parent_name of_clk_hw_simple_get @@ -2175,6 +2198,7 @@ of_genpd_del_provider __of_get_address of_get_child_by_name + of_get_compatible_child of_get_cpu_node of_get_mac_address of_get_named_gpio_flags @@ -2182,6 +2206,7 @@ of_get_next_child of_get_next_parent of_get_parent + of_get_phy_mode of_get_property of_get_regulator_init_data of_get_required_opp_performance_state @@ -2235,6 +2260,7 @@ of_reserved_mem_device_init_by_idx of_reserved_mem_device_release of_reserved_mem_lookup + __of_reset_control_get of_root of_thermal_get_ntrips of_thermal_get_trip_points @@ -2347,6 +2373,9 @@ perf_pmu_unregister perf_trace_buf_alloc perf_trace_run_bpf_submit + pfifo_fast_ops + pfifo_qdisc_ops + pfn_is_map_memory phy_attached_info phy_calibrate phy_config_aneg @@ -2356,6 +2385,7 @@ phy_drivers_register phy_drivers_unregister phy_error + phy_ethtool_get_eee phy_ethtool_get_wol phy_ethtool_set_wol phy_exit @@ -2395,19 +2425,32 @@ phylink_stop phylink_suspend phy_mac_interrupt + __phy_modify phy_modify + phy_modify_changed phy_modify_mmd phy_modify_mmd_changed + phy_modify_paged + phy_modify_paged_changed phy_power_off phy_power_on phy_read_mmd + phy_read_paged phy_resolve_aneg_linkmode + phy_resolve_aneg_pause phy_restart_aneg + phy_restore_page + phy_save_page + phy_select_page phy_set_max_speed phy_set_mode_ext + phy_sfp_attach + phy_sfp_detach + phy_sfp_probe phy_suspend phy_trigger_machine phy_write_mmd + phy_write_paged pick_highest_pushable_task pick_migrate_task pid_nr_ns @@ -2573,6 +2616,15 @@ qcom_smem_state_register qcom_smem_state_unregister qcom_smem_state_update_bits + qdisc_create_dflt + qdisc_hash_add + qdisc_put + qdisc_reset + qdisc_tree_reduce_backlog + qdisc_watchdog_cancel + qdisc_watchdog_init + qdisc_watchdog_init_clockid + qdisc_watchdog_schedule_range_ns queue_delayed_work_on queue_work_on radix_tree_delete @@ -2765,6 +2817,7 @@ reset_control_acquire reset_control_assert reset_control_deassert + reset_control_put reset_control_release reset_control_reset return_address @@ -2832,6 +2885,7 @@ rt_mutex_trylock rt_mutex_unlock rtnl_is_locked + rtnl_kfree_skbs rtnl_link_register rtnl_link_unregister rtnl_lock @@ -3121,6 +3175,7 @@ snd_usb_endpoint_prepare snd_usb_power_domain_set snprintf + soc_device_match soc_device_register soc_device_unregister sock_alloc_send_pskb @@ -3129,6 +3184,7 @@ sock_common_recvmsg sock_common_setsockopt __sock_create + sock_create sock_create_kern sock_diag_register sock_diag_save_cookie @@ -3153,6 +3209,7 @@ sock_no_sendpage sock_no_shutdown sock_no_socketpair + sock_queue_err_skb __sock_queue_rcv_skb sock_queue_rcv_skb_reason __sock_recv_cmsgs @@ -3239,6 +3296,7 @@ strscpy_pad strsep strstr + submit_bio __sw_hweight16 __sw_hweight32 __sw_hweight64 diff --git a/android/abi_gki_aarch64_rockchip b/android/abi_gki_aarch64_rockchip index 77384550cdd7..69abf52bd41b 100644 --- a/android/abi_gki_aarch64_rockchip +++ b/android/abi_gki_aarch64_rockchip @@ -2461,7 +2461,10 @@ devm_of_phy_get_by_index driver_find_device drm_aperture_remove_conflicting_framebuffers + drm_atomic_add_encoder_bridges + drm_atomic_bridge_chain_check drm_atomic_commit + drm_atomic_get_bridge_state drm_atomic_get_plane_state drm_atomic_helper_check drm_atomic_helper_check_plane_state @@ -3034,3 +3037,16 @@ drm_edid_read_ddc drm_edid_raw drm_edid_connector_update + +# required by 8250_dw.ko + serial8250_em485_supported + serial8250_em485_start_tx + serial8250_em485_stop_tx + serial8250_em485_config + serial8250_do_set_divisor + serial8250_do_set_ldisc + serial8250_update_uartclk + serial8250_clear_and_reinit_fifos + +# required by pl2303.ko + tty_termios_hw_change diff --git a/android/abi_gki_aarch64_transsion b/android/abi_gki_aarch64_transsion index 365b484de70e..6980e845e6f4 100644 --- a/android/abi_gki_aarch64_transsion +++ b/android/abi_gki_aarch64_transsion @@ -70,3 +70,13 @@ register_tracepoint_module_notifier scsi_register_driver trace_seq_puts + +# required for failure diagnostics + __traceiter_android_vh_mmc_blk_reset + __traceiter_android_vh_mmc_attach_sd + __traceiter_android_vh_sdhci_get_cd + __traceiter_android_vh_mmc_gpio_cd_irqt + __tracepoint_android_vh_mmc_blk_reset + __tracepoint_android_vh_mmc_attach_sd + __tracepoint_android_vh_sdhci_get_cd + __tracepoint_android_vh_mmc_gpio_cd_irqt diff --git a/android/abi_gki_protected_exports_aarch64 b/android/abi_gki_protected_exports_aarch64 index b6c36d7a9e7c..919bb5765e6e 100644 --- a/android/abi_gki_protected_exports_aarch64 +++ b/android/abi_gki_protected_exports_aarch64 @@ -25,6 +25,7 @@ bt_procfs_init bt_sock_alloc bt_sock_ioctl bt_sock_link +bt_sock_linked bt_sock_poll bt_sock_reclassify_lock bt_sock_recvmsg @@ -97,6 +98,7 @@ hci_alloc_dev_priv hci_cmd_sync hci_cmd_sync_cancel hci_cmd_sync_queue +hci_cmd_sync_status hci_cmd_sync_submit hci_conn_check_secure hci_conn_security diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index 1d6b7015c013..99fe0c1c0815 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -69,6 +69,7 @@ CONFIG_CMDLINE="console=ttynull stack_depot_disable=on cgroup_disable=pressure k CONFIG_CMDLINE_EXTEND=y # CONFIG_DMI is not set CONFIG_HIBERNATION=y +CONFIG_PM_USERSPACE_AUTOSLEEP=y CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS_LIMIT=0 # CONFIG_PM_WAKELOCKS_GC is not set @@ -341,6 +342,7 @@ CONFIG_DM_SNAPSHOT=y CONFIG_DM_UEVENT=y CONFIG_DM_VERITY=y CONFIG_DM_VERITY_FEC=y +CONFIG_DM_BOW=y CONFIG_NETDEVICES=y CONFIG_DUMMY=y CONFIG_WIREGUARD=y diff --git a/arch/arm64/include/asm/kvm_pkvm.h b/arch/arm64/include/asm/kvm_pkvm.h index 3077c2514a6d..54d71f3d4f7c 100644 --- a/arch/arm64/include/asm/kvm_pkvm.h +++ b/arch/arm64/include/asm/kvm_pkvm.h @@ -110,12 +110,14 @@ void pkvm_host_reclaim_page(struct kvm *host_kvm, phys_addr_t ipa); * - Distinction between Secure and Non-secure Memory * - Mixed-endian at EL0 only * - Non-context synchronizing exception entry and exit + * - 16Kb stage-1 granule support */ #define PVM_ID_AA64MMFR0_ALLOW (\ ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_BIGEND) | \ ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_SNSMEM) | \ ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_BIGENDEL0) | \ - ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_EXS) \ + ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_EXS) | \ + ARM64_FEATURE_MASK(ID_AA64MMFR0_EL1_TGRAN16) \ ) /* diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index e21e2bcdd99c..915100a97191 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -2084,6 +2084,12 @@ static void kvm_hyp_init_symbols(void) kvm_nvhe_sym(kvm_arm_vmid_bits) = kvm_arm_vmid_bits; kvm_nvhe_sym(smccc_trng_available) = smccc_trng_available; kvm_nvhe_sym(kvm_host_sve_max_vl) = kvm_host_sve_max_vl; + + /* + * Flush entire BSS since part of its data is read while the MMU is off. + */ + kvm_flush_dcache_to_poc(kvm_ksym_ref(__hyp_bss_start), + kvm_ksym_ref(__hyp_bss_end) - kvm_ksym_ref(__hyp_bss_start)); } int kvm_hyp_init_events(void); diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c index bcf30db7a6d4..931152dc3aa8 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c +++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c @@ -567,6 +567,10 @@ static void sync_debug_state(struct pkvm_hyp_vcpu *hyp_vcpu) return; __vcpu_restore_guest_debug_regs(vcpu); + vcpu_write_sys_reg(host_vcpu, vcpu_read_sys_reg(vcpu, MDSCR_EL1), + MDSCR_EL1); + *vcpu_cpsr(host_vcpu) = *vcpu_cpsr(vcpu); + vcpu->arch.debug_ptr = &host_vcpu->arch.vcpu_debug_state; } diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c index 3a5193ca0fb3..9a8f3fa1bdca 100644 --- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c +++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c @@ -1122,7 +1122,9 @@ static int host_ack_donation(u64 addr, const struct pkvm_mem_transition *tx) static int host_ack_unshare(u64 addr, const struct pkvm_mem_transition *tx) { - return __host_ack_transition(addr, tx, PKVM_PAGE_SHARED_BORROWED); + u64 size = tx->nr_pages * PAGE_SIZE; + + return __host_check_page_state_range(addr, size, PKVM_PAGE_SHARED_BORROWED); } static int host_complete_share(u64 addr, const struct pkvm_mem_transition *tx, @@ -1237,9 +1239,6 @@ static int hyp_ack_unshare(u64 addr, const struct pkvm_mem_transition *tx) if (tx->initiator.id == PKVM_ID_HOST && hyp_page_count((void *)addr)) return -EBUSY; - if (__hyp_ack_skip_pgtable_check(tx)) - return 0; - return __hyp_check_page_state_range(addr, size, PKVM_PAGE_SHARED_BORROWED); } diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c index 5eba729bb3c3..1e8f65e52414 100644 --- a/arch/arm64/kvm/hyp_trace.c +++ b/arch/arm64/kvm/hyp_trace.c @@ -979,6 +979,9 @@ int init_hyp_tracefs(void) if (!is_protected_kvm_enabled()) return 0; + for_each_possible_cpu(cpu) + mutex_init(&per_cpu(hyp_trace_reader_lock, cpu)); + root_dir = tracefs_create_dir(TRACEFS_DIR, NULL); if (!root_dir) { pr_err("Failed to create tracefs "TRACEFS_DIR"/\n"); diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index 1a95465a5468..801559e4527c 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -64,6 +64,7 @@ CONFIG_EFI=y CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttynull stack_depot_disable=on cgroup_disable=pressure bootconfig" CONFIG_HIBERNATION=y +CONFIG_PM_USERSPACE_AUTOSLEEP=y CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS_LIMIT=0 # CONFIG_PM_WAKELOCKS_GC is not set @@ -319,6 +320,7 @@ CONFIG_DM_SNAPSHOT=y CONFIG_DM_UEVENT=y CONFIG_DM_VERITY=y CONFIG_DM_VERITY_FEC=y +CONFIG_DM_BOW=y CONFIG_NETDEVICES=y CONFIG_DUMMY=y CONFIG_WIREGUARD=y diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 4e0d6de0851a..eee3faaeee41 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -4080,7 +4080,6 @@ binder_request_freeze_notification(struct binder_proc *proc, { struct binder_ref_freeze *freeze; struct binder_ref *ref; - bool is_frozen; freeze = kzalloc(sizeof(*freeze), GFP_KERNEL); if (!freeze) @@ -4096,31 +4095,30 @@ binder_request_freeze_notification(struct binder_proc *proc, } binder_node_lock(ref->node); - - if (ref->freeze || !ref->node->proc) { - binder_user_error("%d:%d invalid BC_REQUEST_FREEZE_NOTIFICATION %s\n", - proc->pid, thread->pid, - ref->freeze ? "already set" : "dead node"); + if (ref->freeze) { + binder_user_error("%d:%d BC_REQUEST_FREEZE_NOTIFICATION already set\n", + proc->pid, thread->pid); binder_node_unlock(ref->node); binder_proc_unlock(proc); kfree(freeze); return -EINVAL; } - binder_inner_proc_lock(ref->node->proc); - is_frozen = ref->node->proc->is_frozen; - binder_inner_proc_unlock(ref->node->proc); INIT_LIST_HEAD(&freeze->work.entry); freeze->cookie = handle_cookie->cookie; freeze->work.type = BINDER_WORK_FROZEN_BINDER; - freeze->is_frozen = is_frozen; - ref->freeze = freeze; - binder_inner_proc_lock(proc); - binder_enqueue_work_ilocked(&ref->freeze->work, &proc->todo); - binder_wakeup_proc_ilocked(proc); - binder_inner_proc_unlock(proc); + if (ref->node->proc) { + binder_inner_proc_lock(ref->node->proc); + freeze->is_frozen = ref->node->proc->is_frozen; + binder_inner_proc_unlock(ref->node->proc); + + binder_inner_proc_lock(proc); + binder_enqueue_work_ilocked(&freeze->work, &proc->todo); + binder_wakeup_proc_ilocked(proc); + binder_inner_proc_unlock(proc); + } binder_node_unlock(ref->node); binder_proc_unlock(proc); @@ -5400,6 +5398,15 @@ static void binder_release_work(struct binder_proc *proc, } break; case BINDER_WORK_NODE: break; + case BINDER_WORK_CLEAR_FREEZE_NOTIFICATION: { + struct binder_ref_freeze *freeze; + + freeze = container_of(w, struct binder_ref_freeze, work); + binder_debug(BINDER_DEBUG_DEAD_TRANSACTION, + "undelivered freeze notification, %016llx\n", + (u64)freeze->cookie); + kfree(freeze); + } break; default: pr_err("unexpected work type, %d, not freed\n", wtype); @@ -6547,6 +6554,7 @@ static void binder_deferred_release(struct binder_proc *proc) binder_release_work(proc, &proc->todo); binder_release_work(proc, &proc->delivered_death); + binder_release_work(proc, &proc_wrapper(proc)->delivered_freeze); binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d threads %d, nodes %d (ref %d), refs %d, active transactions %d\n", @@ -6684,6 +6692,9 @@ static void print_binder_work_ilocked(struct seq_file *m, case BINDER_WORK_FROZEN_BINDER: seq_printf(m, "%shas frozen binder\n", prefix); break; + case BINDER_WORK_CLEAR_FREEZE_NOTIFICATION: + seq_printf(m, "%shas cleared freeze notification\n", prefix); + break; default: seq_printf(m, "%sunknown work: type %d\n", prefix, w->type); break; @@ -6833,6 +6844,10 @@ static void print_binder_proc(struct seq_file *m, seq_puts(m, " has delivered dead binder\n"); break; } + list_for_each_entry(w, &proc_wrapper(proc)->delivered_freeze, entry) { + seq_puts(m, " has delivered freeze binder\n"); + break; + } binder_inner_proc_unlock(proc); if (!print_all && m->count == header_pos) m->count = start_pos; diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index c41f1f7e90a4..6da9ef6372b2 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -192,6 +193,9 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unreserve_highatomic_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rmqueue_bulk_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ra_tuning_max_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_mmap_readaround); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_slab_alloc_node); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_slab_free); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_hw_protection_shutdown); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_selinux_avc_insert); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_selinux_avc_node_delete); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_selinux_avc_node_replace); @@ -379,6 +383,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_compaction_try_to_compact_pages_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_direct_reclaim_enter); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_direct_reclaim_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_may_oom_exit); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_vmscan_kswapd_wake); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_vmscan_kswapd_done); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmscan_kswapd_done); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_compaction_begin); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_compaction_end); @@ -418,6 +424,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_delayacct_compact_start); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_delayacct_compact_end); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_delayacct_wpcopy_start); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_delayacct_wpcopy_end); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_io_statistics); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_usb_dev_suspend); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_usb_dev_resume); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sound_usb_support_cpu_suspend); @@ -459,3 +466,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_oom_swapmem_gather_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_read_fault); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_filemap_read); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_filemap_map_pages); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_blk_reset); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_attach_sd); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sdhci_get_cd); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_gpio_cd_irqt); diff --git a/drivers/base/core.c b/drivers/base/core.c index f21ceb93e50e..f714f33557ab 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -104,12 +104,13 @@ static int __fwnode_link_add(struct fwnode_handle *con, return 0; } -int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup) +int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup, + u8 flags) { int ret; mutex_lock(&fwnode_link_lock); - ret = __fwnode_link_add(con, sup, 0); + ret = __fwnode_link_add(con, sup, flags); mutex_unlock(&fwnode_link_lock); return ret; } diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 441092f988e8..4e31f5227d39 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -1008,6 +1008,7 @@ unsigned int pm_wakeup_irq(void) { return wakeup_irq[0]; } +EXPORT_SYMBOL_GPL(pm_wakeup_irq); /** * pm_get_wakeup_count - Read the number of registered wakeup events. diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 4ac72754c255..95b5e0738105 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -231,20 +231,44 @@ extern const struct scmi_desc scmi_optee_desc; void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr, void *priv); void scmi_free_channel(struct scmi_chan_info *cinfo, struct idr *idr, int id); +/* Used for compactness and signature validation of the function pointers being + * passed. + */ +typedef void (*shmem_copy_toio_t)(void __iomem *to, const void *from, + size_t count); +typedef void (*shmem_copy_fromio_t)(void *to, const void __iomem *from, + size_t count); + +/** + * struct scmi_shmem_io_ops - I/O operations to read from/write to + * Shared Memory + * + * @toio: Copy data to the shared memory area + * @fromio: Copy data from the shared memory area + */ +struct scmi_shmem_io_ops { + shmem_copy_fromio_t fromio; + shmem_copy_toio_t toio; +}; + /* shmem related declarations */ struct scmi_shared_mem; void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, - struct scmi_xfer *xfer, struct scmi_chan_info *cinfo); + struct scmi_xfer *xfer, struct scmi_chan_info *cinfo, + shmem_copy_toio_t toio); u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem); void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem, - struct scmi_xfer *xfer); + struct scmi_xfer *xfer, + shmem_copy_fromio_t fromio); void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem, - size_t max_len, struct scmi_xfer *xfer); + size_t max_len, struct scmi_xfer *xfer, + shmem_copy_fromio_t fromio); void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem); bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem, struct scmi_xfer *xfer); bool shmem_channel_free(struct scmi_shared_mem __iomem *shmem); +struct scmi_shmem_io_ops *shmem_get_io_ops(struct device_node *shmem); /* declarations for message passing transports */ struct scmi_msg_payld; diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c index 01b4e532b26c..6c664fc1bead 100644 --- a/drivers/firmware/arm_scmi/mailbox.c +++ b/drivers/firmware/arm_scmi/mailbox.c @@ -23,6 +23,7 @@ * @cinfo: SCMI channel info * @shmem: Transmit/Receive shared memory area * @chan_lock: Lock that prevents multiple xfers from being queued + * @io_ops: Transport specific I/O operations */ struct scmi_mailbox { struct mbox_client cl; @@ -30,6 +31,7 @@ struct scmi_mailbox { struct scmi_chan_info *cinfo; struct scmi_shared_mem __iomem *shmem; struct mutex chan_lock; + struct scmi_shmem_io_ops *io_ops; }; #define client_to_scmi_mailbox(c) container_of(c, struct scmi_mailbox, cl) @@ -38,7 +40,8 @@ static void tx_prepare(struct mbox_client *cl, void *m) { struct scmi_mailbox *smbox = client_to_scmi_mailbox(cl); - shmem_tx_prepare(smbox->shmem, m, smbox->cinfo); + shmem_tx_prepare(smbox->shmem, m, smbox->cinfo, + smbox->io_ops->toio); } static void rx_callback(struct mbox_client *cl, void *m) @@ -147,6 +150,7 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, cl->rx_callback = rx_callback; cl->tx_block = false; cl->knows_txdone = tx; + smbox->io_ops = shmem_get_io_ops(shmem); smbox->chan = mbox_request_channel(cl, tx ? 0 : 1); if (IS_ERR(smbox->chan)) { @@ -222,7 +226,7 @@ static void mailbox_fetch_response(struct scmi_chan_info *cinfo, { struct scmi_mailbox *smbox = cinfo->transport_info; - shmem_fetch_response(smbox->shmem, xfer); + shmem_fetch_response(smbox->shmem, xfer, smbox->io_ops->fromio); } static void mailbox_fetch_notification(struct scmi_chan_info *cinfo, @@ -230,7 +234,8 @@ static void mailbox_fetch_notification(struct scmi_chan_info *cinfo, { struct scmi_mailbox *smbox = cinfo->transport_info; - shmem_fetch_notification(smbox->shmem, max_len, xfer); + shmem_fetch_notification(smbox->shmem, max_len, xfer, + smbox->io_ops->fromio); } static void mailbox_clear_channel(struct scmi_chan_info *cinfo) diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c index f5f6ec83d3e1..8ddd60536a5f 100644 --- a/drivers/firmware/arm_scmi/optee.c +++ b/drivers/firmware/arm_scmi/optee.c @@ -111,6 +111,7 @@ enum scmi_optee_pta_cmd { * @cinfo: SCMI channel information * @shmem: Virtual base address of the shared memory * @req: Shared memory protocol handle for SCMI request and synchronous response + * @io_ops: Transport specific I/O operations * @tee_shm: TEE shared memory handle @req or NULL if using IOMEM shmem * @link: Reference in agent's channel list */ @@ -125,6 +126,7 @@ struct scmi_optee_channel { struct scmi_shared_mem __iomem *shmem; struct scmi_msg_payld *msg; } req; + struct scmi_shmem_io_ops *io_ops; struct tee_shm *tee_shm; struct list_head link; }; @@ -392,6 +394,8 @@ static int setup_static_shmem(struct device *dev, struct scmi_chan_info *cinfo, goto out; } + channel->io_ops = shmem_get_io_ops(np); + ret = 0; out: @@ -505,7 +509,8 @@ static int scmi_optee_send_message(struct scmi_chan_info *cinfo, msg_tx_prepare(channel->req.msg, xfer); ret = invoke_process_msg_channel(channel, msg_command_size(xfer)); } else { - shmem_tx_prepare(channel->req.shmem, xfer, cinfo); + shmem_tx_prepare(channel->req.shmem, xfer, cinfo, + channel->io_ops->toio); ret = invoke_process_smt_channel(channel); } @@ -523,7 +528,8 @@ static void scmi_optee_fetch_response(struct scmi_chan_info *cinfo, if (channel->tee_shm) msg_fetch_response(channel->req.msg, channel->rx_len, xfer); else - shmem_fetch_response(channel->req.shmem, xfer); + shmem_fetch_response(channel->req.shmem, xfer, + channel->io_ops->fromio); } static void scmi_optee_mark_txdone(struct scmi_chan_info *cinfo, int ret, diff --git a/drivers/firmware/arm_scmi/shmem.c b/drivers/firmware/arm_scmi/shmem.c index 517d52fb3bcb..cffbaa66c8a4 100644 --- a/drivers/firmware/arm_scmi/shmem.c +++ b/drivers/firmware/arm_scmi/shmem.c @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -32,8 +33,58 @@ struct scmi_shared_mem { u8 msg_payload[]; }; +static inline void shmem_memcpy_fromio32(void *to, + const void __iomem *from, + size_t count) +{ + WARN_ON(!IS_ALIGNED((unsigned long)from, 4) || + !IS_ALIGNED((unsigned long)to, 4) || + count % 4); + + __ioread32_copy(to, from, count / 4); +} + +static inline void shmem_memcpy_toio32(void __iomem *to, + const void *from, + size_t count) +{ + WARN_ON(!IS_ALIGNED((unsigned long)from, 4) || + !IS_ALIGNED((unsigned long)to, 4) || + count % 4); + + __iowrite32_copy(to, from, count / 4); +} + +static struct scmi_shmem_io_ops shmem_io_ops32 = { + .fromio = shmem_memcpy_fromio32, + .toio = shmem_memcpy_toio32, +}; + +/* Wrappers are needed for proper memcpy_{from,to}_io expansion by the + * pre-processor. + */ +static inline void shmem_memcpy_fromio(void *to, + const void __iomem *from, + size_t count) +{ + memcpy_fromio(to, from, count); +} + +static inline void shmem_memcpy_toio(void __iomem *to, + const void *from, + size_t count) +{ + memcpy_toio(to, from, count); +} + +static struct scmi_shmem_io_ops shmem_io_ops_default = { + .fromio = shmem_memcpy_fromio, + .toio = shmem_memcpy_toio, +}; + void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, - struct scmi_xfer *xfer, struct scmi_chan_info *cinfo) + struct scmi_xfer *xfer, struct scmi_chan_info *cinfo, + shmem_copy_toio_t copy_toio) { ktime_t stop; @@ -70,7 +121,7 @@ void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); if (xfer->tx.buf) - memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); + copy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); } u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) @@ -79,7 +130,8 @@ u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) } void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem, - struct scmi_xfer *xfer) + struct scmi_xfer *xfer, + shmem_copy_fromio_t copy_fromio) { size_t len = ioread32(&shmem->length); @@ -88,11 +140,12 @@ void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem, xfer->rx.len = min_t(size_t, xfer->rx.len, len > 8 ? len - 8 : 0); /* Take a copy to the rx buffer.. */ - memcpy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len); + copy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len); } void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem, - size_t max_len, struct scmi_xfer *xfer) + size_t max_len, struct scmi_xfer *xfer, + shmem_copy_fromio_t copy_fromio) { size_t len = ioread32(&shmem->length); @@ -100,7 +153,7 @@ void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem, xfer->rx.len = min_t(size_t, max_len, len > 4 ? len - 4 : 0); /* Take a copy to the rx buffer.. */ - memcpy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len); + copy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len); } void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem) @@ -128,3 +181,16 @@ bool shmem_channel_free(struct scmi_shared_mem __iomem *shmem) return (ioread32(&shmem->channel_status) & SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE); } + +struct scmi_shmem_io_ops *shmem_get_io_ops(struct device_node *shmem) +{ + u32 reg_io_width; + + of_property_read_u32(shmem, "reg-io-width", ®_io_width); + switch (reg_io_width) { + case 4: + return &shmem_io_ops32; + } + + return &shmem_io_ops_default; +} diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c index 42ea308a2c1d..3953ca75d09f 100644 --- a/drivers/firmware/arm_scmi/smc.c +++ b/drivers/firmware/arm_scmi/smc.c @@ -26,6 +26,7 @@ * @irq: An optional IRQ for completion * @cinfo: SCMI channel info * @shmem: Transmit/Receive shared memory area + * @io_ops: Transport specific I/O operations * @shmem_lock: Lock to protect access to Tx/Rx shared memory area. * Used when NOT operating in atomic mode. * @inflight: Atomic flag to protect access to Tx/Rx shared memory area. @@ -37,6 +38,7 @@ struct scmi_smc { int irq; struct scmi_chan_info *cinfo; struct scmi_shared_mem __iomem *shmem; + struct scmi_shmem_io_ops *io_ops; /* Protect access to shmem area */ struct mutex shmem_lock; #define INFLIGHT_NONE MSG_TOKEN_MAX @@ -158,6 +160,8 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, cinfo->no_completion_irq = true; } + scmi_info->io_ops = shmem_get_io_ops(np); + scmi_info->func_id = func_id; scmi_info->cinfo = cinfo; smc_channel_lock_init(scmi_info); @@ -202,7 +206,8 @@ static int smc_send_message(struct scmi_chan_info *cinfo, */ smc_channel_lock_acquire(scmi_info, xfer); - shmem_tx_prepare(scmi_info->shmem, xfer, cinfo); + shmem_tx_prepare(scmi_info->shmem, xfer, cinfo, + scmi_info->io_ops->toio); arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res); @@ -220,7 +225,8 @@ static void smc_fetch_response(struct scmi_chan_info *cinfo, { struct scmi_smc *scmi_info = cinfo->transport_info; - shmem_fetch_response(scmi_info->shmem, xfer); + shmem_fetch_response(scmi_info->shmem, xfer, + scmi_info->io_ops->fromio); } static void smc_mark_txdone(struct scmi_chan_info *cinfo, int ret, diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c index 456d0e5eaf78..cc807ed35aed 100644 --- a/drivers/firmware/efi/sysfb_efi.c +++ b/drivers/firmware/efi/sysfb_efi.c @@ -336,7 +336,7 @@ static int efifb_add_links(struct fwnode_handle *fwnode) if (!sup_np) return 0; - fwnode_link_add(fwnode, of_fwnode_handle(sup_np)); + fwnode_link_add(fwnode, of_fwnode_handle(sup_np), 0); of_node_put(sup_np); return 0; diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 653fd80f8317..5e11d7c5a57d 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig @@ -679,6 +679,18 @@ config DM_AUDIT Enables audit logging of several security relevant events in the particular device-mapper targets, especially the integrity target. +config DM_BOW + tristate "Backup block device" + depends on BLK_DEV_DM + select DM_BUFIO + help + This device-mapper target takes a device and keeps a log of all + changes using free blocks identified by issuing a trim command. + This can then be restored by running a command line utility, + or committed by simply replacing the target. + + If unsure, say N. + config DM_USER tristate "Block device in userspace" depends on BLK_DEV_DM diff --git a/drivers/md/Makefile b/drivers/md/Makefile index 369f2ae112f1..4c607601fa4c 100644 --- a/drivers/md/Makefile +++ b/drivers/md/Makefile @@ -85,6 +85,7 @@ obj-$(CONFIG_DM_INTEGRITY) += dm-integrity.o obj-$(CONFIG_DM_ZONED) += dm-zoned.o obj-$(CONFIG_DM_WRITECACHE) += dm-writecache.o obj-$(CONFIG_SECURITY_LOADPIN_VERITY) += dm-verity-loadpin.o +obj-$(CONFIG_DM_BOW) += dm-bow.o obj-$(CONFIG_DM_USER) += dm-user.o ifeq ($(CONFIG_DM_INIT),y) diff --git a/drivers/md/dm-bow.c b/drivers/md/dm-bow.c new file mode 100644 index 000000000000..a9764ea8940f --- /dev/null +++ b/drivers/md/dm-bow.c @@ -0,0 +1,1309 @@ +/* + * Copyright (C) 2018 Google Limited. + * + * This file is released under the GPL. + */ + +#include "dm.h" +#include "dm-core.h" + +#include +#include +#include + +#define DM_MSG_PREFIX "bow" + +struct log_entry { + u64 source; + u64 dest; + u32 size; + u32 checksum; +} __packed; + +struct log_sector { + u32 magic; + u16 header_version; + u16 header_size; + u32 block_size; + u32 count; + u32 sequence; + sector_t sector0; + struct log_entry entries[]; +} __packed; + +/* + * MAGIC is BOW in ascii + */ +#define MAGIC 0x00574f42 +#define HEADER_VERSION 0x0100 + +/* + * A sorted set of ranges representing the state of the data on the device. + * Use an rb_tree for fast lookup of a given sector + * Consecutive ranges are always of different type - operations on this + * set must merge matching consecutive ranges. + * + * Top range is always of type TOP + */ +struct bow_range { + struct rb_node node; + sector_t sector; + enum { + INVALID, /* Type not set */ + SECTOR0, /* First sector - holds log record */ + SECTOR0_CURRENT,/* Live contents of sector0 */ + UNCHANGED, /* Original contents */ + TRIMMED, /* Range has been trimmed */ + CHANGED, /* Range has been changed */ + BACKUP, /* Range is being used as a backup */ + TOP, /* Final range - sector is size of device */ + } type; + struct list_head trimmed_list; /* list of TRIMMED ranges */ +}; + +static const char * const readable_type[] = { + "Invalid", + "Sector0", + "Sector0_current", + "Unchanged", + "Free", + "Changed", + "Backup", + "Top", +}; + +enum state { + TRIM, + CHECKPOINT, + COMMITTED, +}; + +struct bow_context { + struct dm_dev *dev; + u32 block_size; + u32 block_shift; + struct workqueue_struct *workqueue; + struct dm_bufio_client *bufio; + struct mutex ranges_lock; /* Hold to access this struct and/or ranges */ + struct rb_root ranges; + struct dm_kobject_holder kobj_holder; /* for sysfs attributes */ + atomic_t state; /* One of the enum state values above */ + u64 trims_total; + struct log_sector *log_sector; + struct list_head trimmed_list; + bool forward_trims; +}; + +sector_t range_top(struct bow_range *br) +{ + return container_of(rb_next(&br->node), struct bow_range, node) + ->sector; +} + +u64 range_size(struct bow_range *br) +{ + return (range_top(br) - br->sector) * SECTOR_SIZE; +} + +static sector_t bvec_top(struct bvec_iter *bi_iter) +{ + return bi_iter->bi_sector + bi_iter->bi_size / SECTOR_SIZE; +} + +/* + * Find the first range that overlaps with bi_iter + * bi_iter is set to the size of the overlapping sub-range + */ +static struct bow_range *find_first_overlapping_range(struct rb_root *ranges, + struct bvec_iter *bi_iter) +{ + struct rb_node *node = ranges->rb_node; + struct bow_range *br; + + while (node) { + br = container_of(node, struct bow_range, node); + + if (br->sector <= bi_iter->bi_sector + && bi_iter->bi_sector < range_top(br)) + break; + + if (bi_iter->bi_sector < br->sector) + node = node->rb_left; + else + node = node->rb_right; + } + + WARN_ON(!node); + if (!node) + return NULL; + + if (range_top(br) - bi_iter->bi_sector + < bi_iter->bi_size >> SECTOR_SHIFT) + bi_iter->bi_size = (range_top(br) - bi_iter->bi_sector) + << SECTOR_SHIFT; + + return br; +} + +void add_before(struct rb_root *ranges, struct bow_range *new_br, + struct bow_range *existing) +{ + struct rb_node *parent = &(existing->node); + struct rb_node **link = &(parent->rb_left); + + while (*link) { + parent = *link; + link = &((*link)->rb_right); + } + + rb_link_node(&new_br->node, parent, link); + rb_insert_color(&new_br->node, ranges); +} + +/* + * Given a range br returned by find_first_overlapping_range, split br into a + * leading range, a range matching the bi_iter and a trailing range. + * Leading and trailing may end up size 0 and will then be deleted. The + * new range matching the bi_iter is then returned and should have its type + * and type specific fields populated. + * If bi_iter runs off the end of the range, bi_iter is truncated accordingly + */ +static int split_range(struct bow_context *bc, struct bow_range **br, + struct bvec_iter *bi_iter) +{ + struct bow_range *new_br; + + if (bi_iter->bi_sector < (*br)->sector) { + WARN_ON(true); + return BLK_STS_IOERR; + } + + if (bi_iter->bi_sector > (*br)->sector) { + struct bow_range *leading_br = + kzalloc(sizeof(*leading_br), GFP_KERNEL); + + if (!leading_br) + return BLK_STS_RESOURCE; + + *leading_br = **br; + if (leading_br->type == TRIMMED) + list_add(&leading_br->trimmed_list, &bc->trimmed_list); + + add_before(&bc->ranges, leading_br, *br); + (*br)->sector = bi_iter->bi_sector; + } + + if (bvec_top(bi_iter) >= range_top(*br)) { + bi_iter->bi_size = (range_top(*br) - (*br)->sector) + * SECTOR_SIZE; + return BLK_STS_OK; + } + + /* new_br will be the beginning, existing br will be the tail */ + new_br = kzalloc(sizeof(*new_br), GFP_KERNEL); + if (!new_br) + return BLK_STS_RESOURCE; + + new_br->sector = (*br)->sector; + (*br)->sector = bvec_top(bi_iter); + add_before(&bc->ranges, new_br, *br); + *br = new_br; + + return BLK_STS_OK; +} + +/* + * Sets type of a range. May merge range into surrounding ranges + * Since br may be invalidated, always sets br to NULL to prevent + * usage after this is called + */ +static void set_type(struct bow_context *bc, struct bow_range **br, int type) +{ + struct bow_range *prev = container_of(rb_prev(&(*br)->node), + struct bow_range, node); + struct bow_range *next = container_of(rb_next(&(*br)->node), + struct bow_range, node); + + if ((*br)->type == TRIMMED) { + bc->trims_total -= range_size(*br); + list_del(&(*br)->trimmed_list); + } + + if (type == TRIMMED) { + bc->trims_total += range_size(*br); + list_add(&(*br)->trimmed_list, &bc->trimmed_list); + } + + (*br)->type = type; + + if (next->type == type) { + if (type == TRIMMED) + list_del(&next->trimmed_list); + rb_erase(&next->node, &bc->ranges); + kfree(next); + } + + if (prev->type == type) { + if (type == TRIMMED) + list_del(&(*br)->trimmed_list); + rb_erase(&(*br)->node, &bc->ranges); + kfree(*br); + } + + *br = NULL; +} + +static struct bow_range *find_free_range(struct bow_context *bc) +{ + if (list_empty(&bc->trimmed_list)) { + DMERR("Unable to find free space to back up to"); + return NULL; + } + + return list_first_entry(&bc->trimmed_list, struct bow_range, + trimmed_list); +} + +static sector_t sector_to_page(struct bow_context const *bc, sector_t sector) +{ + WARN_ON((sector & (((sector_t)1 << (bc->block_shift - SECTOR_SHIFT)) - 1)) + != 0); + return sector >> (bc->block_shift - SECTOR_SHIFT); +} + +static int copy_data(struct bow_context const *bc, + struct bow_range *source, struct bow_range *dest, + u32 *checksum) +{ + int i; + + if (range_size(source) != range_size(dest)) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + if (checksum) + *checksum = sector_to_page(bc, source->sector); + + for (i = 0; i < range_size(source) >> bc->block_shift; ++i) { + struct dm_buffer *read_buffer, *write_buffer; + u8 *read, *write; + sector_t page = sector_to_page(bc, source->sector) + i; + + read = dm_bufio_read(bc->bufio, page, &read_buffer); + if (IS_ERR(read)) { + DMERR("Cannot read page %llu", + (unsigned long long)page); + return PTR_ERR(read); + } + + if (checksum) + *checksum = crc32(*checksum, read, bc->block_size); + + write = dm_bufio_new(bc->bufio, + sector_to_page(bc, dest->sector) + i, + &write_buffer); + if (IS_ERR(write)) { + DMERR("Cannot write sector"); + dm_bufio_release(read_buffer); + return PTR_ERR(write); + } + + memcpy(write, read, bc->block_size); + + dm_bufio_mark_buffer_dirty(write_buffer); + dm_bufio_release(write_buffer); + dm_bufio_release(read_buffer); + } + + dm_bufio_write_dirty_buffers(bc->bufio); + return BLK_STS_OK; +} + +/****** logging functions ******/ + +static int add_log_entry(struct bow_context *bc, sector_t source, sector_t dest, + unsigned int size, u32 checksum); + +static int backup_log_sector(struct bow_context *bc) +{ + struct bow_range *first_br, *free_br; + struct bvec_iter bi_iter; + u32 checksum = 0; + int ret; + + first_br = container_of(rb_first(&bc->ranges), struct bow_range, node); + + if (first_br->type != SECTOR0) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + if (range_size(first_br) != bc->block_size) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + free_br = find_free_range(bc); + /* No space left - return this error to userspace */ + if (!free_br) + return BLK_STS_NOSPC; + bi_iter.bi_sector = free_br->sector; + bi_iter.bi_size = bc->block_size; + ret = split_range(bc, &free_br, &bi_iter); + if (ret) + return ret; + if (bi_iter.bi_size != bc->block_size) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + ret = copy_data(bc, first_br, free_br, &checksum); + if (ret) + return ret; + + bc->log_sector->count = 0; + bc->log_sector->sequence++; + ret = add_log_entry(bc, first_br->sector, free_br->sector, + range_size(first_br), checksum); + if (ret) + return ret; + + set_type(bc, &free_br, BACKUP); + return BLK_STS_OK; +} + +static int add_log_entry(struct bow_context *bc, sector_t source, sector_t dest, + unsigned int size, u32 checksum) +{ + struct dm_buffer *sector_buffer; + u8 *sector; + + if (sizeof(struct log_sector) + + sizeof(struct log_entry) * (bc->log_sector->count + 1) + > bc->block_size) { + int ret = backup_log_sector(bc); + + if (ret) + return ret; + } + + sector = dm_bufio_new(bc->bufio, 0, §or_buffer); + if (IS_ERR(sector)) { + DMERR("Cannot write boot sector"); + dm_bufio_release(sector_buffer); + return BLK_STS_NOSPC; + } + + bc->log_sector->entries[bc->log_sector->count].source = source; + bc->log_sector->entries[bc->log_sector->count].dest = dest; + bc->log_sector->entries[bc->log_sector->count].size = size; + bc->log_sector->entries[bc->log_sector->count].checksum = checksum; + bc->log_sector->count++; + + memcpy(sector, bc->log_sector, bc->block_size); + dm_bufio_mark_buffer_dirty(sector_buffer); + dm_bufio_release(sector_buffer); + dm_bufio_write_dirty_buffers(bc->bufio); + return BLK_STS_OK; +} + +static int prepare_log(struct bow_context *bc) +{ + struct bow_range *free_br, *first_br; + struct bvec_iter bi_iter; + u32 checksum = 0; + int ret; + + /* Carve out first sector as log sector */ + first_br = container_of(rb_first(&bc->ranges), struct bow_range, node); + if (first_br->type != UNCHANGED) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + if (range_size(first_br) < bc->block_size) { + WARN_ON(1); + return BLK_STS_IOERR; + } + bi_iter.bi_sector = 0; + bi_iter.bi_size = bc->block_size; + ret = split_range(bc, &first_br, &bi_iter); + if (ret) + return ret; + first_br->type = SECTOR0; + if (range_size(first_br) != bc->block_size) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + /* Find free sector for active sector0 reads/writes */ + free_br = find_free_range(bc); + if (!free_br) + return BLK_STS_NOSPC; + bi_iter.bi_sector = free_br->sector; + bi_iter.bi_size = bc->block_size; + ret = split_range(bc, &free_br, &bi_iter); + if (ret) + return ret; + + /* Copy data */ + ret = copy_data(bc, first_br, free_br, NULL); + if (ret) + return ret; + + bc->log_sector->sector0 = free_br->sector; + + set_type(bc, &free_br, SECTOR0_CURRENT); + + /* Find free sector to back up original sector zero */ + free_br = find_free_range(bc); + if (!free_br) + return BLK_STS_NOSPC; + bi_iter.bi_sector = free_br->sector; + bi_iter.bi_size = bc->block_size; + ret = split_range(bc, &free_br, &bi_iter); + if (ret) + return ret; + + /* Back up */ + ret = copy_data(bc, first_br, free_br, &checksum); + if (ret) + return ret; + + /* + * Set up our replacement boot sector - it will get written when we + * add the first log entry, which we do immediately + */ + bc->log_sector->magic = MAGIC; + bc->log_sector->header_version = HEADER_VERSION; + bc->log_sector->header_size = sizeof(*bc->log_sector); + bc->log_sector->block_size = bc->block_size; + bc->log_sector->count = 0; + bc->log_sector->sequence = 0; + + /* Add log entry */ + ret = add_log_entry(bc, first_br->sector, free_br->sector, + range_size(first_br), checksum); + if (ret) + return ret; + + set_type(bc, &free_br, BACKUP); + return BLK_STS_OK; +} + +static struct bow_range *find_sector0_current(struct bow_context *bc) +{ + struct bvec_iter bi_iter; + + bi_iter.bi_sector = bc->log_sector->sector0; + bi_iter.bi_size = bc->block_size; + return find_first_overlapping_range(&bc->ranges, &bi_iter); +} + +/****** sysfs interface functions ******/ + +static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf) +{ + struct bow_context *bc = container_of(kobj, struct bow_context, + kobj_holder.kobj); + + return scnprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&bc->state)); +} + +static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count) +{ + struct bow_context *bc = container_of(kobj, struct bow_context, + kobj_holder.kobj); + enum state state, original_state; + int ret; + + state = buf[0] - '0'; + if (state < TRIM || state > COMMITTED) { + DMERR("State value %d out of range", state); + return -EINVAL; + } + + mutex_lock(&bc->ranges_lock); + original_state = atomic_read(&bc->state); + if (state != original_state + 1) { + DMERR("Invalid state change from %d to %d", + original_state, state); + ret = -EINVAL; + goto bad; + } + + DMINFO("Switching to state %s", state == CHECKPOINT ? "Checkpoint" + : state == COMMITTED ? "Committed" : "Unknown"); + + if (state == CHECKPOINT) { + ret = prepare_log(bc); + if (ret) { + DMERR("Failed to switch to checkpoint state"); + goto bad; + } + } else if (state == COMMITTED) { + struct bow_range *br = find_sector0_current(bc); + struct bow_range *sector0_br = + container_of(rb_first(&bc->ranges), struct bow_range, + node); + + ret = copy_data(bc, br, sector0_br, 0); + if (ret) { + DMERR("Failed to switch to committed state"); + goto bad; + } + } + atomic_inc(&bc->state); + ret = count; + +bad: + mutex_unlock(&bc->ranges_lock); + return ret; +} + +static ssize_t free_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf) +{ + struct bow_context *bc = container_of(kobj, struct bow_context, + kobj_holder.kobj); + u64 trims_total; + + mutex_lock(&bc->ranges_lock); + trims_total = bc->trims_total; + mutex_unlock(&bc->ranges_lock); + + return scnprintf(buf, PAGE_SIZE, "%llu\n", trims_total); +} + +static struct kobj_attribute attr_state = __ATTR_RW(state); +static struct kobj_attribute attr_free = __ATTR_RO(free); + +static struct attribute *bow_attrs[] = { + &attr_state.attr, + &attr_free.attr, + NULL +}; +ATTRIBUTE_GROUPS(bow); + +static struct kobj_type bow_ktype = { + .sysfs_ops = &kobj_sysfs_ops, + .default_groups = bow_groups, + .release = dm_kobject_release +}; + +/****** constructor/destructor ******/ + +static void dm_bow_dtr(struct dm_target *ti) +{ + struct bow_context *bc = (struct bow_context *) ti->private; + struct kobject *kobj; + + if (bc->workqueue) + destroy_workqueue(bc->workqueue); + if (bc->bufio) + dm_bufio_client_destroy(bc->bufio); + + kobj = &bc->kobj_holder.kobj; + if (kobj->state_initialized) { + kobject_put(kobj); + wait_for_completion(dm_get_completion_from_kobject(kobj)); + } + + while (rb_first(&bc->ranges)) { + struct bow_range *br = container_of(rb_first(&bc->ranges), + struct bow_range, node); + + rb_erase(&br->node, &bc->ranges); + kfree(br); + } + + mutex_destroy(&bc->ranges_lock); + kfree(bc->log_sector); + kfree(bc); +} + +static void dm_bow_io_hints(struct dm_target *ti, struct queue_limits *limits) +{ + struct bow_context *bc = ti->private; + const unsigned int block_size = bc->block_size; + + limits->logical_block_size = + max_t(unsigned int, limits->logical_block_size, block_size); + limits->physical_block_size = + max_t(unsigned int, limits->physical_block_size, block_size); + limits->io_min = max_t(unsigned int, limits->io_min, block_size); + + if (limits->max_discard_sectors == 0) { + limits->discard_granularity = 1 << 12; + limits->max_hw_discard_sectors = 1 << 15; + limits->max_discard_sectors = 1 << 15; + bc->forward_trims = false; + } else { + limits->discard_granularity = 1 << 12; + bc->forward_trims = true; + } +} + +static int dm_bow_ctr_optional(struct dm_target *ti, unsigned int argc, char **argv) +{ + struct bow_context *bc = ti->private; + struct dm_arg_set as; + static const struct dm_arg _args[] = { + {0, 1, "Invalid number of feature args"}, + }; + unsigned int opt_params; + const char *opt_string; + int err; + char dummy; + + as.argc = argc; + as.argv = argv; + + err = dm_read_arg_group(_args, &as, &opt_params, &ti->error); + if (err) + return err; + + while (opt_params--) { + opt_string = dm_shift_arg(&as); + if (!opt_string) { + ti->error = "Not enough feature arguments"; + return -EINVAL; + } + + if (sscanf(opt_string, "block_size:%u%c", + &bc->block_size, &dummy) == 1) { + if (bc->block_size < SECTOR_SIZE || + bc->block_size > 4096 || + !is_power_of_2(bc->block_size)) { + ti->error = "Invalid block_size"; + return -EINVAL; + } + } else { + ti->error = "Invalid feature arguments"; + return -EINVAL; + } + } + + return 0; +} + +static int dm_bow_ctr(struct dm_target *ti, unsigned int argc, char **argv) +{ + struct bow_context *bc; + struct bow_range *br; + int ret; + + if (argc < 1) { + ti->error = "Invalid argument count"; + return -EINVAL; + } + + bc = kzalloc(sizeof(*bc), GFP_KERNEL); + if (!bc) { + ti->error = "Cannot allocate bow context"; + return -ENOMEM; + } + + ti->num_flush_bios = 1; + ti->num_discard_bios = 1; + ti->private = bc; + + ret = dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), + &bc->dev); + if (ret) { + ti->error = "Device lookup failed"; + goto bad; + } + + bc->block_size = + bdev_get_queue(bc->dev->bdev)->limits.logical_block_size; + if (argc > 1) { + ret = dm_bow_ctr_optional(ti, argc - 1, &argv[1]); + if (ret) + goto bad; + } + + bc->block_shift = ilog2(bc->block_size); + bc->log_sector = kzalloc(bc->block_size, GFP_KERNEL); + if (!bc->log_sector) { + ti->error = "Cannot allocate log sector"; + goto bad; + } + + init_completion(&bc->kobj_holder.completion); + mutex_init(&bc->ranges_lock); + bc->ranges = RB_ROOT; + bc->bufio = dm_bufio_client_create(bc->dev->bdev, bc->block_size, 1, 0, + NULL, NULL, 0); + if (IS_ERR(bc->bufio)) { + ti->error = "Cannot initialize dm-bufio"; + ret = PTR_ERR(bc->bufio); + bc->bufio = NULL; + goto bad; + } + + bc->workqueue = alloc_workqueue("dm-bow", + WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM + | WQ_UNBOUND, num_online_cpus()); + if (!bc->workqueue) { + ti->error = "Cannot allocate workqueue"; + ret = -ENOMEM; + goto bad; + } + + INIT_LIST_HEAD(&bc->trimmed_list); + + br = kzalloc(sizeof(*br), GFP_KERNEL); + if (!br) { + ti->error = "Cannot allocate ranges"; + ret = -ENOMEM; + goto bad; + } + + br->sector = ti->len; + br->type = TOP; + rb_link_node(&br->node, NULL, &bc->ranges.rb_node); + rb_insert_color(&br->node, &bc->ranges); + + br = kzalloc(sizeof(*br), GFP_KERNEL); + if (!br) { + ti->error = "Cannot allocate ranges"; + ret = -ENOMEM; + goto bad; + } + + br->sector = 0; + br->type = UNCHANGED; + rb_link_node(&br->node, bc->ranges.rb_node, + &bc->ranges.rb_node->rb_left); + rb_insert_color(&br->node, &bc->ranges); + + ti->discards_supported = true; + + return 0; + +bad: + dm_bow_dtr(ti); + return ret; +} + +void dm_bow_resume(struct dm_target *ti) +{ + struct mapped_device *md = dm_table_get_md(ti->table); + struct bow_context *bc = ti->private; + int ret; + + if (bc->kobj_holder.kobj.state_initialized) + return; + + ret = kobject_init_and_add(&bc->kobj_holder.kobj, &bow_ktype, + &disk_to_dev(dm_disk(md))->kobj, "%s", + "bow"); + if (ret) + ti->error = "Cannot create sysfs node"; +} + +/****** Handle writes ******/ + +static int prepare_unchanged_range(struct bow_context *bc, struct bow_range *br, + struct bvec_iter *bi_iter, + bool record_checksum) +{ + struct bow_range *backup_br; + struct bvec_iter backup_bi; + sector_t log_source, log_dest; + unsigned int log_size; + u32 checksum = 0; + int ret; + int original_type; + sector_t sector0; + + /* Find a free range */ + backup_br = find_free_range(bc); + if (!backup_br) + return BLK_STS_NOSPC; + + /* Carve out a backup range. This may be smaller than the br given */ + backup_bi.bi_sector = backup_br->sector; + backup_bi.bi_size = min(range_size(backup_br), (u64) bi_iter->bi_size); + ret = split_range(bc, &backup_br, &backup_bi); + if (ret) + return ret; + + /* + * Carve out a changed range. This will not be smaller than the backup + * br since the backup br is smaller than the source range and iterator + */ + bi_iter->bi_size = backup_bi.bi_size; + ret = split_range(bc, &br, bi_iter); + if (ret) + return ret; + if (range_size(br) != range_size(backup_br)) { + WARN_ON(1); + return BLK_STS_IOERR; + } + + + /* Copy data over */ + ret = copy_data(bc, br, backup_br, record_checksum ? &checksum : NULL); + if (ret) + return ret; + + /* Add an entry to the log */ + log_source = br->sector; + log_dest = backup_br->sector; + log_size = range_size(br); + + /* + * Set the types. Note that since set_type also amalgamates ranges + * we have to set both sectors to their final type before calling + * set_type on either + */ + original_type = br->type; + sector0 = backup_br->sector; + bc->trims_total -= range_size(backup_br); + if (backup_br->type == TRIMMED) + list_del(&backup_br->trimmed_list); + backup_br->type = br->type == SECTOR0_CURRENT ? SECTOR0_CURRENT + : BACKUP; + br->type = CHANGED; + set_type(bc, &backup_br, backup_br->type); + + /* + * Add the log entry after marking the backup sector, since adding a log + * can cause another backup + */ + ret = add_log_entry(bc, log_source, log_dest, log_size, checksum); + if (ret) { + br->type = original_type; + return ret; + } + + /* Now it is safe to mark this backup successful */ + if (original_type == SECTOR0_CURRENT) + bc->log_sector->sector0 = sector0; + + set_type(bc, &br, br->type); + return ret; +} + +static int prepare_free_range(struct bow_context *bc, struct bow_range *br, + struct bvec_iter *bi_iter) +{ + int ret; + + ret = split_range(bc, &br, bi_iter); + if (ret) + return ret; + set_type(bc, &br, CHANGED); + return BLK_STS_OK; +} + +static int prepare_changed_range(struct bow_context *bc, struct bow_range *br, + struct bvec_iter *bi_iter) +{ + /* Nothing to do ... */ + return BLK_STS_OK; +} + +static int prepare_one_range(struct bow_context *bc, + struct bvec_iter *bi_iter) +{ + struct bow_range *br = find_first_overlapping_range(&bc->ranges, + bi_iter); + switch (br->type) { + case CHANGED: + return prepare_changed_range(bc, br, bi_iter); + + case TRIMMED: + return prepare_free_range(bc, br, bi_iter); + + case UNCHANGED: + case BACKUP: + return prepare_unchanged_range(bc, br, bi_iter, true); + + /* + * We cannot track the checksum for the active sector0, since it + * may change at any point. + */ + case SECTOR0_CURRENT: + return prepare_unchanged_range(bc, br, bi_iter, false); + + case SECTOR0: /* Handled in the dm_bow_map */ + case TOP: /* Illegal - top is off the end of the device */ + default: + WARN_ON(1); + return BLK_STS_IOERR; + } +} + +struct write_work { + struct work_struct work; + struct bow_context *bc; + struct bio *bio; +}; + +static void bow_write(struct work_struct *work) +{ + struct write_work *ww = container_of(work, struct write_work, work); + struct bow_context *bc = ww->bc; + struct bio *bio = ww->bio; + struct bvec_iter bi_iter = bio->bi_iter; + int ret = BLK_STS_OK; + + kfree(ww); + + mutex_lock(&bc->ranges_lock); + do { + ret = prepare_one_range(bc, &bi_iter); + bi_iter.bi_sector += bi_iter.bi_size / SECTOR_SIZE; + bi_iter.bi_size = bio->bi_iter.bi_size + - (bi_iter.bi_sector - bio->bi_iter.bi_sector) + * SECTOR_SIZE; + } while (!ret && bi_iter.bi_size); + + mutex_unlock(&bc->ranges_lock); + + if (!ret) { + bio_set_dev(bio, bc->dev->bdev); + submit_bio(bio); + } else { + DMERR("Write failure with error %d", -ret); + bio->bi_status = ret; + bio_endio(bio); + } +} + +static int queue_write(struct bow_context *bc, struct bio *bio) +{ + struct write_work *ww = kmalloc(sizeof(*ww), GFP_NOIO | __GFP_NORETRY + | __GFP_NOMEMALLOC | __GFP_NOWARN); + if (!ww) { + DMERR("Failed to allocate write_work"); + return -ENOMEM; + } + + INIT_WORK(&ww->work, bow_write); + ww->bc = bc; + ww->bio = bio; + queue_work(bc->workqueue, &ww->work); + return DM_MAPIO_SUBMITTED; +} + +static int handle_sector0(struct bow_context *bc, struct bio *bio) +{ + int ret = DM_MAPIO_REMAPPED; + + if (bio->bi_iter.bi_size > bc->block_size) { + struct bio * split = bio_split(bio, + bc->block_size >> SECTOR_SHIFT, + GFP_NOIO, + &fs_bio_set); + if (!split) { + DMERR("Failed to split bio"); + bio->bi_status = BLK_STS_RESOURCE; + bio_endio(bio); + return DM_MAPIO_SUBMITTED; + } + + bio_chain(split, bio); + split->bi_iter.bi_sector = bc->log_sector->sector0; + bio_set_dev(split, bc->dev->bdev); + submit_bio(split); + + if (bio_data_dir(bio) == WRITE) + ret = queue_write(bc, bio); + } else { + bio->bi_iter.bi_sector = bc->log_sector->sector0; + } + + return ret; +} + +static int add_trim(struct bow_context *bc, struct bio *bio) +{ + struct bow_range *br; + struct bvec_iter bi_iter = bio->bi_iter; + + DMDEBUG("add_trim: %llu, %u", + (unsigned long long)bio->bi_iter.bi_sector, + bio->bi_iter.bi_size); + + do { + br = find_first_overlapping_range(&bc->ranges, &bi_iter); + + switch (br->type) { + case UNCHANGED: + if (!split_range(bc, &br, &bi_iter)) + set_type(bc, &br, TRIMMED); + break; + + case TRIMMED: + /* Nothing to do */ + break; + + default: + /* No other case is legal in TRIM state */ + WARN_ON(true); + break; + } + + bi_iter.bi_sector += bi_iter.bi_size / SECTOR_SIZE; + bi_iter.bi_size = bio->bi_iter.bi_size + - (bi_iter.bi_sector - bio->bi_iter.bi_sector) + * SECTOR_SIZE; + + } while (bi_iter.bi_size); + + bio_endio(bio); + return DM_MAPIO_SUBMITTED; +} + +static int remove_trim(struct bow_context *bc, struct bio *bio) +{ + struct bow_range *br; + struct bvec_iter bi_iter = bio->bi_iter; + + DMDEBUG("remove_trim: %llu, %u", + (unsigned long long)bio->bi_iter.bi_sector, + bio->bi_iter.bi_size); + + do { + br = find_first_overlapping_range(&bc->ranges, &bi_iter); + + switch (br->type) { + case UNCHANGED: + /* Nothing to do */ + break; + + case TRIMMED: + if (!split_range(bc, &br, &bi_iter)) + set_type(bc, &br, UNCHANGED); + break; + + default: + /* No other case is legal in TRIM state */ + WARN_ON(true); + break; + } + + bi_iter.bi_sector += bi_iter.bi_size / SECTOR_SIZE; + bi_iter.bi_size = bio->bi_iter.bi_size + - (bi_iter.bi_sector - bio->bi_iter.bi_sector) + * SECTOR_SIZE; + + } while (bi_iter.bi_size); + + return DM_MAPIO_REMAPPED; +} + +int remap_unless_illegal_trim(struct bow_context *bc, struct bio *bio) +{ + if (!bc->forward_trims && bio_op(bio) == REQ_OP_DISCARD) { + bio->bi_status = BLK_STS_NOTSUPP; + bio_endio(bio); + return DM_MAPIO_SUBMITTED; + } else { + bio_set_dev(bio, bc->dev->bdev); + return DM_MAPIO_REMAPPED; + } +} + +/****** dm interface ******/ + +static int dm_bow_map(struct dm_target *ti, struct bio *bio) +{ + int ret = DM_MAPIO_REMAPPED; + struct bow_context *bc = ti->private; + + if (likely(bc->state.counter == COMMITTED)) + return remap_unless_illegal_trim(bc, bio); + + if (bio_data_dir(bio) == READ && bio->bi_iter.bi_sector != 0) + return remap_unless_illegal_trim(bc, bio); + + if (bio->bi_iter.bi_size == 0) + return remap_unless_illegal_trim(bc, bio); + + if (atomic_read(&bc->state) != COMMITTED) { + enum state state; + + mutex_lock(&bc->ranges_lock); + state = atomic_read(&bc->state); + if (state == TRIM) { + if (bio_op(bio) == REQ_OP_DISCARD) + ret = add_trim(bc, bio); + else if (bio_data_dir(bio) == WRITE) + ret = remove_trim(bc, bio); + /* else pass-through */ + } else if (state == CHECKPOINT) { + if (bio->bi_iter.bi_sector == 0) + ret = handle_sector0(bc, bio); + else if (bio_data_dir(bio) == WRITE) + ret = queue_write(bc, bio); + /* else pass-through */ + } + /* else pass-through */ + mutex_unlock(&bc->ranges_lock); + } + + if (ret == DM_MAPIO_REMAPPED) + return remap_unless_illegal_trim(bc, bio); + + return ret; +} + +static void dm_bow_tablestatus(struct dm_target *ti, char *result, + unsigned int maxlen) +{ + char *end = result + maxlen; + struct bow_context *bc = ti->private; + struct rb_node *i; + int trimmed_list_length = 0; + int trimmed_range_count = 0; + struct bow_range *br; + + if (maxlen == 0) + return; + result[0] = 0; + + list_for_each_entry(br, &bc->trimmed_list, trimmed_list) + if (br->type == TRIMMED) { + ++trimmed_list_length; + } else { + scnprintf(result, end - result, + "ERROR: non-trimmed entry in trimmed_list"); + return; + } + + if (!rb_first(&bc->ranges)) { + scnprintf(result, end - result, "ERROR: Empty ranges"); + return; + } + + if (container_of(rb_first(&bc->ranges), struct bow_range, node) + ->sector) { + scnprintf(result, end - result, + "ERROR: First range does not start at sector 0"); + return; + } + + for (i = rb_first(&bc->ranges); i; i = rb_next(i)) { + struct bow_range *br = container_of(i, struct bow_range, node); + + result += scnprintf(result, end - result, "%s: %llu", + readable_type[br->type], + (unsigned long long)br->sector); + if (result >= end) + return; + + result += scnprintf(result, end - result, "\n"); + if (result >= end) + return; + + if (br->type == TRIMMED) + ++trimmed_range_count; + + if (br->type == TOP) { + if (br->sector != ti->len) { + scnprintf(result, end - result, + "\nERROR: Top sector is incorrect"); + } + + if (&br->node != rb_last(&bc->ranges)) { + scnprintf(result, end - result, + "\nERROR: Top sector is not last"); + } + + break; + } + + if (!rb_next(i)) { + scnprintf(result, end - result, + "\nERROR: Last range not of type TOP"); + return; + } + + if (br->sector > range_top(br)) { + scnprintf(result, end - result, + "\nERROR: sectors out of order"); + return; + } + } + + if (trimmed_range_count != trimmed_list_length) + scnprintf(result, end - result, + "\nERROR: not all trimmed ranges in trimmed list"); +} + +static void dm_bow_status(struct dm_target *ti, status_type_t type, + unsigned int status_flags, char *result, + unsigned int maxlen) +{ + switch (type) { + case STATUSTYPE_INFO: + case STATUSTYPE_IMA: + if (maxlen) + result[0] = 0; + break; + + case STATUSTYPE_TABLE: + dm_bow_tablestatus(ti, result, maxlen); + break; + } +} + +int dm_bow_prepare_ioctl(struct dm_target *ti, struct block_device **bdev) +{ + struct bow_context *bc = ti->private; + struct dm_dev *dev = bc->dev; + + *bdev = dev->bdev; + /* Only pass ioctls through if the device sizes match exactly. */ + return ti->len != bdev_nr_sectors(dev->bdev); +} + +static int dm_bow_iterate_devices(struct dm_target *ti, + iterate_devices_callout_fn fn, void *data) +{ + struct bow_context *bc = ti->private; + + return fn(ti, bc->dev, 0, ti->len, data); +} + +static struct target_type bow_target = { + .name = "bow", + .version = {1, 2, 0}, + .features = DM_TARGET_PASSES_CRYPTO, + .module = THIS_MODULE, + .ctr = dm_bow_ctr, + .resume = dm_bow_resume, + .dtr = dm_bow_dtr, + .map = dm_bow_map, + .status = dm_bow_status, + .prepare_ioctl = dm_bow_prepare_ioctl, + .iterate_devices = dm_bow_iterate_devices, + .io_hints = dm_bow_io_hints, +}; + +int __init dm_bow_init(void) +{ + int r = dm_register_target(&bow_target); + + if (r < 0) + DMERR("registering bow failed %d", r); + return r; +} + +void dm_bow_exit(void) +{ + dm_unregister_target(&bow_target); +} + +MODULE_LICENSE("GPL"); + +module_init(dm_bow_init); +module_exit(dm_bow_exit); diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 735dfd57a5bd..cb9abe7f72be 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1068,8 +1068,10 @@ static int mmc_blk_reset(struct mmc_blk_data *md, struct mmc_host *host, * in that case. */ main_md->part_curr = err ? MMC_BLK_PART_INVALID : main_md->part_type; - if (err) + if (err) { + trace_android_vh_mmc_blk_reset(host, err); return err; + } /* Ensure we switch back to the correct partition */ if (mmc_blk_part_switch(host->card, md->part_type)) /* diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 155fe16ea281..5efcf9a9e034 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1885,5 +1885,7 @@ err: pr_err("%s: error %d whilst initialising SD card\n", mmc_hostname(host), err); + trace_android_vh_mmc_attach_sd(host, err); + return err; } diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c index d5145c1ee81e..d7a6014392df 100644 --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "slot-gpio.h" @@ -31,6 +32,8 @@ static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id) struct mmc_host *host = dev_id; struct mmc_gpio *ctx = host->slot.handler_priv; + trace_android_vh_mmc_gpio_cd_irqt(host); + host->trigger_card_event = true; mmc_detect_change(host, msecs_to_jiffies(ctx->cd_debounce_delay_ms)); diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 536d21028a11..071aa16baa98 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "sdhci.h" @@ -2502,6 +2503,8 @@ static int sdhci_get_cd(struct mmc_host *mmc) if (!mmc_card_is_removable(mmc)) return 1; + trace_android_vh_sdhci_get_cd(host); + /* * Try slot gpio detect, if defined it take precedence * over build in controller functionality diff --git a/drivers/of/property.c b/drivers/of/property.c index da5d71219770..b2f20e2192d7 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1095,7 +1095,8 @@ static struct device_node *of_get_compat_node_parent(struct device_node *np) } static void of_link_to_phandle(struct device_node *con_np, - struct device_node *sup_np) + struct device_node *sup_np, + u8 flags) { struct device_node *tmp_np = of_node_get(sup_np); @@ -1114,7 +1115,7 @@ static void of_link_to_phandle(struct device_node *con_np, tmp_np = of_get_next_parent(tmp_np); } - fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np)); + fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np), flags); } /** @@ -1227,6 +1228,8 @@ static struct device_node *parse_##fname(struct device_node *np, \ * @node_not_dev: The consumer node containing the property is never converted * to a struct device. Instead, parse ancestor nodes for the * compatible property to find a node corresponding to a device. + * @fwlink_flags: Optional fwnode link flags to use when creating a fwnode link + * for this property. * * Returns: * parse_prop() return values are @@ -1239,6 +1242,7 @@ struct supplier_bindings { const char *prop_name, int index); bool optional; bool node_not_dev; + u8 fwlink_flags; }; DEFINE_SIMPLE_PROP(clocks, "clocks", "#clock-cells") @@ -1268,6 +1272,7 @@ DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells") DEFINE_SIMPLE_PROP(leds, "leds", NULL) DEFINE_SIMPLE_PROP(backlight, "backlight", NULL) DEFINE_SIMPLE_PROP(panel, "panel", NULL) +DEFINE_SIMPLE_PROP(post_init_providers, "post-init-providers", NULL) DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") @@ -1373,6 +1378,10 @@ static const struct supplier_bindings of_supplier_bindings[] = { { .parse_prop = parse_regulators, }, { .parse_prop = parse_gpio, }, { .parse_prop = parse_gpios, }, + { + .parse_prop = parse_post_init_providers, + .fwlink_flags = FWLINK_FLAG_IGNORE, + }, {} }; @@ -1417,7 +1426,7 @@ static int of_link_property(struct device_node *con_np, const char *prop_name) : of_node_get(con_np); matched = true; i++; - of_link_to_phandle(con_dev_np, phandle); + of_link_to_phandle(con_dev_np, phandle, s->fwlink_flags); of_node_put(phandle); of_node_put(con_dev_np); } diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c index fd3020a399cf..d3924a44db02 100644 --- a/drivers/pci/controller/pci-host-common.c +++ b/drivers/pci/controller/pci-host-common.c @@ -73,6 +73,10 @@ int pci_host_common_probe(struct platform_device *pdev) if (IS_ERR(cfg)) return PTR_ERR(cfg); + /* Do not reassign resources if probe only */ + if (!pci_has_flag(PCI_PROBE_ONLY)) + pci_add_flags(PCI_REASSIGN_ALL_BUS); + bridge->sysdata = cfg; bridge->ops = (struct pci_ops *)&ops->pci_ops; bridge->msi_domain = true; diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 1ac7fec47d6f..b54fbdaf9020 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -486,7 +486,6 @@ void pcie_port_device_remove(struct pci_dev *dev) { device_for_each_child(&dev->dev, NULL, remove_iter); pci_free_irq_vectors(dev); - pci_disable_device(dev); } /** diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 7f8788a970ae..ad3f0bc12b5b 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -148,6 +148,19 @@ static void pcie_portdrv_remove(struct pci_dev *dev) } pcie_port_device_remove(dev); + + pci_disable_device(dev); +} + +static void pcie_portdrv_shutdown(struct pci_dev *dev) +{ + if (pci_bridge_d3_possible(dev)) { + pm_runtime_forbid(&dev->dev); + pm_runtime_get_noresume(&dev->dev); + pm_runtime_dont_use_autosuspend(&dev->dev); + } + + pcie_port_device_remove(dev); } static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, @@ -198,7 +211,7 @@ static struct pci_driver pcie_portdriver = { .probe = pcie_portdrv_probe, .remove = pcie_portdrv_remove, - .shutdown = pcie_portdrv_remove, + .shutdown = pcie_portdrv_shutdown, .err_handler = &pcie_portdrv_err_handler, diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 5f986e181e69..7a2b7ec6d423 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -3075,18 +3075,20 @@ int pci_host_probe(struct pci_host_bridge *bridge) bus = bridge->bus; - /* If we must preserve the resource configuration, claim now */ - if (bridge->preserve_config) - pci_bus_claim_resources(bus); - /* - * Assign whatever was left unassigned. If we didn't claim above, - * this will reassign everything. + * We insert PCI resources into the iomem_resource and + * ioport_resource trees in either pci_bus_claim_resources() + * or pci_bus_assign_resources(). */ - pci_assign_unassigned_root_bus_resources(bus); + if (pci_has_flag(PCI_PROBE_ONLY)) { + pci_bus_claim_resources(bus); + } else { + pci_bus_size_bridges(bus); + pci_bus_assign_resources(bus); - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); + list_for_each_entry(child, &bus->children, node) + pcie_bus_configure_settings(child); + } pci_bus_add_devices(bus); return 0; diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 3b6051d63218..9a67dc064c73 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -220,6 +220,9 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev, /* Set owner */ pindesc->pctldev = pctldev; +#ifdef CONFIG_PINMUX + mutex_init(&pindesc->mux_lock); +#endif /* Copy basic pin info */ if (pin->name) { diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 840103c40c14..f5e4ca19c17b 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h @@ -167,6 +167,7 @@ struct pin_desc { const char *mux_owner; const struct pinctrl_setting_mux *mux_setting; const char *gpio_owner; + struct mutex mux_lock; #endif }; diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index f94d43b082d9..e54eeb53f5ac 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -13,6 +13,7 @@ #define pr_fmt(fmt) "pinmux core: " fmt #include +#include #include #include #include @@ -90,6 +91,7 @@ bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev, unsigned pin) if (!desc || !ops) return true; + guard(mutex)(&desc->mux_lock); if (ops->strict && desc->mux_usecount) return false; @@ -124,29 +126,31 @@ static int pin_request(struct pinctrl_dev *pctldev, dev_dbg(pctldev->dev, "request pin %d (%s) for %s\n", pin, desc->name, owner); - if ((!gpio_range || ops->strict) && - desc->mux_usecount && strcmp(desc->mux_owner, owner)) { - dev_err(pctldev->dev, - "pin %s already requested by %s; cannot claim for %s\n", - desc->name, desc->mux_owner, owner); - goto out; - } + scoped_guard(mutex, &desc->mux_lock) { + if ((!gpio_range || ops->strict) && + desc->mux_usecount && strcmp(desc->mux_owner, owner)) { + dev_err(pctldev->dev, + "pin %s already requested by %s; cannot claim for %s\n", + desc->name, desc->mux_owner, owner); + goto out; + } - if ((gpio_range || ops->strict) && desc->gpio_owner) { - dev_err(pctldev->dev, - "pin %s already requested by %s; cannot claim for %s\n", - desc->name, desc->gpio_owner, owner); - goto out; - } + if ((gpio_range || ops->strict) && desc->gpio_owner) { + dev_err(pctldev->dev, + "pin %s already requested by %s; cannot claim for %s\n", + desc->name, desc->gpio_owner, owner); + goto out; + } - if (gpio_range) { - desc->gpio_owner = owner; - } else { - desc->mux_usecount++; - if (desc->mux_usecount > 1) - return 0; + if (gpio_range) { + desc->gpio_owner = owner; + } else { + desc->mux_usecount++; + if (desc->mux_usecount > 1) + return 0; - desc->mux_owner = owner; + desc->mux_owner = owner; + } } /* Let each pin increase references to this module */ @@ -177,12 +181,14 @@ static int pin_request(struct pinctrl_dev *pctldev, out_free_pin: if (status) { - if (gpio_range) { - desc->gpio_owner = NULL; - } else { - desc->mux_usecount--; - if (!desc->mux_usecount) - desc->mux_owner = NULL; + scoped_guard(mutex, &desc->mux_lock) { + if (gpio_range) { + desc->gpio_owner = NULL; + } else { + desc->mux_usecount--; + if (!desc->mux_usecount) + desc->mux_owner = NULL; + } } } out: @@ -218,15 +224,17 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin, return NULL; } - if (!gpio_range) { - /* - * A pin should not be freed more times than allocated. - */ - if (WARN_ON(!desc->mux_usecount)) - return NULL; - desc->mux_usecount--; - if (desc->mux_usecount) - return NULL; + scoped_guard(mutex, &desc->mux_lock) { + if (!gpio_range) { + /* + * A pin should not be freed more times than allocated. + */ + if (WARN_ON(!desc->mux_usecount)) + return NULL; + desc->mux_usecount--; + if (desc->mux_usecount) + return NULL; + } } /* @@ -238,13 +246,15 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin, else if (ops->free) ops->free(pctldev, pin); - if (gpio_range) { - owner = desc->gpio_owner; - desc->gpio_owner = NULL; - } else { - owner = desc->mux_owner; - desc->mux_owner = NULL; - desc->mux_setting = NULL; + scoped_guard(mutex, &desc->mux_lock) { + if (gpio_range) { + owner = desc->gpio_owner; + desc->gpio_owner = NULL; + } else { + owner = desc->mux_owner; + desc->mux_owner = NULL; + desc->mux_setting = NULL; + } } module_put(pctldev->owner); @@ -458,7 +468,8 @@ int pinmux_enable_setting(const struct pinctrl_setting *setting) pins[i]); continue; } - desc->mux_setting = &(setting->data.mux); + scoped_guard(mutex, &desc->mux_lock) + desc->mux_setting = &(setting->data.mux); } ret = ops->set_mux(pctldev, setting->data.mux.func, @@ -472,8 +483,10 @@ int pinmux_enable_setting(const struct pinctrl_setting *setting) err_set_mux: for (i = 0; i < num_pins; i++) { desc = pin_desc_get(pctldev, pins[i]); - if (desc) - desc->mux_setting = NULL; + if (desc) { + scoped_guard(mutex, &desc->mux_lock) + desc->mux_setting = NULL; + } } err_pin_request: /* On error release all taken pins */ @@ -492,6 +505,7 @@ void pinmux_disable_setting(const struct pinctrl_setting *setting) unsigned num_pins = 0; int i; struct pin_desc *desc; + bool is_equal; if (pctlops->get_group_pins) ret = pctlops->get_group_pins(pctldev, setting->data.mux.group, @@ -517,7 +531,10 @@ void pinmux_disable_setting(const struct pinctrl_setting *setting) pins[i]); continue; } - if (desc->mux_setting == &(setting->data.mux)) { + scoped_guard(mutex, &desc->mux_lock) + is_equal = (desc->mux_setting == &(setting->data.mux)); + + if (is_equal) { pin_free(pctldev, pins[i], NULL); } else { const char *gname; @@ -609,40 +626,42 @@ static int pinmux_pins_show(struct seq_file *s, void *what) if (desc == NULL) continue; - if (desc->mux_owner && - !strcmp(desc->mux_owner, pinctrl_dev_get_name(pctldev))) - is_hog = true; + scoped_guard(mutex, &desc->mux_lock) { + if (desc->mux_owner && + !strcmp(desc->mux_owner, pinctrl_dev_get_name(pctldev))) + is_hog = true; - if (pmxops->strict) { - if (desc->mux_owner) - seq_printf(s, "pin %d (%s): device %s%s", - pin, desc->name, desc->mux_owner, + if (pmxops->strict) { + if (desc->mux_owner) + seq_printf(s, "pin %d (%s): device %s%s", + pin, desc->name, desc->mux_owner, + is_hog ? " (HOG)" : ""); + else if (desc->gpio_owner) + seq_printf(s, "pin %d (%s): GPIO %s", + pin, desc->name, desc->gpio_owner); + else + seq_printf(s, "pin %d (%s): UNCLAIMED", + pin, desc->name); + } else { + /* For non-strict controllers */ + seq_printf(s, "pin %d (%s): %s %s%s", pin, desc->name, + desc->mux_owner ? desc->mux_owner + : "(MUX UNCLAIMED)", + desc->gpio_owner ? desc->gpio_owner + : "(GPIO UNCLAIMED)", is_hog ? " (HOG)" : ""); - else if (desc->gpio_owner) - seq_printf(s, "pin %d (%s): GPIO %s", - pin, desc->name, desc->gpio_owner); - else - seq_printf(s, "pin %d (%s): UNCLAIMED", - pin, desc->name); - } else { - /* For non-strict controllers */ - seq_printf(s, "pin %d (%s): %s %s%s", pin, desc->name, - desc->mux_owner ? desc->mux_owner - : "(MUX UNCLAIMED)", - desc->gpio_owner ? desc->gpio_owner - : "(GPIO UNCLAIMED)", - is_hog ? " (HOG)" : ""); - } + } - /* If mux: print function+group claiming the pin */ - if (desc->mux_setting) - seq_printf(s, " function %s group %s\n", - pmxops->get_function_name(pctldev, - desc->mux_setting->func), - pctlops->get_group_name(pctldev, - desc->mux_setting->group)); - else - seq_putc(s, '\n'); + /* If mux: print function+group claiming the pin */ + if (desc->mux_setting) + seq_printf(s, " function %s group %s\n", + pmxops->get_function_name(pctldev, + desc->mux_setting->func), + pctlops->get_group_name(pctldev, + desc->mux_setting->group)); + else + seq_putc(s, '\n'); + } } mutex_unlock(&pctldev->mutex); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 73caef6d0c95..3f437627415a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3764,6 +3764,9 @@ static int sd_resume_common(struct device *dev) if (!sdkp) /* E.g.: runtime resume at the start of sd_probe() */ return 0; + if (!sdkp->device->manage_start_stop) + return 0; + sd_printk(KERN_NOTICE, sdkp, "Starting disk\n"); ret = sd_start_stop_device(sdkp, 1); diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 814042f6a7b2..ee3ad24063df 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -40,6 +40,16 @@ #include "debug.h" +/* + * For type visibility (http://b/236036821) + */ +const struct dwc3 *const ANDROID_GKI_struct_dwc3; +EXPORT_SYMBOL_GPL(ANDROID_GKI_struct_dwc3); + +#ifndef __GENKSYMS__ +#include "../host/xhci.h" +#endif + #define DWC3_DEFAULT_AUTOSUSPEND_DELAY 5000 /* ms */ /** @@ -106,23 +116,29 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) void dwc3_enable_susphy(struct dwc3 *dwc, bool enable) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); u32 reg; + int i; - reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); - if (enable && !dwc->dis_u3_susphy_quirk) - reg |= DWC3_GUSB3PIPECTL_SUSPHY; - else - reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; + for (i = 0; i < vdwc->num_usb3_ports; i++) { + reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(i)); + if (enable && !dwc->dis_u3_susphy_quirk) + reg |= DWC3_GUSB3PIPECTL_SUSPHY; + else + reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i), reg); + } - reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); - if (enable && !dwc->dis_u2_susphy_quirk) - reg |= DWC3_GUSB2PHYCFG_SUSPHY; - else - reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + for (i = 0; i < vdwc->num_usb2_ports; i++) { + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(i)); + if (enable && !dwc->dis_u2_susphy_quirk) + reg |= DWC3_GUSB2PHYCFG_SUSPHY; + else + reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), reg); + } } void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) @@ -140,9 +156,11 @@ void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) static void __dwc3_set_mode(struct work_struct *work) { struct dwc3 *dwc = work_to_dwc(work); + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); unsigned long flags; int ret; u32 reg; + int i; u32 desired_dr_role; mutex_lock(&dwc->mutex); @@ -221,8 +239,14 @@ static void __dwc3_set_mode(struct work_struct *work) } else { if (dwc->usb2_phy) otg_set_vbus(dwc->usb2_phy->otg, true); + phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_set_mode(vdwc->usb2_generic_phy[i], PHY_MODE_USB_HOST); phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_HOST); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_set_mode(vdwc->usb3_generic_phy[i], PHY_MODE_USB_HOST); + if (dwc->dis_split_quirk) { reg = dwc3_readl(dwc->regs, DWC3_GUCTL3); reg |= DWC3_GUCTL3_SPLITDISABLE; @@ -707,19 +731,11 @@ static int dwc3_core_ulpi_init(struct dwc3 *dwc) return ret; } -/** - * dwc3_phy_setup - Configure USB PHY Interface of DWC3 Core - * @dwc: Pointer to our controller context structure - * - * Returns 0 on success. The USB PHY interfaces are configured but not - * initialized. The PHY interfaces and the PHYs get initialized together with - * the core in dwc3_core_init. - */ -static int dwc3_phy_setup(struct dwc3 *dwc) +static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index) { u32 reg; - reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); + reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(index)); /* * Make sure UX_EXIT_PX is cleared as that causes issues with some @@ -766,9 +782,18 @@ static int dwc3_phy_setup(struct dwc3 *dwc) if (dwc->dis_del_phy_power_chg_quirk) reg &= ~DWC3_GUSB3PIPECTL_DEPOCHANGE; - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(index), reg); - reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); + return 0; +} + +static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index) +{ + unsigned int hw_mode; + u32 reg; + + hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0); + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index)); /* Select the HS PHY interface */ switch (DWC3_GHWPARAMS3_HSPHY_IFC(dwc->hwparams.hwparams3)) { @@ -780,7 +805,7 @@ static int dwc3_phy_setup(struct dwc3 *dwc) } else if (dwc->hsphy_interface && !strncmp(dwc->hsphy_interface, "ulpi", 4)) { reg |= DWC3_GUSB2PHYCFG_ULPI_UTMI; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(index), reg); } else { /* Relying on default value. */ if (!(reg & DWC3_GUSB2PHYCFG_ULPI_UTMI)) @@ -828,7 +853,36 @@ static int dwc3_phy_setup(struct dwc3 *dwc) if (dwc->dis_u2_freeclk_exists_quirk || dwc->gfladj_refclk_lpm_sel) reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(index), reg); + + return 0; +} + +/** + * dwc3_phy_setup - Configure USB PHY Interface of DWC3 Core + * @dwc: Pointer to our controller context structure + * + * Returns 0 on success. The USB PHY interfaces are configured but not + * initialized. The PHY interfaces and the PHYs get initialized together with + * the core in dwc3_core_init. + */ +static int dwc3_phy_setup(struct dwc3 *dwc) +{ + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); + int i; + int ret; + + for (i = 0; i < vdwc->num_usb3_ports; i++) { + ret = dwc3_ss_phy_setup(dwc, i); + if (ret) + return ret; + } + + for (i = 0; i < vdwc->num_usb2_ports; i++) { + ret = dwc3_hs_phy_setup(dwc, i); + if (ret) + return ret; + } return 0; } @@ -867,17 +921,30 @@ static void dwc3_clk_disable(struct dwc3 *dwc) static void dwc3_core_exit(struct dwc3 *dwc) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); + int i; + dwc3_event_buffers_cleanup(dwc); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); + phy_power_off(dwc->usb2_generic_phy); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_power_off(vdwc->usb2_generic_phy[i]); phy_power_off(dwc->usb3_generic_phy); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_power_off(vdwc->usb3_generic_phy[i]); usb_phy_shutdown(dwc->usb2_phy); usb_phy_shutdown(dwc->usb3_phy); + phy_exit(dwc->usb2_generic_phy); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_exit(vdwc->usb2_generic_phy[i]); phy_exit(dwc->usb3_generic_phy); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_exit(vdwc->usb3_generic_phy[i]); dwc3_clk_disable(dwc); reset_control_assert(dwc->reset); @@ -1110,9 +1177,11 @@ static void dwc3_set_power_down_clk_scale(struct dwc3 *dwc) */ static int dwc3_core_init(struct dwc3 *dwc) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); unsigned int hw_mode; u32 reg; int ret; + int i, j; hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0); @@ -1147,26 +1216,37 @@ static int dwc3_core_init(struct dwc3 *dwc) usb_phy_init(dwc->usb2_phy); usb_phy_init(dwc->usb3_phy); + ret = phy_init(dwc->usb2_generic_phy); if (ret < 0) goto err0a; + for (i = 1; i < vdwc->num_usb2_ports; i++) { + ret = phy_init(vdwc->usb2_generic_phy[i]); + if (ret < 0) + goto exit_usb2_phy; + } + ret = phy_init(dwc->usb3_generic_phy); - if (ret < 0) { - phy_exit(dwc->usb2_generic_phy); - goto err0a; + if (ret < 0) + goto exit_usb2_phy; + + for (i = 1; i < vdwc->num_usb3_ports; i++) { + ret = phy_init(vdwc->usb3_generic_phy[i]); + if (ret < 0) + goto exit_usb3_phy; } ret = dwc3_core_soft_reset(dwc); if (ret) - goto err1; + goto exit_usb3_phy; dwc3_core_setup_global_control(dwc); dwc3_core_num_eps(dwc); ret = dwc3_setup_scratch_buffers(dwc); if (ret) - goto err1; + goto exit_usb3_phy; /* Set power down scale of suspend_clk */ dwc3_set_power_down_clk_scale(dwc); @@ -1181,18 +1261,31 @@ static int dwc3_core_init(struct dwc3 *dwc) usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); + ret = phy_power_on(dwc->usb2_generic_phy); if (ret < 0) - goto err2; + goto set_suspend_phy; + + for (i = 1; i < vdwc->num_usb2_ports; i++) { + ret = phy_power_on(vdwc->usb2_generic_phy[i]); + if (ret < 0) + goto power_off_usb2_phy; + } ret = phy_power_on(dwc->usb3_generic_phy); if (ret < 0) - goto err3; + goto power_off_usb2_phy; + + for (i = 1; i < vdwc->num_usb3_ports; i++) { + ret = phy_power_on(vdwc->usb3_generic_phy[i]); + if (ret < 0) + goto power_off_usb3_phy; + } ret = dwc3_event_buffers_setup(dwc); if (ret) { dev_err(dwc->dev, "failed to setup event buffers\n"); - goto err4; + goto power_off_usb3_phy; } /* @@ -1323,21 +1416,39 @@ static int dwc3_core_init(struct dwc3 *dwc) return 0; -err4: +/* + * Modified error handling for multiport phys: + * (http://b/233985973) + */ +power_off_usb3_phy: + for (j = i - 1; j > 0; j--) + phy_power_off(vdwc->usb3_generic_phy[j]); phy_power_off(dwc->usb3_generic_phy); + i = vdwc->num_usb2_ports; -err3: +power_off_usb2_phy: + for (j = i - 1; j > 0; j--) + phy_power_off(vdwc->usb2_generic_phy[j]); phy_power_off(dwc->usb2_generic_phy); + i = vdwc->num_usb3_ports; -err2: +set_suspend_phy: usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); -err1: +exit_usb3_phy: + for (j = i - 1; j > 0; j--) + phy_exit(vdwc->usb3_generic_phy[j]); + phy_exit(dwc->usb3_generic_phy); + i = vdwc->num_usb2_ports; + +exit_usb2_phy: + for (j = i - 1; j > 0; j--) + phy_exit(vdwc->usb2_generic_phy[j]); + phy_exit(dwc->usb2_generic_phy); + usb_phy_shutdown(dwc->usb2_phy); usb_phy_shutdown(dwc->usb3_phy); - phy_exit(dwc->usb2_generic_phy); - phy_exit(dwc->usb3_generic_phy); err0a: dwc3_ulpi_exit(dwc); @@ -1348,9 +1459,13 @@ err0: static int dwc3_core_get_phy(struct dwc3 *dwc) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); struct device *dev = dwc->dev; struct device_node *node = dev->of_node; + struct phy *temp_phy = NULL; + char phy_name[9]; int ret; + int i; if (node) { dwc->usb2_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 0); @@ -1376,22 +1491,48 @@ static int dwc3_core_get_phy(struct dwc3 *dwc) return dev_err_probe(dev, ret, "no usb3 phy configured\n"); } - dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy"); - if (IS_ERR(dwc->usb2_generic_phy)) { - ret = PTR_ERR(dwc->usb2_generic_phy); - if (ret == -ENOSYS || ret == -ENODEV) - dwc->usb2_generic_phy = NULL; + for (i = 0; i < vdwc->num_usb2_ports; i++) { + if (vdwc->num_usb2_ports == 1) + snprintf(phy_name, sizeof(phy_name), "usb2-phy"); else - return dev_err_probe(dev, ret, "no usb2 phy configured\n"); + snprintf(phy_name, sizeof(phy_name), "usb2-%d", i); + + temp_phy = devm_phy_get(dev, phy_name); + if (IS_ERR(temp_phy)) { + ret = PTR_ERR(temp_phy); + if (ret == -ENOSYS || ret == -ENODEV) + temp_phy = NULL; + else + return dev_err_probe(dev, ret, "failed to lookup phy %s\n", + phy_name); + } + + if (i == 0) + dwc->usb2_generic_phy = temp_phy; + else + vdwc->usb2_generic_phy[i] = temp_phy; } - dwc->usb3_generic_phy = devm_phy_get(dev, "usb3-phy"); - if (IS_ERR(dwc->usb3_generic_phy)) { - ret = PTR_ERR(dwc->usb3_generic_phy); - if (ret == -ENOSYS || ret == -ENODEV) - dwc->usb3_generic_phy = NULL; + for (i = 0; i < vdwc->num_usb3_ports; i++) { + if (vdwc->num_usb3_ports == 1) + snprintf(phy_name, sizeof(phy_name), "usb3-phy"); else - return dev_err_probe(dev, ret, "no usb3 phy configured\n"); + snprintf(phy_name, sizeof(phy_name), "usb3-%d", i); + + temp_phy = devm_phy_get(dev, phy_name); + if (IS_ERR(temp_phy)) { + ret = PTR_ERR(temp_phy); + if (ret == -ENOSYS || ret == -ENODEV) + temp_phy = NULL; + else + return dev_err_probe(dev, ret, "failed to lookup phy %s\n", + phy_name); + } + + if (i == 0) + dwc->usb3_generic_phy = temp_phy; + else + vdwc->usb3_generic_phy[i] = temp_phy; } return 0; @@ -1399,8 +1540,10 @@ static int dwc3_core_get_phy(struct dwc3 *dwc) static int dwc3_core_init_mode(struct dwc3 *dwc) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); struct device *dev = dwc->dev; int ret; + int i; switch (dwc->dr_mode) { case USB_DR_MODE_PERIPHERAL: @@ -1420,8 +1563,13 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) if (dwc->usb2_phy) otg_set_vbus(dwc->usb2_phy->otg, true); + phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_set_mode(vdwc->usb2_generic_phy[i], PHY_MODE_USB_HOST); phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_HOST); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_set_mode(vdwc->usb3_generic_phy[i], PHY_MODE_USB_HOST); ret = dwc3_host_init(dwc); if (ret) @@ -1779,20 +1927,73 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc) return edev; } +static int dwc3_get_num_ports(struct dwc3 *dwc) +{ + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); + void __iomem *base; + u8 major_revision; + u32 offset; + u32 val; + + /* + * Remap xHCI address space to access XHCI ext cap regs since it is + * needed to get information on number of ports present. + */ + base = ioremap(dwc->xhci_resources[0].start, + resource_size(&dwc->xhci_resources[0])); + if (!base) + return -ENOMEM; + + offset = 0; + do { + offset = xhci_find_next_ext_cap(base, offset, + XHCI_EXT_CAPS_PROTOCOL); + if (!offset) + break; + + val = readl(base + offset); + major_revision = XHCI_EXT_PORT_MAJOR(val); + + val = readl(base + offset + 0x08); + if (major_revision == 0x03) { + vdwc->num_usb3_ports += XHCI_EXT_PORT_COUNT(val); + } else if (major_revision <= 0x02) { + vdwc->num_usb2_ports += XHCI_EXT_PORT_COUNT(val); + } else { + dev_warn(dwc->dev, "unrecognized port major revision %d\n", + major_revision); + } + } while (1); + + dev_dbg(dwc->dev, "hs-ports: %u ss-ports: %u\n", + vdwc->num_usb2_ports, vdwc->num_usb3_ports); + + iounmap(base); + if (vdwc->num_usb2_ports > DWC3_USB2_MAX_PORTS || + vdwc->num_usb3_ports > DWC3_USB3_MAX_PORTS) + return -EINVAL; + + return 0; +} + static int dwc3_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct resource *res, dwc_res; + unsigned int hw_mode; struct dwc3 *dwc; + struct dwc3_vendor *vdwc; int ret; + int i; void __iomem *regs; - dwc = devm_kzalloc(dev, sizeof(*dwc), GFP_KERNEL); - if (!dwc) + vdwc = devm_kzalloc(dev, sizeof(*vdwc), GFP_KERNEL); + if (!vdwc) return -ENOMEM; + dwc = &vdwc->dwc; dwc->dev = dev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -1909,6 +2110,20 @@ static int dwc3_probe(struct platform_device *pdev) goto disable_clks; } + /* + * Currently only DWC3 controllers that are host-only capable + * can have more than one port. + */ + hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0); + if (hw_mode == DWC3_GHWPARAMS0_MODE_HOST) { + ret = dwc3_get_num_ports(dwc); + if (ret) + goto disable_clks; + } else { + vdwc->num_usb2_ports = 1; + vdwc->num_usb3_ports = 1; + } + spin_lock_init(&dwc->lock); mutex_init(&dwc->mutex); @@ -1966,13 +2181,25 @@ err5: usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); - phy_power_off(dwc->usb2_generic_phy); + phy_power_off(dwc->usb3_generic_phy); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_power_off(vdwc->usb3_generic_phy[i]); + + phy_power_off(dwc->usb2_generic_phy); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_power_off(vdwc->usb2_generic_phy[i]); usb_phy_shutdown(dwc->usb2_phy); usb_phy_shutdown(dwc->usb3_phy); - phy_exit(dwc->usb2_generic_phy); + phy_exit(dwc->usb3_generic_phy); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_exit(vdwc->usb3_generic_phy[i]); + + phy_exit(dwc->usb2_generic_phy); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_exit(vdwc->usb2_generic_phy[i]); dwc3_ulpi_exit(dwc); @@ -2058,7 +2285,9 @@ assert_reset: static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); u32 reg; + int i; switch (dwc->current_dr_role) { case DWC3_GCTL_PRTCAP_DEVICE: @@ -2077,17 +2306,22 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) /* Let controller to suspend HSPHY before PHY driver suspends */ if (dwc->dis_u2_susphy_quirk || dwc->dis_enblslpm_quirk) { - reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); - reg |= DWC3_GUSB2PHYCFG_ENBLSLPM | - DWC3_GUSB2PHYCFG_SUSPHY; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); - + for (i = 0; i < vdwc->num_usb2_ports; i++) { + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(i)); + reg |= DWC3_GUSB2PHYCFG_ENBLSLPM | + DWC3_GUSB2PHYCFG_SUSPHY; + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), reg); + } /* Give some time for USB2 PHY to suspend */ usleep_range(5000, 6000); } phy_pm_runtime_put_sync(dwc->usb2_generic_phy); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_pm_runtime_put_sync(vdwc->usb2_generic_phy[i]); phy_pm_runtime_put_sync(dwc->usb3_generic_phy); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_pm_runtime_put_sync(vdwc->usb3_generic_phy[i]); break; case DWC3_GCTL_PRTCAP_OTG: /* do nothing during runtime_suspend */ @@ -2112,8 +2346,10 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg) { + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); int ret; u32 reg; + int i; switch (dwc->current_dr_role) { case DWC3_GCTL_PRTCAP_DEVICE: @@ -2133,17 +2369,23 @@ static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg) break; } /* Restore GUSB2PHYCFG bits that were modified in suspend */ - reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); - if (dwc->dis_u2_susphy_quirk) - reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + for (i = 0; i < vdwc->num_usb2_ports; i++) { + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(i)); + if (dwc->dis_u2_susphy_quirk) + reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; - if (dwc->dis_enblslpm_quirk) - reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; + if (dwc->dis_enblslpm_quirk) + reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), reg); + } phy_pm_runtime_get_sync(dwc->usb2_generic_phy); + for (i = 1; i < vdwc->num_usb2_ports; i++) + phy_pm_runtime_get_sync(vdwc->usb2_generic_phy[i]); phy_pm_runtime_get_sync(dwc->usb3_generic_phy); + for (i = 1; i < vdwc->num_usb3_ports; i++) + phy_pm_runtime_get_sync(vdwc->usb3_generic_phy[i]); break; case DWC3_GCTL_PRTCAP_OTG: /* nothing to do on runtime_resume */ @@ -2355,12 +2597,6 @@ static struct platform_driver dwc3_driver = { module_platform_driver(dwc3_driver); -/* - * For type visibility (http://b/236036821) - */ -const struct dwc3 *const ANDROID_GKI_struct_dwc3; -EXPORT_SYMBOL_GPL(ANDROID_GKI_struct_dwc3); - MODULE_ALIAS("platform:dwc3"); MODULE_AUTHOR("Felipe Balbi "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 0dab74d43dbf..eaaf8ab810ed 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -36,6 +36,13 @@ #include +/* + * DWC3 Multiport controllers support up to 15 High-Speed PHYs + * and 4 SuperSpeed PHYs. + */ +#define DWC3_USB2_MAX_PORTS 15 +#define DWC3_USB3_MAX_PORTS 4 + #define DWC3_MSG_MAX 500 /* Global constants */ @@ -1367,6 +1374,23 @@ struct dwc3 { ANDROID_KABI_RESERVE(4); }; +/** + * struct dwc3_vendor - contains parameters without modifying the format of DWC3 core + * @dwc: contains dwc3 core reference + * @num_usb2_ports: number of USB2 ports + * @num_usb3_ports: number of USB3 ports + * @usb2_generic_phy: pointer to array of USB2 PHYs + * @usb3_generic_phy: pointer to array of USB3 PHYs + */ +struct dwc3_vendor { + struct dwc3 dwc; + u8 num_usb2_ports; + u8 num_usb3_ports; + + struct phy *usb2_generic_phy[DWC3_USB2_MAX_PORTS]; + struct phy *usb3_generic_phy[DWC3_USB3_MAX_PORTS]; +}; + #define INCRX_BURST_MODE 0 #define INCRX_UNDEF_LENGTH_BURST_MODE 1 diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index 57ddd2e43022..68f3eabb145f 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -330,7 +330,9 @@ void dwc3_otg_update(struct dwc3 *dwc, bool ignore_idstatus) int ret; u32 reg; int id; + int i; unsigned long flags; + struct dwc3_vendor *vdwc = container_of(dwc, struct dwc3_vendor, dwc); if (dwc->dr_mode != USB_DR_MODE_OTG) return; @@ -386,9 +388,13 @@ void dwc3_otg_update(struct dwc3 *dwc, bool ignore_idstatus) } else { if (dwc->usb2_phy) otg_set_vbus(dwc->usb2_phy->otg, true); - if (dwc->usb2_generic_phy) - phy_set_mode(dwc->usb2_generic_phy, - PHY_MODE_USB_HOST); + phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST); + for (i = 1; i < vdwc->num_usb2_ports; i++) { + if (vdwc->usb2_generic_phy[i]) { + phy_set_mode(vdwc->usb2_generic_phy[i], + PHY_MODE_USB_HOST); + } + } } break; case DWC3_OTG_ROLE_DEVICE: diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index b0b3347080d1..65210608245d 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -287,6 +287,23 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc); * * Caller should handle locking. This function will issue @cmd with given * @params to @dep and wait for its completion. + * + * According to the programming guide, if the link state is in L1/L2/U3, + * then sending the Start Transfer command may not complete. The + * programming guide suggested to bring the link state back to ON/U0 by + * performing remote wakeup prior to sending the command. However, don't + * initiate remote wakeup when the user/function does not send wakeup + * request via wakeup ops. Send the command when it's allowed. + * + * Notes: + * For L1 link state, issuing a command requires the clearing of + * GUSB2PHYCFG.SUSPENDUSB2, which turns on the signal required to complete + * the given command (usually within 50us). This should happen within the + * command timeout set by driver. No additional step is needed. + * + * For L2 or U3 link state, the gadget is in USB suspend. Care should be + * taken when sending Start Transfer command to ensure that it's done after + * USB resume. */ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd, struct dwc3_gadget_ep_cmd_params *params) @@ -327,30 +344,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd, dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); } - if (DWC3_DEPCMD_CMD(cmd) == DWC3_DEPCMD_STARTTRANSFER) { - int link_state; - - /* - * Initiate remote wakeup if the link state is in U3 when - * operating in SS/SSP or L1/L2 when operating in HS/FS. If the - * link state is in U1/U2, no remote wakeup is needed. The Start - * Transfer command will initiate the link recovery. - */ - link_state = dwc3_gadget_get_link_state(dwc); - switch (link_state) { - case DWC3_LINK_STATE_U2: - if (dwc->gadget->speed >= USB_SPEED_SUPER) - break; - - fallthrough; - case DWC3_LINK_STATE_U3: - ret = __dwc3_gadget_wakeup(dwc); - dev_WARN_ONCE(dwc->dev, ret, "wakeup failed --> %d\n", - ret); - break; - } - } - /* * For some commands such as Update Transfer command, DEPCMDPARn * registers are reserved. Since the driver often sends Update Transfer @@ -2595,6 +2588,8 @@ static int dwc3_gadget_soft_disconnect(struct dwc3 *dwc) __dwc3_gadget_stop(dwc); spin_unlock_irqrestore(&dwc->lock, flags); + usb_gadget_set_state(dwc->gadget, USB_STATE_NOTATTACHED); + return ret; } diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index 1460142fbc42..2bf7e566d741 100644 --- a/drivers/usb/gadget/function/uvc_configfs.c +++ b/drivers/usb/gadget/function/uvc_configfs.c @@ -797,11 +797,13 @@ static const struct uvcg_config_group_type uvcg_control_grp_type = { /* ----------------------------------------------------------------------------- * streaming/uncompressed * streaming/mjpeg + * streaming/framebased */ static const char * const uvcg_format_names[] = { "uncompressed", "mjpeg", + "framebased", }; static ssize_t uvcg_format_bma_controls_show(struct uvcg_format *f, char *page) @@ -914,6 +916,9 @@ static int uvcg_streaming_header_allow_link(struct config_item *src, target_fmt = container_of(to_config_group(target), struct uvcg_format, group); + if (!target_fmt) + goto out; + uvcg_format_set_indices(to_config_group(target)); format_ptr = kzalloc(sizeof(*format_ptr), GFP_KERNEL); @@ -953,6 +958,9 @@ static void uvcg_streaming_header_drop_link(struct config_item *src, target_fmt = container_of(to_config_group(target), struct uvcg_format, group); + if (!target_fmt) + goto out; + list_for_each_entry_safe(format_ptr, tmp, &src_hdr->formats, entry) if (format_ptr->fmt == target_fmt) { list_del(&format_ptr->entry); @@ -963,6 +971,7 @@ static void uvcg_streaming_header_drop_link(struct config_item *src, --target_fmt->linked; +out: mutex_unlock(&opts->lock); mutex_unlock(su_mutex); } @@ -1159,6 +1168,7 @@ UVCG_FRAME_ATTR(dw_min_bit_rate, dwMinBitRate, 32); UVCG_FRAME_ATTR(dw_max_bit_rate, dwMaxBitRate, 32); UVCG_FRAME_ATTR(dw_max_video_frame_buffer_size, dwMaxVideoFrameBufferSize, 32); UVCG_FRAME_ATTR(dw_default_frame_interval, dwDefaultFrameInterval, 32); +UVCG_FRAME_ATTR(dw_bytes_perline, dwBytesPerLine, 32); #undef UVCG_FRAME_ATTR @@ -1172,7 +1182,7 @@ static ssize_t uvcg_frame_dw_frame_interval_show(struct config_item *item, int result, i; char *pg = page; - mutex_lock(su_mutex); /* for navigating configfs hierarchy */ + mutex_lock(su_mutex); /* for navigating configfs hierarchy */ opts_item = frm->item.ci_parent->ci_parent->ci_parent->ci_parent; opts = to_f_uvc_opts(opts_item); @@ -1293,7 +1303,7 @@ end: UVC_ATTR(uvcg_frame_, dw_frame_interval, dwFrameInterval); -static struct configfs_attribute *uvcg_frame_attrs[] = { +static struct configfs_attribute *uvcg_frame_attrs1[] = { &uvcg_frame_attr_b_frame_index, &uvcg_frame_attr_bm_capabilities, &uvcg_frame_attr_w_width, @@ -1306,12 +1316,31 @@ static struct configfs_attribute *uvcg_frame_attrs[] = { NULL, }; -static const struct config_item_type uvcg_frame_type = { +static struct configfs_attribute *uvcg_frame_attrs2[] = { + &uvcg_frame_attr_b_frame_index, + &uvcg_frame_attr_bm_capabilities, + &uvcg_frame_attr_w_width, + &uvcg_frame_attr_w_height, + &uvcg_frame_attr_dw_min_bit_rate, + &uvcg_frame_attr_dw_max_bit_rate, + &uvcg_frame_attr_dw_default_frame_interval, + &uvcg_frame_attr_dw_frame_interval, + &uvcg_frame_attr_dw_bytes_perline, + NULL, +}; + +static const struct config_item_type uvcg_frame_type1 = { .ct_item_ops = &uvcg_config_item_ops, - .ct_attrs = uvcg_frame_attrs, + .ct_attrs = uvcg_frame_attrs1, .ct_owner = THIS_MODULE, }; +static const struct config_item_type uvcg_frame_type2 = { + .ct_item_ops = &uvcg_config_item_ops, + .ct_attrs = uvcg_frame_attrs2, + .ct_owner = THIS_MODULE, +}; + static struct config_item *uvcg_frame_make(struct config_group *group, const char *name) { @@ -1333,6 +1362,7 @@ static struct config_item *uvcg_frame_make(struct config_group *group, h->frame.dw_max_bit_rate = 55296000; h->frame.dw_max_video_frame_buffer_size = 460800; h->frame.dw_default_frame_interval = 666666; + h->frame.dw_bytes_perline = 0; opts_item = group->cg_item.ci_parent->ci_parent->ci_parent; opts = to_f_uvc_opts(opts_item); @@ -1345,6 +1375,9 @@ static struct config_item *uvcg_frame_make(struct config_group *group, } else if (fmt->type == UVCG_MJPEG) { h->frame.b_descriptor_subtype = UVC_VS_FRAME_MJPEG; h->fmt_type = UVCG_MJPEG; + } else if (fmt->type == UVCG_FRAMEBASED) { + h->frame.b_descriptor_subtype = UVC_VS_FRAME_FRAME_BASED; + h->fmt_type = UVCG_FRAMEBASED; } else { mutex_unlock(&opts->lock); kfree(h); @@ -1363,7 +1396,10 @@ static struct config_item *uvcg_frame_make(struct config_group *group, ++fmt->num_frames; mutex_unlock(&opts->lock); - config_item_init_type_name(&h->item, name, &uvcg_frame_type); + if (fmt->type == UVCG_FRAMEBASED) + config_item_init_type_name(&h->item, name, &uvcg_frame_type2); + else + config_item_init_type_name(&h->item, name, &uvcg_frame_type1); return &h->item; } @@ -1403,9 +1439,6 @@ static void uvcg_format_set_indices(struct config_group *fmt) list_for_each_entry(ci, &fmt->cg_children, ci_entry) { struct uvcg_frame *frm; - if (ci->ci_type != &uvcg_frame_type) - continue; - frm = to_uvcg_frame(ci); frm->frame.b_frame_index = i++; } @@ -1836,6 +1869,251 @@ static const struct uvcg_config_group_type uvcg_mjpeg_grp_type = { .name = "mjpeg", }; +/* ----------------------------------------------------------------------------- + * streaming/framebased/ + */ + +static struct configfs_group_operations uvcg_framebased_group_ops = { + .make_item = uvcg_frame_make, + .drop_item = uvcg_frame_drop, +}; + +#define UVCG_FRAMEBASED_ATTR_RO(cname, aname, bits) \ +static ssize_t uvcg_framebased_##cname##_show(struct config_item *item, \ + char *page) \ +{ \ + struct uvcg_framebased *u = to_uvcg_framebased(item); \ + struct f_uvc_opts *opts; \ + struct config_item *opts_item; \ + struct mutex *su_mutex = &u->fmt.group.cg_subsys->su_mutex; \ + int result; \ + \ + mutex_lock(su_mutex); /* for navigating configfs hierarchy */ \ + \ + opts_item = u->fmt.group.cg_item.ci_parent->ci_parent->ci_parent;\ + opts = to_f_uvc_opts(opts_item); \ + \ + mutex_lock(&opts->lock); \ + result = sprintf(page, "%u\n", le##bits##_to_cpu(u->desc.aname));\ + mutex_unlock(&opts->lock); \ + \ + mutex_unlock(su_mutex); \ + return result; \ +} \ + \ +UVC_ATTR_RO(uvcg_framebased_, cname, aname) + +#define UVCG_FRAMEBASED_ATTR(cname, aname, bits) \ +static ssize_t uvcg_framebased_##cname##_show(struct config_item *item, \ + char *page) \ +{ \ + struct uvcg_framebased *u = to_uvcg_framebased(item); \ + struct f_uvc_opts *opts; \ + struct config_item *opts_item; \ + struct mutex *su_mutex = &u->fmt.group.cg_subsys->su_mutex; \ + int result; \ + \ + mutex_lock(su_mutex); /* for navigating configfs hierarchy */ \ + \ + opts_item = u->fmt.group.cg_item.ci_parent->ci_parent->ci_parent;\ + opts = to_f_uvc_opts(opts_item); \ + \ + mutex_lock(&opts->lock); \ + result = sprintf(page, "%u\n", le##bits##_to_cpu(u->desc.aname));\ + mutex_unlock(&opts->lock); \ + \ + mutex_unlock(su_mutex); \ + return result; \ +} \ + \ +static ssize_t \ +uvcg_framebased_##cname##_store(struct config_item *item, \ + const char *page, size_t len) \ +{ \ + struct uvcg_framebased *u = to_uvcg_framebased(item); \ + struct f_uvc_opts *opts; \ + struct config_item *opts_item; \ + struct mutex *su_mutex = &u->fmt.group.cg_subsys->su_mutex; \ + int ret; \ + u8 num; \ + \ + mutex_lock(su_mutex); /* for navigating configfs hierarchy */ \ + \ + opts_item = u->fmt.group.cg_item.ci_parent->ci_parent->ci_parent;\ + opts = to_f_uvc_opts(opts_item); \ + \ + mutex_lock(&opts->lock); \ + if (u->fmt.linked || opts->refcnt) { \ + ret = -EBUSY; \ + goto end; \ + } \ + \ + ret = kstrtou8(page, 0, &num); \ + if (ret) \ + goto end; \ + \ + if (num > 255) { \ + ret = -EINVAL; \ + goto end; \ + } \ + u->desc.aname = num; \ + ret = len; \ +end: \ + mutex_unlock(&opts->lock); \ + mutex_unlock(su_mutex); \ + return ret; \ +} \ + \ +UVC_ATTR(uvcg_framebased_, cname, aname) + +UVCG_FRAMEBASED_ATTR_RO(b_format_index, bFormatIndex, 8); +UVCG_FRAMEBASED_ATTR_RO(b_bits_per_pixel, bBitsPerPixel, 8); +UVCG_FRAMEBASED_ATTR(b_default_frame_index, bDefaultFrameIndex, 8); +UVCG_FRAMEBASED_ATTR_RO(b_aspect_ratio_x, bAspectRatioX, 8); +UVCG_FRAMEBASED_ATTR_RO(b_aspect_ratio_y, bAspectRatioY, 8); +UVCG_FRAMEBASED_ATTR_RO(bm_interface_flags, bmInterfaceFlags, 8); + +#undef UVCG_FRAMEBASED_ATTR +#undef UVCG_FRAMEBASED_ATTR_RO + +static ssize_t uvcg_framebased_guid_format_show(struct config_item *item, + char *page) +{ + struct uvcg_framebased *ch = to_uvcg_framebased(item); + struct f_uvc_opts *opts; + struct config_item *opts_item; + struct mutex *su_mutex = &ch->fmt.group.cg_subsys->su_mutex; + + mutex_lock(su_mutex); /* for navigating configfs hierarchy */ + + opts_item = ch->fmt.group.cg_item.ci_parent->ci_parent->ci_parent; + opts = to_f_uvc_opts(opts_item); + + mutex_lock(&opts->lock); + memcpy(page, ch->desc.guidFormat, sizeof(ch->desc.guidFormat)); + mutex_unlock(&opts->lock); + + mutex_unlock(su_mutex); + + return sizeof(ch->desc.guidFormat); +} + +static ssize_t uvcg_framebased_guid_format_store(struct config_item *item, + const char *page, size_t len) +{ + struct uvcg_framebased *ch = to_uvcg_framebased(item); + struct f_uvc_opts *opts; + struct config_item *opts_item; + struct mutex *su_mutex = &ch->fmt.group.cg_subsys->su_mutex; + int ret; + + mutex_lock(su_mutex); /* for navigating configfs hierarchy */ + + opts_item = ch->fmt.group.cg_item.ci_parent->ci_parent->ci_parent; + opts = to_f_uvc_opts(opts_item); + + mutex_lock(&opts->lock); + if (ch->fmt.linked || opts->refcnt) { + ret = -EBUSY; + goto end; + } + + memcpy(ch->desc.guidFormat, page, + min(sizeof(ch->desc.guidFormat), len)); + ret = sizeof(ch->desc.guidFormat); + +end: + mutex_unlock(&opts->lock); + mutex_unlock(su_mutex); + return ret; +} + +UVC_ATTR(uvcg_framebased_, guid_format, guidFormat); + +static inline ssize_t +uvcg_framebased_bma_controls_show(struct config_item *item, char *page) +{ + struct uvcg_framebased *u = to_uvcg_framebased(item); + + return uvcg_format_bma_controls_show(&u->fmt, page); +} + +static inline ssize_t +uvcg_framebased_bma_controls_store(struct config_item *item, + const char *page, size_t len) +{ + struct uvcg_framebased *u = to_uvcg_framebased(item); + + return uvcg_format_bma_controls_store(&u->fmt, page, len); +} + +UVC_ATTR(uvcg_framebased_, bma_controls, bmaControls); + +static struct configfs_attribute *uvcg_framebased_attrs[] = { + &uvcg_framebased_attr_b_format_index, + &uvcg_framebased_attr_b_default_frame_index, + &uvcg_framebased_attr_b_bits_per_pixel, + &uvcg_framebased_attr_b_aspect_ratio_x, + &uvcg_framebased_attr_b_aspect_ratio_y, + &uvcg_framebased_attr_bm_interface_flags, + &uvcg_framebased_attr_bma_controls, + &uvcg_framebased_attr_guid_format, + NULL, +}; + +static const struct config_item_type uvcg_framebased_type = { + .ct_item_ops = &uvcg_config_item_ops, + .ct_group_ops = &uvcg_framebased_group_ops, + .ct_attrs = uvcg_framebased_attrs, + .ct_owner = THIS_MODULE, +}; + +static struct config_group *uvcg_framebased_make(struct config_group *group, + const char *name) +{ + static char guid[] = { /*Declear frame based as H264 format*/ + 'H', '2', '6', '4', 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 + }; + struct uvcg_framebased *h; + + h = kzalloc(sizeof(*h), GFP_KERNEL); + if (!h) + return ERR_PTR(-ENOMEM); + + h->desc.bLength = UVC_DT_FORMAT_FRAMEBASED_SIZE; + h->desc.bDescriptorType = USB_DT_CS_INTERFACE; + h->desc.bDescriptorSubType = UVC_VS_FORMAT_FRAME_BASED; + memcpy(h->desc.guidFormat, guid, sizeof(guid)); + h->desc.bBitsPerPixel = 0; + h->desc.bDefaultFrameIndex = 1; + h->desc.bAspectRatioX = 0; + h->desc.bAspectRatioY = 0; + h->desc.bmInterfaceFlags = 0; + h->desc.bCopyProtect = 0; + h->desc.bVariableSize = 1; + + INIT_LIST_HEAD(&h->fmt.frames); + h->fmt.type = UVCG_FRAMEBASED; + config_group_init_type_name(&h->fmt.group, name, + &uvcg_framebased_type); + + return &h->fmt.group; +} + +static struct configfs_group_operations uvcg_framebased_grp_ops = { + .make_group = uvcg_framebased_make, +}; + +static const struct uvcg_config_group_type uvcg_framebased_grp_type = { + .type = { + .ct_item_ops = &uvcg_config_item_ops, + .ct_group_ops = &uvcg_framebased_grp_ops, + .ct_owner = THIS_MODULE, + }, + .name = "framebased", +}; + /* ----------------------------------------------------------------------------- * streaming/color_matching/default */ @@ -1981,6 +2259,7 @@ static int __uvcg_iter_strm_cls(struct uvcg_streaming_header *h, if (ret) return ret; grp = &f->fmt->group; + j = 0; list_for_each_entry(item, &grp->cg_children, ci_entry) { frm = to_uvcg_frame(item); ret = fun(frm, priv2, priv3, j++, UVCG_FRAME); @@ -2029,6 +2308,11 @@ static int __uvcg_cnt_strm(void *priv1, void *priv2, void *priv3, int n, container_of(fmt, struct uvcg_mjpeg, fmt); *size += sizeof(m->desc); + } else if (fmt->type == UVCG_FRAMEBASED) { + struct uvcg_framebased *f = + container_of(fmt, struct uvcg_framebased, fmt); + + *size += sizeof(f->desc); } else { return -EINVAL; } @@ -2039,6 +2323,11 @@ static int __uvcg_cnt_strm(void *priv1, void *priv2, void *priv3, int n, int sz = sizeof(frm->dw_frame_interval); *size += sizeof(frm->frame); + /* + * framebased has duplicate member with uncompressed and + * mjpeg, so minus it + */ + *size -= sizeof(u32); *size += frm->frame.b_frame_interval_type * sz; } break; @@ -2049,6 +2338,27 @@ static int __uvcg_cnt_strm(void *priv1, void *priv2, void *priv3, int n, return 0; } +static int __uvcg_copy_framebased_desc(void *dest, struct uvcg_frame *frm, + int sz) +{ + struct uvc_frame_framebased *desc = dest; + + desc->bLength = frm->frame.b_length; + desc->bDescriptorType = frm->frame.b_descriptor_type; + desc->bDescriptorSubType = frm->frame.b_descriptor_subtype; + desc->bFrameIndex = frm->frame.b_frame_index; + desc->bmCapabilities = frm->frame.bm_capabilities; + desc->wWidth = frm->frame.w_width; + desc->wHeight = frm->frame.w_height; + desc->dwMinBitRate = frm->frame.dw_min_bit_rate; + desc->dwMaxBitRate = frm->frame.dw_max_bit_rate; + desc->dwDefaultFrameInterval = frm->frame.dw_default_frame_interval; + desc->bFrameIntervalType = frm->frame.b_frame_interval_type; + desc->dwBytesPerLine = frm->frame.dw_bytes_perline; + + return 0; +} + /* * Fill an array of streaming descriptors. * @@ -2103,6 +2413,15 @@ static int __uvcg_fill_strm(void *priv1, void *priv2, void *priv3, int n, m->desc.bNumFrameDescriptors = fmt->num_frames; memcpy(*dest, &m->desc, sizeof(m->desc)); *dest += sizeof(m->desc); + } else if (fmt->type == UVCG_FRAMEBASED) { + struct uvcg_framebased *f = + container_of(fmt, struct uvcg_framebased, + fmt); + + f->desc.bFormatIndex = n + 1; + f->desc.bNumFrameDescriptors = fmt->num_frames; + memcpy(*dest, &f->desc, sizeof(f->desc)); + *dest += sizeof(f->desc); } else { return -EINVAL; } @@ -2112,8 +2431,11 @@ static int __uvcg_fill_strm(void *priv1, void *priv2, void *priv3, int n, struct uvcg_frame *frm = priv1; struct uvc_descriptor_header *h = *dest; - sz = sizeof(frm->frame); - memcpy(*dest, &frm->frame, sz); + sz = sizeof(frm->frame) - 4; + if (frm->fmt_type != UVCG_FRAMEBASED) + memcpy(*dest, &frm->frame, sz); + else + __uvcg_copy_framebased_desc(*dest, frm, sz); *dest += sz; sz = frm->frame.b_frame_interval_type * sizeof(*frm->dw_frame_interval); @@ -2124,7 +2446,10 @@ static int __uvcg_fill_strm(void *priv1, void *priv2, void *priv3, int n, frm->frame.b_frame_interval_type); else if (frm->fmt_type == UVCG_MJPEG) h->bLength = UVC_DT_FRAME_MJPEG_SIZE( - frm->frame.b_frame_interval_type); + frm->frame.b_frame_interval_type); + else if (frm->fmt_type == UVCG_FRAMEBASED) + h->bLength = UVC_DT_FRAME_FRAMEBASED_SIZE( + frm->frame.b_frame_interval_type); } break; } @@ -2337,6 +2662,7 @@ static const struct uvcg_config_group_type uvcg_streaming_grp_type = { &uvcg_streaming_header_grp_type, &uvcg_uncompressed_grp_type, &uvcg_mjpeg_grp_type, + &uvcg_framebased_grp_type, &uvcg_color_matching_grp_type, &uvcg_streaming_class_grp_type, NULL, diff --git a/drivers/usb/gadget/function/uvc_configfs.h b/drivers/usb/gadget/function/uvc_configfs.h index ad2ec8c4c78c..188200c1170e 100644 --- a/drivers/usb/gadget/function/uvc_configfs.h +++ b/drivers/usb/gadget/function/uvc_configfs.h @@ -40,6 +40,7 @@ static inline struct uvcg_control_header *to_uvcg_control_header(struct config_i enum uvcg_format_type { UVCG_UNCOMPRESSED = 0, UVCG_MJPEG, + UVCG_FRAMEBASED, }; struct uvcg_format { @@ -95,6 +96,7 @@ struct uvcg_frame { u32 dw_max_video_frame_buffer_size; u32 dw_default_frame_interval; u8 b_frame_interval_type; + u32 dw_bytes_perline; } __attribute__((packed)) frame; u32 *dw_frame_interval; }; @@ -132,6 +134,20 @@ static inline struct uvcg_mjpeg *to_uvcg_mjpeg(struct config_item *item) return container_of(to_uvcg_format(item), struct uvcg_mjpeg, fmt); } +/* ----------------------------------------------------------------------------- + * streaming/framebased/ + */ + +struct uvcg_framebased { + struct uvcg_format fmt; + struct uvc_format_framebased desc; +}; + +static inline struct uvcg_framebased *to_uvcg_framebased(struct config_item *item) +{ + return container_of(to_uvcg_format(item), struct uvcg_framebased, fmt); +} + int uvcg_attach_configfs(struct f_uvc_opts *opts); #endif /* UVC_CONFIGFS_H */ diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c index dcb26c91042c..7854eb5b0983 100644 --- a/drivers/usb/gadget/function/uvc_v4l2.c +++ b/drivers/usb/gadget/function/uvc_v4l2.c @@ -31,13 +31,22 @@ static struct uvc_format_desc *to_uvc_format(struct uvcg_format *uformat) { char guid[16] = UVC_GUID_FORMAT_MJPEG; struct uvc_format_desc *format; - struct uvcg_uncompressed *unc; if (uformat->type == UVCG_UNCOMPRESSED) { + struct uvcg_uncompressed *unc; + unc = to_uvcg_uncompressed(&uformat->group.cg_item); if (!unc) return ERR_PTR(-EINVAL); + memcpy(guid, unc->desc.guidFormat, sizeof(guid)); + } else if (uformat->type == UVCG_FRAMEBASED) { + struct uvcg_framebased *unc; + + unc = to_uvcg_framebased(&uformat->group.cg_item); + if (!unc) + return ERR_PTR(-EINVAL); + memcpy(guid, unc->desc.guidFormat, sizeof(guid)); } diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index f80359e74077..3300a4dbc891 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -418,8 +418,9 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags) * In the future we should distinguish between -ENODEV and -ETIMEDOUT * and try to recover a -ETIMEDOUT with a host controller reset. */ - ret = xhci_handshake(&xhci->op_regs->cmd_ring, - CMD_RING_RUNNING, 0, 5 * 1000 * 1000); + ret = xhci_handshake_check_state(xhci, &xhci->op_regs->cmd_ring, + CMD_RING_RUNNING, 0, 5 * 1000 * 1000, + XHCI_STATE_REMOVING); if (ret < 0) { xhci_err(xhci, "Abort failed to stop command ring: %d\n", ret); xhci_halt(xhci); diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index d3c47e5ca48c..9436f7c5b4fe 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -83,6 +83,29 @@ int xhci_handshake(void __iomem *ptr, u32 mask, u32 done, u64 timeout_us) return ret; } +/* + * xhci_handshake_check_state - same as xhci_handshake but takes an additional + * exit_state parameter, and bails out with an error immediately when xhc_state + * has exit_state flag set. + */ +int xhci_handshake_check_state(struct xhci_hcd *xhci, void __iomem *ptr, + u32 mask, u32 done, int usec, unsigned int exit_state) +{ + u32 result; + int ret; + + ret = readl_poll_timeout_atomic(ptr, result, + (result & mask) == done || + result == U32_MAX || + xhci->xhc_state & exit_state, + 1, usec); + + if (result == U32_MAX || xhci->xhc_state & exit_state) + return -ENODEV; + + return ret; +} + /* * Disable interrupts and begin the xHCI halting process. */ @@ -203,7 +226,8 @@ int xhci_reset(struct xhci_hcd *xhci, u64 timeout_us) if (xhci->quirks & XHCI_INTEL_HOST) udelay(1000); - ret = xhci_handshake(&xhci->op_regs->command, CMD_RESET, 0, timeout_us); + ret = xhci_handshake_check_state(xhci, &xhci->op_regs->command, + CMD_RESET, 0, timeout_us, XHCI_STATE_REMOVING); if (ret) return ret; diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 7cfd8b528d30..1a0c3941de80 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -2142,6 +2142,8 @@ void xhci_free_container_ctx(struct xhci_hcd *xhci, /* xHCI host controller glue */ typedef void (*xhci_get_quirks_t)(struct device *, struct xhci_hcd *); int xhci_handshake(void __iomem *ptr, u32 mask, u32 done, u64 timeout_us); +int xhci_handshake_check_state(struct xhci_hcd *xhci, void __iomem *ptr, + u32 mask, u32 done, int usec, unsigned int exit_state); void xhci_quiesce(struct xhci_hcd *xhci); int xhci_halt(struct xhci_hcd *xhci); int xhci_start(struct xhci_hcd *xhci); diff --git a/fs/direct-io.c b/fs/direct-io.c index 03d381377ae1..383bd70e4ab3 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -38,6 +38,9 @@ #include #include #include +#ifndef __GENKSYMS__ +#include +#endif #include "internal.h" @@ -1053,6 +1056,12 @@ do_holes: put_page(page); goto out; } + + trace_android_vh_io_statistics(dio->inode->i_mapping, + sdio->block_in_file >> sdio->blkfactor, + this_chunk_blocks >> sdio->blkfactor, + iov_iter_rw(sdio->iter) == READ, true); + sdio->next_block_for_io += this_chunk_blocks; sdio->block_in_file += this_chunk_blocks; diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 73260d8a3ecd..4b6ad2e41541 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -898,14 +898,15 @@ static bool cluster_has_invalid_data(struct compress_ctx *cc) bool f2fs_sanity_check_cluster(struct dnode_of_data *dn) { +#ifdef CONFIG_F2FS_CHECK_FS struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode); unsigned int cluster_size = F2FS_I(dn->inode)->i_cluster_size; - bool compressed = dn->data_blkaddr == COMPRESS_ADDR; int cluster_end = 0; + unsigned int count; int i; char *reason = ""; - if (!compressed) + if (dn->data_blkaddr != COMPRESS_ADDR) return false; /* [..., COMPR_ADDR, ...] */ @@ -914,7 +915,7 @@ bool f2fs_sanity_check_cluster(struct dnode_of_data *dn) goto out; } - for (i = 1; i < cluster_size; i++) { + for (i = 1, count = 1; i < cluster_size; i++, count++) { block_t blkaddr = data_blkaddr(dn->inode, dn->node_page, dn->ofs_in_node + i); @@ -934,19 +935,42 @@ bool f2fs_sanity_check_cluster(struct dnode_of_data *dn) goto out; } } + + f2fs_bug_on(F2FS_I_SB(dn->inode), count != cluster_size && + !is_inode_flag_set(dn->inode, FI_COMPRESS_RELEASED)); + return false; out: f2fs_warn(sbi, "access invalid cluster, ino:%lu, nid:%u, ofs_in_node:%u, reason:%s", dn->inode->i_ino, dn->nid, dn->ofs_in_node, reason); set_sbi_flag(sbi, SBI_NEED_FSCK); return true; +#else + return false; +#endif } -static int __f2fs_cluster_blocks(struct inode *inode, - unsigned int cluster_idx, bool compr) +static int __f2fs_get_cluster_blocks(struct inode *inode, + struct dnode_of_data *dn) +{ + unsigned int cluster_size = F2FS_I(inode)->i_cluster_size; + int count, i; + + for (i = 0, count = 0; i < cluster_size; i++) { + block_t blkaddr = data_blkaddr(dn->inode, dn->node_page, + dn->ofs_in_node + i); + + if (__is_valid_data_blkaddr(blkaddr)) + count++; + } + + return count; +} + +static int __f2fs_cluster_blocks(struct inode *inode, unsigned int cluster_idx, + enum cluster_check_type type) { struct dnode_of_data dn; - unsigned int cluster_size = F2FS_I(inode)->i_cluster_size; unsigned int start_idx = cluster_idx << F2FS_I(inode)->i_log_cluster_size; int ret; @@ -961,31 +985,16 @@ static int __f2fs_cluster_blocks(struct inode *inode, if (f2fs_sanity_check_cluster(&dn)) { ret = -EFSCORRUPTED; - f2fs_handle_error(F2FS_I_SB(inode), ERROR_CORRUPTED_CLUSTER); goto fail; } if (dn.data_blkaddr == COMPRESS_ADDR) { - int i; - - ret = 1; - for (i = 1; i < cluster_size; i++) { - block_t blkaddr; - - blkaddr = data_blkaddr(dn.inode, - dn.node_page, dn.ofs_in_node + i); - if (compr) { - if (__is_valid_data_blkaddr(blkaddr)) - ret++; - } else { - if (blkaddr != NULL_ADDR) - ret++; - } - } - - f2fs_bug_on(F2FS_I_SB(inode), - !compr && ret != cluster_size && - !is_inode_flag_set(inode, FI_COMPRESS_RELEASED)); + if (type == CLUSTER_COMPR_BLKS) + ret = 1 + __f2fs_get_cluster_blocks(inode, &dn); + else if (type == CLUSTER_IS_COMPR) + ret = 1; + } else if (type == CLUSTER_RAW_BLKS) { + ret = __f2fs_get_cluster_blocks(inode, &dn); } fail: f2fs_put_dnode(&dn); @@ -995,15 +1004,33 @@ fail: /* return # of compressed blocks in compressed cluster */ static int f2fs_compressed_blocks(struct compress_ctx *cc) { - return __f2fs_cluster_blocks(cc->inode, cc->cluster_idx, true); + return __f2fs_cluster_blocks(cc->inode, cc->cluster_idx, + CLUSTER_COMPR_BLKS); } -/* return # of valid blocks in compressed cluster */ +/* return # of raw blocks in non-compressed cluster */ +static int f2fs_decompressed_blocks(struct inode *inode, + unsigned int cluster_idx) +{ + return __f2fs_cluster_blocks(inode, cluster_idx, + CLUSTER_RAW_BLKS); +} + +/* return whether cluster is compressed one or not */ int f2fs_is_compressed_cluster(struct inode *inode, pgoff_t index) { return __f2fs_cluster_blocks(inode, index >> F2FS_I(inode)->i_log_cluster_size, - false); + CLUSTER_IS_COMPR); +} + +/* return whether cluster contains non raw blocks or not */ +bool f2fs_is_sparse_cluster(struct inode *inode, pgoff_t index) +{ + unsigned int cluster_idx = index >> F2FS_I(inode)->i_log_cluster_size; + + return f2fs_decompressed_blocks(inode, cluster_idx) != + F2FS_I(inode)->i_cluster_size; } static bool cluster_may_compress(struct compress_ctx *cc) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 779158e587e8..3647eea60ef9 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1689,9 +1689,7 @@ next_block: map->m_flags |= F2FS_MAP_NEW; } else if (is_hole) { if (f2fs_compressed_file(inode) && - f2fs_sanity_check_cluster(&dn) && - (flag != F2FS_GET_BLOCK_FIEMAP || - IS_ENABLED(CONFIG_F2FS_CHECK_FS))) { + f2fs_sanity_check_cluster(&dn)) { err = -EFSCORRUPTED; f2fs_handle_error(sbi, ERROR_CORRUPTED_CLUSTER); @@ -1950,25 +1948,6 @@ static int f2fs_xattr_fiemap(struct inode *inode, return (err < 0 ? err : 0); } -static loff_t max_inode_blocks(struct inode *inode) -{ - loff_t result = ADDRS_PER_INODE(inode); - loff_t leaf_count = ADDRS_PER_BLOCK(inode); - - /* two direct node blocks */ - result += (leaf_count * 2); - - /* two indirect node blocks */ - leaf_count *= NIDS_PER_BLOCK; - result += (leaf_count * 2); - - /* one double indirect node block */ - leaf_count *= NIDS_PER_BLOCK; - result += leaf_count; - - return result; -} - int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len) { @@ -2041,8 +2020,7 @@ next: if (!compr_cluster && !(map.m_flags & F2FS_MAP_FLAGS)) { start_blk = next_pgofs; - if (blks_to_bytes(inode, start_blk) < blks_to_bytes(inode, - max_inode_blocks(inode))) + if (blks_to_bytes(inode, start_blk) < maxbytes) goto prep_next; flags |= FIEMAP_EXTENT_LAST; diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index e7cd497bf21c..720242bda64f 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2235,6 +2235,31 @@ static inline bool __allow_reserved_blocks(struct f2fs_sb_info *sbi, return false; } +static inline unsigned int get_available_block_count(struct f2fs_sb_info *sbi, + struct inode *inode, bool cap) +{ + block_t avail_user_block_count; + + avail_user_block_count = sbi->user_block_count - + sbi->current_reserved_blocks; + + if (!__allow_reserved_blocks(sbi, inode, cap)) + avail_user_block_count -= F2FS_OPTION(sbi).root_reserved_blocks; + + if (F2FS_IO_ALIGNED(sbi)) + avail_user_block_count -= sbi->blocks_per_seg * + SM_I(sbi)->additional_reserved_segments; + + if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) { + if (avail_user_block_count > sbi->unusable_block_count) + avail_user_block_count -= sbi->unusable_block_count; + else + avail_user_block_count = 0; + } + + return avail_user_block_count; +} + static inline void f2fs_i_blocks_write(struct inode *, block_t, bool, bool); static inline int inc_valid_block_count(struct f2fs_sb_info *sbi, struct inode *inode, blkcnt_t *count, bool partial) @@ -2260,22 +2285,8 @@ static inline int inc_valid_block_count(struct f2fs_sb_info *sbi, spin_lock(&sbi->stat_lock); sbi->total_valid_block_count += (block_t)(*count); - avail_user_block_count = sbi->user_block_count - - sbi->current_reserved_blocks; + avail_user_block_count = get_available_block_count(sbi, inode, true); - if (!__allow_reserved_blocks(sbi, inode, true)) - avail_user_block_count -= F2FS_OPTION(sbi).root_reserved_blocks; - - if (F2FS_IO_ALIGNED(sbi)) - avail_user_block_count -= sbi->blocks_per_seg * - SM_I(sbi)->additional_reserved_segments; - - if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) { - if (avail_user_block_count > sbi->unusable_block_count) - avail_user_block_count -= sbi->unusable_block_count; - else - avail_user_block_count = 0; - } if (unlikely(sbi->total_valid_block_count > avail_user_block_count)) { if (!partial) { spin_unlock(&sbi->stat_lock); @@ -2595,7 +2606,8 @@ static inline int inc_valid_node_count(struct f2fs_sb_info *sbi, struct inode *inode, bool is_inode) { block_t valid_block_count; - unsigned int valid_node_count, user_block_count; + unsigned int valid_node_count; + unsigned int avail_user_block_count; int err; if (is_inode) { @@ -2615,21 +2627,10 @@ static inline int inc_valid_node_count(struct f2fs_sb_info *sbi, spin_lock(&sbi->stat_lock); - valid_block_count = sbi->total_valid_block_count + - sbi->current_reserved_blocks + 1; + valid_block_count = sbi->total_valid_block_count + 1; + avail_user_block_count = get_available_block_count(sbi, inode, false); - if (!__allow_reserved_blocks(sbi, inode, false)) - valid_block_count += F2FS_OPTION(sbi).root_reserved_blocks; - - if (F2FS_IO_ALIGNED(sbi)) - valid_block_count += sbi->blocks_per_seg * - SM_I(sbi)->additional_reserved_segments; - - user_block_count = sbi->user_block_count; - if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) - user_block_count -= sbi->unusable_block_count; - - if (unlikely(valid_block_count > user_block_count)) { + if (unlikely(valid_block_count > avail_user_block_count)) { spin_unlock(&sbi->stat_lock); goto enospc; } @@ -4232,6 +4233,11 @@ static inline bool f2fs_meta_inode_gc_required(struct inode *inode) * compress.c */ #ifdef CONFIG_F2FS_FS_COMPRESSION +enum cluster_check_type { + CLUSTER_IS_COMPR, /* check only if compressed cluster */ + CLUSTER_COMPR_BLKS, /* return # of compressed blocks in a cluster */ + CLUSTER_RAW_BLKS /* return # of raw blocks in a cluster */ +}; bool f2fs_is_compressed_page(struct page *page); struct page *f2fs_compress_control_page(struct page *page); int f2fs_prepare_compress_overwrite(struct inode *inode, @@ -4258,6 +4264,7 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, struct writeback_control *wbc, enum iostat_type io_type); int f2fs_is_compressed_cluster(struct inode *inode, pgoff_t index); +bool f2fs_is_sparse_cluster(struct inode *inode, pgoff_t index); void f2fs_update_read_extent_tree_range_compressed(struct inode *inode, pgoff_t fofs, block_t blkaddr, unsigned int llen, unsigned int c_len); @@ -4344,6 +4351,12 @@ static inline bool f2fs_load_compressed_page(struct f2fs_sb_info *sbi, static inline void f2fs_invalidate_compress_pages(struct f2fs_sb_info *sbi, nid_t ino) { } #define inc_compr_inode_stat(inode) do { } while (0) +static inline int f2fs_is_compressed_cluster( + struct inode *inode, + pgoff_t index) { return 0; } +static inline bool f2fs_is_sparse_cluster( + struct inode *inode, + pgoff_t index) { return true; } static inline void f2fs_update_read_extent_tree_range_compressed( struct inode *inode, pgoff_t fofs, block_t blkaddr, diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b77f34be12e0..5dd99242408e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -57,7 +57,7 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf) struct inode *inode = file_inode(vmf->vma->vm_file); struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct dnode_of_data dn; - bool need_alloc = true; + bool need_alloc = !f2fs_is_pinned_file(inode); int err = 0; if (unlikely(IS_IMMUTABLE(inode))) @@ -111,19 +111,18 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf) goto out_sem; } + set_new_dnode(&dn, inode, NULL, NULL, 0); if (need_alloc) { /* block allocation */ - set_new_dnode(&dn, inode, NULL, NULL, 0); err = f2fs_get_block_locked(&dn, page->index); - } - -#ifdef CONFIG_F2FS_FS_COMPRESSION - if (!need_alloc) { - set_new_dnode(&dn, inode, NULL, NULL, 0); + } else { err = f2fs_get_dnode_of_data(&dn, page->index, LOOKUP_NODE); f2fs_put_dnode(&dn); + if (f2fs_is_pinned_file(inode) && + !__is_valid_data_blkaddr(dn.data_blkaddr)) + err = -EIO; } -#endif + if (err) { unlock_page(page); goto out_sem; @@ -394,9 +393,20 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) return f2fs_do_sync_file(file, start, end, datasync, false); } -static bool __found_offset(struct address_space *mapping, block_t blkaddr, - pgoff_t index, int whence) +static bool __found_offset(struct address_space *mapping, + struct dnode_of_data *dn, pgoff_t index, int whence) { + block_t blkaddr = f2fs_data_blkaddr(dn); + struct inode *inode = mapping->host; + bool compressed_cluster = false; + + if (f2fs_compressed_file(inode)) { + block_t first_blkaddr = data_blkaddr(dn->inode, dn->node_page, + ALIGN_DOWN(dn->ofs_in_node, F2FS_I(inode)->i_cluster_size)); + + compressed_cluster = first_blkaddr == COMPRESS_ADDR; + } + switch (whence) { case SEEK_DATA: if (__is_valid_data_blkaddr(blkaddr)) @@ -404,8 +414,12 @@ static bool __found_offset(struct address_space *mapping, block_t blkaddr, if (blkaddr == NEW_ADDR && xa_get_mark(&mapping->i_pages, index, PAGECACHE_TAG_DIRTY)) return true; + if (compressed_cluster) + return true; break; case SEEK_HOLE: + if (compressed_cluster) + return false; if (blkaddr == NULL_ADDR) return true; break; @@ -474,7 +488,7 @@ static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence) goto fail; } - if (__found_offset(file->f_mapping, blkaddr, + if (__found_offset(file->f_mapping, &dn, pgofs, whence)) { f2fs_put_dnode(&dn); goto found; @@ -3669,7 +3683,8 @@ static int reserve_compress_blocks(struct dnode_of_data *dn, pgoff_t count, while (count) { int compr_blocks = 0; - blkcnt_t reserved; + blkcnt_t reserved = 0; + blkcnt_t to_reserved; int ret; for (i = 0; i < cluster_size; i++) { @@ -3689,20 +3704,26 @@ static int reserve_compress_blocks(struct dnode_of_data *dn, pgoff_t count, * fails in release_compress_blocks(), so NEW_ADDR * is a possible case. */ - if (blkaddr == NEW_ADDR || - __is_valid_data_blkaddr(blkaddr)) { + if (blkaddr == NEW_ADDR) { + reserved++; + continue; + } + if (__is_valid_data_blkaddr(blkaddr)) { compr_blocks++; continue; } } - reserved = cluster_size - compr_blocks; + to_reserved = cluster_size - compr_blocks - reserved; /* for the case all blocks in cluster were reserved */ - if (reserved == 1) + if (to_reserved == 1) { + dn->ofs_in_node += cluster_size; goto next; + } - ret = inc_valid_block_count(sbi, dn->inode, &reserved, false); + ret = inc_valid_block_count(sbi, dn->inode, + &to_reserved, false); if (unlikely(ret)) return ret; @@ -3713,7 +3734,7 @@ static int reserve_compress_blocks(struct dnode_of_data *dn, pgoff_t count, f2fs_i_compr_blocks_update(dn->inode, compr_blocks, true); - *reserved_blocks += reserved; + *reserved_blocks += to_reserved; next: count -= cluster_size; } @@ -4139,10 +4160,9 @@ static int f2fs_ioc_decompress_file(struct file *filp) struct inode *inode = file_inode(filp); struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); - pgoff_t page_idx = 0, last_idx; + pgoff_t page_idx = 0, last_idx, cluster_idx; unsigned int blk_per_seg = sbi->blocks_per_seg; - int cluster_size = fi->i_cluster_size; - int count, ret; + int ret; if (!f2fs_sb_has_compression(sbi) || F2FS_OPTION(sbi).compress_mode != COMPR_MODE_USER) @@ -4177,12 +4197,15 @@ static int f2fs_ioc_decompress_file(struct file *filp) goto out; last_idx = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE); + last_idx >>= fi->i_log_cluster_size; - count = last_idx - page_idx; - while (count) { - int len = min(cluster_size, count); + for (cluster_idx = 0; cluster_idx < last_idx; cluster_idx++) { + page_idx = cluster_idx << fi->i_log_cluster_size; - ret = redirty_blocks(inode, page_idx, len); + if (!f2fs_is_compressed_cluster(inode, page_idx)) + continue; + + ret = redirty_blocks(inode, page_idx, fi->i_cluster_size); if (ret < 0) break; @@ -4192,8 +4215,11 @@ static int f2fs_ioc_decompress_file(struct file *filp) break; } - count -= len; - page_idx += len; + cond_resched(); + if (fatal_signal_pending(current)) { + ret = -EINTR; + break; + } } if (!ret) @@ -4214,10 +4240,10 @@ static int f2fs_ioc_compress_file(struct file *filp) { struct inode *inode = file_inode(filp); struct f2fs_sb_info *sbi = F2FS_I_SB(inode); - pgoff_t page_idx = 0, last_idx; + struct f2fs_inode_info *fi = F2FS_I(inode); + pgoff_t page_idx = 0, last_idx, cluster_idx; unsigned int blk_per_seg = sbi->blocks_per_seg; - int cluster_size = F2FS_I(inode)->i_cluster_size; - int count, ret; + int ret; if (!f2fs_sb_has_compression(sbi) || F2FS_OPTION(sbi).compress_mode != COMPR_MODE_USER) @@ -4251,12 +4277,15 @@ static int f2fs_ioc_compress_file(struct file *filp) set_inode_flag(inode, FI_ENABLE_COMPRESS); last_idx = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE); + last_idx >>= fi->i_log_cluster_size; - count = last_idx - page_idx; - while (count) { - int len = min(cluster_size, count); + for (cluster_idx = 0; cluster_idx < last_idx; cluster_idx++) { + page_idx = cluster_idx << fi->i_log_cluster_size; - ret = redirty_blocks(inode, page_idx, len); + if (f2fs_is_sparse_cluster(inode, page_idx)) + continue; + + ret = redirty_blocks(inode, page_idx, fi->i_cluster_size); if (ret < 0) break; @@ -4266,8 +4295,11 @@ static int f2fs_ioc_compress_file(struct file *filp) break; } - count -= len; - page_idx += len; + cond_resched(); + if (fatal_signal_pending(current)) { + ret = -EINTR; + break; + } } if (!ret) @@ -4802,6 +4834,8 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) bool dio; bool may_need_sync = true; int preallocated; + const loff_t pos = iocb->ki_pos; + const ssize_t count = iov_iter_count(from); ssize_t ret; if (unlikely(f2fs_cp_error(F2FS_I_SB(inode)))) { @@ -4823,6 +4857,12 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) inode_lock(inode); } + if (f2fs_is_pinned_file(inode) && + !f2fs_overwrite_io(inode, pos, count)) { + ret = -EIO; + goto out_unlock; + } + ret = f2fs_write_checks(iocb, from); if (ret <= 0) goto out_unlock; diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index aa8ffdfbf7ef..77de9adbfb19 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -654,12 +654,30 @@ static inline bool has_enough_free_secs(struct f2fs_sb_info *sbi, return !has_not_enough_free_secs(sbi, freed, needed); } +static inline bool has_enough_free_blks(struct f2fs_sb_info *sbi) +{ + unsigned int total_free_blocks = 0; + unsigned int avail_user_block_count; + + spin_lock(&sbi->stat_lock); + + avail_user_block_count = get_available_block_count(sbi, NULL, true); + total_free_blocks = avail_user_block_count - (unsigned int)valid_user_blocks(sbi); + + spin_unlock(&sbi->stat_lock); + + return total_free_blocks > 0; +} + static inline bool f2fs_is_checkpoint_ready(struct f2fs_sb_info *sbi) { if (likely(!is_sbi_flag_set(sbi, SBI_CP_DISABLED))) return true; if (likely(has_enough_free_secs(sbi, 0, 0))) return true; + if (!f2fs_lfs_mode(sbi) && + likely(has_enough_free_blks(sbi))) + return true; return false; } diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index be2d329843d4..4984016271d2 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2033,7 +2033,6 @@ static long wb_writeback(struct bdi_writeback *wb, struct blk_plug plug; blk_start_plug(&plug); - spin_lock(&wb->list_lock); for (;;) { /* * Stop writeback when nr_pages has been consumed @@ -2058,6 +2057,9 @@ static long wb_writeback(struct bdi_writeback *wb, if (work->for_background && !wb_over_bg_thresh(wb)) break; + + spin_lock(&wb->list_lock); + /* * Kupdate and background works are special and we want to * include all inodes that need writing. Livelock avoidance is @@ -2087,13 +2089,19 @@ static long wb_writeback(struct bdi_writeback *wb, * mean the overall work is done. So we keep looping as long * as made some progress on cleaning pages or inodes. */ - if (progress) + if (progress) { + spin_unlock(&wb->list_lock); continue; + } + /* * No more inodes for IO, bail */ - if (list_empty(&wb->b_more_io)) + if (list_empty(&wb->b_more_io)) { + spin_unlock(&wb->list_lock); break; + } + /* * Nothing written. Wait for some inode to * become available for writeback. Otherwise @@ -2105,9 +2113,7 @@ static long wb_writeback(struct bdi_writeback *wb, spin_unlock(&wb->list_lock); /* This function drops i_lock... */ inode_sleep_on_writeback(inode); - spin_lock(&wb->list_lock); } - spin_unlock(&wb->list_lock); blk_finish_plug(&plug); return nr_pages - work->nr_pages; diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index 105c4a1d20a2..ec6d72df1485 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -12,6 +12,9 @@ #include #include #include +#ifndef __GENKSYMS__ +#include +#endif #include "trace.h" #include "../internal.h" @@ -320,6 +323,9 @@ static loff_t iomap_dio_bio_iter(const struct iomap_iter *iter, goto out; } + trace_android_vh_io_statistics(inode->i_mapping, pos >> inode->i_blkbits, + nr_pages, !(dio->flags & IOMAP_DIO_WRITE), true); + bio = iomap_dio_alloc_bio(iter, dio, nr_pages, bio_opf); fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, GFP_KERNEL); diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 1c17ce23df7c..80ace55e1e1b 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -767,7 +767,6 @@ static inline void cgroup_path_from_kernfs_id(u64 id, char *buf, size_t buflen) */ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu); void cgroup_rstat_flush(struct cgroup *cgrp); -void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp); void cgroup_rstat_flush_hold(struct cgroup *cgrp); void cgroup_rstat_flush_release(void); diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index ae80e6d43943..57d2b3e1f7a2 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -215,7 +215,8 @@ static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode, } extern bool fw_devlink_is_strict(void); -int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup); +int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup, + u8 flags); void fwnode_links_purge(struct fwnode_handle *fwnode); void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index ec9a5af05461..a0e507337acc 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1033,7 +1033,7 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec, } void mem_cgroup_flush_stats(void); -void mem_cgroup_flush_stats_delayed(void); +void mem_cgroup_flush_stats_ratelimited(void); void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx, int val); @@ -1519,7 +1519,7 @@ static inline void mem_cgroup_flush_stats(void) { } -static inline void mem_cgroup_flush_stats_delayed(void) +static inline void mem_cgroup_flush_stats_ratelimited(void) { } diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index e4b5e99e0472..4f7bfc8bcb20 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -18,6 +18,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_shmem_get_folio, TP_PROTO(struct shmem_inode_info *info, struct folio **folio), TP_ARGS(info, folio), 2); +DECLARE_HOOK(android_vh_io_statistics, + TP_PROTO(struct address_space *mapping, unsigned int index, + unsigned int nr_page, bool read, bool direct), + TP_ARGS(mapping, index, nr_page, read, direct)); DECLARE_RESTRICTED_HOOK(android_rvh_set_gfp_zone_flags, TP_PROTO(unsigned int *flags), /* gfp_t *flags */ TP_ARGS(flags), 1); @@ -123,6 +127,12 @@ DECLARE_HOOK(android_vh_show_smap, TP_PROTO(struct seq_file *m, unsigned long writeback, unsigned long same, unsigned long huge), TP_ARGS(m, writeback, same, huge)); +DECLARE_HOOK(android_vh_slab_alloc_node, + TP_PROTO(void *object, unsigned long addr, struct kmem_cache *s), + TP_ARGS(object, addr, s)); +DECLARE_HOOK(android_vh_slab_free, + TP_PROTO(unsigned long addr, struct kmem_cache *s), + TP_ARGS(addr, s)); DECLARE_HOOK(android_vh_meminfo_cache_adjust, TP_PROTO(unsigned long *cached), TP_ARGS(cached)); diff --git a/include/trace/hooks/mmc.h b/include/trace/hooks/mmc.h index d24319cdfee3..c18ccef67458 100644 --- a/include/trace/hooks/mmc.h +++ b/include/trace/hooks/mmc.h @@ -9,6 +9,7 @@ struct mmc_host; struct mmc_card; struct mmc_queue; +struct sdhci_host; /* * Following tracepoints are not exported in tracefs and provide a @@ -34,6 +35,22 @@ DECLARE_HOOK(android_vh_mmc_update_mmc_queue, TP_PROTO(struct mmc_card *card, struct mmc_queue *mq), TP_ARGS(card, mq)); +DECLARE_HOOK(android_vh_mmc_blk_reset, + TP_PROTO(struct mmc_host *host, int err), + TP_ARGS(host, err)); + +DECLARE_HOOK(android_vh_mmc_attach_sd, + TP_PROTO(struct mmc_host *host, int err), + TP_ARGS(host, err)); + +DECLARE_HOOK(android_vh_sdhci_get_cd, + TP_PROTO(struct sdhci_host *host), + TP_ARGS(host)); + +DECLARE_HOOK(android_vh_mmc_gpio_cd_irqt, + TP_PROTO(struct mmc_host *host), + TP_ARGS(host)); + #endif /* _TRACE_HOOK_MMC_H */ /* This part must be outside protection */ #include diff --git a/include/trace/hooks/reboot.h b/include/trace/hooks/reboot.h new file mode 100644 index 000000000000..e9c7d688cbc8 --- /dev/null +++ b/include/trace/hooks/reboot.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM reboot + +#define TRACE_INCLUDE_PATH trace/hooks + +#if !defined(_TRACE_HOOK_REBOOT_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_HOOK_REBOOT_H + +#include + +DECLARE_RESTRICTED_HOOK(android_rvh_hw_protection_shutdown, + TP_PROTO(const char *reason), + TP_ARGS(reason), 1); + +#endif /* _TRACE_HOOK_REBOOT_H */ +/* This part must be outside protection */ +#include diff --git a/include/trace/hooks/vmscan.h b/include/trace/hooks/vmscan.h index 781c1a4a2072..fba2efaa294a 100644 --- a/include/trace/hooks/vmscan.h +++ b/include/trace/hooks/vmscan.h @@ -53,6 +53,13 @@ DECLARE_HOOK(android_vh_vmscan_kswapd_done, TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order, unsigned int reclaim_order), TP_ARGS(node_id, highest_zoneidx, alloc_order, reclaim_order)); +DECLARE_RESTRICTED_HOOK(android_rvh_vmscan_kswapd_wake, + TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order), + TP_ARGS(node_id, highest_zoneidx, alloc_order), 1); +DECLARE_RESTRICTED_HOOK(android_rvh_vmscan_kswapd_done, + TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order, + unsigned int reclaim_order), + TP_ARGS(node_id, highest_zoneidx, alloc_order, reclaim_order), 1); DECLARE_HOOK(android_vh_handle_trylock_failed_folio, TP_PROTO(struct list_head *folio_list), TP_ARGS(folio_list)); diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h index 2ff0e8a3a683..526b5155e23c 100644 --- a/include/uapi/linux/usb/video.h +++ b/include/uapi/linux/usb/video.h @@ -597,5 +597,63 @@ struct UVC_FRAME_MJPEG(n) { \ __le32 dwFrameInterval[n]; \ } __attribute__ ((packed)) +/* Frame Based Payload - 3.1.1. Frame Based Video Format Descriptor */ +struct uvc_format_framebased { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + __u8 bFormatIndex; + __u8 bNumFrameDescriptors; + __u8 guidFormat[16]; + __u8 bBitsPerPixel; + __u8 bDefaultFrameIndex; + __u8 bAspectRatioX; + __u8 bAspectRatioY; + __u8 bmInterfaceFlags; + __u8 bCopyProtect; + __u8 bVariableSize; +} __attribute__((__packed__)); + +#define UVC_DT_FORMAT_FRAMEBASED_SIZE 28 + +/* Frame Based Payload - 3.1.2. Frame Based Video Frame Descriptor */ +struct uvc_frame_framebased { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + __u8 bFrameIndex; + __u8 bmCapabilities; + __u16 wWidth; + __u16 wHeight; + __u32 dwMinBitRate; + __u32 dwMaxBitRate; + __u32 dwDefaultFrameInterval; + __u8 bFrameIntervalType; + __u32 dwBytesPerLine; + __u32 dwFrameInterval[]; +} __attribute__((__packed__)); + +#define UVC_DT_FRAME_FRAMEBASED_SIZE(n) (26+4*(n)) + +#define UVC_FRAME_FRAMEBASED(n) \ + uvc_frame_framebased_##n + +#define DECLARE_UVC_FRAME_FRAMEBASED(n) \ +struct UVC_FRAME_FRAMEBASED(n) { \ + __u8 bLength; \ + __u8 bDescriptorType; \ + __u8 bDescriptorSubType; \ + __u8 bFrameIndex; \ + __u8 bmCapabilities; \ + __u16 wWidth; \ + __u16 wHeight; \ + __u32 dwMinBitRate; \ + __u32 dwMaxBitRate; \ + __u32 dwDefaultFrameInterval; \ + __u8 bFrameIntervalType; \ + __u32 dwBytesPerLine; \ + __u32 dwFrameInterval[n]; \ +} __attribute__ ((packed)) + #endif /* __LINUX_USB_VIDEO_H */ diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index 7006fc8dd677..44b5a1232610 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -171,7 +171,7 @@ __weak noinline void bpf_rstat_flush(struct cgroup *cgrp, __diag_pop(); /* see cgroup_rstat_flush() */ -static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep) +static void cgroup_rstat_flush_locked(struct cgroup *cgrp) __releases(&cgroup_rstat_lock) __acquires(&cgroup_rstat_lock) { int cpu; @@ -207,9 +207,8 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep) } raw_spin_unlock_irqrestore(cpu_lock, flags); - /* if @may_sleep, play nice and yield if necessary */ - if (may_sleep && (need_resched() || - spin_needbreak(&cgroup_rstat_lock))) { + /* play nice and yield if necessary */ + if (need_resched() || spin_needbreak(&cgroup_rstat_lock)) { spin_unlock_irq(&cgroup_rstat_lock); if (!cond_resched()) cpu_relax(); @@ -236,25 +235,10 @@ void cgroup_rstat_flush(struct cgroup *cgrp) might_sleep(); spin_lock_irq(&cgroup_rstat_lock); - cgroup_rstat_flush_locked(cgrp, true); + cgroup_rstat_flush_locked(cgrp); spin_unlock_irq(&cgroup_rstat_lock); } -/** - * cgroup_rstat_flush_irqsafe - irqsafe version of cgroup_rstat_flush() - * @cgrp: target cgroup - * - * This function can be called from any context. - */ -void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp) -{ - unsigned long flags; - - spin_lock_irqsave(&cgroup_rstat_lock, flags); - cgroup_rstat_flush_locked(cgrp, false); - spin_unlock_irqrestore(&cgroup_rstat_lock, flags); -} - /** * cgroup_rstat_flush_hold - flush stats in @cgrp's subtree and hold * @cgrp: target cgroup @@ -269,7 +253,7 @@ void cgroup_rstat_flush_hold(struct cgroup *cgrp) { might_sleep(); spin_lock_irq(&cgroup_rstat_lock); - cgroup_rstat_flush_locked(cgrp, true); + cgroup_rstat_flush_locked(cgrp); } /** diff --git a/kernel/module/main.c b/kernel/module/main.c index ddd12405683e..8cc13c2adc11 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2813,12 +2813,14 @@ static int load_module(struct load_info *info, const char __user *uargs, #ifdef CONFIG_MODULE_SIG mod->sig_ok = info->sig_ok; +#ifndef CONFIG_MODULE_SIG_PROTECT if (!mod->sig_ok) { pr_notice_once("%s: module verification failed: signature " "and/or required key missing - tainting " "kernel\n", mod->name); add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK); } +#endif #else mod->sig_ok = 0; #endif diff --git a/kernel/reboot.c b/kernel/reboot.c index 182a2106c78d..344ceaf5ed13 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -19,6 +19,8 @@ #include #include +#include + /* * this indicates whether you can reboot with ctrl-alt-del: the default is yes */ @@ -979,6 +981,8 @@ void hw_protection_shutdown(const char *reason, int ms_until_forced) if (!atomic_dec_and_test(&allow_proceed)) return; + trace_android_rvh_hw_protection_shutdown(reason); + /* * Queue a backup emergency shutdown in the event of * orderly_poweroff failure diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index bc342a154f54..00c623e10f99 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -551,6 +551,8 @@ static u64 update_triggers(struct psi_group *group, u64 now) if (now < t->last_event_time + t->win.size) continue; + trace_android_vh_psi_event(t); + /* Generate an event */ if (cmpxchg(&t->event, 0, 1) == 0) wake_up_interruptible(&t->event_wait); @@ -559,6 +561,8 @@ static u64 update_triggers(struct psi_group *group, u64 now) t->pending_event = false; } + trace_android_vh_psi_group(group); + if (update_total) memcpy(group->polling_total, total, sizeof(group->polling_total)); diff --git a/kernel/signal.c b/kernel/signal.c index c630beb7a7a8..b653d56d3894 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -4710,6 +4710,7 @@ __weak const char *arch_vma_name(struct vm_area_struct *vma) { return NULL; } +EXPORT_SYMBOL_GPL(arch_vma_name); static inline void siginfo_buildtime_checks(void) { diff --git a/mm/filemap.c b/mm/filemap.c index b286aa7b9487..845285f396b6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3892,6 +3892,7 @@ again: if (unlikely(status < 0)) break; } + trace_android_vh_io_statistics(mapping, page->index, 1, false, false); cond_resched(); if (unlikely(status == 0)) { diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 15f1d01e56f7..90a9052b8384 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2069,6 +2069,7 @@ spinlock_t *__pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma) spin_unlock(ptl); return NULL; } +EXPORT_SYMBOL_GPL(__pmd_trans_huge_lock); /* * Returns page table lock pointer if a given pud maps a thp, NULL otherwise. diff --git a/mm/madvise.c b/mm/madvise.c index e1852ea44c8e..9ddd36f094b7 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -103,6 +103,7 @@ struct anon_vma_name *anon_vma_name(struct vm_area_struct *vma) return vma->anon_name; } +EXPORT_SYMBOL_GPL(anon_vma_name); /* mmap_lock should be write-locked */ static int replace_anon_vma_name(struct vm_area_struct *vma, diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 9adbee3fd5e8..904ba1e381b8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -583,8 +583,8 @@ mem_cgroup_largest_soft_limit_node(struct mem_cgroup_tree_per_node *mctz) */ static void flush_memcg_stats_dwork(struct work_struct *w); static DECLARE_DEFERRABLE_WORK(stats_flush_dwork, flush_memcg_stats_dwork); -static DEFINE_SPINLOCK(stats_flush_lock); static DEFINE_PER_CPU(unsigned int, stats_updates); +static atomic_t stats_flush_ongoing = ATOMIC_INIT(0); static atomic_t stats_flush_threshold = ATOMIC_INIT(0); static u64 flush_next_time; @@ -616,6 +616,9 @@ static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val) { unsigned int x; + if (!val) + return; + cgroup_rstat_updated(memcg->css.cgroup, smp_processor_id()); x = __this_cpu_add_return(stats_updates, abs(val)); @@ -632,34 +635,44 @@ static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val) } } -static void __mem_cgroup_flush_stats(void) +static void do_flush_stats(void) { - unsigned long flag; - - if (!spin_trylock_irqsave(&stats_flush_lock, flag)) + /* + * We always flush the entire tree, so concurrent flushers can just + * skip. This avoids a thundering herd problem on the rstat global lock + * from memcg flushers (e.g. reclaim, refault, etc). + */ + if (atomic_read(&stats_flush_ongoing) || + atomic_xchg(&stats_flush_ongoing, 1)) return; - flush_next_time = jiffies_64 + 2*FLUSH_TIME; - cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup); + WRITE_ONCE(flush_next_time, jiffies_64 + 2*FLUSH_TIME); + + cgroup_rstat_flush(root_mem_cgroup->css.cgroup); + atomic_set(&stats_flush_threshold, 0); - spin_unlock_irqrestore(&stats_flush_lock, flag); + atomic_set(&stats_flush_ongoing, 0); } void mem_cgroup_flush_stats(void) { if (atomic_read(&stats_flush_threshold) > num_online_cpus()) - __mem_cgroup_flush_stats(); + do_flush_stats(); } -void mem_cgroup_flush_stats_delayed(void) +void mem_cgroup_flush_stats_ratelimited(void) { - if (time_after64(jiffies_64, flush_next_time)) + if (time_after64(jiffies_64, READ_ONCE(flush_next_time))) mem_cgroup_flush_stats(); } static void flush_memcg_stats_dwork(struct work_struct *w) { - __mem_cgroup_flush_stats(); + /* + * Always flush here so that flushing in latency-sensitive paths is + * as cheap as possible. + */ + do_flush_stats(); queue_delayed_work(system_unbound_wq, &stats_flush_dwork, FLUSH_TIME); } @@ -3667,11 +3680,14 @@ static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap) unsigned long val; if (mem_cgroup_is_root(memcg)) { - mem_cgroup_flush_stats(); - val = memcg_page_state(memcg, NR_FILE_PAGES) + - memcg_page_state(memcg, NR_ANON_MAPPED); + /* + * Approximate root's usage from global state. This isn't + * perfect, but the root usage was always an approximation. + */ + val = global_node_page_state(NR_FILE_PAGES) + + global_node_page_state(NR_ANON_MAPPED); if (swap) - val += memcg_page_state(memcg, MEMCG_SWAP); + val += total_swap_pages - get_nr_swap_pages(); } else { if (!swap) val = page_counter_read(&memcg->memory); diff --git a/mm/memory.c b/mm/memory.c index ee5cb9ac1074..ee80a70947f8 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -688,6 +688,7 @@ check_pfn: out: return pfn_to_page(pfn); } +EXPORT_SYMBOL_GPL(vm_normal_page); struct folio *vm_normal_folio(struct vm_area_struct *vma, unsigned long addr, pte_t pte) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index d92c5b567837..c14e5f1fd6bb 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c @@ -509,6 +509,7 @@ int walk_page_range(struct mm_struct *mm, unsigned long start, } while (start = next, start < end); return err; } +EXPORT_SYMBOL_GPL(walk_page_range); /** * walk_page_range_novma - walk a range of pagetables not backed by a vma diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c index 6a582cc07023..4cdcc883d090 100644 --- a/mm/pgtable-generic.c +++ b/mm/pgtable-generic.c @@ -51,6 +51,7 @@ void pmd_clear_bad(pmd_t *pmd) pmd_ERROR(*pmd); pmd_clear(pmd); } +EXPORT_SYMBOL_GPL(pmd_clear_bad); #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS /* diff --git a/mm/readahead.c b/mm/readahead.c index c892386f835d..ffe5451488f2 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -256,6 +256,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl, continue; } + trace_android_vh_io_statistics(mapping, index + i, 1, true, false); folio = filemap_alloc_folio(gfp_mask, 0); if (!folio) break; diff --git a/mm/slub.c b/mm/slub.c index 32c73002a5c5..11bca20a0948 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3420,6 +3420,8 @@ redo: out: slab_post_alloc_hook(s, objcg, gfpflags, 1, &object, init); + trace_android_vh_slab_alloc_node(object, addr, s); + return object; } @@ -3683,6 +3685,9 @@ static __always_inline void slab_free(struct kmem_cache *s, struct slab *slab, */ if (slab_free_freelist_hook(s, &head, &tail, &cnt)) do_slab_free(s, slab, head, tail, cnt, addr); + + trace_android_vh_slab_free(addr, s); + } #ifdef CONFIG_KASAN_GENERIC diff --git a/mm/vmscan.c b/mm/vmscan.c index 9a66841580dd..432471847d37 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2821,12 +2821,12 @@ unsigned long __reclaim_pages(struct list_head *folio_list, void *private) return nr_reclaimed; } -EXPORT_SYMBOL_GPL(reclaim_pages); unsigned long reclaim_pages(struct list_head *folio_list) { return __reclaim_pages(folio_list, NULL); } +EXPORT_SYMBOL_GPL(reclaim_pages); static unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan, struct lruvec *lruvec, struct scan_control *sc) @@ -7881,8 +7881,12 @@ kswapd_try_sleep: */ trace_mm_vmscan_kswapd_wake(pgdat->node_id, highest_zoneidx, alloc_order); + trace_android_rvh_vmscan_kswapd_wake(pgdat->node_id, highest_zoneidx, + alloc_order); reclaim_order = balance_pgdat(pgdat, alloc_order, highest_zoneidx); + trace_android_rvh_vmscan_kswapd_done(pgdat->node_id, highest_zoneidx, + alloc_order, reclaim_order); trace_android_vh_vmscan_kswapd_done(pgdat->node_id, highest_zoneidx, alloc_order, reclaim_order); if (reclaim_order < alloc_order) diff --git a/mm/workingset.c b/mm/workingset.c index b20fa7601153..4379f109f204 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -409,6 +409,9 @@ void workingset_refault(struct folio *folio, void *shadow) unpack_shadow(shadow, &memcgid, &pgdat, &eviction, &workingset); eviction <<= bucket_order; + /* Flush stats (and potentially sleep) before holding RCU read lock */ + mem_cgroup_flush_stats_ratelimited(); + rcu_read_lock(); /* * Look up the memcg associated with the stored ID. It might @@ -463,8 +466,6 @@ void workingset_refault(struct folio *folio, void *shadow) lruvec = mem_cgroup_lruvec(memcg, pgdat); mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr); - - mem_cgroup_flush_stats_delayed(); /* * Compare the distance to the existing workingset size. We * don't activate pages that couldn't stay resident even if