Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed
M. Warner Losh
imp at bsdimp.com
Thu Jun 18 03:04:05 UTC 2009
- Previous message: Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed
- Next message: Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
In message: <alpine.BSF.2.00.0906171231540.1025 at desktop>
Jeff Roberson <jroberson at jroberson.net> writes:
:
: On Tue, 9 Jun 2009, Peter Grehan wrote:
:
: >> As for sparc64 allocating the storage for the dynamic area
: >> from end probably isn't a good idea as the pmap code assumes
: >> that the range from KERNBASE to end is covered by the pages
: >> allocated by and locked into the TLB for the kernel by the
: >> loader
: >
: > Ditto for ppc. It's possible to get the additional space from within or
: > after return from pmap_bootstrap() (like thread0's kstack, or the msgbuf).
:
: http://people.freebsd.org/~jeff/dpcpu.diff
:
: I have updated this patch based on feedback relating to various
: architectures md code. I tried to model most architectures after the way
: msgbuf memory was taken. I have no capacity to test anything other than
: i386 and amd64. ARM is reported to work with one minor diff. Apparently
: sparc64 worked with the earlier diff but this should be cleaner. If
: anyone can report back on sparc64, mips, or powerpc, I'd appreciate it.
I don't understand this part of the patch:
Index: mips/mips/mp_machdep.c
===================================================================
--- mips/mips/mp_machdep.c (revision 194275)
+++ mips/mips/mp_machdep.c (working copy)
@@ -224,12 +224,15 @@ static int
smp_start_secondary(int cpuid)
{
struct pcpu *pcpu;
+ void *dpcpu;
int i;
if (bootverbose)
printf("smp_start_secondary: starting cpu %d\n", cpuid);
+ dpcpu = (void *)kmem_alloc(kernel_map, DPCPU_SIZE);
pcpu_init(&__pcpu[cpuid], cpuid, sizeof(struct pcpu));
+ dpcpu_init(dpcpu, cpuid);
if (bootverbose)
printf("smp_start_secondary: cpu %d started\n", cpuid);
So were adding a dynamic per-cpu area, in addition to the fixed part?
Warner
- Previous message: Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed
- Next message: Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freebsd-arch
mailing list