From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CDE5C433F5 for ; Wed, 29 Dec 2021 16:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pRNnsazaHAjtggKuyj5uQjkNsgH6t/v0rFegmUvjKTQ=; b=U45pUh/U/a/pok BNRZIns0aT5Nh2wsfrmsKD3VU4Brp9mkZWw4WgfN376t8vk8WcMpluSm1eByofvVmR+mRL4wSG1Q4 FPVpvZChXIkyJl8e6Ui4axbWFmhg3qD62kvBZ2C3m1BfBn/wpKtyJ0kB6c7jHIub2gc/7HiBkbX00 X2BAtYz7nB1MkjhyVnkyFO2j3jlX0Li2dr/yZZX34evsDplQqdhGTxv/qxpCjaZBoz++pZPjw7djG nkbhunk0YkL77T0fVnduC7CregZLbheAekOl7MWdjD4W1AVvUu43GFOVA3coK9TrvItODJN/Q0mEa AGPowtd++q0KFolN1Big==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2cAs-0039Zl-EB; Wed, 29 Dec 2021 16:51:38 +0000 Received: from mail.skyhub.de ([5.9.137.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2cAn-0039Xh-Li; Wed, 29 Dec 2021 16:51:35 +0000 Received: from zn.tnic (dslb-088-067-202-008.088.067.pools.vodafone-ip.de [88.67.202.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A47CD1EC0118; Wed, 29 Dec 2021 17:51:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1640796686; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=E1moKrsQeoHGI1o/N+GTzoLPS3V7jDWAsdtjLlUVI54=; b=jQJok61NrMcuSiMUGed5g9Q7L3P1+UcO1DyxVZTBxrGgT49Z0GVfYJjB/kdcRQqgAYvwbM wzWR9utj5QAAKwhuMvNO78aKXshnZ97N46KhGKs4uUIMGdIqb63QF6QFcr3IPhvZh4hKOy IWAqf2MbW4xsccK8NJwoHPKB1r/GDRE= Date: Wed, 29 Dec 2021 17:51:29 +0100 From: Borislav Petkov To: "Leizhen (ThunderTown)" Cc: Dave Young , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Baoquan He , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , John Donnelly Subject: Re: [PATCH v19 02/13] x86/setup: Use parse_crashkernel_high_low() to simplify code Message-ID: References: <20211228132612.1860-1-thunder.leizhen@huawei.com> <20211228132612.1860-3-thunder.leizhen@huawei.com> <21736ba2-883d-1037-dbe8-299e40f7ad13@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <21736ba2-883d-1037-dbe8-299e40f7ad13@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211229_085133_896756_9A4AB846 X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 29, 2021 at 11:04:21PM +0800, Leizhen (ThunderTown) wrote: > Chen Zhou and I tried to share the code because of a suggestion. After so many > attempts, it doesn't seem to fit to make generic. Or maybe I haven't figured > out a good solution yet. Well, you learned a very important lesson and the many attempts are not in vain: code sharing does not make sense in every case. > I will put the patches that make arm64 support crashkernel...high,low to > the front, then the parse_crashkernel() unification patches. Even if the > second half of the patches is not ready for v5.18, the first half of the > patches is ready. I think you should concentrate on the arm64 side which is, AFAICT, what you're trying to achieve. The "parse_crashkernel() unification" needs more thought because, as I said already, that doesn't make a whole lot of sense to me. If you want to enforce the fact that "low" makes sense only when "high" is supplied, parse_crashkernel_high_low() is not the right thing to do. You need to have a *single* function which does all the parsing where you can decide what to do: "if high, parse low", "if no high supplied, ignore low" and so on. And if those are supported on certain architectures only, you can do ifdeffery... But I think I already stated that I don't like such unifications which introduce unnecessary dependencies between architectures. Therefore, I won't accept them into x86 unless there's a strong compelling reason. Which I don't see ATM. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel