Skip to content

Commit 59e500a

Browse files
authored
Merge pull request #85 from PaulSelles/devel
Fixed misaligned MMIO data member for ARM64 support
2 parents 32953b3 + 1fb4444 commit 59e500a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

linux/switchtec.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ struct ntb_info_regs {
301301
u8 partition_count;
302302
u8 partition_id;
303303
u16 reserved1;
304-
u64 ep_map;
304+
u32 ep_map_low;
305+
u32 ep_map_high;
305306
u16 requester_id;
306307
u16 reserved2;
307308
u32 reserved3[4];

ntb_hw_switchtec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,9 @@ static int switchtec_ntb_init_sndev(struct switchtec_ntb *sndev)
904904
tpart_vec <<= 32;
905905
tpart_vec |= ioread32(&sndev->mmio_ntb->ntp_info[self].target_part_low);
906906

907-
part_map = ioread64(&sndev->mmio_ntb->ep_map);
907+
part_map = ioread32(&sndev->mmio_ntb->ep_map_high);
908+
part_map <<= 32;
909+
part_map |= ioread32(&sndev->mmio_ntb->ep_map_low);
908910
tpart_vec &= part_map;
909911
part_map &= ~(1 << sndev->self_partition);
910912

0 commit comments

Comments
 (0)