sys/cam/ata/ata_da.c
3553
else if (maxio > maxphys)
sys/cam/ata/ata_da.c
3554
maxio = maxphys; /* for safety */
sys/cam/cam_compat.c
384
error = cam_periph_mapmem(ccb, &mapinfo, maxphys);
sys/cam/cam_compat.c
447
error = cam_periph_mapmem(ccb, &mapinfo, maxphys);
sys/cam/cam_periph.c
817
else if (maxmap > maxphys)
sys/cam/cam_periph.c
818
maxmap = maxphys; /* for safety */
sys/cam/cam_periph.c
844
maxmap = maxphys;
sys/cam/cam_periph.c
912
maxmap = maxphys;
sys/cam/cam_xpt.c
557
error = cam_periph_mapmem(inccb, &mapinfo, maxphys);
sys/cam/ctl/ctl_backend_block.c
108
#define CTLBLK_MAX_SEG MIN(1024 * 1024, MAX(CTLBLK_MIN_SEG, maxphys))
sys/cam/ctl/ctl_backend_block.c
1252
max_iosize = maxphys;
sys/cam/ctl/ctl_tpc.c
67
#define TPC_MAX_IO_SIZE (8 * MIN(1024 * 1024, MAX(128 * 1024, maxphys)))
sys/cam/mmc/mmc_da.c
1556
part->disk->d_maxsize = MIN(maxphys, cpi.maxio);
sys/cam/nvme/nvme_da.c
1006
else if (maxio > maxphys)
sys/cam/nvme/nvme_da.c
1007
maxio = maxphys; /* for safety */
sys/cam/scsi/scsi_cd.c
697
else if (cpi.maxio > maxphys)
sys/cam/scsi/scsi_cd.c
698
softc->disk->d_maxsize = maxphys; /* for safety */
sys/cam/scsi/scsi_da.c
3008
else if (cpi.maxio > maxphys)
sys/cam/scsi/scsi_da.c
3009
softc->maxio = maxphys; /* for safety */
sys/cam/scsi/scsi_da.c
4991
if (block_size >= maxphys) {
sys/cam/scsi/scsi_pass.c
599
softc->io_zone_size = maxphys;
sys/cam/scsi/scsi_pass.c
606
else if (cpi.maxio > maxphys)
sys/cam/scsi/scsi_pass.c
607
softc->maxio = maxphys; /* for safety */
sys/cam/scsi/scsi_sa.c
2606
else if (cpi.maxio > maxphys)
sys/cam/scsi/scsi_sa.c
2607
softc->maxio = maxphys;
sys/cam/scsi/scsi_sg.c
324
else if (cpi.maxio > maxphys)
sys/cam/scsi/scsi_sg.c
325
softc->maxio = maxphys; /* for safety */
sys/cam/scsi/scsi_target.c
405
else if (cpi.maxio > maxphys)
sys/cam/scsi/scsi_target.c
406
softc->maxio = maxphys; /* for safety */
sys/compat/linprocfs/linprocfs.c
2044
if (buflen > maxphys)
sys/compat/linprocfs/linprocfs.c
2045
buflen = maxphys;
sys/compat/linux/linux_ioctl.c
2280
cbs.max_len = maxphys - 1;
sys/compat/linux/linux_socket.c
2561
bufsz = min(count, maxphys);
sys/dev/aacraid/aacraid_var.h
477
maxphys)
sys/dev/acpica/acpi_pxm.c
527
acpi_pxm_init(int ncpus, vm_paddr_t maxphys)
sys/dev/acpica/acpi_pxm.c
537
maxphyaddr = maxphys;
sys/dev/acpica/acpivar.h
598
int acpi_pxm_init(int ncpus, vm_paddr_t maxphys);
sys/dev/ahci/ahci.h
312
#define AHCI_SG_ENTRIES MIN(roundup(btoc(maxphys) + 1, 8), 65528)
sys/dev/ahci/ahciem.c
648
cpi->maxio = maxphys;
sys/dev/ata/ata-all.h
153
#define ATA_DMA_ENTRIES MAX(17, btoc(maxphys) + 1)
sys/dev/flash/cqspi.c
720
xdma_prep_sg(sc->xchan_tx, TX_QUEUE_SIZE, maxphys, 8, 16, 0,
sys/dev/flash/cqspi.c
722
xdma_prep_sg(sc->xchan_rx, TX_QUEUE_SIZE, maxphys, 8, 16, 0,
sys/dev/isci/scil/sci_controller_constants.h
158
#define __MAXPHYS_ELEMENTS ((maxphys / PAGE_SIZE) + 1)
sys/dev/iscsi/iscsi.c
2615
cpi->maxio = maxphys;
sys/dev/md/md.c
1516
sc->s_vnode.kva = kva_alloc(maxphys + PAGE_SIZE);
sys/dev/md/md.c
1571
kva_free(sc->s_vnode.kva, maxphys + PAGE_SIZE);
sys/dev/md/md.c
1738
if (sectsize > maxphys || mdr->md_mediasize < sectsize)
sys/dev/md/md.c
978
npages = atop(min(maxphys, round_page(len + (ma_offs &
sys/dev/md/md.c
982
KASSERT(npages <= atop(maxphys + PAGE_SIZE),
sys/dev/mpi3mr/mpi3mr_pci.c
181
sc->max_sgl_entries = maxphys / PAGE_SIZE;
sys/dev/mpr/mpr.c
444
maxio = min(maxio, maxphys);
sys/dev/mps/mps.c
423
maxio = min(maxio, maxphys);
sys/dev/mpt/mpt.c
2692
mpt->max_cam_seg_cnt = min(mpt->max_seg_cnt, btoc(maxphys) + 1);
sys/dev/mrsas/mrsas.c
2133
maxphys,
sys/dev/mrsas/mrsas.c
2135
maxphys,
sys/dev/mvs/mvs.c
2418
cpi->maxio = maxphys;
sys/dev/mvs/mvs.h
393
#define MVS_SG_ENTRIES (btoc(maxphys) + 1)
sys/dev/nvme/nvme_ctrlr.c
1365
if (npages > atop(maxphys))
sys/dev/nvme/nvme_ctrlr.c
1718
ctrlr->max_xfer_size = MIN(maxphys, (ctrlr->page_size / 8 * ctrlr->page_size));
sys/dev/nvmf/host/nvmf.c
550
sc->max_xfer_size = maxphys;
sys/dev/pms/freebsd/driver/ini/src/agdef.h
64
#define AGTIAPI_NSEGS (MIN(btoc(maxphys), 64) + 1)
sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
1598
maxphys, PAGE_SIZE );
sys/dev/rtsx/rtsx.c
314
#define RTSX_DMA_DATA_BUFSIZE maxphys
sys/dev/sdhci/sdhci.c
2674
mmc_path_inq(&ccb->cpi, "Deglitch Networks", sim, maxphys);
sys/dev/sdhci/sdhci.c
800
if (maxphys <= 1024 * 4)
sys/dev/sdhci/sdhci.c
802
else if (maxphys <= 1024 * 8)
sys/dev/sdhci/sdhci.c
804
else if (maxphys <= 1024 * 16)
sys/dev/sdhci/sdhci.c
806
else if (maxphys <= 1024 * 32)
sys/dev/sdhci/sdhci.c
808
else if (maxphys <= 1024 * 64)
sys/dev/sdhci/sdhci.c
810
else if (maxphys <= 1024 * 128)
sys/dev/sdhci/sdhci.c
812
else if (maxphys <= 1024 * 256)
sys/dev/siis/siis.c
1966
cpi->maxio = maxphys;
sys/dev/siis/siis.h
265
#define SIIS_SG_ENTRIES (roundup(btoc(maxphys), 4) + 1)
sys/dev/usb/storage/umass.c
2415
cpi->maxio = maxphys;
sys/dev/virtio/block/virtio_blk.c
356
if (blkcfg.size_max < maxphys) {
sys/dev/virtio/block/virtio_blk.c
394
maxphys, /* max request size */
sys/dev/virtio/block/virtio_blk.c
396
maxphys, /* maxsegsize */
sys/dev/virtio/block/virtio_blk.c
749
nsegs += MIN(blkcfg->seg_max, maxphys / PAGE_SIZE + 1);
sys/dev/virtio/scsi/virtio_scsi.c
476
nsegs += MIN(seg_max, maxphys / PAGE_SIZE + 1);
sys/dev/xen/blkfront/blkfront.c
1318
if (sc->xbd_max_request_segments > XBD_SIZE_TO_SEGS(maxphys))
sys/dev/xen/blkfront/blkfront.c
1319
sc->xbd_max_request_segments = XBD_SIZE_TO_SEGS(maxphys);
sys/fs/cd9660/cd9660_vfsops.c
241
if (mp->mnt_iosize_max > maxphys)
sys/fs/cd9660/cd9660_vfsops.c
242
mp->mnt_iosize_max = maxphys;
sys/fs/ext2fs/ext2_vfsops.c
878
if (mp->mnt_iosize_max > maxphys)
sys/fs/ext2fs/ext2_vfsops.c
879
mp->mnt_iosize_max = maxphys;
sys/fs/ext2fs/ext2_vfsops.c
921
e2fs_maxcontig = MAX(1, maxphys / ump->um_e2fs->e2fs_bsize);
sys/fs/fuse/fuse_vfsops.c
454
mp->mnt_iosize_max = maxphys;
sys/fs/msdosfs/msdosfs_vfsops.c
546
if (mp->mnt_iosize_max > maxphys)
sys/fs/msdosfs/msdosfs_vfsops.c
547
mp->mnt_iosize_max = maxphys;
sys/fs/udf/udf_vfsops.c
329
if (mp->mnt_iosize_max > maxphys)
sys/fs/udf/udf_vfsops.c
330
mp->mnt_iosize_max = maxphys;
sys/geom/cache/g_cache.c
494
if (md->md_bsize == 0 || md->md_bsize > maxphys ||
sys/geom/eli/g_eli_integrity.c
350
if (cbp->bio_length > maxphys) {
sys/geom/eli/g_eli_integrity.c
352
cbp2->bio_length = cbp->bio_length - maxphys;
sys/geom/eli/g_eli_integrity.c
353
cbp2->bio_data = cbp->bio_data + maxphys;
sys/geom/eli/g_eli_integrity.c
354
cbp2->bio_offset = cbp->bio_offset + maxphys;
sys/geom/eli/g_eli_integrity.c
357
cbp->bio_length = maxphys;
sys/geom/eli/g_eli_integrity.c
418
if (cbp->bio_length > maxphys) {
sys/geom/eli/g_eli_integrity.c
420
cbp2->bio_length = cbp->bio_length - maxphys;
sys/geom/eli/g_eli_integrity.c
421
cbp2->bio_data = cbp->bio_data + maxphys;
sys/geom/eli/g_eli_integrity.c
422
cbp2->bio_offset = cbp->bio_offset + maxphys;
sys/geom/eli/g_eli_integrity.c
425
cbp->bio_length = maxphys;
sys/geom/geom_dev.c
397
dev->si_iosize_max = maxphys;
sys/geom/geom_dev.c
685
#define MAXENTRIES (maxphys / sizeof(struct disk_zone_rep_entry))
sys/geom/geom_io.c
886
length <= maxphys, ("g_read_data(): invalid length %jd",
sys/geom/geom_io.c
943
length <= maxphys, ("g_write_data(): invalid length %jd",
sys/geom/journal/g_journal.c
1054
if (pbp->bio_length + cbp->bio_length > maxphys) {
sys/geom/journal/g_journal.h
216
((sc)->sc_jprovider->sectorsize + GJ_RECORD_HEADER_NENTRIES * maxphys)
sys/geom/label/g_label_ntfs.c
122
if (recsize <= 0 || recsize > maxphys || recsize % pp->sectorsize != 0)
sys/geom/mirror/g_mirror.c
2112
bp->bio_length = MIN(maxphys,
sys/geom/mirror/g_mirror.c
2170
bp->bio_data = malloc(maxphys, M_MIRROR, M_WAITOK);
sys/geom/nop/g_nop.c
380
if (secsize > maxphys) {
sys/geom/part/g_part_apm.c
583
for (index = 0; index < tblsz; index += maxphys / pp->sectorsize) {
sys/geom/part/g_part_apm.c
586
(tblsz - index > maxphys / pp->sectorsize) ? maxphys:
sys/geom/part/g_part_gpt.c
1280
for (index = 0; index < tblsz; index += maxphys / pp->sectorsize) {
sys/geom/part/g_part_gpt.c
1284
(tblsz - index > maxphys / pp->sectorsize) ? maxphys :
sys/geom/part/g_part_gpt.c
1302
for (index = 0; index < tblsz; index += maxphys / pp->sectorsize) {
sys/geom/part/g_part_gpt.c
1306
(tblsz - index > maxphys / pp->sectorsize) ? maxphys :
sys/geom/part/g_part_gpt.c
568
for (idx = 0; idx < sectors; idx += maxphys / pp->sectorsize) {
sys/geom/part/g_part_gpt.c
569
size = (sectors - idx > maxphys / pp->sectorsize) ? maxphys:
sys/geom/part/g_part_ldm.c
1020
for (n = 0; n < size; n += maxphys / pp->sectorsize) {
sys/geom/part/g_part_ldm.c
1022
sectors = (size - n) > (maxphys / pp->sectorsize) ?
sys/geom/part/g_part_ldm.c
1023
maxphys / pp->sectorsize : size - n;
sys/geom/raid/md_ddf.c
1163
if (GET32(meta, hdr->cd_length) * ss >= maxphys ||
sys/geom/raid/md_ddf.c
1164
GET32(meta, hdr->pdr_length) * ss >= maxphys ||
sys/geom/raid/md_ddf.c
1165
GET32(meta, hdr->vdr_length) * ss >= maxphys ||
sys/geom/raid/md_ddf.c
1166
GET32(meta, hdr->cr_length) * ss >= maxphys ||
sys/geom/raid/md_ddf.c
1167
GET32(meta, hdr->pdd_length) * ss >= maxphys ||
sys/geom/raid/md_ddf.c
1168
GET32(meta, hdr->bbmlog_length) * ss >= maxphys) {
sys/geom/raid/md_promise.c
346
if (pp->sectorsize * 4 > maxphys) {
sys/geom/raid3/g_raid3.c
1753
bp->bio_length = MIN(maxphys, sc->sc_mediasize - bp->bio_offset);
sys/geom/raid3/g_raid3.c
1782
if (sync->ds_offset_done + maxphys * 100 < moffset) {
sys/geom/raid3/g_raid3.c
2269
bp->bio_data = malloc(maxphys, M_RAID3, M_WAITOK);
sys/geom/raid3/g_raid3.c
2272
bp->bio_length = MIN(maxphys, sc->sc_mediasize - bp->bio_offset);
sys/geom/raid3/g_raid3.c
2952
if (md->md_sectorsize > maxphys) {
sys/geom/shsec/g_shsec.c
114
g_shsec_maxmem = maxphys * 100;
sys/geom/shsec/g_shsec.c
116
g_shsec_zone = uma_zcreate("g_shsec_zone", maxphys, NULL, NULL, NULL,
sys/geom/shsec/g_shsec.c
118
g_shsec_maxmem -= g_shsec_maxmem % maxphys;
sys/geom/shsec/g_shsec.c
119
uma_zone_set_max(g_shsec_zone, g_shsec_maxmem / maxphys);
sys/geom/stripe/g_stripe.c
118
g_stripe_maxmem = maxphys * 100;
sys/geom/stripe/g_stripe.c
120
g_stripe_zone = uma_zcreate("g_stripe_zone", maxphys, NULL, NULL,
sys/geom/stripe/g_stripe.c
122
g_stripe_maxmem -= g_stripe_maxmem % maxphys;
sys/geom/stripe/g_stripe.c
123
uma_zone_set_max(g_stripe_zone, g_stripe_maxmem / maxphys);
sys/geom/stripe/g_stripe.c
638
if (g_stripe_fast && bp->bio_length <= maxphys &&
sys/geom/union/g_union.c
189
if (secsize > maxphys) {
sys/geom/uzip/g_uzip.c
137
#define MAX_BLKSZ (maxphys)
sys/geom/uzip/g_uzip.c
293
if (bp2->bio_length <= maxphys) {
sys/geom/virstor/g_virstor.c
1246
bs = MIN(maxphys, sc->map_size - count);
sys/geom/virstor/g_virstor.c
149
MPASS(VIRSTOR_MAP_BLOCK_ENTRIES * VIRSTOR_MAP_ENTRY_SIZE == maxphys);
sys/geom/virstor/g_virstor.h
42
#define VIRSTOR_MAP_BLOCK_ENTRIES (maxphys / VIRSTOR_MAP_ENTRY_SIZE)
sys/kern/kern_mib.c
154
lvalue = maxphys;
sys/kern/kern_mib.c
162
SYSCTL_PROC(_kern, KERN_MAXPHYS, maxphys, CTLTYPE_LONG | CTLFLAG_RDTUN |
sys/kern/kern_mib.c
166
SYSCTL_ULONG(_kern, KERN_MAXPHYS, maxphys,
sys/kern/kern_mib.c
168
&maxphys, 0, "Maximum block I/O access size");
sys/kern/kern_physio.c
146
if (bp->bio_length > maxphys)
sys/kern/kern_physio.c
147
bp->bio_length = maxphys;
sys/kern/kern_physio.c
70
(uio->uio_resid > dev->si_iosize_max || uio->uio_resid > maxphys ||
sys/kern/kern_physio.c
79
if (uio->uio_resid > maxphys)
sys/kern/kern_physio.c
82
uio->uio_resid, maxphys);
sys/kern/kern_physio.c
96
maxpages = btoc(MIN(uio->uio_resid, maxphys)) + 1;
sys/kern/kern_sendfile.c
882
rhpages = min(howmany(maxphys, PAGE_SIZE), rhpages);
sys/kern/subr_param.c
102
u_long maxphys; /* max raw I/O transfer size */
sys/kern/subr_param.c
338
maxphys = MAXPHYS;
sys/kern/subr_param.c
339
TUNABLE_ULONG_FETCH("kern.maxphys", &maxphys);
sys/kern/subr_param.c
340
if (maxphys == 0) {
sys/kern/subr_param.c
341
maxphys = MAXPHYS;
sys/kern/subr_param.c
342
} else if (__bitcountl(maxphys) != 1) { /* power of two */
sys/kern/subr_param.c
343
if (flsl(maxphys) == NBBY * sizeof(maxphys))
sys/kern/subr_param.c
344
maxphys = MAXPHYS;
sys/kern/subr_param.c
346
maxphys = 1UL << flsl(maxphys);
sys/kern/subr_param.c
348
if (maxphys < PAGE_SIZE)
sys/kern/subr_param.c
349
maxphys = MAXPHYS;
sys/kern/vfs_aio.c
1256
if (job->uiop->uio_iov[i].iov_len > maxphys) {
sys/kern/vfs_aio.c
1332
atop(maxphys) + 1);
sys/kern/vfs_aio.c
2464
MPASS(pbuf->b_npages <= atop(maxphys) + 1);
sys/kern/vfs_aio.c
2474
MPASS(bp->bio_ma_n <= atop(maxphys) + 1);
sys/kern/vfs_bio.c
1034
if (maxbcachebuf > maxphys)
sys/kern/vfs_bio.c
1035
maxbcachebuf = maxphys;
sys/kern/vfs_bio.c
1171
if (biotmap_sz / INT_MAX > maxphys)
sys/kern/vfs_bio.c
1174
bio_transient_maxcnt = biotmap_sz / maxphys;
sys/kern/vfs_bio.c
1228
unmapped_buf = (caddr_t)kva_alloc(maxphys);
sys/kern/vfs_bio.c
1277
128 * maxphys), 1024 * 1024);
sys/kern/vfs_bio.c
1372
maxphys, ("b_data + b_offset unmapped %p", bp));
sys/kern/vfs_bio.c
3278
maxcl = maxphys / size;
sys/kern/vfs_default.c
846
if (iosize > maxphys)
sys/kern/vfs_default.c
847
iosize = maxphys;
sys/kern/vfs_vnops.c
3699
else if (blksize > maxphys)
sys/kern/vfs_vnops.c
3700
blksize = maxphys;
sys/net/if.c
3157
max_len = maxphys - 1;
sys/powerpc/mambo/mambo_disk.c
115
d->d_maxsize = maxphys; /* Maybe ask bridge? */
sys/sys/systm.h
72
extern u_long maxphys; /* max raw I/O transfer size */
sys/ufs/ffs/ffs_subr.c
777
WCHK(fs->fs_maxcontig, >, MAX(256, maxphys / fs->fs_bsize), %jd);
sys/ufs/ffs/ffs_vfsops.c
911
if (mp->mnt_iosize_max > maxphys)
sys/ufs/ffs/ffs_vfsops.c
912
mp->mnt_iosize_max = maxphys;
sys/vm/swap_pager.c
694
nsw_cluster_max = min(maxphys / PAGE_SIZE, MAX_PAGEOUT_CLUSTER);
sys/vm/vm_init.c
240
size = (long)nbuf * BKVASIZE + (long)bio_transient_maxcnt * maxphys;
sys/vm/vm_init.c
260
size = (long)bio_transient_maxcnt * maxphys;
sys/vm/vm_map.h
415
#define VM_FAULT_READ_AHEAD_MAX min(atop(maxphys) - 1, UINT8_MAX)
sys/vm/vm_pager.h
134
#define PBUF_PAGES (atop(maxphys) + 1)
sys/vm/vnode_pager.c
1015
if (rbehind + rahead + count > atop(maxphys)) {
sys/vm/vnode_pager.c
1018
trim = rbehind + rahead + count - atop(maxphys) + 1;
sys/vm/vnode_pager.c
1029
KASSERT(rbehind + rahead + count <= atop(maxphys),
sys/vm/vnode_pager.c
1031
rbehind, rahead, count, maxphys));
sys/vm/vnode_pager.c
1061
KASSERT(bp->b_npages <= atop(maxphys),
sys/vm/vnode_pager.c
916
KASSERT(count <= atop(maxphys),
usr.bin/tcopy/tcopy.cc
713
unsigned long maxphys = 0;
usr.bin/tcopy/tcopy.cc
714
size_t l_maxphys = sizeof maxphys;
usr.bin/tcopy/tcopy.cc
720
if (!sysctlbyname("kern.maxphys", &maxphys, &l_maxphys, NULL, 0UL))
usr.bin/tcopy/tcopy.cc
721
maxblk = maxphys;