mac68k serial
Subsystems (4)
hi,
I'm Carlo Pisani, alias "flameman", and i'm running this little
project: gentoo-m68k @ applem68k-LC475
( http://elinux.org/Mac68k-Flameman )
i'm working with kernel-2.6.27 and i have this issue
macserial kernel panic
unable to handle kernel NULL pointer de reference at virtual address 000004 modules linked in: m68k_handle_int+0x1c/0x36
call trace mac_scc_dispatch+0x3a/0x40 auto_irqhandler_fixup+0x4/0x6
kermel panic
also, i hacked the "emile-0.12" sources to build a monitor able to serially talk: it works for both the 2 LC475 serial lines :P
is there anything about serial support for linux-m68k ?
regards
Quoted 4 lines · flameman mayer
I'm Carlo Pisani, alias "flameman", and i'm running this little
project: gentoo-m68k @ applem68k-LC475
That's a good summary of a lot of history, but most of us don't think much about the 2.2 kernel anymore. It's nice to have all of that in one place for browsing.
Quoted 7 lines
i'm working with kernel-2.6.27 and i have this issue
macserial kernel panic
unable to handle kernel NULL pointer de reference at virtual address 000004 modules linked in:
m68k_handle_int+0x1c/0x36
Quoted 6 lines
call trace
mac_scc_dispatch+0x3a/0x40auto_irqhandler_fixup+0x4/0x6also, i hacked the "emile-0.12" sources to build a monitor able to serially talk: it works for both the 2 LC475 serial lines :P
is there anything about serial support for linux-m68k ?
The real driver for the serial ports on m68k Macintosh systems got removed from the tree a long time ago and has not been replaced as of this time. However, we still register mac_scc_dispatch as an interrupt handler for the line that the SCC uses. This looks like you got an interrupt for the serial chip and the interrupt code got confused trying to dispatch to nothing. I've never seen it happen, but it does look like that would be the expected behavior of the current code.
It's on my list to fix, but I honestly haven't had much time to work on it. My plan is to either share or copy pmac_zilog.c which is the driver for the serial on PowerMacs rather than start from the Atari driver as mentioned in the web page above. It's not only the same chip but attached to the system in mostly the same way.
Brad Boyer
[email protected]
Quoted 16 lines · Brad Boyer
On Tue, Jan 13, 2009 at 09:49:59PM +0000, flameman mayer wrote:
...Quoted 7 lines
i'm working with kernel-2.6.27 and i have this issue
macserial kernel panic
unable to handle kernel NULL pointer de reference at virtual address 000004 modules linked in:
m68k_handle_int+0x1c/0x36Quoted 6 lines
call trace
mac_scc_dispatch+0x3a/0x40auto_irqhandler_fixup+0x4/0x6also, i hacked the "emile-0.12" sources to build a monitor able to serially talk: it works for both the 2 LC475 serial lines :P
is there anything about serial support for linux-m68k ?
Quoted 7 lines
The real driver for the serial ports on m68k Macintosh systems got removed from the tree a long time ago and has not been replaced as of this time. However, we still register
mac_scc_dispatchas an interrupt handler for the line that the SCC uses. This looks like you got an interrupt for the serial chip and the interrupt code got confused trying to dispatch to nothing. I've never seen it happen, but it does look like that would be the expected behavior of the current code.
I've seen it happen. You should avoid sending anything to the mac serial port. But you can still capture kernel messages from the mac serial port without triggering the panic.
Quoted 6 lines
It's on my list to fix, but I honestly haven't had much time to work on it. My plan is to either share or copy
pmac_zilog.cwhich is the driver for the serial on PowerMacs rather than start from the Atari driver as mentioned in the web page above. It's not only the same chip but attached to the system in mostly the same way.
It's on my list, too. But above it are frame buffer, Nubus, SCSI and PMU issues.
Finn
Quoted 9 lines
Brad Boyer
[email protected]--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 17 lines
Quoted 9 lines
Quoted 8 lines
000004 modules linked in:
m68k_handle_int+0x1c/0x36call trace
mac_scc_dispatch+0x3a/0x40auto_irqhandler_fixup+0x4/0x6also, i hacked the "emile-0.12" sources to build a monitor able to serially talk: it works for both the 2 LC475 serial lines :P
is there anything about serial support for linux-m68k ?
Quoted 7 lines
The real driver for the serial ports on m68k Macintosh systems got removed from the tree a long time ago and has not been replaced as of this time. However, we still register
mac_scc_dispatchas an interrupt handler for the line that the SCC uses. This looks like you got an interrupt for the serial chip and the interrupt code got confused trying to dispatch to nothing. I've never seen it happen, but it does look like that would be the expected behavior of the current code.
Quoted 3 lines
I've seen it happen. You should avoid sending anything to the mac serial port. But you can still capture kernel messages from the mac serial port without triggering the panic.
Can't you add an empty SCC dispatch that just returns, or will that cause an interrupt storm?
Quoted 8 lines
Quoted 5 lines
It's on my list to fix, but I honestly haven't had much time to work on it. My plan is to either share or copy
pmac_zilog.cwhich is the driver for the serial on PowerMacs rather than start from the Atari driver as mentioned in the web page above. It's not only the same chip but attached to the system in mostly the same way.It's on my list, too. But above it are frame buffer, Nubus, SCSI and PMU issues.
I'll get to working on simplifying the Atari SCC driver eventually, but that's not top of my list either. I could give mac_scc a shot after that (starting from pmac_zilog).
Michael
Falcon IDE breakage
Bartlomiej,
your commit 5b31f855f10d0053e738baa6d91fb6a3fad35119 (introduction of IDE lock helpers) breaks Atari Falcon IDE on the first request going out to the drive, if I remove the request_irq() call from ide-probe.c (as it should be).
ide_get_lock has the important side effect of registering the IDE interrupt as the current valid interrupt handler for the 'shared' ST-DMA interrupt dispatch. The lock must be held for all operations on the host that expect an interrupt to be taken.
In the current form, the lock helpers only register the interrupt if the IDE_HFLAG_SERIALIZE host flag is set. This does not appear to be the case for the Falcon IDE host.
Consequently, the lock does not seem to be taken at all times when IDE should be passed the interrupt. If I remove the extra request_irq() in ide-probe.c, the first request reading from the drive times out with hda: lost interrupt.
Even if request_irq() is called in ide-probe.c for Falcon, the current code would open races with other users of the ST-DMA lock (in a worse way than the previous code did, i.e. by registering the IDE interrupt handler in addition to the ST-DMA dispatch for the IDE/SCSI/DMA/Floppy interrupt). I am currently working to eliminate such races in the interaction of IDE and SCSI drivers, and the duplicated interrupt has been shown up as a suspect there (incidentially, that's why the problem never showed in Geert's ARAnyM tests).
Can you make sure the IDE_HFLAG_SERIALIZE is set for Falcon IDE, or the problematic test is removed in that case?
Thanks,
Michael
Re: Falcon IDE breakage
Quoted 3 lines · Michael Schmitz
your commit
5b31f855f10d0053e738baa6d91fb6a3fad35119(introduction of IDE lock helpers) breaks Atari Falcon IDE on the first request going out to the drive, if I remove therequest_irq()call fromide-probe.c(as it should be).
I assume this is on real hardware, as I didn't notice on ARAnyM?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: Falcon IDE breakage
Quoted 6 lines · Michael Schmitz
Quoted 3 lines
your commit
5b31f855f10d0053e738baa6d91fb6a3fad35119(introduction of IDE lock helpers) breaks Atari Falcon IDE on the first request going out to the drive, if I remove therequest_irq()call fromide-probe.c(as it should be).I assume this is on real hardware, as I didn't notice on ARAnyM?
No, this was on ARAnyM (my git tree had the IDE irq request #ifdef'ed out for a while now). I'm sure it would work the same on hardware.
Did you still get the IDE driver to work after taking out request_irq in ide-probe?
drivers/ide/ide-probe.c +2 -0
@@ -968,8 +968,10 @@ static int init_irq (ide_hwif_t *hwif)if (io_ports->ctl_addr) hwif->tp_ops->set_irq (hwif,1 ); +#if !defined(CONFIG_BLK_DEV_FALCON_IDE) && !defined(CONFIG_BLK_DEV_FALCON_IDE_M if (request_irq(hwif->irq, &ide_intr, sa, hwif->name, hwif)) goto out_up; +#endif if (!hwif->rqsize) { if ((hwif->host_flags & IDE_HFLAG_NO_LBA48) ||
If so, do you perchance have two IDE drivers defined in the ARAnyM config file?
Michael
Re: Falcon IDE breakage [patch]
In reply to Geert UytterhoevenHi,
Quoted 5 lines
Quoted 3 lines
your commit
5b31f855f10d0053e738baa6d91fb6a3fad35119(introduction of IDE lock helpers) breaks Atari Falcon IDE on the first request going out to the drive, if I remove therequest_irq()call fromide-probe.c(as it should be).I assume this is on real hardware, as I didn't notice on ARAnyM?
Followup: never mind, I found out that this patch fixes the problem for me:
(NB: still on ARAnyM, having two IDE drivers didn't matter, and I still have to test the interaction of new IDE locking with SCSI)
Any other side effects of IDE_HFLAG_SERIALIZE ??
(Actually I realize I could have stuck the flag in falconide_port_info.host_flags instead - works just as well. Pick whatever suits the IDE guys best)
Michael
[m68k] Falcon IDE: always serialize, in order to force execution of
ide_get_lock() and friends.
---
drivers/ide/falconide.c +2 -0
@@ -132,6 +132,8 @@ static int __init falconide_init(void) goto err; } + host->host_flags |=IDE_HFLAG_SERIALIZE ; +ide_get_lock (NULL ,NULL ); rc =ide_host_register (host, &falconide_port_info, hws);ide_release_lock ();
Bartlomiej Zolnierkiewicz
AppliedRe: Falcon IDE breakage [patch]
Quoted 11 lines · Michael Schmitz
Hi,
Quoted 5 lines
Quoted 3 lines
your commit
5b31f855f10d0053e738baa6d91fb6a3fad35119(introduction of IDE lock helpers) breaks Atari Falcon IDE on the first request going out to the drive, if I remove therequest_irq()call fromide-probe.c(as it should be).I assume this is on real hardware, as I didn't notice on ARAnyM?
Followup: never mind, I found out that this patch fixes the problem for me:
(NB: still on ARAnyM, having two IDE drivers didn't matter, and I still have to test the interaction of new IDE locking with SCSI)
I applied your patch, thanks.
Quoted 1 line
Any other side effects of
IDE_HFLAG_SERIALIZE??
Nope.
Quoted 3 lines
(Actually I realize I could have stuck the flag in falconide_port_info.host_flags instead - works just as well. Pick whatever suits the IDE guys best)
OK, I made this fixup while merging the patch:
From: Michael Schmitz <[email protected]>
Subject: ide: fix Falcon IDE breakage
[m68k] Falcon IDE: always serialize, in order to force execution of
ide_get_lock() and friends.
--- drivers/ide/falconide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/falconide.c +1 -1
@@ -82,7 +82,7 @@ static const struct ide_tp_ops falconidestatic const struct ide_port_info falconide_port_info = { .tp_ops = &falconide_tp_ops, - .host_flags =IDE_HFLAG_NO_DMA , + .host_flags =IDE_HFLAG_NO_DMA |IDE_HFLAG_SERIALIZE , };static void __init falconide_setup_ports (hw_regs_t *hw)