diff options
Diffstat (limited to 'linux/dev/glue')
-rw-r--r-- | linux/dev/glue/block.c | 10 | ||||
-rw-r--r-- | linux/dev/glue/glue.h | 44 | ||||
-rw-r--r-- | linux/dev/glue/kmem.c | 4 | ||||
-rw-r--r-- | linux/dev/glue/misc.c | 6 | ||||
-rw-r--r-- | linux/dev/glue/net.c | 6 |
5 files changed, 54 insertions, 16 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index f28644e..c995638 100644 --- a/linux/dev/glue/block.c +++ b/linux/dev/glue/block.c @@ -61,6 +61,7 @@ #include <device/disk_status.h> #include <device/device_reply.user.h> #include <device/device_emul.h> +#include <device/ds_routines.h> /* TODO. This should be fixed to not be i386 specific. */ #include <i386at/disk.h> @@ -78,9 +79,7 @@ #include <linux/hdreg.h> #include <asm/io.h> -extern int linux_auto_config; -extern int linux_intr_pri; -extern int linux_to_mach_error (int); +#include <linux/dev/glue/glue.h> /* This task queue is not used in Mach: just for fixing undefined symbols. */ DECLARE_TASK_QUEUE (tq_disk); @@ -193,9 +192,6 @@ int read_ahead[MAX_BLKDEV] = {0, }; This is unused in Mach. It is here to make drivers compile. */ struct wait_queue *wait_for_request = NULL; -/* Map for allocating device memory. */ -extern vm_map_t device_io_map; - /* Initialize block drivers. */ int blk_dev_init () @@ -276,8 +272,6 @@ unregister_blkdev (unsigned major, const char *name) void set_blocksize (kdev_t dev, int size) { - extern int *blksize_size[]; - if (! blksize_size[MAJOR (dev)]) return; diff --git a/linux/dev/glue/glue.h b/linux/dev/glue/glue.h new file mode 100644 index 0000000..5d4f6d8 --- /dev/null +++ b/linux/dev/glue/glue.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2011 Free Software Foundation + * + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the program ; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef LINUX_DEV_GLUE_GLUE_H +#define LINUX_DEV_GLUE_GLUE_H + +#include <vm/vm_types.h> +#include <mach/machine/vm_types.h> + +extern int linux_auto_config; +extern int linux_intr_pri; + +extern void *alloc_contig_mem (unsigned, unsigned, unsigned, vm_page_t *); +extern void free_contig_mem (vm_page_t); +extern void init_IRQ (void); +extern void restore_IRQ (void); +extern void linux_kmem_init (void); +extern void linux_net_emulation_init (void); +extern void device_setup (void); +extern void linux_timer_intr (void); +extern void linux_bad_intr (int); +extern void linux_sched_init (void); +extern void pcmcia_init (void); +extern void linux_soft_intr (void); +extern int issig (void); +extern int linux_to_mach_error (int); +extern char *get_options(char *str, int *ints); + +#endif /* LINUX_DEV_GLUE_GLUE_H */ diff --git a/linux/dev/glue/kmem.c b/linux/dev/glue/kmem.c index 8c21ce7..d1784a5 100644 --- a/linux/dev/glue/kmem.c +++ b/linux/dev/glue/kmem.c @@ -29,6 +29,7 @@ #include <kern/assert.h> #include <kern/kalloc.h> +#include <kern/printf.h> #include <vm/vm_page.h> #include <vm/vm_kern.h> @@ -40,8 +41,7 @@ #include <asm/system.h> -extern void *alloc_contig_mem (unsigned, unsigned, unsigned, vm_page_t *); -extern int printf (const char *, ...); +#include <linux/dev/glue/glue.h> /* Amount of memory to reserve for Linux memory allocator. We reserve 64K chunks to stay within DMA limits. diff --git a/linux/dev/glue/misc.c b/linux/dev/glue/misc.c index b467650..98c8248 100644 --- a/linux/dev/glue/misc.c +++ b/linux/dev/glue/misc.c @@ -53,6 +53,7 @@ #include <sys/types.h> #include <mach/vm_param.h> #include <kern/thread.h> +#include <kern/printf.h> #include <vm/vm_map.h> #include <vm/vm_page.h> #include <device/device_types.h> @@ -66,10 +67,7 @@ #include <linux/blk.h> #include <linux/proc_fs.h> #include <linux/kernel_stat.h> - -extern boolean_t vm_map_lookup_entry (register vm_map_t, register vm_offset_t, - vm_map_entry_t *); -extern int printf (const char *, ...); +#include <linux/dev/glue/glue.h> int (*dispatch_scsi_info_ptr) (int ino, char *buffer, char **start, off_t offset, int length, int inout) = 0; diff --git a/linux/dev/glue/net.c b/linux/dev/glue/net.c index acb31ae..91ebf96 100644 --- a/linux/dev/glue/net.c +++ b/linux/dev/glue/net.c @@ -69,6 +69,8 @@ #include <mach/vm_param.h> #include <mach/notify.h> +#include <kern/printf.h> + #include <ipc/ipc_port.h> #include <ipc/ipc_space.h> @@ -84,6 +86,7 @@ #include <device/net_io.h> #include <device/device_reply.user.h> #include <device/device_emul.h> +#include <device/ds_routines.h> #define MACH_INCLUDE #include <linux/kernel.h> @@ -97,7 +100,7 @@ #include <linux/etherdevice.h> #include <linux/wireless.h> -extern int linux_intr_pri; +#include <linux/dev/glue/glue.h> /* One of these is associated with each instance of a device. */ struct net_data @@ -248,7 +251,6 @@ void dev_kfree_skb (struct sk_buff *skb, int mode) { unsigned flags; - extern void *io_done_list; /* Queue sk_buff on done list if there is a page list attached or we need to send a reply. |