From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 15 19:43:22 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF751065674 for ; Sun, 15 Jul 2012 19:43:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 68FD88FC12 for ; Sun, 15 Jul 2012 19:43:21 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA22527 for ; Sun, 15 Jul 2012 22:43:13 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SqUin-000JbI-8v for freebsd-acpi@FreeBSD.org; Sun, 15 Jul 2012 22:43:13 +0300 Message-ID: <50031D4E.8060200@FreeBSD.org> Date: Sun, 15 Jul 2012 22:43:10 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120620 Thunderbird/13.0.1 MIME-Version: 1.0 To: "freebsd-acpi@freebsd.org" X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: acpi_cpu_idle: cpu with no corresponding acpi cpu X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 19:43:22 -0000 I have a question about the following block in acpi_cpu_idle: /* * Look up our CPU id to get our softc. If it's NULL, we'll use C1 * since there is no ACPI processor object for this CPU. This occurs * for logical CPUs in the HTT case. */ sc = cpu_softc[PCPU_GET(cpuid)]; if (sc == NULL) { acpi_cpu_c1(); return; } I believe that a part of the comment that singles out HTT is certainly incorrect for modern and non-buggy ACPI tables. But in general, should we expect (and support) ACPI platforms where some real CPUs (which have to be advertised via ACPI [modulo non-MADT, mptable-only systems]) do not have corresponding Processor objects in DSDT? Does acpi_pcpu_get_id provide such support? Or can the code in question be just replaced with KASSERT? Thank you in advance. -- Andriy Gapon