Replace u64_t by uint64_t
This commit is contained in:
@@ -97,7 +97,7 @@ static struct super_block sb;
|
||||
* btoa64 gives the byte address of a block
|
||||
*/
|
||||
#define ztob(z) ((block_nr) (z) << sb.s_log_zone_size)
|
||||
#define btoa64(b) ((u64_t)(b) * block_size)
|
||||
#define btoa64(b) ((uint64_t)(b) * block_size)
|
||||
#define SCALE ((int) ztob(1)) /* # blocks in a zone */
|
||||
#define FIRST ((zone_nr) sb.s_firstdatazone) /* as the name says */
|
||||
|
||||
@@ -656,12 +656,12 @@ void chksuper()
|
||||
|
||||
int inoblock(int inn)
|
||||
{
|
||||
return (int)(((u64_t)(inn - 1) * INODE_SIZE) / block_size) + BLK_ILIST;
|
||||
return (int)(((uint64_t)(inn - 1) * INODE_SIZE) / block_size) + BLK_ILIST;
|
||||
}
|
||||
|
||||
int inooff(int inn)
|
||||
{
|
||||
return (int)(((u64_t)(inn - 1) * INODE_SIZE) % block_size);
|
||||
return (int)(((uint64_t)(inn - 1) * INODE_SIZE) % block_size);
|
||||
}
|
||||
|
||||
/* Make a listing of the inodes given by `clist'. If `repair' is set, ask
|
||||
|
||||
@@ -316,8 +316,8 @@ void geometry(void)
|
||||
/* Use the same fake geometry as part. */
|
||||
if (fstat(fd, &sb) < 0)
|
||||
fatal(device);
|
||||
geometry.base= ((u64_t)(0));
|
||||
geometry.size= ((u64_t)(sb.st_size));
|
||||
geometry.base= ((uint64_t)(0));
|
||||
geometry.size= ((uint64_t)(sb.st_size));
|
||||
geometry.sectors= 32;
|
||||
geometry.heads= 64;
|
||||
geometry.cylinders= (sb.st_size-1)/SECTOR_SIZE/
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
char *buffer = NULL;
|
||||
size_t block_size = 0, mult_max = 0;
|
||||
size_t buffer_size;
|
||||
u64_t volume_size;
|
||||
uint64_t volume_size;
|
||||
char *str_vol_size;
|
||||
int rflag = 0, wflag = 0, oneflag = 0, variable = 0;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ static i2c_addr_t valid_addrs[9] = {
|
||||
static int cat24c256_blk_open(devminor_t minor, int access);
|
||||
static int cat24c256_blk_close(devminor_t minor);
|
||||
static ssize_t cat24c256_blk_transfer(devminor_t minor, int do_write,
|
||||
u64_t pos, endpoint_t endpt, iovec_t * iov, unsigned int count, int flags);
|
||||
uint64_t pos, endpoint_t endpt, iovec_t * iov, unsigned int count, int flags);
|
||||
static int cat24c256_blk_ioctl(devminor_t minor, unsigned long request,
|
||||
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
|
||||
static struct device *cat24c256_blk_part(devminor_t minor);
|
||||
@@ -103,15 +103,15 @@ cat24c256_blk_close(devminor_t minor)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
cat24c256_blk_transfer(devminor_t minor, int do_write, u64_t pos64,
|
||||
cat24c256_blk_transfer(devminor_t minor, int do_write, uint64_t pos64,
|
||||
endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags)
|
||||
{
|
||||
/* Read or write one the driver's block devices. */
|
||||
unsigned int count;
|
||||
struct device *dv;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_size;
|
||||
int r;
|
||||
u64_t position;
|
||||
uint64_t position;
|
||||
cp_grant_id_t grant;
|
||||
ssize_t total = 0;
|
||||
vir_bytes offset;
|
||||
@@ -424,8 +424,8 @@ sef_cb_init(int type, sef_init_info_t * UNUSED(info))
|
||||
lu_state_restore();
|
||||
}
|
||||
|
||||
geom[EEPROM_DEV].dv_base = ((u64_t) (0));
|
||||
geom[EEPROM_DEV].dv_size = ((u64_t) (32768));
|
||||
geom[EEPROM_DEV].dv_base = ((uint64_t) (0));
|
||||
geom[EEPROM_DEV].dv_size = ((uint64_t) (32768));
|
||||
|
||||
/* look-up the endpoint for the bus driver */
|
||||
bus_endpoint = i2cdriver_bus_endpoint(bus);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
static int hello_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static int hello_close(devminor_t minor);
|
||||
static ssize_t hello_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t hello_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
|
||||
/* SEF functions and variables. */
|
||||
@@ -45,11 +45,11 @@ static int hello_close(devminor_t UNUSED(minor))
|
||||
return OK;
|
||||
}
|
||||
|
||||
static ssize_t hello_read(devminor_t UNUSED(minor), u64_t position,
|
||||
static ssize_t hello_read(devminor_t UNUSED(minor), uint64_t position,
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t UNUSED(id))
|
||||
{
|
||||
u64_t dev_size;
|
||||
uint64_t dev_size;
|
||||
char *ptr;
|
||||
int ret;
|
||||
char *buf = HELLO_MESSAGE;
|
||||
@@ -57,7 +57,7 @@ static ssize_t hello_read(devminor_t UNUSED(minor), u64_t position,
|
||||
printf("hello_read()\n");
|
||||
|
||||
/* This is the total size of our device. */
|
||||
dev_size = (u64_t) strlen(buf);
|
||||
dev_size = (uint64_t) strlen(buf);
|
||||
|
||||
/* Check for EOF, and possibly limit the read size. */
|
||||
if (position >= dev_size) return 0; /* EOF */
|
||||
|
||||
@@ -369,8 +369,8 @@ static void dev_init_rx_desc(NDR_desc *desc_start, int index, size_t buf_size,
|
||||
phys_bytes buf_dma, int max_desc_num, phys_bytes desc_dma_start) {
|
||||
NDR_desc *desc = desc_start + index;
|
||||
desc->status = 0;
|
||||
desc->frag_info = (u64_t)(buf_dma);
|
||||
desc->frag_info |= ((u64_t)buf_size << 48) & RFI_FRAG_LEN;
|
||||
desc->frag_info = (uint64_t)(buf_dma);
|
||||
desc->frag_info |= ((uint64_t)buf_size << 48) & RFI_FRAG_LEN;
|
||||
if (index == max_desc_num - 1)
|
||||
desc->next = desc_dma_start;
|
||||
else
|
||||
@@ -382,7 +382,7 @@ static void dev_init_tx_desc(NDR_desc *desc_start, int index, size_t buf_size,
|
||||
phys_bytes buf_dma, int max_desc_num, phys_bytes desc_dma_start) {
|
||||
NDR_desc *desc = desc_start + index;
|
||||
desc->status = TFS_TFD_DONE;
|
||||
desc->frag_info = (u64_t)(buf_dma);
|
||||
desc->frag_info = (uint64_t)(buf_dma);
|
||||
if (index == max_desc_num - 1)
|
||||
desc->next = desc_dma_start;
|
||||
else
|
||||
@@ -432,11 +432,11 @@ static void dev_set_rx_desc_done(uint32_t *base, NDR_desc *desc, int index) {
|
||||
static void dev_set_tx_desc_prepare(uint32_t *base, NDR_desc *desc, int index,
|
||||
size_t data_size) {
|
||||
desc->status = TFS_TFD_DONE;
|
||||
desc->status |= (u64_t)(TFS_WORD_ALIGN | (TFS_FRAMEID & index)
|
||||
desc->status |= (uint64_t)(TFS_WORD_ALIGN | (TFS_FRAMEID & index)
|
||||
| (TFS_FRAG_COUNT & (1 << 24))) | TFS_TX_DMA_INDICATE;
|
||||
desc->frag_info |= TFI_FRAG_LEN & ((u64_t)((data_size > 60 ? data_size : 60)
|
||||
desc->frag_info |= TFI_FRAG_LEN & ((uint64_t)((data_size > 60 ? data_size : 60)
|
||||
& 0xffff) << 48);
|
||||
desc->status &= (u64_t)(~(TFS_TFD_DONE));
|
||||
desc->status &= (uint64_t)(~(TFS_TFD_DONE));
|
||||
}
|
||||
|
||||
/* Check whether Tx is OK from Tx descriptor (### CHECK_TX_OK_FROM_DESC ###)
|
||||
|
||||
@@ -138,9 +138,9 @@ static uint16_t PhyParam[] = {
|
||||
|
||||
/* ======= Data Descriptor ======= */
|
||||
typedef struct NDR_desc {
|
||||
u64_t next;
|
||||
u64_t status;
|
||||
u64_t frag_info;
|
||||
uint64_t next;
|
||||
uint64_t status;
|
||||
uint64_t frag_info;
|
||||
} NDR_desc;
|
||||
|
||||
/* Driver Data Structure */
|
||||
|
||||
@@ -284,8 +284,8 @@ static int mdio_read(uint16_t port, int regaddr)
|
||||
|
||||
static void rtl8169_update_stat(re_t *rep)
|
||||
{
|
||||
static u64_t last_miss = 0, last_coll = 0;
|
||||
u64_t miss, coll;
|
||||
static uint64_t last_miss = 0, last_coll = 0;
|
||||
uint64_t miss, coll;
|
||||
port_t port;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ static void prepare_output(void);
|
||||
static int do_probe(void);
|
||||
static void do_initialize(void);
|
||||
static int printer_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static ssize_t printer_write(devminor_t minor, u64_t position,
|
||||
static ssize_t printer_write(devminor_t minor, uint64_t position,
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id);
|
||||
static int printer_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id);
|
||||
@@ -157,7 +157,7 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* do_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t printer_write(devminor_t UNUSED(minor), u64_t UNUSED(position),
|
||||
static ssize_t printer_write(devminor_t UNUSED(minor), uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ static int read_cal_coef(void);
|
||||
static int measure(int32_t * temperature, int32_t * pressure);
|
||||
|
||||
/* libchardriver callbacks */
|
||||
static ssize_t bmp085_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t bmp085_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static void bmp085_other(message * m, int ipc_status);
|
||||
|
||||
@@ -418,10 +418,10 @@ measure(int32_t * temperature, int32_t * pressure)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
bmp085_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt,
|
||||
bmp085_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id))
|
||||
{
|
||||
u64_t dev_size;
|
||||
uint64_t dev_size;
|
||||
int r;
|
||||
uint32_t temperature, pressure;
|
||||
|
||||
@@ -437,7 +437,7 @@ bmp085_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt,
|
||||
|
||||
log_trace(&log, "%s", buffer);
|
||||
|
||||
dev_size = (u64_t)strlen(buffer);
|
||||
dev_size = (uint64_t)strlen(buffer);
|
||||
if (position >= dev_size) return 0;
|
||||
if (position + size > dev_size)
|
||||
size = (size_t)(dev_size - position);
|
||||
|
||||
@@ -114,7 +114,7 @@ static uint8_t crc8(uint8_t crc, uint8_t byte);
|
||||
static int checksum(uint8_t * bytes, int nbytes, uint8_t expected_crc);
|
||||
|
||||
/* libchardriver callbacks */
|
||||
static ssize_t sht21_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t sht21_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static void sht21_other(message * m, int ipc_status);
|
||||
|
||||
@@ -322,10 +322,10 @@ checksum(uint8_t * bytes, int nbytes, uint8_t expected_crc)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
sht21_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt,
|
||||
sht21_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id))
|
||||
{
|
||||
u64_t dev_size;
|
||||
uint64_t dev_size;
|
||||
int bytes, r;
|
||||
|
||||
r = measure();
|
||||
@@ -340,7 +340,7 @@ sht21_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt,
|
||||
|
||||
log_trace(&log, "%s", buffer);
|
||||
|
||||
dev_size = (u64_t)strlen(buffer);
|
||||
dev_size = (uint64_t)strlen(buffer);
|
||||
if (position >= dev_size) return 0;
|
||||
if (position + size > dev_size)
|
||||
size = (size_t)(dev_size - position);
|
||||
|
||||
@@ -65,7 +65,7 @@ static int adc_read(int adc, uint8_t * val);
|
||||
static int measure_lux(uint32_t * lux);
|
||||
|
||||
/* libchardriver callbacks */
|
||||
static ssize_t tsl2550_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t tsl2550_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static void tsl2550_other(message * m, int ipc_status);
|
||||
|
||||
@@ -274,10 +274,10 @@ tsl2550_init(void)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
tsl2550_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt,
|
||||
tsl2550_read(devminor_t UNUSED(minor), uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int UNUSED(flags), cdev_id_t UNUSED(id))
|
||||
{
|
||||
u64_t dev_size;
|
||||
uint64_t dev_size;
|
||||
int bytes, r;
|
||||
uint32_t lux;
|
||||
|
||||
@@ -289,7 +289,7 @@ tsl2550_read(devminor_t UNUSED(minor), u64_t position, endpoint_t endpt,
|
||||
memset(buffer, '\0', BUFFER_LEN + 1);
|
||||
snprintf(buffer, BUFFER_LEN, "%-16s: %d\n", "ILLUMINANCE", lux);
|
||||
|
||||
dev_size = (u64_t)strlen(buffer);
|
||||
dev_size = (uint64_t)strlen(buffer);
|
||||
if (position >= dev_size) return 0;
|
||||
if (position + size > dev_size)
|
||||
size = (size_t)(dev_size - position);
|
||||
|
||||
@@ -161,7 +161,7 @@ static struct port_state {
|
||||
phys_bytes pad_phys; /* sector padding buffer physical address */
|
||||
vir_bytes pad_size; /* sector padding buffer size */
|
||||
|
||||
u64_t lba_count; /* number of valid Logical Block Addresses */
|
||||
uint64_t lba_count; /* number of valid Logical Block Addresses */
|
||||
uint32_t sector_size; /* medium sector size in bytes */
|
||||
|
||||
int open_count; /* number of times this port is opened */
|
||||
@@ -238,7 +238,7 @@ static void port_disconnect(struct port_state *ps);
|
||||
static char *ahci_portname(struct port_state *ps);
|
||||
static int ahci_open(devminor_t minor, int access);
|
||||
static int ahci_close(devminor_t minor);
|
||||
static ssize_t ahci_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t ahci_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iovec, unsigned int count, int flags);
|
||||
static struct device *ahci_part(devminor_t minor);
|
||||
static void ahci_alarm(clock_t stamp);
|
||||
@@ -376,7 +376,7 @@ static int atapi_read_capacity(struct port_state *ps, int cmd)
|
||||
|
||||
/* Store the number of LBA blocks and sector size. */
|
||||
buf = ps->tmp_base;
|
||||
ps->lba_count = (u64_t) ((buf[0] << 24) | (buf[1] << 16) |
|
||||
ps->lba_count = (uint64_t) ((buf[0] << 24) | (buf[1] << 16) |
|
||||
(buf[2] << 8) | buf[3]) + 1;
|
||||
ps->sector_size =
|
||||
(buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
|
||||
@@ -489,7 +489,7 @@ static int atapi_id_check(struct port_state *ps, uint16_t *buf)
|
||||
/*===========================================================================*
|
||||
* atapi_transfer *
|
||||
*===========================================================================*/
|
||||
static int atapi_transfer(struct port_state *ps, int cmd, u64_t start_lba,
|
||||
static int atapi_transfer(struct port_state *ps, int cmd, uint64_t start_lba,
|
||||
unsigned int count, int write, prd_t *prdt, int nr_prds)
|
||||
{
|
||||
/* Perform data transfer from or to an ATAPI device.
|
||||
@@ -554,10 +554,10 @@ static int ata_id_check(struct port_state *ps, uint16_t *buf)
|
||||
}
|
||||
|
||||
/* Get number of LBA blocks, and sector size. */
|
||||
ps->lba_count = ((u64_t) buf[ATA_ID_LBA3] << 48) |
|
||||
((u64_t) buf[ATA_ID_LBA2] << 32) |
|
||||
((u64_t) buf[ATA_ID_LBA1] << 16) |
|
||||
(u64_t) buf[ATA_ID_LBA0];
|
||||
ps->lba_count = ((uint64_t) buf[ATA_ID_LBA3] << 48) |
|
||||
((uint64_t) buf[ATA_ID_LBA2] << 32) |
|
||||
((uint64_t) buf[ATA_ID_LBA1] << 16) |
|
||||
(uint64_t) buf[ATA_ID_LBA0];
|
||||
|
||||
/* Determine the queue depth of the device. */
|
||||
if (hba_state.has_ncq &&
|
||||
@@ -603,7 +603,7 @@ static int ata_id_check(struct port_state *ps, uint16_t *buf)
|
||||
/*===========================================================================*
|
||||
* ata_transfer *
|
||||
*===========================================================================*/
|
||||
static int ata_transfer(struct port_state *ps, int cmd, u64_t start_lba,
|
||||
static int ata_transfer(struct port_state *ps, int cmd, uint64_t start_lba,
|
||||
unsigned int count, int write, int force, prd_t *prdt, int nr_prds)
|
||||
{
|
||||
/* Perform data transfer from or to an ATA device.
|
||||
@@ -1136,7 +1136,7 @@ static int setup_prdt(struct port_state *ps, endpoint_t endpt,
|
||||
/*===========================================================================*
|
||||
* port_transfer *
|
||||
*===========================================================================*/
|
||||
static ssize_t port_transfer(struct port_state *ps, u64_t pos, u64_t eof,
|
||||
static ssize_t port_transfer(struct port_state *ps, uint64_t pos, uint64_t eof,
|
||||
endpoint_t endpt, iovec_s_t *iovec, int nr_req, int write, int flags)
|
||||
{
|
||||
/* Perform an I/O transfer on a port.
|
||||
@@ -1144,7 +1144,7 @@ static ssize_t port_transfer(struct port_state *ps, u64_t pos, u64_t eof,
|
||||
prd_t prdt[NR_PRDS];
|
||||
vir_bytes size, lead;
|
||||
unsigned int count, nr_prds;
|
||||
u64_t start_lba;
|
||||
uint64_t start_lba;
|
||||
int r, cmd;
|
||||
|
||||
/* Get the total request size from the I/O vector. */
|
||||
@@ -2592,14 +2592,14 @@ static int ahci_close(devminor_t minor)
|
||||
/*===========================================================================*
|
||||
* ahci_transfer *
|
||||
*===========================================================================*/
|
||||
static ssize_t ahci_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t ahci_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iovec, unsigned int count, int flags)
|
||||
{
|
||||
/* Perform data transfer on the selected device.
|
||||
*/
|
||||
struct port_state *ps;
|
||||
struct device *dv;
|
||||
u64_t pos, eof;
|
||||
uint64_t pos, eof;
|
||||
|
||||
ps = ahci_get_port(minor);
|
||||
dv = ahci_part(minor);
|
||||
|
||||
@@ -118,7 +118,7 @@ static int w_identify(void);
|
||||
static char *w_name(void);
|
||||
static int w_specify(void);
|
||||
static int w_io_test(void);
|
||||
static ssize_t w_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t w_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t proc_nr, iovec_t *iov, unsigned int nr_req, int flags);
|
||||
static int com_out(struct command *cmd);
|
||||
static int com_out_ext(struct command *cmd);
|
||||
@@ -141,7 +141,7 @@ static int atapi_sendpacket(uint8_t *packet, unsigned cnt, int do_dma);
|
||||
static int atapi_intr_wait(int dma, size_t max);
|
||||
static int atapi_open(void);
|
||||
static void atapi_close(void);
|
||||
static int atapi_transfer(int do_write, u64_t position, endpoint_t
|
||||
static int atapi_transfer(int do_write, uint64_t position, endpoint_t
|
||||
endpt, iovec_t *iov, unsigned int nr_req);
|
||||
|
||||
/* Entry points to this driver. */
|
||||
@@ -742,7 +742,7 @@ static int w_identify(void)
|
||||
w_testing = 0;
|
||||
|
||||
/* Size of the whole drive */
|
||||
wn->part[0].dv_size = (u64_t)size * SECTOR_SIZE;
|
||||
wn->part[0].dv_size = (uint64_t)size * SECTOR_SIZE;
|
||||
|
||||
/* Reset/calibrate (where necessary) */
|
||||
if (w_specify() != OK && w_specify() != OK) {
|
||||
@@ -996,7 +996,7 @@ static int error_dma(const struct wini *wn)
|
||||
static ssize_t w_transfer(
|
||||
devminor_t minor, /* minor device to perform the transfer on */
|
||||
int do_write, /* read or write? */
|
||||
u64_t position, /* offset on device to read or write */
|
||||
uint64_t position, /* offset on device to read or write */
|
||||
endpoint_t proc_nr, /* process doing the request */
|
||||
iovec_t *iov, /* pointer to read or write request vector */
|
||||
unsigned int nr_req, /* length of request vector */
|
||||
@@ -1008,7 +1008,7 @@ static ssize_t w_transfer(
|
||||
int r, s, errors, do_dma;
|
||||
unsigned long block;
|
||||
uint32_t w_status;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_size;
|
||||
unsigned int n, nbytes;
|
||||
unsigned dma_buf_offset;
|
||||
ssize_t total = 0;
|
||||
@@ -1729,8 +1729,9 @@ static int atapi_open(void)
|
||||
/* Should load and lock the device and obtain its size. For now just set the
|
||||
* size of the device to something big. What is really needed is a generic
|
||||
* SCSI layer that does all this stuff for ATAPI and SCSI devices (kjb). (XXX)
|
||||
* .."something big" is now the maximum size of the largest type of DVD.
|
||||
*/
|
||||
w_wn->part[0].dv_size = (u64_t)(800L*1024) * 1024;
|
||||
w_wn->part[0].dv_size = (uint64_t)(8500L*1024) * 1024;
|
||||
return(OK);
|
||||
}
|
||||
|
||||
@@ -1777,7 +1778,7 @@ static void sense_request(void)
|
||||
*===========================================================================*/
|
||||
static int atapi_transfer(
|
||||
int do_write, /* read or write? */
|
||||
u64_t position, /* offset on device to read or write */
|
||||
uint64_t position, /* offset on device to read or write */
|
||||
endpoint_t proc_nr, /* process doing the request */
|
||||
iovec_t *iov, /* pointer to read or write request vector */
|
||||
unsigned int nr_req /* length of request vector */
|
||||
@@ -1786,9 +1787,9 @@ static int atapi_transfer(
|
||||
struct wini *wn = w_wn;
|
||||
iovec_t *iop, *iov_end = iov + nr_req;
|
||||
int r, s, errors, fresh;
|
||||
u64_t pos;
|
||||
uint64_t pos;
|
||||
unsigned long block;
|
||||
u64_t dv_size = w_dv->dv_size;
|
||||
uint64_t dv_size = w_dv->dv_size;
|
||||
unsigned nbytes, nblocks, before, chunk;
|
||||
static uint8_t packet[ATAPI_PACKETSIZE];
|
||||
size_t addr_offset = 0;
|
||||
|
||||
@@ -35,14 +35,14 @@ static uint32_t get_rand(uint32_t max)
|
||||
/*===========================================================================*
|
||||
* get_range *
|
||||
*===========================================================================*/
|
||||
static size_t get_range(struct fbd_rule *rule, u64_t pos, size_t *size,
|
||||
u64_t *skip)
|
||||
static size_t get_range(struct fbd_rule *rule, uint64_t pos, size_t *size,
|
||||
uint64_t *skip)
|
||||
{
|
||||
/* Compute the range within the given request range that is affected
|
||||
* by the given rule, and optionally the number of bytes preceding
|
||||
* the range that are also affected by the rule.
|
||||
*/
|
||||
u64_t delta;
|
||||
uint64_t delta;
|
||||
size_t off;
|
||||
int to_eof;
|
||||
|
||||
@@ -54,7 +54,7 @@ static size_t get_range(struct fbd_rule *rule, u64_t pos, size_t *size,
|
||||
off = 0;
|
||||
}
|
||||
else {
|
||||
if (skip != NULL) *skip = ((u64_t)(0));
|
||||
if (skip != NULL) *skip = ((uint64_t)(0));
|
||||
|
||||
delta = rule->start - pos;
|
||||
|
||||
@@ -105,9 +105,9 @@ static void limit_range(iovec_t *iov, unsigned *count, size_t size)
|
||||
* action_io_corrupt *
|
||||
*===========================================================================*/
|
||||
static void action_io_corrupt(struct fbd_rule *rule, char *buf, size_t size,
|
||||
u64_t pos, int UNUSED(flag))
|
||||
uint64_t pos, int UNUSED(flag))
|
||||
{
|
||||
u64_t skip;
|
||||
uint64_t skip;
|
||||
uint32_t val;
|
||||
|
||||
buf += get_range(rule, pos, &size, &skip);
|
||||
@@ -152,7 +152,7 @@ static void action_io_corrupt(struct fbd_rule *rule, char *buf, size_t size,
|
||||
* action_pre_error *
|
||||
*===========================================================================*/
|
||||
static void action_pre_error(struct fbd_rule *rule, iovec_t *iov,
|
||||
unsigned *count, size_t *size, u64_t *pos)
|
||||
unsigned *count, size_t *size, uint64_t *pos)
|
||||
{
|
||||
/* Limit the request to the part that precedes the matched range. */
|
||||
*size = get_range(rule, *pos, size, NULL);
|
||||
@@ -175,7 +175,7 @@ static void action_post_error(struct fbd_rule *rule, size_t UNUSED(osize),
|
||||
* action_pre_misdir *
|
||||
*===========================================================================*/
|
||||
static void action_pre_misdir(struct fbd_rule *rule, iovec_t *UNUSED(iov),
|
||||
unsigned *UNUSED(count), size_t *UNUSED(size), u64_t *pos)
|
||||
unsigned *UNUSED(count), size_t *UNUSED(size), uint64_t *pos)
|
||||
{
|
||||
/* Randomize the request position to fall within the range (and have
|
||||
* the alignment) given by the rule.
|
||||
@@ -195,14 +195,14 @@ static void action_pre_misdir(struct fbd_rule *rule, iovec_t *UNUSED(iov),
|
||||
choice = 0;
|
||||
|
||||
*pos = rule->params.misdir.start +
|
||||
((u64_t)choice * rule->params.misdir.align);
|
||||
((uint64_t)choice * rule->params.misdir.align);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* action_pre_losttorn *
|
||||
*===========================================================================*/
|
||||
static void action_pre_losttorn(struct fbd_rule *rule, iovec_t *iov,
|
||||
unsigned *count, size_t *size, u64_t *UNUSED(pos))
|
||||
unsigned *count, size_t *size, uint64_t *UNUSED(pos))
|
||||
{
|
||||
if (*size > rule->params.losttorn.lead)
|
||||
*size = rule->params.losttorn.lead;
|
||||
@@ -245,7 +245,7 @@ int action_mask(struct fbd_rule *rule)
|
||||
* action_pre_hook *
|
||||
*===========================================================================*/
|
||||
void action_pre_hook(struct fbd_rule *rule, iovec_t *iov,
|
||||
unsigned *count, size_t *size, u64_t *pos)
|
||||
unsigned *count, size_t *size, uint64_t *pos)
|
||||
{
|
||||
switch (rule->action) {
|
||||
case FBD_ACTION_ERROR:
|
||||
@@ -269,7 +269,7 @@ void action_pre_hook(struct fbd_rule *rule, iovec_t *iov,
|
||||
* action_io_hook *
|
||||
*===========================================================================*/
|
||||
void action_io_hook(struct fbd_rule *rule, char *buf, size_t size,
|
||||
u64_t pos, int flag)
|
||||
uint64_t pos, int flag)
|
||||
{
|
||||
switch (rule->action) {
|
||||
case FBD_ACTION_CORRUPT:
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
extern int action_mask(struct fbd_rule *rule);
|
||||
|
||||
extern void action_pre_hook(struct fbd_rule *rule, iovec_t *iov,
|
||||
unsigned *count, size_t *size, u64_t *pos);
|
||||
unsigned *count, size_t *size, uint64_t *pos);
|
||||
extern void action_io_hook(struct fbd_rule *rule, char *buf, size_t size,
|
||||
u64_t pos, int flag);
|
||||
uint64_t pos, int flag);
|
||||
extern void action_post_hook(struct fbd_rule *rule, size_t osize, int *result);
|
||||
|
||||
#endif /* _FBD_ACTION_H */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/* Function declarations. */
|
||||
static int fbd_open(devminor_t minor, int access);
|
||||
static int fbd_close(devminor_t minor);
|
||||
static int fbd_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
static int fbd_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags);
|
||||
static int fbd_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant, endpoint_t user_endpt);
|
||||
@@ -227,7 +227,7 @@ static int fbd_ioctl(devminor_t UNUSED(minor), unsigned long request,
|
||||
/*===========================================================================*
|
||||
* fbd_transfer_direct *
|
||||
*===========================================================================*/
|
||||
static ssize_t fbd_transfer_direct(int do_write, u64_t position,
|
||||
static ssize_t fbd_transfer_direct(int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int count, int flags)
|
||||
{
|
||||
/* Forward the entire transfer request, without any intervention. */
|
||||
@@ -272,7 +272,7 @@ static ssize_t fbd_transfer_direct(int do_write, u64_t position,
|
||||
/*===========================================================================*
|
||||
* fbd_transfer_copy *
|
||||
*===========================================================================*/
|
||||
static ssize_t fbd_transfer_copy(int do_write, u64_t position,
|
||||
static ssize_t fbd_transfer_copy(int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int count, size_t size,
|
||||
int flags)
|
||||
{
|
||||
@@ -393,7 +393,7 @@ static ssize_t fbd_transfer_copy(int do_write, u64_t position,
|
||||
/*===========================================================================*
|
||||
* fbd_transfer *
|
||||
*===========================================================================*/
|
||||
static int fbd_transfer(devminor_t UNUSED(minor), int do_write, u64_t position,
|
||||
static int fbd_transfer(devminor_t UNUSED(minor), int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags)
|
||||
{
|
||||
/* Transfer data from or to the device. */
|
||||
|
||||
@@ -85,7 +85,7 @@ int rule_ctl(unsigned long request, endpoint_t endpt, cp_grant_id_t grant)
|
||||
/*===========================================================================*
|
||||
* rule_match *
|
||||
*===========================================================================*/
|
||||
static int rule_match(struct fbd_rule *rule, u64_t pos, size_t size, int flag)
|
||||
static int rule_match(struct fbd_rule *rule, uint64_t pos, size_t size, int flag)
|
||||
{
|
||||
/* Check whether the given rule matches the given parameters. As side
|
||||
* effect, update counters in the rule as appropriate.
|
||||
@@ -112,7 +112,7 @@ static int rule_match(struct fbd_rule *rule, u64_t pos, size_t size, int flag)
|
||||
/*===========================================================================*
|
||||
* rule_find *
|
||||
*===========================================================================*/
|
||||
int rule_find(u64_t pos, size_t size, int flag)
|
||||
int rule_find(uint64_t pos, size_t size, int flag)
|
||||
{
|
||||
/* Find all matching rules, and return a hook mask. */
|
||||
struct fbd_rule *rule;
|
||||
@@ -150,7 +150,7 @@ int rule_find(u64_t pos, size_t size, int flag)
|
||||
* rule_pre_hook *
|
||||
*===========================================================================*/
|
||||
void rule_pre_hook(iovec_t *iov, unsigned *count, size_t *size,
|
||||
u64_t *pos)
|
||||
uint64_t *pos)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -162,7 +162,7 @@ void rule_pre_hook(iovec_t *iov, unsigned *count, size_t *size,
|
||||
/*===========================================================================*
|
||||
* rule_io_hook *
|
||||
*===========================================================================*/
|
||||
void rule_io_hook(char *buf, size_t size, u64_t pos, int flag)
|
||||
void rule_io_hook(char *buf, size_t size, uint64_t pos, int flag)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
extern int rule_ctl(unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant);
|
||||
|
||||
extern int rule_find(u64_t pos, size_t size, int flag);
|
||||
extern int rule_find(uint64_t pos, size_t size, int flag);
|
||||
|
||||
extern void rule_pre_hook(iovec_t *iov, unsigned *count, size_t *size,
|
||||
u64_t *pos);
|
||||
extern void rule_io_hook(char *buf, size_t size, u64_t pos, int flag);
|
||||
uint64_t *pos);
|
||||
extern void rule_io_hook(char *buf, size_t size, uint64_t pos, int flag);
|
||||
extern void rule_post_hook(size_t osize, int *result);
|
||||
|
||||
#define PRE_HOOK 0x1
|
||||
|
||||
@@ -9,7 +9,7 @@ static struct driverinfo driver[2];
|
||||
static asynmsg_t amsgtable[2];
|
||||
|
||||
static int size_known = 0;
|
||||
static u64_t disk_size;
|
||||
static uint64_t disk_size;
|
||||
|
||||
static int problem_stats[BD_LAST] = { 0 };
|
||||
|
||||
@@ -81,7 +81,7 @@ static int driver_open(int which)
|
||||
disk_size = part.size;
|
||||
size_known = 1;
|
||||
sectors = (unsigned long)(disk_size / SECTOR_SIZE);
|
||||
if ((u64_t)sectors * SECTOR_SIZE != disk_size) {
|
||||
if ((uint64_t)sectors * SECTOR_SIZE != disk_size) {
|
||||
printf("Filter: partition too large\n");
|
||||
|
||||
return RET_REDO;
|
||||
@@ -216,7 +216,7 @@ void driver_shutdown(void)
|
||||
/*===========================================================================*
|
||||
* get_raw_size *
|
||||
*===========================================================================*/
|
||||
u64_t get_raw_size(void)
|
||||
uint64_t get_raw_size(void)
|
||||
{
|
||||
/* Return the size of the raw disks as used by the filter driver.
|
||||
*/
|
||||
@@ -903,7 +903,7 @@ static void paired_revoke(const cp_grant_id_t *gids,
|
||||
/*===========================================================================*
|
||||
* read_write *
|
||||
*===========================================================================*/
|
||||
int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, int request)
|
||||
int read_write(uint64_t pos, char *bufa, char *bufb, size_t *sizep, int request)
|
||||
{
|
||||
iovec_s_t vectors[2][NR_IOREQS];
|
||||
message m1, m2;
|
||||
|
||||
@@ -100,17 +100,17 @@ extern int BACKUP_MINOR;
|
||||
|
||||
/* sum.c */
|
||||
extern void sum_init(void);
|
||||
extern int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw);
|
||||
extern u64_t convert(u64_t size);
|
||||
extern int transfer(uint64_t pos, char *buffer, size_t *sizep, int flag_rw);
|
||||
extern uint64_t convert(uint64_t size);
|
||||
|
||||
/* driver.c */
|
||||
extern void driver_init(void);
|
||||
extern void driver_shutdown(void);
|
||||
extern u64_t get_raw_size(void);
|
||||
extern uint64_t get_raw_size(void);
|
||||
extern void reset_kills(void);
|
||||
extern int check_driver(int which);
|
||||
extern int bad_driver(int which, int type, int error);
|
||||
extern int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep,
|
||||
extern int read_write(uint64_t pos, char *bufa, char *bufb, size_t *sizep,
|
||||
int flag_rw);
|
||||
extern void ds_event(void);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ static void sef_cb_signal_handler(int signo);
|
||||
|
||||
static int filter_open(devminor_t minor, int access);
|
||||
static int filter_close(devminor_t minor);
|
||||
static ssize_t filter_transfer(devminor_t minor, int do_write, u64_t pos,
|
||||
static ssize_t filter_transfer(devminor_t minor, int do_write, uint64_t pos,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int count, int flags);
|
||||
static int filter_ioctl(devminor_t minor, unsigned long request,
|
||||
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
|
||||
@@ -146,7 +146,7 @@ static int vcarry(endpoint_t endpt, unsigned int grants, iovec_t *iov,
|
||||
* filter_transfer *
|
||||
*===========================================================================*/
|
||||
static ssize_t filter_transfer(devminor_t UNUSED(minor), int do_write,
|
||||
u64_t pos, endpoint_t endpt, iovec_t *iov, unsigned int count,
|
||||
uint64_t pos, endpoint_t endpt, iovec_t *iov, unsigned int count,
|
||||
int UNUSED(flags))
|
||||
{
|
||||
size_t size, size_ret;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define LOG2PHYS(nr) ((nr)/NR_SUM_SEC*(NR_SUM_SEC+1) + (nr)%NR_SUM_SEC)
|
||||
|
||||
#define POS2SEC(nr) (unsigned long)((nr) / SECTOR_SIZE)
|
||||
#define SEC2POS(nr) ((u64_t)(nr) * SECTOR_SIZE)
|
||||
#define SEC2POS(nr) ((uint64_t)(nr) * SECTOR_SIZE)
|
||||
|
||||
/* Data buffers. */
|
||||
static char *ext_array, *ext_buffer; /* interspersed buffer */
|
||||
@@ -312,7 +312,7 @@ static int check_sum(sector_t current_sector, size_t bytes_left)
|
||||
/*===========================================================================*
|
||||
* check_write *
|
||||
*===========================================================================*/
|
||||
static int check_write(u64_t pos, size_t size)
|
||||
static int check_write(uint64_t pos, size_t size)
|
||||
{
|
||||
/* Read back the data just written, from both disks if mirroring is
|
||||
* enabled, and check the result against the original. Return OK on
|
||||
@@ -486,7 +486,7 @@ static void collapse_size(sector_t first_sector, size_t *sizep)
|
||||
/*===========================================================================*
|
||||
* transfer *
|
||||
*===========================================================================*/
|
||||
int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw)
|
||||
int transfer(uint64_t pos, char *buffer, size_t *sizep, int flag_rw)
|
||||
{
|
||||
/* Transfer data in interspersed-checksum format. When writing, first
|
||||
* compute checksums, and read back the written data afterwards. When
|
||||
@@ -494,7 +494,7 @@ int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw)
|
||||
*/
|
||||
sector_t first_sector, nr_sectors;
|
||||
size_t ext_size, req_size, res_size;
|
||||
u64_t phys_pos;
|
||||
uint64_t phys_pos;
|
||||
int r;
|
||||
|
||||
/* If we don't use checksums or even checksum layout, simply pass on
|
||||
@@ -604,7 +604,7 @@ int transfer(u64_t pos, char *buffer, size_t *sizep, int flag_rw)
|
||||
/*===========================================================================*
|
||||
* convert *
|
||||
*===========================================================================*/
|
||||
u64_t convert(u64_t size)
|
||||
uint64_t convert(uint64_t size)
|
||||
{
|
||||
/* Given a raw disk size, subtract the amount of disk space used for
|
||||
* checksums, resulting in the user-visible disk size.
|
||||
|
||||
@@ -245,7 +245,7 @@ static void f_timeout(int arg);
|
||||
static struct device *f_prepare(devminor_t device);
|
||||
static struct device *f_part(devminor_t minor);
|
||||
static void f_cleanup(void);
|
||||
static ssize_t f_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t f_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t proc_nr, iovec_t *iov, unsigned int nr_req, int flags);
|
||||
static int dma_setup(int do_write);
|
||||
static void start_motor(void);
|
||||
@@ -405,7 +405,7 @@ static struct device *f_prepare(devminor_t device)
|
||||
if (f_fp->fl_density < NT) {
|
||||
f_dp = &fdensity[f_fp->fl_density];
|
||||
f_sectors = f_dp->secpt;
|
||||
f_fp->fl_geom.dv_size = (u64_t)(NR_HEADS * f_sectors * f_dp->cyls) *
|
||||
f_fp->fl_geom.dv_size = (uint64_t)(NR_HEADS * f_sectors * f_dp->cyls) *
|
||||
SECTOR_SIZE;
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ static void f_cleanup(void)
|
||||
static ssize_t f_transfer(
|
||||
devminor_t minor, /* minor device number */
|
||||
int do_write, /* read or write? */
|
||||
u64_t pos64, /* offset on device to read or write */
|
||||
uint64_t pos64, /* offset on device to read or write */
|
||||
endpoint_t proc_nr, /* process doing the request */
|
||||
iovec_t *iov, /* pointer to read or write request vector */
|
||||
unsigned int nr_req, /* length of request vector */
|
||||
@@ -456,7 +456,7 @@ static ssize_t f_transfer(
|
||||
iovec_t *iop, *iov_end = iov + nr_req;
|
||||
int s, r, errors, nr;
|
||||
unsigned block, nbytes, count, chunk, sector;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_size;
|
||||
vir_bytes user_offset, iov_offset = 0, iop_offset;
|
||||
unsigned long position;
|
||||
signed long uoffsets[MAX_SECTORS], *up;
|
||||
|
||||
@@ -45,15 +45,15 @@ static vir_bytes m_vaddrs[NR_DEVS];
|
||||
|
||||
static int openct[NR_DEVS];
|
||||
|
||||
static ssize_t m_char_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t m_char_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t m_char_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t m_char_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static int m_char_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static int m_char_close(devminor_t minor);
|
||||
|
||||
static struct device *m_block_part(devminor_t minor);
|
||||
static ssize_t m_block_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t m_block_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags);
|
||||
static int m_block_open(devminor_t minor, int access);
|
||||
static int m_block_close(devminor_t minor);
|
||||
@@ -186,11 +186,11 @@ static int m_is_block(devminor_t minor)
|
||||
/*===========================================================================*
|
||||
* m_transfer_kmem *
|
||||
*===========================================================================*/
|
||||
static ssize_t m_transfer_kmem(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t m_transfer_kmem(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size)
|
||||
{
|
||||
/* Transfer from or to the KMEM device. */
|
||||
u64_t dv_size, dev_vaddr;
|
||||
uint64_t dv_size, dev_vaddr;
|
||||
int r;
|
||||
|
||||
dv_size = m_geom[minor].dv_size;
|
||||
@@ -215,7 +215,7 @@ static ssize_t m_transfer_kmem(devminor_t minor, int do_write, u64_t position,
|
||||
/*===========================================================================*
|
||||
* m_transfer_mem *
|
||||
*===========================================================================*/
|
||||
static ssize_t m_transfer_mem(devminor_t minor, int do_write, u64_t position,
|
||||
static ssize_t m_transfer_mem(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size)
|
||||
{
|
||||
/* Transfer from or to the MEM device. */
|
||||
@@ -224,7 +224,7 @@ static ssize_t m_transfer_mem(devminor_t minor, int do_write, u64_t position,
|
||||
static char *vaddr;
|
||||
phys_bytes mem_phys, pagestart;
|
||||
size_t off, page_off, subcount;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_size;
|
||||
int r;
|
||||
|
||||
dv_size = m_geom[minor].dv_size;
|
||||
@@ -284,7 +284,7 @@ static ssize_t m_transfer_mem(devminor_t minor, int do_write, u64_t position,
|
||||
/*===========================================================================*
|
||||
* m_char_read *
|
||||
*===========================================================================*/
|
||||
static ssize_t m_char_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t m_char_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t UNUSED(id))
|
||||
{
|
||||
@@ -323,7 +323,7 @@ static ssize_t m_char_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
/*===========================================================================*
|
||||
* m_char_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t m_char_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t m_char_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t UNUSED(id))
|
||||
{
|
||||
@@ -417,7 +417,7 @@ static struct device *m_block_part(devminor_t minor)
|
||||
static int m_block_transfer(
|
||||
devminor_t minor, /* minor device number */
|
||||
int do_write, /* read or write? */
|
||||
u64_t position, /* offset on device to read or write */
|
||||
uint64_t position, /* offset on device to read or write */
|
||||
endpoint_t endpt, /* process doing the request */
|
||||
iovec_t *iov, /* pointer to read or write request vector */
|
||||
unsigned int nr_req, /* length of request vector */
|
||||
@@ -428,7 +428,7 @@ static int m_block_transfer(
|
||||
unsigned count;
|
||||
vir_bytes vir_offset = 0;
|
||||
struct device *dv;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_size;
|
||||
int r;
|
||||
vir_bytes dev_vaddr;
|
||||
cp_grant_id_t grant;
|
||||
@@ -545,7 +545,7 @@ static int m_block_ioctl(devminor_t minor, unsigned long request,
|
||||
return s;
|
||||
if(is_imgrd)
|
||||
ramdev_size = 0;
|
||||
if(m_vaddrs[minor] && dv->dv_size == (u64_t) ramdev_size) {
|
||||
if(m_vaddrs[minor] && dv->dv_size == (uint64_t) ramdev_size) {
|
||||
return(OK);
|
||||
}
|
||||
/* openct is 1 for the ioctl(). */
|
||||
@@ -556,7 +556,7 @@ static int m_block_ioctl(devminor_t minor, unsigned long request,
|
||||
}
|
||||
if(m_vaddrs[minor]) {
|
||||
uint32_t a, o;
|
||||
u64_t size;
|
||||
uint64_t size;
|
||||
int r;
|
||||
if(ex64hi(dv->dv_size)) {
|
||||
panic("huge old ramdisk");
|
||||
|
||||
@@ -46,7 +46,7 @@ static int block_open(devminor_t minor, int access);
|
||||
static int block_close(devminor_t minor);
|
||||
static int block_transfer(devminor_t minor,
|
||||
int do_write,
|
||||
u64_t position,
|
||||
uint64_t position,
|
||||
endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags);
|
||||
|
||||
static int block_ioctl(devminor_t minor, unsigned long request,
|
||||
@@ -280,7 +280,7 @@ static int
|
||||
block_transfer(
|
||||
devminor_t minor, /* minor device number */
|
||||
int do_write, /* read or write? */
|
||||
u64_t position, /* offset on device to read or write */
|
||||
uint64_t position, /* offset on device to read or write */
|
||||
endpoint_t endpt, /* process doing the request */
|
||||
iovec_t * iov, /* pointer to read or write request vector */
|
||||
unsigned int nr_req, /* length of request vector */
|
||||
|
||||
@@ -79,7 +79,7 @@ static phys_bytes status_phys;
|
||||
/* Prototypes */
|
||||
static int virtio_blk_open(devminor_t minor, int access);
|
||||
static int virtio_blk_close(devminor_t minor);
|
||||
static ssize_t virtio_blk_transfer(devminor_t minor, int write, u64_t position,
|
||||
static ssize_t virtio_blk_transfer(devminor_t minor, int write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iovec,
|
||||
unsigned int cnt, int flags);
|
||||
static int virtio_blk_ioctl(devminor_t minor, unsigned long req,
|
||||
@@ -235,7 +235,7 @@ prepare_vir_vec(endpoint_t endpt, struct vumap_vir *vir, iovec_s_t *iv,
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
virtio_blk_transfer(devminor_t minor, int write, u64_t position,
|
||||
virtio_blk_transfer(devminor_t minor, int write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iovec, unsigned int cnt,
|
||||
int flags)
|
||||
{
|
||||
@@ -251,8 +251,8 @@ virtio_blk_transfer(devminor_t minor, int write, u64_t position,
|
||||
vir_bytes size = 0;
|
||||
vir_bytes size_tmp = 0;
|
||||
struct device *dv;
|
||||
u64_t sector;
|
||||
u64_t end_part;
|
||||
uint64_t sector;
|
||||
uint64_t end_part;
|
||||
int r, pcnt = sizeof(phys) / sizeof(phys[0]);
|
||||
|
||||
iovec_s_t *iv = (iovec_s_t *)iovec;
|
||||
@@ -639,7 +639,7 @@ virtio_blk_config(void)
|
||||
/* capacity is always there */
|
||||
sectors_low = virtio_sread32(blk_dev, 0);
|
||||
sectors_high = virtio_sread32(blk_dev, 4);
|
||||
blk_config.capacity = ((u64_t)sectors_high << 32) | sectors_low;
|
||||
blk_config.capacity = ((uint64_t)sectors_high << 32) | sectors_low;
|
||||
|
||||
/* If this gets truncated, you have a big disk... */
|
||||
size_mbs = (uint32_t)(blk_config.capacity * 512 / 1024 / 1024);
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
struct virtio_blk_config {
|
||||
/* The capacity (in 512-byte sectors). */
|
||||
u64_t capacity;
|
||||
uint64_t capacity;
|
||||
/* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
|
||||
uint32_t size_max;
|
||||
/* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
|
||||
@@ -107,7 +107,7 @@ struct virtio_blk_outhdr {
|
||||
/* io priority. */
|
||||
uint32_t ioprio;
|
||||
/* Sector (ie. 512 byte offset) */
|
||||
u64_t sector;
|
||||
uint64_t sector;
|
||||
};
|
||||
|
||||
struct virtio_scsi_inhdr {
|
||||
|
||||
@@ -28,7 +28,7 @@ static unsigned int instance;
|
||||
|
||||
static int vnd_open(devminor_t, int);
|
||||
static int vnd_close(devminor_t);
|
||||
static int vnd_transfer(devminor_t, int, u64_t, endpoint_t, iovec_t *,
|
||||
static int vnd_transfer(devminor_t, int, uint64_t, endpoint_t, iovec_t *,
|
||||
unsigned int, int);
|
||||
static int vnd_ioctl(devminor_t, unsigned long, endpoint_t, cp_grant_id_t,
|
||||
endpoint_t);
|
||||
@@ -209,7 +209,7 @@ vnd_advance(iovec_s_t *iov, size_t *iov_offp, size_t bytes)
|
||||
* Perform data transfer on the selected device.
|
||||
*/
|
||||
static int
|
||||
vnd_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
vnd_transfer(devminor_t minor, int do_write, uint64_t position,
|
||||
endpoint_t endpt, iovec_t *iovt, unsigned int nr_req, int flags)
|
||||
{
|
||||
struct device *dv;
|
||||
@@ -308,9 +308,9 @@ vnd_transfer(devminor_t minor, int do_write, u64_t position,
|
||||
* computed.
|
||||
*/
|
||||
static int
|
||||
vnd_layout(u64_t size, struct vnd_ioctl *vnd)
|
||||
vnd_layout(uint64_t size, struct vnd_ioctl *vnd)
|
||||
{
|
||||
u64_t sectors;
|
||||
uint64_t sectors;
|
||||
|
||||
state.geom.base = 0ULL;
|
||||
|
||||
@@ -323,7 +323,7 @@ vnd_layout(u64_t size, struct vnd_ioctl *vnd)
|
||||
state.geom.heads = vnd->vnd_geom.vng_ntracks;
|
||||
state.geom.sectors = vnd->vnd_geom.vng_nsectors;
|
||||
|
||||
state.geom.size = (u64_t) state.geom.cylinders *
|
||||
state.geom.size = (uint64_t) state.geom.cylinders *
|
||||
state.geom.heads * state.geom.sectors *
|
||||
vnd->vnd_geom.vng_secsize;
|
||||
if (state.geom.size == 0 || state.geom.size > size)
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
struct logdevice logdevices[NR_DEVS];
|
||||
|
||||
static ssize_t log_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t log_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t log_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t log_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static int log_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static int log_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id);
|
||||
@@ -241,7 +241,7 @@ subread(struct logdevice *log, size_t size, endpoint_t endpt,
|
||||
/*===========================================================================*
|
||||
* log_read *
|
||||
*===========================================================================*/
|
||||
static ssize_t log_read(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t log_read(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ static ssize_t log_read(devminor_t minor, u64_t UNUSED(position),
|
||||
/*===========================================================================*
|
||||
* log_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t log_write(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t log_write(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t UNUSED(id))
|
||||
{
|
||||
|
||||
@@ -21,9 +21,9 @@ static dev_t m_device; /* current device */
|
||||
extern int errno; /* error number for PM calls */
|
||||
|
||||
static struct device *r_prepare(dev_t device);
|
||||
static ssize_t r_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t r_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t r_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t r_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static int r_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static void r_random(clock_t stamp);
|
||||
@@ -117,7 +117,7 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* r_read *
|
||||
*===========================================================================*/
|
||||
static ssize_t r_read(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t r_read(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t UNUSED(id))
|
||||
{
|
||||
@@ -146,7 +146,7 @@ static ssize_t r_read(devminor_t minor, u64_t UNUSED(position),
|
||||
/*===========================================================================*
|
||||
* r_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t r_write(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t r_write(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t UNUSED(id))
|
||||
{
|
||||
|
||||
@@ -92,10 +92,10 @@ static void pty_finish(pty_t *pp);
|
||||
static int pty_master_open(devminor_t minor, int access,
|
||||
endpoint_t user_endpt);
|
||||
static int pty_master_close(devminor_t minor);
|
||||
static ssize_t pty_master_read(devminor_t minor, u64_t position,
|
||||
static ssize_t pty_master_read(devminor_t minor, uint64_t position,
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id);
|
||||
static ssize_t pty_master_write(devminor_t minor, u64_t position,
|
||||
static ssize_t pty_master_write(devminor_t minor, uint64_t position,
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id);
|
||||
static int pty_master_ioctl(devminor_t minor, unsigned long request,
|
||||
@@ -244,7 +244,7 @@ static int pty_master_close(devminor_t minor)
|
||||
/*===========================================================================*
|
||||
* pty_master_read *
|
||||
*===========================================================================*/
|
||||
static ssize_t pty_master_read(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t pty_master_read(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
@@ -292,7 +292,7 @@ static ssize_t pty_master_read(devminor_t minor, u64_t UNUSED(position),
|
||||
/*===========================================================================*
|
||||
* pty_master_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t pty_master_write(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t pty_master_write(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
|
||||
@@ -36,9 +36,9 @@ static void tty_icancel(tty_t *tp);
|
||||
|
||||
static int do_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static int do_close(devminor_t minor);
|
||||
static ssize_t do_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t do_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t do_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t do_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static int do_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id);
|
||||
static int do_select(devminor_t minor, unsigned int ops, endpoint_t endpt);
|
||||
@@ -223,7 +223,7 @@ static void tty_startup(void)
|
||||
/*===========================================================================*
|
||||
* do_read *
|
||||
*===========================================================================*/
|
||||
static ssize_t do_read(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t do_read(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
@@ -292,7 +292,7 @@ static ssize_t do_read(devminor_t minor, u64_t UNUSED(position),
|
||||
/*===========================================================================*
|
||||
* do_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t do_write(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t do_write(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
|
||||
@@ -78,9 +78,9 @@ static void reset_color(tty_t *tp);
|
||||
|
||||
static int do_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static int do_close(devminor_t minor);
|
||||
static ssize_t do_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t do_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t do_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t do_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static int do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id);
|
||||
@@ -466,7 +466,7 @@ static void sef_cb_signal_handler(int signo)
|
||||
/*===========================================================================*
|
||||
* do_read *
|
||||
*===========================================================================*/
|
||||
static ssize_t do_read(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t do_read(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
@@ -535,7 +535,7 @@ static ssize_t do_read(devminor_t minor, u64_t UNUSED(position),
|
||||
/*===========================================================================*
|
||||
* do_write *
|
||||
*===========================================================================*/
|
||||
static ssize_t do_write(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t do_write(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int flags,
|
||||
cdev_id_t id)
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ static void mass_storage_task(void *);
|
||||
static int mass_storage_test(void);
|
||||
static int mass_storage_check_error(void);
|
||||
static int mass_storage_try_first_open(void);
|
||||
static int mass_storage_transfer_restrictions(u64_t, unsigned long);
|
||||
static int mass_storage_transfer_restrictions(uint64_t, unsigned long);
|
||||
static ssize_t mass_storage_write(unsigned long, endpoint_t, iovec_t *,
|
||||
unsigned int, unsigned long);
|
||||
static ssize_t mass_storage_read(unsigned long, endpoint_t, iovec_t *,
|
||||
@@ -75,7 +75,7 @@ static ssize_t mass_storage_read(unsigned long, endpoint_t, iovec_t *,
|
||||
/* Minix's libblockdriver callbacks */
|
||||
static int mass_storage_open(devminor_t, int);
|
||||
static int mass_storage_close(devminor_t);
|
||||
static ssize_t mass_storage_transfer(devminor_t, int, u64_t, endpoint_t,
|
||||
static ssize_t mass_storage_transfer(devminor_t, int, uint64_t, endpoint_t,
|
||||
iovec_t *, unsigned int, int);
|
||||
static int mass_storage_ioctl(devminor_t, unsigned long, endpoint_t,
|
||||
cp_grant_id_t, endpoint_t);
|
||||
@@ -792,7 +792,7 @@ mass_storage_try_first_open()
|
||||
* mass_storage_transfer_restrictions *
|
||||
*===========================================================================*/
|
||||
static int
|
||||
mass_storage_transfer_restrictions(u64_t pos, unsigned long bytes)
|
||||
mass_storage_transfer_restrictions(uint64_t pos, unsigned long bytes)
|
||||
{
|
||||
MASS_DEBUG_DUMP;
|
||||
|
||||
@@ -1251,13 +1251,13 @@ static int mass_storage_close(devminor_t minor)
|
||||
static ssize_t
|
||||
mass_storage_transfer(devminor_t minor, /* device minor number */
|
||||
int do_write, /* 1 write, 0 read */
|
||||
u64_t pos, /* position of starting point */
|
||||
uint64_t pos, /* position of starting point */
|
||||
endpoint_t endpt, /* endpoint */
|
||||
iovec_t * iov, /* vector */
|
||||
unsigned int iov_count, /* how many vectors */
|
||||
int UNUSED(flags)) /* transfer flags */
|
||||
{
|
||||
u64_t temp_sector_number;
|
||||
uint64_t temp_sector_number;
|
||||
unsigned long bytes;
|
||||
unsigned long sector_number;
|
||||
unsigned int cur_iov_idx;
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
*/
|
||||
static int fb_open(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
static int fb_close(devminor_t minor);
|
||||
static ssize_t fb_read(devminor_t minor, u64_t pos, endpoint_t ep,
|
||||
static ssize_t fb_read(devminor_t minor, uint64_t pos, endpoint_t ep,
|
||||
cp_grant_id_t gid, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t fb_write(devminor_t minor, u64_t pos, endpoint_t ep,
|
||||
static ssize_t fb_write(devminor_t minor, uint64_t pos, endpoint_t ep,
|
||||
cp_grant_id_t gid, size_t size, int flags, cdev_id_t id);
|
||||
static int fb_ioctl(devminor_t minor, unsigned long request, endpoint_t ep,
|
||||
cp_grant_id_t gid, int flags, endpoint_t user_ep, cdev_id_t id);
|
||||
@@ -52,7 +52,7 @@ static struct chardriver fb_tab =
|
||||
|
||||
/** Represents the /dev/fb device. */
|
||||
static int has_restarted = 0;
|
||||
static u64_t has_restarted_t1, has_restarted_t2;
|
||||
static uint64_t has_restarted_t1, has_restarted_t2;
|
||||
|
||||
static int open_counter[FB_DEV_NR]; /* Open count */
|
||||
|
||||
@@ -97,7 +97,7 @@ fb_close(devminor_t minor)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
fb_read(devminor_t minor, u64_t pos, endpoint_t ep, cp_grant_id_t gid,
|
||||
fb_read(devminor_t minor, uint64_t pos, endpoint_t ep, cp_grant_id_t gid,
|
||||
size_t size, int UNUSED(flags), cdev_id_t UNUSED(id))
|
||||
{
|
||||
struct device dev;
|
||||
@@ -209,7 +209,7 @@ do_get_fixscreeninfo(int minor, endpoint_t ep, cp_grant_id_t gid)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
fb_write(devminor_t minor, u64_t pos, endpoint_t ep, cp_grant_id_t gid,
|
||||
fb_write(devminor_t minor, uint64_t pos, endpoint_t ep, cp_grant_id_t gid,
|
||||
size_t size, int UNUSED(flags), cdev_id_t UNUSED(id))
|
||||
{
|
||||
struct device dev;
|
||||
@@ -318,7 +318,7 @@ main(int argc, char *argv[])
|
||||
static int
|
||||
keep_displaying_restarted()
|
||||
{
|
||||
u64_t delta;
|
||||
uint64_t delta;
|
||||
uint32_t micro_delta;
|
||||
|
||||
read_frclock_64(&has_restarted_t2);
|
||||
|
||||
@@ -160,7 +160,7 @@ static int read_edid(uint8_t * data, size_t count);
|
||||
/* libblockdriver callbacks */
|
||||
static int tda19988_blk_open(devminor_t minor, int access);
|
||||
static int tda19988_blk_close(devminor_t minor);
|
||||
static ssize_t tda19988_blk_transfer(devminor_t minor, int do_write, u64_t pos,
|
||||
static ssize_t tda19988_blk_transfer(devminor_t minor, int do_write, uint64_t pos,
|
||||
endpoint_t endpt, iovec_t * iov, unsigned int count, int flags);
|
||||
static int tda19988_blk_ioctl(devminor_t minor, unsigned long request,
|
||||
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
|
||||
@@ -215,12 +215,12 @@ tda19988_blk_close(devminor_t minor)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
tda19988_blk_transfer(devminor_t minor, int do_write, u64_t pos64,
|
||||
tda19988_blk_transfer(devminor_t minor, int do_write, uint64_t pos64,
|
||||
endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags)
|
||||
{
|
||||
unsigned count;
|
||||
struct device *dv;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_size;
|
||||
int r;
|
||||
cp_grant_id_t grant;
|
||||
|
||||
@@ -860,8 +860,8 @@ sef_cb_init(int type, sef_init_info_t * UNUSED(info))
|
||||
lu_state_restore();
|
||||
}
|
||||
|
||||
geom[TDA19988_DEV].dv_base = ((u64_t) (0));
|
||||
geom[TDA19988_DEV].dv_size = ((u64_t) (128));
|
||||
geom[TDA19988_DEV].dv_base = ((uint64_t) (0));
|
||||
geom[TDA19988_DEV].dv_size = ((uint64_t) (128));
|
||||
|
||||
/*
|
||||
* CEC Module
|
||||
|
||||
@@ -526,7 +526,7 @@ static int store_pages(int conn, int req, vbox_param_t *inp, size_t *offp)
|
||||
assert(!(pvec[j].vp_addr & (PAGE_SIZE - 1)));
|
||||
|
||||
pagelist->addr[pagelist->count++] =
|
||||
((u64_t)(pvec[j].vp_addr));
|
||||
((uint64_t)(pvec[j].vp_addr));
|
||||
|
||||
if (pvec[j].vp_size > PAGE_SIZE) {
|
||||
pvec[j].vp_addr += PAGE_SIZE;
|
||||
|
||||
@@ -43,7 +43,7 @@ struct VMMDevReportGuestInfo {
|
||||
|
||||
struct VMMDevReqHostTime {
|
||||
struct VMMDevRequestHeader header;
|
||||
u64_t time;
|
||||
uint64_t time;
|
||||
};
|
||||
|
||||
#define VMMDEV_EVENT_HGCM (1 << 1)
|
||||
@@ -84,7 +84,7 @@ struct VMMDevHGCMPageList {
|
||||
uint32_t flags;
|
||||
uint16_t offset;
|
||||
uint16_t count;
|
||||
u64_t addr[1];
|
||||
uint64_t addr[1];
|
||||
};
|
||||
|
||||
#define VMMDEV_HGCM_PARAM_U32 1
|
||||
@@ -95,7 +95,7 @@ struct VMMDevHGCMParam {
|
||||
uint32_t type;
|
||||
union {
|
||||
uint32_t u32;
|
||||
u64_t u64;
|
||||
uint64_t u64;
|
||||
struct {
|
||||
uint32_t size;
|
||||
union {
|
||||
|
||||
@@ -75,7 +75,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t bytes,
|
||||
off_t pos, int call);
|
||||
block_t rd_indir(struct buf *bp, int index);
|
||||
block_t read_map(struct inode *rip, off_t pos, int opportunistic);
|
||||
struct buf *get_block_map(register struct inode *rip, u64_t position);
|
||||
struct buf *get_block_map(register struct inode *rip, uint64_t position);
|
||||
ssize_t fs_getdents(ino_t ino_nr, struct fsdriver_data *data, size_t bytes,
|
||||
off_t *posp);
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
static struct buf *rahead(struct inode *rip, block_t baseblock, u64_t
|
||||
static struct buf *rahead(struct inode *rip, block_t baseblock, uint64_t
|
||||
position, unsigned bytes_ahead);
|
||||
static int rw_chunk(struct inode *rip, u64_t position, unsigned off,
|
||||
static int rw_chunk(struct inode *rip, uint64_t position, unsigned off,
|
||||
size_t chunk, unsigned left, int call, struct fsdriver_data *data,
|
||||
unsigned buf_off, unsigned int block_size, int *completed);
|
||||
|
||||
@@ -69,7 +69,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes,
|
||||
}
|
||||
|
||||
/* Read or write 'chunk' bytes. */
|
||||
r = rw_chunk(rip, ((u64_t)((unsigned long)position)), off, chunk,
|
||||
r = rw_chunk(rip, ((uint64_t)((unsigned long)position)), off, chunk,
|
||||
nrbytes, call, data, cum_io, block_size, &completed);
|
||||
|
||||
if (r != OK) break;
|
||||
@@ -106,7 +106,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes,
|
||||
static int rw_chunk(rip, position, off, chunk, left, call, data, buf_off,
|
||||
block_size, completed)
|
||||
register struct inode *rip; /* pointer to inode for file to be rd/wr */
|
||||
u64_t position; /* position within file to read or write */
|
||||
uint64_t position; /* position within file to read or write */
|
||||
unsigned off; /* off within the current block */
|
||||
size_t chunk; /* number of bytes to read or write */
|
||||
unsigned left; /* max number of bytes wanted after position */
|
||||
@@ -124,7 +124,7 @@ int *completed; /* number of bytes copied */
|
||||
block_t b;
|
||||
dev_t dev;
|
||||
ino_t ino = VMC_NO_INODE;
|
||||
u64_t ino_off = rounddown(position, block_size);
|
||||
uint64_t ino_off = rounddown(position, block_size);
|
||||
|
||||
*completed = 0;
|
||||
|
||||
@@ -278,7 +278,7 @@ int opportunistic;
|
||||
return(b);
|
||||
}
|
||||
|
||||
struct buf *get_block_map(register struct inode *rip, u64_t position)
|
||||
struct buf *get_block_map(register struct inode *rip, uint64_t position)
|
||||
{
|
||||
struct buf *bp;
|
||||
int r, block_size;
|
||||
@@ -315,7 +315,7 @@ int mindex; /* index into *bp */
|
||||
static struct buf *rahead(rip, baseblock, position, bytes_ahead)
|
||||
register struct inode *rip; /* pointer to inode for file to be read */
|
||||
block_t baseblock; /* block at current position */
|
||||
u64_t position; /* position within file */
|
||||
uint64_t position; /* position within file */
|
||||
unsigned bytes_ahead; /* bytes beyond position for immediate use */
|
||||
{
|
||||
/* Fetch a block from the cache or the device. If a physical read is
|
||||
@@ -334,7 +334,7 @@ unsigned bytes_ahead; /* bytes beyond position for immediate use */
|
||||
dev_t dev;
|
||||
struct buf *bp = NULL;
|
||||
static block64_t read_q[LMFS_MAX_PREFETCH];
|
||||
u64_t position_running;
|
||||
uint64_t position_running;
|
||||
|
||||
dev = rip->i_dev;
|
||||
assert(dev != NO_DEV);
|
||||
|
||||
@@ -75,7 +75,7 @@ register struct super_block *sp; /* pointer to a superblock */
|
||||
/* group descriptors, sp->s_group_desc points to this. */
|
||||
static struct group_desc *group_descs;
|
||||
block_t gd_size; /* group descriptors table size in blocks */
|
||||
u64_t gdt_position;
|
||||
uint64_t gdt_position;
|
||||
size_t off, chunk;
|
||||
|
||||
ondisk_superblock = (struct super_block *)mmap(NULL, SUPER_SIZE_D,
|
||||
@@ -224,7 +224,7 @@ struct super_block *sp; /* pointer to a superblock */
|
||||
/* Write a superblock and gdt. */
|
||||
int r;
|
||||
block_t gd_size; /* group descriptors table size in blocks */
|
||||
u64_t gdt_position;
|
||||
uint64_t gdt_position;
|
||||
size_t off, chunk;
|
||||
|
||||
if (sp->s_rd_only)
|
||||
|
||||
@@ -71,7 +71,7 @@ int fs_chown(ino_t ino, uid_t uid, gid_t gid, mode_t *mode);
|
||||
ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t bytes,
|
||||
off_t pos, int call);
|
||||
block_t read_map(struct inode *rip, off_t pos, int opportunistic);
|
||||
struct buf *get_block_map(register struct inode *rip, u64_t position);
|
||||
struct buf *get_block_map(register struct inode *rip, uint64_t position);
|
||||
zone_t rd_indir(struct buf *bp, int index);
|
||||
ssize_t fs_getdents(ino_t ino_nr, struct fsdriver_data *data, size_t bytes,
|
||||
off_t *posp);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
static struct buf *rahead(struct inode *rip, block_t baseblock, u64_t
|
||||
static struct buf *rahead(struct inode *rip, block_t baseblock, uint64_t
|
||||
position, unsigned bytes_ahead);
|
||||
static int rw_chunk(struct inode *rip, u64_t position, unsigned off,
|
||||
static int rw_chunk(struct inode *rip, uint64_t position, unsigned off,
|
||||
size_t chunk, unsigned left, int call, struct fsdriver_data *data,
|
||||
unsigned buf_off, unsigned int block_size, int *completed);
|
||||
|
||||
@@ -75,7 +75,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes,
|
||||
}
|
||||
|
||||
/* Read or write 'chunk' bytes. */
|
||||
r = rw_chunk(rip, ((u64_t)((unsigned long)position)), off, chunk,
|
||||
r = rw_chunk(rip, ((uint64_t)((unsigned long)position)), off, chunk,
|
||||
nrbytes, call, data, cum_io, block_size, &completed);
|
||||
|
||||
if (r != OK) break;
|
||||
@@ -117,7 +117,7 @@ ssize_t fs_readwrite(ino_t ino_nr, struct fsdriver_data *data, size_t nrbytes,
|
||||
static int rw_chunk(rip, position, off, chunk, left, call, data, buf_off,
|
||||
block_size, completed)
|
||||
register struct inode *rip; /* pointer to inode for file to be rd/wr */
|
||||
u64_t position; /* position within file to read or write */
|
||||
uint64_t position; /* position within file to read or write */
|
||||
unsigned off; /* off within the current block */
|
||||
size_t chunk; /* number of bytes to read or write */
|
||||
unsigned left; /* max number of bytes wanted after position */
|
||||
@@ -134,7 +134,7 @@ int *completed; /* number of bytes copied */
|
||||
block_t b;
|
||||
dev_t dev;
|
||||
ino_t ino = VMC_NO_INODE;
|
||||
u64_t ino_off = rounddown(position, block_size);
|
||||
uint64_t ino_off = rounddown(position, block_size);
|
||||
|
||||
*completed = 0;
|
||||
|
||||
@@ -278,7 +278,7 @@ int opportunistic; /* if nonzero, only use cache for metadata */
|
||||
return(b);
|
||||
}
|
||||
|
||||
struct buf *get_block_map(register struct inode *rip, u64_t position)
|
||||
struct buf *get_block_map(register struct inode *rip, uint64_t position)
|
||||
{
|
||||
struct buf *bp;
|
||||
int r, block_size;
|
||||
@@ -330,7 +330,7 @@ int index; /* index into *bp */
|
||||
static struct buf *rahead(rip, baseblock, position, bytes_ahead)
|
||||
register struct inode *rip; /* pointer to inode for file to be read */
|
||||
block_t baseblock; /* block at current position */
|
||||
u64_t position; /* position within file */
|
||||
uint64_t position; /* position within file */
|
||||
unsigned bytes_ahead; /* bytes beyond position for immediate use */
|
||||
{
|
||||
/* Fetch a block from the cache or the device. If a physical read is
|
||||
@@ -349,7 +349,7 @@ unsigned bytes_ahead; /* bytes beyond position for immediate use */
|
||||
dev_t dev;
|
||||
struct buf *bp;
|
||||
static block64_t read_q[LMFS_MAX_PREFETCH];
|
||||
u64_t position_running;
|
||||
uint64_t position_running;
|
||||
|
||||
dev = rip->i_dev;
|
||||
assert(dev != NO_DEV);
|
||||
|
||||
@@ -338,8 +338,8 @@ typedef struct multiboot_mod_list multiboot_module_t;
|
||||
struct multiboot_mmap_entry
|
||||
{
|
||||
uint32_t size;
|
||||
u64_t mm_base_addr;
|
||||
u64_t mm_length;
|
||||
uint64_t mm_base_addr;
|
||||
uint64_t mm_length;
|
||||
#define MULTIBOOT_MEMORY_AVAILABLE 1
|
||||
#define MULTIBOOT_MEMORY_RESERVED 2
|
||||
uint32_t type;
|
||||
|
||||
@@ -8,13 +8,13 @@ extern void bdev_driver(dev_t dev, char *label);
|
||||
extern int bdev_open(dev_t dev, int access);
|
||||
extern int bdev_close(dev_t dev);
|
||||
|
||||
extern ssize_t bdev_read(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
extern ssize_t bdev_read(dev_t dev, uint64_t pos, char *buf, size_t count,
|
||||
int flags);
|
||||
extern ssize_t bdev_write(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
extern ssize_t bdev_write(dev_t dev, uint64_t pos, char *buf, size_t count,
|
||||
int flags);
|
||||
extern ssize_t bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count,
|
||||
extern ssize_t bdev_gather(dev_t dev, uint64_t pos, iovec_t *vec, int count,
|
||||
int flags);
|
||||
extern ssize_t bdev_scatter(dev_t dev, u64_t pos, iovec_t *vec, int count,
|
||||
extern ssize_t bdev_scatter(dev_t dev, uint64_t pos, iovec_t *vec, int count,
|
||||
int flags);
|
||||
extern int bdev_ioctl(dev_t dev, unsigned long request, void *buf,
|
||||
endpoint_t user_endpt);
|
||||
@@ -28,13 +28,13 @@ typedef void (*bdev_callback_t)(dev_t dev, bdev_id_t id, bdev_param_t param,
|
||||
|
||||
extern void bdev_flush_asyn(dev_t dev);
|
||||
|
||||
extern bdev_id_t bdev_read_asyn(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
extern bdev_id_t bdev_read_asyn(dev_t dev, uint64_t pos, char *buf, size_t count,
|
||||
int flags, bdev_callback_t callback, bdev_param_t param);
|
||||
extern bdev_id_t bdev_write_asyn(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
extern bdev_id_t bdev_write_asyn(dev_t dev, uint64_t pos, char *buf, size_t count,
|
||||
int flags, bdev_callback_t callback, bdev_param_t param);
|
||||
extern bdev_id_t bdev_gather_asyn(dev_t dev, u64_t pos, iovec_t *vec,
|
||||
extern bdev_id_t bdev_gather_asyn(dev_t dev, uint64_t pos, iovec_t *vec,
|
||||
int count, int flags, bdev_callback_t callback, bdev_param_t param);
|
||||
extern bdev_id_t bdev_scatter_asyn(dev_t dev, u64_t pos, iovec_t *vec,
|
||||
extern bdev_id_t bdev_scatter_asyn(dev_t dev, uint64_t pos, iovec_t *vec,
|
||||
int count, int flags, bdev_callback_t callback, bdev_param_t param);
|
||||
extern bdev_id_t bdev_ioctl_asyn(dev_t dev, unsigned long request, void *buf,
|
||||
endpoint_t user_endpt, bdev_callback_t callback, bdev_param_t param);
|
||||
|
||||
@@ -17,7 +17,7 @@ struct blockdriver {
|
||||
blockdriver_type_t bdr_type;
|
||||
int (*bdr_open)(devminor_t minor, int access);
|
||||
int (*bdr_close)(devminor_t minor);
|
||||
ssize_t (*bdr_transfer)(devminor_t minor, int do_write, u64_t pos,
|
||||
ssize_t (*bdr_transfer)(devminor_t minor, int do_write, uint64_t pos,
|
||||
endpoint_t endpt, iovec_t *iov, unsigned int count, int flags);
|
||||
int (*bdr_ioctl)(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant, endpoint_t user_endpt);
|
||||
|
||||
@@ -25,7 +25,7 @@ enum {
|
||||
typedef struct {
|
||||
uint32_t request; /* request code; one of BTR_xxx */
|
||||
uint32_t size; /* request size, ioctl request, or access */
|
||||
u64_t position; /* starting disk position */
|
||||
uint64_t position; /* starting disk position */
|
||||
uint32_t flags; /* transfer flags */
|
||||
i32_t result; /* request result; OK, bytes, or error */
|
||||
uint32_t start_time; /* request service start time (us) */
|
||||
|
||||
@@ -9,9 +9,9 @@ typedef unsigned int cdev_id_t;
|
||||
struct chardriver {
|
||||
int (*cdr_open)(devminor_t minor, int access, endpoint_t user_endpt);
|
||||
int (*cdr_close)(devminor_t minor);
|
||||
ssize_t (*cdr_read)(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
ssize_t (*cdr_read)(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
ssize_t (*cdr_write)(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
ssize_t (*cdr_write)(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
int (*cdr_ioctl)(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id);
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
/* Base and size of a partition in bytes. */
|
||||
struct device {
|
||||
u64_t dv_base;
|
||||
u64_t dv_size;
|
||||
uint64_t dv_base;
|
||||
uint64_t dv_size;
|
||||
};
|
||||
|
||||
/* Generic receive function for all drivers. */
|
||||
|
||||
@@ -83,7 +83,7 @@ typedef struct {
|
||||
_ASSERT_MSG_SIZE(mess_9);
|
||||
|
||||
typedef struct {
|
||||
u64_t m10ull1;
|
||||
uint64_t m10ull1;
|
||||
int m10i1, m10i2, m10i3, m10i4;
|
||||
long m10l1, m10l2, m10l3;
|
||||
uint8_t padding[20];
|
||||
@@ -1712,8 +1712,8 @@ typedef struct {
|
||||
_ASSERT_MSG_SIZE(mess_netdrv_net_dl_task);
|
||||
|
||||
typedef struct {
|
||||
u64_t timestamp; /* valid for every notify msg */
|
||||
u64_t interrupts; /* raised interrupts; valid if from HARDWARE */
|
||||
uint64_t timestamp; /* valid for every notify msg */
|
||||
uint64_t interrupts; /* raised interrupts; valid if from HARDWARE */
|
||||
sigset_t sigset; /* raised signals; valid if from SYSTEM */
|
||||
uint8_t padding[24];
|
||||
} mess_notify;
|
||||
|
||||
@@ -27,7 +27,7 @@ struct buf {
|
||||
* If none, VMC_NO_INODE
|
||||
*/
|
||||
ino_t lmfs_inode;
|
||||
u64_t lmfs_inode_offset;
|
||||
uint64_t lmfs_inode_offset;
|
||||
};
|
||||
|
||||
void lmfs_markdirty(struct buf *bp);
|
||||
@@ -41,10 +41,10 @@ void lmfs_set_blocksize(size_t blocksize);
|
||||
void lmfs_buf_pool(int new_nr_bufs);
|
||||
int lmfs_get_block(struct buf **bpp, dev_t dev, block64_t block, int how);
|
||||
int lmfs_get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how,
|
||||
ino_t ino, u64_t off);
|
||||
ino_t ino, uint64_t off);
|
||||
void lmfs_put_block(struct buf *bp);
|
||||
void lmfs_free_block(dev_t dev, block64_t block);
|
||||
void lmfs_zero_block_ino(dev_t dev, ino_t ino, u64_t off);
|
||||
void lmfs_zero_block_ino(dev_t dev, ino_t ino, uint64_t off);
|
||||
void lmfs_invalidate(dev_t device);
|
||||
void lmfs_prefetch(dev_t dev, const block64_t *blockset, unsigned int nblocks);
|
||||
void lmfs_setquiet(int q);
|
||||
|
||||
@@ -21,7 +21,7 @@ const char *servxfile(const char *file);
|
||||
|
||||
/* read_tsc() and friends */
|
||||
void read_tsc(uint32_t *hi, uint32_t *lo);
|
||||
void read_tsc_64(u64_t *t);
|
||||
void read_tsc_64(uint64_t *t);
|
||||
|
||||
/* return values for fsversion */
|
||||
#define FSVERSION_MFS1 0x00001
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
#include <minix/u64.h>
|
||||
|
||||
int minix_sizeup(char *name, u64_t *bytes);
|
||||
int minix_sizeup(char *name, uint64_t *bytes);
|
||||
|
||||
struct part_geom {
|
||||
u64_t base; /* byte offset to the partition start */
|
||||
u64_t size; /* number of bytes in the partition */
|
||||
uint64_t base; /* byte offset to the partition start */
|
||||
uint64_t size; /* number of bytes in the partition */
|
||||
unsigned cylinders; /* disk geometry */
|
||||
unsigned heads;
|
||||
unsigned sectors;
|
||||
|
||||
@@ -13,7 +13,7 @@ typedef void *sffs_dir_t; /* handle to directory search */
|
||||
struct sffs_attr {
|
||||
uint32_t a_mask; /* which fields to retrieve/set */
|
||||
mode_t a_mode; /* file type and permissions */
|
||||
u64_t a_size; /* file size */
|
||||
uint64_t a_size; /* file size */
|
||||
struct timespec a_crtime; /* file creation time */
|
||||
struct timespec a_atime; /* file access time */
|
||||
struct timespec a_mtime; /* file modification time */
|
||||
@@ -29,8 +29,8 @@ struct sffs_attr {
|
||||
|
||||
struct sffs_table {
|
||||
int (*t_open)(const char *path, int flags, int mode, sffs_file_t *handle);
|
||||
ssize_t (*t_read)(sffs_file_t handle, char *buf, size_t size, u64_t pos);
|
||||
ssize_t (*t_write)(sffs_file_t handle, char *buf, size_t size, u64_t pos);
|
||||
ssize_t (*t_read)(sffs_file_t handle, char *buf, size_t size, uint64_t pos);
|
||||
ssize_t (*t_write)(sffs_file_t handle, char *buf, size_t size, uint64_t pos);
|
||||
int (*t_close)(sffs_file_t handle);
|
||||
|
||||
size_t (*t_readbuf)(char **ptr);
|
||||
@@ -49,7 +49,7 @@ struct sffs_table {
|
||||
int (*t_rmdir)(const char *path);
|
||||
int (*t_rename)(const char *opath, const char *npath);
|
||||
|
||||
int (*t_queryvol)(const char *path, u64_t *free, u64_t *total);
|
||||
int (*t_queryvol)(const char *path, uint64_t *free, uint64_t *total);
|
||||
};
|
||||
|
||||
struct sffs_params {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
typedef struct {
|
||||
int s_state;
|
||||
uint32_t s_usecs;
|
||||
u64_t s_base_tsc;
|
||||
uint64_t s_base_tsc;
|
||||
clock_t s_base_uptime;
|
||||
int s_timeout;
|
||||
} spin_t;
|
||||
|
||||
@@ -61,7 +61,7 @@ uint32_t sys_hz(void);
|
||||
double getidle(void);
|
||||
void util_stacktrace(void);
|
||||
int micro_delay(uint32_t micros);
|
||||
uint32_t tsc_64_to_micros(u64_t tsc);
|
||||
uint32_t tsc_64_to_micros(uint64_t tsc);
|
||||
uint32_t tsc_to_micros(uint32_t low, uint32_t high);
|
||||
uint32_t tsc_get_khz(void);
|
||||
uint32_t micros_to_ticks(uint32_t micros);
|
||||
@@ -70,9 +70,9 @@ time_t clock_time(struct timespec *tv);
|
||||
void read_frclock(uint32_t *frclk);
|
||||
uint32_t delta_frclock(uint32_t base, uint32_t cur);
|
||||
#endif
|
||||
void read_frclock_64(u64_t *frclk);
|
||||
u64_t delta_frclock_64(u64_t base, u64_t cur);
|
||||
uint32_t frclock_64_to_micros(u64_t tsc);
|
||||
void read_frclock_64(uint64_t *frclk);
|
||||
uint64_t delta_frclock_64(uint64_t base, uint64_t cur);
|
||||
uint32_t frclock_64_to_micros(uint64_t tsc);
|
||||
void ser_putc(char c);
|
||||
void get_randomness(struct k_randomness *, int);
|
||||
uint32_t sqrt_approx(uint32_t);
|
||||
|
||||
@@ -88,9 +88,9 @@ int tmrs_exptimers(minix_timer_t **tmrs, clock_t now, clock_t *new_head);
|
||||
}
|
||||
|
||||
#define TIME_BLOCK_VAR(timed_code_block, time_interval) do { \
|
||||
static u64_t _cum_spenttime, _cum_starttime; \
|
||||
static uint64_t _cum_spenttime, _cum_starttime; \
|
||||
static int _cum_instances; \
|
||||
u64_t _next_cum_spent, _starttime, _endtime, _dt, _cum_dt; \
|
||||
uint64_t _next_cum_spent, _starttime, _endtime, _dt, _cum_dt; \
|
||||
uint32_t _dt_micros; \
|
||||
read_tsc_64(&_starttime); \
|
||||
do { timed_code_block } while(0); \
|
||||
|
||||
@@ -195,7 +195,7 @@ struct k_randomness {
|
||||
|
||||
/* ARM free-running timer information. */
|
||||
struct arm_frclock {
|
||||
u64_t hz; /* tcrr frequency */
|
||||
uint64_t hz; /* tcrr frequency */
|
||||
uint32_t tcrr; /* tcrr address */
|
||||
};
|
||||
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
static inline unsigned long ex64lo(u64_t i)
|
||||
static inline unsigned long ex64lo(uint64_t i)
|
||||
{
|
||||
return (unsigned long)i;
|
||||
}
|
||||
|
||||
static inline unsigned long ex64hi(u64_t i)
|
||||
static inline unsigned long ex64hi(uint64_t i)
|
||||
{
|
||||
return (unsigned long)(i>>32);
|
||||
}
|
||||
|
||||
static inline u64_t make64(unsigned long lo, unsigned long hi)
|
||||
static inline uint64_t make64(unsigned long lo, unsigned long hi)
|
||||
{
|
||||
return ((u64_t)hi << 32) | (u64_t)lo;
|
||||
return ((uint64_t)hi << 32) | (uint64_t)lo;
|
||||
}
|
||||
|
||||
#endif /* _MINIX__U64_H */
|
||||
|
||||
@@ -13,14 +13,14 @@ extern int vbox_call(vbox_conn_t conn, uint32_t function, vbox_param_t *param,
|
||||
int count, int *code);
|
||||
|
||||
extern void vbox_set_u32(vbox_param_t *param, uint32_t value);
|
||||
extern void vbox_set_u64(vbox_param_t *param, u64_t value);
|
||||
extern void vbox_set_u64(vbox_param_t *param, uint64_t value);
|
||||
extern void vbox_set_ptr(vbox_param_t *param, void *ptr, size_t size,
|
||||
unsigned int dir);
|
||||
extern void vbox_set_grant(vbox_param_t *param, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t off, size_t size, unsigned int dir);
|
||||
|
||||
extern uint32_t vbox_get_u32(vbox_param_t *param);
|
||||
extern u64_t vbox_get_u64(vbox_param_t *param);
|
||||
extern uint64_t vbox_get_u64(vbox_param_t *param);
|
||||
|
||||
extern void vbox_put(vbox_param_t *param, int count);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ typedef struct {
|
||||
vbox_type_t type;
|
||||
union {
|
||||
uint32_t u32;
|
||||
u64_t u64;
|
||||
uint64_t u64;
|
||||
struct {
|
||||
cp_grant_id_t grant;
|
||||
size_t off;
|
||||
|
||||
@@ -11,8 +11,8 @@ typedef int fbd_rulenum_t;
|
||||
|
||||
struct fbd_rule {
|
||||
fbd_rulenum_t num; /* rule number (1-based) */
|
||||
u64_t start; /* start position of area to match */
|
||||
u64_t end; /* end position (exclusive) (0 = up to EOF) */
|
||||
uint64_t start; /* start position of area to match */
|
||||
uint64_t end; /* end position (exclusive) (0 = up to EOF) */
|
||||
int flags; /* match read and/or write requests */
|
||||
unsigned int skip; /* # matches to skip before activating */
|
||||
unsigned int count; /* # times left to trigger (0 = no limit) */
|
||||
@@ -28,8 +28,8 @@ struct fbd_rule {
|
||||
} error;
|
||||
|
||||
struct {
|
||||
u64_t start; /* start position of target area */
|
||||
u64_t end; /* end position of area (excl) */
|
||||
uint64_t start; /* start position of target area */
|
||||
uint64_t end; /* end position of area (excl) */
|
||||
uint32_t align; /* alignment to use in target area */
|
||||
} misdir;
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ void cycles_accounting_init(void)
|
||||
|
||||
void context_stop(struct proc * p)
|
||||
{
|
||||
u64_t tsc, tsc_delta;
|
||||
u64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch);
|
||||
uint64_t tsc, tsc_delta;
|
||||
uint64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch);
|
||||
unsigned int cpu, tpt, counter;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -184,27 +184,27 @@ int register_local_timer_handler(const irq_handler_t handler)
|
||||
return bsp_register_timer_handler(handler);
|
||||
}
|
||||
|
||||
u64_t ms_2_cpu_time(unsigned ms)
|
||||
uint64_t ms_2_cpu_time(unsigned ms)
|
||||
{
|
||||
return (u64_t)tsc_per_ms[cpuid] * ms;
|
||||
return (uint64_t)tsc_per_ms[cpuid] * ms;
|
||||
}
|
||||
|
||||
unsigned cpu_time_2_ms(u64_t cpu_time)
|
||||
unsigned cpu_time_2_ms(uint64_t cpu_time)
|
||||
{
|
||||
return (unsigned long)(cpu_time / tsc_per_ms[cpuid]);
|
||||
}
|
||||
|
||||
short cpu_load(void)
|
||||
{
|
||||
u64_t current_tsc, *current_idle;
|
||||
u64_t tsc_delta, idle_delta, busy;
|
||||
uint64_t current_tsc, *current_idle;
|
||||
uint64_t tsc_delta, idle_delta, busy;
|
||||
struct proc *idle;
|
||||
short load;
|
||||
#ifdef CONFIG_SMP
|
||||
unsigned cpu = cpuid;
|
||||
#endif
|
||||
|
||||
u64_t *last_tsc, *last_idle;
|
||||
uint64_t *last_tsc, *last_idle;
|
||||
|
||||
last_tsc = get_cpu_var_ptr(cpu, cpu_last_tsc);
|
||||
last_idle = get_cpu_var_ptr(cpu, cpu_last_idle);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/* interrupt handler hook */
|
||||
static irq_hook_t omap3_timer_hook;
|
||||
static u64_t high_frc;
|
||||
static uint64_t high_frc;
|
||||
|
||||
struct omap_timer_registers;
|
||||
|
||||
@@ -387,10 +387,10 @@ bsp_timer_int_handler(void)
|
||||
|
||||
/* Use the free running clock as TSC */
|
||||
void
|
||||
read_tsc_64(u64_t * t)
|
||||
read_tsc_64(uint64_t * t)
|
||||
{
|
||||
uint32_t now;
|
||||
now = read_frc();
|
||||
frc_overflow_check(now);
|
||||
*t = (u64_t) now + (high_frc << 32);
|
||||
*t = (uint64_t) now + (high_frc << 32);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ struct tss_s {
|
||||
} __attribute__((packed));
|
||||
int tss_init(unsigned cpu, void * kernel_stack);
|
||||
|
||||
void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len);
|
||||
void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len);
|
||||
phys_bytes alloc_lowest(kinfo_t *cbi, phys_bytes len);
|
||||
void vm_enable_paging(void);
|
||||
void cut_memmap(kinfo_t *cbi, phys_bytes start, phys_bytes end);
|
||||
|
||||
@@ -65,7 +65,7 @@ void cut_memmap(kinfo_t *cbi, phys_bytes start, phys_bytes end)
|
||||
}
|
||||
}
|
||||
|
||||
void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len)
|
||||
void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len)
|
||||
{
|
||||
int m;
|
||||
#define LIMIT 0xFFFFF000
|
||||
|
||||
@@ -35,7 +35,7 @@ struct acpi_generic_address {
|
||||
uint8_t register_bit_width;
|
||||
uint8_t register_bit_offset;
|
||||
uint8_t access_size;
|
||||
u64_t address;
|
||||
uint64_t address;
|
||||
};
|
||||
|
||||
struct acpi_fadt_header
|
||||
@@ -82,8 +82,8 @@ struct acpi_fadt_header
|
||||
struct acpi_generic_address reset_reg;
|
||||
uint8_t reset_value;
|
||||
uint8_t reserved2[3];
|
||||
u64_t xfacs;
|
||||
u64_t xdsdt;
|
||||
uint64_t xfacs;
|
||||
uint64_t xdsdt;
|
||||
struct acpi_generic_address xpm1a_evt_blk;
|
||||
struct acpi_generic_address xpm1b_evt_blk;
|
||||
struct acpi_generic_address xpm1a_cnt_blk;
|
||||
|
||||
@@ -148,7 +148,7 @@ vir_bytes lapic_eoi_addr;
|
||||
int bsp_lapic_id;
|
||||
|
||||
static volatile unsigned probe_ticks;
|
||||
static u64_t tsc0, tsc1;
|
||||
static uint64_t tsc0, tsc1;
|
||||
static uint32_t lapic_tctr0, lapic_tctr1;
|
||||
|
||||
static unsigned apic_imcrp;
|
||||
@@ -410,7 +410,7 @@ unsigned int apicid(void)
|
||||
static int calib_clk_handler(irq_hook_t * UNUSED(hook))
|
||||
{
|
||||
uint32_t tcrt;
|
||||
u64_t tsc;
|
||||
uint64_t tsc;
|
||||
|
||||
probe_ticks++;
|
||||
read_tsc_64(&tsc);
|
||||
@@ -443,8 +443,8 @@ static int spurious_irq_handler(irq_hook_t * UNUSED(hook))
|
||||
static void apic_calibrate_clocks(unsigned cpu)
|
||||
{
|
||||
uint32_t lvtt, val, lapic_delta;
|
||||
u64_t tsc_delta;
|
||||
u64_t cpu_freq;
|
||||
uint64_t tsc_delta;
|
||||
uint64_t cpu_freq;
|
||||
|
||||
irq_hook_t calib_clk, spurious_irq;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
static irq_hook_t pic_timer_hook; /* interrupt handler hook */
|
||||
|
||||
static unsigned probe_ticks;
|
||||
static u64_t tsc0, tsc1;
|
||||
static uint64_t tsc0, tsc1;
|
||||
#define PROBE_TICKS (system_hz / 10)
|
||||
|
||||
static unsigned tsc_per_ms[CONFIG_MAX_CPUS];
|
||||
@@ -75,7 +75,7 @@ void arch_timer_int_handler(void)
|
||||
|
||||
static int calib_cpu_handler(irq_hook_t * UNUSED(hook))
|
||||
{
|
||||
u64_t tsc;
|
||||
uint64_t tsc;
|
||||
|
||||
probe_ticks++;
|
||||
read_tsc_64(&tsc);
|
||||
@@ -95,8 +95,8 @@ static int calib_cpu_handler(irq_hook_t * UNUSED(hook))
|
||||
|
||||
static void estimate_cpu_freq(void)
|
||||
{
|
||||
u64_t tsc_delta;
|
||||
u64_t cpu_freq;
|
||||
uint64_t tsc_delta;
|
||||
uint64_t cpu_freq;
|
||||
|
||||
irq_hook_t calib_cpu;
|
||||
|
||||
@@ -207,8 +207,8 @@ void cycles_accounting_init(void)
|
||||
|
||||
void context_stop(struct proc * p)
|
||||
{
|
||||
u64_t tsc, tsc_delta;
|
||||
u64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch);
|
||||
uint64_t tsc, tsc_delta;
|
||||
uint64_t * __tsc_ctr_switch = get_cpulocal_var_ptr(tsc_ctr_switch);
|
||||
unsigned int cpu, tpt, counter;
|
||||
#ifdef CONFIG_SMP
|
||||
int must_bkl_unlock = 0;
|
||||
@@ -224,7 +224,7 @@ void context_stop(struct proc * p)
|
||||
* for IDLE we must not hold the lock
|
||||
*/
|
||||
if (p == proc_addr(KERNEL)) {
|
||||
u64_t tmp;
|
||||
uint64_t tmp;
|
||||
|
||||
read_tsc_64(&tsc);
|
||||
tmp = tsc - *__tsc_ctr_switch;
|
||||
@@ -232,7 +232,7 @@ void context_stop(struct proc * p)
|
||||
p->p_cycles = p->p_cycles + tmp;
|
||||
must_bkl_unlock = 1;
|
||||
} else {
|
||||
u64_t bkl_tsc;
|
||||
uint64_t bkl_tsc;
|
||||
atomic_t succ;
|
||||
|
||||
read_tsc_64(&bkl_tsc);
|
||||
@@ -368,27 +368,27 @@ void context_stop_idle(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
u64_t ms_2_cpu_time(unsigned ms)
|
||||
uint64_t ms_2_cpu_time(unsigned ms)
|
||||
{
|
||||
return (u64_t)tsc_per_ms[cpuid] * ms;
|
||||
return (uint64_t)tsc_per_ms[cpuid] * ms;
|
||||
}
|
||||
|
||||
unsigned cpu_time_2_ms(u64_t cpu_time)
|
||||
unsigned cpu_time_2_ms(uint64_t cpu_time)
|
||||
{
|
||||
return (unsigned long)(cpu_time / tsc_per_ms[cpuid]);
|
||||
}
|
||||
|
||||
short cpu_load(void)
|
||||
{
|
||||
u64_t current_tsc, *current_idle;
|
||||
u64_t tsc_delta, idle_delta, busy;
|
||||
uint64_t current_tsc, *current_idle;
|
||||
uint64_t tsc_delta, idle_delta, busy;
|
||||
struct proc *idle;
|
||||
short load;
|
||||
#ifdef CONFIG_SMP
|
||||
unsigned cpu = cpuid;
|
||||
#endif
|
||||
|
||||
u64_t *last_tsc, *last_idle;
|
||||
uint64_t *last_tsc, *last_idle;
|
||||
|
||||
last_tsc = get_cpu_var_ptr(cpu, cpu_last_tsc);
|
||||
last_idle = get_cpu_var_ptr(cpu, cpu_last_idle);
|
||||
@@ -418,7 +418,7 @@ short cpu_load(void)
|
||||
|
||||
void busy_delay_ms(int ms)
|
||||
{
|
||||
u64_t cycles = ms_2_cpu_time(ms), tsc0, tsc, tsc1;
|
||||
uint64_t cycles = ms_2_cpu_time(ms), tsc0, tsc, tsc1;
|
||||
read_tsc_64(&tsc0);
|
||||
tsc1 = tsc0 + cycles;
|
||||
do { read_tsc_64(&tsc); } while(tsc < tsc1);
|
||||
|
||||
@@ -16,7 +16,7 @@ static struct arch_watchdog amd_watchdog;
|
||||
|
||||
static void intel_arch_watchdog_init(const unsigned cpu)
|
||||
{
|
||||
u64_t cpuf;
|
||||
uint64_t cpuf;
|
||||
uint32_t val;
|
||||
|
||||
ia32_msr_write(INTEL_MSR_PERFMON_CRT0, 0, 0);
|
||||
@@ -153,7 +153,7 @@ int i386_watchdog_start(void)
|
||||
|
||||
static int intel_arch_watchdog_profile_init(const unsigned freq)
|
||||
{
|
||||
u64_t cpuf;
|
||||
uint64_t cpuf;
|
||||
|
||||
/* FIXME works only if all CPUs have the same freq */
|
||||
cpuf = cpu_get_freq(cpuid);
|
||||
@@ -186,7 +186,7 @@ static struct arch_watchdog intel_arch_watchdog = {
|
||||
|
||||
static void amd_watchdog_init(const unsigned cpu)
|
||||
{
|
||||
u64_t cpuf;
|
||||
uint64_t cpuf;
|
||||
uint32_t val;
|
||||
|
||||
ia32_msr_write(AMD_MSR_EVENT_CTR0, 0, 0);
|
||||
@@ -217,7 +217,7 @@ static void amd_watchdog_reinit(const unsigned cpu)
|
||||
|
||||
static int amd_watchdog_profile_init(const unsigned freq)
|
||||
{
|
||||
u64_t cpuf;
|
||||
uint64_t cpuf;
|
||||
|
||||
/* FIXME works only if all CPUs have the same freq */
|
||||
cpuf = cpu_get_freq(cpuid);
|
||||
|
||||
@@ -200,7 +200,7 @@ uint32_t read_cs(void);
|
||||
uint32_t read_ds(void);
|
||||
uint32_t read_ss(void);
|
||||
|
||||
void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len);
|
||||
void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len);
|
||||
phys_bytes alloc_lowest(kinfo_t *cbi, phys_bytes len);
|
||||
void vm_enable_paging(void);
|
||||
void cut_memmap(kinfo_t *cbi, phys_bytes start, phys_bytes end);
|
||||
|
||||
@@ -83,7 +83,7 @@ phys_bytes alloc_lowest(kinfo_t *cbi, phys_bytes len)
|
||||
return lowest;
|
||||
}
|
||||
|
||||
void add_memmap(kinfo_t *cbi, u64_t addr, u64_t len)
|
||||
void add_memmap(kinfo_t *cbi, uint64_t addr, uint64_t len)
|
||||
{
|
||||
int m;
|
||||
#define LIMIT 0xFFFFF000
|
||||
|
||||
@@ -16,7 +16,7 @@ void stop_local_timer(void);
|
||||
void restart_local_timer(void);
|
||||
int register_local_timer_handler(irq_handler_t handler);
|
||||
|
||||
u64_t ms_2_cpu_time(unsigned ms);
|
||||
unsigned cpu_time_2_ms(u64_t cpu_time);
|
||||
uint64_t ms_2_cpu_time(unsigned ms);
|
||||
unsigned cpu_time_2_ms(uint64_t cpu_time);
|
||||
|
||||
#endif /* __CLOCK_H__ */
|
||||
|
||||
@@ -62,11 +62,11 @@ extern struct __cpu_local_vars {
|
||||
int idle_interrupted; /* to interrupt busy-idle
|
||||
while profiling */
|
||||
|
||||
u64_t tsc_ctr_switch; /* when did we switched time accounting */
|
||||
uint64_t tsc_ctr_switch; /* when did we switched time accounting */
|
||||
|
||||
/* last values read from cpu when sending ooq msg to scheduler */
|
||||
u64_t cpu_last_tsc;
|
||||
u64_t cpu_last_idle;
|
||||
uint64_t cpu_last_tsc;
|
||||
uint64_t cpu_last_idle;
|
||||
|
||||
|
||||
char fpu_presence; /* whether the cpu has FPU or not */
|
||||
|
||||
@@ -61,7 +61,7 @@ EXTERN int config_no_apic; /* optionally turn off apic */
|
||||
EXTERN int config_apic_timer_x; /* apic timer slowdown factor */
|
||||
#endif
|
||||
|
||||
EXTERN u64_t cpu_hz[CONFIG_MAX_CPUS];
|
||||
EXTERN uint64_t cpu_hz[CONFIG_MAX_CPUS];
|
||||
|
||||
#define cpu_set_freq(cpu, freq) do {cpu_hz[cpu] = freq;} while (0)
|
||||
#define cpu_get_freq(cpu) cpu_hz[cpu]
|
||||
@@ -83,8 +83,8 @@ EXTERN volatile int serial_debug_active;
|
||||
EXTERN struct cpu_info cpu_info[CONFIG_MAX_CPUS];
|
||||
|
||||
/* BKL stats */
|
||||
EXTERN u64_t kernel_ticks[CONFIG_MAX_CPUS];
|
||||
EXTERN u64_t bkl_ticks[CONFIG_MAX_CPUS];
|
||||
EXTERN uint64_t kernel_ticks[CONFIG_MAX_CPUS];
|
||||
EXTERN uint64_t bkl_ticks[CONFIG_MAX_CPUS];
|
||||
EXTERN unsigned bkl_tries[CONFIG_MAX_CPUS];
|
||||
EXTERN unsigned bkl_succ[CONFIG_MAX_CPUS];
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ char *env_get(const char *name)
|
||||
|
||||
void cpu_print_freq(unsigned cpu)
|
||||
{
|
||||
u64_t freq;
|
||||
uint64_t freq;
|
||||
|
||||
freq = cpu_get_freq(cpu);
|
||||
DEBUGBASIC(("CPU %d freq %lu MHz\n", cpu, (unsigned long)(freq / 1000000)));
|
||||
|
||||
@@ -1726,7 +1726,7 @@ void dequeue(struct proc *rp)
|
||||
int q = rp->p_priority; /* queue to use */
|
||||
struct proc **xpp; /* iterate over queue */
|
||||
struct proc *prev_xp;
|
||||
u64_t tsc, tsc_delta;
|
||||
uint64_t tsc, tsc_delta;
|
||||
|
||||
struct proc **rdy_tail;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ struct proc {
|
||||
volatile uint32_t p_misc_flags; /* flags that do not suspend the process */
|
||||
|
||||
char p_priority; /* current process priority */
|
||||
u64_t p_cpu_time_left; /* time left to use the cpu */
|
||||
uint64_t p_cpu_time_left; /* time left to use the cpu */
|
||||
unsigned p_quantum_size_ms; /* assigned time quantum in ms
|
||||
FIXME remove this */
|
||||
struct proc *p_scheduler; /* who should get out of quantum msg */
|
||||
@@ -46,8 +46,8 @@ struct proc {
|
||||
|
||||
/* Accounting statistics that get passed to the process' scheduler */
|
||||
struct {
|
||||
u64_t enter_queue; /* time when enqueued (cycles) */
|
||||
u64_t time_in_queue; /* time spent in queue */
|
||||
uint64_t enter_queue; /* time when enqueued (cycles) */
|
||||
uint64_t time_in_queue; /* time spent in queue */
|
||||
unsigned long dequeues;
|
||||
unsigned long ipc_sync;
|
||||
unsigned long ipc_async;
|
||||
@@ -62,11 +62,11 @@ struct proc {
|
||||
clock_t p_virt_left; /* number of ticks left on virtual timer */
|
||||
clock_t p_prof_left; /* number of ticks left on profile timer */
|
||||
|
||||
u64_t p_cycles; /* how many cycles did the process use */
|
||||
u64_t p_kcall_cycles; /* kernel cycles caused by this proc (kcall) */
|
||||
u64_t p_kipc_cycles; /* cycles caused by this proc (ipc) */
|
||||
uint64_t p_cycles; /* how many cycles did the process use */
|
||||
uint64_t p_kcall_cycles; /* kernel cycles caused by this proc (kcall) */
|
||||
uint64_t p_kipc_cycles; /* cycles caused by this proc (ipc) */
|
||||
|
||||
u64_t p_tick_cycles; /* cycles accumulated for up to a clock tick */
|
||||
uint64_t p_tick_cycles; /* cycles accumulated for up to a clock tick */
|
||||
struct cpuavg p_cpuavg; /* running CPU average, for ps(1) */
|
||||
|
||||
struct proc *p_nextready; /* pointer to next ready process */
|
||||
|
||||
@@ -20,9 +20,9 @@ struct arch_watchdog {
|
||||
arch_watchdog_method_t init; /* initial setup */
|
||||
arch_watchdog_method_t reinit; /* reinit after a tick */
|
||||
arch_watchdog_profile_init_t profile_init;
|
||||
u64_t resetval;
|
||||
u64_t watchdog_resetval;
|
||||
u64_t profile_resetval;
|
||||
uint64_t resetval;
|
||||
uint64_t watchdog_resetval;
|
||||
uint64_t profile_resetval;
|
||||
};
|
||||
|
||||
extern struct arch_watchdog *watchdog;
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
static int msg_open(devminor_t minor_dev_nr, int access,
|
||||
endpoint_t user_endpt);
|
||||
static int msg_close(int minor_dev_nr);
|
||||
static ssize_t msg_read(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t msg_read(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static ssize_t msg_write(devminor_t minor, u64_t position, endpoint_t endpt,
|
||||
static ssize_t msg_write(devminor_t minor, uint64_t position, endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
|
||||
static int msg_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id);
|
||||
@@ -391,7 +391,7 @@ static int msg_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
}
|
||||
|
||||
|
||||
static ssize_t msg_write(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t msg_write(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t id)
|
||||
{
|
||||
@@ -441,7 +441,7 @@ static ssize_t msg_write(devminor_t minor, u64_t UNUSED(position),
|
||||
}
|
||||
|
||||
|
||||
static ssize_t msg_read(devminor_t minor, u64_t UNUSED(position),
|
||||
static ssize_t msg_read(devminor_t minor, uint64_t UNUSED(position),
|
||||
endpoint_t endpt, cp_grant_id_t grant, size_t size, int UNUSED(flags),
|
||||
cdev_id_t id)
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@ int bdev_close(dev_t dev)
|
||||
return r;
|
||||
}
|
||||
|
||||
static int bdev_rdwt_setup(int req, dev_t dev, u64_t pos, char *buf,
|
||||
static int bdev_rdwt_setup(int req, dev_t dev, uint64_t pos, char *buf,
|
||||
size_t count, int flags, message *m)
|
||||
{
|
||||
/* Set up a single-buffer read/write request.
|
||||
@@ -151,7 +151,7 @@ static void bdev_rdwt_cleanup(const message *m)
|
||||
cpf_revoke(m->m_lbdev_lblockdriver_msg.grant);
|
||||
}
|
||||
|
||||
static ssize_t bdev_rdwt(int req, dev_t dev, u64_t pos, char *buf,
|
||||
static ssize_t bdev_rdwt(int req, dev_t dev, uint64_t pos, char *buf,
|
||||
size_t count, int flags)
|
||||
{
|
||||
/* Perform a synchronous read or write call using a single buffer.
|
||||
@@ -171,7 +171,7 @@ static ssize_t bdev_rdwt(int req, dev_t dev, u64_t pos, char *buf,
|
||||
return r;
|
||||
}
|
||||
|
||||
static int bdev_vrdwt_setup(int req, dev_t dev, u64_t pos, iovec_t *vec,
|
||||
static int bdev_vrdwt_setup(int req, dev_t dev, uint64_t pos, iovec_t *vec,
|
||||
int count, int flags, message *m, iovec_s_t *gvec)
|
||||
{
|
||||
/* Set up a vectored read/write request.
|
||||
@@ -249,7 +249,7 @@ static void bdev_vrdwt_cleanup(const message *m, iovec_s_t *gvec)
|
||||
cpf_revoke(gvec[i].iov_grant);
|
||||
}
|
||||
|
||||
static ssize_t bdev_vrdwt(int req, dev_t dev, u64_t pos, iovec_t *vec,
|
||||
static ssize_t bdev_vrdwt(int req, dev_t dev, uint64_t pos, iovec_t *vec,
|
||||
int count, int flags)
|
||||
{
|
||||
/* Perform a synchronous read or write call using a vector of buffers.
|
||||
@@ -271,7 +271,7 @@ static ssize_t bdev_vrdwt(int req, dev_t dev, u64_t pos, iovec_t *vec,
|
||||
return r;
|
||||
}
|
||||
|
||||
ssize_t bdev_read(dev_t dev, u64_t pos, char *buf, size_t count, int flags)
|
||||
ssize_t bdev_read(dev_t dev, uint64_t pos, char *buf, size_t count, int flags)
|
||||
{
|
||||
/* Perform a synchronous read call into a single buffer.
|
||||
*/
|
||||
@@ -279,7 +279,7 @@ ssize_t bdev_read(dev_t dev, u64_t pos, char *buf, size_t count, int flags)
|
||||
return bdev_rdwt(BDEV_READ, dev, pos, buf, count, flags);
|
||||
}
|
||||
|
||||
ssize_t bdev_write(dev_t dev, u64_t pos, char *buf, size_t count, int flags)
|
||||
ssize_t bdev_write(dev_t dev, uint64_t pos, char *buf, size_t count, int flags)
|
||||
{
|
||||
/* Perform a synchronous write call from a single buffer.
|
||||
*/
|
||||
@@ -287,7 +287,7 @@ ssize_t bdev_write(dev_t dev, u64_t pos, char *buf, size_t count, int flags)
|
||||
return bdev_rdwt(BDEV_WRITE, dev, pos, buf, count, flags);
|
||||
}
|
||||
|
||||
ssize_t bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags)
|
||||
ssize_t bdev_gather(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags)
|
||||
{
|
||||
/* Perform a synchronous read call into a vector of buffers.
|
||||
*/
|
||||
@@ -295,7 +295,7 @@ ssize_t bdev_gather(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags)
|
||||
return bdev_vrdwt(BDEV_GATHER, dev, pos, vec, count, flags);
|
||||
}
|
||||
|
||||
ssize_t bdev_scatter(dev_t dev, u64_t pos, iovec_t *vec, int count, int flags)
|
||||
ssize_t bdev_scatter(dev_t dev, uint64_t pos, iovec_t *vec, int count, int flags)
|
||||
{
|
||||
/* Perform a synchronous write call from a vector of buffers.
|
||||
*/
|
||||
@@ -383,7 +383,7 @@ void bdev_flush_asyn(dev_t dev)
|
||||
(void) bdev_wait_asyn(call->id);
|
||||
}
|
||||
|
||||
static bdev_id_t bdev_rdwt_asyn(int req, dev_t dev, u64_t pos, char *buf,
|
||||
static bdev_id_t bdev_rdwt_asyn(int req, dev_t dev, uint64_t pos, char *buf,
|
||||
size_t count, int flags, bdev_callback_t callback, bdev_param_t param)
|
||||
{
|
||||
/* Perform an asynchronous read or write call using a single buffer.
|
||||
@@ -420,7 +420,7 @@ static bdev_id_t bdev_rdwt_asyn(int req, dev_t dev, u64_t pos, char *buf,
|
||||
return call->id;
|
||||
}
|
||||
|
||||
static bdev_id_t bdev_vrdwt_asyn(int req, dev_t dev, u64_t pos, iovec_t *vec,
|
||||
static bdev_id_t bdev_vrdwt_asyn(int req, dev_t dev, uint64_t pos, iovec_t *vec,
|
||||
int count, int flags, bdev_callback_t callback, bdev_param_t param)
|
||||
{
|
||||
/* Perform an asynchronous read or write call using a vector of buffers.
|
||||
@@ -456,7 +456,7 @@ static bdev_id_t bdev_vrdwt_asyn(int req, dev_t dev, u64_t pos, iovec_t *vec,
|
||||
return call->id;
|
||||
}
|
||||
|
||||
bdev_id_t bdev_read_asyn(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
bdev_id_t bdev_read_asyn(dev_t dev, uint64_t pos, char *buf, size_t count,
|
||||
int flags, bdev_callback_t callback, bdev_param_t param)
|
||||
{
|
||||
/* Perform an asynchronous read call into a single buffer.
|
||||
@@ -466,7 +466,7 @@ bdev_id_t bdev_read_asyn(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
param);
|
||||
}
|
||||
|
||||
bdev_id_t bdev_write_asyn(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
bdev_id_t bdev_write_asyn(dev_t dev, uint64_t pos, char *buf, size_t count,
|
||||
int flags, bdev_callback_t callback, bdev_param_t param)
|
||||
{
|
||||
/* Perform an asynchronous write call from a single buffer.
|
||||
@@ -476,7 +476,7 @@ bdev_id_t bdev_write_asyn(dev_t dev, u64_t pos, char *buf, size_t count,
|
||||
param);
|
||||
}
|
||||
|
||||
bdev_id_t bdev_gather_asyn(dev_t dev, u64_t pos, iovec_t *vec, int count,
|
||||
bdev_id_t bdev_gather_asyn(dev_t dev, uint64_t pos, iovec_t *vec, int count,
|
||||
int flags, bdev_callback_t callback, bdev_param_t param)
|
||||
{
|
||||
/* Perform an asynchronous read call into a vector of buffers.
|
||||
@@ -486,7 +486,7 @@ bdev_id_t bdev_gather_asyn(dev_t dev, u64_t pos, iovec_t *vec, int count,
|
||||
param);
|
||||
}
|
||||
|
||||
bdev_id_t bdev_scatter_asyn(dev_t dev, u64_t pos, iovec_t *vec, int count,
|
||||
bdev_id_t bdev_scatter_asyn(dev_t dev, uint64_t pos, iovec_t *vec, int count,
|
||||
int flags, bdev_callback_t callback, bdev_param_t param)
|
||||
{
|
||||
/* Perform an asynchronous write call into a vector of buffers.
|
||||
|
||||
@@ -194,7 +194,7 @@ static int do_rdwt(struct blockdriver *bdp, message *mp)
|
||||
{
|
||||
/* Carry out a single read or write request. */
|
||||
iovec_t iovec1;
|
||||
u64_t position;
|
||||
uint64_t position;
|
||||
int do_write;
|
||||
ssize_t r;
|
||||
|
||||
@@ -224,7 +224,7 @@ static int do_vrdwt(struct blockdriver *bdp, message *mp, thread_id_t id)
|
||||
/* Carry out an device read or write to/from a vector of buffers. */
|
||||
iovec_t iovec[NR_IOREQS];
|
||||
unsigned int i, nr_req;
|
||||
u64_t position;
|
||||
uint64_t position;
|
||||
int do_write;
|
||||
ssize_t r, size;
|
||||
|
||||
|
||||
@@ -114,8 +114,8 @@ static void parse_part_table(
|
||||
if (pe->lowsec < base) pe->lowsec = base;
|
||||
if (part_limit < pe->lowsec) part_limit = pe->lowsec;
|
||||
|
||||
dv->dv_base = (u64_t)pe->lowsec * SECTOR_SIZE;
|
||||
dv->dv_size = (u64_t)(part_limit - pe->lowsec) * SECTOR_SIZE;
|
||||
dv->dv_base = (uint64_t)pe->lowsec * SECTOR_SIZE;
|
||||
dv->dv_size = (uint64_t)(part_limit - pe->lowsec) * SECTOR_SIZE;
|
||||
|
||||
if (style == P_PRIMARY) {
|
||||
/* Each Minix primary partition can be subpartitioned. */
|
||||
@@ -169,9 +169,9 @@ static void extpartition(
|
||||
if (pe->sysind != NO_PART) {
|
||||
if ((dv = (*bdp->bdr_part)(subdev)) == NULL) return;
|
||||
|
||||
dv->dv_base = (u64_t)(extbase + offset + pe->lowsec) *
|
||||
dv->dv_base = (uint64_t)(extbase + offset + pe->lowsec) *
|
||||
SECTOR_SIZE;
|
||||
dv->dv_size = (u64_t)pe->size * SECTOR_SIZE;
|
||||
dv->dv_size = (uint64_t)pe->size * SECTOR_SIZE;
|
||||
|
||||
/* Out of devices? */
|
||||
if (++subdev % NR_PARTITIONS == 0) return;
|
||||
@@ -194,10 +194,10 @@ static int get_part_table(
|
||||
* errors.
|
||||
*/
|
||||
iovec_t iovec1;
|
||||
u64_t position;
|
||||
uint64_t position;
|
||||
int r;
|
||||
|
||||
position = (u64_t)offset * SECTOR_SIZE;
|
||||
position = (uint64_t)offset * SECTOR_SIZE;
|
||||
iovec1.iov_addr = (vir_bytes) tmp_buf;
|
||||
iovec1.iov_size = CD_SECTOR_SIZE;
|
||||
r = (*bdp->bdr_transfer)(device, FALSE /*do_write*/, position, SELF,
|
||||
|
||||
@@ -19,7 +19,7 @@ static btrace_entry *trace_buf = NULL;
|
||||
static size_t trace_size = 0;
|
||||
static size_t trace_pos;
|
||||
static size_t trace_next;
|
||||
static u64_t trace_tsc;
|
||||
static uint64_t trace_tsc;
|
||||
|
||||
/* Pointers to in-progress trace entries for each thread (all worker threads,
|
||||
* plus one for the main thread). Each pointer is set to NULL whenever no
|
||||
@@ -34,7 +34,7 @@ static uint32_t trace_gettime(void)
|
||||
{
|
||||
/* Return the current time, in microseconds since the start of the trace.
|
||||
*/
|
||||
u64_t tsc;
|
||||
uint64_t tsc;
|
||||
|
||||
assert(trace_enabled);
|
||||
|
||||
@@ -170,7 +170,7 @@ void trace_start(thread_id_t id, message *m_ptr)
|
||||
*/
|
||||
btrace_entry *entry;
|
||||
int req;
|
||||
u64_t pos;
|
||||
uint64_t pos;
|
||||
size_t size;
|
||||
int flags;
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
#include <minix/u64.h>
|
||||
#include <minix/minlib.h>
|
||||
|
||||
/* Utility function to work directly with u64_t
|
||||
/* Utility function to work directly with uint64_t
|
||||
* By Antonio Mancina
|
||||
*/
|
||||
void read_tsc_64(t)
|
||||
u64_t* t;
|
||||
uint64_t* t;
|
||||
{
|
||||
uint32_t lo, hi;
|
||||
read_tsc (&hi, &lo);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*===============================================================*/
|
||||
int minix_sizeup(device, bytes)
|
||||
char *device;
|
||||
u64_t *bytes;
|
||||
uint64_t *bytes;
|
||||
{
|
||||
int fd;
|
||||
struct part_geom entry;
|
||||
@@ -42,9 +42,9 @@ u64_t *bytes;
|
||||
perror("sizeup ioctl");
|
||||
if(fstat(fd, &st) < 0) {
|
||||
perror("fstat");
|
||||
entry.size = ((u64_t)(0));
|
||||
entry.size = ((uint64_t)(0));
|
||||
} else {
|
||||
entry.size = ((u64_t)(st.st_size));
|
||||
entry.size = ((uint64_t)(st.st_size));
|
||||
}
|
||||
}
|
||||
close(fd);
|
||||
|
||||
@@ -55,7 +55,7 @@ ssize_t hgfs_read(
|
||||
sffs_file_t handle, /* handle to open file */
|
||||
char *buf, /* data buffer or NULL */
|
||||
size_t size, /* maximum number of bytes to read */
|
||||
u64_t off /* file offset */
|
||||
uint64_t off /* file offset */
|
||||
)
|
||||
{
|
||||
/* Read from an open file. Upon success, return the number of bytes read.
|
||||
@@ -91,7 +91,7 @@ ssize_t hgfs_write(
|
||||
sffs_file_t handle, /* handle to open file */
|
||||
char *buf, /* data buffer or NULL */
|
||||
size_t len, /* number of bytes to write */
|
||||
u64_t off /* file offset */
|
||||
uint64_t off /* file offset */
|
||||
)
|
||||
{
|
||||
/* Write to an open file. Upon success, return the number of bytes written.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/*===========================================================================*
|
||||
* hgfs_queryvol *
|
||||
*===========================================================================*/
|
||||
int hgfs_queryvol(const char *path, u64_t *free, u64_t *total)
|
||||
int hgfs_queryvol(const char *path, uint64_t *free, uint64_t *total)
|
||||
{
|
||||
/* Retrieve information about available and total volume space associated with
|
||||
* a given path.
|
||||
|
||||
@@ -36,14 +36,14 @@ int error_convert(int err);
|
||||
|
||||
/* file.c */
|
||||
int hgfs_open(const char *path, int flags, int mode, sffs_file_t *handle);
|
||||
ssize_t hgfs_read(sffs_file_t handle, char *buf, size_t size, u64_t offset);
|
||||
ssize_t hgfs_write(sffs_file_t handle, char *buf, size_t len, u64_t offset);
|
||||
ssize_t hgfs_read(sffs_file_t handle, char *buf, size_t size, uint64_t offset);
|
||||
ssize_t hgfs_write(sffs_file_t handle, char *buf, size_t len, uint64_t offset);
|
||||
int hgfs_close(sffs_file_t handle);
|
||||
size_t hgfs_readbuf(char **ptr);
|
||||
size_t hgfs_writebuf(char **ptr);
|
||||
|
||||
/* info.c */
|
||||
int hgfs_queryvol(const char *path, u64_t *free, u64_t *total);
|
||||
int hgfs_queryvol(const char *path, uint64_t *free, uint64_t *total);
|
||||
|
||||
/* link.c */
|
||||
int hgfs_mkdir(const char *path, int mode);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "inc.h"
|
||||
|
||||
static u64_t time_offset;
|
||||
static uint64_t time_offset;
|
||||
|
||||
/*===========================================================================*
|
||||
* time_init *
|
||||
@@ -18,7 +18,7 @@ void time_init(void)
|
||||
* the difference between that time and the UNIX epoch, in 100ns units.
|
||||
*/
|
||||
/* FIXME: we currently do not take into account timezones. */
|
||||
time_offset = (u64_t)116444736 * 1000000000;
|
||||
time_offset = (uint64_t)116444736 * 1000000000;
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
@@ -30,10 +30,10 @@ void time_put(struct timespec *tsp)
|
||||
* in HGFS timestamp format. If a NULL pointer is given, store a timestamp of
|
||||
* zero instead.
|
||||
*/
|
||||
u64_t hgfstime;
|
||||
uint64_t hgfstime;
|
||||
|
||||
if (tsp != NULL) {
|
||||
hgfstime = ((u64_t)tsp->tv_sec * 10000000) + (tsp->tv_nsec / 100);
|
||||
hgfstime = ((uint64_t)tsp->tv_sec * 10000000) + (tsp->tv_nsec / 100);
|
||||
hgfstime += time_offset;
|
||||
|
||||
RPC_NEXT32 = ex64lo(hgfstime);
|
||||
@@ -53,7 +53,7 @@ void time_get(struct timespec *tsp)
|
||||
* and store the result in the given time pointer. If the given pointer is
|
||||
* NULL, however, simply skip over the timestamp in the RPC buffer.
|
||||
*/
|
||||
u64_t hgfstime;
|
||||
uint64_t hgfstime;
|
||||
uint32_t time_lo, time_hi;
|
||||
|
||||
if (tsp != NULL) {
|
||||
|
||||
@@ -92,12 +92,12 @@ static int fs_bufs_heuristic(int minbufs, fsblkcnt_t btotal,
|
||||
/* remaining free memory is unused memory plus memory in used for cache,
|
||||
* as the cache can be evicted
|
||||
*/
|
||||
kbytes_remain_mem = (u64_t)(vsi.vsi_free + vsi.vsi_cached) *
|
||||
kbytes_remain_mem = (uint64_t)(vsi.vsi_free + vsi.vsi_cached) *
|
||||
vsi.vsi_pagesize / 1024;
|
||||
|
||||
/* check fs usage. */
|
||||
kbytes_used_fs = (unsigned long)(((u64_t)bused * blocksize) / 1024);
|
||||
kbytes_total_fs = (unsigned long)(((u64_t)btotal * blocksize) / 1024);
|
||||
kbytes_used_fs = (unsigned long)(((uint64_t)bused * blocksize) / 1024);
|
||||
kbytes_total_fs = (unsigned long)(((uint64_t)btotal * blocksize) / 1024);
|
||||
|
||||
/* heuristic for a desired cache size based on FS usage;
|
||||
* but never bigger than half of the total filesystem
|
||||
@@ -296,7 +296,7 @@ static struct buf *find_block(dev_t dev, block64_t block)
|
||||
* get_block_ino *
|
||||
*===========================================================================*/
|
||||
static int get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how,
|
||||
ino_t ino, u64_t ino_off, size_t block_size)
|
||||
ino_t ino, uint64_t ino_off, size_t block_size)
|
||||
{
|
||||
/* Check to see if the requested block is in the block cache. The requested
|
||||
* block is identified by the block number in 'block' on device 'dev', counted
|
||||
@@ -492,7 +492,7 @@ static int get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how,
|
||||
* lmfs_get_block_ino *
|
||||
*===========================================================================*/
|
||||
int lmfs_get_block_ino(struct buf **bpp, dev_t dev, block64_t block, int how,
|
||||
ino_t ino, u64_t ino_off)
|
||||
ino_t ino, uint64_t ino_off)
|
||||
{
|
||||
return get_block_ino(bpp, dev, block, how, ino, ino_off, fs_block_size);
|
||||
}
|
||||
@@ -652,7 +652,7 @@ void lmfs_free_block(dev_t dev, block64_t block)
|
||||
/*===========================================================================*
|
||||
* lmfs_zero_block_ino *
|
||||
*===========================================================================*/
|
||||
void lmfs_zero_block_ino(dev_t dev, ino_t ino, u64_t ino_off)
|
||||
void lmfs_zero_block_ino(dev_t dev, ino_t ino, uint64_t ino_off)
|
||||
{
|
||||
/* Files may have holes. From an application perspective, these are just file
|
||||
* regions filled with zeroes. From a file system perspective however, holes
|
||||
|
||||
@@ -20,7 +20,7 @@ int do_statvfs(struct statvfs *st)
|
||||
*/
|
||||
struct inode *ino;
|
||||
char path[PATH_MAX];
|
||||
u64_t bfree, btotal;
|
||||
uint64_t bfree, btotal;
|
||||
int r;
|
||||
|
||||
/* Unfortunately, we cannot be any more specific than this, because we are
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
#define MICROHZ 1000000ULL /* number of micros per second */
|
||||
#define MICROSPERTICK(h) (MICROHZ/(h)) /* number of micros per HZ tick */
|
||||
|
||||
static u64_t Hz;
|
||||
static uint64_t Hz;
|
||||
|
||||
int
|
||||
micro_delay(uint32_t micros)
|
||||
{
|
||||
struct minix_kerninfo *minix_kerninfo;
|
||||
u64_t start, delta, delta_end;
|
||||
uint64_t start, delta, delta_end;
|
||||
|
||||
Hz = sys_hz();
|
||||
minix_kerninfo = get_minix_kerninfo();
|
||||
@@ -48,7 +48,7 @@ micro_delay(uint32_t micros)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t frclock_64_to_micros(u64_t tsc)
|
||||
uint32_t frclock_64_to_micros(uint64_t tsc)
|
||||
{
|
||||
return (uint32_t)
|
||||
(tsc / (get_minix_kerninfo()->arm_frclock->hz / MICROHZ));
|
||||
@@ -84,14 +84,14 @@ delta_frclock(uint32_t base, uint32_t cur)
|
||||
}
|
||||
|
||||
void
|
||||
read_frclock_64(u64_t *frclk)
|
||||
read_frclock_64(uint64_t *frclk)
|
||||
{
|
||||
read_frclock((uint32_t *) frclk);
|
||||
}
|
||||
|
||||
u64_t
|
||||
delta_frclock_64(u64_t base, u64_t cur)
|
||||
uint64_t
|
||||
delta_frclock_64(uint64_t base, uint64_t cur)
|
||||
{
|
||||
return (u64_t) delta_frclock((uint32_t) base, (uint32_t) cur);
|
||||
return (uint64_t) delta_frclock((uint32_t) base, (uint32_t) cur);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ int spin_check(spin_t *s)
|
||||
* implementation assumes that it is okay to spin a little bit too long
|
||||
* (up to a full clock tick extra).
|
||||
*/
|
||||
u64_t cur_tsc, tsc_delta;
|
||||
uint64_t cur_tsc, tsc_delta;
|
||||
clock_t now, micro_delta;
|
||||
|
||||
switch (s->s_state) {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
static uint32_t calib_hz = 600000000;
|
||||
|
||||
uint32_t tsc_64_to_micros(u64_t tsc)
|
||||
uint32_t tsc_64_to_micros(uint64_t tsc)
|
||||
{
|
||||
u64_t tmp;
|
||||
uint64_t tmp;
|
||||
|
||||
tmp = tsc / calib_hz;
|
||||
return (uint32_t) tmp;
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
#include <minix/syslib.h>
|
||||
#include <minix/minlib.h>
|
||||
|
||||
static u64_t start, idle;
|
||||
static uint64_t start, idle;
|
||||
static int running = 0;
|
||||
|
||||
static double make_double(u64_t d)
|
||||
static double make_double(uint64_t d)
|
||||
{
|
||||
/* Convert a 64-bit fixed point value into a double.
|
||||
* This whole thing should be replaced by something better eventually.
|
||||
@@ -44,8 +44,8 @@ static double make_double(u64_t d)
|
||||
|
||||
double getidle(void)
|
||||
{
|
||||
u64_t stop, idle2;
|
||||
u64_t idelta, tdelta;
|
||||
uint64_t stop, idle2;
|
||||
uint64_t idelta, tdelta;
|
||||
double ifp, tfp, rfp;
|
||||
int r;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ int spin_check(spin_t *s)
|
||||
* implementation assumes that it is okay to spin a little bit too long
|
||||
* (up to a full clock tick extra).
|
||||
*/
|
||||
u64_t cur_tsc, tsc_delta;
|
||||
uint64_t cur_tsc, tsc_delta;
|
||||
clock_t now, micro_delta;
|
||||
|
||||
switch (s->s_state) {
|
||||
|
||||
@@ -55,7 +55,7 @@ tsc_calibrate(void)
|
||||
int
|
||||
micro_delay(uint32_t micros)
|
||||
{
|
||||
u64_t now, end;
|
||||
uint64_t now, end;
|
||||
|
||||
/* Start of delay. */
|
||||
read_tsc_64(&now);
|
||||
@@ -63,7 +63,7 @@ micro_delay(uint32_t micros)
|
||||
CALIBRATE;
|
||||
|
||||
/* We have to know when to end the delay. */
|
||||
end = now + ((u64_t)micros * calib_mhz);
|
||||
end = now + ((uint64_t)micros * calib_mhz);
|
||||
|
||||
/* If we have to wait for at least one HZ tick, use the regular
|
||||
* tickdelay first. Round downwards on purpose, so the average
|
||||
@@ -81,9 +81,9 @@ micro_delay(uint32_t micros)
|
||||
return OK;
|
||||
}
|
||||
|
||||
uint32_t tsc_64_to_micros(u64_t tsc)
|
||||
uint32_t tsc_64_to_micros(uint64_t tsc)
|
||||
{
|
||||
u64_t tmp;
|
||||
uint64_t tmp;
|
||||
|
||||
CALIBRATE;
|
||||
|
||||
@@ -111,7 +111,7 @@ uint32_t tsc_get_khz(void)
|
||||
#define frclock_64_to_micros tsc_64_to_micros
|
||||
#define read_frclock_64 read_tsc_64
|
||||
|
||||
u64_t delta_frclock_64(u64_t base, u64_t cur)
|
||||
uint64_t delta_frclock_64(uint64_t base, uint64_t cur)
|
||||
{
|
||||
return cur - base;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ void vbox_set_u32(vbox_param_t *param, uint32_t value)
|
||||
param->u32 = value;
|
||||
}
|
||||
|
||||
void vbox_set_u64(vbox_param_t *param, u64_t value)
|
||||
void vbox_set_u64(vbox_param_t *param, uint64_t value)
|
||||
{
|
||||
/* Set the given parameter to a 32-bit value.
|
||||
*/
|
||||
@@ -246,7 +246,7 @@ uint32_t vbox_get_u32(vbox_param_t *param)
|
||||
return param->u32;
|
||||
}
|
||||
|
||||
u64_t vbox_get_u64(vbox_param_t *param)
|
||||
uint64_t vbox_get_u64(vbox_param_t *param)
|
||||
{
|
||||
/* Retrieve the 64-bit value from the given parameter.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user