* Re: Alpha/2.2.0-pre8 hang on boot
@ 1999-01-20 8:38 y0000218
1999-01-21 2:27 ` Richard Henderson
0 siblings, 1 reply; 5+ messages in thread
From: y0000218 @ 1999-01-20 8:38 UTC (permalink / raw)
Even with the Henderson fix : pre8 doesnt boot for me, no pre
kernel did (well anything after 2.1.130 that i tried).
The kernel never even outputs a single character. "jumping into
the linux kernel" and thats it.
system pc164lx, alphabios 5.66, milo -
428729 Mai 13 1998 updates/milo.lx164
/usr/local/bin/gcc --version
egcs-2.91.60
binutils-2.9.1.0.15-1
System RedHat 5.2 all updates.
Any ideas?
--
"The number of Unix installations Olaf Schnapauff,
has grown to 10, with more expected." O.Schnapauff@tu-bs.de
- The Unix Programmer's Manual,1972 http://www.tu-bs.de/~c0033014/
See Web page and keyservers for pgp public key
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Alpha/2.2.0-pre8 hang on boot 1999-01-20 8:38 Alpha/2.2.0-pre8 hang on boot y0000218 @ 1999-01-21 2:27 ` Richard Henderson 0 siblings, 0 replies; 5+ messages in thread From: Richard Henderson @ 1999-01-21 2:27 UTC (permalink / raw) To: axp-list [-- Attachment #1: Type: text/plain, Size: 604 bytes --] On Wed, Jan 20, 1999 at 08:38:14AM +0000, y0000218@rzsrv2.rz.tu-bs.de wrote: > Even with the Henderson fix : pre8 doesnt boot for me, no pre > kernel did (well anything after 2.1.130 that i tried). > > The kernel never even outputs a single character. "jumping into > the linux kernel" and thats it. I need more information. To get it, you need a patch and something hooked up to ttyS0. Apply this and enable both CONFIG_SERIAL_CONSOLE and CONFIG_EARLY_SERIAL_CONSOLE. You should get more in the way of early configuration output. Presumably some panic before the system gets going properly. r~ [-- Attachment #2: d-sercon --] [-- Type: text/plain, Size: 5219 bytes --] Index: arch/alpha/config.in =================================================================== RCS file: /home/rth/CVSROOT/linux/arch/alpha/config.in,v retrieving revision 1.11 diff -u -p -r1.11 config.in --- arch/alpha/config.in 1998/10/02 07:21:49 1.11 +++ arch/alpha/config.in 1998/11/12 02:41:17 @@ -289,4 +289,11 @@ else fi bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ + +if [ "$CONFIG_SERIAL_CONSOLE" = "y" ]; then + bool 'Enable serial console early (ttyS0 only)' CONFIG_EARLY_SERIAL_CONSOLE +fi + +bool 'In-kernel strace' CONFIG_KERNEL_STRACE + endmenu Index: arch/alpha/kernel/entry.S =================================================================== RCS file: /home/rth/CVSROOT/linux/arch/alpha/kernel/entry.S,v retrieving revision 1.8 diff -u -p -r1.8 entry.S --- arch/alpha/kernel/entry.S 1998/10/31 07:54:45 1.8 +++ arch/alpha/kernel/entry.S 1998/11/12 04:15:54 @@ -4,6 +4,7 @@ * kernel entry-points */ +#include <linux/config.h> #include <asm/system.h> #define halt .long PAL_halt @@ -539,7 +540,11 @@ entSys: s8addq $0,$5,$5 and $3,PF_PTRACED,$3 stq $18,SP_OFF+40($30) +#ifdef CONFIG_KERNEL_STRACE + br strace +#else bne $3,strace +#endif beq $4,1f ldq $27,0($5) 1: jsr $26,($27),alpha_ni_syscall @@ -577,7 +582,9 @@ restore_all: .align 3 strace: /* set up signal stack, call syscall_trace */ + mov $30,$16 bsr $1,do_switch_stack + mov 0,$17 jsr $26,syscall_trace bsr $1,undo_switch_stack @@ -607,7 +614,9 @@ strace: strace_success: stq $0,0($30) /* save return value */ + mov $30,$16 bsr $1,do_switch_stack + mov 1,$17 jsr $26,syscall_trace bsr $1,undo_switch_stack br $31,ret_from_sys_call @@ -623,9 +632,11 @@ strace_error: stq $0,0($30) stq $1,72($30) /* a3 for return */ + mov $30,$16 bsr $1,do_switch_stack bis $19,$19,$9 /* save old syscall number */ bis $20,$20,$10 /* save old a3 */ + mov 1,$17 jsr $26,syscall_trace bis $9,$9,$19 bis $10,$10,$20 Index: arch/alpha/kernel/ptrace.c =================================================================== RCS file: /home/rth/CVSROOT/linux/arch/alpha/kernel/ptrace.c,v retrieving revision 1.7 diff -u -p -r1.7 ptrace.c --- arch/alpha/kernel/ptrace.c 1998/10/12 01:15:24 1.7 +++ arch/alpha/kernel/ptrace.c 1998/11/12 04:30:32 @@ -4,6 +4,7 @@ /* mangled further by Bob Manson (manson@santafe.edu) */ /* more mutilation by David Mosberger (davidm@azstarnet.com) */ +#include <linux/config.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/mm.h> @@ -637,8 +638,20 @@ sys_ptrace(long request, long pid, long } asmlinkage void -syscall_trace(void) +syscall_trace(struct pt_regs *regs, int returning_p) { +#ifdef CONFIG_KERNEL_STRACE + if (!returning_p) + printk(KERN_INFO "TRACE: %s (%d): entering syscall " + "%ld (%#lx,%#lx,%#lx,%#lx,%#lx)\n", + current->comm, current->pid, regs->r0, regs->r16, + regs->r17, regs->r18, regs->r19, regs->r20); + else + printk(KERN_INFO "TRACE: %s (%d): leaving syscall -> %s %ld\n", + current->comm, current->pid, + (regs->r20 ? "error" : "ok"), regs->r0); +#endif + if ((current->flags & (PF_PTRACED|PF_TRACESYS)) != (PF_PTRACED|PF_TRACESYS)) return; Index: arch/alpha/kernel/setup.c =================================================================== RCS file: /home/rth/CVSROOT/linux/arch/alpha/kernel/setup.c,v retrieving revision 1.19 diff -u -p -r1.19 setup.c --- arch/alpha/kernel/setup.c 1998/10/16 05:37:37 1.19 +++ arch/alpha/kernel/setup.c 1998/11/22 21:38:22 @@ -258,6 +259,24 @@ setup_arch(char **cmdline_p, unsigned lo * Give us a default console. TGA users will see nothing until * chr_dev_init is called, rather late in the boot sequence. */ + +#ifdef CONFIG_EARLY_SERIAL_CONSOLE + { + extern int preferred_console; + + /* + * Uses only the defaults found in drivers/char/serial.c at the + * moment. We'd have to something fairly ugly with console_cmdline + * to get something else to happen before normal command-line + * processing is done. + * + * Since the default is a quite sensible ttyS0,9600,8,N,1 this + * doesn't seem worth persuing. + */ + *memory_start_p = serial_console_init(*memory_start_p, *memory_end_p); + preferred_console = -1; + } +#endif #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) Index: kernel/printk.c =================================================================== RCS file: /home/rth/CVSROOT/linux/kernel/printk.c,v retrieving revision 1.4 diff -u -p -r1.4 printk.c --- kernel/printk.c 1998/09/20 03:08:00 1.4 +++ kernel/printk.c 1998/11/12 04:03:57 @@ -53,7 +53,7 @@ static char log_buf[LOG_BUF_LEN]; static unsigned long log_start = 0; static unsigned long logged_chars = 0; struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; -static int preferred_console = -1; +int preferred_console = -1; /* * Setup a list of consoles. Called from init/main.c @@ -331,6 +331,10 @@ void register_console(struct console * c char buf[16]; signed char msg_level = -1; char *q; + + /* Handle attempts to register a console multiple times. */ + if (console->flags & CON_ENABLED) + return; /* * See if we want to use this console driver. If we ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <36A4EC93.85506BEB@stud.fbi.fh-darmstadt.de>]
* Re: Alpha/2.2.0-pre8 hang on boot [not found] <36A4EC93.85506BEB@stud.fbi.fh-darmstadt.de> @ 1999-01-20 4:06 ` Richard Henderson 1999-01-20 5:03 ` Tom Holroyd 1999-01-20 5:29 ` Michal Jaegermann 0 siblings, 2 replies; 5+ messages in thread From: Richard Henderson @ 1999-01-20 4:06 UTC (permalink / raw) To: Matthias Welwarsky, Linus Torvalds; +Cc: Linux Kernel List, axp-list On Tue, Jan 19, 1999 at 09:35:31PM +0100, Matthias Welwarsky wrote: > 2.2.0-pre8 (official :-) hangs on boot while detecting scsi devices... The hang is due to the semaphore stuff, and so must be my fault. I swear my system was up for over a day with that patch; I must have made some last minute change before sending it on, though I don't remember doing it. Anyway, that's the one character fix at the end of semaphore.h. The oopses people are seeing are due to the select/poll changes. DaveM was kind enough to leave me a fix in my mailbox this morning. (Linus, his did contain one little mistake -- use this instead.) r~ diff -rup 2.2.0-pre8/include/asm-alpha/semaphore.h 2.2.0-pre8-axp/include/asm-alpha/semaphore.h --- 2.2.0-pre8/include/asm-alpha/semaphore.h Tue Jan 19 19:50:18 1999 +++ 2.2.0-pre8-axp/include/asm-alpha/semaphore.h Tue Jan 19 20:02:07 1999 @@ -72,13 +72,13 @@ extern void __up_wakeup(struct semaphore * count = -1, waking = 0, depth = 2; * up(&sem) * dec depth - * count = -1, waking = 0, depth = 0; + * count = -1, waking = 0, depth = 1; * atomic inc and test sends us to slow path - * count = 0, waking = 0, depth = 0; + * count = 0, waking = 0, depth = 1; * notice !(depth < 0) and don't call __up. * up(&sem) * dec depth - * count = 0, waking = 0, depth = -1; + * count = 0, waking = 0, depth = 0; * atomic inc and test succeeds. * count = 1, waking = 0, depth = 0; */ @@ -227,7 +227,7 @@ extern inline void up(struct semaphore * ".section .text2,\"ax\"\n" "2: br 1b\n" "3: lda $24,%1\n" - " bge %2,4b\n" + " bgt %2,4b\n" " jsr $28,__up_wakeup\n" " ldgp $29,0($28)\n" " br 4b\n" diff -rup 2.2.0-pre8/include/linux/poll.h 2.2.0-pre8-axp/include/linux/poll.h --- 2.2.0-pre8/include/linux/poll.h Tue Jan 19 19:50:18 1999 +++ 2.2.0-pre8-axp/include/linux/poll.h Tue Jan 19 19:39:59 1999 @@ -72,15 +72,6 @@ extern inline void poll_wait(struct file typedef unsigned long kernel_fd_set[KFDS_NR/__NFDBITS]; /* - * XXX - still used by alpha osf and sparc32 compatiblity. - */ - -typedef struct { - kernel_fd_set in, out, ex; - kernel_fd_set res_in, res_out, res_ex; -} fd_set_buffer; - -/* * Scaleable version of the fd_set. */ diff -rup 2.2.0-pre8/arch/alpha/kernel/osf_sys.c 2.2.0-pre8-axp/arch/alpha/kernel/osf_sys.c --- 2.2.0-pre8/arch/alpha/kernel/osf_sys.c Mon Dec 28 16:15:16 1998 +++ 2.2.0-pre8-axp/arch/alpha/kernel/osf_sys.c Tue Jan 19 19:43:25 1999 @@ -1128,11 +1128,16 @@ asmlinkage int osf_utimes(const char *fi return ret; } +#define MAX_SELECT_SECONDS \ + ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) + asmlinkage int osf_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval32 *tvp) { - fd_set_buffer *fds; + fd_set_bits fds; + char *bits; + size_t size; unsigned long timeout; int ret; @@ -1145,28 +1150,46 @@ osf_select(int n, fd_set *inp, fd_set *o || (ret = __get_user(usec, &tvp->tv_usec))) goto out_nofds; - timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); - timeout += sec * HZ; + ret = -EINVAL; + if (sec < 0 || usec < 0) + goto out_nofds; + + if ((unsigned long) sec < MAX_SELECT_SECONDS) { + timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); + timeout += sec * (unsigned long) HZ; + } } + ret = -EINVAL; + if (n < 0 || n > KFDS_NR) + goto out_nofds; + + /* + * We need 6 bitmaps (in/out/ex for both incoming and outgoing), + * since we used fdset we need to allocate memory in units of + * long-words. + */ ret = -ENOMEM; - fds = (fd_set_buffer *) __get_free_page(GFP_KERNEL); - if (!fds) + size = FDS_BYTES(n); + bits = kmalloc(6 * size, GFP_KERNEL); + if (!bits) goto out_nofds; - ret = -EINVAL; - if (n < 0) - goto out; - if (n > KFDS_NR) - n = KFDS_NR; - if ((ret = get_fd_set(n, inp->fds_bits, fds->in)) || - (ret = get_fd_set(n, outp->fds_bits, fds->out)) || - (ret = get_fd_set(n, exp->fds_bits, fds->ex))) + fds.in = (unsigned long *) bits; + fds.out = (unsigned long *) (bits + size); + fds.ex = (unsigned long *) (bits + 2*size); + fds.res_in = (unsigned long *) (bits + 3*size); + fds.res_out = (unsigned long *) (bits + 4*size); + fds.res_ex = (unsigned long *) (bits + 5*size); + + if ((ret = get_fd_set(n, inp->fds_bits, fds.in)) || + (ret = get_fd_set(n, outp->fds_bits, fds.out)) || + (ret = get_fd_set(n, exp->fds_bits, fds.ex))) goto out; - zero_fd_set(n, fds->res_in); - zero_fd_set(n, fds->res_out); - zero_fd_set(n, fds->res_ex); + zero_fd_set(n, fds.res_in); + zero_fd_set(n, fds.res_out); + zero_fd_set(n, fds.res_ex); - ret = do_select(n, fds, &timeout); + ret = do_select(n, &fds, &timeout); /* OSF does not copy back the remaining time. */ @@ -1179,12 +1202,12 @@ osf_select(int n, fd_set *inp, fd_set *o ret = 0; } - set_fd_set(n, inp->fds_bits, fds->res_in); - set_fd_set(n, outp->fds_bits, fds->res_out); - set_fd_set(n, exp->fds_bits, fds->res_ex); + set_fd_set(n, inp->fds_bits, fds.res_in); + set_fd_set(n, outp->fds_bits, fds.res_out); + set_fd_set(n, exp->fds_bits, fds.res_ex); out: - free_page((unsigned long) fds); + kfree(bits); out_nofds: return ret; } @@ -1304,7 +1327,6 @@ asmlinkage int osf_usleep_thread(struct { struct timeval tmp; unsigned long ticks; - unsigned long tmp_timeout; if (get_tv32(&tmp, sleep)) goto fault; ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Alpha/2.2.0-pre8 hang on boot 1999-01-20 4:06 ` Richard Henderson @ 1999-01-20 5:03 ` Tom Holroyd 1999-01-20 5:29 ` Michal Jaegermann 1 sibling, 0 replies; 5+ messages in thread From: Tom Holroyd @ 1999-01-20 5:03 UTC (permalink / raw) To: axp-list On Tue, 19 Jan 1999, Richard Henderson wrote a patch for pre8 Boots now with Richard's patch: Linux bhalpha1 2.2.0-pre8 #4 Wed Jan 20 13:34:26 JST 1999 alpha unknown Dr. Tom Holroyd I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Alpha/2.2.0-pre8 hang on boot 1999-01-20 4:06 ` Richard Henderson 1999-01-20 5:03 ` Tom Holroyd @ 1999-01-20 5:29 ` Michal Jaegermann 1 sibling, 0 replies; 5+ messages in thread From: Michal Jaegermann @ 1999-01-20 5:29 UTC (permalink / raw) To: axp-list; +Cc: linux-kernel Richard Henderson wrote: > > Anyway, that's the one character fix at the end of semaphore.h. Indeed, with this patch EB64+ boots. Linux version 2.2.0-pre8 ... (gcc version egcs-2.91.60 1998 1201 (egcs-1.1.1 release)) #15 Tue Jan 19 22:11:37 MST 1999 Booting on EB64+ variation EB64+ using machine vector EB64+ Command line: bootdevice=sda2 bootfile=vmlin220.8g.gz eb64p_init_irq: resetting for CABRIO HWRPB cycle frequency bogus. Estimating... 274997448 Hz .... and it finishes. We will see about other things later. :-) Michal ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-01-21 2:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-20 8:38 Alpha/2.2.0-pre8 hang on boot y0000218
1999-01-21 2:27 ` Richard Henderson
[not found] <36A4EC93.85506BEB@stud.fbi.fh-darmstadt.de>
1999-01-20 4:06 ` Richard Henderson
1999-01-20 5:03 ` Tom Holroyd
1999-01-20 5:29 ` Michal Jaegermann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox