Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7180271ybi; Thu, 1 Aug 2019 04:27:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwypXt73c2Sn8m49zex4KZgOtcMSZ/EXF3oujN72PWwj1B88f5tNai7Pg5hV6FgblO86aV0 X-Received: by 2002:a17:902:bd94:: with SMTP id q20mr115365564pls.307.1564658841895; Thu, 01 Aug 2019 04:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564658841; cv=none; d=google.com; s=arc-20160816; b=Ja4rveXw0PRhV91KBltk07U3Jmzn+imnrhEmH915vkzyJiUxM0yJSmCMJPIPgK82Er +NEeHngLQv32KhWa6JWXU2VvZYKTTC//WwUGkpxWmi8VElmioIjC/hVXIiqWYltf1sql isrg11AT8mvU/KzICWhnhtdUWjcGqs+FRjgDnRCWcmE1fVxMEz/s2iqhqxEut6MxFxAY pPrzS1nX6llIvBJ2bevtLezmOdLvLDvMLUKjeSeBYhxI1eWZikg76e1OqunEPQGsXzqJ /hOfQx/q7GXPdkK+W+PKVrnd7OlH+uG201EnkbVoUeIShiBZB8S1Uv38l9+0xcjha40+ GLVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=m1Hv7mkKxA2J7cL9IY2q909et0//jzMunKNmfEJ1snQ=; b=dkBhP432yYFEPpjqSTDkH95cWywY0tnZzZPx8vyHoT3+kdIYuzwxjOlQN4K0yMhTlT aNpccntlAzDLacx6cLK2Z6BVhowIpe51X2MmKx3EiZMxjbk44Ka55MBt7MH7VTaUFDL8 6sUKJz6rLUbANLsl3oS7+nbg4AvdXDG0CWn20n+ABYsgeNVMRXozSg/E/CtoEFBtj79b ondL1rHCTX8tE8SoEO0ZAecvzlsuBhddcOuoxW6pnrq8Y1zg0gBH0QtSjGaXmvDqWKi4 +ukXEvyuGZpHkOmLPb0VjRa3IP9OhbDyuDJZERo4zeDbOumeQZH7fjvdH4rg2Co74o6b A4JA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh2si32947805plb.116.2019.08.01.04.27.04; Thu, 01 Aug 2019 04:27:21 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730360AbfHAKRo (ORCPT + 99 others); Thu, 1 Aug 2019 06:17:44 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:34517 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbfHAKRo (ORCPT ); Thu, 1 Aug 2019 06:17:44 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ht89O-0002mO-Bu; Thu, 01 Aug 2019 12:17:34 +0200 Date: Thu, 1 Aug 2019 12:17:33 +0200 (CEST) From: Thomas Gleixner To: Daniel Drake cc: Aubrey Li , x86@kernel.org, "Li, Aubrey" , Ingo Molnar , "H . Peter Anvin" , Linux Kernel , Endless Linux Upstreaming Team Subject: Re: setup_boot_APIC_clock() NULL dereference during early boot on reduced hardware platforms In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Aug 2019, Daniel Drake wrote: > On Thu, Aug 1, 2019 at 3:16 PM Aubrey Li wrote: > However, the only way this can be called is from hpet_enable(). > > hpet_enable() is called from 2 places: > 1. From hpet_time_init(). This is the default x86 timer_init that > acpi_generic_reduced_hw_init() took out of action here. > 2. From hpet_late_init(). However that function is only called late, > after calibrate_APIC_clock() has already crashed the kernel. Also, > even if moved earlier it would also not call hpet_enable() here > because the ACPI HPET table parsing has already populated > hpet_address. > > I tried slotting in a call to hpet_enable() at an earlier point > regardless, but I still end up with the kernel hanging later during > boot, probably because irq0 fails to be setup and this error is hit: > if (setup_irq(0, &irq0)) > pr_info("Failed to register legacy timer interrupt\n"); Right. The thing also lacks PIT :) So there are two options: 1) Make sure the HPET is parsed somehow even with the reduced stuff 2) Make the clock frequency detection work. #1 is a trainwreck #2 is something we really want to have anyway. See the other reply. I cc'ed Tom there, he should be able to give us the missing link. Thanks, tglx