Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6998199ybi; Thu, 1 Aug 2019 01:38:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhHncMZwit6xXAX6nx0t4kcggsZwaNRMzv8e7hXXBfdziwVv6TEt+JnVVVo9dG4LEwIS0d X-Received: by 2002:a17:902:e2:: with SMTP id a89mr125580563pla.210.1564648730423; Thu, 01 Aug 2019 01:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564648730; cv=none; d=google.com; s=arc-20160816; b=d05YZet/lBIgigq8YbuV1G2xIJxuZEYHb8CprvexPjpb0M5Gvnbjk3i2eVI/pW5ooH /ekc5L9a0tTzqHycLFR3Zk6wPTkRPsguOhPv4D75Ohb5hQnrdDhY2F3vmukiEUTeRBad 4ZA/OntXLe2a4Lm9HNzTL3yYdmuQhQnONPp9feHK+i8g0eJQwaZzVDFrvBS/ayFg+xTX l9Ha2BjTGLKuHUyNQkD3udV15+ZCkxpwZdxodOYGba1ghHZ2ylnyxx1dDhZ0PDEDMzDY 4VUaareH/RQ7tFl++7pnosHmR91YAkzyfXr/1PCNu40c6X7A5X9nvTxpE1qrFXXU2dwY o0VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=BhsEmHN+xFDw9+6j62YuEUo3iVzWBbJXMHRE2jqV5ow=; b=gFB+hFRWTkLfpYavqPPf3llyM4mbO/bc8OGdUNCUBErBF/Mt2HFDs+xc2Xk8/UgyZa O6ysXcFq5HFiXLOaMXSrXLNA/QrjT2+jhQIrmdrO/plnMM3yftDtf4f/S1r7u96GhMBI 2WAY3G561MBvMvmbR6AtP3qvffZUNSnv51jM+DSxAsECpNvGBDfEZivQnllNRwEzWLRD YDaKTHvmniE9nXq8O5o4E984x6lig2ZpNOCHsnpFS+psCcPHmJPokUDfhnn13+cwioIY A4WXMYujUcXE77dVRNaNmtS+wD3c+/7AWHgaHvSwuc5ZgJ+qxLXaVZFqlYEgVw/PBOT0 pZsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si31896793pls.52.2019.08.01.01.38.34; Thu, 01 Aug 2019 01:38:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730736AbfHAIVe (ORCPT + 99 others); Thu, 1 Aug 2019 04:21:34 -0400 Received: from mga07.intel.com ([134.134.136.100]:25114 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfHAIVd (ORCPT ); Thu, 1 Aug 2019 04:21:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 01:21:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,333,1559545200"; d="scan'208";a="180626986" Received: from cli6-desk1.ccr.corp.intel.com (HELO [10.239.161.118]) ([10.239.161.118]) by FMSMGA003.fm.intel.com with ESMTP; 01 Aug 2019 01:21:31 -0700 Subject: Re: setup_boot_APIC_clock() NULL dereference during early boot on reduced hardware platforms To: Thomas Gleixner , Aubrey Li Cc: Daniel Drake , x86@kernel.org, Ingo Molnar , "H . Peter Anvin" , Linux Kernel , Endless Linux Upstreaming Team References: From: "Li, Aubrey" Message-ID: <81666b28-d029-56c3-8978-90abc219d1b7@linux.intel.com> Date: Thu, 1 Aug 2019 16:21:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/8/1 16:13, Thomas Gleixner wrote: > On Thu, 1 Aug 2019, Aubrey Li wrote: >> On Thu, Aug 1, 2019 at 3:35 PM Thomas Gleixner wrote: >>> >>> On Thu, 1 Aug 2019, Aubrey Li wrote: >>>> On Thu, Aug 1, 2019 at 2:26 PM Daniel Drake wrote: >>>>> global_clock_event is NULL here. This is a "reduced hardware" ACPI >>>>> platform so acpi_generic_reduced_hw_init() has set timer_init to NULL, >>>>> avoiding the usual codepaths that would set up global_clock_event. >>>>> >>>> IIRC, acpi_generic_reduced_hw_init() avoids initializing PIT, the status of >>>> this legacy device is unknown in ACPI hw-reduced mode. >>>> >>>>> I tried the obvious: >>>>> if (!global_clock_event) >>>>> return -1; >>>>> >>>> No, the platform needs a global clock event, can you turn on some other >>> >>> Wrong. The kernel boots perfectly fine without a global clock event. But >>> for that the TSC and LAPIC frequency must be known. >> >> I think LAPIC fast calibrate is only supported on intel platform, while >> Daniel's box is an AMD platform. That's why lapic_init_clockevent() failed >> and fall into the code path which needs a global clock event. > > We know that. > > The point is that it does not matter which vendor a CPU comes from. The > kernel does support legacyless boot when the frequencies are known. Whether > that's currently possible on that particular CPU is a different question. > Yeah, I should specify, Daniel, your platform needs a global clock event, ;-) Thanks, -Aubrey