Lines Matching +full:j +full:- +full:to +full:- +full:k

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: utownerid - Support for Table/Method Owner IDs
19 * PARAMETERS: owner_id - Where the new owner ID is returned
23 * DESCRIPTION: Allocate a table or method owner ID. The owner ID is used to
24 * track objects created by the table or method, to be deleted
31 u32 j; in acpi_ut_allocate_owner_id() local
32 u32 k; in acpi_ut_allocate_owner_id() local
37 /* Guard against multiple allocations of ID to the same location */ in acpi_ut_allocate_owner_id()
55 * may have to be scanned twice. in acpi_ut_allocate_owner_id()
57 for (i = 0, j = acpi_gbl_last_owner_id_index; in acpi_ut_allocate_owner_id()
58 i < (ACPI_NUM_OWNERID_MASKS + 1); i++, j++) { in acpi_ut_allocate_owner_id()
59 if (j >= ACPI_NUM_OWNERID_MASKS) { in acpi_ut_allocate_owner_id()
60 j = 0; /* Wraparound to start of mask array */ in acpi_ut_allocate_owner_id()
63 for (k = acpi_gbl_next_owner_id_offset; k < 32; k++) { in acpi_ut_allocate_owner_id()
64 if (acpi_gbl_owner_id_mask[j] == ACPI_UINT32_MAX) { in acpi_ut_allocate_owner_id()
77 if (!(acpi_gbl_owner_id_mask[j] & ((u32)1 << k))) { in acpi_ut_allocate_owner_id()
83 acpi_gbl_owner_id_mask[j] |= ((u32)1 << k); in acpi_ut_allocate_owner_id()
85 acpi_gbl_last_owner_id_index = (u8)j; in acpi_ut_allocate_owner_id()
86 acpi_gbl_next_owner_id_offset = (u8)(k + 1); in acpi_ut_allocate_owner_id()
91 * Note: Last [j].k (bit 4095) is never used and is marked in acpi_ut_allocate_owner_id()
95 (acpi_owner_id)((k + 1) + ACPI_MUL_32(j)); in acpi_ut_allocate_owner_id()
130 * PARAMETERS: owner_id_ptr - Pointer to a previously allocated owner_ID
136 * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 255
167 /* Normalize the ID to zero */ in acpi_ut_release_owner_id()
169 owner_id--; in acpi_ut_release_owner_id()
171 /* Decode ID to index/offset pair */ in acpi_ut_release_owner_id()
182 "Attempted release of non-allocated OwnerId: 0x%3.3X", in acpi_ut_release_owner_id()