From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 494F420945528 for ; Thu, 8 Jun 2017 03:10:42 -0700 (PDT) Received: by mail-io0-x229.google.com with SMTP id y77so18043542ioe.3 for ; Thu, 08 Jun 2017 03:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FMoOZZgMp5V56J8fvUC9FGjy+dJoM5XXO7MtwMuSRmI=; b=LnwbUzwiqyR+Tj5W5GrtoOjRF6plKmNMTze6LAq+AdyCzbt4FMzXTDdzjeYO7ExX0+ fbS+Q9D4DjXSJlnAP0gVbGuUkIwiMuT/XIZFvNFPYz3hIz8m/TsaSp/SOjDFyEdVzO/s fMDwjePcNYLmIHWpNphhAvkjNEbgzw2oMHtSw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FMoOZZgMp5V56J8fvUC9FGjy+dJoM5XXO7MtwMuSRmI=; b=EWWiCkWjo1+P7D0tVlbiWEMDm9xdDuyEbBJTME3cvfGLPg2r9QtPwWf+bIHrTBFfnE zZB4gAmDpfR1iAgRBzIo2RYGQvXPeAqq7trB+5oqIQYo5kfH1/QetyTNImGX69JVAppv fDm7vnpcaITHCzIiC3jFKN6o3v2EfI1qdyEbDHZWKHfJyu5kz0YVnHnMl7jrGoruzm7f eQZuyyB5VTM2ApWiZFD9VAJzU+tkDzbjPL6jZRDEMFIFy6Uh3BzOpOSeon+/lDbg6YdV ZdFdPQeebUxI2kg7Kd6GYaICI8VQMQY+/OQvW3ba2i8i0Nt/jZ/GB0WAw332ylZ1PIDs rm0Q== X-Gm-Message-State: AODbwcDNWVuxPEe3g6dICaHKKL8yiwrf428MCAl19lNrHOexChV16Nwk 2Forhyealen5vZXHIohRFVukWtTHFrGo X-Received: by 10.107.180.20 with SMTP id d20mr7616703iof.47.1496916709880; Thu, 08 Jun 2017 03:11:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.76 with HTTP; Thu, 8 Jun 2017 03:11:49 -0700 (PDT) In-Reply-To: References: <20170603154203.29907-1-lersek@redhat.com> <20170603154203.29907-2-lersek@redhat.com> <149668486395.8581.9154897144168590783@jljusten-skl> <5e0277a2-0bf4-e8a1-f61f-77cdb896da06@redhat.com> From: Ard Biesheuvel Date: Thu, 8 Jun 2017 10:11:49 +0000 Message-ID: To: Laszlo Ersek Cc: Jordan Justen , edk2-devel-01 Subject: Re: [PATCH 1/1] OvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit space unless restricted X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 10:10:42 -0000 Content-Type: text/plain; charset="UTF-8" On 7 June 2017 at 23:10, Laszlo Ersek wrote: > On 06/06/17 20:16, Laszlo Ersek wrote: >> On 06/05/17 19:47, Jordan Justen wrote: >>> On 2017-06-03 08:42:03, Laszlo Ersek wrote: >>>> ... by narrower than 8-byte ADD_POINTER references. >>>> >>>> Introduce the CollectRestrictedAllocations() function, which iterates over >>> >>> How about Collect32BitRestrictedAllocations and similar treatment for >>> other names that just say 'restricted'? >> >> Something like this crossed my mind, but I didn't know how to prefix the >> simple variable / parameter names "RestrictedAllocations" with "32Bit", >> as the identifiers cannot start with a digit. >> >> I even thought of spelling it out, as in >> "ThirtyTwoBitRestrictedAllocations", but that seemed ridiculous. >> >> Prefixing "32Bit" with an underscore, _32Bit, looks ugly, plus the C >> standard actually reserves it: >> >> All identifiers that begin with an underscore are always reserved >> for use as identifiers with file scope in both the ordinary and tag >> name spaces. >> >> While I'd only use this variable name as function parameter / local >> variable, and thereby I'd shadow any such impl. defined global variable >> ("identifiers with file scope"), the shadowing would trigger a compiler >> warning for sure, and break the build. >> >> What do you suggest? > > Ultimately I went with > > s/RestrictedAllocations/AllocationsRestrictedTo32Bit/ > > in the patch body and in the commit message too. Cleaned up the line > lengths and such as well, plus retested the patch. > > Commit 4275f38507a4. > Hi Laszlo, Thanks again for the effort. Sadly, though, this patch is breaking my CI build: OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c: In function 'InstallQemuFwCfgTables': OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c:357:29: error: 'AllocationsRestrictedTo32Bit' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (OrderedCollectionFind ( ^ OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c:975:23: note: 'AllocationsRestrictedTo32Bit' was declared here ORDERED_COLLECTION *AllocationsRestrictedTo32Bit; ^