Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp207507rwb; Fri, 12 Aug 2022 18:00:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+BPXlvy6UUUiPz72pBrBs0OFoM6sCFOxYPoA9LDA3zX8hDdXU+U6QI4R2Lj6XDvcw8qED X-Received: by 2002:a17:907:8a01:b0:731:4316:b0ad with SMTP id sc1-20020a1709078a0100b007314316b0admr4216783ejc.477.1660352403121; Fri, 12 Aug 2022 18:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660352403; cv=none; d=google.com; s=arc-20160816; b=lI7Vuxvn8P5qqEQIMfC/DCxUtABgrZjzyJq979Sg3/XhPlUoEvLxzjpuEK4LJnq4rb fqJmzdXn2B+n9nFkwgwlimzxA0uTcXeBkdHKJN76ZHf0jkoLYewvG7qCXGUbbM/eAXmm jl5kx3TkK9NDhk9YK1Pcy5D2WWHYzkUrC4sU6w1SSyEdxtLzLNFzMQf5uEA6EFDL565M x+Ued5OkIbMRRD06c3VtW+OscAY0L/HB37cHvojgZemOoD7DgxPDk8n+8DWZgIsBTZFR iVIKBeEE1m2H5kHzF8E5Qh81MFZNwPyakur8eUWt5tqIBcJap8w5ivUh3SoCmp2rcWEN wTLg== 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=D+F48GZrNmKWUhdl+zaXl1w6N+t4Zw3HE18peH9oyp0=; b=J/Q7/DRXFEk0kzcc5E1Pd9DWbQJDtunrhGi84DXF/SJzwXrpvW11CFF19SFngNo0ne WJ8E84reSOZ/2IorA8Nzs3isP8G2k87+k59R6KWX24F3VpqIPvh2Jaf3xdm8DkmrTAVg u00kvKPsWoNrS4xG4rA++GbHGN0UkUeU6zS9ubBcJAaNgAgjrCTYuQvU7oNJanqGf61J 2Qf5RfBOm3DiI5e66j0r8Dao2ELIF/xGXEwh9VGi+ZDBIM6zmdK4hkqbbg7mog+ob+eq YxWXFxS5CCERIHqjqMZ49jPdWlcYdTp1kAaaVsiS08QLwJLcurJVS5mvxfHGGJk522hM +PlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Jt+QW/KI"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a1709064fd100b007305f9cf344si3190705ejw.853.2022.08.12.17.59.37; Fri, 12 Aug 2022 18:00:03 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Jt+QW/KI"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234256AbiHMAYt (ORCPT + 99 others); Fri, 12 Aug 2022 20:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbiHMAYs (ORCPT ); Fri, 12 Aug 2022 20:24:48 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4A7CDA3D60 for ; Fri, 12 Aug 2022 17:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660350284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D+F48GZrNmKWUhdl+zaXl1w6N+t4Zw3HE18peH9oyp0=; b=Jt+QW/KIZbAwkWpxZNJV7j2dAgTMiJhvmlZvg7YxsiXyIQTiixK4qn//dO1nAWfzDGj9Ns qFnxR9v2ryNb6jqNsIEbYSIBSh2bK8yFepqLw6PeBOcD1YPu+HfQNzD+HuW5GotBvC5XNt WKtkQBoWSAKZBgak+ulfjrG4X+F1Hbs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-609-BCAHucJXNv2sttbzvrBPPQ-1; Fri, 12 Aug 2022 20:24:40 -0400 X-MC-Unique: BCAHucJXNv2sttbzvrBPPQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1564B3C0219A; Sat, 13 Aug 2022 00:24:39 +0000 (UTC) Received: from localhost (ovpn-12-29.pek2.redhat.com [10.72.12.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3593403178; Sat, 13 Aug 2022 00:24:37 +0000 (UTC) Date: Sat, 13 Aug 2022 08:24:35 +0800 From: Baoquan He To: Eric DeVolder Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, david@redhat.com, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com Subject: Re: [PATCH v10 1/8] crash: introduce arch/*/asm/crash.h Message-ID: References: <20220721181747.1640-1-eric.devolder@oracle.com> <20220721181747.1640-2-eric.devolder@oracle.com> <52d40562-ee6f-bb89-6d21-2d6baf67053d@oracle.com> <2b44bbd1-6e6f-40d1-73ac-19348d1ef48a@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2b44bbd1-6e6f-40d1-73ac-19348d1ef48a@oracle.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 08/12/22 at 04:23pm, Eric DeVolder wrote: > > > On 8/12/22 04:46, Baoquan He wrote: > > On 08/08/22 at 10:18am, Eric DeVolder wrote: > > > > > > > > > On 8/7/22 22:25, Baoquan He wrote: > > > > Hi Eric, > > > > > > > > On 07/21/22 at 02:17pm, Eric DeVolder wrote: > > > > > The use of __weak is being eliminated within kexec sources. > > > > > The technique uses macros mapped onto inline functions in > > > > > order to replace __weak. > > > > > > > > > > This patchset was using __weak and so in order to replace > > > > > __weak, this patch introduces arch/*/asm/crash.h, patterned > > > > > after how kexec is moving away from __weak and to the macro > > > > > definitions. > > > > > > > > Are you going to replace __weak in kexec of arll ARCHes? I don't see > > > > your point why all these empty header files are introduced. Wondering > > > > what's impacted if not adding these empty files? > > > > > > Hi Baoquan, > > > In this patchset, to file include/linux/crash_core.h I added the line #include . > > > I patterned this after how include/linux/kexec.h does #include . > > > > I am sorry, Eric, it looks not so good. I understand you want to pattern > > asm/kexe.h, but we need consider reality. Introducing a dozen of empty > > header file and not being able to tell when they will be filled doesn't > > make sense. > > > > Includig where needed is much simpler. I doubt if your way > > can pass other reviewers' line. Can you reconsider? > > If I include where needed, which is kernel/crash_core.c, then > the other archs will fail build if that file doesn't exist. A couple of > options, which do you think is better to pursue? > > - use asm/kexec.h instead of asm/crash.h; it appears all the architectures > already have this file in place > > - go ahead and put the appropriate crash macros/inline functions into each > arch asm/crash.h so that the files are not just empty, and leave the use of > asm/crash.h I think we can do this in two steps. Firstly, make do with asm/kexec.h since all other ARCHes put crash related stuff into asm/kexec.h, except of x86. Secondly, clean up to put those crash marco/inline functions into asm/crash.h. The 2nd step can be done in a independent patchset. What do you think?