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

Re: [PATCH 3/4] ARM/vgic: Use for_each_set_bit() in gic_find_unused_lr()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 3 Sep 2024 10:46:39 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NJW7NQ4rxlQxihJD9aFpog0dDaOFXGBU6S8kkRgBgxE=; b=dYOyUHQupHRyAOeVjEVmTxGTLRDdxj/7XLPi4uq12M1tjJ7hOhpUuxWflaZ/B3vgtntbX4T6vn637GB9p99AxXoYlgp29WjDx8TuRrtaMjgluOpVEPZvyOoIjZ+11jBXMk4IZL3DBo1nvYgQ73fVb8+o0D1vPmAq8Gd5PHMLG49iFGFqyaQI8ntuKaflAs6LM1Zz1Uyg9/WZzwKoSsEmXztDf8/Imhp2Gs+1S09PKimig4adaIqGrG/xW9TC70GfQILwE30thoc3EgWizmnH4YngWh8o3FviVUNWUbAYjuen0ZUs1t/6YlVNjN4t80IjPEi2jGdahYAyPrn3KGLPfA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cvGG4c21856N2+zP4Keb7Xu/y64c8GXQiUmn9JbrRupbBZNIXHcFKckg7ZevrNSFAUrbzqTuZcakNp64lmMPmuOAty1M8Rm3sxTba2J1hdskvQxUkbIlkoRM+GkiPSpYK2RgnIy7RVbbH6x6ESilBb4zBmbgfKHOStimIXHhOEbtQAImuM9uR7voEygLf9YDSMUeSJvWk7dpW1Nxu2ALmDWzkx2x/eizYhGdmxymGUXOG5IEwGanYOQTZgixJc73tjprHWoFA/9X/gELj9xGi11500r+iwwRQQDUFLAEee067FYXqU4S2VqJVMARkE1Z0y3oEggWQxMuQzyENZmxBw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>
  • Delivery-date: Tue, 03 Sep 2024 08:46:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 02/09/2024 12:03, Andrew Cooper wrote:
> 
> 
> There are no bits set in lr_mask beyond nr_lrs, so when substituting
> bitmap_for_each() for for_each_set_bit(), we don't need to worry about the
> upper bound.
> 
> However, the type of lr_mask does matter, so switch it to be uint64_t * and
> move unsigned long * override until the find_next_zero_bit() call.
> 
> Move lr_val into a narrower scope and drop used_lr as it's declared by
> for_each_set_bit() itself.
> 
> Drop the nr_lrs variable and use gic_get_nr_lrs() in the one location its now
> used.  It hides a triple pointer defererence, and while it may not be needed
s/defererence/dereference

> in the PRISTINE case, it certainly doesn't need to be live across the rest of
> the function.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.