Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2456087pxb; Tue, 23 Feb 2021 07:30:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaFSJ+g3TYKAckYZc2pnFU6yw3+oquq+OG4QedkeoGaxam2q4f+ecgOO6CTjTxHLYcvDXX X-Received: by 2002:a50:bf42:: with SMTP id g2mr28544942edk.101.1614094217425; Tue, 23 Feb 2021 07:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614094217; cv=none; d=google.com; s=arc-20160816; b=dpu8arcDHp2YNKFbtavXkaiBxjeAYCGlc7ZrU5PjwrpXliZly1jUtTkmZOrFZi8qGR Htq1AHvSnqoei1ItX2kzPwrR8wBq1vexzrDYnslhJl7J8cqYxkQQhzzW6TN4asb9hUsj ty1bCzIIErt4Jw9MoNgvmCdbkDiIXW9HQfhP0U8kbG23ydkNBk5nNGOTSCmlQuObncaN gOOHQFYra9aWMijKNfv+LsAnXENurWyzTQ6maAkcEhnJ14d2lkzBy/R1kiCxOnaYYd5Q nVzzkhnG7QClSLyDTJCMyO3HYmF1NHrtVMGBBiHB3ZkHAPeFT74f1UEMhtwpx7rMjLqO 8Ptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Q95ObrvBxE+J4i9L0Nsabd//nc+9xYDpohx8QQswp+I=; b=BXNU7/tNmy86wjTY6K2h529KPnp0151nPTX50buOaxvglXKBs+Ji1lWWr92yzC6tS9 GZT8IPlzjlEISPm5UTCNe4b58QbO1keItsPn3WsBXmLW+hJPzbqI//ZXLFgpHZlL44Li 5IznqvwBVnvRgQyaEKs7+vNhPzSc0zzP1wKcZn4LWrvx7vY9IUQxsJX7eHhHNQe2zZc4 ev5Ot1lbRRbjKJoHNpBH4JAH/ysKerhp3BAN0j0CgrBpEjog2DDo1WACCpm8Z616xzDw 5vuScnRirHCeM0qYQFZ8BJQsgXB+vYli4mdri6PG8lPBzG/7SyCrzVafdm1HkxKE2q2K cYZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si579872edl.301.2021.02.23.07.29.40; Tue, 23 Feb 2021 07:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233247AbhBWP2B (ORCPT + 99 others); Tue, 23 Feb 2021 10:28:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233236AbhBWP16 (ORCPT ); Tue, 23 Feb 2021 10:27:58 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC50DC061786 for ; Tue, 23 Feb 2021 07:27:14 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1lEZah-007R3T-PB; Tue, 23 Feb 2021 16:27:11 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Johannes Berg Subject: [PATCH 1/7] um: allow disabling NO_IOMEM Date: Tue, 23 Feb 2021 16:27:01 +0100 Message-Id: <20210223161449.5fbbdace8fea.I7b2fad8378e4fde7f26ef06a03980ae2807d81c9@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210223152707.408995-1-johannes@sipsolutions.net> References: <20210223152707.408995-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg Adjust the kconfig a little to allow disabling NO_IOMEM in UML. To make an "allyesconfig" with CONFIG_NO_IOMEM=n build, adjust a few Kconfig things elsewhere and add dummy asm/fb.h and asm/vga.h files. Signed-off-by: Johannes Berg --- arch/um/Kconfig | 4 ++++ arch/um/include/asm/fb.h | 15 +++++++++++++++ arch/um/include/asm/vga.h | 9 +++++++++ drivers/input/Kconfig | 1 - drivers/input/gameport/Kconfig | 1 + drivers/input/joystick/Kconfig | 1 + drivers/tty/Kconfig | 5 ++--- drivers/video/console/Kconfig | 2 +- 8 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 arch/um/include/asm/fb.h create mode 100644 arch/um/include/asm/vga.h diff --git a/arch/um/Kconfig b/arch/um/Kconfig index c3030db3325f..20b0640e01b8 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -26,6 +26,10 @@ config MMU default y config NO_IOMEM + bool "disable IOMEM" if EXPERT + default y + +config NO_IOPORT_MAP def_bool y config ISA diff --git a/arch/um/include/asm/fb.h b/arch/um/include/asm/fb.h new file mode 100644 index 000000000000..f8fa5a6b43b5 --- /dev/null +++ b/arch/um/include/asm/fb.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_UM_FB_H +#define _ASM_UM_FB_H + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ +} + +static inline int fb_is_primary_device(struct fb_info *info) +{ + return 0; +} + +#endif /* _ASM_UM_FB_H */ diff --git a/arch/um/include/asm/vga.h b/arch/um/include/asm/vga.h new file mode 100644 index 000000000000..0b0e73ccdb28 --- /dev/null +++ b/arch/um/include/asm/vga.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_UM_VGA_H +#define _ASM_UM_VGA_H + +#define VGA_MAP_MEM(x, s) ((unsigned long) ioremap(x, s)) +#define vga_readb(a) readb((u8 __iomem *)(a)) +#define vga_writeb(v,a) writeb(v, (u8 __iomem *)(a)) + +#endif /* _ASM_UM_VGA_H */ diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index ec0e861f185f..5baebf62df33 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -4,7 +4,6 @@ # menu "Input device support" - depends on !UML config INPUT tristate "Generic input layer (needed for keyboard, mouse, ...)" if EXPERT diff --git a/drivers/input/gameport/Kconfig b/drivers/input/gameport/Kconfig index 4761795cb49f..5a2c2fb3217d 100644 --- a/drivers/input/gameport/Kconfig +++ b/drivers/input/gameport/Kconfig @@ -4,6 +4,7 @@ # config GAMEPORT tristate "Gameport support" + depends on !UML help Gameport support is for the standard 15-pin PC gameport. If you have a joystick, gamepad, gameport card, a soundcard with a gameport diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig index b080f0cfb068..6a03a1f0cd5f 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig @@ -4,6 +4,7 @@ # menuconfig INPUT_JOYSTICK bool "Joysticks/Gamepads" + depends on !UML help If you have a joystick, 6dof controller, gamepad, steering wheel, weapon control system or something like that you can say Y here diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index e15cd6b5bb99..26648daaaee2 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig @@ -12,9 +12,8 @@ if TTY config VT bool "Virtual terminal" if EXPERT - depends on !UML select INPUT - default y + default y if !UML help If you say Y here, you will get support for terminal devices with display and keyboard devices. These are called "virtual" because you @@ -78,7 +77,7 @@ config VT_CONSOLE_SLEEP config HW_CONSOLE bool - depends on VT && !UML + depends on VT default y config VT_HW_CONSOLE_BINDING diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index ee33b8ec62bb..840d9813b0bc 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -9,7 +9,7 @@ config VGA_CONSOLE bool "VGA text console" if EXPERT || !X86 depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !SUPERH && \ (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ - !ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !NDS32 && !S390 + !ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !NDS32 && !S390 && !UML default y help Saying Y here will allow you to use Linux in text mode through a -- 2.26.2