From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web12.3848.1585825065716194318 for ; Thu, 02 Apr 2020 03:57:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=SN/Nixxr; spf=pass (domain: nuviainc.com, ip: 209.85.221.67, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f67.google.com with SMTP id p10so3635531wrt.6 for ; Thu, 02 Apr 2020 03:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=AjNr+13N0VJCnqpHz6UHD5x8HbbIazMBCgTg6o7N+G4=; b=SN/Nixxr8nmo6MkyTl2XhD9mD56zsObID9LW0lBvTOHUwNYIBDK6Y4Xrvvc8cSobIl CCwTvuLBkk7j79wHDnrYz0pJ8/Q2okLCcTZMkmOgBb/wBHrOYSKDji6c0AvYl+cMhwJ9 FmjSmh+6iwopRykNNEGpY2ZgsG+5BnLv66WvV+AH+PKKhEkl4CtaSLGR1LgVUwEUSvJP 68z6v7b90e5BKr4On/mXCd3np7FfJLmx07DdieGMTEqvu4C8CBAECx0iKlDoNCfNTdC9 Gn6PzL5bp+cqISCCIRHv4Q2fHsR8YwVbsA/JTjzgSJezBCpcDjuXNnkpqB00A4V9tJg5 Lpag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=AjNr+13N0VJCnqpHz6UHD5x8HbbIazMBCgTg6o7N+G4=; b=VWJAibFF2idWqm+9JeXsg3orV+asJ2TQ7B/C3DUCvs5tM+5pShWR7Xak6F6DKcM8Df UvOI5nlXtPQ4tDD+7okSclZrqCpop5yi1x9sm1wKjzN/GrI3ppMRWZkprkBUjgMo5ZIV RHxjOv9+88ITjSlsyJPBQBuJKBbn45XStAyTtkpxwg7Cm0yy8UfqAasHR/CFH1zUcthn 7qGbZWBCsBPuNMXjDz6unjUspfRl0pwBuzDcA2XIGNsmkqJekMR7tB1IMbQICznfg52S 1FxQI09ucE4Fi0FsA92HOQCuvvagV6InK1KGMy+g/L5BviK2LUhBxzEXuNPRrkuSIR7I o1yg== X-Gm-Message-State: AGi0Puan1lCFsVlZkbxaiY3i2kCE5q8IQZjRkvmUGtaF2lDotXgvDo6M hDx1g/Ixd8thIREHHRr+WsuyMA== X-Google-Smtp-Source: APiQypJF3JdpN/tKgIYxS5o1jALaBJ5tzsAcyGyyDs1Wkfk4lV7oVB8Kn/m4ChdvtKAsaWthmPgc2A== X-Received: by 2002:a5d:6588:: with SMTP id q8mr64593wru.189.1585825064238; Thu, 02 Apr 2020 03:57:44 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id c85sm6670848wmd.48.2020.04.02.03.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 03:57:43 -0700 (PDT) Date: Thu, 2 Apr 2020 11:57:40 +0100 From: "Leif Lindholm" To: Ard Biesheuvel Cc: devel@edk2.groups.io, Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH 5/5] ArmPkg/ArmMmuLib: drop unused TT_ATTR_INDX_INVALID CPP symbol Message-ID: <20200402105740.GO7468@vanye> References: <20200328104321.8668-1-ard.biesheuvel@linaro.org> <20200328104321.8668-6-ard.biesheuvel@linaro.org> <20200402102308.GM7468@vanye> <24502c11-cab8-f00b-6c3f-e4705f315aea@arm.com> MIME-Version: 1.0 In-Reply-To: <24502c11-cab8-f00b-6c3f-e4705f315aea@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Apr 02, 2020 at 12:29:40 +0200, Ard Biesheuvel wrote: > On 4/2/20 12:23 PM, Leif Lindholm via groups.io wrote: > > On Sat, Mar 28, 2020 at 11:43:21 +0100, Ard Biesheuvel wrote: > > > TT_ATTR_INDX_INVALID is #define'd but never used so drop it. > > > > > > Signed-off-by: Ard Biesheuvel > > > --- > > > ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 3 --- > > > 1 file changed, 3 deletions(-) > > > > > > diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c > > > index a82596d290f1..222ff817956f 100644 > > > --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c > > > +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c > > > @@ -19,9 +19,6 @@ > > > #include > > > #include > > > -// We use this index definition to define an invalid block entry > > > -#define TT_ATTR_INDX_INVALID ((UINT32)~0) > > > - > > > > Since this is separately defined also in > > ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c (£"$%^£"$?!?!?) > > could this patch be tweaked to instead "consolidate" the definitions > > to a central location, like ArmPkg/Include/Chipset/AArch64Mmu.h where > > all of the other TT_ATTR_INDX_ definitions live? > > > > That would imply that this value is somehow architected, which it is not. > > ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c is the only remaining user of this > constant, and it only has meaning within the context of the routines > therein. Hmm, ok. So all of those definitions should really move *out* of ArmPkg/Include/Chipset/AArch64Mmu.h? No, they can't, because some of the others are used in ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c So I'm still feeling that #defines using the same namespace should live together in order to reduce risk of future screwups. So, unrelated to this patch (Reviewed-by: Leif Lindholm ) should the remaining TT_ATTR_INDX_INVALID be renamed, or should it be moved to ArmPkg/Include/Chipset/AArch64Mmu.h? / Leif