various m68k patches
Subsystems (6)
cover various m68k patches
Hi,
These are a few patches from the m68k tree, which fix/clean up various stuff all other the place.
bye, Roman
PATCH 1/11 completely initialize hw_regs_t in ide_setup_ports
ide_setup_ports does not completely initialize the hw_regs_t structure which can cause random failures, as the structure is often on the stack. None of the callers expect a partially initialized structure, i.e. none of them do any setup of their own before calling ide_setup_ports().
---
drivers/ide/ide.c | 1 + drivers/ide/legacy/q40ide.c | 1 + 2 files changed, 2 insertions(+)
drivers/ide/ide.c +1 -0
@@ -730,6 +730,7 @@ void ide_setup_ports ( hw_regs_t *hw, {int i; +memset (hw,0 ,sizeof (hw_regs_t));for (i =0 ; i <IDE_NR_PORTS ; i++) {if (offsets[i] ==-1 ) {switch (i) {
drivers/ide/legacy/q40ide.c +1 -0
@@ -80,6 +80,7 @@ void q40_ide_setup_ports ( hw_regs_t *hw {int i; +memset (hw,0 ,sizeof (hw_regs_t));for (i =0 ; i <IDE_NR_PORTS ; i++) {/* BIG FAT WARNING: assumption: only DATA port is ever used in 16 bit mode */
--
PATCH 2/11 atyfb_base compile fix for CONFIG_PCI=n
In reply to [email protected]The atyfb_driver structure is only available if CONFIG_PCI is set.
---
drivers/video/aty/atyfb_base.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/video/aty/atyfb_base.c +4 -0
@@ -3861,7 +3861,9 @@ static int __init atyfb_init(void)atyfb_setup (option);#endif +#ifdef CONFIG_PCI pci_register_driver (&atyfb_driver); +#endif #ifdef CONFIG_ATARI atyfb_atari_probe ();#endif
@@ -3870,7 +3872,9 @@ static int __init atyfb_init(void) static void __exit atyfb_exit(void) { +#ifdef CONFIG_PCI pci_unregister_driver (&atyfb_driver); +#endif }module_init (atyfb_init);
--
Re: [PATCH 02/11] atyfb_base compile fix for CONFIG_PCI=n
Quoted 26 lines · [email protected] wrote:
The
atyfb_driverstructure is only available ifCONFIG_PCIis set.Signed-off-by Roman Zippel <[email protected]>---
drivers/video/aty/atyfb_base.c | 4 ++++ 1 file changed, 4 insertions(+)Index:
linux-2.6-mm/drivers/video/aty/atyfb_base.c
===================================================================
---linux-2.6-mm.orig/drivers/video/aty/atyfb_base.c+++linux-2.6-mm/drivers/video/aty/atyfb_base.c@@ -3861,7 +3861,9 @@ static int__initatyfb_init(void)atyfb_setup(option);#endif
+#ifdef
CONFIG_PCIpci_register_driver(&atyfb_driver); +#endif #ifdef CONFIG_ATARI atyfb_atari_probe();#endif
@@ -3870,7 +3872,9 @@ static int__initatyfb_init(void)
Quoted 6 lines
static void
__exitatyfb_exit(void)
{
+#ifdefCONFIG_PCI
pci_unregister_driver(&atyfb_driver);
+#endif
}
bah. If pci_register_driver() was a macro we wouldn't need to do this all over the place.
Re: [PATCH 02/11] atyfb_base compile fix for CONFIG_PCI=n
Quoted 34 lines · Andrew Morton
Quoted 26 lines · [email protected] wrote:
The
atyfb_driverstructure is only available ifCONFIG_PCIis set.Signed-off-by Roman Zippel <[email protected]>---
drivers/video/aty/atyfb_base.c | 4 ++++ 1 file changed, 4 insertions(+)Index:
linux-2.6-mm/drivers/video/aty/atyfb_base.c
===================================================================
---linux-2.6-mm.orig/drivers/video/aty/atyfb_base.c+++linux-2.6-mm/drivers/video/aty/atyfb_base.c@@ -3861,7 +3861,9 @@ static int__initatyfb_init(void)atyfb_setup(option);#endif
+#ifdef
CONFIG_PCIpci_register_driver(&atyfb_driver); +#endif #ifdef CONFIG_ATARI atyfb_atari_probe();#endif
@@ -3870,7 +3872,9 @@ static int__initatyfb_init(void)Quoted 6 lines
static void
__exitatyfb_exit(void)
{
+#ifdefCONFIG_PCI
pci_unregister_driver(&atyfb_driver);
+#endif
}
Quoted 2 lines
bah. If
pci_register_driver()was a macro we wouldn't need to do this all over the place.
Yes, this can be fixed easily in the pci.h header file, all other pci functions are stubbed out properly if CONFIG_PCI is not enabled. These should be too.
Roman, care to make that change instead?
thanks,
greg k-h
Re: [PATCH 02/11] atyfb_base compile fix for CONFIG_PCI=n
Quoted 36 lines · Greg KH
Quoted 34 lines · Andrew Morton
Quoted 32 lines · [email protected] wrote:
The
atyfb_driverstructure is only available ifCONFIG_PCIis set.Signed-off-by Roman Zippel <[email protected]>---
drivers/video/aty/atyfb_base.c | 4 ++++ 1 file changed, 4 insertions(+)Index:
linux-2.6-mm/drivers/video/aty/atyfb_base.c
===================================================================
---linux-2.6-mm.orig/drivers/video/aty/atyfb_base.c+++linux-2.6-mm/drivers/video/aty/atyfb_base.c@@ -3861,7 +3861,9 @@ static int__initatyfb_init(void)atyfb_setup(option);#endif
+#ifdef
CONFIG_PCIpci_register_driver(&atyfb_driver); +#endif #ifdef CONFIG_ATARI atyfb_atari_probe();#endif
@@ -3870,7 +3872,9 @@ static int__initatyfb_init(void)static void
__exitatyfb_exit(void)
{
+#ifdefCONFIG_PCI
pci_unregister_driver(&atyfb_driver);
+#endif
}
Quoted 7 lines
Quoted 2 lines
bah. If
pci_register_driver()was a macro we wouldn't need to do this all over the place.Yes, this can be fixed easily in the
pci.hheader file, all other pci functions are stubbed out properly ifCONFIG_PCIis not enabled. These should be too.
Well pci_register_driver() and pci_unregister_driver() do have stubs. But they're static-inlines, hence they reference their argument, hence the above ifdefs.
But if the pci_register_driver() and pci_unregister_driver() stubs were macros which do not reference their argument, the above ifdefs aren't needed.
Re: [PATCH 02/11] atyfb_base compile fix for CONFIG_PCI=n
In reply to Greg KHHi,
Quoted 23 lines · Greg KH
Quoted 23 lines
Quoted 22 lines
Index:
linux-2.6-mm/drivers/video/aty/atyfb_base.c
===================================================================
---linux-2.6-mm.orig/drivers/video/aty/atyfb_base.c+++linux-2.6-mm/drivers/video/aty/atyfb_base.c@@ -3861,7 +3861,9 @@ static int__initatyfb_init(void)atyfb_setup(option);#endif
+#ifdef
CONFIG_PCIpci_register_driver(&atyfb_driver); +#endif #ifdef CONFIG_ATARI atyfb_atari_probe();#endif
@@ -3870,7 +3872,9 @@ static int__initatyfb_init(void)static void
__exitatyfb_exit(void)
{
+#ifdefCONFIG_PCI
pci_unregister_driver(&atyfb_driver);
+#endif
}
Quoted 6 lines
Quoted 2 lines
bah. If
pci_register_driver()was a macro we wouldn't need to do this all over the place.Yes, this can be fixed easily in the
pci.hheader file, all other pci functions are stubbed out properly ifCONFIG_PCIis not enabled. These should be too.
I'm not a big fan of such dummy macros, as these macros should properly look like:
#define pci_register_driver(x) ({ (void)(x); 0; })
otherwise you risk warnings about defined but unused variables.
The other alternative is to remove the #ifdef around atyfb_driver, recent gcc (>= 4.0) can remove the unused structure.
bye, Roman
PATCH 3/11 cleanup unistd.h
In reply to [email protected]Remove long obsolete kernel syscalls, only execve is still used.
---
include/asm-m68k/unistd.h | 39 --------------------------------------- 1 file changed, 39 deletions(-)
include/asm-m68k/unistd.h +0 -39
@@ -410,46 +410,7 @@ __syscall_return(type,__res); \#ifdef __KERNEL_SYSCALLS__ -#include <linux/compiler.h> -#include <linux/interrupt.h> -#include <linux/types.h> - -/* -* we need this inline - forking from kernel space will result -* in NO COPY ON WRITE (!!!), until an execve is executed. This -* is no problem, but for the stack. This is handled by not letting -* main() use the stack at all after fork(). Thus, no function -* calls - which means inline code for fork too, as otherwise we -* would use the stack upon exit from 'fork()'. -* -* Actually only pause and fork are needed inline, so that there -* won't be any messing with the stack from main(), but we define -* some others too. -*/ -#define __NR__exit __NR_exit -static inline _syscall0(pid_t,setsid) -static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) -static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) -static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) -static inline _syscall1(int,dup,int,fd) static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) -static inline _syscall3(int,open,const char *,file,int,flag,int,mode) -static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) -static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) - -asmlinkage long sys_mmap2( - unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long pgoff); -asmlinkage int sys_execve(char *name, char **argv, char **envp); -asmlinkage int sys_pipe(unsigned long *fildes); -struct pt_regs ; -struct sigaction ; -asmlinkage long sys_rt_sigaction (int sig, -const struct sigaction __user *act, -struct sigaction __user *oact, -size_t sigsetsize);#endif /* __KERNEL_SYSCALLS__ */
--
PATCH 4/11 Remove some unused definitions in zorro.h
In reply to [email protected]These definitions have long been superseded by asm-offsets.h
---
include/linux/zorro.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-)
include/linux/zorro.h +0 -42
@@ -11,8 +11,6 @@#ifndef _LINUX_ZORRO_H#define _LINUX_ZORRO_H -#ifndef __ASSEMBLY__ -#include <linux/device.h>
@@ -112,45 +110,6 @@ struct ConfigDev {__u32 cd_Unused[4 ];/* for whatever the driver wants */ } __attribute__ ((packed)); -#else /* __ASSEMBLY__ */ - -LN_Succ = 0 -LN_Pred = LN_Succ+4 -LN_Type = LN_Pred+4 -LN_Pri = LN_Type+1 -LN_Name = LN_Pri+1 -LN_sizeof = LN_Name+4 - -ER_Type = 0 -ER_Product = ER_Type+1 -ER_Flags = ER_Product+1 -ER_Reserved03 = ER_Flags+1 -ER_Manufacturer = ER_Reserved03+1 -ER_SerialNumber = ER_Manufacturer+2 -ER_InitDiagVec = ER_SerialNumber+4 -ER_Reserved0c = ER_InitDiagVec+2 -ER_Reserved0d = ER_Reserved0c+1 -ER_Reserved0e = ER_Reserved0d+1 -ER_Reserved0f = ER_Reserved0e+1 -ER_sizeof = ER_Reserved0f+1 - -CD_Node = 0 -CD_Flags = CD_Node+LN_sizeof -CD_Pad = CD_Flags+1 -CD_Rom = CD_Pad+1 -CD_BoardAddr = CD_Rom+ER_sizeof -CD_BoardSize = CD_BoardAddr+4 -CD_SlotAddr = CD_BoardSize+4 -CD_SlotSize = CD_SlotAddr+2 -CD_Driver = CD_SlotSize+2 -CD_NextCD = CD_Driver+4 -CD_Unused = CD_NextCD+4 -CD_sizeof = CD_Unused+(4*4) - -#endif /* __ASSEMBLY__ */ - -#ifndef __ASSEMBLY__ -#define ZORRO_NUM_AUTO 16#ifdef __KERNEL__
@@ -290,7 +249,6 @@ extern DECLARE_BITMAP(zorro_unused_z2ram#define Z2RAM_CHUNKSHIFT (16) -#endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _LINUX_ZORRO_H */
--
PATCH 5/11 use c99 initializer
In reply to [email protected]---
include/asm-m68k/processor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/asm-m68k/processor.h +4 -4
@@ -71,10 +71,10 @@ struct thread_struct { };#define INIT_THREAD { \ - ksp: sizeof(init_stack) + (unsigned long) init_stack, \ - sr: PS_S, \ - fs: __KERNEL_DS, \ - info: INIT_THREAD_INFO(init_task) \ + .ksp = sizeof(init_stack) + (unsigned long) init_stack, \ + .sr = PS_S, \ + .fs = __KERNEL_DS, \ + .info = INIT_THREAD_INFO(init_task), \ }/*
--
PATCH 6/11 print correct stack trace
In reply to [email protected]Pass unmodified stack argument to show_trace().
---
arch/m68k/kernel/traps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/m68k/kernel/traps.c +4 -2
@@ -992,6 +992,7 @@ void show_registers(struct pt_regs *regsvoid show_stack (struct task_struct *task,unsigned long *stack) { +unsigned long *p;unsigned long *endstack;int i;
@@ -1004,12 +1005,13 @@ void show_stack(struct task_struct *task endstack = (unsigned long *)(((unsigned long )stack +THREAD_SIZE -1 ) & -THREAD_SIZE );printk ("Stack from %08lx:" , (unsigned long )stack); + p = stack;for (i =0 ; i < kstack_depth_to_print; i++) { -if (stack +1 > endstack) +if (p +1 > endstack)break ;if (i %8 ==0 )printk ("\n " ); -printk (" %08lx" , *stack++); +printk (" %08lx" , *p++); }printk ("\n" );show_trace (stack);
--
PATCH 7/11 restore amikbd compatibility with 2.4
In reply to [email protected]Dump the extra mapping in the amikbd interrupt handler, so old Amiga keymaps work again. Amigas need a special keymap anyway, standard keymaps are not usable and recreating all keymaps is simply not worth the trouble.
---
drivers/input/keyboard/amikbd.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-)
drivers/input/keyboard/amikbd.c +21 -11
@@ -36,6 +36,7 @@#include <linux/input.h> #include <linux/delay.h> #include <linux/interrupt.h> +#include <linux/keyboard.h> #include <asm/amigaints.h> #include <asm/amigahw.h>
@@ -45,7 +46,7 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@uMODULE_DESCRIPTION ("Amiga keyboard driver" );MODULE_LICENSE ("GPL" ); -static unsigned char amikbd_keycode[0x78 ] = { +static unsigned char amikbd_keycode[0x78 ]__initdata = { [0 ] =KEY_GRAVE , [1 ] =KEY_1 , [2 ] =KEY_2 ,
@@ -170,12 +171,9 @@ static irqreturn_t amikbd_interrupt(int scancode >>=1 ;if (scancode <0x78 ) {/* scancodes < 0x78 are keys */ - - scancode = amikbd_keycode[scancode]; -input_regs (amikbd_dev, fp); -if (scancode ==KEY_CAPSLOCK ) {/* CapsLock is a toggle switch key on Amiga */ +if (scancode ==98 ) {/* CapsLock is a toggle switch key on Amiga */ input_report_key (amikbd_dev, scancode,1 );input_report_key (amikbd_dev, scancode,0 ); }else {
@@ -191,7 +189,7 @@ static irqreturn_t amikbd_interrupt(intstatic int __init amikbd_init (void ) { -int i; +int i, j;if (!AMIGAHW_PRESENT (AMI_KEYBOARD ))return -EIO ;
@@ -214,14 +212,26 @@ static int __init amikbd_init(void) amikbd_dev->id.version =0x0100 ; amikbd_dev->evbit[0 ] =BIT (EV_KEY ) |BIT (EV_REP ); - amikbd_dev->keycode = amikbd_keycode; - amikbd_dev->keycodesize =sizeof (unsigned char ); - amikbd_dev->keycodemax =ARRAY_SIZE (amikbd_keycode);for (i =0 ; i <0x78 ; i++) -if (amikbd_keycode[i]) -set_bit (amikbd_keycode[i], amikbd_dev->keybit); +set_bit (i, amikbd_dev->keybit); +for (i =0 ; i <MAX_NR_KEYMAPS ; i++) { +static u_short temp_map[NR_KEYS ]__initdata ; +if (!key_maps[i]) +continue ; +memset (temp_map,0 ,sizeof (temp_map)); +for (j =0 ; j <0x78 ; j++) { +if (!amikbd_keycode[j]) +continue ; + temp_map[j] = key_maps[i][amikbd_keycode[j]]; + } +for (j =0 ; j <NR_KEYS ; j++) { +if (!temp_map[j]) + temp_map[j] =0xf200 ; + } +memcpy (key_maps[i], temp_map,sizeof (temp_map)); + } ciaa.cra &= ~0x41 ;/* serial data in, turn off TA */ request_irq (IRQ_AMIGA_CIAA_SP , amikbd_interrupt,0 ,"amikbd" , amikbd_interrupt);
--
Re: [PATCH 07/11] restore amikbd compatibility with 2.4
Quoted 7 lines · [email protected] wrote:
(quoted diff) +1
-0+ for (i = 0; i < MAX_NR_KEYMAPS; i++) { + static u_short temp_map[NR_KEYS] __initdata; + if (!key_maps[i]) + continue; + memset(temp_map, 0, sizeof(temp_map)); + for (j = 0; j < 0x78; j++) {
Review
Quoted 10 lines
(quoted diff) +0
-0+ if (!amikbd_keycode[j]) + continue; + temp_map[j] = key_maps[i][amikbd_keycode[j]]; + } + for (j = 0; j < NR_KEYS; j++) { + if (!temp_map[j]) + temp_map[j] = 0xf200; + } + memcpy(key_maps[i], temp_map, sizeof(temp_map)); + }
I assume temp_map[] is static to avoid using too much stack.
But wouldn't it be simpler to make this code operate on key_maps[i] directly?
Re: [PATCH 07/11] restore amikbd compatibility with 2.4
Hi,
Quoted 12 lines · Andrew Morton
Quoted 11 lines · [email protected] wrote:
(quoted diff) +1
-0+ for (i = 0; i < MAX_NR_KEYMAPS; i++) { + static u_short temp_map[NR_KEYS] __initdata; + if (!key_maps[i]) + continue; + memset(temp_map, 0, sizeof(temp_map)); + for (j = 0; j < 0x78; j++) { + if (!amikbd_keycode[j]) + continue; + temp_map[j] = key_maps[i][amikbd_keycode[j]]; + }
Quoted 8 lines
Quoted 6 lines
+ for (j = 0; j <
NR_KEYS; j++) {
+ if (!temp_map[j])
+ temp_map[j] =0xf200;
+ }
+memcpy(key_maps[i], temp_map, sizeof(temp_map));
+ }I assume temp_map[] is static to avoid using too much stack.
Yes, although it should only be 1KB.
Quoted 1 line
But wouldn't it be simpler to make this code operate on key_maps[i] directly?
No, the remapping would overwrite data which still needs to be read.
bye, Roman
PATCH 8/11 extra delay
In reply to [email protected]The wd33c93 needs a small delay before a new command can be started.
---
drivers/scsi/wd33c93.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/scsi/wd33c93.c +4 -0
@@ -939,6 +939,7 @@ wd33c93_intr(struct Scsi_Host *instance) DB(DB_INTR, printk("%02x", cmd->SCp.Status))if (hostdata->level2 >=L2_BASIC ) { sr =read_wd33c93 (regs,WD_SCSI_STATUS );/* clear interrupt */ +udelay (7 ); hostdata->state =S_RUNNING_LEVEL2 ;write_wd33c93 (regs,WD_COMMAND_PHASE ,0x50 );write_wd33c93_cmd (regs,WD_CMD_SEL_ATN_XFER );
@@ -955,6 +956,7 @@ wd33c93_intr(struct Scsi_Host *instance) msg =read_1_byte (regs); sr =read_wd33c93 (regs,WD_SCSI_STATUS );/* clear interrupt */ +udelay (7 ); hostdata->incoming_msg[hostdata->incoming_ptr] = msg;if (hostdata->incoming_msg[0 ] ==EXTENDED_MESSAGE )
@@ -1358,6 +1360,7 @@ wd33c93_intr(struct Scsi_Host *instance) }else {/* Verify this is a change to MSG_IN and read the message */ sr =read_wd33c93 (regs,WD_SCSI_STATUS ); +udelay (7 );if (sr == (CSR_ABORT |PHS_MESS_IN ) || sr == (CSR_UNEXP |PHS_MESS_IN ) || sr == (CSR_SRV_REQ |PHS_MESS_IN )) {
@@ -1374,6 +1377,7 @@ wd33c93_intr(struct Scsi_Host *instance) asr); } sr =read_wd33c93 (regs,WD_SCSI_STATUS ); +udelay (7 );if (sr !=CSR_MSGIN ) printk ("wd33c93: Not paused with ACK on RESEL (%02x)\n",
--
PATCH 9/11 use proper defines for zone initialization
In reply to [email protected]MAX_NR_ZONES changed, so use correct defines now.
---
arch/m68k/mm/motorola.c | 12 ++++++------ arch/m68k/mm/sun3mmu.c | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-)
arch/m68k/mm/motorola.c +6 -6
@@ -203,7 +203,7 @@ void __init paging_init(void) {int chunk;unsigned long mem_avail =0 ; -unsigned long zones_size[3 ] = {0 , }; +unsigned long zones_size[MAX_NR_ZONES ] = {0 , };#ifdef DEBUG {
@@ -257,12 +257,12 @@ void __init paging_init(void)#ifdef DEBUG printk ("before free_area_init\n" );#endif - zones_size[0 ] = (mach_max_dma_address < (unsigned long )high_memory ? - (mach_max_dma_address+1 ) : (unsigned long )high_memory); - zones_size[1 ] = (unsigned long )high_memory - zones_size[0 ]; + zones_size[ZONE_DMA ] = (mach_max_dma_address < (unsigned long )high_memory ? + (mach_max_dma_address+1 ) : (unsigned long )high_memory); + zones_size[ZONE_NORMAL ] = (unsigned long )high_memory - zones_size[0 ]; - zones_size[0 ] = (zones_size[0 ] -PAGE_OFFSET ) >>PAGE_SHIFT ; - zones_size[1 ] >>=PAGE_SHIFT ; + zones_size[ZONE_DMA ] = (zones_size[ZONE_DMA ] -PAGE_OFFSET ) >>PAGE_SHIFT ; + zones_size[ZONE_NORMAL ] >>=PAGE_SHIFT ;free_area_init (zones_size); }
arch/m68k/mm/sun3mmu.c +2 -3
@@ -46,7 +46,7 @@ void __init paging_init(void)unsigned long address;unsigned long next_pgtable;unsigned long bootmem_end; -unsigned long zones_size[3 ] = {0 ,0 ,0 }; +unsigned long zones_size[MAX_NR_ZONES ] = {0 , };unsigned long size;
@@ -92,8 +92,7 @@ void __init paging_init(void) current->mm =NULL ;/* memory sizing is a hack stolen from motorola.c.. hope it works for us */ - zones_size[0 ] = ((unsigned long )high_memory -PAGE_OFFSET ) >>PAGE_SHIFT ; - zones_size[1 ] =0 ; + zones_size[ZONE_DMA ] = ((unsigned long )high_memory -PAGE_OFFSET ) >>PAGE_SHIFT ;free_area_init (zones_size);
--
PATCH 10/11 adjust to changed HARDIRQ_MASK
In reply to [email protected]adjust entry.S to the changed HARDIRQ_MASK, add a check to prevent it from silently breaking again.
---
arch/m68k/kernel/entry.S | 4 ++-- arch/m68k/kernel/ints.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-)
arch/m68k/kernel/entry.S +2 -2
@@ -226,7 +226,7 @@ ENTRY(nmi_handler) inthandler: SAVE_ALL_INT GET_CURRENT(%d0) - addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2) + addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) | put exception # in d0 bfextu %sp@(PT_VECTOR){#4,#10},%d0
@@ -245,7 +245,7 @@ inthandler: 3: addql #8,%sp | pop parameters off stack ret_from_interrupt: - subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2) + subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) jeq 1f 2: RESTORE_ALL
arch/m68k/kernel/ints.c +6 -0
@@ -95,6 +95,12 @@ void __init init_IRQ(void) {int i; +/* assembly irq entry code relies on this... */ +if (HARDIRQ_MASK !=0x00ff0000 ) { +extern void hardirq_mask_is_broken (void ); +hardirq_mask_is_broken (); + } +for (i =0 ; i <SYS_IRQS ; i++) {if (mach_default_handler) irq_list[i].handler = (*mach_default_handler)[i];
--
PATCH 11/11 m68k mac VIA2 fixes and cleanups
In reply to [email protected]From: Finn Thain <[email protected]>
Some fixes and cleanups from the linux-mac68k repo. Fix mac_esp by clearing the VIA2 SCSI IRQ flag before the SCSI IRQ handler is invoked. Also fix a race condition caused by unmasking a nubus slot IRQ then setting the relevant nubus_active bit.
---
arch/m68k/mac/config.c | 13 ------------- arch/m68k/mac/macints.c | 1 - arch/m68k/mac/via.c | 17 ++--------------- 3 files changed, 2 insertions(+), 29 deletions(-)
arch/m68k/mac/config.c +0 -13
@@ -89,24 +89,11 @@ extern void mac_debugging_long(int, longstatic void mac_get_model (char *str); -void mac_bang (int irq,void *vector,struct pt_regs *p) -{ -printk (KERN_INFO "Resetting ...\n" ); -mac_reset (); -} -static void mac_sched_init (irqreturn_t (*vector)(int ,void *,struct pt_regs *)) {via_init_clock (vector); } -#if 0 -void mac_waitbut (void ) -{ - ; -} -#endif -extern irqreturn_t mac_default_handler (int ,void *,struct pt_regs *); irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)=
arch/m68k/mac/macints.c +0 -1
@@ -216,7 +216,6 @@ static void scc_irq_disable(int);* console_loglevel determines NMI handler function */ -extern irqreturn_t mac_bang (int ,void *,struct pt_regs *);irqreturn_t mac_nmi_handler (int ,void *,struct pt_regs *);irqreturn_t mac_debug_handler (int ,void *,struct pt_regs *);
arch/m68k/mac/via.c +2 -15
@@ -25,7 +25,6 @@#include <linux/init.h> #include <linux/ide.h> -#include <asm/traps.h> #include <asm/bootinfo.h> #include <asm/macintosh.h> #include <asm/macints.h>
@@ -71,7 +70,6 @@ void via_irq_enable(int irq);void via_irq_disable (int irq);void via_irq_clear (int irq); -extern irqreturn_t mac_bang (int ,void *,struct pt_regs *);extern irqreturn_t mac_scc_dispatch (int ,void *,struct pt_regs *);extern int oss_present;
@@ -212,11 +210,6 @@ void __init via_init(void) break; }#else -/* The alernate IRQ mapping seems to just not work. Anyone with a */ -/* supported machine is welcome to take a stab at fixing it. It */ -/* _should_ work on the following Quadras: 610,650,700,800,900,950 */ -/* - 1999-06-12 (jmt) */ - via_alt_mapping =0 ;#endif
@@ -270,12 +263,6 @@ void __init via_register_interrupts(voidcpu_request_irq (IRQ_AUTO_1 , via1_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST ,"via1" , (void *) via1); -#if 0 /* interferes with serial on some machines */ -if (!psc_present) { -cpu_request_irq (IRQ_AUTO_6 , mac_bang,IRQ_FLG_LOCK , -"Off Switch" , mac_bang); - } -#endif }cpu_request_irq (IRQ_AUTO_2 , via2_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST ,"via2" , (void *) via2);
@@ -471,8 +458,8 @@ irqreturn_t via2_irq(int irq, void *dev_for (i =0 , irq_bit =1 ; i <7 ; i++, irq_bit <<=1 )if (events & irq_bit) { via2[gIER] = irq_bit; -mac_do_irq_list (VIA2_SOURCE_BASE + i, regs); via2[gIFR] = irq_bit | rbv_clear; +mac_do_irq_list (VIA2_SOURCE_BASE + i, regs); via2[gIER] = irq_bit |0x80 ; }return IRQ_HANDLED ;
@@ -529,6 +516,7 @@ void via_irq_enable(int irq) { } via2[gIER] = irq_bit |0x80 ; }else if (irq_src ==7 ) { + nubus_active |= irq_bit;if (rbv_present) {/* enable the slot interrupt. SIER works like IER. */ via2[rSIER] =IER_SET_BIT (irq_idx);
@@ -550,7 +538,6 @@ void via_irq_enable(int irq) { } } } - nubus_active |= irq_bit; } }
--