Home
last modified time | relevance | path

Searched full:resource (Results 1 – 25 of 5813) sorted by relevance

12345678910>>...233

/kernel/linux/linux-6.6/net/devlink/
Dresource.c10 * struct devlink_resource - devlink resource
11 * @name: name of the resource
13 * @size: size of the resource
14 * @size_new: updated size of the resource, reload is needed
15 * @size_valid: valid in case the total size of the resource is valid
17 * @parent: parent resource
40 struct devlink_resource *resource, u64 resource_id) in devlink_resource_find() argument
44 if (resource) in devlink_resource_find()
45 resource_list = &resource->resource_list; in devlink_resource_find()
49 list_for_each_entry(resource, resource_list, list) { in devlink_resource_find()
[all …]
/kernel/linux/linux-6.6/drivers/hwmon/
Dacpi_power_meter.c109 static int update_avg_interval(struct acpi_power_meter_resource *resource) in update_avg_interval() argument
114 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GAI", in update_avg_interval()
117 acpi_evaluation_failure_warn(resource->acpi_dev->handle, "_GAI", in update_avg_interval()
122 resource->avg_interval = data; in update_avg_interval()
131 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in show_avg_interval() local
133 mutex_lock(&resource->lock); in show_avg_interval()
134 update_avg_interval(resource); in show_avg_interval()
135 mutex_unlock(&resource->lock); in show_avg_interval()
137 return sprintf(buf, "%llu\n", resource->avg_interval); in show_avg_interval()
145 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in set_avg_interval() local
[all …]
/kernel/linux/linux-5.10/drivers/hwmon/
Dacpi_power_meter.c110 static int update_avg_interval(struct acpi_power_meter_resource *resource) in update_avg_interval() argument
115 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GAI", in update_avg_interval()
122 resource->avg_interval = data; in update_avg_interval()
131 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in show_avg_interval() local
133 mutex_lock(&resource->lock); in show_avg_interval()
134 update_avg_interval(resource); in show_avg_interval()
135 mutex_unlock(&resource->lock); in show_avg_interval()
137 return sprintf(buf, "%llu\n", resource->avg_interval); in show_avg_interval()
145 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in set_avg_interval() local
157 if (temp > resource->caps.max_avg_interval || in set_avg_interval()
[all …]
/kernel/linux/linux-5.10/kernel/
Dresource.c3 * linux/kernel/resource.c
8 * Arbitrary resource management.
30 struct resource ioport_resource = {
38 struct resource iomem_resource = {
49 resource_size_t (*alignf)(void *, const struct resource *,
57 * For memory hotplug, there is no way to free resource entries allocated
58 * by boot mem after the system is up. So for reusing the resource entry
59 * we need to remember the resource.
61 static struct resource *bootmem_resource_free;
64 static struct resource *next_resource(struct resource *p, bool sibling_only) in next_resource()
[all …]
/kernel/linux/linux-5.10/drivers/misc/vmw_vmci/
Dvmci_resource.c32 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); in vmci_resource_hash()
36 * Gets a resource (if one exists) matching given handle from the hash table.
41 struct vmci_resource *r, *resource = NULL; in vmci_resource_lookup() local
48 u32 rid = r->handle.resource; in vmci_resource_lookup()
51 rid == handle.resource && in vmci_resource_lookup()
54 resource = r; in vmci_resource_lookup()
60 return resource; in vmci_resource_lookup()
64 * Find an unused resource ID and return it. The first
67 * Returns VMCI resource id on success, VMCI_INVALID_ID on failure.
77 * Generate a unique resource ID. Keep on trying until we wrap around in vmci_resource_find_id()
[all …]
/kernel/linux/linux-6.6/drivers/misc/vmw_vmci/
Dvmci_resource.c32 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); in vmci_resource_hash()
36 * Gets a resource (if one exists) matching given handle from the hash table.
41 struct vmci_resource *r, *resource = NULL; in vmci_resource_lookup() local
48 u32 rid = r->handle.resource; in vmci_resource_lookup()
51 rid == handle.resource && in vmci_resource_lookup()
54 resource = r; in vmci_resource_lookup()
60 return resource; in vmci_resource_lookup()
64 * Find an unused resource ID and return it. The first
67 * Returns VMCI resource id on success, VMCI_INVALID_ID on failure.
77 * Generate a unique resource ID. Keep on trying until we wrap around in vmci_resource_find_id()
[all …]
/kernel/linux/linux-6.6/include/linux/
Dioport.h21 struct resource { struct
27 struct resource *parent, *sibling, *child; argument
33 * PCI devices expose these flags to userspace in the "resource" sysfs file,
38 #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */
57 #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
59 #define IORESOURCE_EXT_TYPE_BITS 0x01000000 /* Resource extended types */
64 #define IORESOURCE_SYSRAM_MERGEABLE 0x04000000 /* Resource can be merged. */
66 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
71 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
73 /* I/O resource extended types */
[all …]
/kernel/linux/linux-5.10/drivers/acpi/
Dpower.c14 * 2. via "Power Resource Control".
17 * An ACPI "power resource object" represents a software controllable power
18 * plane, clock plane, or other resource depended on by a device.
20 * A device may rely on multiple power resources, and a power resource
38 #define ACPI_POWER_DEVICE_NAME "Power Resource"
62 struct acpi_power_resource *resource; member
69 Power Resource Management
91 struct acpi_power_resource *resource = acpi_power_get_context(handle); in acpi_power_resources_list_add() local
94 if (!resource || !list) in acpi_power_resources_list_add()
101 entry->resource = resource; in acpi_power_resources_list_add()
[all …]
/kernel/linux/linux-6.6/kernel/
Dresource.c3 * linux/kernel/resource.c
8 * Arbitrary resource management.
33 struct resource ioport_resource = {
41 struct resource iomem_resource = {
52 resource_size_t (*alignf)(void *, const struct resource *,
59 static struct resource *next_resource(struct resource *p) in next_resource()
68 static struct resource *next_resource_skip_children(struct resource *p) in next_resource_skip_children()
82 struct resource *p = v; in r_next()
94 struct resource *p = pde_data(file_inode(m->file)); in r_start()
110 struct resource *root = pde_data(file_inode(m->file)); in r_show()
[all …]
/kernel/linux/linux-6.6/drivers/acpi/
Dpower.c14 * 2. via "Power Resource Control".
17 * An ACPI "power resource object" represents a software controllable power
18 * plane, clock plane, or other resource depended on by a device.
20 * A device may rely on multiple power resources, and a power resource
39 #define ACPI_POWER_DEVICE_NAME "Power Resource"
62 struct acpi_power_resource *resource; member
69 Power Resource Management
96 struct acpi_power_resource *resource = acpi_power_get_context(handle); in acpi_power_resources_list_add() local
99 if (!resource || !list) in acpi_power_resources_list_add()
106 entry->resource = resource; in acpi_power_resources_list_add()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dioport.h20 struct resource { struct
26 struct resource *parent, *sibling, *child; argument
32 * PCI devices expose these flags to userspace in the "resource" sysfs file,
37 #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */
56 #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
58 #define IORESOURCE_EXT_TYPE_BITS 0x01000000 /* Resource extended types */
63 #define IORESOURCE_SYSRAM_MERGEABLE 0x04000000 /* Resource can be merged. */
65 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
70 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
72 /* I/O resource extended types */
[all …]
/kernel/linux/linux-6.6/drivers/staging/vme_user/
Dvme.c46 * Find the bridge that the resource is associated with.
48 static struct vme_bridge *find_bridge(struct vme_resource *resource) in find_bridge() argument
51 switch (resource->type) { in find_bridge()
53 return list_entry(resource->entry, struct vme_master_resource, in find_bridge()
56 return list_entry(resource->entry, struct vme_slave_resource, in find_bridge()
59 return list_entry(resource->entry, struct vme_dma_resource, in find_bridge()
62 return list_entry(resource->entry, struct vme_lm_resource, in find_bridge()
65 printk(KERN_ERR "Unknown resource type\n"); in find_bridge()
72 * @resource: Pointer to VME resource.
81 void *vme_alloc_consistent(struct vme_resource *resource, size_t size, in vme_alloc_consistent() argument
[all …]
/kernel/linux/linux-5.10/drivers/vme/
Dvme.c46 * Find the bridge that the resource is associated with.
48 static struct vme_bridge *find_bridge(struct vme_resource *resource) in find_bridge() argument
51 switch (resource->type) { in find_bridge()
53 return list_entry(resource->entry, struct vme_master_resource, in find_bridge()
57 return list_entry(resource->entry, struct vme_slave_resource, in find_bridge()
61 return list_entry(resource->entry, struct vme_dma_resource, in find_bridge()
65 return list_entry(resource->entry, struct vme_lm_resource, in find_bridge()
69 printk(KERN_ERR "Unknown resource type\n"); in find_bridge()
77 * @resource: Pointer to VME resource.
86 void *vme_alloc_consistent(struct vme_resource *resource, size_t size, in vme_alloc_consistent() argument
[all …]
/kernel/linux/linux-5.10/drivers/acpi/acpica/
Drslist.c25 * DESCRIPTION: Convert an AML resource to an internal representation of the
26 * resource that is aligned and easier to access.
36 struct acpi_resource *resource; in acpi_rs_convert_aml_to_resources() local
47 resource = *resource_ptr; in acpi_rs_convert_aml_to_resources()
48 if (ACPI_IS_MISALIGNED(resource)) { in acpi_rs_convert_aml_to_resources()
50 "Misaligned resource pointer %p", resource)); in acpi_rs_convert_aml_to_resources()
75 "Invalid/unsupported resource descriptor: Type 0x%2.2X", in acpi_rs_convert_aml_to_resources()
80 /* Convert the AML byte stream resource to a local resource struct */ in acpi_rs_convert_aml_to_resources()
83 acpi_rs_convert_aml_to_resource(resource, aml_resource, in acpi_rs_convert_aml_to_resources()
87 "Could not convert AML resource (Type 0x%X)", in acpi_rs_convert_aml_to_resources()
[all …]
Drscalc.c33 * DESCRIPTION: Count the number of bits set in a resource field. Used for
89 * PARAMETERS: resource_length - Length from the resource header
90 * minimum_total_length - Minimum length of this resource, before
111 * some Large-type resource descriptors. in acpi_rs_stream_option_length()
115 * If the length of the actual resource descriptor is greater than the in acpi_rs_stream_option_length()
118 * string length (including the null terminator) is the resource length in acpi_rs_stream_option_length()
132 * guarantee that the entire resource descriptor is native word aligned in acpi_rs_stream_option_length()
141 * PARAMETERS: resource - Pointer to the resource linked list
142 * resource_list_size - Size of the resource linked list
147 * DESCRIPTION: Takes a linked list of internal resource descriptors and
[all …]
Drsmisc.c4 * Module Name: rsmisc - Miscellaneous resource descriptors
24 * PARAMETERS: resource - Pointer to the resource descriptor
30 * DESCRIPTION: Convert an external AML resource descriptor to the corresponding
31 * internal resource descriptor
35 acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, in acpi_rs_convert_aml_to_resource() argument
54 if (((acpi_size)resource) & 0x3) { in acpi_rs_convert_aml_to_resource()
56 /* Each internal resource struct is expected to be 32-bit aligned */ in acpi_rs_convert_aml_to_resource()
59 "Misaligned resource pointer (get): %p Type 0x%2.2X Length %u", in acpi_rs_convert_aml_to_resource()
60 resource, resource->type, resource->length)); in acpi_rs_convert_aml_to_resource()
63 /* Extract the resource Length field (does not include header length) */ in acpi_rs_convert_aml_to_resource()
[all …]
/kernel/linux/linux-6.6/drivers/acpi/acpica/
Drslist.c25 * DESCRIPTION: Convert an AML resource to an internal representation of the
26 * resource that is aligned and easier to access.
36 struct acpi_resource *resource; in acpi_rs_convert_aml_to_resources() local
47 resource = *resource_ptr; in acpi_rs_convert_aml_to_resources()
48 if (ACPI_IS_MISALIGNED(resource)) { in acpi_rs_convert_aml_to_resources()
50 "Misaligned resource pointer %p", resource)); in acpi_rs_convert_aml_to_resources()
81 "Invalid/unsupported resource descriptor: Type 0x%2.2X", in acpi_rs_convert_aml_to_resources()
86 /* Convert the AML byte stream resource to a local resource struct */ in acpi_rs_convert_aml_to_resources()
89 acpi_rs_convert_aml_to_resource(resource, aml_resource, in acpi_rs_convert_aml_to_resources()
93 "Could not convert AML resource (Type 0x%X)", in acpi_rs_convert_aml_to_resources()
[all …]
Drsmisc.c4 * Module Name: rsmisc - Miscellaneous resource descriptors
24 * PARAMETERS: resource - Pointer to the resource descriptor
30 * DESCRIPTION: Convert an external AML resource descriptor to the corresponding
31 * internal resource descriptor
35 acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, in acpi_rs_convert_aml_to_resource() argument
54 if (((acpi_size)resource) & 0x3) { in acpi_rs_convert_aml_to_resource()
56 /* Each internal resource struct is expected to be 32-bit aligned */ in acpi_rs_convert_aml_to_resource()
59 "Misaligned resource pointer (get): %p Type 0x%2.2X Length %u", in acpi_rs_convert_aml_to_resource()
60 resource, resource->type, resource->length)); in acpi_rs_convert_aml_to_resource()
63 /* Extract the resource Length field (does not include header length) */ in acpi_rs_convert_aml_to_resource()
[all …]
Drscalc.c33 * DESCRIPTION: Count the number of bits set in a resource field. Used for
89 * PARAMETERS: resource_length - Length from the resource header
90 * minimum_total_length - Minimum length of this resource, before
111 * some Large-type resource descriptors. in acpi_rs_stream_option_length()
115 * If the length of the actual resource descriptor is greater than the in acpi_rs_stream_option_length()
118 * string length (including the null terminator) is the resource length in acpi_rs_stream_option_length()
132 * guarantee that the entire resource descriptor is native word aligned in acpi_rs_stream_option_length()
141 * PARAMETERS: resource - Pointer to the resource linked list
142 * resource_list_size - Size of the resource linked list
147 * DESCRIPTION: Takes a linked list of internal resource descriptors and
[all …]
/kernel/linux/linux-6.6/drivers/net/ipa/
Dipa_resource.c19 * A given IPA version has a fixed number of resource types, and a fixed
20 * total number of resources of each type. "Source" resource types
21 * are separate from "destination" resource types.
23 * Each version of IPA also has some number of resource groups. Each
24 * endpoint is assigned to a resource group, and all endpoints in the
25 * same group share pools of each type of resource. A subset of the
36 /* We program at most 8 source or destination resource group limits */ in ipa_resource_limits_valid()
43 /* Return an error if a non-zero resource limit is specified in ipa_resource_limits_valid()
44 * for a resource group not supported by hardware. in ipa_resource_limits_valid()
47 const struct ipa_resource *resource; in ipa_resource_limits_valid() local
[all …]
/kernel/linux/linux-6.6/drivers/bus/fsl-mc/
Dfsl-mc-allocator.c23 * fsl_mc_resource_pool_add_device - add allocatable object to a resource
38 struct fsl_mc_resource *resource; in fsl_mc_resource_pool_add_device() local
46 if (mc_dev->resource) in fsl_mc_resource_pool_add_device()
63 resource = devm_kzalloc(&mc_bus_dev->dev, sizeof(*resource), in fsl_mc_resource_pool_add_device()
65 if (!resource) { in fsl_mc_resource_pool_add_device()
72 resource->type = pool_type; in fsl_mc_resource_pool_add_device()
73 resource->id = mc_dev->obj_desc.id; in fsl_mc_resource_pool_add_device()
74 resource->data = mc_dev; in fsl_mc_resource_pool_add_device()
75 resource->parent_pool = res_pool; in fsl_mc_resource_pool_add_device()
76 INIT_LIST_HEAD(&resource->node); in fsl_mc_resource_pool_add_device()
[all …]
/kernel/linux/linux-5.10/drivers/bus/fsl-mc/
Dfsl-mc-allocator.c23 * fsl_mc_resource_pool_add_device - add allocatable object to a resource
38 struct fsl_mc_resource *resource; in fsl_mc_resource_pool_add_device() local
46 if (mc_dev->resource) in fsl_mc_resource_pool_add_device()
63 resource = devm_kzalloc(&mc_bus_dev->dev, sizeof(*resource), in fsl_mc_resource_pool_add_device()
65 if (!resource) { in fsl_mc_resource_pool_add_device()
72 resource->type = pool_type; in fsl_mc_resource_pool_add_device()
73 resource->id = mc_dev->obj_desc.id; in fsl_mc_resource_pool_add_device()
74 resource->data = mc_dev; in fsl_mc_resource_pool_add_device()
75 resource->parent_pool = res_pool; in fsl_mc_resource_pool_add_device()
76 INIT_LIST_HEAD(&resource->node); in fsl_mc_resource_pool_add_device()
[all …]
/kernel/linux/linux-5.10/security/apparmor/
Dresource.c5 * This file contains AppArmor resource mediation and attachment
16 #include "include/resource.h"
20 * Table of rlimit names: we generate it from resource.h.
29 /* audit callback for resource specific fields */
44 * audit_resource - audit setting resource limit
46 * @resource: rlimit being auditing
52 static int audit_resource(struct aa_profile *profile, unsigned int resource, in audit_resource() argument
58 aad(&sa)->rlim.rlim = resource; in audit_resource()
68 * aa_map_resouce - map compiled policy resource to internal #
69 * @resource: flattened policy resource number
[all …]
/kernel/linux/linux-6.6/include/kunit/
Dresource.h3 * KUnit resource API for test managed resources (allocations, etc.).
25 * struct kunit_resource - represents a *test managed resource*
28 * @free: a user supplied function to free the resource.
30 * Represents a *test managed resource*, a resource which will automatically be
36 * Resources are reference counted so if a resource is retrieved via
38 * to call kunit_put_resource() to reduce the resource reference count
40 * kunit_resource_put() because it does not retrieve the resource itself.
80 * and kunit_destroy_named_resource(). Resource names must be
95 * kunit_get_resource() - Hold resource for use. Should not need to be used
98 * @res: resource
[all …]
/kernel/linux/linux-6.6/security/apparmor/
Dresource.c5 * This file contains AppArmor resource mediation and attachment
16 #include "include/resource.h"
20 * Table of rlimit names: we generate it from resource.h.
29 /* audit callback for resource specific fields */
45 * audit_resource - audit setting resource limit
46 * @subj_cred: cred setting the resource
48 * @resource: rlimit being auditing
57 struct aa_profile *profile, unsigned int resource, in audit_resource() argument
65 ad.rlim.rlim = resource; in audit_resource()
75 * aa_map_resource - map compiled policy resource to internal #
[all …]

12345678910>>...233