[Devel] Re: [RFC PATCH 2/4] ACPI/IORT: Add support for RMR node parsing

Shameerali Kolothum Thodi shameerali.kolothum.thodi at huawei.com
Thu Nov 19 07:07:07 EST 2020



> -----Original Message-----
> From: Sami Mujawar [mailto:Sami.Mujawar at arm.com]
> Sent: 09 November 2020 12:30
> To: david.e.box at linux.intel.com; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi at huawei.com>;
> linux-arm-kernel at lists.infradead.org; linux-acpi at vger.kernel.org;
> iommu at lists.linux-foundation.org; devel at acpica.org
> Cc: Linuxarm <linuxarm at huawei.com>; Lorenzo Pieralisi
> <Lorenzo.Pieralisi at arm.com>; joro at 8bytes.org; Robin Murphy
> <Robin.Murphy at arm.com>; wanghuiqiang <wanghuiqiang at huawei.com>;
> Jonathan Cameron <jonathan.cameron at huawei.com>; nd <nd at arm.com>
> Subject: RE: [Devel] Re: [RFC PATCH 2/4] ACPI/IORT: Add support for RMR node
> parsing
> 
> Hi,
> 
> -----Original Message-----
> From: David E. Box <david.e.box at linux.intel.com>
> Sent: 28 October 2020 06:44 PM
> To: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>;
> linux-arm-kernel at lists.infradead.org; linux-acpi at vger.kernel.org;
> iommu at lists.linux-foundation.org; devel at acpica.org
> Cc: linuxarm at huawei.com; Lorenzo Pieralisi <Lorenzo.Pieralisi at arm.com>;
> joro at 8bytes.org; Robin Murphy <Robin.Murphy at arm.com>;
> wanghuiqiang at huawei.com; jonathan.cameron at huawei.com
> Subject: [Devel] Re: [RFC PATCH 2/4] ACPI/IORT: Add support for RMR node
> parsing
> 
> Hi,
> 
> On Tue, 2020-10-27 at 11:26 +0000, Shameer Kolothum wrote:
> 
> ...
> 
> > @@ -1647,6 +1667,100 @@ static void __init iort_enable_acs(struct
> > acpi_iort_node *iort_node)
> >  #else
> >  static inline void iort_enable_acs(struct acpi_iort_node *iort_node)
> > { }
> >  #endif
> > +static int iort_rmr_desc_valid(struct acpi_iort_rmr_desc *desc)
> > +{
> > +	struct iort_rmr_entry *e;
> > +	u64 end, start = desc->base_address, length = desc->length;
> > +
> > +	if ((!IS_ALIGNED(start, SZ_64K)) || (length % SZ_64K != 0))
> 
> You could just do:
> 
> if ((!IS_ALIGNED(start, SZ_64K)) || (length % SZ_64K))
> 
> [SAMI] In my opinion, the following may be better:
> 	if (!IS_ALIGNED(start, SZ_64K) || !IS_ALIGNED(length, SZ_64K))
> [/SAMI]

Thanks for your suggestions. I don't have a strong opinion on either
of those, but will change it with the latter one for now.

Thanks,
Shameer

> Regards,
> 
> Sami Mujawar
> 
> David
> _______________________________________________
> Devel mailing list -- devel at acpica.org
> To unsubscribe send an email to devel-leave at acpica.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s



More information about the linux-arm-kernel mailing list