Searched refs:resource (Results 1 - 200 of 3509) sorted by relevance

1234567891011>>

/linux-4.1.27/arch/score/include/uapi/asm/
H A Dresource.h4 #include <asm-generic/resource.h>
/linux-4.1.27/arch/cris/include/uapi/asm/
H A Dresource.h4 #include <asm-generic/resource.h>
/linux-4.1.27/arch/frv/include/uapi/asm/
H A Dresource.h4 #include <asm-generic/resource.h>
/linux-4.1.27/arch/m32r/include/uapi/asm/
H A Dresource.h4 #include <asm-generic/resource.h>
/linux-4.1.27/drivers/misc/vmw_vmci/
H A Dvmci_resource.c39 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); vmci_resource_hash()
43 * Gets a resource (if one exists) matching given handle from the hash table.
48 struct vmci_resource *r, *resource = NULL; vmci_resource_lookup() local
55 u32 rid = r->handle.resource; vmci_resource_lookup()
58 rid == handle.resource && vmci_resource_lookup()
60 resource = r; vmci_resource_lookup()
66 return resource; vmci_resource_lookup()
70 * Find an unused resource ID and return it. The first
73 * Returns VMCI resource id on success, VMCI_INVALID_ID on failure.
83 * Generate a unique resource ID. Keep on trying until we wrap around vmci_resource_find_id()
105 int vmci_resource_add(struct vmci_resource *resource, vmci_resource_add() argument
115 if (handle.resource == VMCI_INVALID_ID) { vmci_resource_add()
116 handle.resource = vmci_resource_find_id(handle.context, vmci_resource_add()
118 if (handle.resource == VMCI_INVALID_ID) { vmci_resource_add()
127 resource->handle = handle; vmci_resource_add()
128 resource->type = resource_type; vmci_resource_add()
129 INIT_HLIST_NODE(&resource->node); vmci_resource_add()
130 kref_init(&resource->kref); vmci_resource_add()
131 init_completion(&resource->done); vmci_resource_add()
133 idx = vmci_resource_hash(resource->handle); vmci_resource_add()
134 hlist_add_head_rcu(&resource->node, &vmci_resource_table.entries[idx]); vmci_resource_add()
143 void vmci_resource_remove(struct vmci_resource *resource) vmci_resource_remove() argument
145 struct vmci_handle handle = resource->handle; vmci_resource_remove()
149 /* Remove resource from hash table. */ vmci_resource_remove()
153 if (vmci_handle_is_equal(r->handle, resource->handle)) { vmci_resource_remove()
162 vmci_resource_put(resource); vmci_resource_remove()
163 wait_for_completion(&resource->done); vmci_resource_remove()
170 struct vmci_resource *r, *resource = NULL; vmci_resource_by_handle() local
178 resource = vmci_resource_get(r); vmci_resource_by_handle()
183 return resource; vmci_resource_by_handle()
187 * Get a reference to given resource.
189 struct vmci_resource *vmci_resource_get(struct vmci_resource *resource) vmci_resource_get() argument
191 kref_get(&resource->kref); vmci_resource_get()
193 return resource; vmci_resource_get()
198 struct vmci_resource *resource = vmci_release_resource() local
201 /* Verify the resource has been unlinked from hash table */ vmci_release_resource()
202 WARN_ON(!hlist_unhashed(&resource->node)); vmci_release_resource()
204 /* Signal that container of this resource can now be destroyed */ vmci_release_resource()
205 complete(&resource->done); vmci_release_resource()
211 * can increment the count again (it's gone from the resource hash
214 int vmci_resource_put(struct vmci_resource *resource) vmci_resource_put() argument
220 return kref_put(&resource->kref, vmci_release_resource) ? vmci_resource_put()
224 struct vmci_handle vmci_resource_handle(struct vmci_resource *resource) vmci_resource_handle() argument
226 return resource->handle; vmci_resource_handle()
H A Dvmci_resource.h44 int vmci_resource_add(struct vmci_resource *resource,
48 void vmci_resource_remove(struct vmci_resource *resource);
54 struct vmci_resource *vmci_resource_get(struct vmci_resource *resource);
55 int vmci_resource_put(struct vmci_resource *resource);
57 struct vmci_handle vmci_resource_handle(struct vmci_resource *resource);
H A Dvmci_datagram.c35 struct vmci_resource resource; member in struct:datagram_entry
94 /* Make datagram resource live. */ dg_create_handle()
95 result = vmci_resource_add(&entry->resource, dg_create_handle()
99 pr_warn("Failed to add new resource (handle=0x%x:0x%x), error: %d\n", dg_create_handle()
100 handle.context, handle.resource, result); dg_create_handle()
105 *out_handle = vmci_resource_handle(&entry->resource); dg_create_handle()
122 struct vmci_resource *resource; vmci_datagram_get_priv_flags() local
124 resource = vmci_resource_by_handle(handle, vmci_datagram_get_priv_flags()
126 if (!resource) vmci_datagram_get_priv_flags()
129 src_entry = container_of(resource, struct datagram_entry, vmci_datagram_get_priv_flags()
130 resource); vmci_datagram_get_priv_flags()
132 vmci_resource_put(resource); vmci_datagram_get_priv_flags()
151 vmci_resource_put(&dg_info->entry->resource); dg_delayed_dispatch()
180 context_id, dg->src.context, dg->src.resource); dg_dispatch_as_host()
189 dg->src.context, dg->src.resource); dg_dispatch_as_host()
197 struct vmci_resource *resource; dg_dispatch_as_host() local
200 dg->dst.resource == VMCI_EVENT_HANDLER) { dg_dispatch_as_host()
204 resource = vmci_resource_by_handle(dg->dst, dg_dispatch_as_host()
206 if (!resource) { dg_dispatch_as_host()
208 dg->dst.context, dg->dst.resource); dg_dispatch_as_host()
211 dst_entry = container_of(resource, struct datagram_entry, dg_dispatch_as_host()
212 resource); dg_dispatch_as_host()
215 vmci_resource_put(resource); dg_dispatch_as_host()
231 vmci_resource_put(resource); dg_dispatch_as_host()
239 vmci_resource_put(resource); dg_dispatch_as_host()
253 vmci_resource_put(resource); dg_dispatch_as_host()
306 struct vmci_resource *resource; dg_dispatch_as_guest() local
308 resource = vmci_resource_by_handle(dg->src, dg_dispatch_as_guest()
310 if (!resource) dg_dispatch_as_guest()
314 vmci_resource_put(resource); dg_dispatch_as_guest()
365 struct vmci_resource *resource; vmci_datagram_invoke_guest_handler() local
368 resource = vmci_resource_by_handle(dg->dst, vmci_datagram_invoke_guest_handler()
370 if (!resource) { vmci_datagram_invoke_guest_handler()
372 dg->dst.context, dg->dst.resource); vmci_datagram_invoke_guest_handler()
376 dst_entry = container_of(resource, struct datagram_entry, resource); vmci_datagram_invoke_guest_handler()
383 vmci_resource_put(resource); vmci_datagram_invoke_guest_handler()
395 vmci_resource_put(resource); vmci_datagram_invoke_guest_handler()
403 * @resource_id: The resource ID.
471 struct vmci_resource *resource; vmci_datagram_destroy_handle() local
473 resource = vmci_resource_by_handle(handle, VMCI_RESOURCE_TYPE_DATAGRAM); vmci_datagram_destroy_handle()
474 if (!resource) { vmci_datagram_destroy_handle()
476 handle.context, handle.resource); vmci_datagram_destroy_handle()
480 entry = container_of(resource, struct datagram_entry, resource); vmci_datagram_destroy_handle()
482 vmci_resource_put(&entry->resource); vmci_datagram_destroy_handle()
483 vmci_resource_remove(&entry->resource); vmci_datagram_destroy_handle()
H A Dvmci_doorbell.c42 struct vmci_resource resource; member in struct:dbell_entry
100 struct vmci_resource *resource; vmci_dbell_get_priv_flags() local
102 resource = vmci_resource_by_handle(handle, vmci_dbell_get_priv_flags()
104 if (!resource) vmci_dbell_get_priv_flags()
107 entry = container_of(resource, struct dbell_entry, resource); vmci_dbell_get_priv_flags()
109 vmci_resource_put(resource); vmci_dbell_get_priv_flags()
142 * entry's resource so that the entry is not deleted before it is removed from
150 vmci_resource_get(&entry->resource); dbell_index_table_add()
203 * entry's resource.
229 vmci_resource_put(&entry->resource); dbell_index_table_remove()
294 vmci_resource_put(&entry->resource); dbell_delayed_dispatch()
303 struct vmci_resource *resource; vmci_dbell_host_context_notify() local
307 handle.context, handle.resource); vmci_dbell_host_context_notify()
311 resource = vmci_resource_by_handle(handle, vmci_dbell_host_context_notify()
313 if (!resource) { vmci_dbell_host_context_notify()
315 handle.context, handle.resource); vmci_dbell_host_context_notify()
319 entry = container_of(resource, struct dbell_entry, resource); vmci_dbell_host_context_notify()
324 vmci_resource_put(resource); vmci_dbell_host_context_notify()
368 vmci_resource_get(&dbell->resource); dbell_fire_entries()
397 * @handle: A handle used to track the resource. Can be invalid.
434 /* Let resource code allocate a free ID for us */ vmci_doorbell_create()
452 if (!valid_context || handle->resource == VMCI_INVALID_ID) { vmci_doorbell_create()
454 handle->context, handle->resource); vmci_doorbell_create()
471 result = vmci_resource_add(&entry->resource, vmci_doorbell_create()
475 pr_warn("Failed to add new resource (handle=0x%x:0x%x), error: %d\n", vmci_doorbell_create()
476 new_handle.context, new_handle.resource, result); vmci_doorbell_create()
480 new_handle = vmci_resource_handle(&entry->resource); vmci_doorbell_create()
496 vmci_resource_remove(&entry->resource); vmci_doorbell_create()
505 * @handle: The handle tracking the resource.
513 struct vmci_resource *resource; vmci_doorbell_destroy() local
518 resource = vmci_resource_by_handle(handle, vmci_doorbell_destroy()
520 if (!resource) { vmci_doorbell_destroy()
522 handle.context, handle.resource); vmci_doorbell_destroy()
526 entry = container_of(resource, struct dbell_entry, resource); vmci_doorbell_destroy()
550 handle.context, handle.resource, result); vmci_doorbell_destroy()
555 * Now remove the resource from the table. It might still be in use vmci_doorbell_destroy()
558 vmci_resource_put(&entry->resource); vmci_doorbell_destroy()
559 vmci_resource_remove(&entry->resource); vmci_doorbell_destroy()
569 * @dst: The handlle identifying the doorbell resource
/linux-4.1.27/drivers/hwmon/
H A Dacpi_power_meter.c122 static int update_avg_interval(struct acpi_power_meter_resource *resource) update_avg_interval() argument
127 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GAI", update_avg_interval()
134 resource->avg_interval = data; update_avg_interval()
143 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; show_avg_interval() local
145 mutex_lock(&resource->lock); show_avg_interval()
146 update_avg_interval(resource); show_avg_interval()
147 mutex_unlock(&resource->lock); show_avg_interval()
149 return sprintf(buf, "%llu\n", resource->avg_interval); show_avg_interval()
157 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; set_avg_interval() local
169 if (temp > resource->caps.max_avg_interval || set_avg_interval()
170 temp < resource->caps.min_avg_interval) set_avg_interval()
174 mutex_lock(&resource->lock); set_avg_interval()
175 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_PAI", set_avg_interval()
178 resource->avg_interval = temp; set_avg_interval()
179 mutex_unlock(&resource->lock); set_avg_interval()
194 static int update_cap(struct acpi_power_meter_resource *resource) update_cap() argument
199 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GHL", update_cap()
206 resource->cap = data; update_cap()
215 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; show_cap() local
217 mutex_lock(&resource->lock); show_cap()
218 update_cap(resource); show_cap()
219 mutex_unlock(&resource->lock); show_cap()
221 return sprintf(buf, "%llu\n", resource->cap * 1000); show_cap()
228 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; set_cap() local
241 if (temp > resource->caps.max_cap || temp < resource->caps.min_cap) set_cap()
245 mutex_lock(&resource->lock); set_cap()
246 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_SHL", set_cap()
249 resource->cap = temp; set_cap()
250 mutex_unlock(&resource->lock); set_cap()
265 static int set_acpi_trip(struct acpi_power_meter_resource *resource) set_acpi_trip() argument
276 if (resource->trip[0] < 0 || resource->trip[1] < 0) set_acpi_trip()
280 arg_objs[0].integer.value = resource->trip[1]; set_acpi_trip()
281 arg_objs[1].integer.value = resource->trip[0]; set_acpi_trip()
283 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_PTP", set_acpi_trip()
302 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; set_trip() local
312 mutex_lock(&resource->lock); set_trip()
313 resource->trip[attr->index - 7] = temp; set_trip()
314 res = set_acpi_trip(resource); set_trip()
315 mutex_unlock(&resource->lock); set_trip()
324 static int update_meter(struct acpi_power_meter_resource *resource) update_meter() argument
330 if (time_before(local_jiffies, resource->sensors_last_updated + update_meter()
331 msecs_to_jiffies(resource->caps.sampling_time)) && update_meter()
332 resource->sensors_valid) update_meter()
335 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_PMM", update_meter()
342 resource->power = data; update_meter()
343 resource->sensors_valid = 1; update_meter()
344 resource->sensors_last_updated = jiffies; update_meter()
353 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; show_power() local
355 mutex_lock(&resource->lock); show_power()
356 update_meter(resource); show_power()
357 mutex_unlock(&resource->lock); show_power()
359 return sprintf(buf, "%llu\n", resource->power * 1000); show_power()
369 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; show_str() local
374 val = resource->model_number; show_str()
377 val = resource->serial_number; show_str()
380 val = resource->oem_info; show_str()
398 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; show_val() local
403 val = resource->caps.min_avg_interval; show_val()
406 val = resource->caps.max_avg_interval; show_val()
409 val = resource->caps.min_cap * 1000; show_val()
412 val = resource->caps.max_cap * 1000; show_val()
415 if (resource->caps.hysteresis == UNKNOWN_HYSTERESIS) show_val()
418 val = resource->caps.hysteresis * 1000; show_val()
421 if (resource->caps.flags & POWER_METER_IS_BATTERY) show_val()
427 if (resource->power > resource->cap) show_val()
434 if (resource->trip[attr->index - 7] < 0) show_val()
437 val = resource->trip[attr->index - 7] * 1000; show_val()
453 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; show_accuracy() local
454 unsigned int acc = resource->caps.accuracy; show_accuracy()
529 static void remove_domain_devices(struct acpi_power_meter_resource *resource) remove_domain_devices() argument
533 if (!resource->num_domain_devices) remove_domain_devices()
536 for (i = 0; i < resource->num_domain_devices; i++) { remove_domain_devices()
537 struct acpi_device *obj = resource->domain_devices[i]; remove_domain_devices()
541 sysfs_remove_link(resource->holders_dir, remove_domain_devices()
546 kfree(resource->domain_devices); remove_domain_devices()
547 kobject_put(resource->holders_dir); remove_domain_devices()
548 resource->num_domain_devices = 0; remove_domain_devices()
551 static int read_domain_devices(struct acpi_power_meter_resource *resource) read_domain_devices() argument
559 status = acpi_evaluate_object(resource->acpi_dev->handle, "_PMD", NULL, read_domain_devices()
569 dev_err(&resource->acpi_dev->dev, ACPI_POWER_METER_NAME read_domain_devices()
578 resource->domain_devices = kzalloc(sizeof(struct acpi_device *) * read_domain_devices()
580 if (!resource->domain_devices) { read_domain_devices()
585 resource->holders_dir = kobject_create_and_add("measures", read_domain_devices()
586 &resource->acpi_dev->dev.kobj); read_domain_devices()
587 if (!resource->holders_dir) { read_domain_devices()
592 resource->num_domain_devices = pss->package.count; read_domain_devices()
603 resource->domain_devices[i] = NULL; read_domain_devices()
605 &resource->domain_devices[i])) read_domain_devices()
608 obj = resource->domain_devices[i]; read_domain_devices()
611 res = sysfs_create_link(resource->holders_dir, &obj->dev.kobj, read_domain_devices()
615 resource->domain_devices[i] = NULL; read_domain_devices()
623 kfree(resource->domain_devices); read_domain_devices()
630 static int register_attrs(struct acpi_power_meter_resource *resource, register_attrs() argument
633 struct device *dev = &resource->acpi_dev->dev; register_attrs()
635 &resource->sensors[resource->num_sensors]; register_attrs()
656 resource->num_sensors++; register_attrs()
664 static void remove_attrs(struct acpi_power_meter_resource *resource) remove_attrs() argument
668 for (i = 0; i < resource->num_sensors; i++) { remove_attrs()
669 if (!resource->sensors[i].dev_attr.attr.name) remove_attrs()
671 device_remove_file(&resource->acpi_dev->dev, remove_attrs()
672 &resource->sensors[i].dev_attr); remove_attrs()
675 remove_domain_devices(resource); remove_attrs()
677 resource->num_sensors = 0; remove_attrs()
680 static int setup_attrs(struct acpi_power_meter_resource *resource) setup_attrs() argument
684 res = read_domain_devices(resource); setup_attrs()
688 if (resource->caps.flags & POWER_METER_CAN_MEASURE) { setup_attrs()
689 res = register_attrs(resource, meter_attrs); setup_attrs()
694 if (resource->caps.flags & POWER_METER_CAN_CAP) { setup_attrs()
696 dev_err(&resource->acpi_dev->dev, setup_attrs()
701 if (resource->caps.configurable_cap) setup_attrs()
702 res = register_attrs(resource, rw_cap_attrs); setup_attrs()
704 res = register_attrs(resource, ro_cap_attrs); setup_attrs()
709 res = register_attrs(resource, misc_cap_attrs); setup_attrs()
715 if (resource->caps.flags & POWER_METER_CAN_TRIP) { setup_attrs()
716 res = register_attrs(resource, trip_attrs); setup_attrs()
721 res = register_attrs(resource, misc_attrs); setup_attrs()
727 remove_attrs(resource); setup_attrs()
731 static void free_capabilities(struct acpi_power_meter_resource *resource) free_capabilities() argument
736 str = &resource->model_number; free_capabilities()
741 static int read_capabilities(struct acpi_power_meter_resource *resource) read_capabilities() argument
752 status = acpi_evaluate_object(resource->acpi_dev->handle, "_PMC", NULL, read_capabilities()
763 dev_err(&resource->acpi_dev->dev, ACPI_POWER_METER_NAME read_capabilities()
771 state.pointer = &resource->caps; read_capabilities()
780 if (resource->caps.units) { read_capabilities()
781 dev_err(&resource->acpi_dev->dev, ACPI_POWER_METER_NAME read_capabilities()
783 resource->caps.units); read_capabilities()
789 str = &resource->model_number; read_capabilities()
810 dev_info(&resource->acpi_dev->dev, "Found ACPI power meter.\n"); read_capabilities()
813 str = &resource->model_number; read_capabilities()
824 struct acpi_power_meter_resource *resource; acpi_power_meter_notify() local
830 resource = acpi_driver_data(device); acpi_power_meter_notify()
832 mutex_lock(&resource->lock); acpi_power_meter_notify()
835 free_capabilities(resource); acpi_power_meter_notify()
836 res = read_capabilities(resource); acpi_power_meter_notify()
840 remove_attrs(resource); acpi_power_meter_notify()
841 setup_attrs(resource); acpi_power_meter_notify()
845 update_meter(resource); acpi_power_meter_notify()
849 update_cap(resource); acpi_power_meter_notify()
853 update_avg_interval(resource); acpi_power_meter_notify()
863 mutex_unlock(&resource->lock); acpi_power_meter_notify()
872 struct acpi_power_meter_resource *resource; acpi_power_meter_add() local
877 resource = kzalloc(sizeof(struct acpi_power_meter_resource), acpi_power_meter_add()
879 if (!resource) acpi_power_meter_add()
882 resource->sensors_valid = 0; acpi_power_meter_add()
883 resource->acpi_dev = device; acpi_power_meter_add()
884 mutex_init(&resource->lock); acpi_power_meter_add()
887 device->driver_data = resource; acpi_power_meter_add()
889 free_capabilities(resource); acpi_power_meter_add()
890 res = read_capabilities(resource); acpi_power_meter_add()
894 resource->trip[0] = resource->trip[1] = -1; acpi_power_meter_add()
896 res = setup_attrs(resource); acpi_power_meter_add()
900 resource->hwmon_dev = hwmon_device_register(&device->dev); acpi_power_meter_add()
901 if (IS_ERR(resource->hwmon_dev)) { acpi_power_meter_add()
902 res = PTR_ERR(resource->hwmon_dev); acpi_power_meter_add()
910 remove_attrs(resource); acpi_power_meter_add()
912 kfree(resource); acpi_power_meter_add()
919 struct acpi_power_meter_resource *resource; acpi_power_meter_remove() local
924 resource = acpi_driver_data(device); acpi_power_meter_remove()
925 hwmon_device_unregister(resource->hwmon_dev); acpi_power_meter_remove()
927 free_capabilities(resource); acpi_power_meter_remove()
928 remove_attrs(resource); acpi_power_meter_remove()
930 kfree(resource); acpi_power_meter_remove()
938 struct acpi_power_meter_resource *resource; acpi_power_meter_resume() local
943 resource = acpi_driver_data(to_acpi_device(dev)); acpi_power_meter_resume()
944 if (!resource) acpi_power_meter_resume()
947 free_capabilities(resource); acpi_power_meter_resume()
948 read_capabilities(resource); acpi_power_meter_resume()
/linux-4.1.27/arch/ia64/include/uapi/asm/
H A Dresource.h5 #include <asm-generic/resource.h>
/linux-4.1.27/drivers/staging/board/
H A Dboard.c11 struct resource res; find_by_address()
26 bool __init board_staging_dt_node_available(const struct resource *resource, board_staging_dt_node_available() argument
32 const struct resource *r = resource + i; board_staging_dt_node_available()
H A Dboard.h6 bool board_staging_dt_node_available(const struct resource *resource,
H A Dkzm9d.c7 static const struct resource usbs1_res[] __initconst = {
/linux-4.1.27/include/linux/
H A Dresource.h4 #include <uapi/linux/resource.h>
10 int do_prlimit(struct task_struct *tsk, unsigned int resource,
H A Dioport.h18 struct resource { struct
23 struct resource *parent, *sibling, *child;
52 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
56 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
101 #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */
102 #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */
105 #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
138 extern struct resource ioport_resource;
139 extern struct resource iomem_resource;
141 extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
142 extern int request_resource(struct resource *root, struct resource *new);
143 extern int release_resource(struct resource *new);
144 void release_child_resources(struct resource *new);
145 extern void reserve_region_with_split(struct resource *root,
148 extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
149 extern int insert_resource(struct resource *parent, struct resource *new);
150 extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
151 extern void arch_remove_reservations(struct resource *avail);
152 extern int allocate_resource(struct resource *root, struct resource *new,
156 const struct resource *,
160 struct resource *lookup_resource(struct resource *root, resource_size_t start);
161 int adjust_resource(struct resource *res, resource_size_t start,
163 resource_size_t resource_alignment(struct resource *res); resource_size()
164 static inline resource_size_t resource_size(const struct resource *res) resource_size()
168 static inline unsigned long resource_type(const struct resource *res) resource_type()
173 static inline bool resource_contains(struct resource *r1, struct resource *r2) resource_contains()
192 extern struct resource * __request_region(struct resource *,
201 extern void __release_region(struct resource *, resource_size_t,
204 extern int release_mem_region_adjustable(struct resource *, resource_size_t,
211 extern int devm_request_resource(struct device *dev, struct resource *root,
212 struct resource *new);
213 extern void devm_release_resource(struct device *dev, struct resource *new);
220 extern struct resource * __devm_request_region(struct device *dev,
221 struct resource *parent, resource_size_t start,
229 extern void __devm_release_region(struct device *dev, struct resource *parent,
245 static inline bool resource_overlaps(struct resource *r1, struct resource *r2) resource_overlaps()
H A Data_platform.h16 struct resource *io_res,
17 struct resource *ctl_res,
18 struct resource *irq_res,
H A Dresource_ext.h21 /* Represent resource window for bridge devices */
23 struct resource res; /* In master (CPU) address space */
28 * Common resource list management data structure and interfaces to support
33 struct resource *res; /* In master (CPU) address space */
35 struct resource __res; /* Default storage for res */
39 resource_list_create_entry(struct resource *res, size_t extra_size);
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
H A DMakefile5 iw_cxgb4-y := device.o cm.o provider.o mem.o cq.o qp.o resource.o ev.o id_table.o
/linux-4.1.27/arch/s390/include/uapi/asm/
H A Dresource.h10 #include <asm-generic/resource.h>
/linux-4.1.27/arch/arm/mach-iop32x/
H A Dgpio-iop32x.h1 static struct resource iop32x_gpio_res[] = {
/linux-4.1.27/arch/sparc/include/asm/
H A Dleon_pci.h13 struct resource io_space;
14 struct resource mem_space;
15 struct resource busn;
H A Ddevice.h25 struct resource resource[PROMREG_MAX]; member in struct:pdev_archdata
H A Dparport.h108 unsigned long base = op->resource[0].start; ecpp_probe()
109 unsigned long config = op->resource[1].start; ecpp_probe()
110 unsigned long d_base = op->resource[2].start; ecpp_probe()
137 d_len = (op->resource[2].end - d_base) + 1UL; ecpp_probe()
139 of_ioremap(&op->resource[2], 0, d_len, "ECPP DMA"); ecpp_probe()
186 of_iounmap(&op->resource[2], sparc_ebus_dmas[slot].info.regs, d_len); ecpp_probe()
203 unsigned long d_base = op->resource[2].start; ecpp_remove()
206 d_len = (op->resource[2].end - d_base) + 1UL; ecpp_remove()
210 of_iounmap(&op->resource[2], ecpp_remove()
/linux-4.1.27/drivers/watchdog/
H A DiTCO_vendor.h3 extern void iTCO_vendor_pre_start(struct resource *, unsigned int);
4 extern void iTCO_vendor_pre_stop(struct resource *);
5 extern void iTCO_vendor_pre_keepalive(struct resource *, unsigned int);
/linux-4.1.27/kernel/
H A 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) next_resource()
78 struct resource *p = v; r_next()
90 struct resource *p = m->private; __acquires()
106 struct resource *root = m->private; r_show()
107 struct resource *r = v, *p; r_show()
173 static void free_resource(struct resource *res) free_resource()
188 static struct resource *alloc_resource(gfp_t flags) alloc_resource()
190 struct resource *res = NULL; alloc_resource()
200 memset(res, 0, sizeof(struct resource)); alloc_resource()
202 res = kzalloc(sizeof(struct resource), flags); alloc_resource()
208 static struct resource * __request_resource(struct resource *root, struct resource *new) __request_resource()
212 struct resource *tmp, **p; __request_resource()
236 static int __release_resource(struct resource *old) __release_resource()
238 struct resource *tmp, **p; __release_resource()
255 static void __release_child_resources(struct resource *r) __release_child_resources()
257 struct resource *tmp, *p; __release_child_resources()
270 printk(KERN_DEBUG "release child resource %pR\n", tmp); __release_child_resources()
278 void release_child_resources(struct resource *r) release_child_resources()
286 * request_resource_conflict - request and reserve an I/O or memory resource
287 * @root: root resource descriptor
288 * @new: resource descriptor desired by caller
290 * Returns 0 for success, conflict resource on error.
292 struct resource *request_resource_conflict(struct resource *root, struct resource *new) request_resource_conflict()
294 struct resource *conflict; request_resource_conflict()
303 * request_resource - request and reserve an I/O or memory resource
304 * @root: root resource descriptor
305 * @new: resource descriptor desired by caller
309 int request_resource(struct resource *root, struct resource *new) request_resource()
311 struct resource *conflict; request_resource()
320 * release_resource - release a previously reserved resource
321 * @old: resource pointer
323 int release_resource(struct resource *old) release_resource()
342 static int find_next_iomem_res(struct resource *res, char *name, find_next_iomem_res()
346 struct resource *p; find_next_iomem_res()
385 * Walks through iomem resources and calls func() with matching resource
390 * @name: name of resource
391 * @flags: resource flags
398 struct resource res; walk_iomem_res()
427 struct resource res; walk_system_ram_res()
456 struct resource res; walk_system_ram_range()
501 * a vast speed up over walking through the resource table page by page.
505 struct resource *p; region_is_ram()
517 /* resource fully contains region */ region_is_ram()
531 void __weak arch_remove_reservations(struct resource *avail) arch_remove_reservations()
536 const struct resource *avail, simple_align_resource()
543 static void resource_clip(struct resource *res, resource_size_t min, resource_clip()
553 * Find empty slot in the resource tree with the given range and
556 static int __find_resource(struct resource *root, struct resource *old, __find_resource()
557 struct resource *new, __find_resource()
561 struct resource *this = root->child; __find_resource()
562 struct resource tmp = *new, avail, alloc; __find_resource()
566 * Skip past an allocated resource that starts at 0, since the assignment __find_resource()
612 * Find empty slot in the resource tree given range and alignment.
614 static int find_resource(struct resource *root, struct resource *new, find_resource()
622 * reallocate_resource - allocate a slot in the resource tree given range & alignment.
623 * The resource will be relocated if the new size cannot be reallocated in the
626 * @root: root resource descriptor
627 * @old: resource descriptor desired by caller
628 * @newsize: new size of the resource descriptor
631 static int reallocate_resource(struct resource *root, struct resource *old, reallocate_resource()
636 struct resource new = *old; reallocate_resource()
637 struct resource *conflict; reallocate_resource()
671 * allocate_resource - allocate empty slot in the resource tree given range & alignment.
672 * The resource will be reallocated with a new size if it was already allocated
673 * @root: root resource descriptor
674 * @new: resource descriptor desired by caller
675 * @size: requested resource region size
682 int allocate_resource(struct resource *root, struct resource *new, allocate_resource()
686 const struct resource *, allocate_resource()
704 /* resource is already allocated, try reallocating with allocate_resource()
720 * lookup_resource - find an existing resource by a resource start address
721 * @root: root resource descriptor
722 * @start: resource start address
724 * Returns a pointer to the resource if found, NULL otherwise
726 struct resource *lookup_resource(struct resource *root, resource_size_t start) lookup_resource()
728 struct resource *res; lookup_resource()
741 * Insert a resource into the resource tree. If successful, return NULL,
742 * otherwise return the conflicting resource (compare to __request_resource())
744 static struct resource * __insert_resource(struct resource *parent, struct resource *new) __insert_resource()
746 struct resource *first, *next; __insert_resource()
794 * insert_resource_conflict - Inserts resource in the resource tree
795 * @parent: parent of the new resource
796 * @new: new resource to insert
798 * Returns 0 on success, conflict resource if the resource can't be inserted.
802 * entirely fit within the range of the new resource, then the new
803 * resource is inserted and the conflicting resources become children of
804 * the new resource.
806 struct resource *insert_resource_conflict(struct resource *parent, struct resource *new) insert_resource_conflict()
808 struct resource *conflict; insert_resource_conflict()
817 * insert_resource - Inserts a resource in the resource tree
818 * @parent: parent of the new resource
819 * @new: new resource to insert
821 * Returns 0 on success, -EBUSY if the resource can't be inserted.
823 int insert_resource(struct resource *parent, struct resource *new) insert_resource()
825 struct resource *conflict; insert_resource()
832 * insert_resource_expand_to_fit - Insert a resource into the resource tree
833 * @root: root resource descriptor
834 * @new: new resource to insert
836 * Insert a resource into the resource tree, possibly expanding it in order
839 void insert_resource_expand_to_fit(struct resource *root, struct resource *new) insert_resource_expand_to_fit()
846 struct resource *conflict; insert_resource_expand_to_fit()
854 /* Ok, expand resource to cover the conflict, then try again .. */ insert_resource_expand_to_fit()
860 printk("Expanded resource %s due to conflict with %s\n", new->name, conflict->name); insert_resource_expand_to_fit()
865 static int __adjust_resource(struct resource *res, resource_size_t start, __adjust_resource()
868 struct resource *tmp, *parent = res->parent; __adjust_resource()
903 * adjust_resource - modify a resource's start and size
904 * @res: resource to modify
908 * Given an existing resource, change its start and size to match the
910 * Existing children of the resource are assumed to be immutable.
912 int adjust_resource(struct resource *res, resource_size_t start, adjust_resource()
924 static void __init __reserve_region_with_split(struct resource *root, __reserve_region_with_split()
928 struct resource *parent = root; __reserve_region_with_split()
929 struct resource *conflict; __reserve_region_with_split()
930 struct resource *res = alloc_resource(GFP_ATOMIC); __reserve_region_with_split()
931 struct resource *next_res = NULL; __reserve_region_with_split()
982 void __init reserve_region_with_split(struct resource *root, reserve_region_with_split()
1012 * resource_alignment - calculate resource's alignment
1013 * @res: resource pointer
1017 resource_size_t resource_alignment(struct resource *res) resource_alignment()
1043 * __request_region - create a new busy resource region
1044 * @parent: parent resource descriptor
1045 * @start: resource start address
1046 * @n: resource region size
1048 * @flags: IO resource flags
1050 struct resource * __request_region(struct resource *parent, __request_region()
1055 struct resource *res = alloc_resource(GFP_KERNEL); __request_region()
1069 struct resource *conflict; __request_region()
1100 * __release_region - release a previously reserved resource region
1101 * @parent: parent resource descriptor
1102 * @start: resource start address
1103 * @n: resource region size
1105 * The described resource region must match a currently busy region.
1107 void __release_region(struct resource *parent, resource_size_t start, __release_region()
1110 struct resource **p; __release_region()
1119 struct resource *res = *p; __release_region()
1142 printk(KERN_WARNING "Trying to free nonexistent resource " __release_region()
1151 * @parent: parent resource descriptor
1152 * @start: resource start address
1153 * @size: resource region size
1156 * is released from a currently busy memory resource. The requested region
1157 * must either match exactly or fit into a single busy resource entry. In
1158 * the latter case, the remaining resource is adjusted accordingly.
1159 * Existing children of the busy memory resource must be immutable in the
1165 * - When a busy memory resource gets split into two entries, the code
1169 int release_mem_region_adjustable(struct resource *parent, release_mem_region_adjustable()
1172 struct resource **p; release_mem_region_adjustable()
1173 struct resource *res; release_mem_region_adjustable()
1174 struct resource *new_res; release_mem_region_adjustable()
1192 /* look for the next resource if it does not fit into */ release_mem_region_adjustable()
1206 /* found the target resource; let's adjust accordingly */ release_mem_region_adjustable()
1252 * Managed region resource
1256 struct resource **r = ptr; devm_resource_release()
1262 * devm_request_resource() - request and reserve an I/O or memory resource
1263 * @dev: device for which to request the resource
1264 * @root: root of the resource tree from which to request the resource
1265 * @new: descriptor of the resource to request
1270 * If for some reason the resource needs to be released explicitly, because
1275 * requested resource, an error message will be printed.
1279 int devm_request_resource(struct device *dev, struct resource *root, devm_request_resource()
1280 struct resource *new) devm_request_resource()
1282 struct resource *conflict, **ptr; devm_request_resource()
1292 dev_err(dev, "resource collision: %pR conflicts with %s %pR\n", devm_request_resource()
1305 struct resource **ptr = res; devm_resource_match()
1311 * devm_release_resource() - release a previously requested resource
1312 * @dev: device for which to release the resource
1313 * @new: descriptor of the resource to release
1315 * Releases a resource previously requested using devm_request_resource().
1317 void devm_release_resource(struct device *dev, struct resource *new) devm_release_resource()
1325 struct resource *parent;
1345 struct resource * __devm_request_region(struct device *dev, __devm_request_region()
1346 struct resource *parent, resource_size_t start, __devm_request_region()
1350 struct resource *res; __devm_request_region()
1371 void __devm_release_region(struct device *dev, struct resource *parent, __devm_release_region()
1389 static struct resource reserve[MAXRESERVE]; reserve_setup()
1400 struct resource *res = reserve + x; reserve_setup()
1417 * iomem resource tree.
1421 struct resource *p = &iomem_resource; iomem_map_sanity_check()
1439 * if a resource is "BUSY", it's not a hardware resource iomem_map_sanity_check()
1440 * but a driver mapping of such a resource; we don't want iomem_map_sanity_check()
1447 printk(KERN_WARNING "resource sanity check: requesting [mem %#010llx-%#010llx], which spans more than %s %pR\n", iomem_map_sanity_check()
1466 * check if an address is reserved in the iomem resource tree
1471 struct resource *p = &iomem_resource; iomem_is_exclusive()
1502 struct resource_entry *resource_list_create_entry(struct resource *res, resource_list_create_entry()
/linux-4.1.27/drivers/acpi/
H A Dpower.c32 * An ACPI "power resource object" describes a software controllable power
33 * plane, clock plane, or other resource used by a power managed device.
34 * A device may rely on multiple power resources, and a power resource
72 struct acpi_power_resource *resource; member in struct:acpi_power_resource_entry
101 struct acpi_power_resource *resource = acpi_power_get_context(handle); acpi_power_resources_list_add() local
104 if (!resource || !list) acpi_power_resources_list_add()
111 entry->resource = resource; acpi_power_resources_list_add()
116 if (e->resource->order > resource->order) { list_for_each_entry()
205 struct acpi_power_resource *resource = entry->resource; list_for_each_entry() local
206 acpi_handle handle = resource->device.handle; list_for_each_entry()
209 mutex_lock(&resource->resource_lock); list_for_each_entry()
211 mutex_unlock(&resource->resource_lock); list_for_each_entry()
226 static int __acpi_power_on(struct acpi_power_resource *resource) __acpi_power_on() argument
230 status = acpi_evaluate_object(resource->device.handle, "_ON", NULL, NULL); __acpi_power_on()
234 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Power resource [%s] turned on\n", __acpi_power_on()
235 resource->name)); __acpi_power_on()
240 static int acpi_power_on_unlocked(struct acpi_power_resource *resource) acpi_power_on_unlocked() argument
244 if (resource->ref_count++) { acpi_power_on_unlocked()
246 "Power resource [%s] already on\n", acpi_power_on_unlocked()
247 resource->name)); acpi_power_on_unlocked()
249 result = __acpi_power_on(resource); acpi_power_on_unlocked()
251 resource->ref_count--; acpi_power_on_unlocked()
256 static int acpi_power_on(struct acpi_power_resource *resource) acpi_power_on() argument
260 mutex_lock(&resource->resource_lock); acpi_power_on()
261 result = acpi_power_on_unlocked(resource); acpi_power_on()
262 mutex_unlock(&resource->resource_lock); acpi_power_on()
266 static int __acpi_power_off(struct acpi_power_resource *resource) __acpi_power_off() argument
270 status = acpi_evaluate_object(resource->device.handle, "_OFF", __acpi_power_off()
275 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Power resource [%s] turned off\n", __acpi_power_off()
276 resource->name)); __acpi_power_off()
280 static int acpi_power_off_unlocked(struct acpi_power_resource *resource) acpi_power_off_unlocked() argument
284 if (!resource->ref_count) { acpi_power_off_unlocked()
286 "Power resource [%s] already off\n", acpi_power_off_unlocked()
287 resource->name)); acpi_power_off_unlocked()
291 if (--resource->ref_count) { acpi_power_off_unlocked()
293 "Power resource [%s] still in use\n", acpi_power_off_unlocked()
294 resource->name)); acpi_power_off_unlocked()
296 result = __acpi_power_off(resource); acpi_power_off_unlocked()
298 resource->ref_count++; acpi_power_off_unlocked()
303 static int acpi_power_off(struct acpi_power_resource *resource) acpi_power_off() argument
307 mutex_lock(&resource->resource_lock); acpi_power_off()
308 result = acpi_power_off_unlocked(resource); acpi_power_off()
309 mutex_unlock(&resource->resource_lock); acpi_power_off()
319 result = acpi_power_off(entry->resource); list_for_each_entry_reverse()
327 acpi_power_on(entry->resource);
338 result = acpi_power_on(entry->resource); list_for_each_entry()
346 acpi_power_off(entry->resource);
389 struct acpi_device *res_dev = &entry->resource->device; list_for_each_entry_reverse()
413 struct acpi_device *res_dev = &entry->resource->device; list_for_each_entry()
460 struct acpi_power_resource *resource = entry->resource; list_for_each_entry() local
461 acpi_handle handle = resource->device.handle; list_for_each_entry()
465 mutex_lock(&resource->resource_lock); list_for_each_entry()
469 mutex_unlock(&resource->resource_lock); list_for_each_entry()
473 resource->ref_count++; list_for_each_entry()
474 resource->wakeup_enabled = true; list_for_each_entry()
476 if (system_level > resource->system_level) list_for_each_entry()
477 system_level = resource->system_level; list_for_each_entry()
479 mutex_unlock(&resource->resource_lock); list_for_each_entry()
570 struct acpi_power_resource *resource = entry->resource; acpi_enable_wakeup_device_power() local
572 mutex_lock(&resource->resource_lock); acpi_enable_wakeup_device_power()
574 if (!resource->wakeup_enabled) { acpi_enable_wakeup_device_power()
575 err = acpi_power_on_unlocked(resource); acpi_enable_wakeup_device_power()
577 resource->wakeup_enabled = true; acpi_enable_wakeup_device_power()
580 mutex_unlock(&resource->resource_lock); acpi_enable_wakeup_device_power()
633 struct acpi_power_resource *resource = entry->resource; acpi_disable_wakeup_device_power() local
635 mutex_lock(&resource->resource_lock); acpi_disable_wakeup_device_power()
637 if (resource->wakeup_enabled) { acpi_disable_wakeup_device_power()
638 err = acpi_power_off_unlocked(resource); acpi_disable_wakeup_device_power()
640 resource->wakeup_enabled = false; acpi_disable_wakeup_device_power()
643 mutex_unlock(&resource->resource_lock); acpi_disable_wakeup_device_power()
737 struct acpi_power_resource *resource; acpi_release_power_resource() local
739 resource = container_of(device, struct acpi_power_resource, device); acpi_release_power_resource()
742 list_del(&resource->list_node); acpi_release_power_resource()
746 kfree(resource); acpi_release_power_resource()
752 struct acpi_power_resource *resource; acpi_power_in_use_show() local
754 resource = to_power_resource(to_acpi_device(dev)); acpi_power_in_use_show()
755 return sprintf(buf, "%u\n", !!resource->ref_count); acpi_power_in_use_show()
766 struct acpi_power_resource *resource; acpi_add_power_resource() local
777 resource = kzalloc(sizeof(*resource), GFP_KERNEL); acpi_add_power_resource()
778 if (!resource) acpi_add_power_resource()
781 device = &resource->device; acpi_add_power_resource()
784 mutex_init(&resource->resource_lock); acpi_add_power_resource()
785 INIT_LIST_HEAD(&resource->list_node); acpi_add_power_resource()
786 resource->name = device->pnp.bus_id; acpi_add_power_resource()
791 /* Evalute the object to get the system level and resource order. */ acpi_add_power_resource()
796 resource->system_level = acpi_object.power_resource.system_level; acpi_add_power_resource()
797 resource->order = acpi_object.power_resource.resource_order; acpi_add_power_resource()
815 list_add(&resource->list_node, &acpi_power_resource_list); acpi_add_power_resource()
828 struct acpi_power_resource *resource; acpi_resume_power_resources() local
832 list_for_each_entry(resource, &acpi_power_resource_list, list_node) { acpi_resume_power_resources()
835 mutex_lock(&resource->resource_lock); acpi_resume_power_resources()
837 result = acpi_power_get_state(resource->device.handle, &state); acpi_resume_power_resources()
839 mutex_unlock(&resource->resource_lock); acpi_resume_power_resources()
844 && resource->ref_count) { acpi_resume_power_resources()
845 dev_info(&resource->device.dev, "Turning ON\n"); acpi_resume_power_resources()
846 __acpi_power_on(resource); acpi_resume_power_resources()
848 && !resource->ref_count) { acpi_resume_power_resources()
849 dev_info(&resource->device.dev, "Turning OFF\n"); acpi_resume_power_resources()
850 __acpi_power_off(resource); acpi_resume_power_resources()
853 mutex_unlock(&resource->resource_lock); acpi_resume_power_resources()
H A Dresource.c2 * drivers/acpi/resource.c - ACPI device resources interpretation.
51 pr_debug("ACPI: invalid or unassigned resource %s [%016llx - %016llx] length [%016llx]\n", acpi_dev_resource_len_valid()
57 static void acpi_dev_memresource_flags(struct resource *res, u64 len, acpi_dev_memresource_flags()
69 static void acpi_dev_get_memresource(struct resource *res, u64 start, u64 len, acpi_dev_get_memresource()
78 * acpi_dev_resource_memory - Extract ACPI memory resource information.
79 * @ares: Input ACPI resource object.
80 * @res: Output generic resource object.
82 * Check if the given ACPI resource object represents a memory resource and
84 * resource object pointed to by @res.
87 * 1) false with res->flags setting to zero: not the expected resource type
88 * 2) false with IORESOURCE_DISABLED in res->flags: valid unassigned resource
89 * 3) true: valid assigned resource
91 bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res) acpi_dev_resource_memory()
125 static void acpi_dev_ioresource_flags(struct resource *res, u64 len, acpi_dev_ioresource_flags()
140 static void acpi_dev_get_ioresource(struct resource *res, u64 start, u64 len, acpi_dev_get_ioresource()
149 * acpi_dev_resource_io - Extract ACPI I/O resource information.
150 * @ares: Input ACPI resource object.
151 * @res: Output generic resource object.
153 * Check if the given ACPI resource object represents an I/O resource and
155 * resource object pointed to by @res.
158 * 1) false with res->flags setting to zero: not the expected resource type
159 * 2) false with IORESOURCE_DISABLED in res->flags: valid unassigned resource
160 * 3) true: valid assigned resource
162 bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res) acpi_dev_resource_io()
197 struct resource *res = &win->res; acpi_decode_space()
228 pr_warn("acpi resource window ([%#llx-%#llx] ignored, not CPU addressable)\n", acpi_decode_space()
258 * @ares: Input ACPI resource object.
259 * @win: Output generic resource object.
261 * Check if the given ACPI resource object represents an address space resource
263 * resource object pointed to by @win.
266 * 1) false with win->res.flags setting to zero: not the expected resource type
268 * resource
269 * 3) true: valid assigned resource
287 * @ares: Input ACPI resource object.
288 * @win: Output generic resource object.
290 * Check if the given ACPI resource object represents an extended address space
291 * resource and if that's the case, use the information in it to populate the
292 * generic resource object pointed to by @win.
295 * 1) false with win->res.flags setting to zero: not the expected resource type
297 * resource
298 * 3) true: valid assigned resource
317 * acpi_dev_irq_flags - Determine IRQ resource flags.
340 static void acpi_dev_irqresource_disabled(struct resource *res, u32 gsi) acpi_dev_irqresource_disabled()
347 static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, acpi_dev_get_irqresource()
364 * resource (the legacy ISA resources). With modern ACPI 5 devices acpi_dev_get_irqresource()
391 * acpi_dev_resource_interrupt - Extract ACPI interrupt resource information.
392 * @ares: Input ACPI resource object.
393 * @index: Index into the array of GSIs represented by the resource.
394 * @res: Output generic resource object.
396 * Check if the given ACPI resource object represents an interrupt resource
397 * and @index does not exceed the resource's interrupt count (true is returned
400 * represented by the resource and populate the generic resource object pointed
405 * 1) false with res->flags setting to zero: not the expected resource type
406 * 2) false with IORESOURCE_DISABLED in res->flags: valid unassigned resource
407 * 3) true: valid assigned resource
410 struct resource *res) acpi_dev_resource_interrupt()
450 * acpi_dev_free_resource_list - Free resource from %acpi_dev_get_resources().
451 * @list: The head of the resource list to free.
489 struct resource *res = &win.res; acpi_dev_process_resource()
532 * resource pointer and @preproc_data to it as arguments, for each ACPI resource
534 * resource objects if possible. If the return value of @preproc() in step (1)
535 * is different from 0, step (2) is not applied to the given ACPI resource and
539 * The resultant struct resource objects are put on the list pointed to by
577 * acpi_dev_filter_resource_type - Filter ACPI resource according to resource
579 * @ares: Input ACPI resource object.
580 * @types: Valid resource types of IORESOURCE_XXX
583 * ACPI resource objects according to resource types.
H A Dpci_link.c27 * 1. Support more than one IRQ resource entry per link device (index).
99 * set context (link) possible list from resource list
101 static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource, acpi_pci_link_check_possible() argument
107 switch (resource->type) { acpi_pci_link_check_possible()
113 struct acpi_resource_irq *p = &resource->data.irq; acpi_pci_link_check_possible()
116 "Blank _PRS IRQ resource\n")); acpi_pci_link_check_possible()
139 &resource->data.extended_irq; acpi_pci_link_check_possible()
142 "Blank _PRS EXT IRQ resource\n"); acpi_pci_link_check_possible()
163 printk(KERN_ERR PREFIX "_PRS resource type 0x%x isn't an IRQ\n", acpi_pci_link_check_possible()
164 resource->type); acpi_pci_link_check_possible()
189 static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, acpi_pci_link_check_current() argument
194 switch (resource->type) { acpi_pci_link_check_current()
200 struct acpi_resource_irq *p = &resource->data.irq; acpi_pci_link_check_current()
207 "Blank _CRS IRQ resource\n")); acpi_pci_link_check_current()
216 &resource->data.extended_irq; acpi_pci_link_check_current()
223 "Blank _CRS EXT IRQ resource\n"); acpi_pci_link_check_current()
231 printk(KERN_ERR PREFIX "_CRS resource type 0x%x isn't an IRQ\n", acpi_pci_link_check_current()
232 resource->type); acpi_pci_link_check_current()
301 } *resource; acpi_pci_link_set() local
307 resource = kzalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL); acpi_pci_link_set()
308 if (!resource) acpi_pci_link_set()
311 buffer.length = sizeof(*resource) + 1; acpi_pci_link_set()
312 buffer.pointer = resource; acpi_pci_link_set()
316 resource->res.type = ACPI_RESOURCE_TYPE_IRQ; acpi_pci_link_set()
317 resource->res.length = sizeof(struct acpi_resource); acpi_pci_link_set()
318 resource->res.data.irq.triggering = link->irq.triggering; acpi_pci_link_set()
319 resource->res.data.irq.polarity = acpi_pci_link_set()
322 resource->res.data.irq.sharable = acpi_pci_link_set()
325 resource->res.data.irq.sharable = ACPI_SHARED; acpi_pci_link_set()
326 resource->res.data.irq.interrupt_count = 1; acpi_pci_link_set()
327 resource->res.data.irq.interrupts[0] = irq; acpi_pci_link_set()
331 resource->res.type = ACPI_RESOURCE_TYPE_EXTENDED_IRQ; acpi_pci_link_set()
332 resource->res.length = sizeof(struct acpi_resource); acpi_pci_link_set()
333 resource->res.data.extended_irq.producer_consumer = acpi_pci_link_set()
335 resource->res.data.extended_irq.triggering = acpi_pci_link_set()
337 resource->res.data.extended_irq.polarity = acpi_pci_link_set()
340 resource->res.data.irq.sharable = acpi_pci_link_set()
343 resource->res.data.irq.sharable = ACPI_SHARED; acpi_pci_link_set()
344 resource->res.data.extended_irq.interrupt_count = 1; acpi_pci_link_set()
345 resource->res.data.extended_irq.interrupts[0] = irq; acpi_pci_link_set()
354 resource->end.type = ACPI_RESOURCE_TYPE_END_TAG; acpi_pci_link_set()
355 resource->end.length = sizeof(struct acpi_resource); acpi_pci_link_set()
357 /* Attempt to set the resource */ acpi_pci_link_set()
405 kfree(resource); acpi_pci_link_set()
/linux-4.1.27/drivers/staging/fsl-mc/bus/
H A Dmc-allocator.c20 * fsl_mc_resource_pool_add_device - add allocatable device to a resource
27 * It adds an allocatable MC object device to a container's resource pool of
28 * the given resource type
38 struct fsl_mc_resource *resource; fsl_mc_resource_pool_add_device() local
47 if (WARN_ON(mc_dev->resource)) fsl_mc_resource_pool_add_device()
65 resource = devm_kzalloc(&mc_bus_dev->dev, sizeof(*resource), fsl_mc_resource_pool_add_device()
67 if (!resource) { fsl_mc_resource_pool_add_device()
74 resource->type = pool_type; fsl_mc_resource_pool_add_device()
75 resource->id = mc_dev->obj_desc.id; fsl_mc_resource_pool_add_device()
76 resource->data = mc_dev; fsl_mc_resource_pool_add_device()
77 resource->parent_pool = res_pool; fsl_mc_resource_pool_add_device()
78 INIT_LIST_HEAD(&resource->node); fsl_mc_resource_pool_add_device()
79 list_add_tail(&resource->node, &res_pool->free_list); fsl_mc_resource_pool_add_device()
80 mc_dev->resource = resource; fsl_mc_resource_pool_add_device()
93 * resource pool
97 * It permanently removes an allocatable MC object device from the resource
106 struct fsl_mc_resource *resource; fsl_mc_resource_pool_remove_device() local
113 resource = mc_dev->resource; fsl_mc_resource_pool_remove_device()
114 if (WARN_ON(resource->data != mc_dev)) fsl_mc_resource_pool_remove_device()
119 res_pool = resource->parent_pool; fsl_mc_resource_pool_remove_device()
120 if (WARN_ON(res_pool != &mc_bus->resource_pools[resource->type])) fsl_mc_resource_pool_remove_device()
133 * If the device is currently allocated, its resource is not fsl_mc_resource_pool_remove_device()
136 if (list_empty(&resource->node)) { fsl_mc_resource_pool_remove_device()
139 "Device %s cannot be removed from resource pool\n", fsl_mc_resource_pool_remove_device()
144 list_del(&resource->node); fsl_mc_resource_pool_remove_device()
145 INIT_LIST_HEAD(&resource->node); fsl_mc_resource_pool_remove_device()
149 devm_kfree(&mc_bus_dev->dev, resource); fsl_mc_resource_pool_remove_device()
150 mc_dev->resource = NULL; fsl_mc_resource_pool_remove_device()
186 struct fsl_mc_resource *resource; fsl_mc_resource_allocate() local
204 resource = list_first_entry_or_null(&res_pool->free_list, fsl_mc_resource_allocate()
207 if (!resource) { fsl_mc_resource_allocate()
216 if (WARN_ON(resource->type != pool_type)) fsl_mc_resource_allocate()
218 if (WARN_ON(resource->parent_pool != res_pool)) fsl_mc_resource_allocate()
224 list_del(&resource->node); fsl_mc_resource_allocate()
225 INIT_LIST_HEAD(&resource->node); fsl_mc_resource_allocate()
229 *new_resource = resource; fsl_mc_resource_allocate()
239 void fsl_mc_resource_free(struct fsl_mc_resource *resource) fsl_mc_resource_free() argument
244 res_pool = resource->parent_pool; fsl_mc_resource_free()
245 if (WARN_ON(resource->type != res_pool->type)) fsl_mc_resource_free()
254 if (WARN_ON(!list_empty(&resource->node))) fsl_mc_resource_free()
257 list_add_tail(&resource->node, &res_pool->free_list); fsl_mc_resource_free()
289 struct fsl_mc_resource *resource = NULL; fsl_mc_portal_allocate() local
303 error = fsl_mc_resource_allocate(mc_bus, FSL_MC_POOL_DPMCP, &resource); fsl_mc_portal_allocate()
307 mc_adev = resource->data; fsl_mc_portal_allocate()
323 mc_portal_size, resource, fsl_mc_portal_allocate()
332 fsl_mc_resource_free(resource); fsl_mc_portal_allocate()
345 struct fsl_mc_resource *resource; fsl_mc_portal_free() local
347 resource = mc_io->resource; fsl_mc_portal_free()
348 if (WARN_ON(resource->type != FSL_MC_POOL_DPMCP)) fsl_mc_portal_free()
350 if (WARN_ON(!resource->data)) fsl_mc_portal_free()
354 fsl_mc_resource_free(resource); fsl_mc_portal_free()
367 struct fsl_mc_resource *resource = mc_io->resource; fsl_mc_portal_reset() local
368 struct fsl_mc_device *mc_dev = resource->data; fsl_mc_portal_reset()
370 if (WARN_ON(resource->type != FSL_MC_POOL_DPMCP)) fsl_mc_portal_reset()
403 * @pool_type: MC bus resource pool type
409 * the given resource type. mc_dev cannot be a DPRC itself.
423 struct fsl_mc_resource *resource = NULL; fsl_mc_object_allocate() local
437 error = fsl_mc_resource_allocate(mc_bus, pool_type, &resource); fsl_mc_object_allocate()
441 mc_adev = resource->data; fsl_mc_object_allocate()
448 if (resource) fsl_mc_object_allocate()
449 fsl_mc_resource_free(resource); fsl_mc_object_allocate()
457 * corresponding resource pool of a given MC bus.
463 struct fsl_mc_resource *resource; fsl_mc_object_free() local
465 resource = mc_adev->resource; fsl_mc_object_free()
466 if (WARN_ON(resource->type == FSL_MC_POOL_DPMCP)) fsl_mc_object_free()
468 if (WARN_ON(resource->data != mc_adev)) fsl_mc_object_free()
471 fsl_mc_resource_free(resource); fsl_mc_object_free()
/linux-4.1.27/security/apparmor/
H A Dresource.c4 * This file contains AppArmor resource mediation and attachment
19 #include "include/resource.h"
23 * Table of rlimit names: we generate it from resource.h.
32 /* audit callback for resource specific fields */ audit_cb()
42 * audit_resource - audit setting resource limit
50 static int audit_resource(struct aa_profile *profile, unsigned int resource, audit_resource() argument
59 aad.rlim.rlim = resource; audit_resource()
67 * aa_map_resouce - map compiled policy resource to internal #
68 * @resource: flattened policy resource number
70 * Returns: resource # for the current architecture.
72 * rlimit resource can vary based on architecture, map the compiled policy
73 * resource # to the internal representation for the architecture.
75 int aa_map_resource(int resource) aa_map_resource() argument
77 return rlim_map[resource]; aa_map_resource()
83 * @task - task the resource is being set on
84 * @resource - the resource being set
85 * @new_rlim - the new resource limit (NOT NULL)
89 * Returns: 0 or error code if setting resource failed
92 unsigned int resource, struct rlimit *new_rlim) aa_task_setrlimit()
101 /* TODO: extend resource control to handle other (non current) aa_task_setrlimit()
103 * that the task is setting the resource of a task confined with aa_task_setrlimit()
107 (profile->rlimits.mask & (1 << resource) && aa_task_setrlimit()
108 new_rlim->rlim_max > profile->rlimits.limits[resource].rlim_max)) aa_task_setrlimit()
113 return audit_resource(profile, resource, new_rlim->rlim_max, error); aa_task_setrlimit()
91 aa_task_setrlimit(struct aa_profile *profile, struct task_struct *task, unsigned int resource, struct rlimit *new_rlim) aa_task_setrlimit() argument
H A DMakefile7 resource.o sid.o file.o
36 # RLIMIT defines to the order defined in asm-generic/resource.h This is
64 $(obj)/resource.o : $(obj)/rlim_names.h
68 $(obj)/rlim_names.h : $(srctree)/include/uapi/asm-generic/resource.h \
/linux-4.1.27/drivers/acpi/acpica/
H A Drslist.c61 * DESCRIPTION: Convert an AML resource to an internal representation of the
62 * resource that is aligned and easier to access.
72 struct acpi_resource *resource; acpi_rs_convert_aml_to_resources() local
83 resource = *resource_ptr; acpi_rs_convert_aml_to_resources()
84 if (ACPI_IS_MISALIGNED(resource)) { acpi_rs_convert_aml_to_resources()
86 "Misaligned resource pointer %p", resource)); acpi_rs_convert_aml_to_resources()
110 "Invalid/unsupported resource descriptor: Type 0x%2.2X", acpi_rs_convert_aml_to_resources()
115 /* Convert the AML byte stream resource to a local resource struct */ acpi_rs_convert_aml_to_resources()
118 acpi_rs_convert_aml_to_resource(resource, aml_resource, acpi_rs_convert_aml_to_resources()
122 "Could not convert AML resource (Type 0x%X)", acpi_rs_convert_aml_to_resources()
130 resource->length)); acpi_rs_convert_aml_to_resources()
134 *resource_ptr = ACPI_NEXT_RESOURCE(resource); acpi_rs_convert_aml_to_resources()
142 * PARAMETERS: resource - Pointer to the resource linked list
152 * DESCRIPTION: Takes the resource linked list and parses it, creating a
158 acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, acpi_rs_convert_resources_to_aml() argument
168 /* Walk the resource descriptor list, convert each descriptor */ acpi_rs_convert_resources_to_aml()
174 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { acpi_rs_convert_resources_to_aml()
176 "Invalid descriptor type (0x%X) in resource list", acpi_rs_convert_resources_to_aml()
177 resource->type)); acpi_rs_convert_resources_to_aml()
183 if (!resource->length) { acpi_rs_convert_resources_to_aml()
185 "Invalid zero length descriptor in resource list\n")); acpi_rs_convert_resources_to_aml()
191 if (resource->type == ACPI_RESOURCE_TYPE_SERIAL_BUS) { acpi_rs_convert_resources_to_aml()
192 if (resource->data.common_serial_bus.type > acpi_rs_convert_resources_to_aml()
200 [resource->data.common_serial_bus.type]; acpi_rs_convert_resources_to_aml()
204 acpi_gbl_set_resource_dispatch[resource->type]; acpi_rs_convert_resources_to_aml()
209 "Invalid/unsupported resource descriptor: Type 0x%2.2X", acpi_rs_convert_resources_to_aml()
210 resource->type)); acpi_rs_convert_resources_to_aml()
214 status = acpi_rs_convert_resource_to_aml(resource, acpi_rs_convert_resources_to_aml()
221 "Could not convert resource (type 0x%X) to AML", acpi_rs_convert_resources_to_aml()
222 resource->type)); acpi_rs_convert_resources_to_aml()
226 /* Perform final sanity check on the new AML resource descriptor */ acpi_rs_convert_resources_to_aml()
238 if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { acpi_rs_convert_resources_to_aml()
247 * Aml to point to the next (output) resource descriptor acpi_rs_convert_resources_to_aml()
251 /* Point to the next input resource descriptor */ acpi_rs_convert_resources_to_aml()
253 resource = ACPI_NEXT_RESOURCE(resource); acpi_rs_convert_resources_to_aml()
256 /* Completed buffer, but did not find an end_tag resource descriptor */ acpi_rs_convert_resources_to_aml()
H A Drsmisc.c3 * Module Name: rsmisc - Miscellaneous resource descriptors
60 * PARAMETERS: resource - Pointer to the resource descriptor
66 * DESCRIPTION: Convert an external AML resource descriptor to the corresponding
67 * internal resource descriptor
71 acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, acpi_rs_convert_aml_to_resource() argument
90 if (((acpi_size) resource) & 0x3) { acpi_rs_convert_aml_to_resource()
92 /* Each internal resource struct is expected to be 32-bit aligned */ acpi_rs_convert_aml_to_resource()
95 "Misaligned resource pointer (get): %p Type 0x%2.2X Length %u", acpi_rs_convert_aml_to_resource()
96 resource, resource->type, resource->length)); acpi_rs_convert_aml_to_resource()
99 /* Extract the resource Length field (does not include header length) */ acpi_rs_convert_aml_to_resource()
111 * destination is the internal resource descriptor acpi_rs_convert_aml_to_resource()
115 ACPI_ADD_PTR(void, resource, info->resource_offset); acpi_rs_convert_aml_to_resource()
120 * Get the resource type and the initial (minimum) length acpi_rs_convert_aml_to_resource()
122 ACPI_MEMSET(resource, 0, INIT_RESOURCE_LENGTH(info)); acpi_rs_convert_aml_to_resource()
123 resource->type = INIT_RESOURCE_TYPE(info); acpi_rs_convert_aml_to_resource()
124 resource->length = INIT_RESOURCE_LENGTH(info); acpi_rs_convert_aml_to_resource()
164 resource->length = resource->length + acpi_rs_convert_aml_to_resource()
173 resource->length = resource->length + acpi_rs_convert_aml_to_resource()
182 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
192 resource->length = resource->length + acpi_rs_convert_aml_to_resource()
204 /* Use vendor offset to get resource source length */ acpi_rs_convert_aml_to_resource()
217 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
225 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
235 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
241 resource->length = resource->length + info->value; acpi_rs_convert_aml_to_resource()
263 target = (char *)ACPI_ADD_PTR(void, resource, acpi_rs_convert_aml_to_resource()
264 (resource->length - acpi_rs_convert_aml_to_resource()
279 target = (char *)ACPI_ADD_PTR(void, resource, acpi_rs_convert_aml_to_resource()
280 (resource->length - acpi_rs_convert_aml_to_resource()
295 target = (char *)ACPI_ADD_PTR(void, resource, acpi_rs_convert_aml_to_resource()
296 (resource->length - acpi_rs_convert_aml_to_resource()
311 target = (char *)ACPI_ADD_PTR(void, resource, acpi_rs_convert_aml_to_resource()
312 (resource->length - acpi_rs_convert_aml_to_resource()
332 target = ACPI_ADD_PTR(char, resource, info->value); acpi_rs_convert_aml_to_resource()
340 if (!acpi_rs_get_address_common(resource, aml)) { acpi_rs_convert_aml_to_resource()
350 resource->length += acpi_rs_convert_aml_to_resource()
361 target = ACPI_ADD_PTR(char, resource, acpi_rs_convert_aml_to_resource()
365 resource->length += acpi_rs_convert_aml_to_resource()
383 resource->length += (item_count - 1); acpi_rs_convert_aml_to_resource()
386 target = ACPI_ADD_PTR(char, resource, info->value); acpi_rs_convert_aml_to_resource()
399 resource->length += (item_count - 1); acpi_rs_convert_aml_to_resource()
402 target = ACPI_ADD_PTR(char, resource, info->value); acpi_rs_convert_aml_to_resource()
446 /* Round the resource struct length up to the next boundary (32 or 64) */ acpi_rs_convert_aml_to_resource()
448 resource->length = acpi_rs_convert_aml_to_resource()
449 (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length); acpi_rs_convert_aml_to_resource()
458 * PARAMETERS: resource - Pointer to the resource descriptor
464 * DESCRIPTION: Convert an internal resource descriptor to the corresponding
465 * external AML resource descriptor.
470 acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, acpi_rs_convert_resource_to_aml() argument
496 * Source is the internal resource descriptor, acpi_rs_convert_resource_to_aml()
499 source = ACPI_ADD_PTR(void, resource, info->resource_offset); acpi_rs_convert_resource_to_aml()
588 /* Set resource source string length */ acpi_rs_convert_resource_to_aml()
600 if (resource->data.gpio.vendor_length) { acpi_rs_convert_resource_to_aml()
685 acpi_rs_set_address_common(aml, resource); acpi_rs_convert_resource_to_aml()
717 resource, acpi_rs_convert_resource_to_aml()
728 resource, acpi_rs_convert_resource_to_aml()
750 if (*ACPI_ADD_PTR(u8, resource, acpi_rs_convert_resource_to_aml()
769 if (*ACPI_ADD_PTR(u8, resource, acpi_rs_convert_resource_to_aml()
791 /* Previous resource validations */
797 if (resource->data.start_dpf.performance_robustness >= 3) {
808 "Invalid interrupt polarity/trigger in resource list, 0x%X",
813 resource->data.extended_irq.interrupt_count = temp8;
821 if (resource->data.dma.transfer == 0x03) {
H A Drscalc.c69 * DESCRIPTION: Count the number of bits set in a resource field. Used for
125 * PARAMETERS: resource_length - Length from the resource header
126 * minimum_total_length - Minimum length of this resource, before
147 * Large-type resource descriptors. acpi_rs_stream_option_length()
151 * If the length of the actual resource descriptor is greater than the ACPI acpi_rs_stream_option_length()
154 * (including the null terminator) is the resource length minus the minimum acpi_rs_stream_option_length()
167 * guarantee that the entire resource descriptor is native word aligned acpi_rs_stream_option_length()
176 * PARAMETERS: resource - Pointer to the resource linked list
177 * resource_list_size - Size of the resource linked list
182 * DESCRIPTION: Takes a linked list of internal resource descriptors and
184 * external resource byte stream.
189 acpi_rs_get_aml_length(struct acpi_resource *resource, acpi_rs_get_aml_length() argument
198 /* Traverse entire list of internal resource descriptors */ acpi_rs_get_aml_length()
201 ACPI_ADD_PTR(struct acpi_resource, resource, resource_list_size); acpi_rs_get_aml_length()
202 while (resource < resource_end) { acpi_rs_get_aml_length()
206 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { acpi_rs_get_aml_length()
212 if (!resource->length) { acpi_rs_get_aml_length()
216 /* Get the base size of the (external stream) resource descriptor */ acpi_rs_get_aml_length()
218 total_size = acpi_gbl_aml_resource_sizes[resource->type]; acpi_rs_get_aml_length()
224 switch (resource->type) { acpi_rs_get_aml_length()
229 if (resource->data.irq.descriptor_length == 2) { acpi_rs_get_aml_length()
238 if (resource->data.irq.descriptor_length == 0) { acpi_rs_get_aml_length()
246 * For a Vendor Specific resource, if the Length is between 1 and 7 acpi_rs_get_aml_length()
250 if (resource->data.vendor.byte_length > 7) { acpi_rs_get_aml_length()
252 /* Base size of a Large resource descriptor */ acpi_rs_get_aml_length()
261 (total_size + resource->data.vendor.byte_length); acpi_rs_get_aml_length()
282 acpi_rs_struct_option_length(&resource->data. acpi_rs_get_aml_length()
294 acpi_rs_struct_option_length(&resource->data. acpi_rs_get_aml_length()
306 acpi_rs_struct_option_length(&resource->data. acpi_rs_get_aml_length()
319 ((resource->data.extended_irq.interrupt_count - acpi_rs_get_aml_length()
322 acpi_rs_struct_option_length(&resource->data. acpi_rs_get_aml_length()
331 (resource->data.gpio. acpi_rs_get_aml_length()
333 resource->data.gpio. acpi_rs_get_aml_length()
335 resource->data.gpio. acpi_rs_get_aml_length()
343 acpi_gbl_aml_resource_serial_bus_sizes[resource-> acpi_rs_get_aml_length()
349 resource->data. acpi_rs_get_aml_length()
353 resource->data. acpi_rs_get_aml_length()
370 resource = acpi_rs_get_aml_length()
371 ACPI_ADD_PTR(struct acpi_resource, resource, acpi_rs_get_aml_length()
372 resource->length); acpi_rs_get_aml_length()
375 /* Did not find an end_tag resource descriptor */ acpi_rs_get_aml_length()
384 * PARAMETERS: aml_buffer - Pointer to the resource byte stream
390 * DESCRIPTION: Takes an external resource byte stream and calculates the size
391 * buffer needed to hold the corresponding internal resource
416 /* Walk the list of AML resource descriptors */ acpi_rs_get_list_length()
435 /* Get the resource length and base (minimum) AML size */ acpi_rs_get_list_length()
580 * Point to the next resource within the AML stream using the length acpi_rs_get_list_length()
581 * contained in the resource descriptor header acpi_rs_get_list_length()
586 /* Did not find an end_tag resource descriptor */ acpi_rs_get_list_length()
H A Drsaddr.c3 * Module Name: rsaddr - Address resource descriptors (16/32/64)
297 * PARAMETERS: resource - Pointer to the internal resource struct
298 * aml - Pointer to the AML resource descriptor
302 * DESCRIPTION: Convert common flag fields from a raw AML resource descriptor
303 * to an internal resource descriptor
308 acpi_rs_get_address_common(struct acpi_resource *resource, acpi_rs_get_address_common() argument
322 (void)acpi_rs_convert_aml_to_resource(resource, aml, acpi_rs_get_address_common()
327 if (resource->data.address.resource_type == ACPI_MEMORY_RANGE) { acpi_rs_get_address_common()
328 (void)acpi_rs_convert_aml_to_resource(resource, aml, acpi_rs_get_address_common()
330 } else if (resource->data.address.resource_type == ACPI_IO_RANGE) { acpi_rs_get_address_common()
331 (void)acpi_rs_convert_aml_to_resource(resource, aml, acpi_rs_get_address_common()
334 /* Generic resource type, just grab the type_specific byte */ acpi_rs_get_address_common()
336 resource->data.address.info.type_specific = acpi_rs_get_address_common()
347 * PARAMETERS: aml - Pointer to the AML resource descriptor
348 * resource - Pointer to the internal resource struct
352 * DESCRIPTION: Convert common flag fields from a resource descriptor to an
359 struct acpi_resource *resource) acpi_rs_set_address_common()
365 (void)acpi_rs_convert_resource_to_aml(resource, aml, acpi_rs_set_address_common()
370 if (resource->data.address.resource_type == ACPI_MEMORY_RANGE) { acpi_rs_set_address_common()
371 (void)acpi_rs_convert_resource_to_aml(resource, aml, acpi_rs_set_address_common()
373 } else if (resource->data.address.resource_type == ACPI_IO_RANGE) { acpi_rs_set_address_common()
374 (void)acpi_rs_convert_resource_to_aml(resource, aml, acpi_rs_set_address_common()
377 /* Generic resource type, just copy the type_specific byte */ acpi_rs_set_address_common()
380 resource->data.address.info.type_specific; acpi_rs_set_address_common()
358 acpi_rs_set_address_common(union aml_resource *aml, struct acpi_resource *resource) acpi_rs_set_address_common() argument
H A Drsdump.c3 * Module Name: rsdump - AML debugger support for resource structures.
79 static void acpi_rs_dump_address_common(union acpi_resource_data *resource);
82 acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table);
88 * PARAMETERS: resource_list - Pointer to a resource descriptor list
109 /* Walk list and dump all resource descriptors (END_TAG terminates) */ acpi_rs_dump_resource_list()
120 ("Invalid descriptor type (%X) in resource list\n", acpi_rs_dump_resource_list()
129 ("Invalid zero length descriptor in resource list\n"); acpi_rs_dump_resource_list()
133 /* Dump the resource descriptor */ acpi_rs_dump_resource_list()
146 /* Point to the next resource structure */ acpi_rs_dump_resource_list()
198 * PARAMETERS: resource - Buffer containing the resource
199 * table - Table entry to decode the resource
203 * DESCRIPTION: Dump a resource descriptor based on a dump table entry.
208 acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) acpi_rs_dump_descriptor() argument
221 target = ACPI_ADD_PTR(u8, resource, table->offset); acpi_rs_dump_descriptor()
227 * Optional resource title acpi_rs_dump_descriptor()
330 * Long byte list for Vendor resource data acpi_rs_dump_descriptor()
428 * PARAMETERS: resource - Pointer to an internal resource descriptor
432 * DESCRIPTION: Dump the fields that are common to all Address resource
437 static void acpi_rs_dump_address_common(union acpi_resource_data *resource) acpi_rs_dump_address_common() argument
443 switch (resource->address.resource_type) { acpi_rs_dump_address_common()
446 acpi_rs_dump_descriptor(resource, acpi_rs_dump_memory_flags); acpi_rs_dump_address_common()
451 acpi_rs_dump_descriptor(resource, acpi_rs_dump_io_flags); acpi_rs_dump_address_common()
462 (u8) resource->address.resource_type); acpi_rs_dump_address_common()
468 acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags); acpi_rs_dump_address_common()
475 * PARAMETERS: title - Name of the resource field
476 * value - Value of the resource field
481 * output of the resource dump routines
H A Drsxface.c3 * Module Name: rsxface - Public interfaces to the resource manager
71 acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context);
88 * DESCRIPTION: Common parameter validation for resource interfaces
192 * the desired device. The resource data is placed in the buffer ACPI_EXPORT_SYMBOL()
237 * for the desired device. The resource data is placed in the ACPI_EXPORT_SYMBOL()
279 * the desired device. The resource data is passed to the routine ACPI_EXPORT_SYMBOL()
324 * the desired device. The resource data is passed to the routine ACPI_EXPORT_SYMBOL()
355 * PARAMETERS: resource - Pointer to a resource ACPI_EXPORT_SYMBOL()
361 * DESCRIPTION: If the resource is an address16, address32, or address64, ACPI_EXPORT_SYMBOL()
368 acpi_resource_to_address64(struct acpi_resource *resource, ACPI_EXPORT_SYMBOL()
374 if (!resource || !out) { ACPI_EXPORT_SYMBOL()
380 switch (resource->type) { ACPI_EXPORT_SYMBOL()
385 &resource->data); ACPI_EXPORT_SYMBOL()
393 &resource->data); ACPI_EXPORT_SYMBOL()
401 ACPI_MEMCPY(out, &resource->data, ACPI_EXPORT_SYMBOL()
420 * name - Method name for the parent resource ACPI_EXPORT_SYMBOL()
424 * ret_buffer - Where the vendor resource is returned ACPI_EXPORT_SYMBOL()
428 * DESCRIPTION: Walk a resource template for the specified device to find a ACPI_EXPORT_SYMBOL()
429 * vendor-defined resource that matches the supplied UUID and ACPI_EXPORT_SYMBOL()
452 /* Walk the _CRS or _PRS resource list for this device */ ACPI_EXPORT_SYMBOL()
474 * DESCRIPTION: Match a vendor resource via the ACPI 3.0 UUID
478 acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) acpi_rs_match_vendor_resource() argument
487 if (resource->type != ACPI_RESOURCE_TYPE_VENDOR) { acpi_rs_match_vendor_resource()
491 vendor = &resource->data.vendor_typed; acpi_rs_match_vendor_resource()
509 status = acpi_ut_initialize_buffer(buffer, resource->length); acpi_rs_match_vendor_resource()
514 /* Found the correct resource, copy and return it */ acpi_rs_match_vendor_resource()
516 ACPI_MEMCPY(buffer->pointer, resource, resource->length); acpi_rs_match_vendor_resource()
517 buffer->length = resource->length; acpi_rs_match_vendor_resource()
519 /* Found the desired descriptor, terminate resource walk */ acpi_rs_match_vendor_resource()
531 * user_function - Called for each resource
536 * DESCRIPTION: Walks the input resource template. The user_function is called
537 * once for each resource in the list.
547 struct acpi_resource *resource; acpi_walk_resource_buffer() local
558 /* Buffer contains the resource list and length */ acpi_walk_resource_buffer()
560 resource = ACPI_CAST_PTR(struct acpi_resource, buffer->pointer); acpi_walk_resource_buffer()
564 /* Walk the resource list until the end_tag is found (or buffer end) */ acpi_walk_resource_buffer()
566 while (resource < resource_end) { acpi_walk_resource_buffer()
568 /* Sanity check the resource type */ acpi_walk_resource_buffer()
570 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { acpi_walk_resource_buffer()
577 if (!resource->length) { acpi_walk_resource_buffer()
583 status = user_function(resource, context); acpi_walk_resource_buffer()
596 if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { acpi_walk_resource_buffer()
600 /* Get the next resource descriptor */ acpi_walk_resource_buffer()
602 resource = ACPI_NEXT_RESOURCE(resource); acpi_walk_resource_buffer()
619 * user_function - Called for each resource ACPI_EXPORT_SYMBOL()
624 * DESCRIPTION: Retrieves the current or possible resource list for the ACPI_EXPORT_SYMBOL()
626 * each resource in the list. ACPI_EXPORT_SYMBOL()
648 /* Get the _CRS/_PRS/_AEI resource list */ ACPI_EXPORT_SYMBOL()
656 /* Walk the resource list and cleanup */ ACPI_EXPORT_SYMBOL()
H A Dutresrc.c53 * Strings used to decode resource descriptors.
54 * Used by both the disassembler and the debugger resource dump routines
297 * Base sizes of the raw AML resource descriptors, indexed by resource type.
298 * Zero indicates a reserved (and therefore invalid) resource type.
347 * Resource types, used to validate the resource length field.
350 * Zero indicates a reserved (and therefore invalid) resource type.
396 * PARAMETERS: aml - Pointer to the raw AML resource template
404 * DESCRIPTION: Walk a raw AML resource list(buffer). User function called
405 * once for each resource found.
424 /* The absolute minimum resource template is one end_tag descriptor */ acpi_ut_walk_aml_resources()
430 /* Point to the end of the resource template buffer */ acpi_ut_walk_aml_resources()
465 /* An end_tag descriptor terminates this resource template */ acpi_ut_walk_aml_resources()
515 * aml - Pointer to the raw AML resource descriptor
516 * return_index - Where the resource index is returned. NULL
519 * RETURN: Status, and optionally the Index into the global resource tables
521 * DESCRIPTION: Validate an AML resource descriptor by checking the Resource
523 * resource information/dispatch tables for later use.
546 * Examine the large/small bit in the resource header acpi_ut_validate_resource()
550 /* Verify the large resource type (name) against the max */ acpi_ut_validate_resource()
571 * Check validity of the resource type, via acpi_gbl_resource_types. Zero acpi_ut_validate_resource()
572 * indicates an invalid resource. acpi_ut_validate_resource()
585 /* Validate based upon the type of resource - fixed length or variable */ acpi_ut_validate_resource()
590 /* Fixed length resource, length must match exactly */ acpi_ut_validate_resource()
599 /* Variable length resource, length must be at least the minimum */ acpi_ut_validate_resource()
608 /* Small variable length resource, length can be (Min) or (Min-1) */ acpi_ut_validate_resource()
633 "Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X", acpi_ut_validate_resource()
641 /* Optionally return the resource table index */ acpi_ut_validate_resource()
653 "Invalid/unsupported resource descriptor: Type 0x%2.2X", acpi_ut_validate_resource()
662 "Invalid resource descriptor length: Type " acpi_ut_validate_resource()
674 * PARAMETERS: aml - Pointer to the raw AML resource descriptor
680 * a resource descriptor.
690 * Examine the large/small bit in the resource header acpi_ut_get_resource_type()
708 * PARAMETERS: aml - Pointer to the raw AML resource descriptor
726 * Examine the large/small bit in the resource header acpi_ut_get_resource_length()
748 * PARAMETERS: aml - Pointer to the raw AML resource descriptor
752 * DESCRIPTION: Get the length of the header for this resource.
760 /* Examine the large/small bit in the resource header */ acpi_ut_get_resource_header_length()
773 * PARAMETERS: aml - Pointer to the raw AML resource descriptor
789 * the header length (depends on if this is a small or large resource) acpi_ut_get_descriptor_length()
799 * PARAMETERS: obj_desc - The resource template buffer object
804 * DESCRIPTION: Find the end_tag resource descriptor in an AML resource template
/linux-4.1.27/arch/mips/jz4740/
H A Dplatform.c19 #include <linux/resource.h>
36 static struct resource jz4740_usb_ohci_resources[] = {
57 .resource = jz4740_usb_ohci_resources,
66 static struct resource jz4740_udc_resources[] = {
88 .resource = jz4740_udc_resources,
92 static struct resource jz4740_mmc_resources[] = {
113 .resource = jz4740_mmc_resources,
117 static struct resource jz4740_rtc_resources[] = {
134 .resource = jz4740_rtc_resources,
138 static struct resource jz4740_i2c_resources[] = {
155 .resource = jz4740_i2c_resources,
159 static struct resource jz4740_nand_resources[] = {
195 .resource = jz4740_nand_resources,
199 static struct resource jz4740_framebuffer_resources[] = {
211 .resource = jz4740_framebuffer_resources,
219 static struct resource jz4740_i2s_resources[] = {
231 .resource = jz4740_i2s_resources,
241 static struct resource jz4740_codec_resources[] = {
253 .resource = jz4740_codec_resources,
257 static struct resource jz4740_adc_resources[] = {
279 .resource = jz4740_adc_resources,
319 static struct resource jz4740_wdt_resources[] = {
331 .resource = jz4740_wdt_resources,
341 static struct resource jz4740_dma_resources[] = {
358 .resource = jz4740_dma_resources,
/linux-4.1.27/drivers/vme/
H A Dvme.c51 * Find the bridge that the resource is associated with.
53 static struct vme_bridge *find_bridge(struct vme_resource *resource) find_bridge() argument
56 switch (resource->type) { find_bridge()
58 return list_entry(resource->entry, struct vme_master_resource, find_bridge()
62 return list_entry(resource->entry, struct vme_slave_resource, find_bridge()
66 return list_entry(resource->entry, struct vme_dma_resource, find_bridge()
70 return list_entry(resource->entry, struct vme_lm_resource, find_bridge()
74 printk(KERN_ERR "Unknown resource type\n"); find_bridge()
84 void *vme_alloc_consistent(struct vme_resource *resource, size_t size, vme_alloc_consistent() argument
89 if (resource == NULL) { vme_alloc_consistent()
90 printk(KERN_ERR "No resource\n"); vme_alloc_consistent()
94 bridge = find_bridge(resource); vme_alloc_consistent()
118 void vme_free_consistent(struct vme_resource *resource, size_t size, vme_free_consistent() argument
123 if (resource == NULL) { vme_free_consistent()
124 printk(KERN_ERR "No resource\n"); vme_free_consistent()
128 bridge = find_bridge(resource); vme_free_consistent()
149 size_t vme_get_size(struct vme_resource *resource) vme_get_size() argument
156 switch (resource->type) { vme_get_size()
158 retval = vme_master_get(resource, &enabled, &base, &size, vme_get_size()
164 retval = vme_slave_get(resource, &enabled, &base, &size, vme_get_size()
173 printk(KERN_ERR "Unknown resource type\n"); vme_get_size()
238 struct vme_resource *resource = NULL; vme_slave_request() local
252 printk(KERN_ERR "Registered NULL Slave resource\n"); vme_slave_request()
274 resource = kmalloc(sizeof(struct vme_resource), GFP_KERNEL); vme_slave_request()
275 if (resource == NULL) { vme_slave_request()
276 printk(KERN_WARNING "Unable to allocate resource structure\n"); vme_slave_request()
279 resource->type = VME_SLAVE; vme_slave_request()
280 resource->entry = &allocated_image->list; vme_slave_request()
282 return resource; vme_slave_request()
295 int vme_slave_set(struct vme_resource *resource, int enabled, vme_slave_set() argument
299 struct vme_bridge *bridge = find_bridge(resource); vme_slave_set()
303 if (resource->type != VME_SLAVE) { vme_slave_set()
304 printk(KERN_ERR "Not a slave resource\n"); vme_slave_set()
308 image = list_entry(resource->entry, struct vme_slave_resource, list); vme_slave_set()
330 int vme_slave_get(struct vme_resource *resource, int *enabled, vme_slave_get() argument
334 struct vme_bridge *bridge = find_bridge(resource); vme_slave_get()
337 if (resource->type != VME_SLAVE) { vme_slave_get()
338 printk(KERN_ERR "Not a slave resource\n"); vme_slave_get()
342 image = list_entry(resource->entry, struct vme_slave_resource, list); vme_slave_get()
354 void vme_slave_free(struct vme_resource *resource) vme_slave_free() argument
358 if (resource->type != VME_SLAVE) { vme_slave_free()
359 printk(KERN_ERR "Not a slave resource\n"); vme_slave_free()
363 slave_image = list_entry(resource->entry, struct vme_slave_resource, vme_slave_free()
366 printk(KERN_ERR "Can't find slave resource\n"); vme_slave_free()
378 /* Free up resource memory */ vme_slave_free()
379 kfree(resource); vme_slave_free()
394 struct vme_resource *resource = NULL; vme_master_request() local
408 printk(KERN_WARNING "Registered NULL master resource\n"); vme_master_request()
427 /* Check to see if we found a resource */ vme_master_request()
429 printk(KERN_ERR "Can't find a suitable resource\n"); vme_master_request()
433 resource = kmalloc(sizeof(struct vme_resource), GFP_KERNEL); vme_master_request()
434 if (resource == NULL) { vme_master_request()
435 printk(KERN_ERR "Unable to allocate resource structure\n"); vme_master_request()
438 resource->type = VME_MASTER; vme_master_request()
439 resource->entry = &allocated_image->list; vme_master_request()
441 return resource; vme_master_request()
454 int vme_master_set(struct vme_resource *resource, int enabled, vme_master_set() argument
458 struct vme_bridge *bridge = find_bridge(resource); vme_master_set()
462 if (resource->type != VME_MASTER) { vme_master_set()
463 printk(KERN_ERR "Not a master resource\n"); vme_master_set()
467 image = list_entry(resource->entry, struct vme_master_resource, list); vme_master_set()
490 int vme_master_get(struct vme_resource *resource, int *enabled, vme_master_get() argument
494 struct vme_bridge *bridge = find_bridge(resource); vme_master_get()
497 if (resource->type != VME_MASTER) { vme_master_get()
498 printk(KERN_ERR "Not a master resource\n"); vme_master_get()
502 image = list_entry(resource->entry, struct vme_master_resource, list); vme_master_get()
517 ssize_t vme_master_read(struct vme_resource *resource, void *buf, size_t count, vme_master_read() argument
520 struct vme_bridge *bridge = find_bridge(resource); vme_master_read()
525 printk(KERN_WARNING "Reading from resource not supported\n"); vme_master_read()
529 if (resource->type != VME_MASTER) { vme_master_read()
530 printk(KERN_ERR "Not a master resource\n"); vme_master_read()
534 image = list_entry(resource->entry, struct vme_master_resource, list); vme_master_read()
536 length = vme_get_size(resource); vme_master_read()
554 ssize_t vme_master_write(struct vme_resource *resource, void *buf, vme_master_write() argument
557 struct vme_bridge *bridge = find_bridge(resource); vme_master_write()
562 printk(KERN_WARNING "Writing to resource not supported\n"); vme_master_write()
566 if (resource->type != VME_MASTER) { vme_master_write()
567 printk(KERN_ERR "Not a master resource\n"); vme_master_write()
571 image = list_entry(resource->entry, struct vme_master_resource, list); vme_master_write()
573 length = vme_get_size(resource); vme_master_write()
590 unsigned int vme_master_rmw(struct vme_resource *resource, unsigned int mask, vme_master_rmw() argument
593 struct vme_bridge *bridge = find_bridge(resource); vme_master_rmw()
597 printk(KERN_WARNING "Writing to resource not supported\n"); vme_master_rmw()
601 if (resource->type != VME_MASTER) { vme_master_rmw()
602 printk(KERN_ERR "Not a master resource\n"); vme_master_rmw()
606 image = list_entry(resource->entry, struct vme_master_resource, list); vme_master_rmw()
612 int vme_master_mmap(struct vme_resource *resource, struct vm_area_struct *vma) vme_master_mmap() argument
618 if (resource->type != VME_MASTER) { vme_master_mmap()
619 pr_err("Not a master resource\n"); vme_master_mmap()
623 image = list_entry(resource->entry, struct vme_master_resource, list); vme_master_mmap()
638 void vme_master_free(struct vme_resource *resource) vme_master_free() argument
642 if (resource->type != VME_MASTER) { vme_master_free()
643 printk(KERN_ERR "Not a master resource\n"); vme_master_free()
647 master_image = list_entry(resource->entry, struct vme_master_resource, vme_master_free()
650 printk(KERN_ERR "Can't find master resource\n"); vme_master_free()
662 /* Free up resource memory */ vme_master_free()
663 kfree(resource); vme_master_free()
677 struct vme_resource *resource = NULL; vme_dma_request() local
679 /* XXX Not checking resource attributes */ vme_dma_request()
680 printk(KERN_ERR "No VME resource Attribute tests done\n"); vme_dma_request()
694 printk(KERN_ERR "Registered NULL DMA resource\n"); vme_dma_request()
711 /* Check to see if we found a resource */ vme_dma_request()
715 resource = kmalloc(sizeof(struct vme_resource), GFP_KERNEL); vme_dma_request()
716 if (resource == NULL) { vme_dma_request()
717 printk(KERN_WARNING "Unable to allocate resource structure\n"); vme_dma_request()
720 resource->type = VME_DMA; vme_dma_request()
721 resource->entry = &allocated_ctrlr->list; vme_dma_request()
723 return resource; vme_dma_request()
739 struct vme_dma_list *vme_new_dma_list(struct vme_resource *resource) vme_new_dma_list() argument
744 if (resource->type != VME_DMA) { vme_new_dma_list()
745 printk(KERN_ERR "Not a DMA resource\n"); vme_new_dma_list()
749 ctrlr = list_entry(resource->entry, struct vme_dma_resource, list); vme_new_dma_list()
962 int vme_dma_free(struct vme_resource *resource) vme_dma_free() argument
966 if (resource->type != VME_DMA) { vme_dma_free()
967 printk(KERN_ERR "Not a DMA resource\n"); vme_dma_free()
971 ctrlr = list_entry(resource->entry, struct vme_dma_resource, list); vme_dma_free()
988 kfree(resource); vme_dma_free()
1113 * Request the location monitor, return resource or NULL
1121 struct vme_resource *resource = NULL; vme_lm_request() local
1135 printk(KERN_ERR "Registered NULL Location Monitor resource\n"); vme_lm_request()
1150 /* Check to see if we found a resource */ vme_lm_request()
1154 resource = kmalloc(sizeof(struct vme_resource), GFP_KERNEL); vme_lm_request()
1155 if (resource == NULL) { vme_lm_request()
1156 printk(KERN_ERR "Unable to allocate resource structure\n"); vme_lm_request()
1159 resource->type = VME_LM; vme_lm_request()
1160 resource->entry = &allocated_lm->list; vme_lm_request()
1162 return resource; vme_lm_request()
1175 int vme_lm_count(struct vme_resource *resource) vme_lm_count() argument
1179 if (resource->type != VME_LM) { vme_lm_count()
1180 printk(KERN_ERR "Not a Location Monitor resource\n"); vme_lm_count()
1184 lm = list_entry(resource->entry, struct vme_lm_resource, list); vme_lm_count()
1190 int vme_lm_set(struct vme_resource *resource, unsigned long long lm_base, vme_lm_set() argument
1193 struct vme_bridge *bridge = find_bridge(resource); vme_lm_set()
1196 if (resource->type != VME_LM) { vme_lm_set()
1197 printk(KERN_ERR "Not a Location Monitor resource\n"); vme_lm_set()
1201 lm = list_entry(resource->entry, struct vme_lm_resource, list); vme_lm_set()
1212 int vme_lm_get(struct vme_resource *resource, unsigned long long *lm_base, vme_lm_get() argument
1215 struct vme_bridge *bridge = find_bridge(resource); vme_lm_get()
1218 if (resource->type != VME_LM) { vme_lm_get()
1219 printk(KERN_ERR "Not a Location Monitor resource\n"); vme_lm_get()
1223 lm = list_entry(resource->entry, struct vme_lm_resource, list); vme_lm_get()
1234 int vme_lm_attach(struct vme_resource *resource, int monitor, vme_lm_attach() argument
1237 struct vme_bridge *bridge = find_bridge(resource); vme_lm_attach()
1240 if (resource->type != VME_LM) { vme_lm_attach()
1241 printk(KERN_ERR "Not a Location Monitor resource\n"); vme_lm_attach()
1245 lm = list_entry(resource->entry, struct vme_lm_resource, list); vme_lm_attach()
1256 int vme_lm_detach(struct vme_resource *resource, int monitor) vme_lm_detach() argument
1258 struct vme_bridge *bridge = find_bridge(resource); vme_lm_detach()
1261 if (resource->type != VME_LM) { vme_lm_detach()
1262 printk(KERN_ERR "Not a Location Monitor resource\n"); vme_lm_detach()
1266 lm = list_entry(resource->entry, struct vme_lm_resource, list); vme_lm_detach()
1277 void vme_lm_free(struct vme_resource *resource) vme_lm_free() argument
1281 if (resource->type != VME_LM) { vme_lm_free()
1282 printk(KERN_ERR "Not a Location Monitor resource\n"); vme_lm_free()
1286 lm = list_entry(resource->entry, struct vme_lm_resource, list); vme_lm_free()
1299 kfree(resource); vme_lm_free()
/linux-4.1.27/drivers/tty/ipwireless/
H A Dmain.c83 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; ipwireless_probe()
84 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; ipwireless_probe()
94 if (!request_region(p_dev->resource[0]->start, ipwireless_probe()
95 resource_size(p_dev->resource[0]), ipwireless_probe()
101 p_dev->resource[2]->flags |= ipwireless_probe()
104 ret = pcmcia_request_window(p_dev, p_dev->resource[2], 0); ipwireless_probe()
108 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[2], p_dev->card_addr); ipwireless_probe()
112 ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100; ipwireless_probe()
114 ipw->common_memory = ioremap(p_dev->resource[2]->start, ipwireless_probe()
115 resource_size(p_dev->resource[2])); ipwireless_probe()
116 if (!request_mem_region(p_dev->resource[2]->start, ipwireless_probe()
117 resource_size(p_dev->resource[2]), ipwireless_probe()
123 p_dev->resource[3]->flags |= WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_AM | ipwireless_probe()
125 p_dev->resource[3]->end = 0; /* this used to be 0x1000 */ ipwireless_probe()
126 ret = pcmcia_request_window(p_dev, p_dev->resource[3], 0); ipwireless_probe()
130 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[3], 0); ipwireless_probe()
134 ipw->attr_memory = ioremap(p_dev->resource[3]->start, ipwireless_probe()
135 resource_size(p_dev->resource[3])); ipwireless_probe()
136 if (!request_mem_region(p_dev->resource[3]->start, ipwireless_probe()
137 resource_size(p_dev->resource[3]), ipwireless_probe()
148 release_mem_region(p_dev->resource[2]->start, ipwireless_probe()
149 resource_size(p_dev->resource[2])); ipwireless_probe()
153 release_region(p_dev->resource[0]->start, ipwireless_probe()
154 resource_size(p_dev->resource[0])); ipwireless_probe()
175 ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start, config_ipwireless()
187 ": I/O ports %pR, irq %d\n", link->resource[0], config_ipwireless()
192 link->resource[3], config_ipwireless()
193 link->resource[2]); config_ipwireless()
217 release_mem_region(link->resource[2]->start, config_ipwireless()
218 resource_size(link->resource[2])); config_ipwireless()
222 release_mem_region(link->resource[3]->start, config_ipwireless()
223 resource_size(link->resource[3])); config_ipwireless()
232 release_region(ipw->link->resource[0]->start, release_ipwireless()
233 resource_size(ipw->link->resource[0])); release_ipwireless()
235 release_mem_region(ipw->link->resource[2]->start, release_ipwireless()
236 resource_size(ipw->link->resource[2])); release_ipwireless()
240 release_mem_region(ipw->link->resource[3]->start, release_ipwireless()
241 resource_size(ipw->link->resource[3])); release_ipwireless()
/linux-4.1.27/arch/sparc/include/uapi/asm/
H A Dresource.h2 * resource.h: Resource definitions.
11 * These two resource limit IDs have a Sparc/Linux-specific ordering,
28 #include <asm-generic/resource.h>
/linux-4.1.27/include/media/
H A Dsh_mobile_ceu.h11 struct resource;
15 struct resource *resource; member in struct:sh_mobile_ceu_companion
/linux-4.1.27/sound/pci/ctxfi/
H A Dctresource.h12 * resource management.
36 u32 idx:12; /* The index of a resource */
37 u32 type:4; /* The type (RSCTYP) of a resource */
39 u32 msr:4; /* The Master Sample Rate a resource working on */
40 void *ctrl_blk; /* Chip specific control info block for a resource */
42 struct rsc_ops *ops; /* Generic resource operations */
46 int (*master)(struct rsc *rsc); /* Move to master resource */
47 int (*next_conj)(struct rsc *rsc); /* Move to next conjugate resource */
48 int (*index)(const struct rsc *rsc); /* Return the index of resource */
58 enum RSCTYP type; /* The type (RSCTYP) of resource to manage */
59 unsigned int amount; /* The total amount of a kind of resource */
61 unsigned char *rscs; /* The bit-map for resource allocation */
H A Dctamixer.h12 * resource management object.
26 /* Define the descriptor of a summation node resource */
28 struct rsc rsc; /* Basic resource info */
32 /* Define sum resource request description info */
38 struct rsc_mgr mgr; /* Basic resource manager info */
42 /* request one sum resource */
45 /* return one sum resource */
49 /* Constructor and destructor of daio resource manager */
53 /* Define the descriptor of a amixer resource */
57 struct rsc rsc; /* Basic resource info */
59 struct rsc *input; /* pointer to a resource acting as source */
77 /* Define amixer resource request description info */
83 struct rsc_mgr mgr; /* Basic resource manager info */
87 /* request one amixer resource */
91 /* return one amixer resource */
95 /* Constructor and destructor of amixer resource manager */
H A Dctsrc.h12 * resource management object.
38 /* Define the descriptor of a src resource */
49 struct rsc rsc; /* Basic resource info */
54 unsigned char mode; /* Working mode of this SRC resource */
78 /* Define src resource request description info */
88 struct rsc_mgr mgr; /* Basic resource manager info */
92 /* request src resource */
95 /* return src resource */
103 /* Define the descriptor of a SRC Input Mapper resource */
121 /* Define SRCIMP resource request description info */
127 struct rsc_mgr mgr; /* Basic resource manager info */
135 /* request srcimp resource */
139 /* return srcimp resource */
145 /* Constructor and destructor of SRC resource manager */
148 /* Constructor and destructor of SRCIMP resource manager */
H A Dctdaio.h12 * resource management object.
28 /* Define the descriptor of a daio resource */
47 struct rsc rscl; /* Basic resource info for left TX/RX */
48 struct rsc rscr; /* Basic resource info for right TX/RX */
93 /* Define daio resource request description info */
101 struct rsc_mgr mgr; /* Basic resource manager info */
109 /* request one daio resource */
112 /* return one daio resource */
121 /* Constructor and destructor of daio resource manager */
/linux-4.1.27/include/asm-generic/
H A Dpci.h9 static inline struct resource * pcibios_select_root()
10 pcibios_select_root(struct pci_dev *pdev, struct resource *res) pcibios_select_root()
12 struct resource *root = NULL; pcibios_select_root()
H A Dresource.h4 #include <uapi/asm-generic/resource.h>
/linux-4.1.27/sound/oss/
H A Dad1848.h14 int ad1848_init(char *name, struct resource *ports, int irq, int dma_playback,
18 int ad1848_detect (struct resource *ports, int *flags, int *osp);
21 void attach_ms_sound(struct address_info * hw_config, struct resource *ports, struct module * owner);
23 int probe_ms_sound(struct address_info *hw_config, struct resource *ports);
/linux-4.1.27/include/linux/mfd/
H A Dqcom_rpm.h11 int qcom_rpm_write(struct qcom_rpm *rpm, int state, int resource, u32 *buf, size_t count);
/linux-4.1.27/arch/sparc/kernel/
H A Dcentral.c23 struct resource leds_resource;
32 struct resource leds_resource;
73 p->clock_freq_regs = of_ioremap(&op->resource[0], 0, clock_board_probe()
74 resource_size(&op->resource[0]), clock_board_probe()
81 p->clock_regs = of_ioremap(&op->resource[1], 0, clock_board_probe()
82 resource_size(&op->resource[1]), clock_board_probe()
89 if (op->resource[2].flags) { clock_board_probe()
90 p->clock_ver_reg = of_ioremap(&op->resource[2], 0, clock_board_probe()
91 resource_size(&op->resource[2]), clock_board_probe()
108 p->leds_pdev.resource = &p->leds_resource; clock_board_probe()
128 of_iounmap(&op->resource[2], p->clock_ver_reg, clock_board_probe()
129 resource_size(&op->resource[2])); clock_board_probe()
132 of_iounmap(&op->resource[1], p->clock_regs, clock_board_probe()
133 resource_size(&op->resource[1])); clock_board_probe()
136 of_iounmap(&op->resource[0], p->clock_freq_regs, clock_board_probe()
137 resource_size(&op->resource[0])); clock_board_probe()
173 p->pregs = of_ioremap(&op->resource[0], 0, fhc_probe()
174 resource_size(&op->resource[0]), fhc_probe()
202 p->leds_pdev.resource = &p->leds_resource; fhc_probe()
241 of_iounmap(&op->resource[0], p->pregs, resource_size(&op->resource[0])); fhc_probe()
/linux-4.1.27/arch/arm/mach-integrator/
H A Dlm.h4 struct resource resource; member in struct:lm_device
/linux-4.1.27/drivers/pcmcia/
H A Dbcm63xx_pcmcia.h30 /* pcmcia registers resource */
31 struct resource *reg_res;
52 struct resource *attr_res;
53 struct resource *common_res;
54 struct resource *io_res;
H A Drsrc_mgr.c26 * that they don't need a resource database */ static_init()
33 struct resource *pcmcia_make_resource(resource_size_t start, pcmcia_make_resource()
37 struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); pcmcia_make_resource()
50 unsigned int align, struct resource **parent) static_find_io()
/linux-4.1.27/arch/arm/mach-s3c64xx/
H A Ddev-uart.c8 * Base S3C64XX UART resource and device definitions
33 static struct resource s3c64xx_uart0_resource[] = {
38 static struct resource s3c64xx_uart1_resource[] = {
43 static struct resource s3c6xx_uart2_resource[] = {
48 static struct resource s3c64xx_uart3_resource[] = {
H A Ddev-audio.c55 static struct resource s3c64xx_iis0_resource[] = {
69 .resource = s3c64xx_iis0_resource,
76 static struct resource s3c64xx_iis1_resource[] = {
86 .resource = s3c64xx_iis1_resource,
93 static struct resource s3c64xx_iisv4_resource[] = {
112 .resource = s3c64xx_iisv4_resource,
143 static struct resource s3c64xx_pcm0_resource[] = {
157 .resource = s3c64xx_pcm0_resource,
164 static struct resource s3c64xx_pcm1_resource[] = {
178 .resource = s3c64xx_pcm1_resource,
197 static struct resource s3c64xx_ac97_resource[] = {
213 .resource = s3c64xx_ac97_resource,
/linux-4.1.27/arch/arm/plat-samsung/
H A Ddevs.c74 static struct resource s3c_ac97_resource[] = {
86 .resource = s3c_ac97_resource,
97 static struct resource s3c_adc_resource[] = {
107 .resource = s3c_adc_resource,
112 static struct resource s3c_adc_resource[] = {
122 .resource = s3c_adc_resource,
129 static struct resource s3c_camif_resource[] = {
139 .resource = s3c_camif_resource,
150 static struct resource s3c_fb_resource[] = {
161 .resource = s3c_fb_resource,
194 static struct resource s3c_hsmmc_resource[] = {
209 .resource = s3c_hsmmc_resource,
224 static struct resource s3c_hsmmc1_resource[] = {
239 .resource = s3c_hsmmc1_resource,
256 static struct resource s3c_hsmmc2_resource[] = {
271 .resource = s3c_hsmmc2_resource,
286 static struct resource s3c_hsmmc3_resource[] = {
301 .resource = s3c_hsmmc3_resource,
317 static struct resource s3c_i2c0_resource[] = {
326 .resource = s3c_i2c0_resource,
353 static struct resource s3c_i2c1_resource[] = {
362 .resource = s3c_i2c1_resource,
383 static struct resource s3c_i2c2_resource[] = {
392 .resource = s3c_i2c2_resource,
413 static struct resource s3c_i2c3_resource[] = {
422 .resource = s3c_i2c3_resource,
443 static struct resource s3c_i2c4_resource[] = {
452 .resource = s3c_i2c4_resource,
473 static struct resource s3c_i2c5_resource[] = {
482 .resource = s3c_i2c5_resource,
503 static struct resource s3c_i2c6_resource[] = {
512 .resource = s3c_i2c6_resource,
533 static struct resource s3c_i2c7_resource[] = {
542 .resource = s3c_i2c7_resource,
565 static struct resource s3c_iis_resource[] = {
573 .resource = s3c_iis_resource,
584 static struct resource s3c_cfcon_resource[] = {
592 .resource = s3c_cfcon_resource,
605 static struct resource samsung_keypad_resources[] = {
614 .resource = samsung_keypad_resources,
632 static struct resource s3c_lcd_resource[] = {
641 .resource = s3c_lcd_resource,
668 static struct resource s3c_nand_resource[] = {
676 .resource = s3c_nand_resource,
773 static struct resource s3c_onenand_resources[] = {
783 .resource = s3c_onenand_resources,
788 static struct resource s3c64xx_onenand1_resources[] = {
798 .resource = s3c64xx_onenand1_resources,
811 static struct resource samsung_pwm_resource[] = {
819 .resource = samsung_pwm_resource,
831 static struct resource s3c_rtc_resource[] = {
841 .resource = s3c_rtc_resource,
846 static struct resource s3c_rtc_resource[] = {
856 .resource = s3c_rtc_resource,
863 static struct resource s3c_sdi_resource[] = {
872 .resource = s3c_sdi_resource,
885 static struct resource s3c_spi0_resource[] = {
894 .resource = s3c_spi0_resource,
901 static struct resource s3c_spi1_resource[] = {
910 .resource = s3c_spi1_resource,
921 static struct resource s3c_ts_resource[] = {
931 .resource = s3c_ts_resource,
942 static struct resource s3c_ts_resource[] = {
957 .resource = s3c_ts_resource,
973 static struct resource s3c_usb_resource[] = {
982 .resource = s3c_usb_resource,
1008 static struct resource s3c_usbgadget_resource[] = {
1017 .resource = s3c_usbgadget_resource,
1029 static struct resource s3c_usb_hsotg_resources[] = {
1038 .resource = s3c_usb_hsotg_resources,
1062 static struct resource s3c_hsudc_resource[] = {
1071 .resource = s3c_hsudc_resource,
1087 static struct resource s3c_wdt_resource[] = {
1096 .resource = s3c_wdt_resource,
1101 static struct resource s3c64xx_spi0_resource[] = {
1112 .resource = s3c64xx_spi0_resource,
1146 static struct resource s3c64xx_spi1_resource[] = {
1157 .resource = s3c64xx_spi1_resource,
1189 static struct resource s3c64xx_spi2_resource[] = {
1200 .resource = s3c64xx_spi2_resource,
/linux-4.1.27/arch/arm/mach-pxa/
H A Ddevices.c36 static struct resource pxa_resource_pmu = {
45 .resource = &pxa_resource_pmu,
49 static struct resource pxamci_resources[] = {
82 .resource = pxamci_resources,
100 static struct resource pxa2xx_udc_resources[] = {
118 .resource = pxa2xx_udc_resources,
129 .resource = pxa2xx_udc_resources,
138 static struct resource pxa3xx_u2d_resources[] = {
154 .resource = pxa3xx_u2d_resources,
164 static struct resource pxafb_resources[] = {
187 .resource = pxafb_resources,
196 static struct resource pxa_resource_ffuart[] = {
211 .resource = pxa_resource_ffuart,
220 static struct resource pxa_resource_btuart[] = {
235 .resource = pxa_resource_btuart,
244 static struct resource pxa_resource_stuart[] = {
259 .resource = pxa_resource_stuart,
268 static struct resource pxa_resource_hwuart[] = {
283 .resource = pxa_resource_hwuart,
295 static struct resource pxai2c_resources[] = {
310 .resource = pxai2c_resources,
320 static struct resource pxa27x_resources_i2c_power[] = {
335 .resource = pxa27x_resources_i2c_power,
340 static struct resource pxai2s_resources[] = {
355 .resource = pxai2s_resources,
386 static struct resource pxa_ir_resources[] = {
403 .resource = pxa_ir_resources,
415 static struct resource pxa_rtc_resources[] = {
439 .resource = pxa_rtc_resources,
442 static struct resource sa1100_rtc_resources[] = {
460 .resource = sa1100_rtc_resources,
463 static struct resource pxa_ac97_resources[] = {
486 .resource = pxa_ac97_resources,
496 static struct resource pxa25x_resource_pwm0[] = {
507 .resource = pxa25x_resource_pwm0,
511 static struct resource pxa25x_resource_pwm1[] = {
522 .resource = pxa25x_resource_pwm1,
528 static struct resource pxa25x_resource_ssp[] = {
560 .resource = pxa25x_resource_ssp,
566 static struct resource pxa25x_resource_nssp[] = {
598 .resource = pxa25x_resource_nssp,
604 static struct resource pxa25x_resource_assp[] = {
637 .resource = pxa25x_resource_assp,
643 static struct resource pxa27x_resource_camera[] = {
666 .resource = pxa27x_resource_camera,
676 static struct resource pxa27x_resource_ohci[] = {
697 .resource = pxa27x_resource_ohci,
707 static struct resource pxa27x_resource_keypad[] = {
723 .resource = pxa27x_resource_keypad,
734 static struct resource pxa27x_resource_ssp1[] = {
766 .resource = pxa27x_resource_ssp1,
772 static struct resource pxa27x_resource_ssp2[] = {
804 .resource = pxa27x_resource_ssp2,
810 static struct resource pxa27x_resource_ssp3[] = {
842 .resource = pxa27x_resource_ssp3,
846 static struct resource pxa27x_resource_pwm0[] = {
857 .resource = pxa27x_resource_pwm0,
861 static struct resource pxa27x_resource_pwm1[] = {
872 .resource = pxa27x_resource_pwm1,
878 static struct resource pxa3xx_resources_mci2[] = {
909 .resource = pxa3xx_resources_mci2,
917 static struct resource pxa3xx_resources_mci3[] = {
948 .resource = pxa3xx_resources_mci3,
956 static struct resource pxa3xx_resources_gcu[] = {
975 .resource = pxa3xx_resources_gcu,
985 static struct resource pxa3xx_resources_i2c_power[] = {
1000 .resource = pxa3xx_resources_i2c_power,
1004 static struct resource pxa3xx_resources_nand[] = {
1039 .resource = pxa3xx_resources_nand,
1049 static struct resource pxa3xx_resource_ssp4[] = {
1087 .resource = pxa27x_resource_ssp1,
1098 .resource = pxa27x_resource_ssp2,
1109 .resource = pxa27x_resource_ssp3,
1120 .resource = pxa3xx_resource_ssp4,
1125 struct resource pxa_resource_gpio[] = {
1156 .resource = pxa_resource_gpio,
1163 .resource = pxa_resource_gpio,
1170 .resource = pxa_resource_gpio,
1177 .resource = pxa_resource_gpio,
/linux-4.1.27/drivers/tc/
H A Dtc.c113 tdev->resource.start = slotaddr; tc_bus_add_devices()
114 tdev->resource.end = slotaddr + devsize - 1; tc_bus_add_devices()
116 tdev->resource.start = extslotaddr; tc_bus_add_devices()
117 tdev->resource.end = extslotaddr + devsize - 1; tc_bus_add_devices()
126 tdev->resource.name = tdev->name; tc_bus_add_devices()
127 tdev->resource.flags = IORESOURCE_MEM; tc_bus_add_devices()
164 tc_bus.resource[0].start = tc_bus.slot_base; tc_init()
165 tc_bus.resource[0].end = tc_bus.slot_base + tc_init()
168 tc_bus.resource[0].name = tc_bus.name; tc_init()
169 tc_bus.resource[0].flags = IORESOURCE_MEM; tc_init()
171 &tc_bus.resource[0]) < 0) { tc_init()
172 pr_err("tc: Cannot reserve resource\n"); tc_init()
176 tc_bus.resource[1].start = tc_bus.ext_slot_base; tc_init()
177 tc_bus.resource[1].end = tc_bus.ext_slot_base + tc_init()
180 tc_bus.resource[1].name = tc_bus.name; tc_init()
181 tc_bus.resource[1].flags = IORESOURCE_MEM; tc_init()
183 &tc_bus.resource[1]) < 0) { tc_init()
184 pr_err("tc: Cannot reserve resource\n"); tc_init()
195 release_resource(&tc_bus.resource[0]); tc_init()
/linux-4.1.27/arch/sh/include/cpu-common/cpu/
H A Dpfc.h21 struct resource;
24 struct resource *resource, u32 num_resources);
/linux-4.1.27/arch/arm/mach-w90x900/
H A Ddev.c77 static struct resource nuc900_flash_resources[] = {
91 .resource = nuc900_flash_resources,
97 static struct resource nuc900_usb_ehci_resource[] = {
116 .resource = nuc900_usb_ehci_resource,
125 static struct resource nuc900_usb_ohci_resource[] = {
143 .resource = nuc900_usb_ohci_resource,
152 static struct resource nuc900_usbgadget_resource[] = {
169 .resource = nuc900_usbgadget_resource,
174 static struct resource nuc900_emc_resource[] = {
197 .resource = nuc900_emc_resource,
218 static struct resource nuc900_spi_resource[] = {
235 .resource = nuc900_spi_resource,
271 static struct resource nuc900_wdt_resource[] = {
288 .resource = nuc900_wdt_resource,
302 static struct resource nuc900_rtc_resource[] = {
319 .resource = nuc900_rtc_resource,
324 static struct resource nuc900_ts_resource[] = {
340 .resource = nuc900_ts_resource,
346 static struct resource nuc900_fmi_resource[] = {
363 .resource = nuc900_fmi_resource,
401 static struct resource nuc900_kpi_resource[] = {
419 .resource = nuc900_kpi_resource,
464 static struct resource nuc900_lcd_resource[] = {
482 .resource = nuc900_lcd_resource,
492 static struct resource nuc900_ac97_resource[] = {
510 .resource = nuc900_ac97_resource,
/linux-4.1.27/drivers/block/drbd/
H A Ddrbd_debugfs.h11 void drbd_debugfs_resource_add(struct drbd_resource *resource);
12 void drbd_debugfs_resource_cleanup(struct drbd_resource *resource);
27 static inline void drbd_debugfs_resource_add(struct drbd_resource *resource) { } drbd_debugfs_resource_cleanup() argument
28 static inline void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) { } drbd_debugfs_resource_cleanup() argument
H A Ddrbd_debugfs.c127 static void seq_print_resource_pending_meta_io(struct seq_file *m, struct drbd_resource *resource, unsigned long now) seq_print_resource_pending_meta_io() argument
134 idr_for_each_entry(&resource->devices, device, i) { seq_print_resource_pending_meta_io()
155 static void seq_print_waiting_for_AL(struct seq_file *m, struct drbd_resource *resource, unsigned long now) seq_print_waiting_for_AL() argument
162 idr_for_each_entry(&resource->devices, device, i) { seq_print_waiting_for_AL()
167 spin_lock_irq(&device->resource->req_lock); seq_print_waiting_for_AL()
176 spin_unlock_irq(&device->resource->req_lock); seq_print_waiting_for_AL()
196 spin_lock_irq(&device->resource->req_lock); seq_print_device_bitmap_io()
205 spin_unlock_irq(&device->resource->req_lock); seq_print_device_bitmap_io()
215 static void seq_print_resource_pending_bitmap_io(struct seq_file *m, struct drbd_resource *resource, unsigned long now) seq_print_resource_pending_bitmap_io() argument
222 idr_for_each_entry(&resource->devices, device, i) { seq_print_resource_pending_bitmap_io()
280 spin_lock_irq(&device->resource->req_lock); seq_print_device_peer_requests()
284 spin_unlock_irq(&device->resource->req_lock); seq_print_device_peer_requests()
293 struct drbd_resource *resource, unsigned long now) seq_print_resource_pending_peer_requests()
299 idr_for_each_entry(&resource->devices, device, i) { seq_print_resource_pending_peer_requests()
306 struct drbd_resource *resource, seq_print_resource_transfer_log_summary()
315 spin_lock_irq(&resource->req_lock); seq_print_resource_transfer_log_summary()
325 spin_unlock_irq(&resource->req_lock); seq_print_resource_transfer_log_summary()
327 spin_lock_irq(&resource->req_lock); seq_print_resource_transfer_log_summary()
361 spin_unlock_irq(&resource->req_lock); seq_print_resource_transfer_log_summary()
364 /* TODO: transfer_log and friends should be moved to resource */ in_flight_summary_show()
367 struct drbd_resource *resource = m->private; in_flight_summary_show() local
371 connection = first_connection(resource); in_flight_summary_show()
381 seq_print_resource_pending_bitmap_io(m, resource, jif); in_flight_summary_show()
385 seq_print_resource_pending_meta_io(m, resource, jif); in_flight_summary_show()
404 seq_print_resource_pending_peer_requests(m, resource, jif); in_flight_summary_show()
408 seq_print_waiting_for_AL(m, resource, jif); in_flight_summary_show()
412 seq_print_resource_transfer_log_summary(m, resource, connection, jif); in_flight_summary_show()
462 struct drbd_resource *resource = inode->i_private; in_flight_summary_open() local
463 return drbd_single_open(file, in_flight_summary_show, resource, in_flight_summary_open()
464 &resource->kref, drbd_destroy_resource); in_flight_summary_open()
469 struct drbd_resource *resource = inode->i_private; in_flight_summary_release() local
470 kref_put(&resource->kref, drbd_destroy_resource); in_flight_summary_release()
482 void drbd_debugfs_resource_add(struct drbd_resource *resource) drbd_debugfs_resource_add() argument
488 dentry = debugfs_create_dir(resource->name, drbd_debugfs_resources); drbd_debugfs_resource_add()
491 resource->debugfs_res = dentry; drbd_debugfs_resource_add()
493 dentry = debugfs_create_dir("volumes", resource->debugfs_res); drbd_debugfs_resource_add()
496 resource->debugfs_res_volumes = dentry; drbd_debugfs_resource_add()
498 dentry = debugfs_create_dir("connections", resource->debugfs_res); drbd_debugfs_resource_add()
501 resource->debugfs_res_connections = dentry; drbd_debugfs_resource_add()
504 resource->debugfs_res, resource, drbd_debugfs_resource_add()
508 resource->debugfs_res_in_flight_summary = dentry; drbd_debugfs_resource_add()
512 drbd_debugfs_resource_cleanup(resource); drbd_debugfs_resource_add()
513 drbd_err(resource, "failed to create debugfs dentry\n"); drbd_debugfs_resource_add()
522 void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) drbd_debugfs_resource_cleanup() argument
525 drbd_debugfs_remove(&resource->debugfs_res_in_flight_summary); drbd_debugfs_resource_cleanup()
526 drbd_debugfs_remove(&resource->debugfs_res_connections); drbd_debugfs_resource_cleanup()
527 drbd_debugfs_remove(&resource->debugfs_res_volumes); drbd_debugfs_resource_cleanup()
528 drbd_debugfs_remove(&resource->debugfs_res); drbd_debugfs_resource_cleanup()
614 spin_lock_irq(&connection->resource->req_lock); connection_oldest_requests_show()
626 spin_unlock_irq(&connection->resource->req_lock); connection_oldest_requests_show()
654 struct dentry *conns_dir = connection->resource->debugfs_res_connections; drbd_debugfs_connection_add()
738 struct drbd_resource *resource = device->resource; device_oldest_requests_show() local
747 spin_lock_irq(&resource->req_lock); device_oldest_requests_show()
759 spin_unlock_irq(&resource->req_lock); device_oldest_requests_show()
810 struct dentry *vols_dir = device->resource->debugfs_res_volumes; drbd_debugfs_device_attr()
827 device->resource->name, device->vnr); drbd_debugfs_device_attr()
292 seq_print_resource_pending_peer_requests(struct seq_file *m, struct drbd_resource *resource, unsigned long now) seq_print_resource_pending_peer_requests() argument
305 seq_print_resource_transfer_log_summary(struct seq_file *m, struct drbd_resource *resource, struct drbd_connection *connection, unsigned long now) seq_print_resource_transfer_log_summary() argument
/linux-4.1.27/arch/mips/bcm63xx/
H A Ddev-uart.c14 static struct resource uart0_resources[] = {
25 static struct resource uart1_resources[] = {
41 .resource = uart0_resources,
48 .resource = uart1_resources,
H A Ddev-usb-usbd.c21 static struct resource usbd_resources[NUM_MMIO + NUM_IRQ];
29 .resource = usbd_resources,
56 struct resource *r = &usbd_resources[NUM_MMIO + i]; bcm63xx_usbd_register()
H A Ddev-hsspi.c17 static struct resource spi_resources[] = {
33 .resource = spi_resources,
H A Ddev-rng.c14 static struct resource rng_resources[] = {
26 .resource = rng_resources,
H A Ddev-wdt.c14 static struct resource wdt_resources[] = {
26 .resource = wdt_resources,
/linux-4.1.27/drivers/pnp/
H A DMakefile7 pnp-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o
H A Dresource.c2 * resource.c - Contains functions for registering and analyzing resource information
4 * based on isapnp.c resource management (c) Jaroslav Kysela <perex@perex.cz>
153 * resource validity checking
165 int pnp_check_port(struct pnp_dev *dev, struct resource *res) pnp_check_port()
169 struct resource *tres; pnp_check_port()
175 /* if the resource doesn't exist, don't complain about it */ pnp_check_port()
179 /* check if the resource is already in use, skip if the pnp_check_port()
187 /* check if the resource is reserved */ pnp_check_port()
228 int pnp_check_mem(struct pnp_dev *dev, struct resource *res) pnp_check_mem()
232 struct resource *tres; pnp_check_mem()
238 /* if the resource doesn't exist, don't complain about it */ pnp_check_mem()
242 /* check if the resource is already in use, skip if the pnp_check_mem()
250 /* check if the resource is reserved */ pnp_check_mem()
351 int pnp_check_irq(struct pnp_dev *dev, struct resource *res) pnp_check_irq()
355 struct resource *tres; pnp_check_irq()
360 /* if the resource doesn't exist, don't complain about it */ pnp_check_irq()
364 /* check if the resource is valid */ pnp_check_irq()
368 /* check if the resource is reserved */ pnp_check_irq()
382 /* check if the resource is being used by a pci device */ pnp_check_irq()
386 /* check if the resource is already in use, skip if the pnp_check_irq()
415 int pnp_check_dma(struct pnp_dev *dev, struct resource *res) pnp_check_dma()
419 struct resource *tres; pnp_check_dma()
424 /* if the resource doesn't exist, don't complain about it */ pnp_check_dma()
428 /* check if the resource is valid */ pnp_check_dma()
432 /* check if the resource is reserved */ pnp_check_dma()
446 /* check if the resource is already in use, skip if the pnp_check_dma()
474 unsigned long pnp_resource_type(struct resource *res) pnp_resource_type()
481 struct resource *pnp_get_resource(struct pnp_dev *dev, pnp_get_resource()
485 struct resource *res; pnp_get_resource()
509 struct resource *res) pnp_add_resource()
515 dev_err(&dev->dev, "can't add resource %pR\n", res); pnp_add_resource()
529 struct resource *res; pnp_add_irq_resource()
533 dev_err(&dev->dev, "can't add resource for IRQ %d\n", irq); pnp_add_irq_resource()
550 struct resource *res; pnp_add_dma_resource()
554 dev_err(&dev->dev, "can't add resource for DMA %d\n", dma); pnp_add_dma_resource()
572 struct resource *res; pnp_add_io_resource()
576 dev_err(&dev->dev, "can't add resource for IO %#llx-%#llx\n", pnp_add_io_resource()
596 struct resource *res; pnp_add_mem_resource()
600 dev_err(&dev->dev, "can't add resource for MEM %#llx-%#llx\n", pnp_add_mem_resource()
620 struct resource *res; pnp_add_bus_resource()
624 dev_err(&dev->dev, "can't add resource for BUS %#llx-%#llx\n", pnp_add_bus_resource()
640 * Determine whether the specified resource is a possible configuration
/linux-4.1.27/arch/sh/boards/mach-se/7206/
H A Dsetup.c18 static struct resource smc91x_resources[] = {
45 .resource = smc91x_resources,
55 static struct resource heartbeat_resource = {
68 .resource = &heartbeat_resource,
/linux-4.1.27/arch/sh/kernel/cpu/
H A Dpfc.c26 struct resource *resource, u32 num_resources) sh_pfc_register()
30 sh_pfc_device.resource = resource; sh_pfc_register()
25 sh_pfc_register(const char *name, struct resource *resource, u32 num_resources) sh_pfc_register() argument
/linux-4.1.27/arch/sh/kernel/cpu/sh4a/
H A Dpinmux-sh7722.c7 static struct resource sh7722_pfc_resources[] = {
H A Dsetup-sh7723.c33 static struct resource scif0_resources[] = {
41 .resource = scif0_resources,
56 static struct resource scif1_resources[] = {
64 .resource = scif1_resources,
79 static struct resource scif2_resources[] = {
87 .resource = scif2_resources,
102 static struct resource scif3_resources[] = {
110 .resource = scif3_resources,
125 static struct resource scif4_resources[] = {
133 .resource = scif4_resources,
148 static struct resource scif5_resources[] = {
156 .resource = scif5_resources,
169 static struct resource vpu_resources[] = {
187 .resource = vpu_resources,
197 static struct resource veu0_resources[] = {
215 .resource = veu0_resources,
225 static struct resource veu1_resources[] = {
243 .resource = veu1_resources,
251 static struct resource cmt_resources[] = {
262 .resource = cmt_resources,
270 static struct resource tmu0_resources[] = {
283 .resource = tmu0_resources,
291 static struct resource tmu1_resources[] = {
304 .resource = tmu1_resources,
308 static struct resource rtc_resources[] = {
335 .resource = rtc_resources,
342 static struct resource sh7723_usb_host_resources[] = {
364 .resource = sh7723_usb_host_resources,
367 static struct resource iic_resources[] = {
385 .resource = iic_resources,
H A Dsetup-sh7343.c26 static struct resource scif0_resources[] = {
34 .resource = scif0_resources,
47 static struct resource scif1_resources[] = {
55 .resource = scif1_resources,
68 static struct resource scif2_resources[] = {
76 .resource = scif2_resources,
89 static struct resource scif3_resources[] = {
97 .resource = scif3_resources,
104 static struct resource iic0_resources[] = {
122 .resource = iic0_resources,
125 static struct resource iic1_resources[] = {
143 .resource = iic1_resources,
152 static struct resource vpu_resources[] = {
170 .resource = vpu_resources,
180 static struct resource veu_resources[] = {
198 .resource = veu_resources,
208 static struct resource jpu_resources[] = {
226 .resource = jpu_resources,
234 static struct resource cmt_resources[] = {
245 .resource = cmt_resources,
253 static struct resource tmu0_resources[] = {
266 .resource = tmu0_resources,
H A Dsetup-sh7366.c29 static struct resource scif0_resources[] = {
37 .resource = scif0_resources,
44 static struct resource iic_resources[] = {
62 .resource = iic_resources,
69 static struct resource usb_host_resources[] = {
91 .resource = usb_host_resources,
100 static struct resource vpu_resources[] = {
118 .resource = vpu_resources,
128 static struct resource veu0_resources[] = {
146 .resource = veu0_resources,
156 static struct resource veu1_resources[] = {
174 .resource = veu1_resources,
182 static struct resource cmt_resources[] = {
193 .resource = cmt_resources,
201 static struct resource tmu0_resources[] = {
214 .resource = tmu0_resources,
H A Dsetup-sh7722.c137 static struct resource sh7722_dmae_resources[] = {
173 .resource = sh7722_dmae_resources,
189 static struct resource scif0_resources[] = {
197 .resource = scif0_resources,
212 static struct resource scif1_resources[] = {
220 .resource = scif1_resources,
235 static struct resource scif2_resources[] = {
243 .resource = scif2_resources,
250 static struct resource rtc_resources[] = {
277 .resource = rtc_resources,
284 static struct resource usbf_resources[] = {
307 .resource = usbf_resources,
310 static struct resource iic_resources[] = {
328 .resource = iic_resources,
337 static struct resource vpu_resources[] = {
355 .resource = vpu_resources,
365 static struct resource veu_resources[] = {
383 .resource = veu_resources,
393 static struct resource jpu_resources[] = {
411 .resource = jpu_resources,
419 static struct resource cmt_resources[] = {
430 .resource = cmt_resources,
438 static struct resource tmu0_resources[] = {
451 .resource = tmu0_resources,
462 static struct resource siu_resources[] = {
480 .resource = siu_resources,
H A Dsetup-sh7770.c24 static struct resource scif0_resources[] = {
32 .resource = scif0_resources,
45 static struct resource scif1_resources[] = {
53 .resource = scif1_resources,
66 static struct resource scif2_resources[] = {
74 .resource = scif2_resources,
87 static struct resource scif3_resources[] = {
95 .resource = scif3_resources,
108 static struct resource scif4_resources[] = {
116 .resource = scif4_resources,
129 static struct resource scif5_resources[] = {
137 .resource = scif5_resources,
150 static struct resource scif6_resources[] = {
158 .resource = scif6_resources,
171 static struct resource scif7_resources[] = {
179 .resource = scif7_resources,
192 static struct resource scif8_resources[] = {
200 .resource = scif8_resources,
213 static struct resource scif9_resources[] = {
221 .resource = scif9_resources,
232 static struct resource tmu0_resources[] = {
245 .resource = tmu0_resources,
253 static struct resource tmu1_resources[] = {
266 .resource = tmu1_resources,
274 static struct resource tmu2_resources[] = {
287 .resource = tmu2_resources,
/linux-4.1.27/security/apparmor/include/
H A Dresource.h4 * This file contains AppArmor resource limits function definitions.
18 #include <linux/resource.h>
39 int aa_map_resource(int resource);
41 unsigned int resource, struct rlimit *new_rlim);
/linux-4.1.27/arch/x86/pci/
H A Dbus_numa.h9 struct resource res;
16 struct resource busn;
/linux-4.1.27/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_cmdbuf_res.c39 * struct vmw_cmdbuf_res - Command buffer managed resource entry.
45 * @state: Staging state of this resource entry.
46 * @man: Pointer to a resource manager for this entry.
57 * struct vmw_cmdbuf_res_manager - Command buffer resource manager.
74 * vmw_cmdbuf_res_lookup - Look up a command buffer resource
76 * @man: Pointer to the command buffer resource manager
77 * @resource_type: The resource type, that combined with the user key
78 * identifies the resource.
102 * vmw_cmdbuf_res_free - Free a command buffer resource.
104 * @man: Pointer to the command buffer resource manager
120 * vmw_cmdbuf_res_commit - Commit a list of command buffer resource actions
122 * @list: Caller's list of command buffer resource actions.
124 * This function commits a list of command buffer resource
152 * vmw_cmdbuf_res_revert - Revert a list of command buffer resource actions
154 * @man: Pointer to the command buffer resource manager
155 * @list: Caller's list of command buffer resource action
157 * This function reverts a list of command buffer resource
188 * vmw_cmdbuf_res_add - Stage a command buffer managed resource for addition.
190 * @man: Pointer to the command buffer resource manager.
191 * @res_type: The resource type.
192 * @user_key: The user-space id of the resource.
197 * resource to the hash table of the manager identified by @man. The
228 * vmw_cmdbuf_res_remove - Stage a command buffer managed resource for removal.
230 * @man: Pointer to the command buffer resource manager.
231 * @res_type: The resource type.
232 * @user_key: The user-space id of the resource.
275 * vmw_cmdbuf_res_man_create - Allocate a command buffer managed resource
280 * Allocates and initializes a command buffer managed resource manager. Returns
304 * vmw_cmdbuf_res_man_destroy - Destroy a command buffer managed resource
309 * This function destroys a command buffer managed resource manager and
326 * resource manager
329 * resource manager.
H A Dvmwgfx_resource_priv.h34 * struct vmw_user_resource_conv - Identify a derived user-exported resource
45 * struct vmw_res_func - members and functions common for a resource type
48 * @needs_backup: Whether the resource is guest-backed and needs
50 * @type_name: String that identifies the resource type.
52 * @may_evict Whether the resource may be evicted.
53 * @create: Create a hardware resource.
54 * @destroy: Destroy a hardware resource.
55 * @bind: Bind a hardware resource to persistent buffer storage.
56 * @unbind: Unbind a hardware resource from persistent
/linux-4.1.27/drivers/uwb/
H A Dumc-dev.c49 * The memory resource for the UMC device is acquired and the device
56 err = request_resource(umc->resource.parent, &umc->resource); umc_device_register()
58 dev_err(&umc->dev, "can't allocate resource range %pR: %d\n", umc_device_register()
59 &umc->resource, err); umc_device_register()
70 release_resource(&umc->resource); umc_device_register()
81 * resource release thing and then we try to release any left over
92 release_resource(&umc->resource); umc_device_unregister()
/linux-4.1.27/arch/arm/mach-davinci/
H A Dusb.c52 static struct resource usb_resources[] = {
81 .resource = usb_resources,
92 usb_dev.resource[1].start = IRQ_DM646X_USBINT; davinci_setup_usb()
93 usb_dev.resource[2].start = IRQ_DM646X_USBDMAINT; davinci_setup_usb()
101 static struct resource da8xx_usb20_resources[] = {
120 usb_dev.resource = da8xx_usb20_resources; da8xx_register_usb20()
144 static struct resource da8xx_usb11_resources[] = {
167 .resource = da8xx_usb11_resources,
H A Ddevices-da8xx.c175 static struct resource da830_edma_resources[] = {
206 static struct resource da850_edma_resources[] = {
266 .resource = da830_edma_resources,
276 .resource = da850_edma_resources,
296 static struct resource da8xx_i2c_resources0[] = {
313 .resource = da8xx_i2c_resources0,
316 static struct resource da8xx_i2c_resources1[] = {
333 .resource = da8xx_i2c_resources1,
352 static struct resource da8xx_watchdog_resources[] = {
364 .resource = da8xx_watchdog_resources,
385 static struct resource da8xx_emac_resources[] = {
428 .resource = da8xx_emac_resources,
431 static struct resource da8xx_mdio_resources[] = {
443 .resource = da8xx_mdio_resources,
457 static struct resource da830_mcasp1_resources[] = {
489 .resource = da830_mcasp1_resources,
492 static struct resource da830_mcasp2_resources[] = {
524 .resource = da830_mcasp2_resources,
527 static struct resource da850_mcasp_resources[] = {
559 .resource = da850_mcasp_resources,
591 static struct resource da8xx_pruss_resources[] = {
647 .resource = da8xx_pruss_resources,
677 static struct resource da8xx_lcdc_resources[] = {
694 .resource = da8xx_lcdc_resources,
703 static struct resource da8xx_gpio_resources[] = {
720 .resource = da8xx_gpio_resources,
729 static struct resource da8xx_mmcsd0_resources[] = {
756 .resource = da8xx_mmcsd0_resources,
766 static struct resource da850_mmcsd1_resources[] = {
793 .resource = da850_mmcsd1_resources,
803 static struct resource da8xx_rproc_resources[] = {
827 .resource = da8xx_rproc_resources,
889 static struct resource da8xx_rtc_resources[] = {
911 .resource = da8xx_rtc_resources,
932 static struct resource da8xx_cpuidle_resources[] = {
949 .resource = da8xx_cpuidle_resources,
962 static struct resource da8xx_spi0_resources[] = {
985 static struct resource da8xx_spi1_resources[] = {
1026 .resource = da8xx_spi0_resources,
1035 .resource = da8xx_spi1_resources,
1058 static struct resource da850_sata_resources[] = {
1085 .resource = da850_sata_resources,
/linux-4.1.27/arch/sh/kernel/cpu/sh5/
H A Dsetup-sh5.c25 static struct resource scif0_resources[] = {
35 .resource = scif0_resources,
42 static struct resource rtc_resources[] = {
69 .resource = rtc_resources,
79 static struct resource tmu0_resources[] = {
92 .resource = tmu0_resources,
/linux-4.1.27/arch/mips/ath25/
H A Ddevices.c15 static struct resource ath25_wmac0_res[] = {
26 static struct resource ath25_wmac1_res[] = {
41 .resource = ath25_wmac0_res,
48 .resource = ath25_wmac1_res,
91 struct resource *res; ath25_add_wmac()
94 res = &ath25_wmac[nr].resource[0]; ath25_add_wmac()
/linux-4.1.27/arch/mips/netlogic/xlr/
H A Dplatform.c14 #include <linux/resource.h>
116 .resource = (struct resource[]) { \
178 /* Memory resource for various XLS usb ports */ xls_platform_usb_init()
181 xls_usb_ehci_device.resource[0].start = memres; xls_platform_usb_init()
182 xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1; xls_platform_usb_init()
186 xls_usb_ohci_device_0.resource[0].start = memres; xls_platform_usb_init()
187 xls_usb_ohci_device_0.resource[0].end = memres + 0x400 - 1; xls_platform_usb_init()
191 xls_usb_ohci_device_1.resource[0].start = memres; xls_platform_usb_init()
192 xls_usb_ohci_device_1.resource[0].end = memres + 0x400 - 1; xls_platform_usb_init()
215 static struct resource i2c_resources[] = {
227 .resource = i2c_resources,
237 nlm_xlr_i2c_1.resource[0].start = CPHYSADDR(nlm_mmio_base(offset)); nlm_i2c_init()
238 nlm_xlr_i2c_1.resource[0].end = nlm_xlr_i2c_1.resource[0].start + 0xfff; nlm_i2c_init()
/linux-4.1.27/drivers/pci/
H A Dbus.c20 void pci_add_resource_offset(struct list_head *resources, struct resource *res, pci_add_resource_offset()
36 void pci_add_resource(struct list_head *resources, struct resource *res) pci_add_resource()
48 void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, pci_bus_add_resource()
55 dev_err(&bus->dev, "can't add %pR resource\n", res); pci_bus_add_resource()
64 struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n) pci_bus_resource_n()
69 return bus->resource[n]; pci_bus_resource_n()
86 bus->resource[i] = NULL; pci_bus_remove_resources()
105 * addresses of resources we allocate, e.g., we may need a resource that
109 struct resource *res, pci_clip_resource_to_region()
126 static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res, pci_bus_alloc_from_region()
130 const struct resource *, pci_bus_alloc_from_region()
137 struct resource *r, avail; pci_bus_alloc_from_region()
152 /* We cannot allocate a non-prefetching resource pci_bus_for_each_resource()
182 * pci_bus_alloc_resource - allocate a resource from a parent bus
184 * @res: resource to allocate
185 * @size: size of resource to allocate
186 * @align: alignment of resource to allocate
189 * @alignf: resource alignment function
190 * @alignf_data: data argument for resource alignment function
193 * alignment and type, try to find an acceptable resource allocation
194 * for a specific device resource.
196 int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, pci_bus_alloc_resource()
200 const struct resource *, pci_bus_alloc_resource()
228 * The @idx resource of @dev should be a PCI-PCI bridge window. If this
229 * resource fits inside a window of an upstream bridge, do nothing. If it
230 * overlaps an upstream window but extends outside it, clip the resource so
236 struct resource *res = &dev->resource[idx]; pci_bus_clip_resource()
237 struct resource orig_res = *res; pci_bus_clip_resource()
238 struct resource *r; pci_bus_clip_resource()
H A Dsetup-res.c37 struct resource *res = dev->resource + resno; pci_update_resource()
40 * Ignore resources for unimplemented BARs and unused resource slots pci_update_resource()
52 * system resource we shouldn't move around. pci_update_resource()
108 int pci_claim_resource(struct pci_dev *dev, int resource) pci_claim_resource() argument
110 struct resource *res = &dev->resource[resource]; pci_claim_resource()
111 struct resource *root, *conflict; pci_claim_resource()
115 resource, res); pci_claim_resource()
122 resource, res); pci_claim_resource()
130 resource, res, conflict->name, conflict); pci_claim_resource()
166 static int pci_revert_fw_address(struct resource *res, struct pci_dev *dev, pci_revert_fw_address()
169 struct resource *root, *conflict; pci_revert_fw_address()
205 struct resource *res = dev->resource + resno; __pci_assign_resource()
214 * prefetchable resource in it because pbus_size_mem() assumes a __pci_assign_resource()
238 * If we didn't find a better match, we can put any memory resource __pci_assign_resource()
239 * in a non-prefetchable window. If this resource is 32 bits and __pci_assign_resource()
268 struct resource *res = dev->resource + resno; pci_assign_resource()
312 struct resource *res = dev->resource + resno; pci_reassign_resource()
320 dev_info(&dev->dev, "BAR %d: can't reassign an unassigned resource %pR\n", pci_reassign_resource()
349 struct resource *r; pci_enable_resources()
358 r = &dev->resource[i]; pci_enable_resources()
H A Dsetup-bus.c14 * PCI-PCI bridges cleanup, sorted resource allocation.
35 struct resource *res;
55 * add_to_list() - add a new resource tracker to the list
57 * @dev: device corresponding to which the resource
59 * @res: The resource to be tracked
61 * to the resource
64 struct pci_dev *dev, struct resource *res, add_to_list()
89 struct resource *res) remove_from_list()
103 struct resource *res) res_to_dev_res()
109 int idx = res - &dev_res->dev->resource[0]; list_for_each_entry()
125 struct resource *res) get_res_add_size()
134 struct resource *res) get_res_add_align()
149 struct resource *r; pdev_sort_resources()
154 r = &dev->resource[i]; pdev_sort_resources()
213 static inline void reset_resource(struct resource *res) reset_resource()
221 * reassign_resources_sorted() - satisfy any additional resource requests
235 struct resource *res; reassign_resources_sorted()
245 /* skip resource that has been reset */ list_for_each_entry_safe()
249 /* skip this resource if not found in head list */ list_for_each_entry()
259 idx = res - &add_res->dev->resource[0];
284 * assign_requested_resources_sorted() - satisfy resource requests
290 * Satisfy resource requests of each element in the list. Add
296 struct resource *res; assign_requested_resources_sorted()
302 idx = res - &dev_res->dev->resource[0]; list_for_each_entry()
332 * one pref failed resource will set IORESOURCE_MEM, pci_fail_res_type_mask()
340 static bool pci_need_to_release(unsigned long mask, struct resource *res) pci_need_to_release()
370 * them one by one in parent resource window. __assign_resources_sorted()
376 * Separate three resource type checking if we need to release __assign_resources_sorted()
377 * assigned resource after requested + add_size try. __assign_resources_sorted()
414 * 1. bridge resource -- IORESOURCE_STARTALIGN list_for_each_entry_safe()
415 * 2. SR-IOV resource -- IORESOURCE_SIZEALIGN list_for_each_entry_safe()
476 /* Release assigned resource */ list_for_each_entry()
482 struct resource *res = save_res->res; list_for_each_entry()
491 /* Satisfy the must-have resource requests */
494 /* Try to satisfy any additional optional resource
528 struct resource *res; pci_setup_cardbus()
534 res = bus->resource[0]; pci_setup_cardbus()
538 * The IO resource is allocated a range twice as large as it pci_setup_cardbus()
548 res = bus->resource[1]; pci_setup_cardbus()
558 res = bus->resource[2]; pci_setup_cardbus()
568 res = bus->resource[3]; pci_setup_cardbus()
593 struct resource *res; pci_setup_bridge_io()
605 res = &bridge->resource[PCI_BRIDGE_RESOURCES + 0]; pci_setup_bridge_io()
630 struct resource *res; pci_setup_bridge_mmio()
635 res = &bridge->resource[PCI_BRIDGE_RESOURCES + 1]; pci_setup_bridge_mmio()
649 struct resource *res; pci_setup_bridge_mmio_pref()
660 res = &bridge->resource[PCI_BRIDGE_RESOURCES + 2]; pci_setup_bridge_mmio_pref()
750 struct resource *b_res; pci_bridge_check_ranges()
752 b_res = &bridge->resource[PCI_BRIDGE_RESOURCES]; pci_bridge_check_ranges()
802 bus resource of a given type. Note: we intentionally skip
804 have non-NULL parent resource). */ find_free_bus_resource()
805 static struct resource *find_free_bus_resource(struct pci_bus *bus, find_free_bus_resource()
809 struct resource *r; find_free_bus_resource()
906 struct resource *b_res = find_free_bus_resource(bus, IORESOURCE_IO, pbus_size_io()
920 struct resource *r = &dev->resource[i]; pbus_size_io()
995 * @mask: mask the resource flag, then compare it with type
996 * @type: the type of free resource from bridge
1006 * Returns -ENOSPC if there's no available bus resource of the desired type.
1007 * Otherwise, sets the bus resource start/end to indicate the required
1020 struct resource *b_res = find_free_bus_resource(bus, pbus_size_mem()
1037 struct resource *r = &dev->resource[i]; pbus_size_mem()
1117 unsigned long pci_cardbus_resource_alignment(struct resource *res) pci_cardbus_resource_alignment()
1130 struct resource *b_res = &bridge->resource[PCI_BRIDGE_RESOURCES]; pci_bus_size_cardbus()
1224 struct resource *b_res; __pci_bus_size_bridges()
1269 b_res = &bus->self->resource[PCI_BRIDGE_RESOURCES]; __pci_bus_size_bridges()
1327 * 32-bit prefetchable resource in a 64-bit prefetchable __pci_bus_size_bridges()
1417 struct resource *r; pci_bridge_release_resources()
1421 struct resource *b_res; pci_bridge_release_resources()
1424 b_res = &dev->resource[PCI_BRIDGE_RESOURCES]; pci_bridge_release_resources()
1463 dev_printk(KERN_DEBUG, &dev->dev, "resource %d %pR released\n", pci_bridge_release_resources()
1521 struct resource *res; pci_bus_dump_res()
1528 dev_printk(KERN_DEBUG, &bus->dev, "resource %d %pR\n", i, res); pci_bus_for_each_resource()
1600 struct resource *r = &dev->resource[i]; iov_resources_unassigned()
1672 * must have, so can realloc parent bridge resource pci_assign_unassigned_root_bus_resources()
1708 * Try to release leaf bridge's resources that doesn't fit resource of pci_assign_unassigned_root_bus_resources()
1718 struct resource *res = fail_res->res; pci_assign_unassigned_root_bus_resources()
1731 /* dump the resource on buses */ pci_assign_unassigned_root_bus_resources()
1774 * Try to release leaf bridge's resources that doesn't fit resource of pci_assign_unassigned_bridge_resources()
1784 struct resource *res = fail_res->res; pci_assign_unassigned_bridge_resources()
/linux-4.1.27/arch/sh/drivers/superhyway/
H A Dops-sh4-202.c28 static struct resource emi_resources[] = {
44 .resource = emi_resources,
47 static struct resource femi_resources[] = {
63 .resource = femi_resources,
66 static struct resource epbr_resources[] = {
82 .resource = epbr_resources,
85 static struct resource dmac_resource = {
94 .resource = &dmac_resource,
97 static struct resource pbr_resources[] = {
113 .resource = pbr_resources,
/linux-4.1.27/arch/sh/kernel/cpu/sh2/
H A Dsetup-sh7619.c69 static struct resource scif0_resources[] = {
77 .resource = scif0_resources,
90 static struct resource scif1_resources[] = {
98 .resource = scif1_resources,
111 static struct resource scif2_resources[] = {
119 .resource = scif2_resources,
132 static struct resource eth_resources[] = {
152 .resource = eth_resources,
159 static struct resource cmt_resources[] = {
171 .resource = cmt_resources,
/linux-4.1.27/arch/mips/mti-sead3/
H A Dsead3-platform.c51 static struct resource sead3_net_resources[] = {
68 .resource = sead3_net_resources
90 static struct resource sead3_flash_resource = {
103 .resource = &sead3_flash_resource,
130 static struct resource pled_resources[] = {
145 .resource = pled_resources
149 static struct resource fled_resources[] = {
164 .resource = fled_resources
172 static struct resource ehci_resources[] = {
192 .resource = ehci_resources
/linux-4.1.27/drivers/pnp/pnpacpi/
H A Drsparser.c114 static void pnpacpi_add_irqresource(struct pnp_dev *dev, struct resource *r) pnpacpi_add_irqresource()
126 * the producer/consumer flag, so HP invented a vendor-defined resource to
184 struct resource *r = &win.res; pnpacpi_allocated_resource()
256 dev_warn(&dev->dev, "unknown resource type %d in _CRS\n", pnpacpi_allocated_resource()
406 dev_warn(&dev->dev, "can't convert resource type %d\n", pnpacpi_parse_address_option()
535 dev_warn(&dev->dev, "unknown resource type %d in _PRS\n", pnpacpi_option_resource()
550 pnp_dbg(&dev->dev, "parse resource options\n"); pnpacpi_parse_resource_option_data()
587 * Set resource
601 struct acpi_resource **resource = data; pnpacpi_type_resources() local
604 (*resource)->type = res->type; pnpacpi_type_resources()
605 (*resource)->length = sizeof(struct acpi_resource); pnpacpi_type_resources()
607 (*resource)->data.irq.descriptor_length = pnpacpi_type_resources()
609 (*resource)++; pnpacpi_type_resources()
620 struct acpi_resource *resource; pnpacpi_build_resource_template() local
637 resource = (struct acpi_resource *)buffer->pointer; pnpacpi_build_resource_template()
639 pnpacpi_type_resources, &resource); pnpacpi_build_resource_template()
645 /* resource will pointer the end resource now */ pnpacpi_build_resource_template()
646 resource->type = ACPI_RESOURCE_TYPE_END_TAG; pnpacpi_build_resource_template()
647 resource->length = sizeof(struct acpi_resource); pnpacpi_build_resource_template()
653 struct acpi_resource *resource, pnpacpi_encode_irq()
654 struct resource *p) pnpacpi_encode_irq()
656 struct acpi_resource_irq *irq = &resource->data.irq; pnpacpi_encode_irq()
682 struct acpi_resource *resource, pnpacpi_encode_ext_irq()
683 struct resource *p) pnpacpi_encode_ext_irq()
685 struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq; pnpacpi_encode_ext_irq()
710 struct acpi_resource *resource, pnpacpi_encode_dma()
711 struct resource *p) pnpacpi_encode_dma()
713 struct acpi_resource_dma *dma = &resource->data.dma; pnpacpi_encode_dma()
758 struct acpi_resource *resource, pnpacpi_encode_io()
759 struct resource *p) pnpacpi_encode_io()
761 struct acpi_resource_io *io = &resource->data.io; pnpacpi_encode_io()
781 struct acpi_resource *resource, pnpacpi_encode_fixed_io()
782 struct resource *p) pnpacpi_encode_fixed_io()
784 struct acpi_resource_fixed_io *fixed_io = &resource->data.fixed_io; pnpacpi_encode_fixed_io()
799 struct acpi_resource *resource, pnpacpi_encode_mem24()
800 struct resource *p) pnpacpi_encode_mem24()
802 struct acpi_resource_memory24 *memory24 = &resource->data.memory24; pnpacpi_encode_mem24()
824 struct acpi_resource *resource, pnpacpi_encode_mem32()
825 struct resource *p) pnpacpi_encode_mem32()
827 struct acpi_resource_memory32 *memory32 = &resource->data.memory32; pnpacpi_encode_mem32()
848 struct acpi_resource *resource, pnpacpi_encode_fixed_mem32()
849 struct resource *p) pnpacpi_encode_fixed_mem32()
851 struct acpi_resource_fixed_memory32 *fixed_memory32 = &resource->data.fixed_memory32; pnpacpi_encode_fixed_mem32()
875 struct acpi_resource *resource = buffer->pointer; pnpacpi_encode_resources() local
880 switch (resource->type) { pnpacpi_encode_resources()
882 pnpacpi_encode_irq(dev, resource, pnpacpi_encode_resources()
888 pnpacpi_encode_dma(dev, resource, pnpacpi_encode_resources()
893 pnpacpi_encode_io(dev, resource, pnpacpi_encode_resources()
898 pnpacpi_encode_fixed_io(dev, resource, pnpacpi_encode_resources()
903 pnpacpi_encode_mem24(dev, resource, pnpacpi_encode_resources()
908 pnpacpi_encode_mem32(dev, resource, pnpacpi_encode_resources()
913 pnpacpi_encode_fixed_mem32(dev, resource, pnpacpi_encode_resources()
918 pnpacpi_encode_ext_irq(dev, resource, pnpacpi_encode_resources()
932 dev_warn(&dev->dev, "can't encode unknown resource " pnpacpi_encode_resources()
933 "type %d\n", resource->type); pnpacpi_encode_resources()
936 resource++; pnpacpi_encode_resources()
652 pnpacpi_encode_irq(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_irq() argument
681 pnpacpi_encode_ext_irq(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_ext_irq() argument
709 pnpacpi_encode_dma(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_dma() argument
757 pnpacpi_encode_io(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_io() argument
780 pnpacpi_encode_fixed_io(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_fixed_io() argument
798 pnpacpi_encode_mem24(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_mem24() argument
823 pnpacpi_encode_mem32(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_mem32() argument
847 pnpacpi_encode_fixed_mem32(struct pnp_dev *dev, struct acpi_resource *resource, struct resource *p) pnpacpi_encode_fixed_mem32() argument
/linux-4.1.27/arch/arm/plat-orion/
H A Dcommon.c58 struct resource *resources, fill_resources()
63 device->resource = resources; fill_resources()
89 struct resource *resources, uart_complete()
117 static struct resource orion_uart0_resources[2];
145 static struct resource orion_uart1_resources[2];
173 static struct resource orion_uart2_resources[2];
201 static struct resource orion_uart3_resources[2];
220 static struct resource orion_rtc_resource[2];
240 struct resource *orion_ge_resource, unsigned long irq, ge_complete()
262 static struct resource orion_ge00_shared_resources[] = {
276 static struct resource orion_ge_mvmdio_resources[] = {
289 static struct resource orion_ge00_resources[] = {
300 .resource = orion_ge00_resources,
328 static struct resource orion_ge01_shared_resources[] = {
342 static struct resource orion_ge01_resources[] = {
353 .resource = orion_ge01_resources,
379 static struct resource orion_ge10_shared_resources[] = {
393 static struct resource orion_ge10_resources[] = {
404 .resource = orion_ge10_resources,
428 static struct resource orion_ge11_shared_resources[] = {
442 static struct resource orion_ge11_resources[] = {
453 .resource = orion_ge11_resources,
475 static struct resource orion_switch_resources[] = {
487 .resource = orion_switch_resources,
516 static struct resource orion_i2c_resources[2];
531 static struct resource orion_i2c_1_resources[2];
564 static struct resource orion_spi_resources;
571 static struct resource orion_spi_1_resources;
598 static struct resource orion_wdt_resource[] = {
607 .resource = orion_wdt_resource,
623 static struct resource orion_xor0_shared_resources[] = {
649 .resource = orion_xor0_shared_resources,
684 static struct resource orion_xor1_shared_resources[] = {
710 .resource = orion_xor1_shared_resources,
752 static struct resource orion_ehci_resources[2];
778 static struct resource orion_ehci_1_resources[2];
802 static struct resource orion_ehci_2_resources[2];
826 static struct resource orion_sata_resources[2] = {
856 static struct resource orion_crypto_resources[] = {
/linux-4.1.27/arch/arm/mach-omap1/
H A Dgpio7xx.c33 static struct resource omap7xx_mpu_gpio_resources[] = {
70 .resource = omap7xx_mpu_gpio_resources,
74 static struct resource omap7xx_gpio1_resources[] = {
109 .resource = omap7xx_gpio1_resources,
113 static struct resource omap7xx_gpio2_resources[] = {
137 .resource = omap7xx_gpio2_resources,
141 static struct resource omap7xx_gpio3_resources[] = {
165 .resource = omap7xx_gpio3_resources,
169 static struct resource omap7xx_gpio4_resources[] = {
193 .resource = omap7xx_gpio4_resources,
197 static struct resource omap7xx_gpio5_resources[] = {
221 .resource = omap7xx_gpio5_resources,
225 static struct resource omap7xx_gpio6_resources[] = {
249 .resource = omap7xx_gpio6_resources,
H A Dgpio16xx.c34 static struct resource omap16xx_mpu_gpio_resources[] = {
71 .resource = omap16xx_mpu_gpio_resources,
75 static struct resource omap16xx_gpio1_resources[] = {
115 .resource = omap16xx_gpio1_resources,
119 static struct resource omap16xx_gpio2_resources[] = {
143 .resource = omap16xx_gpio2_resources,
147 static struct resource omap16xx_gpio3_resources[] = {
171 .resource = omap16xx_gpio3_resources,
175 static struct resource omap16xx_gpio4_resources[] = {
199 .resource = omap16xx_gpio4_resources,
219 struct resource *res; omap16xx_gpio_init()
239 dev_err(&pdev->dev, "Invalid mem resource.\n"); omap16xx_gpio_init()
H A Dgpio15xx.c28 static struct resource omap15xx_mpu_gpio_resources[] = {
65 .resource = omap15xx_mpu_gpio_resources,
69 static struct resource omap15xx_gpio_resources[] = {
105 .resource = omap15xx_gpio_resources,
/linux-4.1.27/arch/blackfin/mach-bf538/boards/
H A Dezkit.c45 static struct resource bfin_uart0_resources[] = {
98 .resource = bfin_uart0_resources,
105 static struct resource bfin_uart1_resources[] = {
146 .resource = bfin_uart1_resources,
153 static struct resource bfin_uart2_resources[] = {
194 .resource = bfin_uart2_resources,
204 static struct resource bfin_sir0_resources[] = {
225 .resource = bfin_sir0_resources,
229 static struct resource bfin_sir1_resources[] = {
250 .resource = bfin_sir1_resources,
254 static struct resource bfin_sir2_resources[] = {
275 .resource = bfin_sir2_resources,
282 static struct resource bfin_sport0_uart_resources[] = {
309 .resource = bfin_sport0_uart_resources,
316 static struct resource bfin_sport1_uart_resources[] = {
343 .resource = bfin_sport1_uart_resources,
350 static struct resource bfin_sport2_uart_resources[] = {
377 .resource = bfin_sport2_uart_resources,
384 static struct resource bfin_sport3_uart_resources[] = {
411 .resource = bfin_sport3_uart_resources,
424 static struct resource bfin_can_resources[] = {
450 .resource = bfin_can_resources,
470 static struct resource smc91x_resources[] = {
486 .resource = smc91x_resources,
550 static struct resource bfin_lq035q1_resources[] = {
562 .resource = bfin_lq035q1_resources,
613 static struct resource bfin_spi0_resource[] = {
632 static struct resource bfin_spi1_resource[] = {
651 static struct resource bfin_spi2_resource[] = {
680 .resource = bfin_spi0_resource,
696 .resource = bfin_spi1_resource,
712 .resource = bfin_spi2_resource,
721 static struct resource bfin_twi0_resource[] = {
738 .resource = bfin_twi0_resource,
746 static struct resource bfin_twi1_resource[] = {
763 .resource = bfin_twi1_resource,
838 static struct resource ezkit_flash_resource = {
855 .resource = &ezkit_flash_resource,
/linux-4.1.27/arch/blackfin/mach-bf548/boards/
H A Dezkit.c46 static struct resource bfin_isp1760_resources[] = {
75 .resource = bfin_isp1760_resources,
92 static struct resource bf54x_lq043_resources[] = {
104 .resource = bf54x_lq043_resources,
142 static struct resource bf54x_kpad_resources[] = {
154 .resource = bf54x_kpad_resources,
174 static struct resource bfin_rotary_resources[] = {
191 .resource = bfin_rotary_resources,
246 static struct resource bfin_uart0_resources[] = {
294 .resource = bfin_uart0_resources,
301 static struct resource bfin_uart1_resources[] = {
365 .resource = bfin_uart1_resources,
372 static struct resource bfin_uart2_resources[] = {
420 .resource = bfin_uart2_resources,
427 static struct resource bfin_uart3_resources[] = {
491 .resource = bfin_uart3_resources,
501 static struct resource bfin_sir0_resources[] = {
522 .resource = bfin_sir0_resources,
526 static struct resource bfin_sir1_resources[] = {
547 .resource = bfin_sir1_resources,
551 static struct resource bfin_sir2_resources[] = {
572 .resource = bfin_sir2_resources,
576 static struct resource bfin_sir3_resources[] = {
597 .resource = bfin_sir3_resources,
605 static struct resource smsc911x_resources[] = {
630 .resource = smsc911x_resources,
638 static struct resource musb_resources[] = {
695 .resource = musb_resources,
701 static struct resource bfin_sport0_uart_resources[] = {
728 .resource = bfin_sport0_uart_resources,
735 static struct resource bfin_sport1_uart_resources[] = {
762 .resource = bfin_sport1_uart_resources,
769 static struct resource bfin_sport2_uart_resources[] = {
796 .resource = bfin_sport2_uart_resources,
803 static struct resource bfin_sport3_uart_resources[] = {
830 .resource = bfin_sport3_uart_resources,
844 static struct resource bfin_can0_resources[] = {
871 .resource = bfin_can0_resources,
881 static struct resource bfin_can1_resources[] = {
908 .resource = bfin_can1_resources,
917 static struct resource bfin_atapi_resources[] = {
934 .resource = bfin_atapi_resources,
964 static struct resource bf5xx_nand_resources[] = {
981 .resource = bf5xx_nand_resources,
1036 static struct resource ezkit_flash_resource = {
1049 .resource = &ezkit_flash_resource,
1107 static struct resource bfin_pint0_resources[] = {
1124 .resource = bfin_pint0_resources,
1127 static struct resource bfin_pint1_resources[] = {
1144 .resource = bfin_pint1_resources,
1147 static struct resource bfin_pint2_resources[] = {
1164 .resource = bfin_pint2_resources,
1167 static struct resource bfin_pint3_resources[] = {
1184 .resource = bfin_pint3_resources,
1187 static struct resource bfin_gpa_resources[] = {
1213 .resource = bfin_gpa_resources,
1219 static struct resource bfin_gpb_resources[] = {
1245 .resource = bfin_gpb_resources,
1251 static struct resource bfin_gpc_resources[] = {
1277 .resource = bfin_gpc_resources,
1283 static struct resource bfin_gpd_resources[] = {
1309 .resource = bfin_gpd_resources,
1315 static struct resource bfin_gpe_resources[] = {
1341 .resource = bfin_gpe_resources,
1347 static struct resource bfin_gpf_resources[] = {
1373 .resource = bfin_gpf_resources,
1379 static struct resource bfin_gpg_resources[] = {
1403 .resource = bfin_gpg_resources,
1409 static struct resource bfin_gph_resources[] = {
1433 .resource = bfin_gph_resources,
1439 static struct resource bfin_gpi_resources[] = {
1463 .resource = bfin_gpi_resources,
1469 static struct resource bfin_gpj_resources[] = {
1493 .resource = bfin_gpj_resources,
1554 static struct resource bfin_spi0_resource[] = {
1573 static struct resource bfin_spi1_resource[] = {
1602 .resource = bfin_spi0_resource,
1618 .resource = bfin_spi1_resource,
1693 static struct resource bfin_twi0_resource[] = {
1710 .resource = bfin_twi0_resource,
1719 static struct resource bfin_twi1_resource[] = {
1736 .resource = bfin_twi1_resource,
1884 static struct resource bfin_snd_resources[][4] = {
1925 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
1937 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
H A Dcm_bf548.c53 static struct resource bf54x_lq043_resources[] = {
65 .resource = bf54x_lq043_resources,
103 static struct resource bf54x_kpad_resources[] = {
115 .resource = bf54x_kpad_resources,
131 static struct resource bfin_uart0_resources[] = {
172 .resource = bfin_uart0_resources,
179 static struct resource bfin_uart1_resources[] = {
236 .resource = bfin_uart1_resources,
243 static struct resource bfin_uart2_resources[] = {
284 .resource = bfin_uart2_resources,
291 static struct resource bfin_uart3_resources[] = {
348 .resource = bfin_uart3_resources,
358 static struct resource bfin_sir0_resources[] = {
379 .resource = bfin_sir0_resources,
383 static struct resource bfin_sir1_resources[] = {
404 .resource = bfin_sir1_resources,
408 static struct resource bfin_sir2_resources[] = {
429 .resource = bfin_sir2_resources,
433 static struct resource bfin_sir3_resources[] = {
454 .resource = bfin_sir3_resources,
462 static struct resource smsc911x_resources[] = {
487 .resource = smsc911x_resources,
495 static struct resource musb_resources[] = {
552 .resource = musb_resources,
558 static struct resource bfin_sport0_uart_resources[] = {
585 .resource = bfin_sport0_uart_resources,
592 static struct resource bfin_sport1_uart_resources[] = {
619 .resource = bfin_sport1_uart_resources,
626 static struct resource bfin_sport2_uart_resources[] = {
653 .resource = bfin_sport2_uart_resources,
660 static struct resource bfin_sport3_uart_resources[] = {
687 .resource = bfin_sport3_uart_resources,
696 static struct resource bfin_atapi_resources[] = {
713 .resource = bfin_atapi_resources,
739 static struct resource bf5xx_nand_resources[] = {
756 .resource = bf5xx_nand_resources,
784 static struct resource bfin_can_resources[] = {
810 .resource = bfin_can_resources,
840 static struct resource para_flash_resource = {
853 .resource = &para_flash_resource,
936 static struct resource bfin_spi0_resource[] = {
955 static struct resource bfin_spi1_resource[] = {
984 .resource = bfin_spi0_resource,
1000 .resource = bfin_spi1_resource,
1010 static struct resource bfin_twi0_resource[] = {
1027 .resource = bfin_twi0_resource,
1036 static struct resource bfin_twi1_resource[] = {
1053 .resource = bfin_twi1_resource,
/linux-4.1.27/arch/mips/sgi-ip22/
H A Dip22-platform.c13 static struct resource sgiwd93_0_resources[] = {
31 .resource = sgiwd93_0_resources,
37 static struct resource sgiwd93_1_resources[] = {
55 .resource = sgiwd93_1_resources,
87 static struct resource sgiseeq_0_resources[] = {
102 .resource = sgiseeq_0_resources,
108 static struct resource sgiseeq_1_resources[] = {
123 .resource = sgiseeq_1_resources,
198 struct resource res; sgi_ds1286_devinit()
/linux-4.1.27/drivers/mfd/
H A Dtwl4030-audio.c50 struct twl4030_audio_resource resource[TWL4030_AUDIO_RES_MAX]; member in struct:twl4030_audio
55 * Modify the resource, the function returns the content of the register
64 audio->resource[id].reg); twl4030_audio_set_resource()
67 val |= audio->resource[id].mask; twl4030_audio_set_resource()
69 val &= ~audio->resource[id].mask; twl4030_audio_set_resource()
72 val, audio->resource[id].reg); twl4030_audio_set_resource()
83 audio->resource[id].reg); twl4030_audio_get_resource()
89 * Enable the resource.
99 "Invalid resource ID (%u)\n", id); twl4030_audio_enable_resource()
104 if (!audio->resource[id].request_count) twl4030_audio_enable_resource()
110 audio->resource[id].request_count++; twl4030_audio_enable_resource()
118 * Disable the resource.
128 "Invalid resource ID (%u)\n", id); twl4030_audio_disable_resource()
133 if (!audio->resource[id].request_count) { twl4030_audio_disable_resource()
139 audio->resource[id].request_count--; twl4030_audio_disable_resource()
141 if (!audio->resource[id].request_count) twl4030_audio_disable_resource()
227 audio->resource[TWL4030_AUDIO_RES_POWER].reg = TWL4030_REG_CODEC_MODE; twl4030_audio_probe()
228 audio->resource[TWL4030_AUDIO_RES_POWER].mask = TWL4030_CODECPDZ; twl4030_audio_probe()
231 audio->resource[TWL4030_AUDIO_RES_APLL].reg = TWL4030_REG_APLL_CTL; twl4030_audio_probe()
232 audio->resource[TWL4030_AUDIO_RES_APLL].mask = TWL4030_APLL_EN; twl4030_audio_probe()
H A Dintel_soc_pmic_crc.c38 static struct resource gpio_resources[] = {
47 static struct resource pwrsrc_resources[] = {
56 static struct resource adc_resources[] = {
65 static struct resource thermal_resources[] = {
74 static struct resource bcu_resources[] = {
/linux-4.1.27/drivers/staging/fsl-mc/include/
H A Dmc.h71 * Entries in these enum are used as indices in the array of resource
80 * NOTE: New resource pool types must be added before this entry
86 * struct fsl_mc_resource - MC generic resource
87 * @type: type of resource
88 * @id: unique MC resource Id within the resources of the same type
89 * @data: pointer to resource-specific data if the resource is currently
90 * allocated, or NULL if the resource is not currently allocated.
91 * @parent_pool: pointer to the parent resource pool from which this
92 * resource is allocated from.
93 * @node: Node in the free list of the corresponding resource pool
96 * MC resource structures.
127 * @resource: generic resource associated with this MC object device, if any.
142 * corresponding resource pool in the object's parent DPRC, using the
145 * fsl_mc_device's 'resource' points to the associated resource object.
147 * 'resource' is NULL.
157 struct resource *regions;
158 struct fsl_mc_resource *resource; member in struct:fsl_mc_device
/linux-4.1.27/arch/mips/ath79/
H A Ddev-common.c26 static struct resource ath79_uart_resources[] = {
50 .resource = ath79_uart_resources,
57 static struct resource ar933x_uart_resources[] = {
73 .resource = ar933x_uart_resources,
99 struct resource res; ath79_register_wdt()
H A Ddev-spi.c16 static struct resource ath79_spi_resources[] = {
27 .resource = ath79_spi_resources,
/linux-4.1.27/arch/sh/kernel/cpu/sh2a/
H A Dsetup-sh7201.c186 static struct resource scif0_resources[] = {
194 .resource = scif0_resources,
207 static struct resource scif1_resources[] = {
215 .resource = scif1_resources,
228 static struct resource scif2_resources[] = {
236 .resource = scif2_resources,
249 static struct resource scif3_resources[] = {
257 .resource = scif3_resources,
270 static struct resource scif4_resources[] = {
278 .resource = scif4_resources,
291 static struct resource scif5_resources[] = {
299 .resource = scif5_resources,
312 static struct resource scif6_resources[] = {
320 .resource = scif6_resources,
333 static struct resource scif7_resources[] = {
341 .resource = scif7_resources,
348 static struct resource rtc_resources[] = {
365 .resource = rtc_resources,
368 static struct resource mtu2_resources[] = {
378 .resource = mtu2_resources,
H A Dsetup-sh7264.c236 static struct resource scif0_resources[] = {
247 .resource = scif0_resources,
262 static struct resource scif1_resources[] = {
273 .resource = scif1_resources,
288 static struct resource scif2_resources[] = {
299 .resource = scif2_resources,
314 static struct resource scif3_resources[] = {
325 .resource = scif3_resources,
340 static struct resource scif4_resources[] = {
351 .resource = scif4_resources,
366 static struct resource scif5_resources[] = {
377 .resource = scif5_resources,
392 static struct resource scif6_resources[] = {
403 .resource = scif6_resources,
418 static struct resource scif7_resources[] = {
429 .resource = scif7_resources,
440 static struct resource cmt_resources[] = {
452 .resource = cmt_resources,
456 static struct resource mtu2_resources[] = {
465 .resource = mtu2_resources,
469 static struct resource rtc_resources[] = {
486 .resource = rtc_resources,
501 static struct resource r8a66597_usb_host_resources[] = {
523 .resource = r8a66597_usb_host_resources,
H A Dsetup-sh7203.c184 static struct resource scif0_resources[] = {
192 .resource = scif0_resources,
207 static struct resource scif1_resources[] = {
215 .resource = scif1_resources,
230 static struct resource scif2_resources[] = {
238 .resource = scif2_resources,
253 static struct resource scif3_resources[] = {
261 .resource = scif3_resources,
272 static struct resource cmt_resources[] = {
284 .resource = cmt_resources,
288 static struct resource mtu2_resources[] = {
297 .resource = mtu2_resources,
301 static struct resource rtc_resources[] = {
318 .resource = rtc_resources,
/linux-4.1.27/arch/blackfin/mach-bf533/boards/
H A Dcm_bf533.c107 static struct resource bfin_spi0_resource[] = {
136 .resource = bfin_spi0_resource,
159 static struct resource smc91x_resources[] = {
174 .resource = smc91x_resources,
184 static struct resource smsc911x_resources[] = {
208 .resource = smsc911x_resources,
217 static struct resource bfin_uart0_resources[] = {
258 .resource = bfin_uart0_resources,
268 static struct resource bfin_sir0_resources[] = {
290 .resource = bfin_sir0_resources,
297 static struct resource bfin_sport0_uart_resources[] = {
324 .resource = bfin_sport0_uart_resources,
331 static struct resource bfin_sport1_uart_resources[] = {
358 .resource = bfin_sport1_uart_resources,
367 static struct resource isp1362_hcd_resources[] = {
401 .resource = isp1362_hcd_resources,
407 static struct resource net2272_bfin_resources[] = {
423 .resource = net2272_bfin_resources,
448 static struct resource para_flash_resource = {
461 .resource = &para_flash_resource,
H A Dezkit.c52 static struct resource smc91x_resources[] = {
68 .resource = smc91x_resources,
94 static struct resource ezkit_flash_resource_a = {
107 .resource = &ezkit_flash_resource_a,
124 static struct resource ezkit_flash_resource_b = {
137 .resource = &ezkit_flash_resource_b,
147 static struct resource sram_resource_a = {
160 .resource = &sram_resource_a,
168 static struct resource sram_resource_b = {
181 .resource = &sram_resource_b,
250 static struct resource bfin_spi0_resource[] = {
279 .resource = bfin_spi0_resource,
288 static struct resource bfin_uart0_resources[] = {
329 .resource = bfin_uart0_resources,
339 static struct resource bfin_sir0_resources[] = {
361 .resource = bfin_sir0_resources,
H A Dip0x.c39 static struct resource dm9000_resource1[] = {
55 static struct resource dm9000_resource2[] = {
83 .resource = dm9000_resource1,
97 .resource = dm9000_resource2,
147 static struct resource bfin_uart0_resources[] = {
188 .resource = bfin_uart0_resources,
198 static struct resource bfin_sir0_resources[] = {
220 .resource = bfin_sir0_resources,
226 static struct resource isp1362_hcd_resources[] = {
260 .resource = isp1362_hcd_resources,
H A DH8606.c43 static struct resource dm9000_resources[] = {
65 .resource = dm9000_resources,
79 static struct resource smc91x_resources[] = {
100 .resource = smc91x_resources,
108 static struct resource net2272_bfin_resources[] = {
124 .resource = net2272_bfin_resources,
195 static struct resource bfin_spi0_resource[] = {
225 .resource = bfin_spi0_resource,
234 static struct resource bfin_uart0_resources[] = {
275 .resource = bfin_uart0_resources,
285 static struct resource bfin_sir0_resources[] = {
307 .resource = bfin_sir0_resources,
363 static struct resource opencores_kbd_resources[] = {
379 .resource = opencores_kbd_resources,
/linux-4.1.27/arch/blackfin/mach-bf537/boards/
H A Dminotaur.c35 static struct resource bfin_pcmcia_cf_resources[] = {
59 .resource = bfin_pcmcia_cf_resources,
104 static struct resource net2272_bfin_resources[] = {
120 .resource = net2272_bfin_resources,
203 static struct resource bfin_spi0_resource[] = {
225 .resource = bfin_spi0_resource,
234 static struct resource bfin_uart0_resources[] = {
275 .resource = bfin_uart0_resources,
282 static struct resource bfin_uart1_resources[] = {
323 .resource = bfin_uart1_resources,
333 static struct resource bfin_sir0_resources[] = {
355 .resource = bfin_sir0_resources,
359 static struct resource bfin_sir1_resources[] = {
381 .resource = bfin_sir1_resources,
389 static struct resource bfin_twi0_resource[] = {
406 .resource = bfin_twi0_resource,
415 static struct resource bfin_sport0_uart_resources[] = {
442 .resource = bfin_sport0_uart_resources,
449 static struct resource bfin_sport1_uart_resources[] = {
476 .resource = bfin_sport1_uart_resources,
H A Dtcm_bf537.c112 static struct resource bfin_spi0_resource[] = {
141 .resource = bfin_spi0_resource,
170 static struct resource smc91x_resources[] = {
186 .resource = smc91x_resources,
194 static struct resource isp1362_hcd_resources[] = {
228 .resource = isp1362_hcd_resources,
233 static struct resource net2272_bfin_resources[] = {
249 .resource = net2272_bfin_resources,
278 static struct resource cm_flash_resource[] = {
298 .resource = cm_flash_resource,
304 static struct resource bfin_uart0_resources[] = {
345 .resource = bfin_uart0_resources,
352 static struct resource bfin_uart1_resources[] = {
393 .resource = bfin_uart1_resources,
403 static struct resource bfin_sir0_resources[] = {
425 .resource = bfin_sir0_resources,
429 static struct resource bfin_sir1_resources[] = {
451 .resource = bfin_sir1_resources,
459 static struct resource bfin_twi0_resource[] = {
476 .resource = bfin_twi0_resource,
485 static struct resource bfin_sport0_uart_resources[] = {
512 .resource = bfin_sport0_uart_resources,
519 static struct resource bfin_sport1_uart_resources[] = {
546 .resource = bfin_sport1_uart_resources,
594 static struct resource bfin_pata_resources[] = {
616 .resource = bfin_pata_resources,
H A Dcm_bf537e.c112 static struct resource bfin_spi0_resource[] = {
141 .resource = bfin_spi0_resource,
158 static struct resource bfin_sport_spi0_resource[] = {
175 .resource = bfin_sport_spi0_resource,
188 static struct resource bfin_sport_spi1_resource[] = {
205 .resource = bfin_sport_spi1_resource,
235 static struct resource smc91x_resources[] = {
251 .resource = smc91x_resources,
259 static struct resource isp1362_hcd_resources[] = {
293 .resource = isp1362_hcd_resources,
298 static struct resource net2272_bfin_resources[] = {
314 .resource = net2272_bfin_resources,
343 static struct resource cm_flash_resource[] = {
363 .resource = cm_flash_resource,
369 static struct resource bfin_uart0_resources[] = {
428 .resource = bfin_uart0_resources,
435 static struct resource bfin_uart1_resources[] = {
494 .resource = bfin_uart1_resources,
504 static struct resource bfin_sir0_resources[] = {
525 .resource = bfin_sir0_resources,
529 static struct resource bfin_sir1_resources[] = {
550 .resource = bfin_sir1_resources,
558 static struct resource bfin_twi0_resource[] = {
575 .resource = bfin_twi0_resource,
591 static struct resource bfin_sport0_uart_resources[] = {
613 .resource = bfin_sport0_uart_resources,
620 static struct resource bfin_sport1_uart_resources[] = {
647 .resource = bfin_sport1_uart_resources,
655 static struct resource bfin_sport0_resources[] = {
691 .resource = bfin_sport0_resources,
738 static struct resource bfin_pata_resources[] = {
760 .resource = bfin_pata_resources,
H A Dpnav10.c34 static struct resource bfin_pcmcia_cf_resources[] = {
58 .resource = bfin_pcmcia_cf_resources,
78 static struct resource smc91x_resources[] = {
95 .resource = smc91x_resources,
136 static struct resource net2272_bfin_resources[] = {
152 .resource = net2272_bfin_resources,
258 static struct resource bfin_spi0_resource[] = {
287 .resource = bfin_spi0_resource,
302 static struct resource bfin_uart0_resources[] = {
343 .resource = bfin_uart0_resources,
350 static struct resource bfin_uart1_resources[] = {
391 .resource = bfin_uart1_resources,
401 static struct resource bfin_sir0_resources[] = {
423 .resource = bfin_sir0_resources,
427 static struct resource bfin_sir1_resources[] = {
449 .resource = bfin_sir1_resources,
H A Dcm_bf537u.c112 static struct resource bfin_spi0_resource[] = {
141 .resource = bfin_spi0_resource,
170 static struct resource smc91x_resources[] = {
186 .resource = smc91x_resources,
194 static struct resource isp1362_hcd_resources[] = {
228 .resource = isp1362_hcd_resources,
233 static struct resource net2272_bfin_resources[] = {
249 .resource = net2272_bfin_resources,
278 static struct resource cm_flash_resource[] = {
298 .resource = cm_flash_resource,
304 static struct resource bfin_uart0_resources[] = {
345 .resource = bfin_uart0_resources,
352 static struct resource bfin_uart1_resources[] = {
393 .resource = bfin_uart1_resources,
403 static struct resource bfin_sir0_resources[] = {
424 .resource = bfin_sir0_resources,
428 static struct resource bfin_sir1_resources[] = {
449 .resource = bfin_sir1_resources,
457 static struct resource bfin_twi0_resource[] = {
474 .resource = bfin_twi0_resource,
483 static struct resource bfin_sport0_uart_resources[] = {
510 .resource = bfin_sport0_uart_resources,
517 static struct resource bfin_sport1_uart_resources[] = {
544 .resource = bfin_sport1_uart_resources,
592 static struct resource bfin_pata_resources[] = {
614 .resource = bfin_pata_resources,
/linux-4.1.27/arch/arm/mach-sa1100/
H A Dgeneric.c115 static struct resource sa11x0udc_resources[] = {
130 .resource = sa11x0udc_resources,
133 static struct resource sa11x0uart1_resources[] = {
142 .resource = sa11x0uart1_resources,
145 static struct resource sa11x0uart3_resources[] = {
154 .resource = sa11x0uart3_resources,
157 static struct resource sa11x0mcp_resources[] = {
173 .resource = sa11x0mcp_resources,
191 static struct resource sa11x0ssp_resources[] = {
206 .resource = sa11x0ssp_resources,
209 static struct resource sa11x0fb_resources[] = {
221 .resource = sa11x0fb_resources,
240 struct resource *res, int nr) sa11x0_register_mtd()
243 sa11x0mtd_device.resource = res; sa11x0_register_mtd()
248 static struct resource sa11x0ir_resources[] = {
259 .resource = sa11x0ir_resources,
267 static struct resource sa1100_rtc_resources[] = {
277 .resource = sa1100_rtc_resources,
280 static struct resource sa11x0dma_resources[] = {
300 .resource = sa11x0dma_resources,
/linux-4.1.27/drivers/sh/superhyway/
H A Dsuperhyway-sysfs.c33 superhyway_ro_attr(resource, "0x%08lx\n", resource[0].start);
42 __ATTR_RO(resource),
H A Dsuperhyway.c32 kfree(sdev->resource); superhyway_device_release()
68 if (!dev->resource) { superhyway_add_device()
69 dev->resource = kmalloc(sizeof(struct resource), GFP_KERNEL); superhyway_add_device()
70 if (!dev->resource) { superhyway_add_device()
75 dev->resource->name = dev->name; superhyway_add_device()
76 dev->resource->start = base; superhyway_add_device()
77 dev->resource->end = dev->resource->start + 0x01000000; superhyway_add_device()
101 ret |= superhyway_add_device(dev->resource[0].start, dev, bus); superhyway_add_devices()
/linux-4.1.27/arch/x86/kernel/
H A Dresource.c4 static void resource_clip(struct resource *res, resource_size_t start, resource_clip()
25 static void remove_e820_regions(struct resource *avail) remove_e820_regions()
38 void arch_remove_reservations(struct resource *avail) arch_remove_reservations()
H A Dpmem.c11 static __init void register_pmem_device(struct resource *res) register_pmem_device()
42 struct resource res = { register_pmem_devices()
H A Dprobe_roms.c24 static struct resource system_rom_resource = {
31 static struct resource extension_rom_resource = {
38 static struct resource adapter_rom_resources[] = { {
70 static struct resource video_rom_resource = {
113 static struct resource *find_oprom(struct pci_dev *pdev) find_oprom()
115 struct resource *oprom = NULL; find_oprom()
119 struct resource *res = &adapter_rom_resources[i]; find_oprom()
155 struct resource *oprom = find_oprom(pdev); pci_map_biosrom()
172 struct resource *oprom = find_oprom(pdev); pci_biosrom_size()
/linux-4.1.27/drivers/platform/goldfish/
H A Dpdev_bus.c44 struct resource resources[0];
121 sizeof(struct resource) * resource_count + goldfish_new_pdev()
127 dev->pdev.resource = (struct resource *)(dev + 1); goldfish_new_pdev()
128 dev->pdev.name = name = (char *)(dev->pdev.resource + resource_count); goldfish_new_pdev()
139 dev->pdev.resource[0].start = base; goldfish_new_pdev()
140 dev->pdev.resource[0].end = base + goldfish_new_pdev()
142 dev->pdev.resource[0].flags = IORESOURCE_MEM; goldfish_new_pdev()
145 dev->pdev.resource[1].start = irq; goldfish_new_pdev()
146 dev->pdev.resource[1].end = irq + irq_count - 1; goldfish_new_pdev()
147 dev->pdev.resource[1].flags = IORESOURCE_IRQ; goldfish_new_pdev()
182 struct resource *r; goldfish_pdev_bus_probe()
/linux-4.1.27/arch/arm/mach-shmobile/
H A Dsetup-r8a7740.c75 static const struct resource pfc_resources[] = {
90 static struct resource irqpin0_resources[] = {
109 .resource = irqpin0_resources,
120 static struct resource irqpin1_resources[] = {
139 .resource = irqpin1_resources,
150 static struct resource irqpin2_resources[] = {
169 .resource = irqpin2_resources,
180 static struct resource irqpin3_resources[] = {
199 .resource = irqpin3_resources,
214 static struct resource scif##index##_resources[] = { \
222 .resource = scif##index##_resources, \
244 static struct resource cmt1_resources[] = {
255 .resource = cmt1_resources,
264 static struct resource tmu0_resources[] = {
277 .resource = tmu0_resources,
282 static struct resource ipmmu_resources[] = {
308 .resource = ipmmu_resources,
424 static struct resource r8a7740_dmae0_resources[] = {
452 static struct resource r8a7740_dmae1_resources[] = {
480 static struct resource r8a7740_dmae2_resources[] = {
510 .resource = r8a7740_dmae0_resources,
520 .resource = r8a7740_dmae1_resources,
530 .resource = r8a7740_dmae2_resources,
576 static struct resource r8a7740_usb_dma_resources[] = {
600 .resource = r8a7740_usb_dma_resources,
608 static struct resource i2c0_resources[] = {
622 static struct resource i2c1_resources[] = {
639 .resource = i2c0_resources,
646 .resource = i2c1_resources,
650 static struct resource pmu_resources[] = {
662 .resource = pmu_resources,
705 struct resource *res; r8a7740_i2c_workaround()
710 pr_err("r8a7740 i2c workaround fail (cannot find resource)\n"); r8a7740_i2c_workaround()
H A Dsetup-sh73a0.c64 static struct resource pfc_resources[] __initdata = {
83 static struct resource scif##index##_resources[] = { \
91 .resource = scif##index##_resources, \
112 static struct resource cmt1_resources[] = {
123 .resource = cmt1_resources,
132 static struct resource tmu0_resources[] = {
145 .resource = tmu0_resources,
149 static struct resource i2c0_resources[] = {
158 static struct resource i2c1_resources[] = {
167 static struct resource i2c2_resources[] = {
176 static struct resource i2c3_resources[] = {
185 static struct resource i2c4_resources[] = {
201 .resource = i2c0_resources,
211 .resource = i2c1_resources,
221 .resource = i2c2_resources,
231 .resource = i2c3_resources,
241 .resource = i2c4_resources,
425 static struct resource sh73a0_dmae_resources[] = {
444 .resource = sh73a0_dmae_resources,
524 static struct resource sh73a0_mpdma_resources[] = {
546 .resource = sh73a0_mpdma_resources,
553 static struct resource pmu_resources[] = {
570 .resource = pmu_resources,
574 static struct resource ipmmu_resources[] = {
593 .resource = ipmmu_resources,
602 static struct resource irqpin0_resources[] = {
621 .resource = irqpin0_resources,
633 static struct resource irqpin1_resources[] = {
652 .resource = irqpin1_resources,
664 static struct resource irqpin2_resources[] = {
683 .resource = irqpin2_resources,
695 static struct resource irqpin3_resources[] = {
714 .resource = irqpin3_resources,
H A Dsetup-r8a7779.c88 static struct resource irqpin0_resources[] __initdata = {
131 static struct resource r8a7779_pfc_resources[] = {
138 .resource = r8a7779_pfc_resources,
143 static struct resource r8a7779_gpio##idx##_resources[] = { \
158 .resource = r8a7779_gpio##idx##_resources, \
198 static struct resource scif##index##_resources[] = { \
206 .resource = scif##index##_resources, \
225 static struct resource tmu0_resources[] = {
238 .resource = tmu0_resources,
243 static struct resource rcar_i2c0_res[] = {
257 .resource = rcar_i2c0_res,
261 static struct resource rcar_i2c1_res[] = {
275 .resource = rcar_i2c1_res,
279 static struct resource rcar_i2c2_res[] = {
293 .resource = rcar_i2c2_res,
297 static struct resource rcar_i2c3_res[] = {
311 .resource = rcar_i2c3_res,
315 static struct resource sata_resources[] = {
331 .resource = sata_resources,
387 static struct resource ehci0_resources[] = {
408 .resource = ehci0_resources,
411 static struct resource ehci1_resources[] = {
432 .resource = ehci1_resources,
441 static struct resource ohci0_resources[] = {
462 .resource = ohci0_resources,
465 static struct resource ohci1_resources[] = {
486 .resource = ohci1_resources,
619 static struct resource hpb_dmae_resources[] __initdata = {
/linux-4.1.27/drivers/staging/lustre/lustre/ldlm/
H A Dl_lock.c44 * Lock a lock and its resource.
46 * LDLM locking uses resource to serialize access to locks
47 * but there is a case when we change resource of lock upon
53 /* on server-side resource of lock doesn't change */ lock_res_and_lock()
65 * Unlock a lock and its resource previously locked with lock_res_and_lock
69 /* on server-side resource of lock doesn't change */ unlock_res_and_lock()
/linux-4.1.27/arch/sh/boards/
H A Dboard-sh2007.c32 static struct resource smsc9118_0_resources[] = {
45 static struct resource smsc9118_1_resources[] = {
62 .resource = smsc9118_0_resources,
72 .resource = smsc9118_1_resources,
78 static struct resource cf_resources[] = {
100 .resource = cf_resources,
H A Dboard-edosk7760.c72 static struct resource edosk7760_nor_flash_resources[] = {
83 .resource = edosk7760_nor_flash_resources,
95 static struct resource sh7760_i2c1_res[] = {
114 .resource = sh7760_i2c1_res,
118 static struct resource sh7760_i2c0_res[] = {
136 .resource = sh7760_i2c0_res,
145 static struct resource smc91x_res[] = {
162 .resource = smc91x_res,
H A Dboard-espt.c45 static struct resource espt_nor_flash_resources[] = {
56 .resource = espt_nor_flash_resources,
64 static struct resource sh_eth_resources[] = {
88 .resource = sh_eth_resources,
H A Dboard-polaris.c4 * Polaris-specific resource declaration
33 static struct resource smsc911x_resources[] = {
59 .resource = smsc911x_resources,
72 static struct resource heartbeat_resource = {
85 .resource = &heartbeat_resource,
/linux-4.1.27/arch/sh/boards/mach-landisk/
H A Dpsw.c50 static struct resource psw_power_resources[] = {
57 static struct resource psw_usl5p_resources[] = {
96 .resource = psw_power_resources,
106 .resource = psw_usl5p_resources,
116 .resource = psw_usl5p_resources,
126 .resource = psw_usl5p_resources,
/linux-4.1.27/arch/sh/boards/mach-se/7343/
H A Dsetup.c15 static struct resource heartbeat_resource = {
25 .resource = &heartbeat_resource,
52 static struct resource nor_flash_resources[] = {
66 .resource = nor_flash_resources,
102 static struct resource usb_resources[] = {
132 .resource = usb_resources,
/linux-4.1.27/arch/sh/drivers/pci/
H A Dfixups-dreamcast.c34 struct resource res; gapspci_fixup_resources()
44 dev->resource[1].start = p->resources[0].start + 0x100; gapspci_fixup_resources()
45 dev->resource[1].end = dev->resource[1].start + 0x200 - 1; gapspci_fixup_resources()
51 dev->resource[1].flags |= IORESOURCE_PCI_FIXED; gapspci_fixup_resources()
74 printk("PCI: Failed resource fixup\n"); gapspci_fixup_resources()
/linux-4.1.27/arch/blackfin/mach-bf561/boards/
H A Dtepla.c22 static struct resource smc91x_resources[] = {
42 .resource = smc91x_resources,
47 static struct resource bfin_uart0_resources[] = {
88 .resource = bfin_uart0_resources,
98 static struct resource bfin_sir0_resources[] = {
120 .resource = bfin_sir0_resources,
H A Dcm_bf561.c101 static struct resource bfin_spi0_resource[] = {
130 .resource = bfin_spi0_resource,
154 static struct resource smc91x_resources[] = {
170 .resource = smc91x_resources,
180 static struct resource smsc911x_resources[] = {
205 .resource = smsc911x_resources,
213 static struct resource net2272_bfin_resources[] = {
229 .resource = net2272_bfin_resources,
234 static struct resource isp1362_hcd_resources[] = {
268 .resource = isp1362_hcd_resources,
274 static struct resource bfin_uart0_resources[] = {
315 .resource = bfin_uart0_resources,
325 static struct resource bfin_sir0_resources[] = {
347 .resource = bfin_sir0_resources,
359 static struct resource bfin_pata_resources[] = {
381 .resource = bfin_pata_resources,
411 static struct resource para_flash_resource = {
424 .resource = &para_flash_resource,
H A Dacvilon.c66 static struct resource bfin_isp1760_resources[] = {
96 .resource = bfin_isp1760_resources,
100 static struct resource bfin_i2c_pca_resources[] = {
125 .resource = bfin_i2c_pca_resources,
147 static struct resource mtd_ram_resource = {
160 .resource = &mtd_ram_resource,
166 static struct resource smsc911x_resources[] = {
191 .resource = smsc911x_resources,
200 static struct resource bfin_uart0_resources[] = {
241 .resource = bfin_uart0_resources,
301 static struct resource bfin_plat_nand_resources = {
311 .resource = &bfin_plat_nand_resources,
375 static struct resource bfin_spi0_resource[] = {
404 .resource = bfin_spi0_resource,
433 static struct resource bfin_gpios_resources = {
444 .resource = &bfin_gpios_resources,
/linux-4.1.27/arch/ia64/kernel/
H A Dacpi-ext.c22 * the producer/consumer flag, so HP invented a vendor-defined resource to
36 struct acpi_resource *resource; hp_ccsr_locate() local
42 resource = buffer.pointer; hp_ccsr_locate()
43 vendor = &resource->data.vendor_typed; hp_ccsr_locate()
63 static acpi_status find_csr_space(struct acpi_resource *resource, void *data) find_csr_space() argument
69 status = acpi_resource_to_address64(resource, &addr); find_csr_space()
/linux-4.1.27/arch/m68k/amiga/
H A Dchipram.c7 ** Rewritten 15/9/2000 by Geert to use resource management
26 static struct resource chipram_res = {
46 struct resource *res; amiga_chip_alloc()
49 res = kzalloc(sizeof(struct resource), GFP_KERNEL); amiga_chip_alloc()
72 void *amiga_chip_alloc_res(unsigned long size, struct resource *res) amiga_chip_alloc_res()
96 struct resource *res; amiga_chip_free()
/linux-4.1.27/arch/x86/video/
H A Dfbdev.c19 struct resource *res = NULL; fb_is_primary_device()
34 res = &pci_dev->resource[PCI_ROM_RESOURCE]; fb_is_primary_device()
/linux-4.1.27/arch/mips/cobalt/
H A Dpci.c19 static struct resource cobalt_mem_resource = {
26 static struct resource cobalt_io_resource = {
/linux-4.1.27/arch/mips/dec/
H A Dplatform.c17 static struct resource dec_rtc_resources[] = {
33 .resource = dec_rtc_resources,
/linux-4.1.27/arch/mips/emma/markeins/
H A Dplatform.c41 static struct resource i2c_emma_resources_0[] = {
55 struct resource i2c_emma_resources_1[] = {
69 struct resource i2c_emma_resources_2[] = {
87 .resource = i2c_emma_resources_0,
93 .resource = i2c_emma_resources_1,
99 .resource = i2c_emma_resources_2,
183 static struct resource markeins_flash_resource = {
196 .resource = &markeins_flash_resource,
/linux-4.1.27/arch/sh/boards/mach-se/770x/
H A Dsetup.c67 static struct resource cf_ide_resources[] = {
88 .resource = cf_ide_resources,
98 static struct resource heartbeat_resource = {
111 .resource = &heartbeat_resource,
117 static struct resource sh_eth0_resources[] = {
137 .resource = sh_eth0_resources,
140 static struct resource sh_eth1_resources[] = {
160 .resource = sh_eth1_resources,
/linux-4.1.27/arch/sh/boards/mach-se/7722/
H A Dsetup.c31 static struct resource heartbeat_resource = {
41 .resource = &heartbeat_resource,
49 static struct resource smc91x_eth_resources[] = {
71 .resource = smc91x_eth_resources,
74 static struct resource cf_ide_resources[] = {
95 .resource = cf_ide_resources,
113 static struct resource sh_keysc_resources[] = {
129 .resource = sh_keysc_resources,
/linux-4.1.27/arch/sh/boards/mach-se/7751/
H A Dsetup.c25 static struct resource heartbeat_resources[] = {
40 .resource = heartbeat_resources,
/linux-4.1.27/arch/sh/kernel/cpu/sh3/
H A Dsetup-sh7705.c81 static struct resource scif0_resources[] = {
89 .resource = scif0_resources,
104 static struct resource scif1_resources[] = {
112 .resource = scif1_resources,
119 static struct resource rtc_resources[] = {
139 .resource = rtc_resources,
149 static struct resource tmu0_resources[] = {
162 .resource = tmu0_resources,
H A Dsetup-sh770x.c92 static struct resource rtc_resources[] = {
108 .resource = rtc_resources,
120 static struct resource scif0_resources[] = {
128 .resource = scif0_resources,
145 static struct resource scif1_resources[] = {
153 .resource = scif1_resources,
171 static struct resource scif2_resources[] = {
179 .resource = scif2_resources,
191 static struct resource tmu0_resources[] = {
204 .resource = tmu0_resources,
H A Dsetup-sh7720.c27 static struct resource rtc_resources[] = {
48 .resource = rtc_resources,
62 static struct resource scif0_resources[] = {
70 .resource = scif0_resources,
85 static struct resource scif1_resources[] = {
93 .resource = scif1_resources,
100 static struct resource usb_ohci_resources[] = {
126 .resource = usb_ohci_resources,
129 static struct resource usbf_resources[] = {
152 .resource = usbf_resources,
159 static struct resource cmt_resources[] = {
170 .resource = cmt_resources,
178 static struct resource tmu0_resources[] = {
191 .resource = tmu0_resources,
/linux-4.1.27/arch/mips/loongson/common/
H A Drtc.c17 static struct resource loongson_rtc_resources[] = {
32 .resource = loongson_rtc_resources,
/linux-4.1.27/arch/mips/sni/
H A Da20r.c43 static struct resource a20r_ds1216_rsrc[] = {
54 .resource = a20r_ds1216_rsrc
57 static struct resource snirm_82596_rsrc[] = {
86 .resource = snirm_82596_rsrc
89 static struct resource snirm_53c710_rsrc[] = {
105 .resource = snirm_53c710_rsrc
108 static struct resource sc26xx_rsrc[] = {
139 .resource = sc26xx_rsrc,
/linux-4.1.27/arch/parisc/include/asm/
H A Deisa_bus.h19 struct resource *io_parent,
20 struct resource *mem_parent);
/linux-4.1.27/arch/blackfin/mach-bf527/boards/
H A Dcm_bf527.c42 static struct resource bfin_isp1760_resources[] = {
71 .resource = bfin_isp1760_resources,
76 static struct resource musb_resources[] = {
133 .resource = musb_resources,
159 static struct resource bf5xx_nand_resources[] = {
176 .resource = bf5xx_nand_resources,
184 static struct resource bfin_pcmcia_cf_resources[] = {
208 .resource = bfin_pcmcia_cf_resources,
228 static struct resource smc91x_resources[] = {
245 .resource = smc91x_resources,
253 static struct resource dm9000_resources[] = {
275 .resource = dm9000_resources,
313 static struct resource net2272_bfin_resources[] = {
329 .resource = net2272_bfin_resources,
453 static struct resource bfin_spi0_resource[] = {
475 .resource = bfin_spi0_resource,
507 static struct resource cm_flash_resource[] = {
527 .resource = cm_flash_resource,
533 static struct resource bfin_uart0_resources[] = {
574 .resource = bfin_uart0_resources,
581 static struct resource bfin_uart1_resources[] = {
634 .resource = bfin_uart1_resources,
644 static struct resource bfin_sir0_resources[] = {
666 .resource = bfin_sir0_resources,
670 static struct resource bfin_sir1_resources[] = {
692 .resource = bfin_sir1_resources,
700 static struct resource bfin_twi0_resource[] = {
717 .resource = bfin_twi0_resource,
745 static struct resource bfin_sport0_uart_resources[] = {
772 .resource = bfin_sport0_uart_resources,
779 static struct resource bfin_sport1_uart_resources[] = {
806 .resource = bfin_sport1_uart_resources,
H A Dezkit.c47 static struct resource bfin_isp1760_resources[] = {
76 .resource = bfin_isp1760_resources,
81 static struct resource musb_resources[] = {
138 .resource = musb_resources,
144 static struct resource bf52x_t350mcqb_resources[] = {
156 .resource = bf52x_t350mcqb_resources,
168 static struct resource bfin_lq035q1_resources[] = {
180 .resource = bfin_lq035q1_resources,
210 static struct resource ezkit_flash_resource = {
223 .resource = &ezkit_flash_resource,
253 static struct resource bf5xx_nand_resources[] = {
270 .resource = bf5xx_nand_resources,
278 static struct resource bfin_pcmcia_cf_resources[] = {
302 .resource = bfin_pcmcia_cf_resources,
322 static struct resource smc91x_resources[] = {
339 .resource = smc91x_resources,
347 static struct resource dm9000_resources[] = {
369 .resource = dm9000_resources,
407 static struct resource net2272_bfin_resources[] = {
426 .resource = net2272_bfin_resources,
537 static struct resource bfin_snd_resources[][4] = {
562 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
667 static struct resource bfin_spi0_resource[] = {
689 .resource = bfin_spi0_resource,
698 static struct resource bfin_uart0_resources[] = {
739 .resource = bfin_uart0_resources,
746 static struct resource bfin_uart1_resources[] = {
799 .resource = bfin_uart1_resources,
809 static struct resource bfin_sir0_resources[] = {
831 .resource = bfin_sir0_resources,
835 static struct resource bfin_sir1_resources[] = {
857 .resource = bfin_sir1_resources,
865 static struct resource bfin_twi0_resource[] = {
882 .resource = bfin_twi0_resource,
1004 static struct resource bfin_sport0_uart_resources[] = {
1031 .resource = bfin_sport0_uart_resources,
1038 static struct resource bfin_sport1_uart_resources[] = {
1065 .resource = bfin_sport1_uart_resources,
1115 static struct resource bfin_rotary_resources[] = {
1132 .resource = bfin_rotary_resources,
H A Dad7160eval.c41 static struct resource musb_resources[] = {
96 .resource = musb_resources,
101 static struct resource bf52x_ra158z_resources[] = {
113 .resource = bf52x_ra158z_resources,
140 static struct resource ad7160eval_flash_resource = {
153 .resource = &ad7160eval_flash_resource,
179 static struct resource bf5xx_nand_resources[] = {
196 .resource = bf5xx_nand_resources,
335 static struct resource bfin_spi0_resource[] = {
357 .resource = bfin_spi0_resource,
366 static struct resource bfin_uart0_resources[] = {
407 .resource = bfin_uart0_resources,
414 static struct resource bfin_uart1_resources[] = {
467 .resource = bfin_uart1_resources,
477 static struct resource bfin_sir0_resources[] = {
499 .resource = bfin_sir0_resources,
503 static struct resource bfin_sir1_resources[] = {
525 .resource = bfin_sir1_resources,
563 static struct resource bfin_twi0_resource[] = {
580 .resource = bfin_twi0_resource,
599 static struct resource bfin_sport0_uart_resources[] = {
626 .resource = bfin_sport0_uart_resources,
633 static struct resource bfin_sport1_uart_resources[] = {
660 .resource = bfin_sport1_uart_resources,
689 static struct resource bfin_rotary_resources[] = {
706 .resource = bfin_rotary_resources,
/linux-4.1.27/arch/m68k/coldfire/
H A Dmcf8390.c14 #include <linux/resource.h>
18 static struct resource mcf8390_resources[] = {
/linux-4.1.27/arch/arm/mach-rpc/
H A Driscpc.c102 static struct resource acornfb_resources[] = {
115 .resource = acornfb_resources,
118 static struct resource iomd_resources[] = {
126 .resource = iomd_resources,
129 static struct resource iomd_kart_resources[] = {
141 .resource = iomd_kart_resources,
168 static struct resource pata_resources[] = {
178 .resource = pata_resources,
/linux-4.1.27/arch/arm/plat-iop/
H A Dpmu.c14 static struct resource pmu_resource = {
29 .resource = &pmu_resource,
H A Di2c.c40 static struct resource iop3xx_i2c0_resources[] = {
57 .resource = iop3xx_i2c0_resources,
61 static struct resource iop3xx_i2c1_resources[] = {
78 .resource = iop3xx_i2c1_resources,
/linux-4.1.27/arch/arm/mach-ixp4xx/
H A Dvulcan-setup.c28 static struct resource vulcan_flash_resource = {
38 .resource = &vulcan_flash_resource,
47 static struct resource vulcan_sram_resource = {
57 .resource = &vulcan_sram_resource,
61 static struct resource vulcan_uart_resources[] = {
119 .resource = vulcan_uart_resources,
153 static struct resource vulcan_max6369_resource = {
160 .resource = &vulcan_max6369_resource,
H A Dgateway7001-setup.c35 static struct resource gateway7001_flash_resource = {
46 .resource = &gateway7001_flash_resource,
49 static struct resource gateway7001_uart_resource = {
75 .resource = &gateway7001_uart_resource,
H A Dwg302v2-setup.c36 static struct resource wg302v2_flash_resource = {
47 .resource = &wg302v2_flash_resource,
50 static struct resource wg302v2_uart_resource = {
76 .resource = &wg302v2_uart_resource,
/linux-4.1.27/arch/arm/mach-netx/
H A Dnxdb500.c108 .resource = NULL,
122 .resource = NULL,
128 static struct resource netx_uart0_resources[] = {
145 .resource = netx_uart0_resources,
148 static struct resource netx_uart1_resources[] = {
165 .resource = netx_uart1_resources,
168 static struct resource netx_uart2_resources[] = {
185 .resource = netx_uart2_resources,
/linux-4.1.27/arch/alpha/include/uapi/asm/
H A Dresource.h5 * Alpha/Linux-specific ordering of these four resource limit IDs,
20 #include <asm-generic/resource.h>
/linux-4.1.27/arch/blackfin/mach-bf609/boards/
H A Dezkit.c44 static struct resource bfin_isp1760_resources[] = {
73 .resource = bfin_isp1760_resources,
89 static struct resource bfin_rotary_resources[] = {
106 .resource = bfin_rotary_resources,
147 .resource = (struct resource[]) {
215 static struct resource bfin_uart0_resources[] = {
284 .resource = bfin_uart0_resources,
291 static struct resource bfin_uart1_resources[] = {
355 .resource = bfin_uart1_resources,
365 static struct resource bfin_sir0_resources[] = {
386 .resource = bfin_sir0_resources,
390 static struct resource bfin_sir1_resources[] = {
411 .resource = bfin_sir1_resources,
417 static struct resource musb_resources[] = {
468 .resource = musb_resources,
474 static struct resource bfin_sport0_uart_resources[] = {
501 .resource = bfin_sport0_uart_resources,
508 static struct resource bfin_sport1_uart_resources[] = {
535 .resource = bfin_sport1_uart_resources,
542 static struct resource bfin_sport2_uart_resources[] = {
569 .resource = bfin_sport2_uart_resources,
583 static struct resource bfin_can0_resources[] = {
610 .resource = bfin_can0_resources,
644 static struct resource bfin_nand_resources[] = {
661 .resource = bfin_nand_resources,
729 static struct resource ezkit_flash_resource = {
742 .resource = &ezkit_flash_resource,
792 static struct resource bfin_snd_resources[] = {
837 .resource = bfin_snd_resources,
1212 static struct resource nl8048_resources[] = {
1232 .resource = nl8048_resources,
1242 static struct resource bfin_crc0_resources[] = {
1269 .resource = bfin_crc0_resources,
1272 static struct resource bfin_crc1_resources[] = {
1299 .resource = bfin_crc1_resources,
1307 static struct resource bfin_crypto_crc_resources[] = {
1329 .resource = bfin_crypto_crc_resources,
1363 static struct resource bfin_pint0_resources[] = {
1380 .resource = bfin_pint0_resources,
1383 static struct resource bfin_pint1_resources[] = {
1400 .resource = bfin_pint1_resources,
1403 static struct resource bfin_pint2_resources[] = {
1420 .resource = bfin_pint2_resources,
1423 static struct resource bfin_pint3_resources[] = {
1440 .resource = bfin_pint3_resources,
1443 static struct resource bfin_pint4_resources[] = {
1460 .resource = bfin_pint4_resources,
1463 static struct resource bfin_pint5_resources[] = {
1480 .resource = bfin_pint5_resources,
1483 static struct resource bfin_gpa_resources[] = {
1508 .resource = bfin_gpa_resources,
1514 static struct resource bfin_gpb_resources[] = {
1539 .resource = bfin_gpb_resources,
1545 static struct resource bfin_gpc_resources[] = {
1570 .resource = bfin_gpc_resources,
1576 static struct resource bfin_gpd_resources[] = {
1601 .resource = bfin_gpd_resources,
1607 static struct resource bfin_gpe_resources[] = {
1632 .resource = bfin_gpe_resources,
1638 static struct resource bfin_gpf_resources[] = {
1663 .resource = bfin_gpf_resources,
1669 static struct resource bfin_gpg_resources[] = {
1694 .resource = bfin_gpg_resources,
1770 static struct resource bfin_spi0_resource[] = {
1789 static struct resource bfin_spi1_resource[] = {
1818 .resource = bfin_spi0_resource,
1833 .resource = bfin_spi1_resource,
1843 static struct resource bfin_twi0_resource[] = {
1860 .resource = bfin_twi0_resource,
1868 static struct resource bfin_twi1_resource[] = {
1885 .resource = bfin_twi1_resource,
/linux-4.1.27/arch/sh/boards/mach-r2d/
H A Dsetup.c29 static struct resource cf_ide_resources[] = {
56 .resource = cf_ide_resources,
81 static struct resource spi_sh_sci_resources[] = {
93 .resource = spi_sh_sci_resources,
99 static struct resource heartbeat_resources[] = {
111 .resource = heartbeat_resources,
114 static struct resource sm501_resources[] = {
184 .resource = sm501_resources,
215 static struct resource flash_resource = {
224 .resource = &flash_resource,
243 .resource = cf_ide_resources,
/linux-4.1.27/arch/mips/pnx833x/common/
H A Dplatform.c30 #include <linux/resource.h>
42 static struct resource pnx833x_uart_resources[] = {
103 .resource = pnx833x_uart_resources,
108 static struct resource pnx833x_usb_ehci_resources[] = {
129 .resource = pnx833x_usb_ehci_resources,
134 static struct resource pnx833x_ethernet_resources[] = {
157 .resource = pnx833x_ethernet_resources,
160 static struct resource pnx833x_sata_resources[] = {
177 .resource = pnx833x_sata_resources,
209 static struct resource pnx833x_flash_nand_resource = {
219 .resource = &pnx833x_flash_nand_resource,
/linux-4.1.27/arch/mn10300/unit-asb2305/
H A Dpci-asb2305.c1 /* ASB2305 PCI resource stuff
34 resource_size_t pcibios_align_resource(void *data, const struct resource *res, pcibios_align_resource()
61 * just allocate all the resource regions and do nothing more. It isn't.
73 * shared between expansion ROMs and other resource regions, it's
80 * a collision, just mark the resource as unallocated. Also
96 struct resource *r; pcibios_allocate_bus_resources()
105 r = &dev->resource[idx]; list_for_each_entry()
111 " Cannot allocate resource" list_for_each_entry()
115 * Invalidate the resource to prevent list_for_each_entry()
116 * child resource allocations in this list_for_each_entry()
132 struct resource *r; pcibios_allocate_resources()
137 r = &dev->resource[idx]; for_each_pci_dev()
153 " Cannot allocate resource" for_each_pci_dev()
163 r = &dev->resource[PCI_ROM_RESOURCE]; for_each_pci_dev()
165 /* Turn the ROM off, leave the resource region, for_each_pci_dev()
184 struct resource *r; pcibios_assign_resources()
191 r = &dev->resource[PCI_ROM_RESOURCE]; for_each_pci_dev()
/linux-4.1.27/arch/ia64/sn/kernel/
H A Dio_init.c128 sn_legacy_pci_window_fixup(struct resource *res, sn_legacy_pci_window_fixup()
145 * and need to convert the pci_dev->resource
183 start = dev->resource[idx].start; sn_io_slot_fixup()
184 end = dev->resource[idx].end; sn_io_slot_fixup()
191 dev->resource[idx].start = addr; sn_io_slot_fixup()
192 dev->resource[idx].end = addr + size; sn_io_slot_fixup()
198 if (dev->resource[idx].parent && dev->resource[idx].parent->child) sn_io_slot_fixup()
199 release_resource(&dev->resource[idx]); sn_io_slot_fixup()
201 if (dev->resource[idx].flags & IORESOURCE_IO) sn_io_slot_fixup()
202 insert_resource(&ioport_resource, &dev->resource[idx]); sn_io_slot_fixup()
204 insert_resource(&iomem_resource, &dev->resource[idx]); sn_io_slot_fixup()
216 dev->resource[PCI_ROM_RESOURCE].end = sn_io_slot_fixup()
217 dev->resource[PCI_ROM_RESOURCE].start + sn_io_slot_fixup()
219 dev->resource[PCI_ROM_RESOURCE].flags |= sn_io_slot_fixup()
239 struct resource *res; sn_pci_controller_fixup()
252 res = kcalloc(2, sizeof(struct resource), GFP_KERNEL); sn_pci_controller_fixup()
/linux-4.1.27/arch/ia64/pci/
H A Dpci.c136 struct resource *res;
175 struct resource *resource; add_io_space() local
213 resource = &iospace->res; add_io_space()
214 resource->name = name; add_io_space()
215 resource->flags = IORESOURCE_MEM; add_io_space()
216 resource->start = base + (sparse ? IO_SPACE_SPARSE_ENCODING(min) : min); add_io_space()
217 resource->end = base + (sparse ? IO_SPACE_SPARSE_ENCODING(max) : max); add_io_space()
218 if (insert_resource(&iomem_resource, resource)) { add_io_space()
220 "can't allocate host bridge io space resource %pR\n", add_io_space()
221 resource); add_io_space()
234 static acpi_status resource_to_window(struct acpi_resource *resource, resource_to_window() argument
244 status = acpi_resource_to_address64(resource, addr); resource_to_window()
254 static acpi_status count_window(struct acpi_resource *resource, void *data) count_window() argument
260 status = resource_to_window(resource, &addr); count_window()
270 struct resource *resource; add_window() local
274 struct resource *root; add_window()
294 resource = &info->res[info->res_num]; add_window()
295 resource->name = info->name; add_window()
296 resource->flags = flags; add_window()
297 resource->start = addr.address.minimum + offset; add_window()
298 resource->end = resource->start + addr.address.address_length - 1; add_window()
301 if (insert_resource(root, resource)) { add_window()
304 resource); add_window()
309 resource, add_window()
310 resource->start - offset, add_window()
311 resource->end - offset); add_window()
314 "host bridge window %pR\n", resource); add_window()
318 if (!((resource->flags & IORESOURCE_MEM) && add_window()
319 (resource->end - resource->start < 16))) add_window()
320 pci_add_resource_offset(&info->resources, resource, add_window()
347 struct resource *res; __release_pci_root_info()
457 /* insert busn resource at first */ pci_acpi_scan_root()
502 struct resource *r = &dev->resource[idx]; pcibios_fixup_device_resources()
520 struct resource *r = &dev->resource[idx]; pcibios_fixup_bridge_resources()
583 pcibios_align_resource (void *data, const struct resource *res, pcibios_align_resource()
/linux-4.1.27/drivers/mtd/devices/
H A Dms02-nv.c112 struct resource *mod_res; ms02nv_init_one()
113 struct resource *diag_res; ms02nv_init_one()
114 struct resource *user_res; ms02nv_init_one()
115 struct resource *csr_res; ms02nv_init_one()
153 mp->resource.module = mod_res; ms02nv_init_one()
166 mp->resource.diag_ram = diag_res; ms02nv_init_one()
179 mp->resource.user_ram = user_res; ms02nv_init_one()
192 mp->resource.csr = csr_res; ms02nv_init_one()
259 release_resource(mp->resource.csr); ms02nv_remove_one()
260 kfree(mp->resource.csr); ms02nv_remove_one()
261 release_resource(mp->resource.user_ram); ms02nv_remove_one()
262 kfree(mp->resource.user_ram); ms02nv_remove_one()
263 release_resource(mp->resource.diag_ram); ms02nv_remove_one()
264 kfree(mp->resource.diag_ram); ms02nv_remove_one()
265 release_resource(mp->resource.module); ms02nv_remove_one()
266 kfree(mp->resource.module); ms02nv_remove_one()
/linux-4.1.27/arch/sh/boards/mach-sdk7780/
H A Dsetup.c24 static struct resource heartbeat_resource = {
34 .resource = &heartbeat_resource,
38 static struct resource smc91x_eth_resources[] = {
60 .resource = smc91x_eth_resources,
/linux-4.1.27/arch/sh/boards/mach-se/7721/
H A Dsetup.c28 static struct resource heartbeat_resource = {
41 .resource = &heartbeat_resource,
44 static struct resource cf_ide_resources[] = {
65 .resource = cf_ide_resources,
/linux-4.1.27/arch/sh/boards/mach-se/7780/
H A Dsetup.c20 static struct resource heartbeat_resource = {
30 .resource = &heartbeat_resource,
34 static struct resource smc91x_eth_resources[] = {
56 .resource = smc91x_eth_resources,
/linux-4.1.27/arch/sh/boards/mach-sh03/
H A Dsetup.c32 static struct resource cf_ide_resources[] = {
53 .resource = cf_ide_resources,
56 static struct resource heartbeat_resources[] = {
68 .resource = heartbeat_resources,
/linux-4.1.27/arch/sh/include/asm/
H A Ddevice.h12 /* allocate contiguous memory chunk and fill in struct resource */
/linux-4.1.27/arch/mn10300/unit-asb2303/
H A Dflash.c53 static struct resource asb2303_bootprom_resource = {
64 .resource = &asb2303_bootprom_resource,
76 static struct resource asb2303_sysflash_resource = {
87 .resource = &asb2303_sysflash_resource,
/linux-4.1.27/arch/frv/mb93090-mb00/
H A Dflash.c43 static struct resource mb93090_bootrom_resource = {
54 .resource = &mb93090_bootrom_resource,
66 static struct resource mb93090_userrom_resource = {
77 .resource = &mb93090_userrom_resource,
H A Dpci-frv.c36 pcibios_align_resource(void *data, const struct resource *res, pcibios_align_resource()
50 * just allocate all the resource regions and do nothing more. It isn't.
62 * shared between expansion ROMs and other resource regions, it's
69 * a collision, just mark the resource as unallocated. Also
87 struct resource *r; pcibios_allocate_bus_resources()
94 r = &dev->resource[idx]; pcibios_allocate_bus_resources()
109 struct resource *r; pcibios_allocate_resources()
114 r = &dev->resource[idx]; for_each_pci_dev()
134 r = &dev->resource[PCI_ROM_RESOURCE]; for_each_pci_dev()
136 /* Turn the ROM off, leave the resource region, but keep it unregistered. */ for_each_pci_dev()
151 struct resource *r; pcibios_assign_resources()
161 r = &dev->resource[idx]; for_each_pci_dev()
171 * We shall assign a new address to this resource, either because for_each_pci_dev()
180 r = &dev->resource[PCI_ROM_RESOURCE]; for_each_pci_dev()
/linux-4.1.27/arch/arm/mach-s3c24xx/
H A Dbast-ide.c37 static struct resource bast_ide0_resource[] = {
47 .resource = bast_ide0_resource,
55 static struct resource bast_ide1_resource[] = {
65 .resource = bast_ide1_resource,
/linux-4.1.27/arch/arm/mach-cns3xxx/
H A Ddevices.c27 static struct resource cns3xxx_ahci_resource[] = {
45 .resource = cns3xxx_ahci_resource,
78 static struct resource cns3xxx_sdhci_resources[] = {
95 .resource = cns3xxx_sdhci_resources,
/linux-4.1.27/arch/arm/mach-footbridge/
H A Disa.c18 static struct resource rtc_resources[] = {
34 .resource = rtc_resources,
38 static struct resource serial_resources[] = {
77 .resource = serial_resources,
/linux-4.1.27/arch/arm/mach-gemini/
H A Ddevices.c48 static struct resource flash_resource = {
61 .resource = &flash_resource,
94 static struct resource gemini_rtc_resources[] = {
111 .resource = gemini_rtc_resources,
/linux-4.1.27/arch/arm/mach-iop33x/
H A Duart.c45 static struct resource iop33x_uart0_resources[] = {
65 .resource = iop33x_uart0_resources,
69 static struct resource iop33x_uart1_resources[] = {
102 .resource = iop33x_uart1_resources,
/linux-4.1.27/drivers/mtd/maps/
H A Dsun_uflash.c54 if (op->resource[1].flags) { uflash_devinit()
59 dp->full_name, (unsigned long long)op->resource[0].start); uflash_devinit()
73 up->map.size = resource_size(&op->resource[0]); uflash_devinit()
79 up->map.phys = op->resource[0].start; uflash_devinit()
81 up->map.virt = of_ioremap(&op->resource[0], 0, up->map.size, uflash_devinit()
95 of_iounmap(&op->resource[0], up->map.virt, up->map.size); uflash_devinit()
132 of_iounmap(&op->resource[0], up->map.virt, up->map.size); uflash_remove()
/linux-4.1.27/arch/mips/jazz/
H A Dsetup.c30 static struct resource jazz_io_resources[] = {
121 static struct resource jazz_esp_rsrc[] = {
142 .resource = jazz_esp_rsrc
145 static struct resource jazz_sonic_rsrc[] = {
161 .resource = jazz_sonic_rsrc
164 static struct resource jazz_cmos_rsrc[] = {
180 .resource = jazz_cmos_rsrc
/linux-4.1.27/arch/powerpc/include/asm/
H A Dmacio.h44 struct resource resource[MACIO_DEV_COUNT_RESOURCES]; member in struct:macio_dev
46 struct resource interrupt[MACIO_DEV_COUNT_IRQS];
66 return dev->resource[resource_no].start; macio_resource_start()
71 return dev->resource[resource_no].end; macio_resource_end()
76 struct resource *res = &dev->resource[resource_no]; macio_resource_len()
/linux-4.1.27/arch/arm/mach-clps711x/
H A Dboard-cdb89712.c47 static struct resource cdb89712_cs8900_resource[] __initdata = {
67 static struct resource cdb89712_flash_resources[] __initdata = {
74 .resource = cdb89712_flash_resources,
96 static struct resource cdb89712_bootrom_resources[] __initdata = {
104 .resource = cdb89712_bootrom_resources,
115 static struct resource cdb89712_sram_resources[] __initdata = {
122 .resource = cdb89712_sram_resources,
/linux-4.1.27/drivers/zorro/
H A Dzorro.c80 * FIXME: use the normal resource management
112 static struct resource __init *zorro_find_parent_resource( zorro_find_parent_resource()
118 struct resource *r = &bridge->resource[i]; zorro_find_parent_resource()
133 struct resource *r; amiga_zorro_probe()
176 z->resource.start = zi->boardaddr; amiga_zorro_probe()
177 z->resource.end = zi->boardaddr + zi->boardsize - 1; amiga_zorro_probe()
178 z->resource.name = z->name; amiga_zorro_probe()
180 error = request_resource(r, &z->resource); amiga_zorro_probe()
184 z->name, &z->resource); amiga_zorro_probe()
/linux-4.1.27/arch/mips/pci/
H A Dfixup-loongson3.c43 if (pdev->resource[PCI_ROM_RESOURCE].start) pci_fixup_radeon()
49 pdev->resource[PCI_ROM_RESOURCE].start = pci_fixup_radeon()
51 pdev->resource[PCI_ROM_RESOURCE].end = pci_fixup_radeon()
53 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_COPY; pci_fixup_radeon()
56 PCI_ROM_RESOURCE, &pdev->resource[PCI_ROM_RESOURCE]); pci_fixup_radeon()
/linux-4.1.27/arch/mips/sibyte/swarm/
H A Dplatform.c20 static struct resource swarm_pata_resource[] = {
42 .resource = swarm_pata_resource,
54 struct resource *r; swarm_pata_init()
88 static struct resource sb1250_res##num = { \
97 .resource = &sb1250_res##num, \
/linux-4.1.27/arch/blackfin/mach-bf518/boards/
H A Dtcm-bf518.c59 static struct resource tcm_flash_resource = {
72 .resource = &tcm_flash_resource,
237 static struct resource bfin_spi0_resource[] = {
259 .resource = bfin_spi0_resource,
272 static struct resource bfin_spi1_resource[] = {
294 .resource = bfin_spi1_resource,
303 static struct resource bfin_uart0_resources[] = {
344 .resource = bfin_uart0_resources,
351 static struct resource bfin_uart1_resources[] = {
392 .resource = bfin_uart1_resources,
402 static struct resource bfin_sir0_resources[] = {
424 .resource = bfin_sir0_resources,
428 static struct resource bfin_sir1_resources[] = {
450 .resource = bfin_sir1_resources,
458 static struct resource bfin_twi0_resource[] = {
475 .resource = bfin_twi0_resource,
498 static struct resource bfin_sport0_uart_resources[] = {
525 .resource = bfin_sport0_uart_resources,
532 static struct resource bfin_sport1_uart_resources[] = {
559 .resource = bfin_sport1_uart_resources,
/linux-4.1.27/arch/cris/arch-v32/drivers/pci/
H A Dbios.c40 pcibios_align_resource(void *data, const struct resource *res, pcibios_align_resource()
55 struct resource *r; pcibios_enable_resources()
64 r = &dev->resource[idx]; pcibios_enable_resources()
66 printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); pcibios_enable_resources()
74 if (dev->resource[PCI_ROM_RESOURCE].start) pcibios_enable_resources()
/linux-4.1.27/arch/sh/boards/mach-highlander/
H A Dsetup.c41 static struct resource r8a66597_usb_host_resources[] = {
63 .resource = r8a66597_usb_host_resources,
71 static struct resource m66592_usb_peripheral_resources[] = {
95 .resource = m66592_usb_peripheral_resources,
98 static struct resource cf_ide_resources[] = {
123 .resource = cf_ide_resources,
129 static struct resource heartbeat_resources[] = {
157 .resource = heartbeat_resources,
167 static struct resource ax88796_resources[] = {
194 .resource = ax88796_resources,
227 static struct resource nor_flash_resources[] = {
241 .resource = nor_flash_resources,
244 static struct resource smbus_resources[] = {
261 .resource = smbus_resources,
287 .resource = cf_ide_resources,
/linux-4.1.27/drivers/net/can/softing/
H A Dsofting_cs.c198 struct resource *pres; softingcs_probe_config()
202 pres = pcmcia->resource[PCMCIA_IOMEM_0]; softingcs_probe_config()
228 * pdev->resource has 2 entries: io & irq
241 struct resource *pres; softingcs_probe()
244 struct resource res[2]; softingcs_probe()
263 pres = pcmcia->resource[PCMCIA_IOMEM_0]; softingcs_probe()
275 dev->pdev.resource = dev->res; softingcs_probe()
285 pdev->resource[0].flags = IORESOURCE_MEM; softingcs_probe()
286 pdev->resource[0].start = pres->start; softingcs_probe()
287 pdev->resource[0].end = pres->end; softingcs_probe()
289 pdev->resource[1].flags = IORESOURCE_IRQ; softingcs_probe()
290 pdev->resource[1].start = pcmcia->irq; softingcs_probe()
291 pdev->resource[1].end = pdev->resource[1].start; softingcs_probe()

Completed in 6435 milliseconds

1234567891011>>