Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1099059pxu; Mon, 23 Nov 2020 11:35:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5IynyFAmoKn4n7tY5E/G/z2hqZGyn1RHSju2QnfLe5a1capJZ+CSK+ralWxDJS6AXoMD7 X-Received: by 2002:a05:6402:c83:: with SMTP id cm3mr715640edb.189.1606160145170; Mon, 23 Nov 2020 11:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606160145; cv=none; d=google.com; s=arc-20160816; b=0vh9nUCfcJQqfQtAN6Nz5wsZOnhYzJ+u4Jcx6dl/7V1O1LWI6UTqEceDMG1grP0VSY aHWKYcT9YUm3p7ofmPHh1qHZnWL5Q1MR6wbSWepbnytEr2o3SYKqHIMtJV8TmyWrT+5+ vYaIEdjF1RPM4iYd9/wXf4srgSHVoFWD5q9ebDCs+C1UMbs/Z664EFoD+ND/hO7jj8C1 vpeZWyQ1FkfCBx7oRJTbTmm8T69gxyf0bo1T61nDJggkjhDA/dj8f9fA5RUpLeeJ+OtJ 0AqK2kkYWRtl/OJMm5hTUaHavTZXySEOXZ6f0ZLSoDR8m9UbP5yIp3l5Q3Y854Qyg7PB XNHQ== 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=idsRRDFvrWEUfaaQ200ZYJgjiqOU5xE6TXnIcThRzMQ=; b=CDrtzSHOsjCUvQsPckgvVoQxkJ1Ex+5cAnTf+DaqitEelObd+U5B9zW5vKoZBe8lLF xtYmE+/rdJctka9qZj+xnY0dqxyvNpU1yEZoURdKASXG0ltM0yqbmZDwWAjdgdN0YRe5 8lxGIUd364Gwju94irlpXM/sSdB8L9z1/0MXzKHNndEo1OIZBi6xsxINRz0Om6i2HVaC 5K4mQBOMuI3+7ks+Vgn+Q0EYoqTwLhJUegTBVYBO8N917/itK2y6KDabgH2n2Y9328/f l/bfuglHvX8OqHUKK6kixY75q2tjHtD4AHg9C7lyzA/xCnmDf9jhGX/bwD0VmxiGlyGf etrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Wdyrvrbq; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si7126409ejz.457.2020.11.23.11.35.21; Mon, 23 Nov 2020 11:35:45 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Wdyrvrbq; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730034AbgKWTcr (ORCPT + 99 others); Mon, 23 Nov 2020 14:32:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729595AbgKWTcq (ORCPT ); Mon, 23 Nov 2020 14:32:46 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E9DEC061A4E for ; Mon, 23 Nov 2020 11:32:46 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id cq7so18328722edb.4 for ; Mon, 23 Nov 2020 11:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=idsRRDFvrWEUfaaQ200ZYJgjiqOU5xE6TXnIcThRzMQ=; b=Wdyrvrbq+IrLnf9+ZOGO2vv3x+WxFZt2TN+CQ7V+X/sc1SgfxFUTxMH2c873wyRSSg 59zThKnuOc8hD7N+HFZl1x3lslngFnEKOw+2Ao8MvCSvDxnldO9FFtQjtcsOUeB5C6b/ Xtj7n7HVpB+fPnessaIv7NA3MYqUNnTK0ZMTQROtRByevKOz5juT8oTyx+Nwtv4R1ewd OOgDVqpnjp+08EdQjAxPR8VrfSkArZKscR3jRL5wQYVW00iVXEH1bb0LyfTnkHVBwWdZ 9m7G3zJ2pDqtCNgFiMw8eRldmF/zXyDcDcAlTy2/EP0GniOHMA5gCJBP2neKHA7KVkR9 ksQg== 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=idsRRDFvrWEUfaaQ200ZYJgjiqOU5xE6TXnIcThRzMQ=; b=uIsOUGaWrdEjUfasVyG4paXolV4C/r4FRJK2lpoKUSBeZhMyYPjkspyfR++mO2DUVj C3TGsmGgHvbavULgjV/Kc+f1VDyBZb8ro8kWh63XBN0kfbSFoQ26ZjgPKiVdff3Mk1YJ Vto+ry6WzBEfDKJ/YeaGrAFk67lSRIa95+Zyx6xycJBJg9mugY7TmIdlrvVL+vA90cpD kHlLVKN9YAtVXNU4SlmajlzoQc6Mr6GfH2Ktj+F9RWBpFXd6Z+Gb5kjdirA+Y4IKa1xL 2js2TMFw7eLygKcHNruDgf/4n4RTBs8AfIHCK0kMYlLpeJK0LrBRbs6DQq+vPSLhWdyu Pk6A== X-Gm-Message-State: AOAM531Ur67lK3t9EAbXKTZeyea95EcItdpbp6KeHbPpHMo8hIYlUln0 uJxzh/qHOpnG0CM4PJ/+LR5j4hzjZF0ydP0HATUZCA== X-Received: by 2002:a50:fe02:: with SMTP id f2mr716870edt.97.1606159965112; Mon, 23 Nov 2020 11:32:45 -0800 (PST) MIME-Version: 1.0 References: <20201117002321.GA1344659@bjorn-Precision-5520> <20201123192029.pmmy6ygts5fclz7b@intel.com> In-Reply-To: <20201123192029.pmmy6ygts5fclz7b@intel.com> From: Dan Williams Date: Mon, 23 Nov 2020 11:32:33 -0800 Message-ID: Subject: Re: [RFC PATCH 4/9] cxl/mem: Map memory device registers To: Ben Widawsky Cc: Bjorn Helgaas , linux-cxl@vger.kernel.org, Linux Kernel Mailing List , Linux PCI , Linux ACPI , Ira Weiny , Vishal Verma , "Kelley, Sean V" , Bjorn Helgaas , "Rafael J . Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 11:20 AM Ben Widawsky wrote: [..] > > -ENXIO is fine with me. I just don't see it as often so I don't > > really know what it is. > > > > Bjorn > > Dan, Bjorn, I did a fairly randomized look at various probe functions and ENODEV > seems to be more common. My sort of historical use has been > - ENODEV: General, couldn't establish device presence > - ENXIO: Device was there but something is totally misconfigured > - E*: A matching errno for exactly what went wrong > > My question though is, would it be useful to propagate the error up through > probe? The error from probe becomes the modprobe exit code, or the write to the 'bind' attribute errno. So, it's a choice between "No such device or address", or "No such device". The "or address" mention makes a small bit more sense to me since the device is obviously present as it is visible in lspci, but either error code clearly indicates a driver problem so ENODEV is fine. For the other error codes I think it would be confusing to return something like EINVAL from probe as that would be mistaken as an invalid argument to the modprobe without stracing to see that it came from the result of a sysfs write