Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2988720imu; Sun, 9 Dec 2018 14:24:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/Upqx0zQEl6NVatb6q9lSEL8t2Ch5Yuz2iYUpbUnErs9IVO72umi65LHKJK+KMzRAX1xNAh X-Received: by 2002:a63:7b06:: with SMTP id w6mr8826113pgc.288.1544394286837; Sun, 09 Dec 2018 14:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544394286; cv=none; d=google.com; s=arc-20160816; b=auZD7TU/cU2ulQIESj4kmjL56RyQXa63owykjNpW6cdzF16/0PtpmZ0qKccLuXNMuW cCfhFRIs+JSCUTJ8Usm2OWlVFy3osyzFEPOKZktKi6dmnVmfL9WSZqkl1Z1rH9XyPd6Y IyA9YkTvwU2s025lIglmorS+QqOxECHJXw8bQv6zRv4EZuKbj9GC8+IB021klkfl8PsB SYASHMCAWE4vPKiedCvSl9EpJFF2LRRs1emIVUb7LjlzorjVNXyhuFjnoQimR4bMmZXB Co/7xfAuev8CA/RRY26xJY60EscVzLpsCq6lEu4PxOHlJl/yEKL7vHNuadpLkNqgavIY GJsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=+7SlwNsrwFt8UCx7isG5Y23srWPcOdCYrJQVbEQctqQ=; b=LvqdT4dBYKnBhAn0wyUEvOm2/wmr37TAAht2K8zjHmxwqcQLZnjDLTvLR1YlFAkTrs Q3I2rC6Kl684OFQv8ObiKeA3uumE6BgW7YBmW/jmWRxrTTssEICQFIfWt51pNsjd/5Tn wf33eVXfMohh11yjJqv9V3fuq5hmIRS3559lHJ+CCzXrsKZz2kugG0zPQxj3ZTSQnspo RmsaN8C187z/uriy5iSnwk1umiw0Cgly0CFvvqqUFYHuHSWoDYRw/05Z0S9/cC/HXC+J j9KqI9oSRIGZ7lA9exkPW49ntHlmAzFNYE9ai9dBWrUWsaMn5ZZc4b5rLkPwj0nYyTyf 5niw== 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 g124si7814948pgc.568.2018.12.09.14.24.31; Sun, 09 Dec 2018 14:24:46 -0800 (PST) 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 S1728539AbeLIWXD (ORCPT + 99 others); Sun, 9 Dec 2018 17:23:03 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35146 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726322AbeLIVzU (ORCPT ); Sun, 9 Dec 2018 16:55:20 -0500 Received: from pub.yeoldevic.com ([81.174.156.145] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gW72k-0002ib-7g; Sun, 09 Dec 2018 21:55:18 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gW72h-0003Yw-Je; Sun, 09 Dec 2018 21:55:15 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Thomas Gleixner" , "Steven Rostedt" , "Andy Lutomirski" , "Linus Torvalds" , "Ingo Molnar" , "Borislav Petkov" , "Peter Zijlstra" Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 232/328] x86/boot: Move EISA setup to a separate file In-Reply-To: X-SA-Exim-Connect-IP: 81.174.156.145 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner commit f7eaf6e00fd581043bb540dfe865f1d81769b189 upstream. EISA has absolutely nothing to do with traps, so move it out of traps.c into its own eisa.c file. Furthermore, the EISA bus detection does not need to run during very early boot, it's good enough to run it before the EISA bus and drivers are initialized. I.e. instead of calling it from the very early trap_init() code, make it a subsys_initcall(). Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064956.515322409@linutronix.de Signed-off-by: Ingo Molnar Signed-off-by: Ben Hutchings --- arch/x86/kernel/Makefile | 1 + arch/x86/kernel/eisa.c | 18 ++++++++++++++++++ arch/x86/kernel/traps.c | 13 ------------- 3 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 arch/x86/kernel/eisa.c --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_PARAVIRT) += paravirt.o pa obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o obj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o +obj-$(CONFIG_EISA) += eisa.o obj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o --- /dev/null +++ b/arch/x86/kernel/eisa.c @@ -0,0 +1,18 @@ +/* + * EISA specific code + * + * This file is licensed under the GPL V2 + */ +#include +#include + +static __init int eisa_bus_probe(void) +{ + void __iomem *p = ioremap(0x0FFFD9, 4); + + if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24)) + EISA_bus = 1; + iounmap(p); + return 0; +} +subsys_initcall(eisa_bus_probe); --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -37,11 +37,6 @@ #include #include -#ifdef CONFIG_EISA -#include -#include -#endif - #if defined(CONFIG_EDAC) #include #endif @@ -796,14 +791,6 @@ void __init trap_init(void) { int i; -#ifdef CONFIG_EISA - void __iomem *p = early_ioremap(0x0FFFD9, 4); - - if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24)) - EISA_bus = 1; - early_iounmap(p, 4); -#endif - set_intr_gate(X86_TRAP_DE, divide_error); set_intr_gate_ist(X86_TRAP_NMI, &nmi, NMI_STACK); /* int4 can be called from all */