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 X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6022C11D30 for ; Mon, 24 Feb 2020 13:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 93CE421556 for ; Mon, 24 Feb 2020 13:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="lxE4UnPO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbgBXNV7 (ORCPT ); Mon, 24 Feb 2020 08:21:59 -0500 Received: from mail.skyhub.de ([5.9.137.197]:39444 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727348AbgBXNV6 (ORCPT ); Mon, 24 Feb 2020 08:21:58 -0500 Received: from zn.tnic (p200300EC2F0C0F00754C15A63F97C369.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:f00:754c:15a6:3f97:c369]) (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 74D611EC06AC; Mon, 24 Feb 2020 14:21:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1582550516; 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=APjkWpDkYH8yw2wswFHOWZARM3dlj65G1SzI9xgA+P4=; b=lxE4UnPODOkaacszfRk6SFjs53/XedHYzkTkjwsQeni5GNQ9cNkYoZG8wiG40LRf/vIlZ0 Qkr8rbk2qp2J5olJmt6WVSUnb/CulXVkOxvp3ZOxNFbtJ5/dj+jY+I76cXFTgACF9e9grz 6v39vyX+2O+d+4EaZn4c+ZjiJNXFxHw= Date: Mon, 24 Feb 2020 14:21:52 +0100 From: Borislav Petkov To: Cao jin Cc: x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [RFC PATCH 1/2] x86/acpi: Improve code readablity of early madt processing Message-ID: <20200224132152.GB29318@zn.tnic> References: <20200123014144.19155-1-caoj.fnst@cn.fujitsu.com> <20200123014144.19155-2-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200123014144.19155-2-caoj.fnst@cn.fujitsu.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Thu, Jan 23, 2020 at 09:41:43AM +0800, Cao jin wrote: > Current processing logic is confusing. > > Return value of early_acpi_parse_madt_lapic_addr_ovr() indicates error(< 0), > parsed entry number(>= 0). You mean, the count of table entries parsed successfully? > So, it makes no sense to initialize acpi_lapic & smp_found_config > seeing no override entry, instead, initialize them seeing MADT. Err, that logical conclusion is not really clear to me - pls try again with more detail. I kinda see what you mean by looking at acpi_process_madt() but before I commit a change like that, I better have the warm and fuzzy feeling that it is correct and properly explained in its commit message. So why did cbf9bd603ab1 ("acpi: get boot_cpu_id as early for k8_scan_nodes") do it this way? Was it wrong or why? I'm very wary about touching ACPI parsing code for no good reason because, well, it is ACPI... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette