Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5707083pxb; Tue, 16 Feb 2021 05:46:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpPd6PuGf5+G9Ix8Ojlfpip2RQXUa0K5A8/LANs3+PQ7lFFUCyJJHu3J6SDD+LN/JgfqiQ X-Received: by 2002:a05:6402:b82:: with SMTP id cf2mr91617edb.87.1613483186109; Tue, 16 Feb 2021 05:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613483186; cv=none; d=google.com; s=arc-20160816; b=n/+0qO2Zqyg66xymUwIsfvGMF73/4/Aj656s/wfnIh13/bfNrg+Ul/F0wRfaUtW5Y1 J33rVJbZ/1VrSSHQFZwNeZZT9jMSRyDavywOYNVIbRC+y0hRsY6jOFhZ7YxRKNwVx/EZ Kc+CMoCKrVZ7DqUdwl2MHne8jFIBA2EcfWjvzg7PQbWjPGjV7oNhtKh81kKP6ZxGyA2C +Gi1+SNuSbVN5Lz5As0zvyCjih0Wk8Z7xjDZcC6g/ILTVei0l/JL1kVWXnwb84dDzbZk E+GrBUqXPDqENAxUqO0YZezrF2RfgxQplNELOmJglXjjOiJQEwAAU9OiPJ8QBjhBXeEK HtmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=L4aIEOUjOCrSjLDXb3mtmGNuNkXiSZIhPKzU5zM+aPQ=; b=r03a0OSr3pmQFJ0RUnIs64Xl1xFynjOdEZ2Xj0a6do/QWVUYrNN7xWCq0rK8oIL05W 6N3A+bVAkejJF4QOMvnhmKyALCbF0ekmu3C+HSafDZnS0O6v4VoEg6ohKLOB1iL8exHu 9vlcI8XelNiWs25ixffKQlll8u1ykUbtkugLh/0ct4BDXXKzHf+0xlW9dTa6UWM3tphe 23lljlakORhTVXoB7oydQSdGKHEhcbRmAtvgOesjNV+Q9ZzxvDkbQJupaSDE4Ju6tu+5 Fd3t0VT1ZrPZw0IluQ0r5dwbvGIGDy0RkpJUQe0IU71FJ3a6bVzJ/gBZb92mSjHN7Exe N5Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=buncBvKP; 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 r16si2336368ejc.439.2021.02.16.05.46.02; Tue, 16 Feb 2021 05:46:26 -0800 (PST) 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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=buncBvKP; 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 S229996AbhBPNoX (ORCPT + 99 others); Tue, 16 Feb 2021 08:44:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbhBPNoW (ORCPT ); Tue, 16 Feb 2021 08:44:22 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEBC2C061756 for ; Tue, 16 Feb 2021 05:43:41 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id bl23so16613171ejb.5 for ; Tue, 16 Feb 2021 05:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L4aIEOUjOCrSjLDXb3mtmGNuNkXiSZIhPKzU5zM+aPQ=; b=buncBvKPoDgi0mDnNxcMtJUW4SBhK1bNmdC5f+v/hQTv8lmNwxCoBI4WE2VR3MNGuA N+qnbz2mtngGoLCQiJMUWBKoVLmqQH8Dkw0rER13qkahBHeXieNixC1cS/4+I9PB62RS KQV+HChSOcQy0VTzRbiEytQMJiO56rKxjjqJgnauyxWGA4uf+09V+otQ+Ek5foCRuxp1 WafmVcb7Prh/18Kw+8tv7XOaCHyvz5uKczY+84ard8unxSMnu0RiALTRoaLWs82Mv1Vn kqZgu2+9+4vRj5kMyiM7/c/34S0pm3DGa3h6NS7fm2FJhZLCdr4k5UXt68Y3hQrgLQ20 0YvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L4aIEOUjOCrSjLDXb3mtmGNuNkXiSZIhPKzU5zM+aPQ=; b=X8GToQLUvoUImBuG6VbcZdEyBeTMD1MTefTmIeDWMOW1vd1nlToBXg7+fDBsGjvsrn 7kvLVkDU7V3UmCiIqDeSYtj+J1oCQDnAsFxqCTImVbPCNHF/UcqGEzLBoYQQeg0AmgqU n1OY1LMsYCSFq08jWiss0ei9i45xljZzaFMXbOUXvR/dgLQDYedBAOlfZkYc/cFhSvk3 Sfg4ZZGquvesWn3XqwxSwqKV67LUC/sGRMGSXiQGnAR1Cw5gjTibmHqTtpC1bIzvdfzz K5GySxrpsw3TUYLdlAopOty6xBiCCMjUhNs52Q8yVyD6rHln1nds0qgIeXg13p4ulvHQ oyeg== X-Gm-Message-State: AOAM53099wDoe/Xm3vjrXGd+121ObBfsDlP/hM9BviK6gTpCRt2pOkJc Nb2EA34qLurlWFfNTE3UIgVDCyurxfCN+Tc/zC3lHQ== X-Received: by 2002:a17:906:4a8e:: with SMTP id x14mr17745633eju.445.1613483020380; Tue, 16 Feb 2021 05:43:40 -0800 (PST) MIME-Version: 1.0 References: <20210210000259.635748-1-ben.widawsky@intel.com> <20210210000259.635748-7-ben.widawsky@intel.com> <20210211120215.00007d3d@Huawei.com> In-Reply-To: <20210211120215.00007d3d@Huawei.com> From: Bartosz Golaszewski Date: Tue, 16 Feb 2021 14:43:29 +0100 Message-ID: Subject: Re: [PATCH v2 6/8] cxl/mem: Enable commands via CEL To: Jonathan Cameron Cc: Ben Widawsky , linux-cxl@vger.kernel.org, ACPI Devel Maling List , Linux Kernel Mailing List , linux-nvdimm@lists.01.org, linux-pci@vger.kernel.org, Bjorn Helgaas , Chris Browy , Christoph Hellwig , Dan Williams , David Hildenbrand , David Rientjes , Ira Weiny , Jon Masters , Rafael Wysocki , Randy Dunlap , Vishal Verma , "John Groves (jgroves)" , "Kelley, Sean V" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2021 at 1:12 PM Jonathan Cameron wrote: > [snip!] > > > > @@ -869,6 +891,14 @@ static struct cxl_mem *cxl_mem_create(struct pci_dev *pdev, u32 reg_lo, > > mutex_init(&cxlm->mbox_mutex); > > cxlm->pdev = pdev; > > cxlm->regs = regs + offset; > > + cxlm->enabled_cmds = > > + devm_kmalloc_array(dev, BITS_TO_LONGS(cxl_cmd_count), > > + sizeof(unsigned long), > > + GFP_KERNEL | __GFP_ZERO); > > Hmm. There doesn't seem to be a devm_bitmap_zalloc > FYI I've implemented both devm_bitmap_zalloc() as well as devm_bitmap_alloc() and made them part of a series I sent out to linux-gpio two weeks ago (surprisingly - it's nowhere to be found on lkml or spinics or even patchwork :/). The patches didn't make it for v5.12 but I'll respin them after the merge window, so we'll have those devres helpers for v5.13. Bartosz