Home
last modified time | relevance | path

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

12345678910>>...107

/linux/net/devlink/
H A 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, in __devlink_resource_find() argument
45 if (resource) in __devlink_resource_find()
46 resource_list = &resource->resource_list; in __devlink_resource_find()
50 list_for_each_entry(resource, resource_list, list) { in __devlink_resource_find()
[all …]
/linux/include/linux/
H A Dioport.h22 struct resource { struct
28 struct resource *parent, *sibling, *child; argument
34 * PCI devices expose these flags to userspace in the "resource" sysfs file,
39 #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */
58 #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
60 #define IORESOURCE_EXT_TYPE_BITS 0x01000000 /* Resource extended types */
65 #define IORESOURCE_SYSRAM_MERGEABLE 0x04000000 /* Resource can be merged. */
67 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
72 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
74 /* I/O resource extended types */
[all …]
/linux/drivers/misc/vmw_vmci/
H A 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 …]
H A Dvmci_datagram.c27 struct vmci_resource resource; member
86 /* Make datagram resource live. */ in dg_create_handle()
87 result = vmci_resource_add(&entry->resource, in dg_create_handle()
91 pr_warn("Failed to add new resource (handle=0x%x:0x%x), error: %d\n", in dg_create_handle()
92 handle.context, handle.resource, result); in dg_create_handle()
97 *out_handle = vmci_resource_handle(&entry->resource); in dg_create_handle()
114 struct vmci_resource *resource; in vmci_datagram_get_priv_flags() local
116 resource = vmci_resource_by_handle(handle, in vmci_datagram_get_priv_flags()
118 if (!resource) in vmci_datagram_get_priv_flags()
121 src_entry = container_of(resource, struct datagram_entry, in vmci_datagram_get_priv_flags()
[all …]
H A Dvmci_doorbell.c34 struct vmci_resource resource; member
92 struct vmci_resource *resource; in vmci_dbell_get_priv_flags() local
94 resource = vmci_resource_by_handle(handle, in vmci_dbell_get_priv_flags()
96 if (!resource) in vmci_dbell_get_priv_flags()
99 entry = container_of(resource, struct dbell_entry, resource); in vmci_dbell_get_priv_flags()
101 vmci_resource_put(resource); in vmci_dbell_get_priv_flags()
134 * entry's resource so that the entry is not deleted before it is removed from
142 vmci_resource_get(&entry->resource); in dbell_index_table_add()
195 * entry's resource.
221 vmci_resource_put(&entry->resource); in dbell_index_table_remove()
[all …]
/linux/drivers/acpi/acpica/
H A 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 …]
H A 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 …]
H A 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 …]
/linux/rust/kernel/io/
H A Dresource.rs24 /// A region allocated from a parent [`Resource`].
28 /// - `self.0` points to a valid `bindings::resource` that was obtained through
31 /// The resource returned when the region was requested.
32 resource: NonNull<bindings::resource>, field
39 type Target = Resource;
43 unsafe { Resource::from_raw(self.resource.as_ptr()) } in deref()
65 // SAFETY: `Region` only holds a pointer to a C `struct resource`, which is safe to be used from
69 // SAFETY: `Region` only holds a pointer to a C `struct resource`, reference
79 pub struct Resource(Opaque<bindings::resource>); global() struct
81 impl Resource { global() implementation
173 unsafe impl Send for Resource {} global() implementation
177 unsafe impl Sync for Resource {} global() implementation
[all...]
/linux/drivers/net/ipa/
H A Dipa_resource.c18 * A given IPA version has a fixed number of resource types, and a fixed
19 * total number of resources of each type. "Source" resource types
20 * are separate from "destination" resource types.
22 * Each version of IPA also has some number of resource groups. Each
23 * endpoint is assigned to a resource group, and all endpoints in the
24 * same group share pools of each type of resource. A subset of the
35 /* We program at most 8 source or destination resource group limits */ in ipa_resource_limits_valid()
42 /* Return an error if a non-zero resource limit is specified in ipa_resource_limits_valid()
43 * for a resource group not supported by hardware. in ipa_resource_limits_valid()
46 const struct ipa_resource *resource; in ipa_resource_limits_valid() local
[all …]
/linux/drivers/bus/fsl-mc/
H A 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 …]
/linux/security/apparmor/
H A 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 …]
/linux/include/kunit/
H A 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 …]
/linux/drivers/net/ethernet/netronome/nfp/nfpcore/
H A Dnfp_resource.c21 /* NFP Resource Table self-identifier */
28 * struct nfp_resource_entry - Resource table entry
144 * nfp_resource_acquire() - Acquire a resource handle
146 * @name: Name of the resource
148 * NOTE: This function locks the acquired resource
150 * Return: NFP Resource handle, or ERR_PTR()
190 nfp_warn(cpp, "Warning: waiting for NFP resource %s\n", in nfp_resource_acquire()
194 nfp_err(cpp, "Error: resource %s timed out\n", name); in nfp_resource_acquire()
211 * nfp_resource_release() - Release a NFP Resource handle
212 * @res: NFP Resource handle
[all …]
/linux/drivers/tty/ipwireless/
H A Dmain.c84 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in ipwireless_probe()
85 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; in ipwireless_probe()
95 if (!request_region(p_dev->resource[0]->start, in ipwireless_probe()
96 resource_size(p_dev->resource[0]), in ipwireless_probe()
102 p_dev->resource[2]->flags |= in ipwireless_probe()
105 ret = pcmcia_request_window(p_dev, p_dev->resource[2], 0); in ipwireless_probe()
109 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[2], p_dev->card_addr); in ipwireless_probe()
113 ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100; in ipwireless_probe()
115 ipw->common_memory = ioremap(p_dev->resource[2]->start, in ipwireless_probe()
116 resource_size(p_dev->resource[2])); in ipwireless_probe()
[all …]
/linux/drivers/firmware/imx/
H A Dmisc.c18 u16 resource; member
25 u16 resource; member
32 u16 resource; member
44 * @param[in] resource resource the control is associated with
51 int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_misc_set_control() argument
64 msg.resource = resource; in imx_sc_misc_set_control()
74 * @param[in] resource resource the control is associated with
81 int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_misc_get_control() argument
95 msg.resource = resource; in imx_sc_misc_get_control()
110 * This function starts/stops a CPU identified by @resource
[all …]
H A Drm.c13 u16 resource; member
17 * This function check @resource is owned by current partition or not
20 * @param[in] resource resource the control is associated with
24 bool imx_sc_rm_is_resource_owned(struct imx_sc_ipc *ipc, u16 resource) in imx_sc_rm_is_resource_owned() argument
34 msg.resource = resource; in imx_sc_rm_is_resource_owned()
38 * for resource owned check which means not owned or owned. in imx_sc_rm_is_resource_owned()
51 u16 resource; member
60 * This function get @resource partition number
63 * @param[in] resource resource the control is associated with
68 int imx_sc_rm_get_resource_owner(struct imx_sc_ipc *ipc, u16 resource, u8 *pt) in imx_sc_rm_get_resource_owner() argument
[all …]
/linux/drivers/acpi/
H A Dresource.c3 * drivers/acpi/resource.c - ACPI device resources interpretation.
24 static inline bool acpi_iospace_resource_valid(struct resource *res) in acpi_iospace_resource_valid()
37 acpi_iospace_resource_valid(struct resource *res) { return true; } in acpi_iospace_resource_valid()
67 pr_debug("ACPI: invalid or unassigned resource %s [%016llx - %016llx] length [%016llx]\n", in acpi_dev_resource_len_valid()
73 static void acpi_dev_memresource_flags(struct resource *res, u64 len, in acpi_dev_memresource_flags()
85 static void acpi_dev_get_memresource(struct resource *res, u64 start, u64 len, in acpi_dev_get_memresource()
94 * acpi_dev_resource_memory - Extract ACPI memory resource information.
95 * @ares: Input ACPI resource object.
96 * @res: Output generic resource object.
98 * Check if the given ACPI resource object represents a memory resource and
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/
H A Dpool.c7 static void hws_pool_free_one_resource(struct mlx5hws_pool_resource *resource) in hws_pool_free_one_resource() argument
9 switch (resource->pool->type) { in hws_pool_free_one_resource()
11 mlx5hws_cmd_ste_destroy(resource->pool->ctx->mdev, resource->base_id); in hws_pool_free_one_resource()
14 mlx5hws_cmd_stc_destroy(resource->pool->ctx->mdev, resource->base_id); in hws_pool_free_one_resource()
20 kfree(resource); in hws_pool_free_one_resource()
25 hws_pool_free_one_resource(pool->resource); in hws_pool_resource_free()
26 pool->resource = NULL; in hws_pool_resource_free()
40 struct mlx5hws_pool_resource *resource; in hws_pool_create_one_resource() local
44 resource = kzalloc_obj(*resource); in hws_pool_create_one_resource()
45 if (!resource) in hws_pool_create_one_resource()
[all …]
/linux/arch/mips/dec/
H A Dplatform.c21 static struct resource dec_rtc_resources[] = {
37 .resource = dec_rtc_resources,
45 static struct resource dec_dz_resources[] = {
53 .resource = dec_dz_resources,
61 static struct resource dec_zs_resources[][2] = {
76 .resource = dec_zs_resources[0],
82 .resource = dec_zs_resources[1],
111 dec_dz_device.resource[0].start = base; in dec_add_devices()
112 dec_dz_device.resource[0].end = base + dec_kn_slot_size - 1; in dec_add_devices()
113 dec_dz_device.resource[1].start = irq; in dec_add_devices()
[all …]
/linux/sound/pci/ctxfi/
H A Dctamixer.h9 * resource management object.
22 /* Define the descriptor of a summation node resource */
24 struct rsc rsc; /* Basic resource info */
28 /* Define sum resource request description info */
34 struct rsc_mgr mgr; /* Basic resource manager info */
38 /* request one sum resource */
41 /* return one sum resource */
45 /* Constructor and destructor of daio resource manager */
49 /* Define the descriptor of a amixer resource */
53 struct rsc rsc; /* Basic resource info */
[all …]
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_resource_priv.h34 * Extra memory required by the resource id's ida storage, which is allocated
47 * struct vmw_user_resource_conv - Identify a derived user-exported resource
58 * struct vmw_res_func - members and functions common for a resource type
61 * @needs_guest_memory:Whether the resource is guest-backed and needs
63 * @type_name: String that identifies the resource type.
66 * @may_evict Whether the resource may be evicted.
67 * @create: Create a hardware resource.
68 * @destroy: Destroy a hardware resource.
69 * @bind: Bind a hardware resource to persistent buffer storage.
70 * @unbind: Unbind a hardware resource from persistent
[all …]
H A Dvmwgfx_cmdbuf_res.c36 * struct vmw_cmdbuf_res - Command buffer managed resource entry.
42 * @state: Staging state of this resource entry.
43 * @man: Pointer to a resource manager for this entry.
54 * struct vmw_cmdbuf_res_manager - Command buffer resource manager.
71 * vmw_cmdbuf_res_lookup - Look up a command buffer resource
73 * @man: Pointer to the command buffer resource manager
74 * @res_type: The resource type, that combined with the user key
75 * identifies the resource.
97 * vmw_cmdbuf_res_free - Free a command buffer resource.
99 * @man: Pointer to the command buffer resource manager
[all …]
/linux/drivers/pnp/pnpacpi/
H A Drsparser.c101 static void pnpacpi_add_irqresource(struct pnp_dev *dev, struct resource *r) in pnpacpi_add_irqresource()
113 * the producer/consumer flag, so HP invented a vendor-defined resource to
172 struct resource *r = &win.res; in pnpacpi_allocated_resource()
202 * If the resource is GpioInt() type then extract the IRQ in pnpacpi_allocated_resource()
203 * from GPIO resource and fill it into IRQ resource type. in pnpacpi_allocated_resource()
263 dev_warn(&dev->dev, "unknown resource type %d in _CRS\n", in pnpacpi_allocated_resource()
413 dev_warn(&dev->dev, "can't convert resource type %d\n", in pnpacpi_parse_address_option()
542 dev_warn(&dev->dev, "unknown resource type %d in _PRS\n", in pnpacpi_option_resource()
557 pnp_dbg(&dev->dev, "parse resource options\n"); in pnpacpi_parse_resource_option_data()
594 * Set resource
[all …]
/linux/drivers/mfd/
H A Dtwl4030-audio.c36 struct twl4030_audio_resource resource[TWL4030_AUDIO_RES_MAX]; member
41 * Modify the resource, the function returns the content of the register
50 audio->resource[id].reg); in twl4030_audio_set_resource()
53 val |= audio->resource[id].mask; in twl4030_audio_set_resource()
55 val &= ~audio->resource[id].mask; in twl4030_audio_set_resource()
58 val, audio->resource[id].reg); in twl4030_audio_set_resource()
69 audio->resource[id].reg); in twl4030_audio_get_resource()
75 * Enable the resource.
85 "Invalid resource ID (%u)\n", id); in twl4030_audio_enable_resource()
90 if (!audio->resource[id].request_count) in twl4030_audio_enable_resource()
[all …]

12345678910>>...107