From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::244; helo=mail-io0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (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 C7E4C21B00DC1 for ; Fri, 17 Nov 2017 01:57:06 -0800 (PST) Received: by mail-io0-x244.google.com with SMTP id t11so8181861iof.13 for ; Fri, 17 Nov 2017 02:01:16 -0800 (PST) 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=rhkR90Ncy4KiMMTIvWVk5edJSQHtzCfa6sazGEN3fDU=; b=V5Q4HKzNMKdx+MHcbngQWfXwQcPOhey5ETP0baHG9JqK24D1kjmjvBhcMCItrN9kvi fycE1pbJuQPZU1TVpjDcae8Vk2jU1WCAh7xVNg3gfSUShLrAw8Xy4takCaJSnh5uTZWD Tz3tdjYdkvjHFxWP/sxc1WasSvlqyhgRFErUk= 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=rhkR90Ncy4KiMMTIvWVk5edJSQHtzCfa6sazGEN3fDU=; b=cnnMJgdMWNtvjBplSX0nl18O5r/b1fd0VX4mzeXe53G9HlozizuP1aYR8Olr/HwLRW s0OtGfRKO2I6uqUQMHyLrdM31lVZEsE2Nu8o/QGPUMYgc0CfZCRkaghjBbippwF7x7Ii 7FdR7HTW1hdGmL0l1xEo6oSGXSNHQXZOcHDpGWwiCZsCy81+IbDhFfPTWwXj4z9H62q/ JCmkL9ahRGgyTN9duMY9ycL/MzmzSelyCIsDqwBw1yFQl+dQGpEr3zoeXclTi8SY2ox7 0/2PdeEGJjUmyklnsaZujWWwEWAe/WyLpPke2qWh6s0US/sJ5+u9ybv/CxrggP+8Rvwf zR4Q== X-Gm-Message-State: AJaThX4BPTbaOTXJLb79bFQ7IewSq1kct6kVSHM40/Mo88bU8jp5dARt YVM/uSpbz2G8kTaRVe6ROkLUvjgLE3V1Qq6TQsNKrg== X-Google-Smtp-Source: AGs4zMY9Ck+4aI+j66welBttwsHn3RSzc+rbyDZ1U66tjSFSX2I8zKekdiuN/YL09tHoj+U5wngXMwomCfLYrOvrbVc= X-Received: by 10.107.82.6 with SMTP id g6mr2045303iob.253.1510912875938; Fri, 17 Nov 2017 02:01:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.3 with HTTP; Fri, 17 Nov 2017 02:01:15 -0800 (PST) In-Reply-To: <7884b0a5-d42c-23de-2dd3-fee5bde85947@redhat.com> References: <20171116174708.24964-1-ard.biesheuvel@linaro.org> <20171116174708.24964-3-ard.biesheuvel@linaro.org> <7884b0a5-d42c-23de-2dd3-fee5bde85947@redhat.com> From: Ard Biesheuvel Date: Fri, 17 Nov 2017 10:01:15 +0000 Message-ID: To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH v2 2/2] ArmVirtPkg: switch to new PL011UartLib implementation 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: Fri, 17 Nov 2017 09:57:07 -0000 Content-Type: text/plain; charset="UTF-8" On 16 November 2017 at 22:17, Laszlo Ersek wrote: > On 11/16/17 18:47, Ard Biesheuvel wrote: >> Switch to the new, cleaned up PL011UartLib implementation so we will >> be able to remove the old one. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> ArmVirtPkg/ArmVirt.dsc.inc | 2 +- >> ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c | 5 ++--- >> ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c | 5 ++--- >> 3 files changed, 5 insertions(+), 7 deletions(-) >> >> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc >> index c92a69281ae4..50eb8675d1c0 100644 >> --- a/ArmVirtPkg/ArmVirt.dsc.inc >> +++ b/ArmVirtPkg/ArmVirt.dsc.inc >> @@ -106,7 +106,7 @@ [LibraryClasses.common] >> RealTimeClockLib|ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf >> TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf >> # ARM PL011 UART Driver >> - PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf >> + PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf >> SerialPortLib|ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.inf >> >> # >> diff --git a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c >> index e28750f3b4c4..d9fd0ef98359 100644 >> --- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c >> +++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c >> @@ -16,14 +16,13 @@ >> >> **/ >> >> -#include >> +#include >> >> #include >> +#include >> #include >> #include >> >> -#include >> - >> RETURN_STATUS >> EFIAPI >> SerialPortInitialize ( >> diff --git a/ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c b/ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c >> index 05d3547fda91..c161dd6349d3 100644 >> --- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c >> +++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c >> @@ -17,9 +17,10 @@ >> >> **/ >> >> -#include >> +#include >> >> #include >> +#include >> #include >> #include >> #include >> @@ -28,8 +29,6 @@ >> #include >> #include >> >> -#include >> - >> STATIC UINTN mSerialBaseAddress; >> >> RETURN_STATUS >> > > Awesome idea! > > One comment: can you please check whether, if you replace > > #include > > with > > #include > > then stuff will still build? > > Both SerialPortLib instances are BASE, so we should not include > (in particular included by it). > > If it works, then: > > Reviewed-by: Laszlo Ersek > > If it doesn't work, then I think we should figure out why not; it could > be a sign of some layering violation, which would be nice to document at > least in the commit message. > Yes, that works. I added #include to Library/PL011UartLib.h, which includes Protocol/SerialIo.h and therefore needs the UEFI types. With that, I can drop the change from the SerialPortLib implementations, in both patches.