From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id F1E34385DC1B for ; Thu, 16 Apr 2020 03:41:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F1E34385DC1B Received: by mail-pf1-x443.google.com with SMTP id c138so1070913pfc.0 for ; Wed, 15 Apr 2020 20:41:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Z9O0pZ2p7ciHcWf3QNrxtPlkP1qSZEC8S5OBGgW/IQw=; b=d2EQZgaJa/DeAusYoc/9eyoLm+x3GfInKjHK5CXPf9LOc592Gu3zVqsPLJYj06RCvr JIxjoVsnhu0E5TqMkeBlwhWFyBnkITloTr+IkOl3r0nZVKtGAiaawY5hG0Rcyfum2BoK TL4iYuvk1/XbC3BQDVeH1A3GwzV1xaxnyJZ2dl4Oc9P38beh8jkJys5WAIgdxynLorsp MD+mivzCAkPNE97raFCSk3mOeTcyKKPIa/gWRK5QER9FyzH/ZcGDwfeC9Agl2giaISak /AXIQHxJkLhr7GPPUSLYbRlmHh3r7yO5UPlwCL9Yalue8f9YFXaEi9t3V9bjKhw1LZMs 0PVA== X-Gm-Message-State: AGi0PuZJy6UIM04oAmO5OGvG8y82RAGVm2bJJ1LmFYVijohmco48Yn4g qUXuJuVub78wR8BPVKOBIYo= X-Google-Smtp-Source: APiQypKeMiEyos0BNu9CFePCNQutY2CaDFVyj6RZIFFZMby2BpaivbNPl5pWflF6yjbXZswcULoU3g== X-Received: by 2002:a63:7b1a:: with SMTP id w26mr28207212pgc.298.1587008493091; Wed, 15 Apr 2020 20:41:33 -0700 (PDT) Received: from localhost ([203.18.28.220]) by smtp.gmail.com with ESMTPSA id w13sm320882pfn.192.2020.04.15.20.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 20:41:32 -0700 (PDT) Date: Thu, 16 Apr 2020 13:41:01 +1000 From: Nicholas Piggin Subject: Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2 To: Rich Felker Cc: libc-alpha@sourceware.org, libc-dev@lists.llvm.org, linuxppc-dev@lists.ozlabs.org, musl@lists.openwall.com, Segher Boessenkool References: <1586931450.ub4c8cq8dj.astroid@bobo.none> <20200415225539.GL11469@brightrain.aerifal.cx> <1586994952.nnxigedbu2.astroid@bobo.none> <20200416004843.GO11469@brightrain.aerifal.cx> <1587002854.f0slo0111r.astroid@bobo.none> <20200416023542.GP11469@brightrain.aerifal.cx> <1587004907.ioxh0bxsln.astroid@bobo.none> <20200416030304.GQ11469@brightrain.aerifal.cx> In-Reply-To: <20200416030304.GQ11469@brightrain.aerifal.cx> MIME-Version: 1.0 Message-Id: <1587007359.3k5vvojlfu.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2020 03:41:35 -0000 Excerpts from Rich Felker's message of April 16, 2020 1:03 pm: > On Thu, Apr 16, 2020 at 12:53:31PM +1000, Nicholas Piggin wrote: >> > Not to mention the dcache line to access >> > __hwcap or whatever, and the icache lines to setup access TOC-relative >> > access to it. (Of course you could put a copy of its value in TLS at a >> > fixed offset, which would somewhat mitigate both.) >> >=20 >> >> And finally, the HWCAP test can eventually go away in future. A vdso >> >> call can not. >> >=20 >> > We support nearly arbitrarily old kernels (with limited functionality) >> > and hardware (with full functionality) and don't intend for that to >> > change, ever. But indeed glibc might want too eventually drop the >> > check. >>=20 >> Ah, cool. Any build-time flexibility there? >>=20 >> We may or may not be getting a new ABI that will use instructions not=20 >> supported by old processors. >>=20 >> https://sourceware.org/legacy-ml/binutils/2019-05/msg00331.html >>=20 >> Current ABI continues to work of course and be the default for some=20 >> time, but building for new one would give some opportunity to drop >> such support for old procs, at least for glibc. >=20 > What does "new ABI" entail to you? In the terminology I use with musl, > "new ABI" and "new ISA level" are different things. You can compile > (explicit -march or compiler default) binaries that won't run on older > cpus due to use of new insns etc., but we consider it the same ABI if > you can link code for an older/baseline ISA level with the > newer-ISA-level object files, i.e. if the interface surface for > linkage remains compatible. We also try to avoid gratuitous > proliferation of different ABIs unless there's a strong underlying > need (like addition of softfloat ABIs for archs that usually have FPU, > or vice versa). Yeah it will be a new ABI type that also requires a new ISA level. As far as I know (and I'm not on the toolchain side) there will be some call compatibility between the two, so it may be fine to continue with existing ABI for libc. But it just something that comes to mind as a build-time cutover where we might be able to assume particular features. > In principle the same could be done for kernels except it's a bigger > silent gotcha (possible ENOSYS in places where it shouldn't be able to > happen rather than a trapping SIGILL or similar) and there's rarely > any serious performance or size benefit to dropping support for older > kernels. Right, I don't think it'd be a huge problem whatever way we go, compared with the cost of the system call. Thanks, Nick