Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp810005rwb; Fri, 13 Jan 2023 04:34:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsm9CojXlkaenFyEju3SppSrgZxjfbAfnty1O3H4ry7cGm8zERScYrW/dqKIOmffONHN/e2 X-Received: by 2002:a05:6402:414:b0:495:77a9:f108 with SMTP id q20-20020a056402041400b0049577a9f108mr29882285edv.39.1673613274993; Fri, 13 Jan 2023 04:34:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613274; cv=none; d=google.com; s=arc-20160816; b=dIaQH2nxjQHNQSYIt4tWcDlgVyzX4KeSH6kesGpbZ+sgbY3ogEMpCK4Ff320AlB3iB 6vrYV8OBc2edhBS/teI5IqkmfZTu7EIXfbJQpbCe+7GPHRE7UeDgZfOHzlk6+eIRs2x/ me0oj/2V9mmLib7tYBuCoJFDDRFP1xKq0bUqrkmgJ9J29uUlGFAoZL88GEyvrXHyKPdu nZwNHJ9p6N7OcSZ2j9mWLf77AoFWfe9m9TGh6AkGe/h+H9GfyfYx8LLqrF4aa2dwCH8a 3SuQ0hK29eHQ+2iFBCIUadYWUzPUlKf5rrXSDNwL2zs2Ni7QMR8xc4TIYIV1WtmjXvr7 oblw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=c69dpD7GMG8LT+2+fMDVOGCTf5LcbgfFo/QFhLDnrqw=; b=h2djm6nPHKAKjSaeSghyn4QBAzN0QcQNexKPWsfoSUzXSyBvOJJQ6ky8Zdd51wg7JV qYBqjilfsJw0bw6YA+dnqD8L65zGSB1mS6xwHVFovaFxYkN/QzyjhuiKdh/OOCjtl6ik YkfLwPAJiCm0IEVzuBSkYxn9fQ/ImtJUQ5/XrA+VB/V9ifpjqeG7izHoewf/3EahpsRZ TVyjOt25/EcaNkK+QVri69tJSfxjzzSGpQVlZpyp4CNQ3IzNmvYahkeeixAzkSF0rG6g jxbYDKmHsYT0E04FaEGK3SfOPMMnKogYbRDVefLHYbS8twU5L4cFFAKz4950LucyVdJ9 5hAQ== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a056402191000b0048567586e48si12550210edz.600.2023.01.13.04.34.20; Fri, 13 Jan 2023 04:34:34 -0800 (PST) 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241296AbjAMM34 (ORCPT + 51 others); Fri, 13 Jan 2023 07:29:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233102AbjAMM3L (ORCPT ); Fri, 13 Jan 2023 07:29:11 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6AB24A; Fri, 13 Jan 2023 04:28:49 -0800 (PST) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ntggn58sFz684th; Fri, 13 Jan 2023 20:28:37 +0800 (CST) Received: from localhost (10.81.201.219) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 13 Jan 2023 12:28:46 +0000 Date: Fri, 13 Jan 2023 12:28:45 +0000 From: Jonathan Cameron To: CC: Dan Williams , Bjorn Helgaas , Alison Schofield , Vishal Verma , Davidlohr Bueso , Dave Jiang , Ben Widawsky , Steven Rostedt , , , , , Bjorn Helgaas Subject: Re: [PATCH v6 2/8] cxl/mem: Wire up event interrupts Message-ID: <20230113122845.00006be6@Huawei.com> In-Reply-To: <20221216-cxl-ev-log-v6-2-346583105b30@intel.com> References: <20221216-cxl-ev-log-v6-0-346583105b30@intel.com> <20221216-cxl-ev-log-v6-2-346583105b30@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.81.201.219] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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, 09 Jan 2023 11:42:21 -0800 ira.weiny@intel.com wrote: > From: Davidlohr Bueso > > Currently the only CXL features targeted for irq support require their > message numbers to be within the first 16 entries. The device may > however support less than 16 entries depending on the support it > provides. > > Attempt to allocate these 16 irq vectors. If the device supports less > then the PCI infrastructure will allocate that number. Upon successful > allocation, users can plug in their respective isr at any point > thereafter. > > CXL device events are signaled via interrupts. Each event log may have > a different interrupt message number. These message numbers are > reported in the Get Event Interrupt Policy mailbox command. > > Add interrupt support for event logs. Interrupts are allocated as > shared interrupts. Therefore, all or some event logs can share the same > message number. > > In addition all logs are queried on any interrupt in order of the most > to least severe based on the status register. > > Finally place all event configuration logic into cxl_event_config(). > Previously the logic was a simple 'read all' on start up. But > interrupts must be configured prior to any reads to ensure no events are > missed. A single event configuration function results in a cleaner over > all implementation. > > Cc: Bjorn Helgaas > Cc: Jonathan Cameron > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny > Signed-off-by: Davidlohr Bueso > > --- > Changes from V5: > Dan > Addressed missed comments on V4 > https://lore.kernel.org/all/6398dd6ed80fa_b05d1294fc@dwillia2-xfh.jf.intel.com.notmuch/ You also added pci_set_master() :) Which means I can now give Reviewed-by: Jonathan Cameron I only noticed because I couldn't remember why I'd not given a tag to v4. Jonathan