*/
if (bootverbose) {
kprintf("pci:%d:%d:%d: resource reservation failed "
- "%#llx - %#llx\n", b, s, f, start, end);
+ "%#jx - %#jx\n", b, s, f,
+ (intmax_t)start, (intmax_t)end);
}
return (barlen);
#endif /* PCI_BAR_CLEAR */
*ptrack = track->next;
pmap_unmapdev((vm_offset_t)track->base, track->size);
kprintf("AcpiOsUnmapMemory: Warning, deallocation request too"
- " large! %p/%08x (actual was %p/%08x)\n",
- LogicalAddress, Length,
- track->base, track->size);
+ " large! %p/%08jx (actual was %p/%08jx)\n",
+ LogicalAddress, (intmax_t)Length,
+ track->base, (intmax_t)track->size);
#if ACPI_DEBUG_MEMMAP
track->freed = 1;
track->unmapper.func = caller;
(char *)LogicalAddress < (char *)track->base + track->size
) {
kprintf("AcpiOsUnmapMemory: Warning, deallocation did not "
- "track allocation: %p/%08x (actual was %p/%08x)\n",
- LogicalAddress, Length,
- track->base, track->size);
+ "track allocation: %p/%08jx (actual was %p/%08jx)\n",
+ LogicalAddress, (intmax_t)Length,
+ track->base, (intmax_t)track->size);
}
}
- kprintf("AcpiOsUnmapMemory: Warning, broken ACPI, bad unmap: %p/%08x\n",
- LogicalAddress, Length);
+ kprintf("AcpiOsUnmapMemory: Warning, broken ACPI, bad unmap: %p/%08jx\n",
+ LogicalAddress, (intmax_t)Length);
#if ACPI_DEBUG_MEMMAP
for (track = acpi_mapbase; track != NULL; track = track->next) {
if (track->freed && track->base == LogicalAddress) {
as->as_pendings++;
if (acpi_semaphore_debug) {
- kprintf("%s: Sleep %d, pending %d, semaphore %p, thread %d\n",
- __func__, Timeout, as->as_pendings, as, AcpiOsGetThreadId());
+ kprintf("%s: Sleep %jd, pending %jd, semaphore %p, thread %jd\n",
+ __func__, (intmax_t)Timeout,
+ (intmax_t)as->as_pendings, as,
+ (intmax_t)AcpiOsGetThreadId());
}
rv = ssleep(as, &as->as_spin, PCATCH, "acsem", tmo);
tmo = 1;
if (acpi_semaphore_debug) {
- kprintf("%s: Wakeup timeleft(%lu, %lu), tmo %u, sem %p, thread %d\n",
- __func__, timelefttv.tv_sec, timelefttv.tv_usec, tmo, as,
- AcpiOsGetThreadId());
+ kprintf("%s: Wakeup timeleft(%ju, %ju), tmo %ju, sem %p, thread %jd\n",
+ __func__,
+ (intmax_t)timelefttv.tv_sec, (intmax_t)timelefttv.tv_usec,
+ (intmax_t)tmo, as, (intmax_t)AcpiOsGetThreadId());
}
}
__func__, Timeout, as->as_pendings, as);
}
if (result == AE_OK && (as->as_timeouts > 0 || as->as_pendings > 0)) {
- kprintf("%s: Acquire %d, units %d, pending %d, sem %p, thread %d\n",
+ kprintf("%s: Acquire %d, units %d, pending %d, sem %p, thread %jd\n",
__func__, Units, as->as_units, as->as_pendings, as,
- AcpiOsGetThreadId());
+ (intmax_t)AcpiOsGetThreadId());
}
}
}
if (acpi_semaphore_debug && (as->as_timeouts > 0 || as->as_pendings > 0)) {
- kprintf("%s: Release %d, units %d, pending %d, semaphore %p, thread %d\n",
- __func__, Units, as->as_units, as->as_pendings, as, AcpiOsGetThreadId());
+ kprintf("%s: Release %d, units %d, pending %d, semaphore %p, thread %jd\n",
+ __func__, Units, as->as_units, as->as_pendings, as,
+ (intmax_t)AcpiOsGetThreadId());
}
wakeup(as);
return error;
}
if (bootverbose) {
- device_printf(dev, "control reg %d %llx\n",
- sc->pst_creg.pr_gas.SpaceId,
- sc->pst_creg.pr_gas.Address);
+ device_printf(dev, "control reg %jd %jx\n",
+ (intmax_t)sc->pst_creg.pr_gas.SpaceId,
+ (intmax_t)sc->pst_creg.pr_gas.Address);
}
/* Save and try allocating status register */
BUS_DMA_NOWAIT, &dma->dma_map);
if (r != 0) {
device_printf(sc->sc_dev, "ubsec_dma_malloc: "
- "bus_dmammem_alloc failed; size %u, error %u\n",
- size, r);
+ "bus_dmammem_alloc failed; size %ju, error %u\n",
+ (intmax_t)size, r);
goto fail_2;
}
ahaccbptov(struct aha_softc *aha, u_int32_t ccb_addr)
{
return (aha->aha_ccb_array +
- + ((struct aha_ccb*)ccb_addr-(struct aha_ccb*)aha->aha_ccb_physbase));
+ + ((struct aha_ccb*)(intptr_t)ccb_addr -
+ (struct aha_ccb*)(intptr_t)aha->aha_ccb_physbase));
}
static struct aha_ccb* ahagetccb(struct aha_softc *aha);
obp->b_error = cbp->cb_buf.b_error ?
cbp->cb_buf.b_error : EIO;
}
- kprintf("ccd%d: error %d on component %d offset %lld (ccd offset %lld)%s\n",
- unit, obp->b_error, cbp->cb_comp,
- cbp->cb_buf.b_bio2.bio_offset,
- obio->bio_offset, msg);
+ kprintf("ccd%d: error %d on component %d "
+ "offset %jd (ccd offset %jd)%s\n",
+ unit, obp->b_error, cbp->cb_comp,
+ (intmax_t)cbp->cb_buf.b_bio2.bio_offset,
+ (intmax_t)obio->bio_offset,
+ msg);
}
/*
error = so_pru_soreceive(sp->soc, NULL, uio, NULL, NULL, &flags);
if(error)
- debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd",
+ debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd",
error,
sp->soc->so_error, uio->uio_resid, iov->iov_len);
if(!error && (uio->uio_resid > 0)) {
error = EPIPE; // was EAGAIN
- debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd so_state=%x",
+ debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd "
+ "so_state=%x",
error,
- sp->soc->so_error, uio->uio_resid, iov->iov_len, sp->soc->so_state);
+ sp->soc->so_error, uio->uio_resid, iov->iov_len,
+ sp->soc->so_state);
}
return error;
i_setopt(isc_session_t *sp, isc_opt_t *opt)
{
const int digsize = 6;
- int len;
+ size_t len;
char hdigest[digsize], ddigest[digsize];
debug_called(8);
hdr->MsgLength << 2, reply_len << 1, hdr->Function);
#else
mpt_prt(mpt, "reply length does not match message length: "
- "got %x; expected %x for function %x\n",
+ "got %x; expected %zx for function %x\n",
hdr->MsgLength << 2, reply_len << 1, hdr->Function);
#endif
}
SBP_DEBUG(2)
kprintf("sbp_execute_ocb: seg %d", seg);
for (i = 0; i < seg; i++)
-#if defined(__DragonFly__) || __FreeBSD_version < 500000
- kprintf(", %x:%d", segments[i].ds_addr, segments[i].ds_len);
-#else
kprintf(", %jx:%jd", (uintmax_t)segments[i].ds_addr,
(uintmax_t)segments[i].ds_len);
-#endif
kprintf("\n");
END_DEBUG
/* XXX LSI Logic "< 16 byte" bug might be hit */
if (s->ds_len < 16)
kprintf("sbp_execute_ocb: warning, "
-#if defined(__DragonFly__) || __FreeBSD_version < 500000
- "segment length(%d) is less than 16."
-#else
"segment length(%zd) is less than 16."
-#endif
- "(seg=%d/%d)\n", s->ds_len, i+1, seg);
+ "(seg=%d/%jd)\n",
+ (size_t)s->ds_len, i+1, (intmax_t)seg);
END_DEBUG
if (s->ds_len > SBP_SEG_MAX)
panic("ds_len > SBP_SEG_MAX, fix busdma code");
SBP_DEBUG(1)
sbp_show_sdev_info(sdev, 2);
-#if defined(__DragonFly__) || __FreeBSD_version < 500000
- kprintf("%s: 0x%08x\n", __func__, ocb->bus_addr);
-#else
kprintf("%s: 0x%08jx\n", __func__, (uintmax_t)ocb->bus_addr);
-#endif
END_DEBUG
prev = STAILQ_LAST(&sdev->ocbs, sbp_ocb, ocb);
STAILQ_INSERT_TAIL(&sdev->ocbs, ocb, ocb);
if (prev != NULL) {
SBP_DEBUG(2)
-#if defined(__DragonFly__) || __FreeBSD_version < 500000
- kprintf("linking chain 0x%x -> 0x%x\n",
- prev->bus_addr, ocb->bus_addr);
-#else
kprintf("linking chain 0x%jx -> 0x%jx\n",
(uintmax_t)prev->bus_addr, (uintmax_t)ocb->bus_addr);
-#endif
END_DEBUG
prev->orb[1] = htonl(ocb->bus_addr);
prev->orb[0] = 0;
sdev = ocb->sdev;
SBP_DEBUG(0)
sbp_show_sdev_info(sdev, 2);
-#if defined(__DragonFly__) || __FreeBSD_version < 500000
- kprintf("sbp_abort_ocb 0x%x\n", ocb->bus_addr);
-#else
kprintf("sbp_abort_ocb 0x%jx\n", (uintmax_t)ocb->bus_addr);
-#endif
END_DEBUG
SBP_DEBUG(1)
if (ocb->ccb != NULL)
/*
* XXX Only valid for sizeof(int) == sizeof(void *)
*/
- info->handle = (int)info;
+ info->handle = (intptr_t)info;
DRM_SPINLOCK(&dev->drw_lock);
RB_INSERT(drawable_tree, &dev->drw_head, info);
sc->bus_addr = segments[0].ds_addr;
bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_PREWRITE);
- device_printf(sc->fd.dev,
-#if __FreeBSD_version < 500000
- "bus_addr 0x%x\n", sc->bus_addr);
-#else
- "bus_addr 0x%jx\n", (uintmax_t)sc->bus_addr);
-#endif
+ device_printf(sc->fd.dev, "bus_addr 0x%jx\n",
+ (uintmax_t)sc->bus_addr);
if (dcons_paddr != 0) {
/* XXX */
device_printf(sc->fd.dev, "dcons_paddr is already set\n");
/* XXX: tag should be passed from the caller */
#if defined(__i386__)
tag = I386_BUS_SPACE_IO;
+#else
+ tag = 0; /* XXX */
#endif
#if notyet
*/
if (img->fw_imglen <= sizeof(*hdr)) {
if_printf(&sc->sc_ic.ic_if, "%s is invalid image, "
- "size %u (too small)\n",
+ "size %zu (too small)\n",
img->fw_name, img->fw_imglen);
return EINVAL;
}
*/
if (hdr->fwh_len != img->fw_imglen - sizeof(*hdr)) {
if_printf(&sc->sc_ic.ic_if, "%s is invalid image, "
- "size in hdr %u and image size %u mismatches\n",
+ "size in hdr %u and image size %zu mismatches\n",
img->fw_name, hdr->fwh_len, img->fw_imglen);
return EINVAL;
}
struct ifnet *ifp = &sc->sc_ic.ic_if;
if (fw->fw_imglen < sizeof(*hdr)) {
- if_printf(ifp, "invalid firmware (%s): invalid size %u\n",
+ if_printf(ifp, "invalid firmware (%s): invalid size %zu\n",
fw->fw_name, fw->fw_imglen);
return 0;
}
* Don't verify IV's size, it has different meaning
*/
if (be32toh(hdr->fw_size) != fw->fw_imglen - sizeof(*hdr)) {
- if_printf(ifp, "invalid firmware (%s): size mismatch, "
- "fw %u, real %u\n", fw->fw_name,
- be32toh(hdr->fw_size),
+ if_printf(ifp,
+ "invalid firmware (%s): size mismatch, "
+ "fw %u, real %zu\n",
+ fw->fw_name, be32toh(hdr->fw_size),
fw->fw_imglen - sizeof(*hdr));
return 0;
}
length_sum = le32toh(hdr->bsize) + le32toh(hdr->usize) + le32toh(hdr->fsize);
if (length_sum + sizeof(*hdr) != image->fw_imglen) {
- if_printf(ifp, "%s size mismatch, %u/hdr %u\n", image->fw_name,
- fw->fw_image->fw_imglen, length_sum + sizeof(*hdr));
+ if_printf(ifp,
+ "%s size mismatch, %zu/hdr %zu\n",
+ image->fw_name, fw->fw_image->fw_imglen,
+ length_sum + sizeof(*hdr));
goto back;
}
if (hdr->data_size + hdr->ucode_size + sizeof(*hdr) !=
image->fw_imglen) {
- if_printf(ifp, "%s size mismatch, %u/hdr %u\n", image->fw_name,
- fw->fw_image->fw_imglen,
+ if_printf(ifp,
+ "%s size mismatch, %zu/hdr %zu\n",
+ image->fw_name, fw->fw_image->fw_imglen,
hdr->data_size + hdr->ucode_size + sizeof(*hdr));
goto back;
}
sc->my_ldata_ptr = kmalloc(sizeof(struct my_list_data) + 8,
M_DEVBUF, M_WAITOK);
sc->my_ldata = (struct my_list_data *) sc->my_ldata_ptr;
- round = (unsigned int)sc->my_ldata_ptr & 0xF;
+ round = (uintptr_t)sc->my_ldata_ptr & 0xF;
roundptr = sc->my_ldata_ptr;
for (i = 0; i < 8; i++) {
if (round % 8) {
u_int divisor;
int error;
- if (speed == 0 || speed > (ULONG_MAX - 1) / 8)
+ if (speed == 0 || speed > ((speed_t)-1 - 1) / 8)
return (0);
divisor = (rclk / (8UL * speed) + 1) / 2;
if (divisor == 0 || divisor >= 65536)
static void
sched_ithd_remote(void *arg)
{
- sched_ithd((int)arg);
+ sched_ithd((int)(intptr_t)arg);
}
#endif
}
} else {
lwkt_send_ipiq(info->i_thread.td_gd,
- sched_ithd_remote, (void *)intr);
+ sched_ithd_remote, (void *)(intptr_t)intr);
}
#else
if (info->i_running == 0) {
if ((e = p31b_proc(p, uap->pid, &p)) == 0) {
lp = FIRST_LWP_IN_PROC(p); /* XXX lwp */
- e = ksched_setparam(&uap->sysmsg_result, ksched, lp,
+ e = ksched_setparam(&uap->sysmsg_reg, ksched, lp,
(const struct sched_param *)&sched_param);
}
return e;
}
lp = FIRST_LWP_IN_PROC(targetp); /* XXX lwp */
- e = ksched_getparam(&uap->sysmsg_result, ksched, lp, &sched_param);
+ e = ksched_getparam(&uap->sysmsg_reg, ksched, lp, &sched_param);
if (!e)
copyout(&sched_param, uap->param, sizeof(sched_param));
if ((e = p31b_proc(p, uap->pid, &p)) == 0) {
lp = FIRST_LWP_IN_PROC(p); /* XXX lwp */
- e = ksched_setscheduler(&uap->sysmsg_result, ksched, lp,
+ e = ksched_setscheduler(&uap->sysmsg_reg, ksched, lp,
uap->policy, (const struct sched_param *)&sched_param);
}
return e;
}
lp = FIRST_LWP_IN_PROC(targetp); /* XXX lwp */
- e = ksched_getscheduler(&uap->sysmsg_result, ksched, lp);
+ e = ksched_getscheduler(&uap->sysmsg_reg, ksched, lp);
return e;
}
int
sys_sched_yield(struct sched_yield_args *uap)
{
- return ksched_yield(&uap->sysmsg_result, ksched);
+ return ksched_yield(&uap->sysmsg_reg, ksched);
}
int
sys_sched_get_priority_max(struct sched_get_priority_max_args *uap)
{
- return ksched_get_priority_max(&uap->sysmsg_result, ksched, uap->policy);
+ return ksched_get_priority_max(&uap->sysmsg_reg, ksched, uap->policy);
}
int
sys_sched_get_priority_min(struct sched_get_priority_min_args *uap)
{
- return ksched_get_priority_min(&uap->sysmsg_result, ksched, uap->policy);
+ return ksched_get_priority_min(&uap->sysmsg_reg, ksched, uap->policy);
}
int
struct lwp *lp = curthread->td_lwp;
if ((e = p31b_proc(p, uap->pid, &p)) == 0) {
- e = ksched_rr_get_interval(&uap->sysmsg_result, ksched,
- lp, uap->interval);
+ e = ksched_rr_get_interval(&uap->sysmsg_reg, ksched,
+ lp, uap->interval);
}
return e;
}
KASSERT((num > 0 && num <= (sizeof(netisrs)/sizeof(netisrs[0]))),
("schednetisr: bad isr %d", num));
#ifdef SMP
- if (mycpu->gd_cpuid != 0)
- lwkt_send_ipiq(globaldata_find(0), schednetisr_remote, (void *)num);
- else
+ if (mycpu->gd_cpuid != 0) {
+ lwkt_send_ipiq(globaldata_find(0),
+ schednetisr_remote, (void *)(intptr_t)num);
+ } else {
schednetisr_remote((void *)(intptr_t)num);
+ }
#else
schednetisr_remote((void *)(intptr_t)num);
#endif
return 0;
if (uio->uio_resid > TUNMRU) {
- TUNDEBUG(ifp, "len=%d!\n", uio->uio_resid);
+ TUNDEBUG(ifp, "len=%zd!\n", uio->uio_resid);
return EIO;
}
tlen = uio->uio_resid;
#endif
extern uint32_t acpi_reset_video;
-extern void initializecpu(void);
static struct region_descriptor r_idt, r_gdt, *p_gdt;
static uint16_t r_ldt;
static void
configure_final(void *dummy)
{
- int i;
-
cninit_finish();
if (bootverbose) {
/*
* Print out the BIOS's idea of the disk geometries.
*/
+ int i;
kprintf("BIOS Geometries:\n");
for (i = 0; i < N_BIOS_GEOM; i++) {
unsigned long bios_geom;
void
dl_symbol_values(long callpc, const char **name)
{
+#if 0
Dl_info info;
-
-/*
if (*name == NULL) {
if (dladdr((const void *)callpc, &info) != 0) {
if (info.dli_saddr <= (const void *)callpc)
*name = info.dli_sname;
}
}
-*/
+#endif
}
est_fqlist = findcpu(hwmodel, mv);
if (est_fqlist == NULL) {
kprintf(" - unknown CPU or operating point"
- "(cpu_id:%#x, msr:%#llx).\n", cpu_id, msr);
+ "(cpu_id:%#x, msr:%#jx).\n", cpu_id, (intmax_t)msr);
return(EOPNOTSUPP);
}
#include <machine/asmacros.h>
#include <machine/psl.h>
#include <machine/trap.h>
+#include <machine/segments.h>
#include "assym.s"
ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL));
ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL));
ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL));
-ASSYM(SEL_RPL_MASK, SEL_RPL_MASK);
+/*ASSYM(SEL_RPL_MASK, SEL_RPL_MASK);*/
ASSYM(MSR_GSBASE, MSR_GSBASE);
ASSYM(MSR_KGSBASE, MSR_KGSBASE);
#include <machine/cputypes.h>
#include <machine/md_var.h>
#include <machine/specialreg.h>
+#include <machine/smp.h>
#include <vm/vm.h>
#include <vm/pmap.h>
extern void finishidentcpu(void);
#endif
extern void panicifcpuunsupported(void);
-extern void initializecpu(void);
-
-extern void init_paging(vm_paddr_t *);
static void cpu_startup(void *);
#ifndef CPU_DISABLE_SSE
#ifdef PERFMON
perfmon_init();
#endif
- kprintf("real memory = %llu (%lluK bytes)\n", ptoa(Maxmem), ptoa(Maxmem) / 1024);
+ kprintf("real memory = %ju (%juK bytes)\n",
+ (intmax_t)ptoa(Maxmem),
+ (intmax_t)ptoa(Maxmem) / 1024);
/*
* Display any holes after the first chunk of extended memory.
*/
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
vm_paddr_t size1 = phys_avail[indx + 1] - phys_avail[indx];
- kprintf("0x%08llx - 0x%08llx, %llu bytes (%llu pages)\n",
- phys_avail[indx], phys_avail[indx + 1] - 1, size1,
- size1 / PAGE_SIZE);
+ kprintf("0x%08jx - 0x%08jx, %ju bytes (%ju pages)\n",
+ (intmax_t)phys_avail[indx],
+ (intmax_t)phys_avail[indx + 1] - 1,
+ (intmax_t)size1,
+ (intmax_t)(size1 / PAGE_SIZE));
}
}
(SMP_MAXCPU * sizeof(struct privatespace) / PAGE_SIZE)
extern pt_entry_t *SMPpt;
-static int SMPpt_alloc_index = IO_MAPPING_START_INDEX;
struct pcb stoppcbs[MAXCPU];
extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32);
-extern void initializecpu(void);
-
/*
* Local data and functions.
*/
static int apic_int_is_bus_type(int intr, int bus_type);
#endif
static int start_all_aps(u_int boot_addr);
+#if 0
static void install_ap_tramp(u_int boot_addr);
+#endif
static int start_ap(struct mdglobaldata *gd, u_int boot_addr);
static cpumask_t smp_startup_mask = 1; /* which cpus have been started */
kprintf("DragonFly/MP: Multiprocessor motherboard\n");
kprintf(" cpu0 (BSP): apic id: %2d", CPU_TO_ID(0));
kprintf(", version: 0x%08x", cpu_apic_versions[0]);
- kprintf(", at 0x%08x\n", cpu_apic_address);
+ kprintf(", at 0x%08jx\n", (intmax_t)cpu_apic_address);
for (x = 1; x <= mp_naps; ++x) {
kprintf(" cpu%d (AP): apic id: %2d", x, CPU_TO_ID(x));
kprintf(", version: 0x%08x", cpu_apic_versions[x]);
- kprintf(", at 0x%08x\n", cpu_apic_address);
+ kprintf(", at 0x%08jx\n", (intmax_t)cpu_apic_address);
}
#if defined(APIC_IO)
#endif /* APIC_IO */
}
else {
- if ((cth = mpfps->pap) == 0)
+ if (mpfps->pap == 0)
panic("MP Configuration Table Header MISSING!");
+ cth = (void *)mpfps->pap;
cpu_apic_address = (vm_offset_t) cth->apic_address;
if (mpfps->mpfb1 != 0)
return mpfps->mpfb1; /* return default configuration type */
- if ((cth = mpfps->pap) == 0)
+ if (mpfps->pap == 0)
panic("MP Configuration Table Header MISSING!");
- cth = PHYS_TO_DMAP(mpfps->pap);
+ cth = (void *)PHYS_TO_DMAP(mpfps->pap);
/* walk the table, recording info of interest */
totalSize = cth->base_table_length - sizeof(struct MPCTH);
position = (u_char *) cth + sizeof(struct MPCTH);
u_long mpbioswarmvec;
struct mdglobaldata *gd;
struct privatespace *ps;
- char *stack;
- uintptr_t kptbase;
POSTCODE(START_ALL_APS_POST);
/* install the AP 1st level boot code */
pmap_kenter(va, boot_address);
- cpu_invlpg(va); /* JG XXX */
+ cpu_invlpg((void *)va); /* JG XXX */
bcopy(mptramp_start, (void *)va, bootMP_size);
/* Locate the page tables, they'll be below the trampoline */
/* allocate new private data page(s) */
gd = (struct mdglobaldata *)kmem_alloc(&kernel_map,
MDGLOBALDATA_BASEALLOC_SIZE);
-#if JGXXX
- /* wire it into the private page table page */
- for (i = 0; i < MDGLOBALDATA_BASEALLOC_SIZE; i += PAGE_SIZE) {
- SMPpt[pg + i / PAGE_SIZE] = (pt_entry_t)
- (PG_V | PG_RW | vtophys_pte((char *)gd + i));
- }
- pg += MDGLOBALDATA_BASEALLOC_PAGES;
-
- SMPpt[pg + 0] = 0; /* *gd_CMAP1 */
- SMPpt[pg + 1] = 0; /* *gd_CMAP2 */
- SMPpt[pg + 2] = 0; /* *gd_CMAP3 */
- SMPpt[pg + 3] = 0; /* *gd_PMAP1 */
-
- /* allocate and set up an idle stack data page */
- stack = (char *)kmem_alloc(&kernel_map, UPAGES*PAGE_SIZE);
- for (i = 0; i < UPAGES; i++) {
- SMPpt[pg + 4 + i] = (pt_entry_t)
- (PG_V | PG_RW | vtophys_pte(PAGE_SIZE * i + stack));
- }
-#endif
gd = &CPU_prvspace[x].mdglobaldata; /* official location */
bzero(gd, sizeof(*gd));
gd->gd_CADDR1 = ps->CPAGE1;
gd->gd_CADDR2 = ps->CPAGE2;
gd->gd_CADDR3 = ps->CPAGE3;
- gd->gd_PADDR1 = (unsigned *)ps->PPAGE1;
+ gd->gd_PADDR1 = (pt_entry_t *)ps->PPAGE1;
gd->mi.gd_ipiq = (void *)kmem_alloc(&kernel_map, sizeof(lwkt_ipiq) * (mp_naps + 1));
bzero(gd->mi.gd_ipiq, sizeof(lwkt_ipiq) * (mp_naps + 1));
extern u_int MP_GDT;
extern u_int mp_gdtbase;
+#if 0
+
static void
install_ap_tramp(u_int boot_addr)
{
*dst8 = ((u_int) boot_addr >> 16) & 0xff;
}
+#endif
/*
* this function starts the AP (application processor) identified
static struct krate badfprate = { 1 };
-static int npx_attach (device_t dev);
static void fpusave (union savefpu *);
static void fpurstor (union savefpu *);
/*
- * Attach routine - announce which it is, and wire into system
- */
-int
-npx_attach(device_t dev)
-{
- npxinit(__INITIAL_NPXCW__);
- return (0);
-}
-
-/*
* Initialize the floating point unit.
*/
void
npxsave(curthread->td_savefpu);
}
+#if 0
/*
* The following mechanism is used to ensure that the FPE_... value
* that is passed as a trapcode to the signal handler of the user
FPE_FLTSUB, /* 7F - INV | DNML | DZ | OFL | UFL | IMP | STK */
};
+#endif
+
#if 0
/*
#define MINPV 2048
-#if !defined(PMAP_DIAGNOSTIC)
-#define PMAP_INLINE __inline
-#else
-#define PMAP_INLINE
-#endif
-
/*
* Get PDEs and PTEs for user/kernel address space
*/
#define DISABLE_PSE
-static PMAP_INLINE void free_pv_entry (pv_entry_t pv);
static pv_entry_t get_pv_entry (void);
-static void i386_protection_init (void);
-static __inline void pmap_clearbit (vm_page_t m, int bit);
-
-static void pmap_remove_all (vm_page_t m);
-static void pmap_enter_quick (pmap_t pmap, vm_offset_t va, vm_page_t m);
-static int pmap_remove_pte (struct pmap *pmap, pt_entry_t *ptq,
+static void i386_protection_init (void);
+static void create_pagetables(vm_paddr_t *firstaddr);
+static void pmap_remove_all (vm_page_t m);
+static void pmap_enter_quick (pmap_t pmap, vm_offset_t va, vm_page_t m);
+static int pmap_remove_pte (struct pmap *pmap, pt_entry_t *ptq,
vm_offset_t sva, pmap_inval_info_t info);
static void pmap_remove_page (struct pmap *pmap,
vm_offset_t va, pmap_inval_info_t info);
-static int pmap_remove_entry (struct pmap *pmap, vm_page_t m,
+static int pmap_remove_entry (struct pmap *pmap, vm_page_t m,
vm_offset_t va, pmap_inval_info_t info);
static boolean_t pmap_testbit (vm_page_t m, int bit);
static void pmap_insert_entry (pmap_t pmap, vm_offset_t va,
- vm_page_t mpte, vm_page_t m);
+ vm_page_t mpte, vm_page_t m);
static vm_page_t pmap_allocpte (pmap_t pmap, vm_offset_t va);
static vm_page_t _pmap_allocpte (pmap_t pmap, vm_pindex_t ptepindex);
static pt_entry_t * pmap_pte_quick (pmap_t pmap, vm_offset_t va);
static vm_page_t pmap_page_lookup (vm_object_t object, vm_pindex_t pindex);
-static int pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m,
- pmap_inval_info_t info);
+static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m,
+ pmap_inval_info_t info);
static int pmap_unuse_pt (pmap_t, vm_offset_t, vm_page_t, pmap_inval_info_t);
static vm_offset_t pmap_kmem_choose(vm_offset_t addr);
* by using a large (2MB) page for much of the kernel
* (.text, .data, .bss)
*/
-static vm_offset_t
+static
+vm_offset_t
pmap_kmem_choose(vm_offset_t addr)
{
vm_offset_t newaddr = addr;
*/
static __inline pt_entry_t *pmap_pte(pmap_t pmap, vm_offset_t va);
-static pt_entry_t *
+static
+pt_entry_t *
pmap_pte_quick(pmap_t pmap, vm_offset_t va)
{
return pmap_pte(pmap, va);
}
/* Return a non-clipped PD index for a given VA */
-static __inline vm_pindex_t
+static __inline
+vm_pindex_t
pmap_pde_pindex(vm_offset_t va)
{
return va >> PDRSHIFT;
}
/* Return various clipped indexes for a given VA */
-static __inline vm_pindex_t
+static __inline
+vm_pindex_t
pmap_pte_index(vm_offset_t va)
{
return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1));
}
-static __inline vm_pindex_t
+static __inline
+vm_pindex_t
pmap_pde_index(vm_offset_t va)
{
return ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1));
}
-static __inline vm_pindex_t
+static __inline
+vm_pindex_t
pmap_pdpe_index(vm_offset_t va)
{
return ((va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1));
}
-static __inline vm_pindex_t
+static __inline
+vm_pindex_t
pmap_pml4e_index(vm_offset_t va)
{
}
/* Return a pointer to the PML4 slot that corresponds to a VA */
-static __inline pml4_entry_t *
+static __inline
+pml4_entry_t *
pmap_pml4e(pmap_t pmap, vm_offset_t va)
{
}
/* Return a pointer to the PDP slot that corresponds to a VA */
-static __inline pdp_entry_t *
+static __inline
+pdp_entry_t *
pmap_pml4e_to_pdpe(pml4_entry_t *pml4e, vm_offset_t va)
{
pdp_entry_t *pdpe;
}
/* Return a pointer to the PDP slot that corresponds to a VA */
-static __inline pdp_entry_t *
+static __inline
+pdp_entry_t *
pmap_pdpe(pmap_t pmap, vm_offset_t va)
{
pml4_entry_t *pml4e;
}
/* Return a pointer to the PD slot that corresponds to a VA */
-static __inline pd_entry_t *
+static __inline
+pd_entry_t *
pmap_pdpe_to_pde(pdp_entry_t *pdpe, vm_offset_t va)
{
pd_entry_t *pde;
}
/* Return a pointer to the PD slot that corresponds to a VA */
-static __inline pd_entry_t *
+static __inline
+pd_entry_t *
pmap_pde(pmap_t pmap, vm_offset_t va)
{
pdp_entry_t *pdpe;
}
/* Return a pointer to the PT slot that corresponds to a VA */
-static __inline pt_entry_t *
+static __inline
+pt_entry_t *
pmap_pde_to_pte(pd_entry_t *pde, vm_offset_t va)
{
pt_entry_t *pte;
}
/* Return a pointer to the PT slot that corresponds to a VA */
-static __inline pt_entry_t *
+static __inline
+pt_entry_t *
pmap_pte(pmap_t pmap, vm_offset_t va)
{
pd_entry_t *pde;
return (pmap_pde_to_pte(pde, va));
}
-
-PMAP_INLINE pt_entry_t *
+static __inline
+pt_entry_t *
vtopte(vm_offset_t va)
{
uint64_t mask = ((1ul << (NPTEPGSHIFT + NPDEPGSHIFT + NPDPEPGSHIFT + NPML4EPGSHIFT)) - 1);
return (PTmap + ((va >> PAGE_SHIFT) & mask));
}
-static __inline pd_entry_t *
+static __inline
+pd_entry_t *
vtopde(vm_offset_t va)
{
uint64_t mask = ((1ul << (NPDEPGSHIFT + NPDPEPGSHIFT + NPML4EPGSHIFT)) - 1);
return (ret);
}
+static
void
create_pagetables(vm_paddr_t *firstaddr)
{
int i;
- int count;
- uint64_t cpu0pp, cpu0idlestk;
- int idlestk_page_offset = offsetof(struct privatespace, idlestack) / PAGE_SIZE;
/* we are running (mostly) V=P at this point */
vm_offset_t va;
pt_entry_t *pte;
struct mdglobaldata *gd;
- int i;
int pg;
KvaStart = VM_MIN_KERNEL_ADDRESS;
* This code checks for non-writeable/modified pages.
* This should be an invalid condition.
*/
-static int
+static
+int
pmap_nw_modified(pt_entry_t pte)
{
if ((pte & (PG_M|PG_RW)) == PG_M)
* this routine defines the region(s) of memory that should
* not be tested for the modified bit.
*/
-static PMAP_INLINE int
+static __inline
+int
pmap_track_modified(vm_offset_t va)
{
if ((va < clean_sva) || (va >= clean_eva))
* the call should be made with a critical section held so the page's object
* association remains valid on return.
*/
-static vm_page_t
+static
+vm_page_t
pmap_page_lookup(vm_object_t object, vm_pindex_t pindex)
{
vm_page_t m;
* This routine unholds page table pages, and if the hold count
* drops to zero, then it decrements the wire count.
*/
-static int
-_pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, pmap_inval_info_t info)
+static __inline
+int
+pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m,
+ pmap_inval_info_t info)
+{
+ KKASSERT(m->hold_count > 0);
+ if (m->hold_count > 1) {
+ vm_page_unhold(m);
+ return 0;
+ } else {
+ return _pmap_unwire_pte_hold(pmap, va, m, info);
+ }
+}
+
+static
+int
+_pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m,
+ pmap_inval_info_t info)
{
/*
* Wait until we can busy the page ourselves. We cannot have
}
}
-static PMAP_INLINE int
-pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, pmap_inval_info_t info)
-{
- KKASSERT(m->hold_count > 0);
- if (m->hold_count > 1) {
- vm_page_unhold(m);
- return 0;
- } else {
- return _pmap_unwire_pte_hold(pmap, va, m, info);
- }
-}
-
/*
* After removing a page table entry, this routine is used to
* conditionally free the page, and manage the hold/wire counts.
*/
-static int
+static
+int
pmap_unuse_pt(pmap_t pmap, vm_offset_t va, vm_page_t mpte,
pmap_inval_info_t info)
{
}
#endif
}
-
return pmap_unwire_pte_hold(pmap, va, mpte, info);
}
KKASSERT(pmap->pm_active == 0);
if ((p = pmap->pm_pdirm) != NULL) {
KKASSERT(pmap->pm_pml4 != NULL);
- KKASSERT(pmap->pm_pml4 != (PTOV_OFFSET + KPML4phys));
+ KKASSERT(pmap->pm_pml4 != (void *)(PTOV_OFFSET + KPML4phys));
pmap_kremove((vm_offset_t)pmap->pm_pml4);
p->wire_count--;
vmstats.v_wire_count--;
pmap->pm_pdirm = NULL;
}
if (pmap->pm_pml4) {
- KKASSERT(pmap->pm_pml4 != (PTOV_OFFSET + KPML4phys));
+ KKASSERT(pmap->pm_pml4 != (void *)(PTOV_OFFSET + KPML4phys));
kmem_free(&kernel_map, (vm_offset_t)pmap->pm_pml4, PAGE_SIZE);
pmap->pm_pml4 = NULL;
}
* leave it cached so we do not have to incur the SMP inval overhead of
* removing the kernel mapping. pmap_puninit() will take care of it.
*/
-static int
+static
+int
pmap_release_free_page(struct pmap *pmap, vm_page_t p)
{
- pml4_entry_t *pml4 = pmap->pm_pml4;
/*
* This code optimizes the case of freeing non-busy
* page-table pages. Those pages are zero now, and
*/
vm_page_t m4 = vm_page_lookup(pmap->pm_pteobj, NUPDE + NUPDPE + PML4PML4I);
KKASSERT(m4 != NULL);
- pml4_entry_t *pml4 = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m4));
+ pml4_entry_t *pml4 = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m4));
int idx = (p->pindex - (NUPDE + NUPDPE)) % NPML4EPG;
KKASSERT(pml4[idx] != 0);
pml4[idx] = 0;
*/
vm_page_t m3 = vm_page_lookup(pmap->pm_pteobj, NUPDE + NUPDPE + (p->pindex - NUPDE) / NPDPEPG);
KKASSERT(m3 != NULL);
- pdp_entry_t *pdp = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m3));
+ pdp_entry_t *pdp = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m3));
int idx = (p->pindex - NUPDE) % NPDPEPG;
KKASSERT(pdp[idx] != 0);
pdp[idx] = 0;
*/
vm_page_t m2 = vm_page_lookup(pmap->pm_pteobj, NUPDE + p->pindex / NPDEPG);
KKASSERT(m2 != NULL);
- pd_entry_t *pd = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m2));
+ pd_entry_t *pd = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m2));
int idx = p->pindex % NPDEPG;
pd[idx] = 0;
m2->hold_count--;
* This routine is called when various levels in the page table need to
* be populated. This routine cannot fail.
*/
-static vm_page_t
+static
+vm_page_t
_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex)
{
vm_page_t m;
return (m);
}
-static vm_page_t
+static
+vm_page_t
pmap_allocpte(pmap_t pmap, vm_offset_t va)
{
vm_pindex_t ptepindex;
} while (info.error);
}
-static int
+static
+int
pmap_release_callback(struct vm_page *p, void *data)
{
struct rb_vm_page_scan_info *info = data;
/*
* Grow the number of kernel page table entries, if needed.
*/
-
void
pmap_growkernel(vm_offset_t addr)
{
vm_paddr_t paddr;
- struct pmap *pmap;
vm_offset_t ptppaddr;
vm_page_t nkpg;
pd_entry_t *pde, newpdir;
* free the pv_entry back to the free list. This function may be
* called from an interrupt.
*/
-static PMAP_INLINE void
+static __inline
+void
free_pv_entry(pv_entry_t pv)
{
pv_entry_count--;
* get a new pv_entry, allocating a block from the system
* when needed. This function may be called from an interrupt.
*/
-static pv_entry_t
+static
+pv_entry_t
get_pv_entry(void)
{
pv_entry_count++;
* to the header. Otherwise we must search the list for
* the entry. In either case we free the now unused entry.
*/
-static int
+static
+int
pmap_remove_entry(struct pmap *pmap, vm_page_t m,
vm_offset_t va, pmap_inval_info_t info)
{
* Create a pv entry for page at pa for
* (pmap, va).
*/
-static void
+static
+void
pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m)
{
pv_entry_t pv;
/*
* pmap_remove_pte: do the things to unmap a page in a process
*/
-static int
+static
+int
pmap_remove_pte(struct pmap *pmap, pt_entry_t *ptq, vm_offset_t va,
pmap_inval_info_t info)
{
* This function may not be called from an interrupt if the pmap is
* not kernel_pmap.
*/
-static void
+static
+void
pmap_remove_page(struct pmap *pmap, vm_offset_t va, pmap_inval_info_t info)
{
pt_entry_t *pte;
* This routine may not be called from an interrupt.
*/
-static void
+static
+void
pmap_remove_all(vm_page_t m)
{
struct pmap_inval_info info;
*
* This code currently may only be used on user pmaps, not kernel_pmap.
*/
-static void
+static
+void
pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m)
{
pt_entry_t *pte;
*/
void
pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
- vm_size_t len, vm_offset_t src_addr)
+ vm_size_t len, vm_offset_t src_addr)
{
+ return;
+#if 0
pmap_inval_info info;
vm_offset_t addr;
vm_offset_t end_addr = src_addr + len;
if (dst_addr != src_addr)
return;
- /*
- * XXX BUGGY. Amoung other things srcmpte is assumed to remain
- * valid through blocking calls, and that's just not going to
- * be the case.
- *
- * FIXME!
- */
- return;
-
-#if 0
#if JGPMAP32
src_frame = src_pmap->pm_pdir[PTDPTDI] & PG_FRAME;
if (src_frame != (PTDpde & PG_FRAME)) {
void
pmap_page_assertzero(vm_paddr_t phys)
{
- struct mdglobaldata *gd = mdcpu;
- int i;
-
- crit_enter();
vm_offset_t virt = PHYS_TO_DMAP(phys);
+ int i;
- for (i = 0; i < PAGE_SIZE; i += sizeof(int)) {
- if (*(int *)((char *)virt + i) != 0) {
- panic("pmap_page_assertzero() @ %p not zero!\n",
- (void *)virt);
+ for (i = 0; i < PAGE_SIZE; i += sizeof(long)) {
+ if (*(long *)((char *)virt + i) != 0) {
+ panic("pmap_page_assertzero() @ %p not zero!\n", (void *)virt);
}
}
- crit_exit();
}
/*
void
pmap_zero_page_area(vm_paddr_t phys, int off, int size)
{
- struct mdglobaldata *gd = mdcpu;
-
- crit_enter();
vm_offset_t virt = PHYS_TO_DMAP(phys);
+
bzero((char *)virt + off, size);
- crit_exit();
}
/*
{
vm_offset_t src_virt, dst_virt;
- crit_enter();
src_virt = PHYS_TO_DMAP(src);
dst_virt = PHYS_TO_DMAP(dst);
- bcopy(src_virt, dst_virt, PAGE_SIZE);
- crit_exit();
+ bcopy((void *)src_virt, (void *)dst_virt, PAGE_SIZE);
}
/*
{
vm_offset_t src_virt, dst_virt;
- crit_enter();
src_virt = PHYS_TO_DMAP(src);
dst_virt = PHYS_TO_DMAP(dst);
+
bcopy((char *)src_virt + (src & PAGE_MASK),
(char *)dst_virt + (dst & PAGE_MASK),
bytes);
- crit_exit();
}
/*
* note that the testbit/clearbit routines are inline,
* and a lot of things compile-time evaluate.
*/
-static boolean_t
+static
+boolean_t
pmap_testbit(vm_page_t m, int bit)
{
pv_entry_t pv;
/*
* this routine is used to modify bits in ptes
*/
-static __inline void
+static __inline
+void
pmap_clearbit(vm_page_t m, int bit)
{
struct pmap_inval_info info;
* Miscellaneous support routines follow
*/
-static void
+static
+void
i386_protection_init(void)
{
int *kp, prot;
void pmap_pvdump (vm_paddr_t pa);
/* print address space of pmap*/
-static void
+static
+void
pads(pmap_t pm)
{
vm_offset_t va;
#include <machine/thread.h>
#include <machine/vmparam.h>
#include <machine/md_var.h>
+#include <machine_base/isa/intr_machdep.h>
#include <ddb/ddb.h>
#include <sys/thread2.h>
#include <machine/lock.h>
#include <machine/psl.h>
#include <machine/trap.h>
+#include <machine/segments.h>
#include <machine_base/icu/icu.h>
#include <bus/isa/isa.h>
#include <machine_base/isa/intr_machdep.h> /* Xspuriousint() */
+#include "apicvar.h"
+
/* EISA Edge/Level trigger control registers */
#define ELCR0 0x4d0 /* eisa irq 0-7 */
#define ELCR1 0x4d1 /* eisa irq 8-15 */
# notyet (BIOS struct and functions)
#bus/pci/amd64/pci_pir.c optional pci
-platform/pc64/amd64/init.c standard
+#platform/pc64/amd64/init.c standard
platform/pc64/amd64/globaldata.c standard
platform/pc64/amd64/pmap.c standard
platform/pc64/amd64/pmap_inval.c standard
#include <machine/lock.h>
#include <machine/psl.h>
#include <machine/trap.h>
+#include <machine/segments.h>
#include <machine_base/icu/icu.h>
#include <bus/isa/i386/isa.h>
extern u_int basemem;
extern int busdma_swi_pending;
extern void (*cpu_idle_hook)(void);
+extern void cpu_idle(void);
extern u_int cpu_exthigh;
extern u_int amd_feature;
extern u_int amd_feature2;
void enable_sse(void);
void fillw(int /*u_short*/ pat, void *base, size_t cnt);
void pagezero(void *addr);
-int isa_nmi(int cd);
void pagecopy(void *from, void *to);
void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
int user_dbreg_trap(void);
#endif
#ifdef _KERNEL
-/*
- * virtual address to page table entry and
- * to physical address. Likewise for alternate address space.
- * Note: these work recursively, thus vtopte of a pte will give
- * the corresponding pde that in turn maps it.
- */
-pt_entry_t *vtopte(vm_offset_t);
-
-#define avtopte(va) (APTmap + amd64_btop(va))
-
/*
* XXX
extern vm_offset_t clean_sva;
extern char *ptvmmap; /* poor name! */
+void init_paging(vm_paddr_t *);
void pmap_bootstrap ( vm_paddr_t *);
void *pmap_mapdev (vm_paddr_t, vm_size_t);
void *pmap_mapdev_uncacheable(vm_paddr_t, vm_size_t);
void u_sleep (int);
void cpu_send_ipiq (int);
int cpu_send_ipiq_passive (int);
+void initializecpu(void);
/* global data in init_smp.c */
extern cpumask_t smp_active_mask;
#define USRSTACK VM_MAX_USER_ADDRESS
-#define PHYS_TO_DMAP(x) ((x) | DMAP_MIN_ADDRESS)
-#define DMAP_TO_PHYS(x) ((x) & ~DMAP_MIN_ADDRESS)
+#define PHYS_TO_DMAP(x) ((vm_offset_t)(x) | DMAP_MIN_ADDRESS)
+#define DMAP_TO_PHYS(x) ((vm_paddr_t)(x) & ~DMAP_MIN_ADDRESS)
/* initial pagein size of beginning of executable file */
#ifndef VM_INITIAL_PAGEIN
void
forward_fastint_remote(void *arg)
{
- int irq = (int)arg;
+ int irq = (int)(intptr_t)arg;
struct mdglobaldata *gd = mdcpu;
atomic_set_int_nonlocked(&gd->gd_fpending, 1 << irq);
if (error == 0 && sio.sb_cc != len) {
if (sio.sb_cc != 0)
log(LOG_INFO,
- "short receive (%d/%d) from nfs server %s\n",
- len - auio.uio_resid, len,
+ "short receive (%zu/%d) from nfs server %s\n",
+ (size_t)len - auio.uio_resid, len,
nmp->nm_mountp->mnt_stat.f_mntfromname);
error = EPIPE;
}
}
if (auio.uio_resid) {
krateprintf(&vresrate,
- "vnode_pager_putpages: residual I/O %d at %lu\n",
+ "vnode_pager_putpages: residual I/O %zd at %lu\n",
auio.uio_resid, (u_long)m[0]->pindex);
}
for (i = 0; i < ncount; i++)