Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5695162rwd; Mon, 12 Jun 2023 08:28:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AePV/i0X2F4HhIn9ZYucu7yvHZXuqTWAd+GJcQzKnbiogHvRcbpuNXQtlGgiB/4y4CPbj X-Received: by 2002:a17:907:9410:b0:982:30e3:ddcb with SMTP id dk16-20020a170907941000b0098230e3ddcbmr370095ejc.65.1686583685982; Mon, 12 Jun 2023 08:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686583685; cv=none; d=google.com; s=arc-20160816; b=DS5HRMVY5aWJOeqW6ilQlG10M06/TUFiwpDBfGIcha2PNqvm0IElkuK1+9vEhqc7VA cTDGB8flLACvSNX5PlPOyEzFjuBrCUIvYtKT9Shaq84wWqhs1yfB5l2VvfuVG0Fn9JCB PtH3VwWep/zDTUTY3fpoMuzrMLpKpVQJveU71QuZcF4HY6xH1oyWxN4wXKDBhasbfro7 wDS/uQJuOAg4QDJu+Q4l8KyPo7LgDPPZWN8K+IHIUGFr/V0NKYina6UkXCybotGFNfNH 9PvM51O55Wkj7jCUlMn82aTIry4/xmsrrdsJiK7o7dd9QNytlU01FdgiRFhrXJ9FHcpf zmCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=SE500Dd7vQbuI/tdXDNXjIu7DsyBbXuZpWi1jtlE0sk=; b=ZTAFyDC5ViWBja38DMmxdyZsEFwEORHh8A8K+VSx4hBrhMpnsI4g2avDWZrpjwjmFd JK9+JmkoHI2dRCN07kVACCy5zdS3rU4y+kau4GRZOCzGMBvz8jGbHmNvjdxTqceqOUZj I3HggLJROzkx6dnOsP5H0MxrVTn+06BmbwkTveR//gMIyBRN0iK0SaWOHVk44eW76Fro vpOeOdv0JHSuDSVXwGLjhKUDFZvLJ31jrsQ3UdyHIjByCJ0kmtM34h5I4QEGRQuephYu JLuO2kv7inHiluhAYxGQs8KOVnFLcI0fzMe9jDqx/7mKLLeCH71Vi9m9TUkUezVr36Gf IEhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i8cvUNbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kl24-20020a170907995800b009745e0ee802si2424282ejc.668.2023.06.12.08.27.41; Mon, 12 Jun 2023 08:28:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i8cvUNbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239158AbjFLPDk (ORCPT + 99 others); Mon, 12 Jun 2023 11:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239244AbjFLPDa (ORCPT ); Mon, 12 Jun 2023 11:03:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C337C12A for ; Mon, 12 Jun 2023 08:03:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5C6A461671 for ; Mon, 12 Jun 2023 15:03:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6296C433D2; Mon, 12 Jun 2023 15:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686582206; bh=8d5q953vla0AfsjXttAZJ/ISVUHuzC9Shw3Q1PG8UPU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i8cvUNbtedQ2UTp9IkMt/aFBwSQrLpEp2qWtRRdB90cgHyi8/e0PMRNHoZDUFhxka 50Naqpxnmwvc7ZSX0NkXKXL6zsSdB4go6z7o+TzQFtyoLCSahwXuC4RYlThlKlBwIb 44HDeScNkfhIB2IPFBcR7HBaa8aXHEG8Gkpdkk9kGsEgkEaxAgeWlVC39UJ5y6CZ8W Bb7kMAJOig9lZKIJbmjklPDjzS5SVAtT4tW3jf12MpzcdJy36mwXLWAmnJVtlBJ6+1 ghHq+ocNpSmCibxUvSFneGfbWifuFflvWFzqwXSeEWraQm8Okq9+ZZuujGDQqkl21Y qKOKBmN6u/ynQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1q8j4m-004ova-Ma; Mon, 12 Jun 2023 16:03:24 +0100 Date: Mon, 12 Jun 2023 16:03:24 +0100 Message-ID: <86r0qgbu4j.wl-maz@kernel.org> From: Marc Zyngier To: Peter Zijlstra Cc: Mark Rutland , linux-kernel@vger.kernel.org, Reiji Watanabe , Will Deacon Subject: Re: [PATCH] perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype In-Reply-To: <20230612145423.GC83892@hirez.programming.kicks-ass.net> References: <20230603082519.1088285-1-maz@kernel.org> <20230612145423.GC83892@hirez.programming.kicks-ass.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: peterz@infradead.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, reijiw@google.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Jun 2023 15:54:23 +0100, Peter Zijlstra wrote: > > On Mon, Jun 12, 2023 at 02:16:28PM +0100, Mark Rutland wrote: > > On Sat, Jun 03, 2023 at 09:25:19AM +0100, Marc Zyngier wrote: > > > Reiji reports that the arm64 implementation of arch_perf_update_userpage() > > > is now ignored and replaced by the dummy stub in core code. > > > This seems to happen since the PMUv3 driver was moved to driver/perf. > > > > I guess we should have a Cc stable then? > > > > The below implies this has always been on dodgy ground, and so it's probably > > inaccurate to give this a Fixes tag pointing to the move. > > > > > As it turns out, dropping the __weak attribute from the *prototype* > > > of the function solves the problem. You're right, this doesn't seem > > > to make much sense. And yet... It appears that both symbols get > > > flagged as weak, and that the first one to appear in the link order > > > wins: > > > > > > $ nm drivers/perf/arm_pmuv3.o|grep arch_perf_update_userpage > > > 0000000000001db0 W arch_perf_update_userpage > > > > Ah, so having it on th *declaration* will apply to any *definition*. :/ > > Yikes.. > > > That suggests this is a bad pattern generally, and we should probably remove > > the other __weak instances in headers. Lukcily it seems there aren't that many: > > > > [mark@lakrids:~/src/linux]% git grep __weak -- **/*.h | wc -l > > 50 > > > > IMO we'd should aim to remove __weak entirely; it causes a number of weird > > things like this and it'd be much easier to manage with a small amount of > > ifdeffery. > > > > Peter, thoughts? > > Not a fan of __weak myself, after having had to deal with how the > compilers actually make it work. > > Where do I queue this? perf/urgent? That'd be my preference, as arm64 is currently a bit broken and I'd like 6.4 to be functional. Thanks, M. -- Without deviation from the norm, progress is not possible.