VERSION = 2
PATCHLEVEL = 1
-SUBLEVEL = 79
+SUBLEVEL = 80
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
L_OBJS += ide-probe.o
else
ifeq ($(CONFIG_BLK_DEV_IDE),m)
- MX_OBJS += ide.o
+ MIX_OBJS += ide.o
ifeq ($(CONFIG_PROC_FS),y)
M_OBJS += ide-proc.o
endif
- M_OBJS += ide-probe.o
+ M_OBJS += ide-mod.o
+ MX_OBJS += ide-probe.o
endif
endif
L_OBJS += ps2esdi.o
endif
-
ifeq ($(CONFIG_BLK_DEV_DTC2278),y)
L_OBJS += dtc2278.o
endif
endif
include $(TOPDIR)/Rules.make
+
+ide-mod.o: ide.o ide-proc.o
+ $(LD) $(LD_RFLAG) -r -o $@ ide.o ide-proc.o
return digit;
}
-static int ide_getdigit(char c)
-{
- int digit;
- if (isdigit(c))
- digit = c - '0';
- else
- digit = -1;
- return digit;
-}
-
static int xx_xx_parse_error (const char *data, unsigned long len, const char *msg)
{
char errbuf[16];
return xx_xx_parse_error(start, startn, msg);
}
-static int proc_ide_read_drivers
- (char *page, char **start, off_t off, int count, int *eof, void *data)
-{
- char *out = page;
- int len;
- ide_module_t *p = ide_modules;
- ide_driver_t *driver;
-
- while (p) {
- driver = (ide_driver_t *) p->info;
- if (p->type == IDE_DRIVER_MODULE && driver)
- out += sprintf(out, "%s version %s\n", driver->name, driver->version);
- p = p->next;
- }
- len = out - page;
- PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
-}
-
static int proc_ide_read_config
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
}
#endif /* CONFIG_PCI */
+static int ide_getdigit(char c)
+{
+ int digit;
+ if (isdigit(c))
+ digit = c - '0';
+ else
+ digit = -1;
+ return digit;
+}
+
+static int proc_ide_read_drivers
+ (char *page, char **start, off_t off, int count, int *eof, void *data)
+{
+ char *out = page;
+ int len;
+ ide_module_t *p = ide_modules;
+ ide_driver_t *driver;
+
+ while (p) {
+ driver = (ide_driver_t *) p->info;
+ if (p->type == IDE_DRIVER_MODULE && driver)
+ out += sprintf(out, "%s version %s\n", driver->name, driver->version);
+ p = p->next;
+ }
+ len = out - page;
+ PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
+}
+
static int proc_ide_read_type
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
endif
endif
-ifdef CONFIG_SB
-ifneq ($(CONFIG_UART401),Y)
-CONFIG_UART401=y
-endif
+
+
+ifdef CONFIG_SB
+ ifeq ($(CONFIG_SB),m)
+ ifneq ($(CONFIG_UART401),Y)
+ CONFIG_UART401=m
+ endif
+ else
+ ifneq ($(CONFIG_UART401),Y)
+ CONFIG_UART401=y
+ endif
+ endif
endif
ifdef CONFIG_TRIX
struct list_head i_dentry;
unsigned long i_ino;
+ unsigned long i_count;
kdev_t i_dev;
- unsigned short i_count;
umode_t i_mode;
nlink_t i_nlink;
uid_t i_uid;
NULL, NULL \
}
+/* Maximum number of active map areas.. This is a random (large) number */
+#define MAX_MAP_COUNT (65536)
+
struct mm_struct {
struct vm_area_struct *mmap, *mmap_cache;
pgd_t * pgd;
- int count;
+ int count, map_count;
struct semaphore mmap_sem;
unsigned long context;
unsigned long start_code, end_code, start_data, end_data;
};
#define INIT_MM { \
- &init_mmap, NULL, swapper_pg_dir, 1, \
+ &init_mmap, NULL, swapper_pg_dir, 1, 1, \
MUTEX, \
0, \
0, 0, 0, 0, \
*tmp = *mpnt;
tmp->vm_flags &= ~VM_LOCKED;
tmp->vm_mm = mm;
+ mm->map_count++;
tmp->vm_next = NULL;
dentry = tmp->vm_dentry;
if (dentry) {
*mm = *current->mm;
init_new_context(mm);
mm->count = 1;
+ mm->map_count = 0;
mm->def_flags = 0;
mm->mmap_sem = MUTEX;
/*
if (off + len < off)
return -EINVAL;
+ /* Too many mappings? */
+ if (mm->map_count > MAX_MAP_COUNT)
+ return -ENOMEM;
+
/* mlock MCL_FUTURE? */
if (mm->def_flags & VM_LOCKED) {
unsigned long locked = mm->locked_vm << PAGE_SHIFT;
*/
int do_munmap(unsigned long addr, size_t len)
{
+ struct mm_struct * mm;
struct vm_area_struct *mpnt, *next, *free, *extra;
int freed;
* every area affected in some way (by any overlap) is put
* on the list. If nothing is put on, nothing is affected.
*/
- mpnt = current->mm->mmap;
+ mm = current->mm;
+ mpnt = mm->mmap;
while(mpnt && mpnt->vm_end <= addr)
mpnt = mpnt->vm_next;
if (!mpnt)
free = free->vm_next;
freed = 1;
+ mm->map_count--;
remove_shared_vm_struct(mpnt);
st = addr < mpnt->vm_start ? mpnt->vm_start : addr;
if (mpnt->vm_ops && mpnt->vm_ops->unmap)
mpnt->vm_ops->unmap(mpnt, st, size);
- flush_cache_range(current->mm, st, end);
- zap_page_range(current->mm, st, size);
- flush_tlb_range(current->mm, st, end);
+ flush_cache_range(mm, st, end);
+ zap_page_range(mm, st, size);
+ flush_tlb_range(mm, st, end);
/*
* Fix the mapping, and free the old area if it wasn't reused.
kmem_cache_free(vm_area_cachep, extra);
if (freed)
- current->mm->mmap_cache = NULL; /* Kill the cache. */
+ mm->mmap_cache = NULL; /* Kill the cache. */
return 0;
}
if (mpnt->vm_ops->close)
mpnt->vm_ops->close(mpnt);
}
+ mm->map_count--;
remove_shared_vm_struct(mpnt);
zap_page_range(mm, start, size);
if (mpnt->vm_dentry)
kmem_cache_free(vm_area_cachep, mpnt);
mpnt = next;
}
+
+ /* This is just debugging */
+ if (mm->map_count)
+ printk("exit_mmap: map count is %d\n", mm->map_count);
}
/* Insert vm structure into process list sorted by address
struct vm_area_struct **pprev = &mm->mmap;
struct dentry * dentry;
+ mm->map_count++;
+
/* Find where to link it in. */
while(*pprev && (*pprev)->vm_start <= vmp->vm_start)
pprev = &(*pprev)->vm_next;
mpnt->vm_start = mpnt->vm_end;
mpnt->vm_ops->close(mpnt);
}
+ mm->map_count--;
remove_shared_vm_struct(mpnt);
if (mpnt->vm_dentry)
dput(mpnt->vm_dentry);
ic_bootp_string(root_server_path, ext+1, *ext, sizeof(root_server_path));
break;
}
-
- if (ic_gateway == INADDR_NONE && b->relay_ip)
- ic_gateway = b->relay_ip;
}