Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3176927yba; Mon, 22 Apr 2019 22:06:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4YzHdlTMswbtkBW4EB1/gVN5SF6RvisHeIO4XY1Zjn+W0V1L3gLciufHagD9nUgSUkKXR X-Received: by 2002:a63:6f04:: with SMTP id k4mr4536554pgc.366.1555995977603; Mon, 22 Apr 2019 22:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555995977; cv=none; d=google.com; s=arc-20160816; b=H2lCQNfubQWWKLgytJPEYCkoNuSuRZuZgjVAO6ZgwNZkJOynn02P6zoN45m/o81PXl zaLrMGB5rNS+Xj9UetwhHHYa+dis5YPcqyrLqQxEwDcQFB+f0YqWQ0yxToDMDuOmqFCh HxWkcPSnLPtlfsFNbvh6jdyULUkKe2yzXsCimnSRUh+aPRkTX2lBYnxpYML+cUjes2SY w+h36ZXO0pNoTmffxdoOP8XUht5GJLTKiiZCdNM2CHQcEQqzC5aDgBBdvBUEJ4hZhTKe nC6Qh3hN+QcCdfhNptVxQ7UBaPoik2SUXRcwZ3p9ZQRt1d5BU9Z0yVic1N4pww+go96t DOqA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dQF/GibJOWYoNi6DvMf3uTlLfCs4AKiZJg5TmKxfRJY=; b=E1CTFbUKwkfTh1ZMf6YYzh+/2QSOwKzNglntltGBOE7uK1Ct0bL2Vam8pokqKrA88/ GnglvnKPNsjiG3MrZ2WI+Bm45RYJf1HECtnQ/AYaSiNRTRnaZOaW9B8VRh1zvd5gRdI5 rjnZU+Mqt4utXGQFaDl95+ldXYJZEbs2edC+JXB+XIKtnxzBpH1LfCIbBdhdI0nt2cLu EamWASEdRyLkgXoes/5r3f0y/o7ZRkibVRammV5vqnI7qCpaD5CPbJFELfgYKUIfTopu 6HNyGvTa3XCCJl6xVgB06t6CX6w0KBHWwtmZCO5+uG1kP9Ut6gZDqL/TQo+3MGtjYKkn VOug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b="DDHrHIG/"; 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 b67si15798142plb.20.2019.04.22.22.06.00; Mon, 22 Apr 2019 22:06:17 -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; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b="DDHrHIG/"; 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 S1726030AbfDWFEF (ORCPT + 99 others); Tue, 23 Apr 2019 01:04:05 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34833 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfDWFEE (ORCPT ); Tue, 23 Apr 2019 01:04:04 -0400 Received: by mail-pl1-f193.google.com with SMTP id w24so6886755plp.2 for ; Mon, 22 Apr 2019 22:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dQF/GibJOWYoNi6DvMf3uTlLfCs4AKiZJg5TmKxfRJY=; b=DDHrHIG/SmOuTuzAhj0ntmbi3rgG812RvEv3fyd0ZSyPRBbSUjdChSjJaJ7+EbIAGT WmBGVV7CKHvUkjyS5KaTQBWTAIqAGKXkos/bhLzryK4pWfasLduBECoRdXantnlfSQvu fqGQefPgpOFk+9KeTfNmgmIMpMMuifwV/qdm+98BwrakTUt6PLd8eSNDiwiBo0LfLSF2 3A8lYahumy53A6IIwaoxykmBeocmXYE0bZKYJYbgKKz+MVxlQcJpYT3xz32P/Y7uZ8er 2OcCQ1cuRLn20ABPbmRKF9pgHTKgv5ijdKeTpFbD5wKM5+WXAASTisYTG8sphxUjTtiH rQ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dQF/GibJOWYoNi6DvMf3uTlLfCs4AKiZJg5TmKxfRJY=; b=XShSsLydrAhGygPjzD+NZHhECsgZRmHmX0C6NomTokCUDzhd4ZvEy+SgIyIz/RrbGs MG0b4bnaZLO7qIqFfCaJ5/414NCpWM2ioxMWFMK9aORzu6fWGzFyVTTXNRmYe2flA+PX otN1AB4RPbUPz8KEI9wv7MFGSNQv5ZX0n2j26jb3mNs0zidawRSZq4c808Nq5xzIEpBF Ke3wu+t5WUR8zOJ+hRkWe99r+sQThNuhZNPb6zIT+IEhrTrac0cwBsDrAasnnK+7Y2bJ yh0eNyqQrbrPXPRIM0KeydwxZewz/Srdmk5OjBwPM1aNmToZto+daZ5g7CBlI656TE+k 4ahQ== X-Gm-Message-State: APjAAAXj3mS7gJ6ou7vbD8As+wciXnyCZYk4EyOy5d2sYcUziAHXpPx8 VSEUr6no+KyLVF+tffIuyKbp4Q== X-Received: by 2002:a17:902:5a3:: with SMTP id f32mr21411731plf.82.1555995843782; Mon, 22 Apr 2019 22:04:03 -0700 (PDT) Received: from limbo.local (123-204-46-122.static.seed.net.tw. [123.204.46.122]) by smtp.gmail.com with ESMTPSA id f71sm25880669pfc.109.2019.04.22.22.04.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Apr 2019 22:04:03 -0700 (PDT) From: Daniel Drake To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, len.brown@intel.com, rafael.j.wysocki@intel.com, linux@endlessm.com, hdegoede@redhat.com Subject: [PATCH 2/2] x86/ioapic: avoid timer manipulation when IRQ0 timer is unavailable Date: Tue, 23 Apr 2019 13:03:54 +0800 Message-Id: <20190423050354.8025-2-drake@endlessm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190423050354.8025-1-drake@endlessm.com> References: <20190423050354.8025-1-drake@endlessm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org New products based on Intel Apollo Lake are appearing where the HPET is not present in ACPI, and the legacy 8254 PIT is "gated" by default in the BIOS setup menu. This leads an early boot "IO-APIC + timer doesn't work!" kernel panic on a black screen (before the framebuffer is initialized). Avoid the IO-APIC IRQ0 timer manipulation & verification on platforms where the legacy IRQ0 timer has been determined as unavailable. This fixes boot on Connex L1430 and Scope SN116PYA with default BIOS settings. Signed-off-by: Daniel Drake Link: https://lkml.kernel.org/r/CAD8Lp45fedoPLnK=UmUhhtkjy5u2h04sYKrx3U+m04U6FpVZ4A@mail.gmail.com --- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index ae46da48c07b..2d29c62abbcb 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2243,7 +2243,7 @@ void __init setup_IO_APIC(void) sync_Arb_IDs(); setup_IO_APIC_irqs(); init_IO_APIC_traps(); - if (nr_legacy_irqs()) + if (global_clock_event && nr_legacy_irqs()) check_timer(); ioapic_initialized = 1; -- 2.19.1