stand: use archsw.arch_copyin instead of i386_copyin
Since archsw.arch_copyin is always i386_copyin, this will be a nop in terms of functionality. This is a diff reduction against other copies of the code that differ only by what copyin routine they call. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D36568
This commit is contained in:
parent
b44869cba1
commit
a705c72f21
@ -116,18 +116,18 @@ bi_copyenv(vm_offset_t addr)
|
||||
|
||||
/* traverse the environment */
|
||||
for (ep = environ; ep != NULL; ep = ep->ev_next) {
|
||||
i386_copyin(ep->ev_name, addr, strlen(ep->ev_name));
|
||||
archsw.arch_copyin(ep->ev_name, addr, strlen(ep->ev_name));
|
||||
addr += strlen(ep->ev_name);
|
||||
i386_copyin("=", addr, 1);
|
||||
archsw.arch_copyin("=", addr, 1);
|
||||
addr++;
|
||||
if (ep->ev_value != NULL) {
|
||||
i386_copyin(ep->ev_value, addr, strlen(ep->ev_value));
|
||||
archsw.arch_copyin(ep->ev_value, addr, strlen(ep->ev_value));
|
||||
addr += strlen(ep->ev_value);
|
||||
}
|
||||
i386_copyin("", addr, 1);
|
||||
archsw.arch_copyin("", addr, 1);
|
||||
addr++;
|
||||
}
|
||||
i386_copyin("", addr, 1);
|
||||
archsw.arch_copyin("", addr, 1);
|
||||
addr++;
|
||||
return(addr);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ static struct bootinfo bi;
|
||||
#define COPY32(v, a, c) { \
|
||||
uint32_t x = (v); \
|
||||
if (c) \
|
||||
i386_copyin(&x, a, sizeof(x)); \
|
||||
archsw.arch_copyin(&x, a, sizeof(x)); \
|
||||
a += sizeof(x); \
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ static struct bootinfo bi;
|
||||
COPY32(t, a, c); \
|
||||
COPY32(strlen(s) + 1, a, c); \
|
||||
if (c) \
|
||||
i386_copyin(s, a, strlen(s) + 1); \
|
||||
archsw.arch_copyin(s, a, strlen(s) + 1); \
|
||||
a += roundup(strlen(s) + 1, sizeof(u_long));\
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ static struct bootinfo bi;
|
||||
COPY32(t, a, c); \
|
||||
COPY32(sizeof(s), a, c); \
|
||||
if (c) \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
archsw.arch_copyin(&s, a, sizeof(s)); \
|
||||
a += roundup(sizeof(s), sizeof(u_long)); \
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ static struct bootinfo bi;
|
||||
COPY32(MODINFO_METADATA | mm->md_type, a, c); \
|
||||
COPY32(mm->md_size, a, c); \
|
||||
if (c) \
|
||||
i386_copyin(mm->md_data, a, mm->md_size); \
|
||||
archsw.arch_copyin(mm->md_data, a, mm->md_size); \
|
||||
a += roundup(mm->md_size, sizeof(u_long));\
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define COPY32(v, a, c) { \
|
||||
uint32_t x = (v); \
|
||||
if (c) \
|
||||
i386_copyin(&x, a, sizeof(x)); \
|
||||
archsw.arch_copyin(&x, a, sizeof(x)); \
|
||||
a += sizeof(x); \
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
|
||||
COPY32(t, a, c); \
|
||||
COPY32(strlen(s) + 1, a, c); \
|
||||
if (c) \
|
||||
i386_copyin(s, a, strlen(s) + 1); \
|
||||
archsw.arch_copyin(s, a, strlen(s) + 1); \
|
||||
a += roundup(strlen(s) + 1, sizeof(uint64_t));\
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$");
|
||||
COPY32(t, a, c); \
|
||||
COPY32(sizeof(s), a, c); \
|
||||
if (c) \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
archsw.arch_copyin(&s, a, sizeof(s)); \
|
||||
a += roundup(sizeof(s), sizeof(uint64_t)); \
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ __FBSDID("$FreeBSD$");
|
||||
COPY32(MODINFO_METADATA | mm->md_type, a, c); \
|
||||
COPY32(mm->md_size, a, c); \
|
||||
if (c) \
|
||||
i386_copyin(mm->md_data, a, mm->md_size); \
|
||||
archsw.arch_copyin(mm->md_data, a, mm->md_size); \
|
||||
a += roundup(mm->md_size, sizeof(uint64_t));\
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user