s390-ccw: Getting rid of ulong
Any good reason why this still exist? I can understand u* and __u* to be linux kernel like, but ulong? Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <20230629104821.194859-2-thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
0eb8f90ede
commit
f7f2f96f33
@ -38,7 +38,7 @@ static inline void yield(void)
|
|||||||
|
|
||||||
static inline void sleep(unsigned int seconds)
|
static inline void sleep(unsigned int seconds)
|
||||||
{
|
{
|
||||||
ulong target = get_time_seconds() + seconds;
|
unsigned long target = get_time_seconds() + seconds;
|
||||||
|
|
||||||
while (get_time_seconds() < target) {
|
while (get_time_seconds() < target) {
|
||||||
yield();
|
yield();
|
||||||
|
@ -17,7 +17,6 @@ typedef unsigned char u8;
|
|||||||
typedef unsigned short u16;
|
typedef unsigned short u16;
|
||||||
typedef unsigned int u32;
|
typedef unsigned int u32;
|
||||||
typedef unsigned long long u64;
|
typedef unsigned long long u64;
|
||||||
typedef unsigned long ulong;
|
|
||||||
typedef unsigned char __u8;
|
typedef unsigned char __u8;
|
||||||
typedef unsigned short __u16;
|
typedef unsigned short __u16;
|
||||||
typedef unsigned int __u32;
|
typedef unsigned int __u32;
|
||||||
@ -67,11 +66,11 @@ void sclp_get_loadparm_ascii(char *loadparm);
|
|||||||
int sclp_read(char *str, size_t count);
|
int sclp_read(char *str, size_t count);
|
||||||
|
|
||||||
/* virtio.c */
|
/* virtio.c */
|
||||||
unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
|
unsigned long virtio_load_direct(unsigned long rec_list1, unsigned long rec_list2,
|
||||||
ulong subchan_id, void *load_addr);
|
unsigned long subchan_id, void *load_addr);
|
||||||
bool virtio_is_supported(SubChannelId schid);
|
bool virtio_is_supported(SubChannelId schid);
|
||||||
int virtio_blk_setup_device(SubChannelId schid);
|
int virtio_blk_setup_device(SubChannelId schid);
|
||||||
int virtio_read(ulong sector, void *load_addr);
|
int virtio_read(unsigned long sector, void *load_addr);
|
||||||
|
|
||||||
/* bootmap.c */
|
/* bootmap.c */
|
||||||
void zipl_load(void);
|
void zipl_load(void);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#define VIRTIO_BLK_F_GEOMETRY (1 << 4)
|
#define VIRTIO_BLK_F_GEOMETRY (1 << 4)
|
||||||
#define VIRTIO_BLK_F_BLK_SIZE (1 << 6)
|
#define VIRTIO_BLK_F_BLK_SIZE (1 << 6)
|
||||||
|
|
||||||
static int virtio_blk_read_many(VDev *vdev, ulong sector, void *load_addr,
|
static int virtio_blk_read_many(VDev *vdev, unsigned long sector, void *load_addr,
|
||||||
int sec_num)
|
int sec_num)
|
||||||
{
|
{
|
||||||
VirtioBlkOuthdr out_hdr;
|
VirtioBlkOuthdr out_hdr;
|
||||||
@ -49,7 +49,7 @@ static int virtio_blk_read_many(VDev *vdev, ulong sector, void *load_addr,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virtio_read_many(ulong sector, void *load_addr, int sec_num)
|
int virtio_read_many(unsigned long sector, void *load_addr, int sec_num)
|
||||||
{
|
{
|
||||||
VDev *vdev = virtio_get_device();
|
VDev *vdev = virtio_get_device();
|
||||||
|
|
||||||
@ -63,14 +63,14 @@ int virtio_read_many(ulong sector, void *load_addr, int sec_num)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
|
unsigned long virtio_load_direct(unsigned long rec_list1, unsigned long rec_list2,
|
||||||
ulong subchan_id, void *load_addr)
|
unsigned long subchan_id, void *load_addr)
|
||||||
{
|
{
|
||||||
u8 status;
|
u8 status;
|
||||||
int sec = rec_list1;
|
int sec = rec_list1;
|
||||||
int sec_num = ((rec_list2 >> 32) & 0xffff) + 1;
|
int sec_num = ((rec_list2 >> 32) & 0xffff) + 1;
|
||||||
int sec_len = rec_list2 >> 48;
|
int sec_len = rec_list2 >> 48;
|
||||||
ulong addr = (ulong)load_addr;
|
unsigned long addr = (unsigned long)load_addr;
|
||||||
|
|
||||||
if (sec_len != virtio_get_block_size()) {
|
if (sec_len != virtio_get_block_size()) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -86,7 +86,7 @@ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
|
|||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virtio_read(ulong sector, void *load_addr)
|
int virtio_read(unsigned long sector, void *load_addr)
|
||||||
{
|
{
|
||||||
return virtio_read_many(sector, load_addr, 1);
|
return virtio_read_many(sector, load_addr, 1);
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ static bool scsi_report_luns(VDev *vdev, void *data, uint32_t data_size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool scsi_read_10(VDev *vdev,
|
static bool scsi_read_10(VDev *vdev,
|
||||||
ulong sector, int sectors, void *data,
|
unsigned long sector, int sectors, void *data,
|
||||||
unsigned int data_size)
|
unsigned int data_size)
|
||||||
{
|
{
|
||||||
ScsiCdbRead10 cdb = {
|
ScsiCdbRead10 cdb = {
|
||||||
@ -269,7 +269,7 @@ static int virtio_scsi_locate_device(VDev *vdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int virtio_scsi_read_many(VDev *vdev,
|
int virtio_scsi_read_many(VDev *vdev,
|
||||||
ulong sector, void *load_addr, int sec_num)
|
unsigned long sector, void *load_addr, int sec_num)
|
||||||
{
|
{
|
||||||
int sector_count;
|
int sector_count;
|
||||||
int f = vdev->blk_factor;
|
int f = vdev->blk_factor;
|
||||||
|
@ -68,7 +68,7 @@ static inline bool virtio_scsi_response_ok(const VirtioScsiCmdResp *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int virtio_scsi_read_many(VDev *vdev,
|
int virtio_scsi_read_many(VDev *vdev,
|
||||||
ulong sector, void *load_addr, int sec_num);
|
unsigned long sector, void *load_addr, int sec_num);
|
||||||
int virtio_scsi_setup_device(SubChannelId schid);
|
int virtio_scsi_setup_device(SubChannelId schid);
|
||||||
|
|
||||||
#endif /* VIRTIO_SCSI_H */
|
#endif /* VIRTIO_SCSI_H */
|
||||||
|
@ -48,10 +48,10 @@ VirtioDevType virtio_get_device_type(void)
|
|||||||
static long kvm_hypercall(unsigned long nr, unsigned long param1,
|
static long kvm_hypercall(unsigned long nr, unsigned long param1,
|
||||||
unsigned long param2, unsigned long param3)
|
unsigned long param2, unsigned long param3)
|
||||||
{
|
{
|
||||||
register ulong r_nr asm("1") = nr;
|
register unsigned long r_nr asm("1") = nr;
|
||||||
register ulong r_param1 asm("2") = param1;
|
register unsigned long r_param1 asm("2") = param1;
|
||||||
register ulong r_param2 asm("3") = param2;
|
register unsigned long r_param2 asm("3") = param2;
|
||||||
register ulong r_param3 asm("4") = param3;
|
register unsigned long r_param3 asm("4") = param3;
|
||||||
register long retval asm("2");
|
register long retval asm("2");
|
||||||
|
|
||||||
asm volatile ("diag %%r2,%%r4,0x500"
|
asm volatile ("diag %%r2,%%r4,0x500"
|
||||||
@ -145,7 +145,7 @@ void vring_send_buf(VRing *vr, void *p, int len, int flags)
|
|||||||
vr->avail->ring[vr->avail->idx % vr->num] = vr->next_idx;
|
vr->avail->ring[vr->avail->idx % vr->num] = vr->next_idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
vr->desc[vr->next_idx].addr = (ulong)p;
|
vr->desc[vr->next_idx].addr = (unsigned long)p;
|
||||||
vr->desc[vr->next_idx].len = len;
|
vr->desc[vr->next_idx].len = len;
|
||||||
vr->desc[vr->next_idx].flags = flags & ~VRING_HIDDEN_IS_CHAIN;
|
vr->desc[vr->next_idx].flags = flags & ~VRING_HIDDEN_IS_CHAIN;
|
||||||
vr->desc[vr->next_idx].next = vr->next_idx;
|
vr->desc[vr->next_idx].next = vr->next_idx;
|
||||||
@ -182,7 +182,7 @@ int vr_poll(VRing *vr)
|
|||||||
*/
|
*/
|
||||||
int vring_wait_reply(void)
|
int vring_wait_reply(void)
|
||||||
{
|
{
|
||||||
ulong target_second = get_time_seconds() + vdev.wait_reply_timeout;
|
unsigned long target_second = get_time_seconds() + vdev.wait_reply_timeout;
|
||||||
|
|
||||||
/* Wait for any queue to be updated by the host */
|
/* Wait for any queue to be updated by the host */
|
||||||
do {
|
do {
|
||||||
|
@ -190,14 +190,14 @@ int virtio_get_block_size(void);
|
|||||||
uint8_t virtio_get_heads(void);
|
uint8_t virtio_get_heads(void);
|
||||||
uint8_t virtio_get_sectors(void);
|
uint8_t virtio_get_sectors(void);
|
||||||
uint64_t virtio_get_blocks(void);
|
uint64_t virtio_get_blocks(void);
|
||||||
int virtio_read_many(ulong sector, void *load_addr, int sec_num);
|
int virtio_read_many(unsigned long sector, void *load_addr, int sec_num);
|
||||||
|
|
||||||
#define VIRTIO_SECTOR_SIZE 512
|
#define VIRTIO_SECTOR_SIZE 512
|
||||||
#define VIRTIO_ISO_BLOCK_SIZE 2048
|
#define VIRTIO_ISO_BLOCK_SIZE 2048
|
||||||
#define VIRTIO_SCSI_BLOCK_SIZE 512
|
#define VIRTIO_SCSI_BLOCK_SIZE 512
|
||||||
#define VIRTIO_DASD_DEFAULT_BLOCK_SIZE 4096
|
#define VIRTIO_DASD_DEFAULT_BLOCK_SIZE 4096
|
||||||
|
|
||||||
static inline ulong virtio_sector_adjust(ulong sector)
|
static inline unsigned long virtio_sector_adjust(unsigned long sector)
|
||||||
{
|
{
|
||||||
return sector * (virtio_get_block_size() / VIRTIO_SECTOR_SIZE);
|
return sector * (virtio_get_block_size() / VIRTIO_SECTOR_SIZE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user