Re: [PATCH 2/3] sparc/iommu: use BITS_TO_LONGS() to calculate bitmap size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

I understand that you're not going to fix a non-bug like this, but:

On Sun, Mar 24, 2013 at 7:55 PM, Akinobu Mita <akinobu.mita@xxxxxxxxx> wrote:
> The size of bitmaps which is accessed by bitops must be a multiple of
> the sizeof(long).  So it would be better to use BITS_TO_LONGS() to
> calculate the bitmap size although IOMMU_NPTES is a multiple of
> BITS_PER_LONG.
>
> This also fixes typo in the comment for IOMMU_NPTES.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: sparclinux@xxxxxxxxxxxxxxx
> ---
>  arch/sparc/mm/iommu.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
> index 0f4f719..f9027fd 100644
> --- a/arch/sparc/mm/iommu.c
> +++ b/arch/sparc/mm/iommu.c
> @@ -34,7 +34,7 @@
>  #define IOMMU_RNGE     IOMMU_RNGE_256MB
>  #define IOMMU_START    0xF0000000
>  #define IOMMU_WINSIZE  (256*1024*1024U)
> -#define IOMMU_NPTES    (IOMMU_WINSIZE/PAGE_SIZE)       /* 64K PTEs, 265KB */
> +#define IOMMU_NPTES    (IOMMU_WINSIZE/PAGE_SIZE)       /* 64K PTEs, 256KB */

Is this change worthwhile?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux