Home
last modified time | relevance | path

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

12345678910>>...205

/kernel/linux/linux-4.19/drivers/hwmon/
Dacpi_power_meter.c122 static int update_avg_interval(struct acpi_power_meter_resource *resource) in update_avg_interval() argument
127 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GAI", in update_avg_interval()
134 resource->avg_interval = data; in update_avg_interval()
143 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in show_avg_interval() local
145 mutex_lock(&resource->lock); in show_avg_interval()
146 update_avg_interval(resource); in show_avg_interval()
147 mutex_unlock(&resource->lock); in show_avg_interval()
149 return sprintf(buf, "%llu\n", resource->avg_interval); in show_avg_interval()
157 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in set_avg_interval() local
169 if (temp > resource->caps.max_avg_interval || in set_avg_interval()
[all …]
/kernel/linux/linux-5.10/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()
121 resource->avg_interval = data; in update_avg_interval()
130 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in show_avg_interval() local
132 mutex_lock(&resource->lock); in show_avg_interval()
133 update_avg_interval(resource); in show_avg_interval()
134 mutex_unlock(&resource->lock); in show_avg_interval()
136 return sprintf(buf, "%llu\n", resource->avg_interval); in show_avg_interval()
144 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in set_avg_interval() local
156 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-4.19/kernel/
Dresource.c2 * linux/kernel/resource.c
7 * Arbitrary resource management.
29 struct resource ioport_resource = {
37 struct resource iomem_resource = {
48 resource_size_t (*alignf)(void *, const struct resource *,
56 * For memory hotplug, there is no way to free resource entries allocated
57 * by boot mem after the system is up. So for reusing the resource entry
58 * we need to remember the resource.
60 static struct resource *bootmem_resource_free;
63 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-4.19/drivers/misc/vmw_vmci/
Dvmci_resource.c40 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); in vmci_resource_hash()
44 * Gets a resource (if one exists) matching given handle from the hash table.
49 struct vmci_resource *r, *resource = NULL; in vmci_resource_lookup() local
56 u32 rid = r->handle.resource; in vmci_resource_lookup()
59 rid == handle.resource && in vmci_resource_lookup()
62 resource = r; in vmci_resource_lookup()
68 return resource; in vmci_resource_lookup()
72 * Find an unused resource ID and return it. The first
75 * Returns VMCI resource id on success, VMCI_INVALID_ID on failure.
85 * Generate a unique resource ID. Keep on trying until we wrap around in vmci_resource_find_id()
[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 …]
Dresource.c3 * drivers/acpi/resource.c - ACPI device resources interpretation.
22 static inline bool acpi_iospace_resource_valid(struct resource *res) in acpi_iospace_resource_valid()
35 acpi_iospace_resource_valid(struct resource *res) { return true; } in acpi_iospace_resource_valid()
65 pr_debug("ACPI: invalid or unassigned resource %s [%016llx - %016llx] length [%016llx]\n", in acpi_dev_resource_len_valid()
71 static void acpi_dev_memresource_flags(struct resource *res, u64 len, in acpi_dev_memresource_flags()
83 static void acpi_dev_get_memresource(struct resource *res, u64 start, u64 len, in acpi_dev_get_memresource()
92 * acpi_dev_resource_memory - Extract ACPI memory resource information.
93 * @ares: Input ACPI resource object.
94 * @res: Output generic resource object.
96 * Check if the given ACPI resource object represents a memory resource and
[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-4.19/drivers/acpi/
Dpower.c27 * 2. via "Power Resource Control".
30 * An ACPI "power resource object" represents a software controllable power
31 * plane, clock plane, or other resource depended on by a device.
33 * A device may rely on multiple power resources, and a power resource
51 #define ACPI_POWER_DEVICE_NAME "Power Resource"
71 struct acpi_power_resource *resource; member
78 Power Resource Management
100 struct acpi_power_resource *resource = acpi_power_get_context(handle); in acpi_power_resources_list_add() local
103 if (!resource || !list) in acpi_power_resources_list_add()
110 entry->resource = resource; in acpi_power_resources_list_add()
[all …]
Dresource.c2 * drivers/acpi/resource.c - ACPI device resources interpretation.
30 static inline bool acpi_iospace_resource_valid(struct resource *res) in acpi_iospace_resource_valid()
43 acpi_iospace_resource_valid(struct resource *res) { return true; } in acpi_iospace_resource_valid()
73 pr_debug("ACPI: invalid or unassigned resource %s [%016llx - %016llx] length [%016llx]\n", in acpi_dev_resource_len_valid()
79 static void acpi_dev_memresource_flags(struct resource *res, u64 len, in acpi_dev_memresource_flags()
91 static void acpi_dev_get_memresource(struct resource *res, u64 start, u64 len, in acpi_dev_get_memresource()
100 * acpi_dev_resource_memory - Extract ACPI memory resource information.
101 * @ares: Input ACPI resource object.
102 * @res: Output generic resource object.
104 * Check if the given ACPI resource object represents a memory resource and
[all …]
/kernel/linux/linux-4.19/include/linux/
Dioport.h19 struct resource { struct
25 struct resource *parent, *sibling, *child; argument
31 * PCI devices expose these flags to userspace in the "resource" sysfs file,
36 #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */
55 #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
57 #define IORESOURCE_EXT_TYPE_BITS 0x01000000 /* Resource extended types */
60 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
65 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
67 /* I/O resource extended types */
116 #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
[all …]
/kernel/linux/linux-4.19/drivers/vme/
Dvme.c50 * Find the bridge that the resource is associated with.
52 static struct vme_bridge *find_bridge(struct vme_resource *resource) in find_bridge() argument
55 switch (resource->type) { in find_bridge()
57 return list_entry(resource->entry, struct vme_master_resource, in find_bridge()
61 return list_entry(resource->entry, struct vme_slave_resource, in find_bridge()
65 return list_entry(resource->entry, struct vme_dma_resource, in find_bridge()
69 return list_entry(resource->entry, struct vme_lm_resource, in find_bridge()
73 printk(KERN_ERR "Unknown resource type\n"); in find_bridge()
81 * @resource: Pointer to VME resource.
90 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-4.19/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-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-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-4.19/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-4.19/security/apparmor/
Dresource.c4 * This file contains AppArmor resource mediation and attachment
20 #include "include/resource.h"
24 * Table of rlimit names: we generate it from resource.h.
33 /* audit callback for resource specific fields */
48 * audit_resource - audit setting resource limit
50 * @resource: rlimit being auditing
56 static int audit_resource(struct aa_profile *profile, unsigned int resource, in audit_resource() argument
62 aad(&sa)->rlim.rlim = resource; in audit_resource()
72 * aa_map_resouce - map compiled policy resource to internal #
73 * @resource: flattened policy resource number
[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-5.10/drivers/net/ethernet/netronome/nfp/nfpcore/
Dnfp_resource.c21 /* NFP Resource Table self-identifier */
28 * struct nfp_resource_entry - Resource table entry
141 * nfp_resource_acquire() - Acquire a resource handle
143 * @name: Name of the resource
145 * NOTE: This function locks the acquired resource
147 * Return: NFP Resource handle, or ERR_PTR()
187 nfp_warn(cpp, "Warning: waiting for NFP resource %s\n", in nfp_resource_acquire()
191 nfp_err(cpp, "Error: resource %s timed out\n", name); in nfp_resource_acquire()
208 * nfp_resource_release() - Release a NFP Resource handle
209 * @res: NFP Resource handle
[all …]

12345678910>>...205