From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web12.6828.1590070580916732418 for ; Thu, 21 May 2020 07:16:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=kkIA7qUr; spf=pass (domain: nuviainc.com, ip: 209.85.221.68, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f68.google.com with SMTP id l11so6859300wru.0 for ; Thu, 21 May 2020 07:16:20 -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:in-reply-to:user-agent; bh=FJFpmcAW+GIJ5jtRRILPQJfAY1T31JKBgAM+w9uyPNc=; b=kkIA7qUrBFrKqlz6U6HAxsKhGgeuBqqrPYOez0DR8zNknphKSmBmYwkZng46WqRHVX YcFt9cKMbjK9RxYQccerRz7zU8etA/8j8Lh1Rfz6RZL5ua+q9wHgjmhDZGRqXF+p3QXJ VLTTpCdBQRb8V8NietZRu9t/tRRsBR/Rvikuj6x8uhhY6rUZqG3SuZyRohHHNSM/KmdF ksHTsXZybxouLTnO7a+FgbVh4GO8cFq62axdH+BJdWq7xZdaYebetC0JTn+A1SKpPIIo w01CDN5aqVZ/zIifMVrOO9RHElLySC/qJ6xBHHxXRLguxNHnEzV7tp7txCRJjprVr75p FhZQ== 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:in-reply-to:user-agent; bh=FJFpmcAW+GIJ5jtRRILPQJfAY1T31JKBgAM+w9uyPNc=; b=YlDa/nNXgcpzaueDiFEjFkVBF2Sf60UDDcqqOGA2DBpnCQExWfBhipUJH1T8VxjgyV WN2OptUHc/LXg4s7nB0xSQJEbCca20MtkBV5Wl6DgREaoNI5fhBPHEGLOGrmeR0WBaRB ppbeO//Z+buNWMT3U9nSUx3QYXIre5+dMnDJOcIBxSYBn4iTenVgjPTKRiNlZzV8v75l 3l+FDbqS0vgNC6Q8+SuoCzX1m0O2v7g0MBvL49YnwWirHHU2e8SuCkQUpxO141fs8CJM qlicFUm54QQzSTQ67qtE9+bBG+VpmuL5/sfqHybfqkh3bhg8wtacJgjWiPYbw8ByNLav zIZw== X-Gm-Message-State: AOAM531qNvauYL2yynhCkm2PIvU6PJ3GzoucEvWs8RWvouxxMjTmksdE GbZLqE1rUJ3h6hqRES2WYIfAgTTe96bL4B/bvr7xTRNlPhMSS5Byx6srONsBDetIQnW6aJY1iWj c/r1RCgv0ztiko6XYdYzhs5YUH+PqYaCNxPznnWdDg4JkJBUJXJkltnK+5FgFp2YE6A== X-Google-Smtp-Source: ABdhPJxAM/ZmzfWlbMaJBHwWDxCGcE6ZwDshN34bQzB3V6pH+Il5jtTYCHGLZrsKqTNgd2an7gZWxg== X-Received: by 2002:adf:fc8b:: with SMTP id g11mr9273155wrr.90.1590070578949; Thu, 21 May 2020 07:16:18 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id 5sm6636140wmd.19.2020.05.21.07.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 07:16:17 -0700 (PDT) Date: Thu, 21 May 2020 15:16:15 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, ard.biesheuvel@arm.com Cc: glin@suse.com, lersek@redhat.com, liming.gao@intel.com Subject: Re: [edk2-devel] [PATCH v2] ArmPkg/CompilerIntrinsicsLib: provide atomics intrinsics Message-ID: <20200521141615.GU1923@vanye> References: <20200520114448.26104-1-ard.biesheuvel@arm.com> <20200521112353.GS1923@vanye> <20200521131644.GT1923@vanye> <059e1db5-8228-63a8-09ab-bb0efcd95176@arm.com> MIME-Version: 1.0 In-Reply-To: <059e1db5-8228-63a8-09ab-bb0efcd95176@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 21, 2020 at 15:31:44 +0200, Ard Biesheuvel wrote: > > > That does mean you would need GCC 10.2 at least, or you get the error, > > > unless we merge this patch as well. That would mean the intrinsics are never > > > used in practice, but using a compiler that does use them will not break the > > > build. > > > > > > I am leaning towards omitting this patch, but I could be convinced to adopt > > > both mitigations. But the #pragma is strongly preferred. > > > > What is the codesize impact on a full RELEASE image? > > Not sure how that matters? Given the modular nature of EDK2, I would not > expect the outline atomics to have any measurable size benefit. The > intrinsics library is static, with each of the 100 different functions > emitted into a separate section, so you only get what you use. Ah, I'd missed (misfiled?) the separate section thing. > > If non-negligable, how about #ifdefing the whole content out unless > > some specific preprocessor flag is passed? Then at least there's a > > quick workaround for anyone who needs it. > > > > The linker will only incorporate the parts that are actually used. Yeah, so not an issue. OK, then I would vote *for* merging the patch regardless. We know how long some toolchain versions can stick around simply because they were mentioned in some blog post somewhere that ended up high in search rankings. Once gcc 10.2 is released (and we have verified the problem can be worked around elsewhere), I guess we could add a note saying "once all gcc 10.0 and 10.1 toolchains are considered obsolete, this file can be deleted". / Leif