Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10285938rwr; Fri, 12 May 2023 06:21:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DrcEVq8xcGYwL5IDjK8KrYH/wPnedYFm4hVbuU+KTycHM1oY680HNmS3V/0t3s6HKT26k X-Received: by 2002:a17:90a:b007:b0:24d:f880:5192 with SMTP id x7-20020a17090ab00700b0024df8805192mr23525231pjq.19.1683897717025; Fri, 12 May 2023 06:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683897717; cv=none; d=google.com; s=arc-20160816; b=nfHsU2d725csecIZd7d8Yw/8zSTB+X68edjN8xHGv53BBs+igiCmdvajxHrK6YUICl 7+tQiHfdHqXdM/hiHuLggcBYxE6V3VUTg1blHX8cw726V2g134IZppy25LPZZNyzOf7d pcLNr0ukrC/kDz3CaEV+WCvZlbcD557OrYX0FotYQz3uJAD3x0o4tMkxuHysIPNNjy9w bH55wJQ4jgEX5FPcooQDwr9fhAB2bxTZIYah/OY7u9aX+nfqHWQcMLHlrKnN2xg0S7ko k0WWoe50f1PV/yDrdlaJMnS8GrXMRoJPEJq00YkvnD6LWZZEJfqBtgWHjQCZ03rN95n0 kfuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2Z8o4OGmHg289iyE22Q+Cx//+nxQaB+H0xDoL+kJrLM=; b=ITzlgCC6NgYcmwuJ8TCAAiOXTIxDrLqocO5ZDSWbqzWLjHWedXnrNp+6Zzbac/SJdK O0Hpfe4zCtjrYMrIl7I/fXxO+BdSnFA1auD+rC+pR8DCNtXuYb6nWAglQM3hH2Sh/5N2 mwlCy11Gs7wGCb30+wwLHba/PEPoNu7EIGe8DqLeAYzJLYj83E4nn4wy/flXysM1bPIX w6ayU1Y/8puPsEoEbiLJh1DJtgnV99Arfw6s/CVIY1+4SLpgz7Xz8njXWck05JHuHfcs iLv/GFJ6NmePIpue6XsEla0L/VYHQRXAFOL0zNZ1ulsPLHwhykLCKBeK+qG54eKHb+tx P7pQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a17090acf8e00b00250b5ffafdcsi8484335pju.125.2023.05.12.06.21.42; Fri, 12 May 2023 06:21:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240892AbjELNTC (ORCPT + 99 others); Fri, 12 May 2023 09:19:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241044AbjELNTA (ORCPT ); Fri, 12 May 2023 09:19:00 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 414321FCD; Fri, 12 May 2023 06:18:56 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8ED94C14; Fri, 12 May 2023 06:19:40 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.58.179]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 764EF3F67D; Fri, 12 May 2023 06:18:54 -0700 (PDT) Date: Fri, 12 May 2023 14:18:48 +0100 From: Mark Rutland To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, akiyks@gmail.com, linux-doc@vger.kernel.org, kernel-team@meta.com, Will Deacon , Peter Zijlstra , Boqun Feng Subject: Re: [PATCH locking/atomic 18/19] locking/atomic: Refrain from generating duplicate fallback kernel-doc Message-ID: References: <19135936-06d7-4705-8bc8-bb31c2a478ca@paulmck-laptop> <20230510181717.2200934-18-paulmck@kernel.org> <2a8b310c-3145-462b-a4c4-a130939da862@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a8b310c-3145-462b-a4c4-a130939da862@paulmck-laptop> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 Thu, May 11, 2023 at 12:12:16PM -0700, Paul E. McKenney wrote: > On Thu, May 11, 2023 at 06:10:00PM +0100, Mark Rutland wrote: > > I think that we can restructure the ifdeffery so that each ordering variant > > gets its own ifdeffery, and then we could place the kerneldoc immediately above > > that, e.g. > > > > /** > > * arch_atomic_inc_return_release() > > * > > * [ full kerneldoc block here ] > > */ > > #if defined(arch_atomic_inc_return_release) > > /* defined in arch code */ > > #elif defined(arch_atomic_inc_return_relaxed) > > [ define in terms of arch_atomic_inc_return_relaxed ] > > #elif defined(arch_atomic_inc_return) > > [ define in terms of arch_atomic_inc_return ] > > #else > > [ define in terms of arch_atomic_fetch_inc_release ] > > #endif > > > > ... with similar for the mandatory ops that each arch must provide, e.g. > > > > /** > > * arch_atomic_or() > > * > > * [ full kerneldoc block here ] > > */ > > /* arch_atomic_or() is mandatory -- architectures must define it! */ > > > > I had a go at that restructuring today, and while local build testing indicates > > I haven't got it quite right, I think it's possible: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=atomics/fallback-rework > > > > Does that sound ok to you? > > At first glance, it appears that your "TODO" locations have the same > information that I was using, so it should not be hard for me to adapt the > current kernel-doc generation to your new scheme. (Famous last words!) Great! > Plus having the kernel-doc generation all in one place does have some > serious attractions. :) > I will continue maintaining my current stack, but would of course be > happy to port it on top of your refactoring. If it turns out that > the refactoring will take a long time, we can discuss what to do in > the meantime. But here is hoping that the refactoring goes smoothly! > That would be easier all around. ;-) FWIW, I think that's working now; every cross-build I've tried works. I've updated the branch at: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=atomics/fallback-rework Tagged as: atomics-fallback-rework-20230512 Thanks, Mark.