* Missing code in bootmem.c for discontigmem
@ 2003-11-27 15:42 Xavier Bru
2003-12-01 17:22 ` Jesse Barnes
2003-12-01 19:25 ` Jesse Barnes
0 siblings, 2 replies; 3+ messages in thread
From: Xavier Bru @ 2003-11-27 15:42 UTC (permalink / raw)
To: linux-ia64
Hello all,
Booting 2.6.0-test10 on Numa system, we fall in:
Kernel panic: map_single: bounce buffer is not DMA'ble
due to alloc_bootmem_low_pages() returning a highmem address at sw IO TLB
initialization:
Placing software IO TLB between 0xe0000030014e4000 - 0xe0000030016e4000
This was OK in test9 due to init_bootmem_core() sorting the pgdat_list.
Restoring the previous code, system boots OK (using the last scsi
patches :-)
Herafter the patch:
diff --exclude-from /home2/xb/proc/diff.exclude -Nur 0t10/mm/bootmem.c
linux-2.6.0-test10.old/mm/bootmem.c
--- 0t10/mm/bootmem.c 2003-11-24 02:31:28.000000000 +0100
+++ linux-2.6.0-test10.old/mm/bootmem.c 2003-11-27 15:19:53.000000000
+0100
@@ -48,8 +48,24 @@
bootmem_data_t *bdata = pgdat->bdata;
unsigned long mapsize = ((end - start)+7)/8;
- pgdat->pgdat_next = pgdat_list;
- pgdat_list = pgdat;
+
+ /*
+ * sort pgdat_list so that the lowest one comes first,
+ * which makes alloc_bootmem_low_pages work as desired.
+ */
+ if (!pgdat_list || pgdat_list->node_start_pfn >
pgdat->node_start_pfn) {
+ pgdat->pgdat_next = pgdat_list;
+ pgdat_list = pgdat;
+ } else {
+ pg_data_t *tmp = pgdat_list;
+ while (tmp->pgdat_next) {
+ if (tmp->pgdat_next->node_start_pfn > pgdat->node_start_pfn)
+ break;
+ tmp = tmp->pgdat_next;
+ }
+ pgdat->pgdat_next = tmp->pgdat_next;
+ tmp->pgdat_next = pgdat;
+ }
mapsize = (mapsize + (sizeof(long) - 1UL)) & ~(sizeof(long) - 1UL);
bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);
--
Sincères salutations.
_____________________________________________________________________
Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422
tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr
fax : +33 (0)4 76 29 77 70 mailto:Xavier.Bru@bull.net
addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
_____________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Missing code in bootmem.c for discontigmem
2003-11-27 15:42 Missing code in bootmem.c for discontigmem Xavier Bru
@ 2003-12-01 17:22 ` Jesse Barnes
2003-12-01 19:25 ` Jesse Barnes
1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2003-12-01 17:22 UTC (permalink / raw)
To: linux-ia64
Yeah, sorry about that, I knew there would be a problem. We need to fix
the ia64 discontig code to init the boot memory in the correct order
instead since the below change breaks other discontig platforms.
Jesse
On Thu, Nov 27, 2003 at 04:42:12PM +0100, Xavier Bru wrote:
> Hello all,
>
> Booting 2.6.0-test10 on Numa system, we fall in:
> Kernel panic: map_single: bounce buffer is not DMA'ble
> due to alloc_bootmem_low_pages() returning a highmem address at sw IO TLB
> initialization:
> Placing software IO TLB between 0xe0000030014e4000 - 0xe0000030016e4000
> This was OK in test9 due to init_bootmem_core() sorting the pgdat_list.
> Restoring the previous code, system boots OK (using the last scsi
> patches :-)
> Herafter the patch:
>
> diff --exclude-from /home2/xb/proc/diff.exclude -Nur 0t10/mm/bootmem.c
> linux-2.6.0-test10.old/mm/bootmem.c
> --- 0t10/mm/bootmem.c 2003-11-24 02:31:28.000000000 +0100
> +++ linux-2.6.0-test10.old/mm/bootmem.c 2003-11-27 15:19:53.000000000
> +0100
> @@ -48,8 +48,24 @@
> bootmem_data_t *bdata = pgdat->bdata;
> unsigned long mapsize = ((end - start)+7)/8;
>
> - pgdat->pgdat_next = pgdat_list;
> - pgdat_list = pgdat;
> +
> + /*
> + * sort pgdat_list so that the lowest one comes first,
> + * which makes alloc_bootmem_low_pages work as desired.
> + */
> + if (!pgdat_list || pgdat_list->node_start_pfn >
> pgdat->node_start_pfn) {
> + pgdat->pgdat_next = pgdat_list;
> + pgdat_list = pgdat;
> + } else {
> + pg_data_t *tmp = pgdat_list;
> + while (tmp->pgdat_next) {
> + if (tmp->pgdat_next->node_start_pfn > pgdat->node_start_pfn)
> + break;
> + tmp = tmp->pgdat_next;
> + }
> + pgdat->pgdat_next = tmp->pgdat_next;
> + tmp->pgdat_next = pgdat;
> + }
>
> mapsize = (mapsize + (sizeof(long) - 1UL)) & ~(sizeof(long) - 1UL);
> bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);
>
> --
>
> Sinc?res salutations.
> _____________________________________________________________________
>
> Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422
> tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr
> fax : +33 (0)4 76 29 77 70 mailto:Xavier.Bru@bull.net
> addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
> _____________________________________________________________________
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Missing code in bootmem.c for discontigmem
2003-11-27 15:42 Missing code in bootmem.c for discontigmem Xavier Bru
2003-12-01 17:22 ` Jesse Barnes
@ 2003-12-01 19:25 ` Jesse Barnes
1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2003-12-01 19:25 UTC (permalink / raw)
To: linux-ia64
On Mon, Dec 01, 2003 at 09:22:12AM -0800, Jesse Barnes wrote:
> Yeah, sorry about that, I knew there would be a problem. We need to fix
> the ia64 discontig code to init the boot memory in the correct order
> instead since the below change breaks other discontig platforms.
It looks like we should break out the second half of
discontig.c:find_pernode_space() into a second function that inits the
bootmaps in reverse order. As an added bonus, we could check to make
sure that all of the pernode spaces actually got allocated and print a
warning and/or disable the node if not. That would make debugging weird
init time failures a bit easier (I think Alex ran into a problem that
would have been quickly solved if we had such checks). Wanna take a
stab at it?
Thanks,
Jesse
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-12-01 19:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-27 15:42 Missing code in bootmem.c for discontigmem Xavier Bru
2003-12-01 17:22 ` Jesse Barnes
2003-12-01 19:25 ` Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox