Skip to content

Commit

Permalink
Merge pull request #85 from PaulSelles/devel
Browse files Browse the repository at this point in the history
Fixed misaligned MMIO data member for ARM64 support
  • Loading branch information
kelvin-cao authored Jul 27, 2020
2 parents 32953b3 + 1fb4444 commit 59e500a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion linux/switchtec.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ struct ntb_info_regs {
u8 partition_count;
u8 partition_id;
u16 reserved1;
u64 ep_map;
u32 ep_map_low;
u32 ep_map_high;
u16 requester_id;
u16 reserved2;
u32 reserved3[4];
Expand Down
4 changes: 3 additions & 1 deletion ntb_hw_switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,9 @@ static int switchtec_ntb_init_sndev(struct switchtec_ntb *sndev)
tpart_vec <<= 32;
tpart_vec |= ioread32(&sndev->mmio_ntb->ntp_info[self].target_part_low);

part_map = ioread64(&sndev->mmio_ntb->ep_map);
part_map = ioread32(&sndev->mmio_ntb->ep_map_high);
part_map <<= 32;
part_map |= ioread32(&sndev->mmio_ntb->ep_map_low);
tpart_vec &= part_map;
part_map &= ~(1 << sndev->self_partition);

Expand Down

0 comments on commit 59e500a

Please sign in to comment.