Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2011 14:21:03 +0300
From:      Sergey Kandaurov <pluknet@freebsd.org>
To:        Andrew Turner <andrew@fubar.geek.nz>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Olivier Houchard <cognet@freebsd.org>
Subject:   Re: svn commit: r218666 - in head/sys/arm: at91 econa sa11x0 xscale/i80321 xscale/ixp425
Message-ID:  <AANLkTi=UU6jfos0jWfbdc9V6b8HHHd3EzpWLDqFwwn=k@mail.gmail.com>
In-Reply-To: <20110221232357.2ae44d4b@fubar.geek.nz>
References:  <201102132002.p1DK2kRg051314@svn.freebsd.org> <20110221232357.2ae44d4b@fubar.geek.nz>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 21 February 2011 13:23, Andrew Turner <andrew@fubar.geek.nz> wrote:
> On Sun, 13 Feb 2011 20:02:46 +0000 (UTC)
> Olivier Houchard <cognet@FreeBSD.org> wrote:
>> Modified: head/sys/arm/at91/at91_machdep.c
>> ==============================================================================
>> --- head/sys/arm/at91/at91_machdep.c  Sun Feb 13 19:46:55
>> 2011  (r218665) +++ head/sys/arm/at91/at91_machdep.c  Sun
>> Feb 13 20:02:46 2011  (r218666) @@ -234,7 +234,7 @@
>> at91_ramsize(void) bw = (cr & AT91SAM9G20_SDRAMC_CR_DBW_16) ? 1 : 2;
>>       }
>>
>> -     return (1 << (cols + rows + banks + bw));
>> +     return ((1 << (cols + rows + banks + bw));
>>  }
>>
>>  void *
>> @@ -302,6 +302,8 @@ initarm(void *arg, void *arg2)
>>       valloc_pages(kernelstack, KSTACK_PAGES);
>>       valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
>>
>> +     /* Do basic tuning, hz etc */
>> +     init_param1();
> This appears to be wrong. As msgbufsize is set in init_param1 it is
> used before being set in the at91 initarm function.
>
> Andrew
>

Oh,

this should work (see also in attach).
init_param1() moved under PCPU_SET(curthread, &thread0).

Index: sys/arm/xscale/i8134x/crb_machdep.c
===================================================================
--- sys/arm/xscale/i8134x/crb_machdep.c (revision 218911)
+++ sys/arm/xscale/i8134x/crb_machdep.c (working copy)
@@ -196,6 +196,9 @@
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);

+       /* Do basic tuning, hz etc */
+       init_param1();
+
        freemempos = 0x00200000;
        /* Define a macro to simplify memory allocation */
 #define        valloc_pages(var, np)                   \
@@ -389,8 +392,6 @@
        phys_avail[i++] = 0;
        phys_avail[i] = 0;

-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
        return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
Index: sys/arm/xscale/pxa/pxa_machdep.c
===================================================================
--- sys/arm/xscale/pxa/pxa_machdep.c    (revision 218911)
+++ sys/arm/xscale/pxa/pxa_machdep.c    (working copy)
@@ -182,6 +182,9 @@
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);

+       /* Do basic tuning, hz etc */
+       init_param1();
+
        freemempos = 0xa0200000;
        /* Define a macro to simplify memory allocation */
 #define        valloc_pages(var, np)                   \
@@ -424,8 +427,6 @@
        phys_avail[0] = round_page(virtual_avail - KERNBASE + phys_avail[0]);
 #endif

-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
        return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
Index: sys/arm/s3c2xx0/s3c24x0_machdep.c
===================================================================
--- sys/arm/s3c2xx0/s3c24x0_machdep.c   (revision 218911)
+++ sys/arm/s3c2xx0/s3c24x0_machdep.c   (working copy)
@@ -257,6 +257,9 @@
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);

+       /* Do basic tuning, hz etc */
+       init_param1();
+
 #define KERNEL_TEXT_BASE (KERNBASE)
        freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
        /* Define a macro to simplify memory allocation */
@@ -438,8 +441,6 @@
        phys_avail[2] = 0;
        phys_avail[3] = 0;

-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();

Index: sys/arm/at91/at91_machdep.c
===================================================================
--- sys/arm/at91/at91_machdep.c (revision 218911)
+++ sys/arm/at91/at91_machdep.c (working copy)
@@ -256,6 +256,9 @@
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);

+       /* Do basic tuning, hz etc */
+       init_param1();
+
        freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
        /* Define a macro to simplify memory allocation */
 #define valloc_pages(var, np)                   \
@@ -302,8 +305,6 @@
        valloc_pages(kernelstack, KSTACK_PAGES);
        valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);

-       /* Do basic tuning, hz etc */
-       init_param1();
        /*
         * Now we start construction of the L1 page table
         * We start by mapping the L2 page tables into the L1.


-- 
wbr,
pluknet

[-- Attachment #2 --]
Index: sys/arm/xscale/i8134x/crb_machdep.c
===================================================================
--- sys/arm/xscale/i8134x/crb_machdep.c	(revision 218911)
+++ sys/arm/xscale/i8134x/crb_machdep.c	(working copy)
@@ -196,6 +196,9 @@
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
+	/* Do basic tuning, hz etc */
+	init_param1();
+
 	freemempos = 0x00200000;
 	/* Define a macro to simplify memory allocation */
 #define	valloc_pages(var, np)			\
@@ -389,8 +392,6 @@
 	phys_avail[i++] = 0;
 	phys_avail[i] = 0;
 	
-	/* Do basic tuning, hz etc */
-	init_param1();
 	init_param2(physmem);
 	kdb_init();
 	return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
Index: sys/arm/xscale/pxa/pxa_machdep.c
===================================================================
--- sys/arm/xscale/pxa/pxa_machdep.c	(revision 218911)
+++ sys/arm/xscale/pxa/pxa_machdep.c	(working copy)
@@ -182,6 +182,9 @@
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
+	/* Do basic tuning, hz etc */
+	init_param1();
+
 	freemempos = 0xa0200000;
 	/* Define a macro to simplify memory allocation */
 #define	valloc_pages(var, np)			\
@@ -424,8 +427,6 @@
 	phys_avail[0] = round_page(virtual_avail - KERNBASE + phys_avail[0]);
 #endif
 
-	/* Do basic tuning, hz etc */
-	init_param1();
 	init_param2(physmem);
 	kdb_init();
 	return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
Index: sys/arm/s3c2xx0/s3c24x0_machdep.c
===================================================================
--- sys/arm/s3c2xx0/s3c24x0_machdep.c	(revision 218911)
+++ sys/arm/s3c2xx0/s3c24x0_machdep.c	(working copy)
@@ -257,6 +257,9 @@
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
+	/* Do basic tuning, hz etc */
+	init_param1();
+
 #define KERNEL_TEXT_BASE (KERNBASE)
 	freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
 	/* Define a macro to simplify memory allocation */
@@ -438,8 +441,6 @@
 	phys_avail[2] = 0;
 	phys_avail[3] = 0;
 
-	/* Do basic tuning, hz etc */
-	init_param1();
 	init_param2(physmem);
 	kdb_init();
 
Index: sys/arm/at91/at91_machdep.c
===================================================================
--- sys/arm/at91/at91_machdep.c	(revision 218911)
+++ sys/arm/at91/at91_machdep.c	(working copy)
@@ -256,6 +256,9 @@
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
+	/* Do basic tuning, hz etc */
+	init_param1();
+
 	freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
 	/* Define a macro to simplify memory allocation */
 #define valloc_pages(var, np)                   \
@@ -302,8 +305,6 @@
 	valloc_pages(kernelstack, KSTACK_PAGES);
 	valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
 
-	/* Do basic tuning, hz etc */
-	init_param1();
 	/*
 	 * Now we start construction of the L1 page table
 	 * We start by mapping the L2 page tables into the L1.
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=UU6jfos0jWfbdc9V6b8HHHd3EzpWLDqFwwn=k>