Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3853975pxj; Mon, 21 Jun 2021 08:02:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5osH0W/2DfFF9XGZgfSF3ibcb4cPMfD/OiiXzxATY2N5sX+0x61Lf/h6DlH6EZOEyE2jM X-Received: by 2002:a17:906:a28e:: with SMTP id i14mr10254361ejz.395.1624287776842; Mon, 21 Jun 2021 08:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624287776; cv=none; d=google.com; s=arc-20160816; b=fUgLzwVZIcHmBmctSNr85g0SlATGk0EgiFgKssjzfPaKMHAIlSGWiJtIXxxoYWqB2A LLsvKjKhbGStCRPeg7yZi7BHL3Emjj+YMv7gGL54gGjuVQIF9Pcf70dLcfIlFTdv4gmE /N31UY+qYmKYa4YPEIn/CzRGiR08gaz1uRZL1dyjtJDXFL1CKZV7MjKd+xgbxthPQt9m J5GdghGzQcNvprjG04ZaIMs7Vu4WCdlNawwtOX4A/t2qIYbAuECjlh+8d3l5fmmhFSQM TuboXu0a2HqLQQ7XDB3nKPJMxsQStyuI1fPsF75caH1XuBm3POQWXEgRz2l9rd0l6u/N xCmw== 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:dkim-signature; bh=MeE5VfIcLBkueUaXBU3Nrjbln3thvwwMBj/aCLS5j/4=; b=NvHLDpBMt6Fs/BZUt0CCZA/z7AUYnVhS2aN8nB1kkIyZ0Fvdte0FZlwfEjqcdMPc3T u1a9oDygBsjYOJYFLn3WXfXXGXWf3tOrL0UYRcg2w98JFI2V7IMq3OMsygvsT54CkukG u5VNy214nhP1HV/fBCK7Z0vKucv2SZbZrN2W+Xwkd2qkWjEM/ckbtYojKfOl90YJTlV9 WoVwSsAmAFn0oUUJTJFEHuTNPwwz3PXSg5tY4gJ7mMgmez6Zej2aL9DqAltM1UYD/kOZ OMwSycJpJNHI/GZLMnvcl2myFpTuCS5naEx4vMSCoNkQGZyetRxwpLNBSMa33Rzc8U9Q Fe+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oBr0Hw9v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be13si16749945edb.104.2021.06.21.08.02.34; Mon, 21 Jun 2021 08:02:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oBr0Hw9v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbhFUPCX (ORCPT + 99 others); Mon, 21 Jun 2021 11:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbhFUPCW (ORCPT ); Mon, 21 Jun 2021 11:02:22 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFE0CC061574 for ; Mon, 21 Jun 2021 08:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=MeE5VfIcLBkueUaXBU3Nrjbln3thvwwMBj/aCLS5j/4=; b=oBr0Hw9vmpDFKSNZUUeCLbOE5F yVoJ+ZyG6xv11HZaLrK8Xuan4/NZ3o+vkj/jSUSl9+PKtPl9LqwQ9Kj3Yp5w8kaS2ProRotfD7Wy8 pmwdxtSw8liv7MtBo68/GxQ6sPM6TMNUr3ZG2k8Jw8CVmHTEpUM1fkLYWTH6vBankWS8lkgd8N6kB OirGjxUHt7SJ1RDCO/AS4fohI3ZT+HpktwNr1DSD430d1n9Iq9PvT0rw+el2C3Cs+qPJdqgWvtnFa w2KTWEvNC0reEcGo5FOlU6cXBwO4mB6CGpKatKKSTQD8zE/ZBr0fgHUZZ3A3Bq/jE55pf5NU3mehI CaOqoCDQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvLNo-00DCuH-EW; Mon, 21 Jun 2021 14:58:47 +0000 Date: Mon, 21 Jun 2021 15:58:40 +0100 From: Christoph Hellwig To: Alexandre Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Christoph Hellwig , Zong Li , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/2] riscv: Introduce set_kernel_memory helper Message-ID: References: <20210617131734.1923932-1-alex@ghiti.fr> <20210617131734.1923932-2-alex@ghiti.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210617131734.1923932-2-alex@ghiti.fr> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 03:17:33PM +0200, Alexandre Ghiti wrote: > +int set_kernel_memory(char *start, char *end, int (*set_memory)(unsigned long, int)); Pretty unreadable with the crazy long line and the missing parameter names for the callback. It probably is worth to implement this as __always_inline so that the compiler unwinds the indirect call.