[uClinux-dev] "wrong zone alignment" warning and &_end_kernel in 2.4.20

Markus Pietrek maillist at fsforth.de
Wed Mar 12 05:50:02 EST 2003


Hi folks,

when booting uClinux-2.4.20 on a NetARM+50 or NS7520 (armnommu) I receive the 
kernel warning "BUG: wrong zone alignment, it will crash". The code for this 
warning is in mmnommu/page_alloc.c

void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
	unsigned long *zones_size, unsigned long zone_start_paddr, 
	unsigned long *zholes_size, struct page *lmem_map)
...
		if ((zone_start_paddr >> PAGE_SHIFT) & (zone_required_alignment-1))
			printk("BUG: wrong zone alignment, it will crash %x %x %x %x\n", 
zone_start_paddr, PAGE_SHIFT, zone_required_alignment, MAX_ORDER );
...

The zone 1 is starting directly after the kernel, which is located at 0x0.

zone_start_paddr == PAGE_OFFSET == &_end_kernel == 1376256
PAGE_SHIFT == 12
MAX_ORDER == 10
zone_required_alignment == 0x1ff

I don't understand the reason of this function. But to get rid of this message 
I would have to align _end_kernel at a 2MB boundary, wasting 600kb memory. 
Are there other, better ways?

Best regards,

-- 
Markus Pietrek
FS Forth-Systeme GmbH
Phone: +49 (7667) 908 145,  FAX +49 (7667) 908 221





More information about the uClinux-dev mailing list