summaryrefslogtreecommitdiff
path: root/mp.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-27 16:55:10 +0000
committerrsc <rsc>2007-08-27 16:55:10 +0000
commit112873bc6501b4763205f3f5ca6a120888217c68 (patch)
tree6cdeea12f54512f5a6a55db50621631c0dd02600 /mp.c
parentda942337841c41c4ed6abe3b0eee9a753d551b6f (diff)
downloadxv6-labs-112873bc6501b4763205f3f5ca6a120888217c68.tar.gz
xv6-labs-112873bc6501b4763205f3f5ca6a120888217c68.tar.bz2
xv6-labs-112873bc6501b4763205f3f5ca6a120888217c68.zip
nits
Diffstat (limited to 'mp.c')
-rw-r--r--mp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mp.c b/mp.c
index ee74734..2cfea01 100644
--- a/mp.c
+++ b/mp.c
@@ -114,7 +114,7 @@ mp_detect(void)
void
mp_init(void)
{
- int i, r;
+ int i;
uchar *p, *e;
struct mpctb *mpctb;
struct mppe *proc;
@@ -132,10 +132,10 @@ mp_init(void)
// application processors and initialising any I/O APICs. The table
// is guaranteed to be in order such that only one pass is necessary.
- mpctb = (struct mpctb*) mp->physaddr;
- lapicaddr = (uint*) mpctb->lapicaddr;
- p = ((uchar*)mpctb)+sizeof(struct mpctb);
- e = ((uchar*)mpctb)+mpctb->length;
+ mpctb = (struct mpctb*)mp->physaddr;
+ lapic = (uint*)mpctb->lapicaddr;
+ p = (uchar*)mpctb + sizeof(*mpctb);
+ e = (uchar*)mpctb + mpctb->length;
while(p < e) {
switch(*p){
@@ -219,7 +219,7 @@ mp_startthem(void)
*(uint*)(APBOOTCODE-8) = (uint)mpmain;
// Go!
- lapic_startap(cpus[c].apicid, (uint) APBOOTCODE);
+ lapic_startap(cpus[c].apicid, (uint)APBOOTCODE);
// Wait for cpu to get through bootstrap.
while(cpus[c].booted == 0)