diff options
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 82d2410f4205..17e0f77c7dad 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c | |||
@@ -584,18 +584,18 @@ static void __init free_event_buffer(struct amd_iommu *iommu) | |||
584 | /* sets a specific bit in the device table entry. */ | 584 | /* sets a specific bit in the device table entry. */ |
585 | static void set_dev_entry_bit(u16 devid, u8 bit) | 585 | static void set_dev_entry_bit(u16 devid, u8 bit) |
586 | { | 586 | { |
587 | int i = (bit >> 5) & 0x07; | 587 | int i = (bit >> 6) & 0x03; |
588 | int _bit = bit & 0x1f; | 588 | int _bit = bit & 0x3f; |
589 | 589 | ||
590 | amd_iommu_dev_table[devid].data[i] |= (1 << _bit); | 590 | amd_iommu_dev_table[devid].data[i] |= (1UL << _bit); |
591 | } | 591 | } |
592 | 592 | ||
593 | static int get_dev_entry_bit(u16 devid, u8 bit) | 593 | static int get_dev_entry_bit(u16 devid, u8 bit) |
594 | { | 594 | { |
595 | int i = (bit >> 5) & 0x07; | 595 | int i = (bit >> 6) & 0x03; |
596 | int _bit = bit & 0x1f; | 596 | int _bit = bit & 0x3f; |
597 | 597 | ||
598 | return (amd_iommu_dev_table[devid].data[i] & (1 << _bit)) >> _bit; | 598 | return (amd_iommu_dev_table[devid].data[i] & (1UL << _bit)) >> _bit; |
599 | } | 599 | } |
600 | 600 | ||
601 | 601 | ||