Subject: Re: dubiosity in fault-armv.c

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 27 Jan 1999 22:01:43 +0000 (GMT)

Philip Blundell writes:
> pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long offset)
> {
> 	pte_t *pte;
> 
> 	pte = (pte_t *) get_small_page(GFP_KERNEL);
> 	if (pmd_none(*pmd)) {
> 		if (pte) {
> 			memzero(pte, PTRS_PER_PTE * BYTES_PER_PTR);
> 			set_pmd(pmd, mk_kernel_pmd(pte));
> 			return pte + offset;
> 		}
> 		set_pmd(pmd, mk_kernel_pmd(BAD_PAGETABLE));
> 		return NULL;
> 	}
> 	free_small_page((unsigned long) pte);
> 	if (pmd_bad(*pmd)) {
> 		__bad_pmd_kernel(pmd);
> 		return NULL;
> 	}
> 	return (pte_t *) pmd_page(*pmd) + offset;
> }
> 
> Can it happen that get_small_page() returns NULL owing to a memory shortage, 
> but we sleep anyway and somebody else fills in the pte in the meantime, in 

Yes, this is possible.

> which case we end up passing NULL back to free_small_page?  (I've been getting 
> complaints from that routine in my syslog from time to time.)

Correct.  I suppose free_small_page ought not to complain when this happens
(just accept but ignore it).  Ok, fixed.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Dave Baukus <[email-masked]>
Date: Wed, 27 Jan 1999 18:43:35 -0600

What release/version do people recommend for arm-linux on the ebsa285 (not as a
coprocessor) ?

After finally getting 2.1.132 pre-patch-2.1.132-19990103-1 booting from flash,
I'm dying in register_console() called from serial_console_init().

Taking heed of the README under linux/arch/arm/drivers/char1, I'm choosing not 
debug it - yet.

The question is will 2.2.0 re-patch-2.2.0-final-19990123-3 be of any help ?

-- 
Dave Baukus
	Inet Inc. - R & D
	[email-masked]
	(972) 578 - 3930

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Thu, 28 Jan 1999 19:09:24 +0000 (GMT)

> What release/version do people recommend for arm-linux on the ebsa285 (not as a

patch-2.2.0-19990127-1.gz is the latest, and first of the 2.2 kernels.  It
should be ok on the EBSA285 (I haven't heard any complaints yet).

> I'm dying in register_console() called from serial_console_init().

You can get the kernel messages out of the serial port.  To do this, I add
to kernel/printk.c, just after va_end(args) in printk():

	printascii(buf+3);

However, keep an eye in arch/arm/kernel/head-armv.S around line 410, since the
debugging code needs to be correctly configured for the machine you're actually
booting (since an EBSA285 kernel can be booted not only on EBSA285 but on
Netwinder, and the serial port hardware is significantly different).

NOTE! This code is only meant to be used by people who hack the kernel.  Please
don't attempt to optimise it.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]