diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-11-10 17:36:07 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-11-10 17:41:15 +0100 |
commit | e45601b0780b2c81a6448cdafd952cb98112b9f4 (patch) | |
tree | 2f980cbf0cdad3b51a65dfd8d75761671c4b8093 /linux | |
parent | 7f51764417ba51667ad5bfa0c1756eba4c1a8ad4 (diff) | |
download | gnumach-e45601b0780b2c81a6448cdafd952cb98112b9f4.tar.gz gnumach-e45601b0780b2c81a6448cdafd952cb98112b9f4.tar.bz2 gnumach-e45601b0780b2c81a6448cdafd952cb98112b9f4.zip |
spl: Remove intpri array
And simplify prtnull vs intnull vs linux_bad_intr.
* i386/i386/ipl.h (intpri): Remove declaration
* i386/i386/pic.c (prtnull_count): Remove variable.
(prtnull): Remove function.
* i386/i386/pic.h (prtnull): Remove declaration.
* i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Use ivect instead of
intpri to determine irq availability. Do not set intpri.
* i386/i386at/pic_isa.c (ivect): Replace prtnull with intnull.
(intpri): Remove array.
* linux/dev/arch/i386/kernel/irq.c (linux_intr_pri): Remove variable.
(linux_bad_intr): Remove function.
(setup_x86_irq): Do not check intpri coherency. Do not set intpri. Set
default ivect to intnull instead of linux_bad_intr.
(probe_irq_on): Check ivect against intnull instead of linux_bad_intr.
Do not set intpri.
(probe_irq_off): Likewise.
(reserve_mach_irqs): Do not check against prtnull.
(old_clock_pri): Remove variable.
(init_IRQ): Do not set intpri. Do not set ivect to linux_bad_intr.
(restore_IRQ): Do not set ivect.
* i386/i386/pit.c (clkstart): Do not set intpri.
* i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise.
* linux/dev/drivers/block/genhd.c (device_setup): Do not set linux_intr_pri.
* linux/dev/glue/block.c (init_partition, device_open): Likewise.
* linux/dev/glue/net.c (device_open): Likewise.
* linux/dev/glue/glue.h (linux_intr_pri, linux_bad_intr): Remove
declarations.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/dev/arch/i386/kernel/irq.c | 52 | ||||
-rw-r--r-- | linux/dev/drivers/block/genhd.c | 6 | ||||
-rw-r--r-- | linux/dev/glue/block.c | 2 | ||||
-rw-r--r-- | linux/dev/glue/glue.h | 2 | ||||
-rw-r--r-- | linux/dev/glue/net.c | 1 |
5 files changed, 4 insertions, 59 deletions
diff --git a/linux/dev/arch/i386/kernel/irq.c b/linux/dev/arch/i386/kernel/irq.c index 596dae6b..75f8f812 100644 --- a/linux/dev/arch/i386/kernel/irq.c +++ b/linux/dev/arch/i386/kernel/irq.c @@ -63,13 +63,6 @@ unsigned int local_irq_count[NR_CPUS]; int EISA_bus = 0; /* - * Priority at which a Linux handler should be called. - * This is used at the time of an IRQ allocation. It is - * set by emulation routines for each class of device. - */ -spl_t linux_intr_pri; - -/* * Flag indicating an interrupt is being handled. */ unsigned int intr_count = 0; @@ -191,15 +184,6 @@ enable_irq (unsigned int irq_nr) restore_flags (flags); } -/* - * Default interrupt handler for Linux. - */ -void -linux_bad_intr (int irq) -{ - mask_irq (irq); -} - static int setup_x86_irq (int irq, struct linux_action *new) { @@ -218,10 +202,6 @@ setup_x86_irq (int irq, struct linux_action *new) if ((old->flags ^ new->flags) & SA_INTERRUPT) return (-EBUSY); - /* Can't share at different levels */ - if (intpri[irq] && linux_intr_pri != intpri[irq]) - return (-EBUSY); - /* add new interrupt at end of irq queue */ do { @@ -240,7 +220,6 @@ setup_x86_irq (int irq, struct linux_action *new) { ivect[irq] = linux_intr; iunit[irq] = irq; - intpri[irq] = linux_intr_pri; unmask_irq (irq); } restore_flags (flags); @@ -306,9 +285,8 @@ free_irq (unsigned int irq, void *dev_id) if (!irq_action[irq]) { mask_irq (irq); - ivect[irq] = linux_bad_intr; + ivect[irq] = intnull; iunit[irq] = irq; - intpri[irq] = SPL0; } restore_flags (flags); linux_kfree (action); @@ -334,9 +312,8 @@ probe_irq_on (void) */ for (i = 15; i > 0; i--) { - if (!irq_action[i] && ivect[i] == linux_bad_intr) + if (!irq_action[i] && ivect[i] == intnull) { - intpri[i] = linux_intr_pri; enable_irq (i); irqs |= 1 << i; } @@ -368,10 +345,9 @@ probe_irq_off (unsigned long irqs) */ for (i = 15; i > 0; i--) { - if (!irq_action[i] && ivect[i] == linux_bad_intr) + if (!irq_action[i] && ivect[i] == intnull) { disable_irq (i); - intpri[i] = SPL0; } } @@ -409,7 +385,7 @@ reserve_mach_irqs (void) for (i = 0; i < 16; i++) { - if (ivect[i] != prtnull && ivect[i] != intnull) + if (ivect[i] != intnull) /* This dummy action does not specify SA_SHIRQ, so setup_x86_irq will not try to add a handler to this slot. Therefore, the cast is safe. */ @@ -688,12 +664,10 @@ void __global_restore_flags(unsigned long flags) #endif static void (*old_clock_handler) (); -static int old_clock_pri; void init_IRQ (void) { - int i; char *p; int latch = (CLKNUM + hz / 2) / hz; @@ -713,27 +687,10 @@ init_IRQ (void) * Install our clock interrupt handler. */ old_clock_handler = ivect[0]; - old_clock_pri = intpri[0]; ivect[0] = linux_timer_intr; - intpri[0] = SPLHI; reserve_mach_irqs (); - for (i = 1; i < 16; i++) - { - /* - * irq2 and irq13 should be igonored. - */ - if (i == 2 || i == 13) - continue; - if (ivect[i] == prtnull || ivect[i] == intnull) - { - ivect[i] = linux_bad_intr; - iunit[i] = i; - intpri[i] = SPL0; - } - } - /* * Enable interrupts. */ @@ -771,6 +728,5 @@ restore_IRQ (void) * Restore clock interrupt handler. */ ivect[0] = old_clock_handler; - intpri[0] = old_clock_pri; } diff --git a/linux/dev/drivers/block/genhd.c b/linux/dev/drivers/block/genhd.c index 3a861386..f38654b6 100644 --- a/linux/dev/drivers/block/genhd.c +++ b/linux/dev/drivers/block/genhd.c @@ -774,9 +774,6 @@ void device_setup(void) char *c, *param, *white; struct gendisk *p; int nr=0; -#ifdef MACH - linux_intr_pri = SPL6; -#endif for (c = kernel_cmdline; c; ) { @@ -809,9 +806,6 @@ void device_setup(void) scsi_dev_init(); #endif #ifdef CONFIG_INET -#ifdef MACH - linux_intr_pri = SPL6; -#endif net_dev_init(); #endif #ifndef MACH diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index 0a5b1c87..a8cb9b3f 100644 --- a/linux/dev/glue/block.c +++ b/linux/dev/glue/block.c @@ -943,7 +943,6 @@ init_partition (struct name_map *np, kdev_t *dev, if (gd->part[MINOR (d->inode.i_rdev)].nr_sects <= 0 || gd->part[MINOR (d->inode.i_rdev)].start_sect < 0) continue; - linux_intr_pri = SPL6; d->file.f_flags = 0; d->file.f_mode = O_RDONLY; if (ds->fops->open && (*ds->fops->open) (&d->inode, &d->file)) @@ -1089,7 +1088,6 @@ device_open (ipc_port_t reply_port, mach_msg_type_name_t reply_port_type, if (ds->fops->open) { td.inode.i_rdev = dev; - linux_intr_pri = SPL6; err = (*ds->fops->open) (&td.inode, &td.file); if (err) { diff --git a/linux/dev/glue/glue.h b/linux/dev/glue/glue.h index 8cb118cc..e94ff556 100644 --- a/linux/dev/glue/glue.h +++ b/linux/dev/glue/glue.h @@ -23,7 +23,6 @@ #include <mach/machine/vm_types.h> extern int linux_auto_config; -extern int linux_intr_pri; extern unsigned long alloc_contig_mem (unsigned, unsigned, unsigned, vm_page_t *); extern void free_contig_mem (vm_page_t, unsigned); @@ -33,7 +32,6 @@ 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); diff --git a/linux/dev/glue/net.c b/linux/dev/glue/net.c index 8a84bb46..dd80622c 100644 --- a/linux/dev/glue/net.c +++ b/linux/dev/glue/net.c @@ -380,7 +380,6 @@ device_open (ipc_port_t reply_port, mach_msg_type_name_t reply_port_type, if (dev->open) { - linux_intr_pri = SPL6; if ((*dev->open) (dev)) err = D_NO_SUCH_DEVICE; } |