Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7107663ybl; Mon, 23 Dec 2019 18:28:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzloWvWZPlX76ILicZYQ44AuG/W7rDypTSUB1wO/xpabi/LDuyctE6R2Zyok+vrQ7mjUv3S X-Received: by 2002:a9d:74d8:: with SMTP id a24mr37586814otl.100.1577154525550; Mon, 23 Dec 2019 18:28:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577154525; cv=none; d=google.com; s=arc-20160816; b=U+8F0Y3/QnFgHokjOHSYg4wHLdmuPcHRz5N8sHli1REhWas/kWSUNavwuZWPsfr0hB PK5NzHmU4Hpz2G9hXMV44vzRMn8kVwJSi2qs1oPQKhvotjG7ZDEB4EusWmqvYzCbbFZk 3wMAnGmS6HpFIcEXKJ1+jK6NjLZ1old99mh8SEZI4sXNyJWDBoxQwrzkKC3YTF1UGjS6 lWirrVYrm+XLHq3afDAEcHw03fd+1P4QZplHqvmsDhynCkzl+6bitPnhkVOTJp8P+Ddc PiuJ/NFBCY6cwMW+edIzdjoJnwr34aea13FohqQZCZQUQsZyHdpb0jgnCMOdY026iV5J GuoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bD9yZDu3cLIyG8MKQhdtg1LOnYNzKjhfXGhyPO3UXCg=; b=XWm8B+pN03LRG/DSB0MSxJBKu15ThINhvWP8gpgQgFCY4h58mxIPSA8YzEwAomJihE PHbqRIdKXADJ5vbKC6/khIRuIsdSjGlUjXjpqkDEbkRMXP8zAa++4TJ7bQ2KyYxw0MlA x/rocNLaGXdtQOJm9WHG3RqQgshs32fRf93j8rc36+CGHVk7JxUS1FQyUdpgnqAmfI2+ /UFdu7YSwB8RYgGM0H/xX9nzUmEh9UGlFwJXWBuLC8J+ZjwmllQZS0zeoJFS2jYDgQ9U 097ppjk5yEELh60sulQ476YMg7iWs9ssE8d0ujJZdfMFP/31lgPkGt2It2ltd8NZjxTh zS2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e5/A2TMz"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si8264935otp.131.2019.12.23.18.28.33; Mon, 23 Dec 2019 18:28:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e5/A2TMz"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbfLXC1z (ORCPT + 99 others); Mon, 23 Dec 2019 21:27:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:51000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726908AbfLXC1z (ORCPT ); Mon, 23 Dec 2019 21:27:55 -0500 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B48720715 for ; Tue, 24 Dec 2019 02:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577154474; bh=urdNwQ/OTeq2Z4hdgMEm4P258E+sy9JNDdnsxX/A+m0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=e5/A2TMzWmvgBVcYJhSASriiw23lUwDkTKRRrtVzBPcnxYy86U7OFXx0HfahVlJoE gR4r6zzD7UbCJZ6hzzKPUkP9RiRaHMYXHegUwL+YEO5JXAbwTkd+koSfO5sdzwK5Kg cSsvwQzIEipkLbhYGIOw86xV4zgHkcuJxD1NzlXU= Received: by mail-wr1-f43.google.com with SMTP id q6so18585593wro.9 for ; Mon, 23 Dec 2019 18:27:54 -0800 (PST) X-Gm-Message-State: APjAAAU/ULMqPSJPf6PLvzcqUmKJAUY4yjnQJdqksqczHs8r2lG0bZ22 2yeREdtC1OZRO19cYqOeXGpXnVSB0wVd0r2Hs3B2Uw== X-Received: by 2002:adf:f20b:: with SMTP id p11mr31631213wro.195.1577154472974; Mon, 23 Dec 2019 18:27:52 -0800 (PST) MIME-Version: 1.0 References: <02861d0a05c2d48db4e9ee9093e2e2598093c372.1577111366.git.christophe.leroy@c-s.fr> In-Reply-To: <02861d0a05c2d48db4e9ee9093e2e2598093c372.1577111366.git.christophe.leroy@c-s.fr> From: Andy Lutomirski Date: Mon, 23 Dec 2019 18:27:40 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 04/10] lib: vdso: get pointer to vdso data from the arch To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , Thomas Gleixner , Vincenzo Frascino , Andrew Lutomirski , LKML , linuxppc-dev , linux-arm-kernel , "open list:MIPS" , X86 ML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy wrote: > > On powerpc, __arch_get_vdso_data() clobbers the link register, > requiring the caller to set a stack frame in order to save it. > > As the parent function already has to set a stack frame and save > the link register to call the C vdso function, retriving the > vdso data pointer there is lighter. I'm confused. Can't you inline __arch_get_vdso_data()? Or is the issue that you can't retrieve the program counter on power without clobbering the link register? I would imagine that this patch generates worse code on any architecture with PC-relative addressing modes (which includes at least x86_64, and I would guess includes most modern architectures). --Andy