patch-2.3.29 linux/kernel/resource.c
Next file: linux/kernel/sched.c
Previous file: linux/kernel/module.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Tue Nov 23 10:10:38 1999
- Orig file:
v2.3.28/linux/kernel/resource.c
- Orig date:
Thu Nov 11 20:11:54 1999
diff -u --recursive --new-file v2.3.28/linux/kernel/resource.c linux/kernel/resource.c
@@ -126,7 +126,7 @@
static int find_resource(struct resource *root, struct resource *new,
unsigned long size,
unsigned long min, unsigned long max,
- unsigned long align)
+ unsigned long align, struct pci_dev * dev)
{
struct resource *this = root->child;
unsigned long start, end;
@@ -142,6 +142,7 @@
if (end > max)
end = max;
start = (start + align - 1) & ~(align - 1);
+ start = resource_fixup (dev, new, start, size);
if (start < end && end - start + 1 >= size) {
new->start = start;
new->end = start + size - 1;
@@ -161,12 +162,12 @@
int allocate_resource(struct resource *root, struct resource *new,
unsigned long size,
unsigned long min, unsigned long max,
- unsigned long align)
+ unsigned long align, struct pci_dev * dev)
{
int err;
write_lock(&resource_lock);
- err = find_resource(root, new, size, min, max, align);
+ err = find_resource(root, new, size, min, max, align, dev);
if (err >= 0 && __request_resource(root, new))
err = -EBUSY;
write_unlock(&resource_lock);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)