cregit-Linux how code gets into the kernel

Release 4.15 kernel/resource.c

Directory: kernel
/*
 *      linux/kernel/resource.c
 *
 * Copyright (C) 1999   Linus Torvalds
 * Copyright (C) 1999   Martin Mares <mj@ucw.cz>
 *
 * Arbitrary resource management.
 */


#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/export.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/device.h>
#include <linux/pfn.h>
#include <linux/mm.h>
#include <linux/resource_ext.h>
#include <asm/io.h>



struct resource ioport_resource = {
	.name	= "PCI IO",
	.start	= 0,
	.end	= IO_SPACE_LIMIT,
	.flags	= IORESOURCE_IO,
};

EXPORT_SYMBOL(ioport_resource);


struct resource iomem_resource = {
	.name	= "PCI mem",
	.start	= 0,
	.end	= -1,
	.flags	= IORESOURCE_MEM,
};

EXPORT_SYMBOL(iomem_resource);

/* constraints to be met while allocating resources */

struct resource_constraint {
	


resource_size_t min, max, align;
	
resource_size_t (*alignf)(void *, const struct resource *,
			resource_size_t, resource_size_t);
	
void *alignf_data;
};

static DEFINE_RWLOCK(resource_lock);

/*
 * For memory hotplug, there is no way to free resource entries allocated
 * by boot mem after the system is up. So for reusing the resource entry
 * we need to remember the resource.
 */

static struct resource *bootmem_resource_free;
static DEFINE_SPINLOCK(bootmem_resource_lock);


static struct resource *next_resource(struct resource *p, bool sibling_only) { /* Caller wants to traverse through siblings only */ if (sibling_only) return p->sibling; if (p->child) return p->child; while (!p->sibling && p->parent) p = p->parent; return p->sibling; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro3050.85%120.00%
Vivek Goyal1627.12%120.00%
Linus Torvalds (pre-git)1220.34%240.00%
Randy Dunlap11.69%120.00%
Total59100.00%5100.00%


static void *r_next(struct seq_file *m, void *v, loff_t *pos) { struct resource *p = v; (*pos)++; return (void *)next_resource(p, false); }

Contributors

PersonTokensPropCommitsCommitProp
Vivek Goyal45100.00%1100.00%
Total45100.00%1100.00%

#ifdef CONFIG_PROC_FS enum { MAX_IORES_LEVEL = 5 };
static void *r_start(struct seq_file *m, loff_t *pos) __acquires(resource_lock) { struct resource *p = m->private; loff_t l = 0; read_lock(&resource_lock); for (p = p->child; p && l < *pos; p = r_next(m, p, &l)) ; return p; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro5476.06%120.00%
Linus Torvalds (pre-git)1014.08%240.00%
Linus Torvalds45.63%120.00%
Randy Dunlap34.23%120.00%
Total71100.00%5100.00%


static void r_stop(struct seq_file *m, void *v) __releases(resource_lock) { read_unlock(&resource_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro2184.00%150.00%
Linus Torvalds416.00%150.00%
Total25100.00%2100.00%


static int r_show(struct seq_file *m, void *v) { struct resource *root = m->private; struct resource *r = v, *p; unsigned long long start, end; int width = root->end < 0x10000 ? 4 : 8; int depth; for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent) if (p->parent == root) break; if (file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADMIN)) { start = r->start; end = r->end; } else { start = end = 0; } seq_printf(m, "%*s%0*llx-%0*llx : %s\n", depth * 2, "", width, start, width, end, r->name ? r->name : "<BAD>"); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro7245.00%111.11%
Linus Torvalds4427.50%111.11%
Randy Dunlap2314.38%111.11%
Linus Torvalds (pre-git)2012.50%555.56%
Greg Kroah-Hartman10.62%111.11%
Total160100.00%9100.00%

static const struct seq_operations resource_op = { .start = r_start, .next = r_next, .stop = r_stop, .show = r_show, };
static int ioports_open(struct inode *inode, struct file *file) { int res = seq_open(file, &resource_op); if (!res) { struct seq_file *m = file->private_data; m->private = &ioport_resource; } return res; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro3769.81%150.00%
Randy Dunlap1630.19%150.00%
Total53100.00%2100.00%


static int iomem_open(struct inode *inode, struct file *file) { int res = seq_open(file, &resource_op); if (!res) { struct seq_file *m = file->private_data; m->private = &iomem_resource; } return res; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro3260.38%133.33%
Randy Dunlap1935.85%133.33%
Linus Torvalds (pre-git)23.77%133.33%
Total53100.00%3100.00%

static const struct file_operations proc_ioports_operations = { .open = ioports_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, }; static const struct file_operations proc_iomem_operations = { .open = iomem_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, };
static int __init ioresources_init(void) { proc_create("ioports", 0, NULL, &proc_ioports_operations); proc_create("iomem", 0, NULL, &proc_iomem_operations); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Randy Dunlap2775.00%125.00%
Denis V. Lunev616.67%125.00%
Linus Torvalds (pre-git)38.33%250.00%
Total36100.00%4100.00%

__initcall(ioresources_init); #endif /* CONFIG_PROC_FS */
static void free_resource(struct resource *res) { if (!res) return; if (!PageSlab(virt_to_head_page(res))) { spin_lock(&bootmem_resource_lock); res->sibling = bootmem_resource_free; bootmem_resource_free = res; spin_unlock(&bootmem_resource_lock); } else { kfree(res); } }

Contributors

PersonTokensPropCommitsCommitProp
Yasuaki Ishimatsu60100.00%1100.00%
Total60100.00%1100.00%


static struct resource *alloc_resource(gfp_t flags) { struct resource *res = NULL; spin_lock(&bootmem_resource_lock); if (bootmem_resource_free) { res = bootmem_resource_free; bootmem_resource_free = res->sibling; } spin_unlock(&bootmem_resource_lock); if (res) memset(res, 0, sizeof(struct resource)); else res = kzalloc(sizeof(struct resource), flags); return res; }

Contributors

PersonTokensPropCommitsCommitProp
Yasuaki Ishimatsu80100.00%1100.00%
Total80100.00%1100.00%

/* Return the conflict entry if you can't request it */
static struct resource * __request_resource(struct resource *root, struct resource *new) { resource_size_t start = new->start; resource_size_t end = new->end; struct resource *tmp, **p; if (end < start) return root; if (start < root->start) return root; if (end > root->end) return root; p = &root->child; for (;;) { tmp = *p; if (!tmp || tmp->start > end) { new->sibling = tmp; *p = new; new->parent = root; return NULL; } p = &tmp->sibling; if (tmp->end < start) continue; return tmp; } }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)14198.60%480.00%
Greg Kroah-Hartman21.40%120.00%
Total143100.00%5100.00%


static int __release_resource(struct resource *old, bool release_child) { struct resource *tmp, **p, *chd; p = &old->parent->child; for (;;) { tmp = *p; if (!tmp) break; if (tmp == old) { if (release_child || !(tmp->child)) { *p = tmp->sibling; } else { for (chd = tmp->child;; chd = chd->sibling) { chd->parent = tmp->parent; if (!(chd->sibling)) break; } *p = tmp->child; chd->sibling = tmp->sibling; } old->parent = NULL; return 0; } p = &tmp->sibling; } return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)8253.25%150.00%
Toshi Kani7246.75%150.00%
Total154100.00%2100.00%


static void __release_child_resources(struct resource *r) { struct resource *tmp, *p; resource_size_t size; p = r->child; r->child = NULL; while (p) { tmp = p; p = p->sibling; tmp->parent = NULL; tmp->sibling = NULL; __release_child_resources(tmp); printk(KERN_DEBUG "release child resource %pR\n", tmp); /* need to restore size, and keep flags */ size = resource_size(tmp); tmp->start = 0; tmp->end = size - 1; } }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu97100.00%1100.00%
Total97100.00%1100.00%


void release_child_resources(struct resource *r) { write_lock(&resource_lock); __release_child_resources(r); write_unlock(&resource_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu27100.00%1100.00%
Total27100.00%1100.00%

/** * request_resource_conflict - request and reserve an I/O or memory resource * @root: root resource descriptor * @new: resource descriptor desired by caller * * Returns 0 for success, conflict resource on error. */
struct resource *request_resource_conflict(struct resource *root, struct resource *new) { struct resource *conflict; write_lock(&resource_lock); conflict = __request_resource(root, new); write_unlock(&resource_lock); return conflict; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)4086.96%150.00%
Björn Helgaas613.04%150.00%
Total46100.00%2100.00%

/** * request_resource - request and reserve an I/O or memory resource * @root: root resource descriptor * @new: resource descriptor desired by caller * * Returns 0 for success, negative error code on error. */
int request_resource(struct resource *root, struct resource *new) { struct resource *conflict; conflict = request_resource_conflict(root, new); return conflict ? -EBUSY : 0; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas3081.08%125.00%
Linus Torvalds (pre-git)718.92%375.00%
Total37100.00%4100.00%

EXPORT_SYMBOL(request_resource); /** * release_resource - release a previously reserved resource * @old: resource pointer */
int release_resource(struct resource *old) { int retval; write_lock(&resource_lock); retval = __release_resource(old, true); write_unlock(&resource_lock); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)3594.59%480.00%
Toshi Kani25.41%120.00%
Total37100.00%5100.00%

EXPORT_SYMBOL(release_resource); /* * Finds the lowest iomem resource existing within [res->start.res->end). * The caller must specify res->start, res->end, res->flags, and optionally * desc. If found, returns 0, res is overwritten, if not found, returns -1. * This function walks the whole tree and not just first level children until * and unless first_level_children_only is true. */
static int find_next_iomem_res(struct resource *res, unsigned long desc, bool first_level_children_only) { resource_size_t start, end; struct resource *p; bool sibling_only = false; BUG_ON(!res); start = res->start; end = res->end; BUG_ON(start >= end); if (first_level_children_only) sibling_only = true; read_lock(&resource_lock); for (p = iomem_resource.child; p; p = next_resource(p, sibling_only)) { if ((p->flags & res->flags) != res->flags) continue; if ((desc != IORES_DESC_NONE) && (desc != p->desc)) continue; if (p->start > end) { p = NULL; break; } if ((p->end >= start) && (p->start < end)) break; } read_unlock(&resource_lock); if (!p) return -1; /* copy data */ if (res->start < p->start) res->start = p->start; if (res->end > p->end) res->end = p->end; res->flags = p->flags; res->desc = p->desc; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Kamezawa Hiroyuki16370.26%550.00%
Toshi Kani2711.64%220.00%
Vivek Goyal2611.21%220.00%
Tom Lendacky166.90%110.00%
Total232100.00%10100.00%


static int __walk_iomem_res_desc(struct resource *res, unsigned long desc, bool first_level_children_only, void *arg, int (*func)(struct resource *, void *)) { u64 orig_end = res->end; int ret = -1; while ((res->start < res->end) && !find_next_iomem_res(res, desc, first_level_children_only)) { ret = (*func)(res, arg); if (ret) break; res->start = res->end + 1; res->end = orig_end; } return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Toshi Kani4944.95%125.00%
Vivek Goyal3834.86%125.00%
Tom Lendacky2220.18%250.00%
Total109100.00%4100.00%

/* * Walks through iomem resources and calls func() with matching resource * ranges. This walks through whole tree and not just first level children. * All the memory ranges which overlap start,end and also match flags and * desc are valid candidates. * * @desc: I/O resource descriptor. Use IORES_DESC_NONE to skip @desc check. * @flags: I/O resource flags * @start: start addr * @end: end addr * * NOTE: For a new descriptor search, define a new IORES_DESC in * <linux/ioport.h> and set it in 'desc' of a target resource entry. */
int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, u64 end, void *arg, int (*func)(struct resource *, void *)) { struct resource res; res.start = start; res.end = end; res.flags = flags; return __walk_iomem_res_desc(&res, desc, false, arg, func); }

Contributors

PersonTokensPropCommitsCommitProp
Vivek Goyal5067.57%125.00%
Tom Lendacky2331.08%250.00%
Toshi Kani11.35%125.00%
Total74100.00%4100.00%

/* * This function calls the @func callback against all memory ranges of type * System RAM which are marked as IORESOURCE_SYSTEM_RAM and IORESOUCE_BUSY. * Now, this function is only for System RAM, it deals with full ranges and * not PFNs. If resources are not PFN-aligned, dealing with PFNs can truncate * ranges. */
int walk_system_ram_res(u64 start, u64 end, void *arg, int (*func)(struct resource *, void *)) { struct resource res; res.start = start; res.end = end; res.flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; return __walk_iomem_res_desc(&res, IORES_DESC_NONE, true, arg, func); }

Contributors

PersonTokensPropCommitsCommitProp
Tom Lendacky5073.53%266.67%
Vivek Goyal1826.47%133.33%
Total68100.00%3100.00%

/* * This function calls the @func callback against all memory ranges, which * are ranges marked as IORESOURCE_MEM and IORESOUCE_BUSY. */
int walk_mem_res(u64 start, u64 end, void *arg, int (*func)(struct resource *, void *)) { struct resource res; res.start = start; res.end = end; res.flags = IORESOURCE_MEM | IORESOURCE_BUSY; return __walk_iomem_res_desc(&res, IORES_DESC_NONE, true, arg, func); }

Contributors

PersonTokensPropCommitsCommitProp
Tom Lendacky68100.00%1100.00%
Total68100.00%1100.00%

#if !defined(CONFIG_ARCH_HAS_WALK_MEMORY) /* * This function calls the @func callback against all memory ranges of type * System RAM which are marked as IORESOURCE_SYSTEM_RAM and IORESOUCE_BUSY. * It is to be used only for System RAM. */
int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, void *arg, int (*func)(unsigned long, unsigned long, void *)) { struct resource res; unsigned long pfn, end_pfn; u64 orig_end; int ret = -1; res.start = (u64) start_pfn << PAGE_SHIFT; res.end = ((u64)(start_pfn + nr_pages) << PAGE_SHIFT) - 1; res.flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; orig_end = res.end; while ((res.start < res.end) && (find_next_iomem_res(&res, IORES_DESC_NONE, true) >= 0)) { pfn = (res.start + PAGE_SIZE - 1) >> PAGE_SHIFT; end_pfn = (res.end + 1) >> PAGE_SHIFT; if (end_pfn > pfn) ret = (*func)(pfn, end_pfn - pfn, arg); if (ret) break; res.start = res.end + 1; res.end = orig_end; } return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Kamezawa Hiroyuki17287.76%228.57%
Fengguang Wu178.67%114.29%
Toshi Kani31.53%228.57%
Yasunori Goto21.02%114.29%
Vivek Goyal21.02%114.29%
Total196100.00%7100.00%

#endif
static int __is_ram(unsigned long pfn, unsigned long nr_pages, void *arg) { return 1; }

Contributors

PersonTokensPropCommitsCommitProp
Fengguang Wu21100.00%1100.00%
Total21100.00%1100.00%

/* * This generic page_is_ram() returns true if specified address is * registered as System RAM in iomem_resource list. */
int __weak page_is_ram(unsigned long pfn) { return walk_system_ram_range(pfn, 1, NULL, __is_ram) == 1; }

Contributors

PersonTokensPropCommitsCommitProp
Fengguang Wu2187.50%150.00%
Andrew Morton312.50%150.00%
Total24100.00%2100.00%

EXPORT_SYMBOL_GPL(page_is_ram); /** * region_intersects() - determine intersection of region with known resources * @start: region start address * @size: size of region * @flags: flags of resource (in iomem_resource) * @desc: descriptor of resource (in iomem_resource) or IORES_DESC_NONE * * Check if the specified region partially overlaps or fully eclipses a * resource identified by @flags and @desc (optional with IORES_DESC_NONE). * Return REGION_DISJOINT if the region does not overlap @flags/@desc, * return REGION_MIXED if the region overlaps @flags/@desc and another * resource, and return REGION_INTERSECTS if the region overlaps @flags/@desc * and no other defined resource. Note that REGION_INTERSECTS is also * returned in the case when the specified region overlaps RAM and undefined * memory holes. * * region_intersect() is used by memory remapping functions to ensure * the user is not remapping RAM and is a vast speed up over walking * through the resource table page by page. */
int region_intersects(resource_size_t start, size_t size, unsigned long flags, unsigned long desc) { resource_size_t end = start + size - 1; int type = 0; int other = 0; struct resource *p; read_lock(&resource_lock); for (p = iomem_resource.child; p ; p = p->sibling) { bool is_type = (((p->flags & flags) == flags) && ((desc == IORES_DESC_NONE) || (desc == p->desc))); if (start >= p->start && start <= p->end) is_type ? type++ : other++; if (end >= p->start && end <= p->end) is_type ? type++ : other++; if (p->start >= start && p->end <= end) is_type ? type++ : other++; } read_unlock(&resource_lock); if (other == 0) return type ? REGION_INTERSECTS : REGION_DISJOINT; if (type) return REGION_MIXED; return REGION_DISJOINT; }

Contributors

PersonTokensPropCommitsCommitProp
Dan J Williams8744.62%120.00%
Mike Travis7638.97%120.00%
Toshi Kani3216.41%360.00%
Total195100.00%5100.00%

EXPORT_SYMBOL_GPL(region_intersects);
void __weak arch_remove_reservations(struct resource *avail) { }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas10100.00%1100.00%
Total10100.00%1100.00%


static resource_size_t simple_align_resource(void *data, const struct resource *avail, resource_size_t size, resource_size_t align) { return avail->start; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas27100.00%1100.00%
Total27100.00%1100.00%


static void resource_clip(struct resource *res, resource_size_t min, resource_size_t max) { if (res->start < min) res->start = min; if (res->end > max) res->end = max; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas45100.00%1100.00%
Total45100.00%1100.00%

/* * Find empty slot in the resource tree with the given range and * alignment constraints */
static int __find_resource(struct resource *root, struct resource *old, struct resource *new, resource_size_t size, struct resource_constraint *constraint) { struct resource *this = root->child; struct resource tmp = *new, avail, alloc; tmp.start = root->start; /* * Skip past an allocated resource that starts at 0, since the assignment * of this->start - 1 to tmp->end below would cause an underflow. */ if (this && this->start == root->start) { tmp.start = (this == old) ? old->start : this->end + 1; this = this->sibling; } for(;;) { if (this) tmp.end = (this == old) ? this->end : this->start - 1; else tmp.end = root->end; if (tmp.end < tmp.start) goto next; resource_clip(&tmp, constraint->min, constraint->max); arch_remove_reservations(&tmp); /* Check for overflow after ALIGN() */ avail.start = ALIGN(tmp.start, constraint->align); avail.end = tmp.end; avail.flags = new->flags & ~IORESOURCE_UNSET; if (avail.start >= tmp.start) { alloc.flags = avail.flags; alloc.start = constraint->alignf(constraint->alignf_data, &avail, size, constraint->align); alloc.end = alloc.start + size - 1; if (resource_contains(&avail, &alloc)) { new->start = alloc.start; new->end = alloc.end; return 0; } } next: if (!this || this->end == root->end) break; if (this != old) tmp.start = this->end + 1; this = this->sibling; } return -EBUSY; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)11935.63%315.79%
Björn Helgaas7923.65%736.84%
Ram Pai7121.26%210.53%
Dominik Brodowski319.28%210.53%
Andrew Morton247.19%15.26%
Nick Wilson41.20%15.26%
Ivan Kokshaysky30.90%15.26%
Lennert Buytenhek20.60%15.26%
Greg Kroah-Hartman10.30%15.26%
Total334100.00%19100.00%

/* * Find empty slot in the resource tree given range and alignment. */
static int find_resource(struct resource *root, struct resource *new, resource_size_t size, struct resource_constraint *constraint) { return __find_resource(root, NULL, new, size, constraint); }

Contributors

PersonTokensPropCommitsCommitProp
Ram Pai38100.00%1100.00%
Total38100.00%1100.00%

/** * reallocate_resource - allocate a slot in the resource tree given range & alignment. * The resource will be relocated if the new size cannot be reallocated in the * current location. * * @root: root resource descriptor * @old: resource descriptor desired by caller * @newsize: new size of the resource descriptor * @constraint: the size and alignment constraints to be met. */
static int reallocate_resource(struct resource *root, struct resource *old, resource_size_t newsize, struct resource_constraint *constraint) { int err=0; struct resource new = *old; struct resource *conflict; write_lock(&resource_lock); if ((err = __find_resource(root, old, &new, newsize, constraint))) goto out; if (resource_contains(&new, old)) { old->start = new.start; old->end = new.end; goto out; } if (old->child) { err = -EBUSY; goto out; } if (resource_contains(old, &new)) { old->start = new.start; old->end = new.end; } else { __release_resource(old, true); *old = new; conflict = __request_resource(root, old); BUG_ON(conflict); } out: write_unlock(&resource_lock); return err; }

Contributors

PersonTokensPropCommitsCommitProp
Ram Pai18298.38%133.33%
Toshi Kani21.08%133.33%
DaeSeok Youn10.54%133.33%
Total185100.00%3100.00%

/** * allocate_resource - allocate empty slot in the resource tree given range & alignment. * The resource will be reallocated with a new size if it was already allocated * @root: root resource descriptor * @new: resource descriptor desired by caller * @size: requested resource region size * @min: minimum boundary to allocate * @max: maximum boundary to allocate * @align: alignment requested, in bytes * @alignf: alignment function, optional, called if not NULL * @alignf_data: arbitrary data to pass to the @alignf function */
int allocate_resource(struct resource *root, struct resource *new, resource_size_t size, resource_size_t min, resource_size_t max, resource_size_t align, resource_size_t (*alignf)(void *, const struct resource *, resource_size_t, resource_size_t), void *alignf_data) { int err; struct resource_constraint constraint; if (!alignf) alignf = simple_align_resource; constraint.min = min; constraint.max = max; constraint.align = align; constraint.alignf = alignf; constraint.alignf_data = alignf_data; if ( new->parent ) { /* resource is already allocated, try reallocating with the new constraints */ return reallocate_resource(root, new, size, &constraint); } write_lock(&resource_lock); err = find_resource(root, new, size, &constraint); if (err >= 0 && __request_resource(root, new)) err = -EBUSY; write_unlock(&resource_lock); return err; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)8953.94%333.33%
Ram Pai5835.15%111.11%
Björn Helgaas95.45%111.11%
Greg Kroah-Hartman63.64%111.11%
Dominik Brodowski21.21%222.22%
Ivan Kokshaysky10.61%111.11%
Total165100.00%9100.00%

EXPORT_SYMBOL(allocate_resource); /** * lookup_resource - find an existing resource by a resource start address * @root: root resource descriptor * @start: resource start address * * Returns a pointer to the resource if found, NULL otherwise */
struct resource *lookup_resource(struct resource *root, resource_size_t start) { struct resource *res; read_lock(&resource_lock); for (res = root->child; res; res = res->sibling) { if (res->start == start) break; } read_unlock(&resource_lock); return res; }

Contributors

PersonTokensPropCommitsCommitProp
Geert Uytterhoeven62100.00%1100.00%
Total62100.00%1100.00%

/* * Insert a resource into the resource tree. If successful, return NULL, * otherwise return the conflicting resource (compare to __request_resource()) */
static struct resource * __insert_resource(struct resource *parent, struct resource *new) { struct resource *first, *next; for (;; parent = first) { first = __request_resource(parent, new); if (!first) return first; if (first == parent) return first; if (WARN_ON(first == new)) /* duplicated insertion */ return first; if ((first->start > new->start) || (first->end < new->end)) break; if ((first->start == new->start) && (first->end == new->end)) break; } for (next = first; ; next = next->sibling) { /* Partial overlap? Bad, and unfixable */ if (next->start < new->start || next->end > new->end) return next; if (!next->sibling) break; if (next->sibling->start > new->end) break; } new->parent = parent; new->sibling = next->sibling; new->child = first; next->sibling = NULL; for (next = first; next; next = next->sibling) next->parent = new; if (parent->child == first) { parent->child = new; } else { next = parent->child; while (next->sibling != first) next = next->sibling; next->sibling = new; } return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Benjamin Herrenschmidt16460.07%116.67%
Linus Torvalds5620.51%233.33%
Matthew Wilcox3914.29%116.67%
Huang Shijie134.76%116.67%
Andrew Morton10.37%116.67%
Total273100.00%6100.00%

/** * insert_resource_conflict - Inserts resource in the resource tree * @parent: parent of the new resource * @new: new resource to insert * * Returns 0 on success, conflict resource if the resource can't be inserted. * * This function is equivalent to request_resource_conflict when no conflict * happens. If a conflict happens, and the conflicting resources * entirely fit within the range of the new resource, then the new * resource is inserted and the conflicting resources become children of * the new resource. * * This function is intended for producers of resources, such as FW modules * and bus drivers. */
struct resource *insert_resource_conflict(struct resource *parent, struct resource *new) { struct resource *conflict; write_lock(&resource_lock); conflict = __insert_resource(parent, new); write_unlock(&resource_lock); return conflict; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds3371.74%133.33%
Benjamin Herrenschmidt715.22%133.33%
Björn Helgaas613.04%133.33%
Total46100.00%3100.00%

/** * insert_resource - Inserts a resource in the resource tree * @parent: parent of the new resource * @new: new resource to insert * * Returns 0 on success, -EBUSY if the resource can't be inserted. * * This function is intended for producers of resources, such as FW modules * and bus drivers. */
int insert_resource(struct resource *parent, struct resource *new) { struct resource *conflict; conflict = insert_resource_conflict(parent, new); return conflict ? -EBUSY : 0; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas3081.08%133.33%
Linus Torvalds513.51%133.33%
Benjamin Herrenschmidt25.41%133.33%
Total37100.00%3100.00%

EXPORT_SYMBOL_GPL(insert_resource); /** * insert_resource_expand_to_fit - Insert a resource into the resource tree * @root: root resource descriptor * @new: new resource to insert * * Insert a resource into the resource tree, possibly expanding it in order * to make it encompass any conflicting resources. */
void insert_resource_expand_to_fit(struct resource *root, struct resource *new) { if (new->parent) return; write_lock(&resource_lock); for (;;) { struct resource *conflict; conflict = __insert_resource(root, new); if (!conflict) break; if (conflict == root) break; /* Ok, expand resource to cover the conflict, then try again .. */ if (conflict->start < new->start) new->start = conflict->start; if (conflict->end > new->end) new->end = conflict->end; printk("Expanded resource %s due to conflict with %s\n", new->name, conflict->name); } write_unlock(&resource_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds118100.00%1100.00%
Total118100.00%1100.00%

/** * remove_resource - Remove a resource in the resource tree * @old: resource to remove * * Returns 0 on success, -EINVAL if the resource is not valid. * * This function removes a resource previously inserted by insert_resource() * or insert_resource_conflict(), and moves the children (if any) up to * where they were before. insert_resource() and insert_resource_conflict() * insert a new resource, and move any conflicting resources down to the * children of the new resource. * * insert_resource(), insert_resource_conflict() and remove_resource() are * intended for producers of resources, such as FW modules and bus drivers. */
int remove_resource(struct resource *old) { int retval; write_lock(&resource_lock); retval = __release_resource(old, false); write_unlock(&resource_lock); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
Toshi Kani37100.00%1100.00%
Total37100.00%1100.00%

EXPORT_SYMBOL_GPL(remove_resource);
static int __adjust_resource(struct resource *res, resource_size_t start, resource_size_t size) { struct resource *tmp, *parent = res->parent; resource_size_t end = start + size - 1; int result = -EBUSY; if (!parent) goto skip; if ((start < parent->start) || (end > parent->end)) goto out; if (res->sibling && (res->sibling->start <= end)) goto out; tmp = parent->child; if (tmp != res) { while (tmp->sibling != res) tmp = tmp->sibling; if (start <= tmp->end) goto out; } skip: for (tmp = res->child; tmp; tmp = tmp->sibling) if ((tmp->start < start) || (tmp->end > end)) goto out; res->start = start; res->end = end; result = 0; out: return result; }

Contributors

PersonTokensPropCommitsCommitProp
Matthew Wilcox13771.73%125.00%
Yinghai Lu4523.56%125.00%
Toshi Kani63.14%125.00%
Greg Kroah-Hartman31.57%125.00%
Total191100.00%4100.00%

/** * adjust_resource - modify a resource's start and size * @res: resource to modify * @start: new start value * @size: new size * * Given an existing resource, change its start and size to match the * arguments. Returns 0 on success, -EBUSY if it can't fit. * Existing children of the resource are assumed to be immutable. */
int adjust_resource(struct resource *res, resource_size_t start, resource_size_t size) { int result; write_lock(&resource_lock); result = __adjust_resource(res, start, size); write_unlock(&resource_lock); return result; }

Contributors

PersonTokensPropCommitsCommitProp
Toshi Kani3577.78%150.00%
Matthew Wilcox1022.22%150.00%
Total45100.00%2100.00%

EXPORT_SYMBOL(adjust_resource);
static void __init __reserve_region_with_split(struct resource *root, resource_size_t start, resource_size_t end, const char *name) { struct resource *parent = root; struct resource *conflict; struct resource *res = alloc_resource(GFP_ATOMIC); struct resource *next_res = NULL; if (!res) return; res->name = name; res->start = start; res->end = end; res->flags = IORESOURCE_BUSY; res->desc = IORES_DESC_NONE; while (1) { conflict = __request_resource(parent, res); if (!conflict) { if (!next_res) break; res = next_res; next_res = NULL; continue; } /* conflict covered whole area */ if (conflict->start <= res->start && conflict->end >= res->end) { free_resource(res); WARN_ON(next_res); break; } /* failed, split and try again */ if (conflict->start > res->start) { end = res->end; res->end = conflict->start - 1; if (conflict->end < end) { next_res = alloc_resource(GFP_ATOMIC); if (!next_res) { free_resource(res); break; } next_res->name = name; next_res->start = conflict->end + 1; next_res->end = end; next_res->flags = IORESOURCE_BUSY; next_res->desc = IORES_DESC_NONE; } } else { res->start = conflict->end + 1; } } }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu13350.57%116.67%
T Makphaibulchoke11242.59%116.67%
Toshi Kani124.56%116.67%
Yasuaki Ishimatsu41.52%116.67%
Linus Torvalds10.38%116.67%
Ingo Molnar10.38%116.67%
Total263100.00%6100.00%


void __init reserve_region_with_split(struct resource *root, resource_size_t start, resource_size_t end, const char *name) { int abort = 0; write_lock(&resource_lock); if (root->start > start || root->end < end) { pr_err("requested range [0x%llx-0x%llx] not in root %pr\n", (unsigned long long)start, (unsigned long long)end, root); if (start > root->end || end < root->start) abort = 1; else { if (end > root->end) end = root->end; if (start < root->start) start = root->start; pr_err("fixing request to [0x%llx-0x%llx]\n", (unsigned long long)start, (unsigned long long)end); } dump_stack(); } if (!abort) __reserve_region_with_split(root, start, end, name); write_unlock(&resource_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Octavian Purdila11872.39%133.33%
Yinghai Lu4426.99%133.33%
Paul Mundt10.61%133.33%
Total163100.00%3100.00%

/** * resource_alignment - calculate resource's alignment * @res: resource pointer * * Returns alignment on success, 0 (invalid alignment) on failure. */
resource_size_t resource_alignment(struct resource *res) { switch (res->flags & (IORESOURCE_SIZEALIGN | IORESOURCE_STARTALIGN)) { case IORESOURCE_SIZEALIGN: return resource_size(res); case IORESOURCE_STARTALIGN: return res->start; default: return 0; } }

Contributors

PersonTokensPropCommitsCommitProp
Ivan Kokshaysky4293.33%150.00%
Magnus Damm36.67%150.00%
Total45100.00%2100.00%

/* * This is compatibility stuff for IO resources. * * Note how this, unlike the above, knows about * the IO flag meanings (busy etc). * * request_region creates a new busy region. * * release_region releases a matching busy region. */ static DECLARE_WAIT_QUEUE_HEAD(muxed_resource_wait); /** * __request_region - create a new busy resource region * @parent: parent resource descriptor * @start: resource start address * @n: resource region size * @name: reserving caller's ID string * @flags: IO resource flags */
struct resource * __request_region(struct resource *parent, resource_size_t start, resource_size_t n, const char *name, int flags) { DECLARE_WAITQUEUE(wait, current); struct resource *res = alloc_resource(GFP_KERNEL); if (!res) return NULL; res->name = name; res->start = start; res->end = start + n - 1; write_lock(&resource_lock); for (;;) { struct resource *conflict; res->flags = resource_type(parent) | resource_ext_type(parent); res->flags |= IORESOURCE_BUSY | flags; res->desc = parent->desc; conflict = __request_resource(parent, res); if (!conflict) break; if (conflict != parent) { if (!(conflict->flags & IORESOURCE_BUSY)) { parent = conflict; continue; } } if (conflict->flags & flags & IORESOURCE_MUXED) { add_wait_queue(&muxed_resource_wait, &wait); write_unlock(&resource_lock); set_current_state(TASK_UNINTERRUPTIBLE); schedule(); remove_wait_queue(&muxed_resource_wait, &wait); write_lock(&resource_lock); continue; } /* Uhhuh, that didn't work out.. */ free_resource(res); res = NULL; break; } write_unlock(&resource_lock); return res; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)11750.21%533.33%
Alan Cox5824.89%16.67%
Toshi Kani2912.45%320.00%
Björn Helgaas104.29%213.33%
Arjan van de Ven93.86%16.67%
Simon Guinot62.58%16.67%
Yasuaki Ishimatsu20.86%16.67%
Greg Kroah-Hartman20.86%16.67%
Total233100.00%15100.00%

EXPORT_SYMBOL(__request_region); /** * __release_region - release a previously reserved resource region * @parent: parent resource descriptor * @start: resource start address * @n: resource region size * * The described resource region must match a currently busy region. */
void __release_region(struct resource *parent, resource_size_t start, resource_size_t n) { struct resource **p; resource_size_t end; p = &parent->child; end = start + n - 1; write_lock(&resource_lock); for (;;) { struct resource *res = *p; if (!res) break; if (res->start <= start && res->end >= end) { if (!(res->flags & IORESOURCE_BUSY)) { p = &res->child; continue; } if (res->start != start || res->end != end) break; *p = res->sibling; write_unlock(&resource_lock); if (res->flags & IORESOURCE_MUXED) wake_up(&muxed_resource_wait); free_resource(res); return; } p = &res->sibling; } write_unlock(&resource_lock); printk(KERN_WARNING "Trying to free nonexistent resource " "<%016llx-%016llx>\n", (unsigned long long)start, (unsigned long long)end); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)13773.66%440.00%
Andrew Morton189.68%110.00%
Greg Kroah-Hartman158.06%220.00%
Alan Cox147.53%110.00%
Yasuaki Ishimatsu10.54%110.00%
Cory Watson10.54%110.00%
Total186100.00%10100.00%

EXPORT_SYMBOL(__release_region); #ifdef CONFIG_MEMORY_HOTREMOVE /** * release_mem_region_adjustable - release a previously reserved memory region * @parent: parent resource descriptor * @start: resource start address * @size: resource region size * * This interface is intended for memory hot-delete. The requested region * is released from a currently busy memory resource. The requested region * must either match exactly or fit into a single busy resource entry. In * the latter case, the remaining resource is adjusted accordingly. * Existing children of the busy memory resource must be immutable in the * request. * * Note: * - Additional release conditions, such as overlapping region, can be * supported after they are confirmed as valid cases. * - When a busy memory resource gets split into two entries, the code * assumes that all children remain in the lower address entry for * simplicity. Enhance this logic when necessary. */
int release_mem_region_adjustable(struct resource *parent, resource_size_t start, resource_size_t size) { struct resource **p; struct resource *res; struct resource *new_res; resource_size_t end; int ret = -EINVAL; end = start + size - 1; if ((start < parent->start) || (end > parent->end)) return ret; /* The alloc_resource() result gets checked later */ new_res = alloc_resource(GFP_KERNEL); p = &parent->child; write_lock(&resource_lock); while ((res = *p)) { if (res->start >= end) break; /* look for the next resource if it does not fit into */ if (res->start > start || res->end < end) { p = &res->sibling; continue; } if (!(res->flags & IORESOURCE_MEM)) break; if (!(res->flags & IORESOURCE_BUSY)) { p = &res->child; continue; } /* found the target resource; let's adjust accordingly */ if (res->start == start && res->end == end) { /* free the whole entry */ *p = res->sibling; free_resource(res); ret = 0; } else if (res->start == start && res->end != end) { /* adjust the start */ ret = __adjust_resource(res, end + 1, res->end - end); } else if (res->start != start && res->end == end) { /* adjust the end */ ret = __adjust_resource(res, res->start, start - res->start); } else { /* split into two entries */ if (!new_res) { ret = -ENOMEM; break; } new_res->name = res->name; new_res->start = end + 1; new_res->end = res->end; new_res->flags = res->flags; new_res->desc = res->desc; new_res->parent = res->parent; new_res->sibling = res->sibling; new_res->child = NULL; ret = __adjust_resource(res, res->start, start - res->start); if (ret) break; res->sibling = new_res; new_res = NULL; } break; } write_unlock(&resource_lock); free_resource(new_res); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Toshi Kani39599.00%266.67%
Yasuaki Ishimatsu41.00%133.33%
Total399100.00%3100.00%

#endif /* CONFIG_MEMORY_HOTREMOVE */ /* * Managed region resource */
static void devm_resource_release(struct device *dev, void *ptr) { struct resource **r = ptr; release_resource(*r); }

Contributors

PersonTokensPropCommitsCommitProp
Thierry Reding29100.00%1100.00%
Total29100.00%1100.00%

/** * devm_request_resource() - request and reserve an I/O or memory resource * @dev: device for which to request the resource * @root: root of the resource tree from which to request the resource * @new: descriptor of the resource to request * * This is a device-managed version of request_resource(). There is usually * no need to release resources requested by this function explicitly since * that will be taken care of when the device is unbound from its driver. * If for some reason the resource needs to be released explicitly, because * of ordering issues for example, drivers must call devm_release_resource() * rather than the regular release_resource(). * * When a conflict is detected between any existing resources and the newly * requested resource, an error message will be printed. * * Returns 0 on success or a negative error code on failure. */
int devm_request_resource(struct device *dev, struct resource *root, struct resource *new) { struct resource *conflict, **ptr; ptr = devres_alloc(devm_resource_release, sizeof(*ptr), GFP_KERNEL); if (!ptr) return -ENOMEM; *ptr = new; conflict = request_resource_conflict(root, new); if (conflict) { dev_err(dev, "resource collision: %pR conflicts with %s %pR\n", new, conflict->name, conflict); devres_free(ptr); return -EBUSY; } devres_add(dev, ptr); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Thierry Reding107100.00%1100.00%
Total107100.00%1100.00%

EXPORT_SYMBOL(devm_request_resource);
static int devm_resource_match(struct device *dev, void *res, void *data) { struct resource **ptr = res; return *ptr == data; }

Contributors

PersonTokensPropCommitsCommitProp
Thierry Reding33100.00%1100.00%
Total33100.00%1100.00%

/** * devm_release_resource() - release a previously requested resource * @dev: device for which to release the resource * @new: descriptor of the resource to release * * Releases a resource previously requested using devm_request_resource(). */
void devm_release_resource(struct device *dev, struct resource *new) { WARN_ON(devres_release(dev, devm_resource_release, devm_resource_match, new)); }

Contributors

PersonTokensPropCommitsCommitProp
Thierry Reding29100.00%1100.00%
Total29100.00%1100.00%

EXPORT_SYMBOL(devm_release_resource); struct region_devres { struct resource *parent; resource_size_t start; resource_size_t n; };
static void devm_region_release(struct device *dev, void *res) { struct region_devres *this = res; __release_region(this->parent, this->start, this->n); }

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo37100.00%1100.00%
Total37100.00%1100.00%


static int devm_region_match(struct device *dev, void *res, void *match_data) { struct region_devres *this = res, *match = match_data; return this->parent == match->parent && this->start == match->start && this->n == match->n; }

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo56100.00%1100.00%
Total56100.00%1100.00%


struct resource * __devm_request_region(struct device *dev, struct resource *parent, resource_size_t start, resource_size_t n, const char *name) { struct region_devres *dr = NULL; struct resource *res; dr = devres_alloc(devm_region_release, sizeof(struct region_devres), GFP_KERNEL); if (!dr) return NULL; dr->parent = parent; dr->start = start; dr->n = n; res = __request_region(parent, start, n, name, 0); if (res) devres_add(dev, dr); else devres_free(dr); return res; }

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo11498.28%150.00%
Arjan van de Ven21.72%150.00%
Total116100.00%2100.00%

EXPORT_SYMBOL(__devm_request_region);
void __devm_release_region(struct device *dev, struct resource *parent, resource_size_t start, resource_size_t n) { struct region_devres match_data = { parent, start, n }; __release_region(parent, start, n); WARN_ON(devres_destroy(dev, devm_region_release, devm_region_match, &match_data)); }

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo57100.00%1100.00%
Total57100.00%1100.00%

EXPORT_SYMBOL(__devm_release_region); /* * Called from init/main.c to reserve IO ports. */ #define MAXRESERVE 4
static int __init reserve_setup(char *str) { static int reserved; static struct resource reserve[MAXRESERVE]; for (;;) { unsigned int io_start, io_num; int x = reserved; if (get_option (&str, &io_start) != 2) break; if (get_option (&str, &io_num) == 0) break; if (x < MAXRESERVE) { struct resource *res = reserve + x; res->name = "reserved"; res->start = io_start; res->end = io_start + io_num - 1; res->flags = IORESOURCE_BUSY; res->desc = IORES_DESC_NONE; res->child = NULL; if (request_resource(res->start >= 0x10000 ? &iomem_resource : &ioport_resource, res) == 0) reserved = x+1; } } return 1; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)13385.26%770.00%
Linus Torvalds1610.26%110.00%
Toshi Kani63.85%110.00%
Rui Zhang10.64%110.00%
Total156100.00%10100.00%

__setup("reserve=", reserve_setup); /* * Check if the requested addr and size spans more than any slot in the * iomem resource tree. */
int iomem_map_sanity_check(resource_size_t addr, unsigned long size) { struct resource *p = &iomem_resource; int err = 0; loff_t l; read_lock(&resource_lock); for (p = p->child; p ; p = r_next(NULL, p, &l)) { /* * We can probably skip the resources without * IORESOURCE_IO attribute? */ if (p->start >= addr + size) continue; if (p->end < addr) continue; if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1)) continue; /* * if a resource is "BUSY", it's not a hardware resource * but a driver mapping of such a resource; we don't want * to warn for those; some drivers legitimately map only * partial hardware resources. (example: vesafb) */ if (p->flags & IORESOURCE_BUSY) continue; printk(KERN_WARNING "resource sanity check: requesting [mem %#010llx-%#010llx], which spans more than %s %pR\n", (unsigned long long)addr, (unsigned long long)(addr + size - 1), p->name, p); err = -1; break; } read_unlock(&resource_lock); return err; }

Contributors

PersonTokensPropCommitsCommitProp
Suresh B. Siddha14385.63%240.00%
Ingo Molnar127.19%120.00%
Arjan van de Ven105.99%120.00%
Björn Helgaas21.20%120.00%
Total167100.00%5100.00%

#ifdef CONFIG_STRICT_DEVMEM static int strict_iomem_checks = 1; #else static int strict_iomem_checks; #endif /* * check if an address is reserved in the iomem resource tree * returns 1 if reserved, 0 if not reserved. */
int iomem_is_exclusive(u64 addr) { struct resource *p = &iomem_resource; int err = 0; loff_t l; int size = PAGE_SIZE; if (!strict_iomem_checks) return 0; addr = addr & PAGE_MASK; read_lock(&resource_lock); for (p = p->child; p ; p = r_next(NULL, p, &l)) { /* * We can probably skip the resources without * IORESOURCE_IO attribute? */ if (p->start >= addr + size) break; if (p->end < addr) continue; /* * A resource is exclusive if IORESOURCE_EXCLUSIVE is set * or CONFIG_IO_STRICT_DEVMEM is enabled and the * resource is busy. */ if ((p->flags & IORESOURCE_BUSY) == 0) continue; if (IS_ENABLED(CONFIG_IO_STRICT_DEVMEM) || p->flags & IORESOURCE_EXCLUSIVE) { err = 1; break; } } read_unlock(&resource_lock); return err; }

Contributors

PersonTokensPropCommitsCommitProp
Arjan van de Ven12389.78%150.00%
Dan J Williams1410.22%150.00%
Total137100.00%2100.00%


struct resource_entry *resource_list_create_entry(struct resource *res, size_t extra_size) { struct resource_entry *entry; entry = kzalloc(sizeof(*entry) + extra_size, GFP_KERNEL); if (entry) { INIT_LIST_HEAD(&entry->node); entry->res = res ? res : &entry->__res; } return entry; }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu65100.00%1100.00%
Total65100.00%1100.00%

EXPORT_SYMBOL(resource_list_create_entry);
void resource_list_free(struct list_head *head) { struct resource_entry *entry, *tmp; list_for_each_entry_safe(entry, tmp, head, node) resource_list_destroy_entry(entry); }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu33100.00%1100.00%
Total33100.00%1100.00%

EXPORT_SYMBOL(resource_list_free);
static int __init strict_iomem(char *str) { if (strstr(str, "relaxed")) strict_iomem_checks = 0; if (strstr(str, "strict")) strict_iomem_checks = 1; return 1; }

Contributors

PersonTokensPropCommitsCommitProp
Arjan van de Ven40100.00%1100.00%
Total40100.00%1100.00%

__setup("iomem=", strict_iomem);

Overall Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)100315.22%1915.20%
Toshi Kani73811.20%129.60%
Ram Pai3885.89%21.60%
Yinghai Lu3465.25%32.40%
Kamezawa Hiroyuki3375.11%54.00%
Tejun Heo2944.46%10.80%
Linus Torvalds2834.29%75.60%
Al Viro2744.16%10.80%
Björn Helgaas2563.88%129.60%
Thierry Reding2103.19%10.80%
Arjan van de Ven2093.17%21.60%
Vivek Goyal2023.06%21.60%
Matthew Wilcox1862.82%21.60%
Tom Lendacky1822.76%32.40%
Benjamin Herrenschmidt1732.62%10.80%
Yasuaki Ishimatsu1672.53%10.80%
Randy Dunlap1622.46%43.20%
Suresh B. Siddha1472.23%21.60%
Octavian Purdila1251.90%10.80%
T Makphaibulchoke1121.70%10.80%
Jiang Liu1111.68%10.80%
Dan J Williams1011.53%21.60%
Alan Cox811.23%10.80%
Mike Travis761.15%10.80%
Geert Uytterhoeven630.96%10.80%
Fengguang Wu590.90%21.60%
Ivan Kokshaysky470.71%21.60%
Andrew Morton460.70%43.20%
Arnaldo Carvalho de Melo370.56%10.80%
Greg Kroah-Hartman340.52%32.40%
Dominik Brodowski330.50%32.40%
Art Haas260.39%10.80%
Ingo Molnar230.35%21.60%
Huang Shijie130.20%10.80%
Denis V. Lunev60.09%10.80%
Simon Guinot60.09%10.80%
Américo Wang50.08%10.80%
Chen Gong50.08%10.80%
Thomas Gleixner40.06%10.80%
Nick Wilson40.06%10.80%
Magnus Damm30.05%10.80%
Helge Deller30.05%10.80%
Lennert Buytenhek20.03%10.80%
Yasunori Goto20.03%10.80%
Cory Watson10.02%10.80%
Paul Gortmaker10.02%10.80%
DaeSeok Youn10.02%10.80%
Wei Yang10.02%10.80%
Rui Zhang10.02%10.80%
Jakub Sitnicki10.02%10.80%
Paul Mundt10.02%10.80%
Adrian Bunk10.02%10.80%
Total6592100.00%125100.00%
Directory: kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.