Commit 4b07ff6f authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k initializers cleanup

M68k: Clean up initializers:
  - Convert struct/array initializers to C99 style
  - Do not initialize data to 0 or NULL explicitly so it can move to bss
parent 2564f5f5
...@@ -61,11 +61,25 @@ extern int cia_get_irq_list(struct ciabase *base, struct seq_file *p); ...@@ -61,11 +61,25 @@ extern int cia_get_irq_list(struct ciabase *base, struct seq_file *p);
static irq_node_t *ami_irq_list[AMI_STD_IRQS]; static irq_node_t *ami_irq_list[AMI_STD_IRQS];
static unsigned short amiga_intena_vals[AMI_STD_IRQS] = { static unsigned short amiga_intena_vals[AMI_STD_IRQS] = {
IF_VERTB, IF_COPER, IF_AUD0, IF_AUD1, IF_AUD2, IF_AUD3, IF_BLIT, [IRQ_AMIGA_VERTB] = IF_VERTB,
IF_DSKSYN, IF_DSKBLK, IF_RBF, IF_TBE, IF_SOFT, IF_PORTS, IF_EXTER [IRQ_AMIGA_COPPER] = IF_COPER,
[IRQ_AMIGA_AUD0] = IF_AUD0,
[IRQ_AMIGA_AUD1] = IF_AUD1,
[IRQ_AMIGA_AUD2] = IF_AUD2,
[IRQ_AMIGA_AUD3] = IF_AUD3,
[IRQ_AMIGA_BLIT] = IF_BLIT,
[IRQ_AMIGA_DSKSYN] = IF_DSKSYN,
[IRQ_AMIGA_DSKBLK] = IF_DSKBLK,
[IRQ_AMIGA_RBF] = IF_RBF,
[IRQ_AMIGA_TBE] = IF_TBE,
[IRQ_AMIGA_SOFT] = IF_SOFT,
[IRQ_AMIGA_PORTS] = IF_PORTS,
[IRQ_AMIGA_EXTER] = IF_EXTER
}; };
static const unsigned char ami_servers[AMI_STD_IRQS] = { static const unsigned char ami_servers[AMI_STD_IRQS] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 [IRQ_AMIGA_VERTB] = 1,
[IRQ_AMIGA_PORTS] = 1,
[IRQ_AMIGA_EXTER] = 1
}; };
static short ami_ablecount[AMI_IRQS]; static short ami_ablecount[AMI_IRQS];
...@@ -469,8 +483,14 @@ static irqreturn_t ami_int7(int irq, void *dev_id, struct pt_regs *fp) ...@@ -469,8 +483,14 @@ static irqreturn_t ami_int7(int irq, void *dev_id, struct pt_regs *fp)
} }
irqreturn_t (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { irqreturn_t (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
ami_badint, ami_int1, ami_badint, ami_int3, [0] = ami_badint,
ami_int4, ami_int5, ami_badint, ami_int7 [1] = ami_int1,
[2] = ami_badint,
[3] = ami_int3,
[4] = ami_int4,
[5] = ami_int5,
[6] = ami_badint,
[7] = ami_int7
}; };
int show_amiga_interrupts(struct seq_file *p, void *v) int show_amiga_interrupts(struct seq_file *p, void *v)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/amigahw.h> #include <asm/amigahw.h>
static unsigned short *snd_data = NULL; static unsigned short *snd_data;
static const signed char sine_data[] = { static const signed char sine_data[] = {
0, 39, 75, 103, 121, 127, 121, 103, 75, 39, 0, 39, 75, 103, 121, 127, 121, 103, 75, 39,
0, -39, -75, -103, -121, -127, -121, -103, -75, -39 0, -39, -75, -103, -121, -127, -121, -103, -75, -39
......
...@@ -31,15 +31,19 @@ struct ciabase { ...@@ -31,15 +31,19 @@ struct ciabase {
char *name; char *name;
irq_handler_t irq_list[CIA_IRQS]; irq_handler_t irq_list[CIA_IRQS];
} ciaa_base = { } ciaa_base = {
&ciaa, 0, 0, IF_PORTS, .cia = &ciaa,
IRQ_AMIGA_AUTO_2, IRQ_AMIGA_CIAA, .int_mask = IF_PORTS,
IRQ_AMIGA_PORTS, .handler_irq = IRQ_AMIGA_AUTO_2,
"CIAA handler" .cia_irq = IRQ_AMIGA_CIAA,
.server_irq = IRQ_AMIGA_PORTS,
.name = "CIAA handler"
}, ciab_base = { }, ciab_base = {
&ciab, 0, 0, IF_EXTER, .cia = &ciab,
IRQ_AMIGA_AUTO_6, IRQ_AMIGA_CIAB, .int_mask = IF_EXTER,
IRQ_AMIGA_EXTER, .handler_irq = IRQ_AMIGA_AUTO_6,
"CIAB handler" .cia_irq = IRQ_AMIGA_CIAB,
.server_irq = IRQ_AMIGA_EXTER,
.name = "CIAB handler"
}; };
/* /*
......
...@@ -63,8 +63,21 @@ static char s_cdtv[] __initdata = "CDTV"; ...@@ -63,8 +63,21 @@ static char s_cdtv[] __initdata = "CDTV";
static char s_cd32[] __initdata = "CD32"; static char s_cd32[] __initdata = "CD32";
static char s_draco[] __initdata = "Draco"; static char s_draco[] __initdata = "Draco";
static char *amiga_models[] __initdata = { static char *amiga_models[] __initdata = {
s_a500, s_a500p, s_a600, s_a1000, s_a1200, s_a2000, s_a2500, s_a3000, [AMI_500-AMI_500] = s_a500,
s_a3000t, s_a3000p, s_a4000, s_a4000t, s_cdtv, s_cd32, s_draco, [AMI_500PLUS-AMI_500] = s_a500p,
[AMI_600-AMI_500] = s_a600,
[AMI_1000-AMI_500] = s_a1000,
[AMI_1200-AMI_500] = s_a1200,
[AMI_2000-AMI_500] = s_a2000,
[AMI_2500-AMI_500] = s_a2500,
[AMI_3000-AMI_500] = s_a3000,
[AMI_3000T-AMI_500] = s_a3000t,
[AMI_3000PLUS-AMI_500] = s_a3000p,
[AMI_4000-AMI_500] = s_a4000,
[AMI_4000T-AMI_500] = s_a4000t,
[AMI_CDTV-AMI_500] = s_cdtv,
[AMI_CD32-AMI_500] = s_cd32,
[AMI_DRACO-AMI_500] = s_draco,
}; };
static char amiga_model_name[13] = "Amiga "; static char amiga_model_name[13] = "Amiga ";
...@@ -793,7 +806,7 @@ struct savekmsg { ...@@ -793,7 +806,7 @@ struct savekmsg {
char data[0]; char data[0];
}; };
static struct savekmsg *savekmsg = NULL; static struct savekmsg *savekmsg;
static void amiga_mem_console_write(struct console *co, const char *s, static void amiga_mem_console_write(struct console *co, const char *s,
unsigned int count) unsigned int count)
......
...@@ -49,11 +49,12 @@ static irqreturn_t dn_timer_int(int irq,void *, struct pt_regs *); ...@@ -49,11 +49,12 @@ static irqreturn_t dn_timer_int(int irq,void *, struct pt_regs *);
static irqreturn_t (*sched_timer_handler)(int, void *, struct pt_regs *)=NULL; static irqreturn_t (*sched_timer_handler)(int, void *, struct pt_regs *)=NULL;
static void dn_get_model(char *model); static void dn_get_model(char *model);
static const char *apollo_models[] = { static const char *apollo_models[] = {
"DN3000 (Otter)", [APOLLO_DN3000-APOLLO_DN3000] = "DN3000 (Otter)",
"DN3010 (Otter)", [APOLLO_DN3010-APOLLO_DN3000] = "DN3010 (Otter)",
"DN3500 (Cougar II)", [APOLLO_DN3500-APOLLO_DN3000] = "DN3500 (Cougar II)",
"DN4000 (Mink)", [APOLLO_DN4000-APOLLO_DN3000] = "DN4000 (Mink)",
"DN4500 (Roadrunner)" }; [APOLLO_DN4500-APOLLO_DN3000] = "DN4500 (Roadrunner)"
};
int apollo_parse_bootinfo(const struct bi_record *record) { int apollo_parse_bootinfo(const struct bi_record *record) {
......
...@@ -138,7 +138,7 @@ static struct irqparam irq_param[NUM_INT_SOURCES]; ...@@ -138,7 +138,7 @@ static struct irqparam irq_param[NUM_INT_SOURCES];
* (new vectors starting from 0x70 can be allocated by * (new vectors starting from 0x70 can be allocated by
* atari_register_vme_int()) * atari_register_vme_int())
*/ */
static int free_vme_vec_bitmap = 0; static int free_vme_vec_bitmap;
/* check for valid int number (complex, sigh...) */ /* check for valid int number (complex, sigh...) */
#define IS_VALID_INTNO(n) \ #define IS_VALID_INTNO(n) \
...@@ -233,38 +233,38 @@ BUILD_SLOW_IRQ(30); ...@@ -233,38 +233,38 @@ BUILD_SLOW_IRQ(30);
BUILD_SLOW_IRQ(31); BUILD_SLOW_IRQ(31);
asm_irq_handler slow_handlers[32] = { asm_irq_handler slow_handlers[32] = {
atari_slow_irq_0_handler, [0] = atari_slow_irq_0_handler,
atari_slow_irq_1_handler, [1] = atari_slow_irq_1_handler,
atari_slow_irq_2_handler, [2] = atari_slow_irq_2_handler,
atari_slow_irq_3_handler, [3] = atari_slow_irq_3_handler,
atari_slow_irq_4_handler, [4] = atari_slow_irq_4_handler,
atari_slow_irq_5_handler, [5] = atari_slow_irq_5_handler,
atari_slow_irq_6_handler, [6] = atari_slow_irq_6_handler,
atari_slow_irq_7_handler, [7] = atari_slow_irq_7_handler,
atari_slow_irq_8_handler, [8] = atari_slow_irq_8_handler,
atari_slow_irq_9_handler, [9] = atari_slow_irq_9_handler,
atari_slow_irq_10_handler, [10] = atari_slow_irq_10_handler,
atari_slow_irq_11_handler, [11] = atari_slow_irq_11_handler,
atari_slow_irq_12_handler, [12] = atari_slow_irq_12_handler,
atari_slow_irq_13_handler, [13] = atari_slow_irq_13_handler,
atari_slow_irq_14_handler, [14] = atari_slow_irq_14_handler,
atari_slow_irq_15_handler, [15] = atari_slow_irq_15_handler,
atari_slow_irq_16_handler, [16] = atari_slow_irq_16_handler,
atari_slow_irq_17_handler, [17] = atari_slow_irq_17_handler,
atari_slow_irq_18_handler, [18] = atari_slow_irq_18_handler,
atari_slow_irq_19_handler, [19] = atari_slow_irq_19_handler,
atari_slow_irq_20_handler, [20] = atari_slow_irq_20_handler,
atari_slow_irq_21_handler, [21] = atari_slow_irq_21_handler,
atari_slow_irq_22_handler, [22] = atari_slow_irq_22_handler,
atari_slow_irq_23_handler, [23] = atari_slow_irq_23_handler,
atari_slow_irq_24_handler, [24] = atari_slow_irq_24_handler,
atari_slow_irq_25_handler, [25] = atari_slow_irq_25_handler,
atari_slow_irq_26_handler, [26] = atari_slow_irq_26_handler,
atari_slow_irq_27_handler, [27] = atari_slow_irq_27_handler,
atari_slow_irq_28_handler, [28] = atari_slow_irq_28_handler,
atari_slow_irq_29_handler, [29] = atari_slow_irq_29_handler,
atari_slow_irq_30_handler, [30] = atari_slow_irq_30_handler,
atari_slow_irq_31_handler [31] = atari_slow_irq_31_handler
}; };
asmlinkage void atari_fast_irq_handler( void ); asmlinkage void atari_fast_irq_handler( void );
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
#include <asm/io.h> #include <asm/io.h>
u_long atari_mch_cookie; u_long atari_mch_cookie;
u_long atari_mch_type = 0; u_long atari_mch_type;
struct atari_hw_present atari_hw_present; struct atari_hw_present atari_hw_present;
u_long atari_switches = 0; u_long atari_switches;
int atari_dont_touch_floppy_select = 0; int atari_dont_touch_floppy_select;
int atari_rtc_year_offset; int atari_rtc_year_offset;
/* local function prototypes */ /* local function prototypes */
...@@ -99,7 +99,7 @@ hwreg_present_bywrite(volatile void *regp, unsigned char val) ...@@ -99,7 +99,7 @@ hwreg_present_bywrite(volatile void *regp, unsigned char val)
{ {
int ret; int ret;
long save_sp, save_vbr; long save_sp, save_vbr;
static long tmp_vectors[3] = { 0, 0, (long)&&after_test }; static long tmp_vectors[3] = { [2] = (long)&&after_test };
__asm__ __volatile__ __asm__ __volatile__
( "movec %/vbr,%2\n\t" /* save vbr value */ ( "movec %/vbr,%2\n\t" /* save vbr value */
......
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
extern char m68k_debug_device[]; extern char m68k_debug_device[];
/* Flag that Modem1 port is already initialized and used */ /* Flag that Modem1 port is already initialized and used */
int atari_MFP_init_done = 0; int atari_MFP_init_done;
/* Flag that Modem1 port is already initialized and used */ /* Flag that Modem1 port is already initialized and used */
int atari_SCC_init_done = 0; int atari_SCC_init_done;
/* Can be set somewhere, if a SCC master reset has already be done and should /* Can be set somewhere, if a SCC master reset has already be done and should
* not be repeated; used by kgdb */ * not be repeated; used by kgdb */
int atari_SCC_reset_done = 0; int atari_SCC_reset_done;
static struct console atari_console_driver = { static struct console atari_console_driver = {
.name = "debug", .name = "debug",
......
...@@ -299,10 +299,10 @@ static int hades_write_config_dword(struct pci_dev *dev, int where, u32 value) ...@@ -299,10 +299,10 @@ static int hades_write_config_dword(struct pci_dev *dev, int where, u32 value)
static void __init hades_fixup(int pci_modify) static void __init hades_fixup(int pci_modify)
{ {
char irq_tab[4] = { char irq_tab[4] = {
IRQ_TT_MFP_IO0, /* Slot 0. */ [0] = IRQ_TT_MFP_IO0, /* Slot 0. */
IRQ_TT_MFP_IO1, /* Slot 1. */ [1] = IRQ_TT_MFP_IO1, /* Slot 1. */
IRQ_TT_MFP_SCC, /* Slot 2. */ [2] = IRQ_TT_MFP_SCC, /* Slot 2. */
IRQ_TT_MFP_SCSIDMA /* Slot 3. */ [3] = IRQ_TT_MFP_SCSIDMA /* Slot 3. */
}; };
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
unsigned char slot; unsigned char slot;
......
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
static int stdma_locked = 0; /* the semaphore */ static int stdma_locked; /* the semaphore */
/* int func to be called */ /* int func to be called */
static irqreturn_t (*stdma_isr)(int, void *, struct pt_regs *) = NULL; static irqreturn_t (*stdma_isr)(int, void *, struct pt_regs *);
static void *stdma_isr_data = NULL; /* data passed to isr */ static void *stdma_isr_data; /* data passed to isr */
static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */ static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
......
...@@ -150,7 +150,7 @@ static void *stram_start, *stram_end; ...@@ -150,7 +150,7 @@ static void *stram_start, *stram_end;
/* set after memory_init() executed and allocations via start_mem aren't /* set after memory_init() executed and allocations via start_mem aren't
* possible anymore */ * possible anymore */
static int mem_init_done = 0; static int mem_init_done;
/* set if kernel is in ST-RAM */ /* set if kernel is in ST-RAM */
static int kernel_in_stram; static int kernel_in_stram;
...@@ -170,7 +170,7 @@ typedef struct stram_block { ...@@ -170,7 +170,7 @@ typedef struct stram_block {
#define BLOCK_INSWAP 0x10 /* block allocated in swap space */ #define BLOCK_INSWAP 0x10 /* block allocated in swap space */
/* list of allocated blocks */ /* list of allocated blocks */
static BLOCK *alloc_list = NULL; static BLOCK *alloc_list;
/* We can't always use kmalloc() to allocate BLOCK structures, since /* We can't always use kmalloc() to allocate BLOCK structures, since
* stram_alloc() can be called rather early. So we need some pool of * stram_alloc() can be called rather early. So we need some pool of
...@@ -210,9 +210,9 @@ static DECLARE_MUTEX(stram_swap_sem); ...@@ -210,9 +210,9 @@ static DECLARE_MUTEX(stram_swap_sem);
#define MAGIC_FILE_P (struct file *)0xffffdead #define MAGIC_FILE_P (struct file *)0xffffdead
#ifdef DO_PROC #ifdef DO_PROC
static unsigned stat_swap_read = 0; static unsigned stat_swap_read;
static unsigned stat_swap_write = 0; static unsigned stat_swap_write;
static unsigned stat_swap_force = 0; static unsigned stat_swap_force;
#endif /* DO_PROC */ #endif /* DO_PROC */
#endif /* CONFIG_STRAM_SWAP */ #endif /* CONFIG_STRAM_SWAP */
...@@ -967,7 +967,7 @@ void __init stram_swap_setup(char *str, int *ints) ...@@ -967,7 +967,7 @@ void __init stram_swap_setup(char *str, int *ints)
/* ST-RAM device */ /* ST-RAM device */
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
static int refcnt = 0; static int refcnt;
static void do_stram_request(request_queue_t *q) static void do_stram_request(request_queue_t *q)
{ {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
static unsigned char days_in_mo[] = static unsigned char days_in_mo[] =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static char rtc_status = 0; static char rtc_status;
static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg) unsigned long arg)
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
*/ */
/* we start with no entries in any list */ /* we start with no entries in any list */
static irq_node_t *hp300_irq_list[HP300_NUM_IRQS] = { [0 ... HP300_NUM_IRQS-1] = NULL }; static irq_node_t *hp300_irq_list[HP300_NUM_IRQS];
static spinlock_t irqlist_lock; static spinlock_t irqlist_lock;
...@@ -58,8 +58,13 @@ static irqreturn_t hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp) ...@@ -58,8 +58,13 @@ static irqreturn_t hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp)
} }
irqreturn_t (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { irqreturn_t (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
hp300_int_handler, hp300_int_handler, hp300_int_handler, hp300_int_handler, [0] = hp300_int_handler,
hp300_int_handler, hp300_int_handler, hp300_int_handler, NULL [1] = hp300_int_handler,
[2] = hp300_int_handler,
[3] = hp300_int_handler,
[4] = hp300_int_handler,
[5] = hp300_int_handler,
[6] = hp300_int_handler,
}; };
/* dev_id had better be unique to each handler because it's the only way we have /* dev_id had better be unique to each handler because it's the only way we have
......
...@@ -70,9 +70,9 @@ extern struct pci_bus_info *init_hades_pci(void); ...@@ -70,9 +70,9 @@ extern struct pci_bus_info *init_hades_pci(void);
static struct pci_bus_info *bus_info; static struct pci_bus_info *bus_info;
static int pci_modify = 1; /* If set, layout the PCI bus ourself. */ static int pci_modify = 1; /* If set, layout the PCI bus ourself. */
static int skip_vga = 0; /* If set do not modify base addresses static int skip_vga; /* If set do not modify base addresses
of vga cards.*/ of vga cards.*/
static int disable_pci_burst = 0; /* If set do not allow PCI bursts. */ static int disable_pci_burst; /* If set do not allow PCI bursts. */
static unsigned int io_base; static unsigned int io_base;
static unsigned int mem_base; static unsigned int mem_base;
......
...@@ -48,8 +48,14 @@ ...@@ -48,8 +48,14 @@
static irq_handler_t irq_list[SYS_IRQS]; static irq_handler_t irq_list[SYS_IRQS];
static const char *default_names[SYS_IRQS] = { static const char *default_names[SYS_IRQS] = {
"spurious int", "int1 handler", "int2 handler", "int3 handler", [0] = "spurious int",
"int4 handler", "int5 handler", "int6 handler", "int7 handler" [1] = "int1 handler",
[2] = "int2 handler",
[3] = "int3 handler",
[4] = "int4 handler",
[5] = "int5 handler",
[6] = "int6 handler",
[7] = "int7 handler"
}; };
/* The number of spurious interrupts */ /* The number of spurious interrupts */
......
...@@ -46,11 +46,25 @@ ...@@ -46,11 +46,25 @@
saved. Notice that usp has no stack-slot and needs to be treated saved. Notice that usp has no stack-slot and needs to be treated
specially (see get_reg/put_reg below). */ specially (see get_reg/put_reg below). */
static int regoff[] = { static int regoff[] = {
PT_REG(d1), PT_REG(d2), PT_REG(d3), PT_REG(d4), [0] = PT_REG(d1),
PT_REG(d5), SW_REG(d6), SW_REG(d7), PT_REG(a0), [1] = PT_REG(d2),
PT_REG(a1), PT_REG(a2), SW_REG(a3), SW_REG(a4), [2] = PT_REG(d3),
SW_REG(a5), SW_REG(a6), PT_REG(d0), -1, [3] = PT_REG(d4),
PT_REG(orig_d0), PT_REG(sr), PT_REG(pc), [4] = PT_REG(d5),
[5] = SW_REG(d6),
[6] = SW_REG(d7),
[7] = PT_REG(a0),
[8] = PT_REG(a1),
[9] = PT_REG(a2),
[10] = SW_REG(a3),
[11] = SW_REG(a4),
[12] = SW_REG(a5),
[13] = SW_REG(a6),
[14] = PT_REG(d0),
[15] = -1,
[16] = PT_REG(orig_d0),
[17] = PT_REG(sr),
[18] = PT_REG(pc),
}; };
/* /*
......
...@@ -49,17 +49,17 @@ unsigned long m68k_mmutype; ...@@ -49,17 +49,17 @@ unsigned long m68k_mmutype;
unsigned long vme_brdtype; unsigned long vme_brdtype;
#endif #endif
int m68k_is040or060 = 0; int m68k_is040or060;
extern int end; extern int end;
extern unsigned long availmem; extern unsigned long availmem;
int m68k_num_memory = 0; int m68k_num_memory;
int m68k_realnum_memory = 0; int m68k_realnum_memory;
unsigned long m68k_memoffset; unsigned long m68k_memoffset;
struct mem_info m68k_memory[NUM_MEMINFO]; struct mem_info m68k_memory[NUM_MEMINFO];
static struct mem_info m68k_ramdisk = { 0, 0 }; static struct mem_info m68k_ramdisk;
static char m68k_command_line[CL_SIZE]; static char m68k_command_line[CL_SIZE];
char saved_command_line[CL_SIZE]; char saved_command_line[CL_SIZE];
...@@ -69,34 +69,34 @@ char m68k_debug_device[6] = ""; ...@@ -69,34 +69,34 @@ char m68k_debug_device[6] = "";
void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) __initdata = NULL; void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent irq functions */ /* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL; void (*mach_init_IRQ) (void) __initdata = NULL;
irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL; irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
void (*mach_get_model) (char *model) = NULL; void (*mach_get_model) (char *model);
int (*mach_get_hardware_list) (char *buffer) = NULL; int (*mach_get_hardware_list) (char *buffer);
int (*mach_get_irq_list) (struct seq_file *, void *) = NULL; int (*mach_get_irq_list) (struct seq_file *, void *);
irqreturn_t (*mach_process_int) (int, struct pt_regs *) = NULL; irqreturn_t (*mach_process_int) (int, struct pt_regs *);
/* machine dependent timer functions */ /* machine dependent timer functions */
unsigned long (*mach_gettimeoffset) (void); unsigned long (*mach_gettimeoffset) (void);
int (*mach_hwclk) (int, struct rtc_time*) = NULL; int (*mach_hwclk) (int, struct rtc_time*);
int (*mach_set_clock_mmss) (unsigned long) = NULL; int (*mach_set_clock_mmss) (unsigned long);
unsigned int (*mach_get_ss)(void) = NULL; unsigned int (*mach_get_ss)(void);
int (*mach_get_rtc_pll)(struct rtc_pll_info *) = NULL; int (*mach_get_rtc_pll)(struct rtc_pll_info *);
int (*mach_set_rtc_pll)(struct rtc_pll_info *) = NULL; int (*mach_set_rtc_pll)(struct rtc_pll_info *);
void (*mach_reset)( void ); void (*mach_reset)( void );
void (*mach_halt)( void ) = NULL; void (*mach_halt)( void );
void (*mach_power_off)( void ) = NULL; void (*mach_power_off)( void );
long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
#if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY) #if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
void (*mach_floppy_setup) (char *, int *) __initdata = NULL; void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
#endif #endif
#ifdef CONFIG_HEARTBEAT #ifdef CONFIG_HEARTBEAT
void (*mach_heartbeat) (int) = NULL; void (*mach_heartbeat) (int);
EXPORT_SYMBOL(mach_heartbeat); EXPORT_SYMBOL(mach_heartbeat);
#endif #endif
#ifdef CONFIG_M68K_L2_CACHE #ifdef CONFIG_M68K_L2_CACHE
void (*mach_l2_flush) (int) = NULL; void (*mach_l2_flush) (int);
#endif #endif
#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
void (*mach_beep)(unsigned int, unsigned int) = NULL; void (*mach_beep)(unsigned int, unsigned int);
#endif #endif
#if defined(CONFIG_ISA) && defined(MULTI_ISA) #if defined(CONFIG_ISA) && defined(MULTI_ISA)
int isa_type; int isa_type;
......
...@@ -54,22 +54,21 @@ ...@@ -54,22 +54,21 @@
asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
const int frame_extra_sizes[16] = { const int frame_extra_sizes[16] = {
0, [1] = -1, /* sizeof(((struct frame *)0)->un.fmt1), */
-1, /* sizeof(((struct frame *)0)->un.fmt1), */ [2] = sizeof(((struct frame *)0)->un.fmt2),
sizeof(((struct frame *)0)->un.fmt2), [3] = sizeof(((struct frame *)0)->un.fmt3),
sizeof(((struct frame *)0)->un.fmt3), [4] = sizeof(((struct frame *)0)->un.fmt4),
sizeof(((struct frame *)0)->un.fmt4), [5] = -1, /* sizeof(((struct frame *)0)->un.fmt5), */
-1, /* sizeof(((struct frame *)0)->un.fmt5), */ [6] = -1, /* sizeof(((struct frame *)0)->un.fmt6), */
-1, /* sizeof(((struct frame *)0)->un.fmt6), */ [7] = sizeof(((struct frame *)0)->un.fmt7),
sizeof(((struct frame *)0)->un.fmt7), [8] = -1, /* sizeof(((struct frame *)0)->un.fmt8), */
-1, /* sizeof(((struct frame *)0)->un.fmt8), */ [9] = sizeof(((struct frame *)0)->un.fmt9),
sizeof(((struct frame *)0)->un.fmt9), [10] = sizeof(((struct frame *)0)->un.fmta),
sizeof(((struct frame *)0)->un.fmta), [11] = sizeof(((struct frame *)0)->un.fmtb),
sizeof(((struct frame *)0)->un.fmtb), [12] = -1, /* sizeof(((struct frame *)0)->un.fmtc), */
-1, /* sizeof(((struct frame *)0)->un.fmtc), */ [13] = -1, /* sizeof(((struct frame *)0)->un.fmtd), */
-1, /* sizeof(((struct frame *)0)->un.fmtd), */ [14] = -1, /* sizeof(((struct frame *)0)->un.fmte), */
-1, /* sizeof(((struct frame *)0)->un.fmte), */ [15] = -1, /* sizeof(((struct frame *)0)->un.fmtf), */
-1, /* sizeof(((struct frame *)0)->un.fmtf), */
}; };
/* /*
...@@ -191,7 +190,7 @@ struct rt_sigframe ...@@ -191,7 +190,7 @@ struct rt_sigframe
}; };
static unsigned char fpu_version = 0; /* version number of fpu, set by setup_frame */ static unsigned char fpu_version; /* version number of fpu, set by setup_frame */
static inline int restore_fpu_state(struct sigcontext *sc) static inline int restore_fpu_state(struct sigcontext *sc)
{ {
......
...@@ -52,15 +52,52 @@ asmlinkage void fpu_emu(void); ...@@ -52,15 +52,52 @@ asmlinkage void fpu_emu(void);
#endif #endif
e_vector vectors[256] = { e_vector vectors[256] = {
0, 0, buserr, trap, trap, trap, trap, trap, [VEC_BUSERR] = buserr,
trap, trap, trap, trap, trap, trap, trap, trap, [VEC_ADDRERR] = trap,
trap, trap, trap, trap, trap, trap, trap, trap, [VEC_ILLEGAL] = trap,
inthandler, inthandler, inthandler, inthandler, [VEC_ZERODIV] = trap,
inthandler, inthandler, inthandler, inthandler, [VEC_CHK] = trap,
/* TRAP #0-15 */ [VEC_TRAP] = trap,
system_call, trap, trap, trap, trap, trap, trap, trap, [VEC_PRIV] = trap,
trap, trap, trap, trap, trap, trap, trap, trap, [VEC_TRACE] = trap,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, [VEC_LINE10] = trap,
[VEC_LINE11] = trap,
[VEC_RESV12] = trap,
[VEC_COPROC] = trap,
[VEC_FORMAT] = trap,
[VEC_UNINT] = trap,
[VEC_RESV16] = trap,
[VEC_RESV17] = trap,
[VEC_RESV18] = trap,
[VEC_RESV19] = trap,
[VEC_RESV20] = trap,
[VEC_RESV21] = trap,
[VEC_RESV22] = trap,
[VEC_RESV23] = trap,
[VEC_SPUR] = inthandler,
[VEC_INT1] = inthandler,
[VEC_INT2] = inthandler,
[VEC_INT3] = inthandler,
[VEC_INT4] = inthandler,
[VEC_INT5] = inthandler,
[VEC_INT6] = inthandler,
[VEC_INT7] = inthandler,
[VEC_SYS] = system_call,
[VEC_TRAP1] = trap,
[VEC_TRAP2] = trap,
[VEC_TRAP3] = trap,
[VEC_TRAP4] = trap,
[VEC_TRAP5] = trap,
[VEC_TRAP6] = trap,
[VEC_TRAP7] = trap,
[VEC_TRAP8] = trap,
[VEC_TRAP9] = trap,
[VEC_TRAP10] = trap,
[VEC_TRAP11] = trap,
[VEC_TRAP12] = trap,
[VEC_TRAP13] = trap,
[VEC_TRAP14] = trap,
[VEC_TRAP15] = trap,
}; };
/* nmi handler for the Amiga */ /* nmi handler for the Amiga */
...@@ -160,39 +197,87 @@ void __init trap_init (void) ...@@ -160,39 +197,87 @@ void __init trap_init (void)
} }
static char *vec_names[] = { static const char *vec_names[] = {
"RESET SP", "RESET PC", "BUS ERROR", "ADDRESS ERROR", [VEC_RESETSP] = "RESET SP",
"ILLEGAL INSTRUCTION", "ZERO DIVIDE", "CHK", "TRAPcc", [VEC_RESETPC] = "RESET PC",
"PRIVILEGE VIOLATION", "TRACE", "LINE 1010", "LINE 1111", [VEC_BUSERR] = "BUS ERROR",
"UNASSIGNED RESERVED 12", "COPROCESSOR PROTOCOL VIOLATION", [VEC_ADDRERR] = "ADDRESS ERROR",
"FORMAT ERROR", "UNINITIALIZED INTERRUPT", [VEC_ILLEGAL] = "ILLEGAL INSTRUCTION",
"UNASSIGNED RESERVED 16", "UNASSIGNED RESERVED 17", [VEC_ZERODIV] = "ZERO DIVIDE",
"UNASSIGNED RESERVED 18", "UNASSIGNED RESERVED 19", [VEC_CHK] = "CHK",
"UNASSIGNED RESERVED 20", "UNASSIGNED RESERVED 21", [VEC_TRAP] = "TRAPcc",
"UNASSIGNED RESERVED 22", "UNASSIGNED RESERVED 23", [VEC_PRIV] = "PRIVILEGE VIOLATION",
"SPURIOUS INTERRUPT", "LEVEL 1 INT", "LEVEL 2 INT", "LEVEL 3 INT", [VEC_TRACE] = "TRACE",
"LEVEL 4 INT", "LEVEL 5 INT", "LEVEL 6 INT", "LEVEL 7 INT", [VEC_LINE10] = "LINE 1010",
"SYSCALL", "TRAP #1", "TRAP #2", "TRAP #3", [VEC_LINE11] = "LINE 1111",
"TRAP #4", "TRAP #5", "TRAP #6", "TRAP #7", [VEC_RESV12] = "UNASSIGNED RESERVED 12",
"TRAP #8", "TRAP #9", "TRAP #10", "TRAP #11", [VEC_COPROC] = "COPROCESSOR PROTOCOL VIOLATION",
"TRAP #12", "TRAP #13", "TRAP #14", "TRAP #15", [VEC_FORMAT] = "FORMAT ERROR",
"FPCP BSUN", "FPCP INEXACT", "FPCP DIV BY 0", "FPCP UNDERFLOW", [VEC_UNINT] = "UNINITIALIZED INTERRUPT",
"FPCP OPERAND ERROR", "FPCP OVERFLOW", "FPCP SNAN", [VEC_RESV16] = "UNASSIGNED RESERVED 16",
"FPCP UNSUPPORTED OPERATION", [VEC_RESV17] = "UNASSIGNED RESERVED 17",
"MMU CONFIGURATION ERROR" [VEC_RESV18] = "UNASSIGNED RESERVED 18",
}; [VEC_RESV19] = "UNASSIGNED RESERVED 19",
[VEC_RESV20] = "UNASSIGNED RESERVED 20",
[VEC_RESV21] = "UNASSIGNED RESERVED 21",
[VEC_RESV22] = "UNASSIGNED RESERVED 22",
[VEC_RESV23] = "UNASSIGNED RESERVED 23",
[VEC_SPUR] = "SPURIOUS INTERRUPT",
[VEC_INT1] = "LEVEL 1 INT",
[VEC_INT2] = "LEVEL 2 INT",
[VEC_INT3] = "LEVEL 3 INT",
[VEC_INT4] = "LEVEL 4 INT",
[VEC_INT5] = "LEVEL 5 INT",
[VEC_INT6] = "LEVEL 6 INT",
[VEC_INT7] = "LEVEL 7 INT",
[VEC_SYS] = "SYSCALL",
[VEC_TRAP1] = "TRAP #1",
[VEC_TRAP2] = "TRAP #2",
[VEC_TRAP3] = "TRAP #3",
[VEC_TRAP4] = "TRAP #4",
[VEC_TRAP5] = "TRAP #5",
[VEC_TRAP6] = "TRAP #6",
[VEC_TRAP7] = "TRAP #7",
[VEC_TRAP8] = "TRAP #8",
[VEC_TRAP9] = "TRAP #9",
[VEC_TRAP10] = "TRAP #10",
[VEC_TRAP11] = "TRAP #11",
[VEC_TRAP12] = "TRAP #12",
[VEC_TRAP13] = "TRAP #13",
[VEC_TRAP14] = "TRAP #14",
[VEC_TRAP15] = "TRAP #15",
[VEC_FPBRUC] = "FPCP BSUN",
[VEC_FPIR] = "FPCP INEXACT",
[VEC_FPDIVZ] = "FPCP DIV BY 0",
[VEC_FPUNDER] = "FPCP UNDERFLOW",
[VEC_FPOE] = "FPCP OPERAND ERROR",
[VEC_FPOVER] = "FPCP OVERFLOW",
[VEC_FPNAN] = "FPCP SNAN",
[VEC_FPUNSUP] = "FPCP UNSUPPORTED OPERATION",
[VEC_MMUCFG] = "MMU CONFIGURATION ERROR",
[VEC_MMUILL] = "MMU ILLEGAL OPERATION ERROR",
[VEC_MMUACC] = "MMU ACCESS LEVEL VIOLATION ERROR",
[VEC_RESV59] = "UNASSIGNED RESERVED 59",
[VEC_UNIMPEA] = "UNASSIGNED RESERVED 60",
[VEC_UNIMPII] = "UNASSIGNED RESERVED 61",
[VEC_RESV62] = "UNASSIGNED RESERVED 62",
[VEC_RESV63] = "UNASSIGNED RESERVED 63",
};
static const char *space_names[] = {
[0] = "Space 0",
[USER_DATA] = "User Data",
[USER_PROGRAM] = "User Program",
#ifndef CONFIG_SUN3 #ifndef CONFIG_SUN3
static char *space_names[] = { [3] = "Space 3",
"Space 0", "User Data", "User Program", "Space 3",
"Space 4", "Super Data", "Super Program", "CPU"
};
#else #else
static char *space_names[] = { [FC_CONTROL] = "Control",
"Space 0", "User Data", "User Program", "Control",
"Space 4", "Super Data", "Super Program", "CPU"
};
#endif #endif
[4] = "Space 4",
[SUPER_DATA] = "Super Data",
[SUPER_PROGRAM] = "Super Program",
[CPU_SPACE] = "CPU"
};
void die_if_kernel(char *,struct pt_regs *,int); void die_if_kernel(char *,struct pt_regs *,int);
asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
......
This diff is collapsed.
...@@ -151,10 +151,10 @@ struct mac_SCC ...@@ -151,10 +151,10 @@ struct mac_SCC
# define scc (*((volatile struct mac_SCC*)mac_bi_data.sccbase)) # define scc (*((volatile struct mac_SCC*)mac_bi_data.sccbase))
/* Flag that serial port is already initialized and used */ /* Flag that serial port is already initialized and used */
int mac_SCC_init_done = 0; int mac_SCC_init_done;
/* Can be set somewhere, if a SCC master reset has already be done and should /* Can be set somewhere, if a SCC master reset has already be done and should
* not be repeated; used by kgdb */ * not be repeated; used by kgdb */
int mac_SCC_reset_done = 0; int mac_SCC_reset_done;
static int scc_port = -1; static int scc_port = -1;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <asm/macintosh.h> #include <asm/macintosh.h>
#include <asm/mac_asc.h> #include <asm/mac_asc.h>
static int mac_asc_inited = 0; static int mac_asc_inited;
/* /*
* dumb triangular wave table * dumb triangular wave table
*/ */
...@@ -39,7 +39,7 @@ static volatile __u8* mac_asc_regs = ( void* )0x50F14000; ...@@ -39,7 +39,7 @@ static volatile __u8* mac_asc_regs = ( void* )0x50F14000;
* sample rate; is this a good default value? * sample rate; is this a good default value?
*/ */
static unsigned long mac_asc_samplespersec = 11050; static unsigned long mac_asc_samplespersec = 11050;
static int mac_bell_duration = 0; static int mac_bell_duration;
static unsigned long mac_bell_phase; /* 0..2*Pi -> 0..0x800 (wavetable size) */ static unsigned long mac_bell_phase; /* 0..2*Pi -> 0..0x800 (wavetable size) */
static unsigned long mac_bell_phasepersample; static unsigned long mac_bell_phasepersample;
...@@ -51,7 +51,7 @@ static void mac_nosound( unsigned long ); ...@@ -51,7 +51,7 @@ static void mac_nosound( unsigned long );
static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int ); static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int );
static void mac_quadra_ring_bell( unsigned long ); static void mac_quadra_ring_bell( unsigned long );
static void mac_av_start_bell( unsigned int, unsigned int, unsigned int ); static void mac_av_start_bell( unsigned int, unsigned int, unsigned int );
static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ) = NULL; static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int );
/* /*
* our timer to start/continue/stop the bell * our timer to start/continue/stop the bell
......
...@@ -644,7 +644,7 @@ void mac_default_handler(int irq, void *dev_id, struct pt_regs *regs) ...@@ -644,7 +644,7 @@ void mac_default_handler(int irq, void *dev_id, struct pt_regs *regs)
#endif #endif
} }
static int num_debug[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static int num_debug[8];
irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs) irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs)
{ {
...@@ -655,8 +655,8 @@ irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs) ...@@ -655,8 +655,8 @@ irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int in_nmi = 0; static int in_nmi;
static volatile int nmi_hold = 0; static volatile int nmi_hold;
irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp) irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp)
{ {
......
...@@ -61,7 +61,7 @@ static int gIER,gIFR,gBufA,gBufB; ...@@ -61,7 +61,7 @@ static int gIER,gIFR,gBufA,gBufB;
#define MAC_CLOCK_LOW (MAC_CLOCK_TICK&0xFF) #define MAC_CLOCK_LOW (MAC_CLOCK_TICK&0xFF)
#define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8) #define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8)
static int nubus_active = 0; static int nubus_active;
void via_debug_dump(void); void via_debug_dump(void);
irqreturn_t via1_irq(int, void *, struct pt_regs *); irqreturn_t via1_irq(int, void *, struct pt_regs *);
......
...@@ -52,7 +52,7 @@ static inline void free_io_area(void *addr) ...@@ -52,7 +52,7 @@ static inline void free_io_area(void *addr)
#define IO_SIZE (256*1024) #define IO_SIZE (256*1024)
static struct vm_struct *iolist = NULL; static struct vm_struct *iolist;
static struct vm_struct *get_io_area(unsigned long size) static struct vm_struct *get_io_area(unsigned long size)
{ {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* For 68020/030 this is 0. * For 68020/030 this is 0.
* For 68040, this is _PAGE_CACHE040 (cachable, copyback) * For 68040, this is _PAGE_CACHE040 (cachable, copyback)
*/ */
unsigned long mm_cachebits = 0; unsigned long mm_cachebits;
EXPORT_SYMBOL(mm_cachebits); EXPORT_SYMBOL(mm_cachebits);
#endif #endif
......
...@@ -423,8 +423,14 @@ static irqreturn_t default_handler(int lev, void *dev_id, struct pt_regs *regs) ...@@ -423,8 +423,14 @@ static irqreturn_t default_handler(int lev, void *dev_id, struct pt_regs *regs)
} }
irqreturn_t (*q40_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { irqreturn_t (*q40_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
default_handler, default_handler, default_handler, default_handler, [0] = default_handler,
default_handler, default_handler, default_handler, default_handler [1] = default_handler,
[2] = default_handler,
[3] = default_handler,
[4] = default_handler,
[5] = default_handler,
[6] = default_handler,
[7] = default_handler
}; };
......
...@@ -45,15 +45,17 @@ extern void prom_reboot (char *) __attribute__ ((__noreturn__)); ...@@ -45,15 +45,17 @@ extern void prom_reboot (char *) __attribute__ ((__noreturn__));
** Globals ** Globals
*/ */
unsigned long vmalloc_end = 0; unsigned long vmalloc_end;
unsigned long pmeg_vaddr[PMEGS_NUM]; unsigned long pmeg_vaddr[PMEGS_NUM];
unsigned char pmeg_alloc[PMEGS_NUM]; unsigned char pmeg_alloc[PMEGS_NUM];
unsigned char pmeg_ctx[PMEGS_NUM]; unsigned char pmeg_ctx[PMEGS_NUM];
/* pointers to the mm structs for each task in each /* pointers to the mm structs for each task in each
context. 0xffffffff is a marker for kernel context */ context. 0xffffffff is a marker for kernel context */
struct mm_struct *ctx_alloc[CONTEXTS_NUM] = {(struct mm_struct *)0xffffffff, struct mm_struct *ctx_alloc[CONTEXTS_NUM] = {
0, 0, 0, 0, 0, 0, 0}; [0] = (struct mm_struct *)0xffffffff
};
/* has this context been mmdrop'd? */ /* has this context been mmdrop'd? */
static unsigned char ctx_avail = CONTEXTS_NUM-1; static unsigned char ctx_avail = CONTEXTS_NUM-1;
......
...@@ -47,10 +47,10 @@ static struct hole initholes[64]; ...@@ -47,10 +47,10 @@ static struct hole initholes[64];
#ifdef DVMA_DEBUG #ifdef DVMA_DEBUG
static unsigned long dvma_allocs = 0; static unsigned long dvma_allocs;
static unsigned long dvma_frees = 0; static unsigned long dvma_frees;
static unsigned long long dvma_alloc_bytes = 0; static unsigned long long dvma_alloc_bytes;
static unsigned long long dvma_free_bytes = 0; static unsigned long long dvma_free_bytes;
static void print_use(void) static void print_use(void)
{ {
......
...@@ -94,15 +94,24 @@ static irqreturn_t sun3_int5(int irq, void *dev_id, struct pt_regs *fp) ...@@ -94,15 +94,24 @@ static irqreturn_t sun3_int5(int irq, void *dev_id, struct pt_regs *fp)
/* handle requested ints, excepting 5 and 7, which always do the same /* handle requested ints, excepting 5 and 7, which always do the same
thing */ thing */
irqreturn_t (*sun3_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { irqreturn_t (*sun3_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
sun3_inthandle, sun3_inthandle, sun3_inthandle, sun3_inthandle, [0] = sun3_inthandle,
sun3_inthandle, sun3_int5, sun3_inthandle, sun3_int7 [1] = sun3_inthandle,
[2] = sun3_inthandle,
[3] = sun3_inthandle,
[4] = sun3_inthandle,
[5] = sun3_int5,
[6] = sun3_inthandle,
[7] = sun3_int7
}; };
static const char *dev_names[SYS_IRQS] = { NULL, NULL, NULL, NULL, static const char *dev_names[SYS_IRQS] = {
NULL, "timer", NULL, "int7 handler" }; [5] = "timer",
[7] = "int7 handler"
};
static void *dev_ids[SYS_IRQS]; static void *dev_ids[SYS_IRQS];
static irqreturn_t (*sun3_inthandler[SYS_IRQS])(int, void *, struct pt_regs *) = { static irqreturn_t (*sun3_inthandler[SYS_IRQS])(int, void *, struct pt_regs *) = {
NULL, NULL, NULL, NULL, NULL, sun3_int5, NULL, sun3_int7 [5] = sun3_int5,
[7] = sun3_int7
}; };
static irqreturn_t (*sun3_vechandler[SUN3_INT_VECS])(int, void *, struct pt_regs *); static irqreturn_t (*sun3_vechandler[SUN3_INT_VECS])(int, void *, struct pt_regs *);
static void *vec_ids[SUN3_INT_VECS]; static void *vec_ids[SUN3_INT_VECS];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment