Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2182263ybh; Fri, 24 Jul 2020 06:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDdDqtL0aHAIqoo0mejvaEzD4AtuBnNvzPFMTyO7YF4P4EBEoapFxHFs22STOHP+mQc8jm X-Received: by 2002:a50:f9c9:: with SMTP id a9mr9184691edq.89.1595597608624; Fri, 24 Jul 2020 06:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595597608; cv=none; d=google.com; s=arc-20160816; b=shvXPkkFGcGjt4B0ULRym3beamB+cXMixzO9ZMoMwM6cKewHRcp0efu+D0twEQjrvN K05Ek/YFgT/BOTJ6SJXQLP1nLSvLVuNOAOKGqZtEHM//Sf4XRtIlEHfMgZPoAs8FWzVA egDMGfX1iN3axAWcyfuUGuu8tafWLE4O4ZzMEJHFdNTOqAiqtKCNbxJj5O7+BMAYDxz6 bQwqpQD8cXLlfJIHvOJa9FtE0sEbHvTmIRaQsTcJyW8Vzs8qmvITuLBK7PKocLx8I/k9 2ytFtneBfIDNmasCIcWdDRYObtVLvvJUwQ645wUcX7gAd/AUPqCQAQAgUCVJhQ6Mn0xO Uw2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=3QsKmRt40C0yMWwwNw3/0oiLQtIg3FZsoVZ0AsbZpj4=; b=wlUeJOkduBvLMVLEAa0KYLrCWOtuYeW0zsdOJmVOtrGT8sWlQ04TXs/eUOyxKAhOsh qpilqmJ7G5lkrZKNjXt3vagJAgF42bRNH6ziSsiUen2ErPSoKfJBKLZUAep36B/WJXLr JJEpxTMMUeX4SxNk76j4cOqHCdSKMn1lo1QzcG3UcWZCFAaO/fyK9e4W2qPVYQCrvz2j qT8w1LLqgiD3TAz0Qe5U91/P0HhOCD1Me3aJO/Y4X3qmUGEuUOhvWIq4oX+kiNAsH2ty Z2nHdM+aQCEJLDUWIsG9jwD/WUXc2R0kT+cNDGPHW5ZMBCbNlyS19Zf3FvxXY/EpUBMg wM5g== ARC-Authentication-Results: i=1; mx.google.com; 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 bz23si598484ejc.195.2020.07.24.06.33.06; Fri, 24 Jul 2020 06:33:28 -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; 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 S1726567AbgGXNcz convert rfc822-to-8bit (ORCPT + 99 others); Fri, 24 Jul 2020 09:32:55 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2524 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726235AbgGXNcy (ORCPT ); Fri, 24 Jul 2020 09:32:54 -0400 Received: from lhreml720-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 8578F17D3DDB922F41EF; Fri, 24 Jul 2020 14:32:52 +0100 (IST) Received: from lhreml715-chm.china.huawei.com (10.201.108.66) by lhreml720-chm.china.huawei.com (10.201.108.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 24 Jul 2020 14:32:52 +0100 Received: from lhreml715-chm.china.huawei.com ([10.201.108.66]) by lhreml715-chm.china.huawei.com ([10.201.108.66]) with mapi id 15.01.1913.007; Fri, 24 Jul 2020 14:32:52 +0100 From: Shiju Jose To: Bjorn Helgaas CC: "linux-acpi@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "rjw@rjwysocki.net" , "bp@alien8.de" , "james.morse@arm.com" , "lenb@kernel.org" , "tony.luck@intel.com" , "dan.carpenter@oracle.com" , "zhangliguang@linux.alibaba.com" , "andriy.shevchenko@linux.intel.com" , "Wangkefeng (OS Kernel Lab)" , "jroedel@suse.de" , Linuxarm , yangyicong , Jonathan Cameron , tanxiaofei Subject: RE: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records Thread-Topic: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records Thread-Index: AQHWYUfqroZbmVDLlEO3jLbzt/fllakWZmIggAA5R4CAABpXQA== Date: Fri, 24 Jul 2020 13:32:52 +0000 Message-ID: References: <20200724125357.GA1510118@bjorn-Precision-5520> In-Reply-To: <20200724125357.GA1510118@bjorn-Precision-5520> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.85.142] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: Bjorn Helgaas [mailto:helgaas@kernel.org] >Sent: 24 July 2020 13:54 >To: Shiju Jose >Cc: linux-acpi@vger.kernel.org; linux-pci@vger.kernel.org; linux- >kernel@vger.kernel.org; rjw@rjwysocki.net; bp@alien8.de; >james.morse@arm.com; lenb@kernel.org; tony.luck@intel.com; >dan.carpenter@oracle.com; zhangliguang@linux.alibaba.com; >andriy.shevchenko@linux.intel.com; Wangkefeng (OS Kernel Lab) >; jroedel@suse.de; Linuxarm >; yangyicong ; Jonathan >Cameron ; tanxiaofei > >Subject: Re: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown >(vendor) CPER records > >On Fri, Jul 24, 2020 at 09:00:41AM +0000, Shiju Jose wrote: >> >-----Original Message----- >> >From: Bjorn Helgaas [mailto:helgaas@kernel.org] >> >Sent: 24 July 2020 00:21 >> >To: Shiju Jose >> >Cc: linux-acpi@vger.kernel.org; linux-pci@vger.kernel.org; linux- >> >kernel@vger.kernel.org; rjw@rjwysocki.net; bp@alien8.de; >> >james.morse@arm.com; lenb@kernel.org; tony.luck@intel.com; >> >dan.carpenter@oracle.com; zhangliguang@linux.alibaba.com; >> >andriy.shevchenko@linux.intel.com; Wangkefeng (OS Kernel Lab) >> >; jroedel@suse.de; Linuxarm >> >; yangyicong ; >Jonathan >> >Cameron ; tanxiaofei >> > >> >Subject: Re: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for >> >unknown >> >(vendor) CPER records >> > >> >On Wed, Jul 22, 2020 at 11:39:51AM +0100, Shiju Jose wrote: >> >> CPER records describing a firmware-first error are identified by GUID. >> >> The ghes driver currently logs, but ignores any unknown CPER records. >> >> This prevents describing errors that can't be represented by a >> >> standard entry, that would otherwise allow a driver to recover from >> >> an >> >error. >> >> The UEFI spec calls these 'Non-standard Section Body' (N.2.3 of >> >> version 2.8). >> > >> >> +#ifdef CONFIG_ACPI_APEI_GHES >> >> +/** >> >> + * ghes_register_vendor_record_notifier - register a notifier for >> >> +vendor >> >> + * records that the kernel would otherwise ignore. >> >> + * @nb: pointer to the notifier_block structure of the event handler. >> >> + * >> >> + * return 0 : SUCCESS, non-zero : FAIL */ int >> >> +ghes_register_vendor_record_notifier(struct notifier_block *nb); >> >> + >> >> +/** >> >> + * ghes_unregister_vendor_record_notifier - unregister the >> >> +previously >> >> + * registered vendor record notifier. >> >> + * @nb: pointer to the notifier_block structure of the vendor >> >> +record >> >handler. >> >> + */ >> >> +void ghes_unregister_vendor_record_notifier(struct notifier_block >> >> +*nb); #else static inline int >> >> +ghes_register_vendor_record_notifier(struct notifier_block *nb) { >> >> + return -ENODEV; >> >> +} >> >> + >> >> +static inline void ghes_unregister_vendor_record_notifier(struct >> >> +notifier_block *nb) { } >> > >> >If you made CONFIG_PCIE_HISI_ERR depend on CONFIG_ACPI_APEI_GHES, >> >you'd be able to get rid of these stubs, wouldn't you? It doesn't >> >look like there's any point in building pcie-hisi-error.c at all >> >unless CONFIG_ACPI_APEI_GHES is enabled. >> >> The stub is added because this interface is expected to use by the >> other drivers as well. Some drivers may not want add the build depend >> on the CONFIG_ACPI_APEI_GHES if the error reporting has less priority >> in the driver. However we can add dependency on >CONFIG_ACPI_APEI_GHES >> for building pcie-hisi-error.c. > >The usual route is to add stubs when they're needed, not just in anticipation >of some need that may never materialize. ok. I will change in the next version. Thanks, Shiju